Request
Parameters
'1'
required
Protocol version. Must be
'1'.AddSubAccountAccount
required
Sub-account specification.
Returns
Errors
Related
wallet_getSubAccounts, list existing sub-accounts.- Sub-accounts
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Create a new sub-account for the connected user, scoped to your application.
const subAccount = await provider.request({
method: 'wallet_addSubAccount',
params: [{ version: '1', account: { type: 'create' } }],
})
'1'.Show Variants
'create', create a new sub-account.
'deployed', register a sub-account already deployed on-chain.
'undeployed', register a sub-account with factory + factoryData but not yet deployed.{
address: '0x...',
chainId?: '0x...',
factory?: '0x...',
factoryData?: '0x...',
}
| Code | Cause |
|---|---|
4001 | User rejected creation |
4100 | Wallet not connected |
wallet_getSubAccounts, list existing sub-accounts.