Skip to main content
Returns the array of sub-accounts your application has created for the connected user. Empty if none.

Request

const { subAccounts } = await provider.request<{ subAccounts: SubAccount[] }>({
  method: 'wallet_getSubAccounts',
})

Parameters

None.

Returns

{
  subAccounts: [
    {
      address: '0x...',
      chainId: '0x74c',
      factory: '0x...',
      factoryData: '0x...',
    },
  ],
}

Errors

CodeCause
4100Wallet not connected