Experimental RPC method for fetching sub accounts
Fetches the sub accounts associated with the main wallet account. Sub accounts allow for hierarchical account management and delegation.
Parameters
The address of the main wallet account.The fully qualified domain name of the app that the sub account is associated with.
Returns
Sub account information including address and deployment details.
Array of sub account information.Show Sub account properties
The address of the created sub account.
The factory contract address.
{
"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"
}
]
}
}
Error Handling
| Code | Message | Description |
|---|
| 4100 | Requested method not supported | The method is not supported by the wallet |
| -32602 | Invalid params | Invalid account configuration |
This is an experimental feature and the API may change in future versions.