{
  "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

Fetches the sub accounts associated with the main wallet account. Sub accounts allow for hierarchical account management and delegation.

Parameters

account
string
required

The address of the main wallet account.

domain
string
required

The fully qualified domain name of the app that the sub account is associated with.

Returns

result
object

Sub account information including address and deployment details.

{
  "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

CodeMessageDescription
4100Requested method not supportedThe method is not supported by the wallet
-32602Invalid paramsInvalid account configuration

This is an experimental feature and the API may change in future versions.