Fetches the sub accounts associated with the main wallet account. Sub accounts allow for hierarchical account management and delegation.
{
"id": 1,
"jsonrpc": "2.0",
"method": "wallet_getSubAccounts",
"params": [{
"account": "0x1234567890123456789012345678901234567890",
"domain": "https://app.example.com"
}]
}
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"subAccounts": [
{
"address": "0x2345678901234567890123456789012345678901",
"factory": "0x1234567890123456789012345678901234567890",
"factoryData": "0x1234567890123456789012345678901234567890"
}
]
}
}
Provider RPC Methods
wallet_getSubAccounts
Fetch the sub accounts of the wallet
{
"id": 1,
"jsonrpc": "2.0",
"method": "wallet_getSubAccounts",
"params": [{
"account": "0x1234567890123456789012345678901234567890",
"domain": "https://app.example.com"
}]
}
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"subAccounts": [
{
"address": "0x2345678901234567890123456789012345678901",
"factory": "0x1234567890123456789012345678901234567890",
"factoryData": "0x1234567890123456789012345678901234567890"
}
]
}
}
Experimental RPC method for fetching sub accounts
Was this page helpful?