Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.startale.com/llms.txt

Use this file to discover all available pages before exploring further.

Opens the popup to create a new sub-account. The user approves the creation.

Request

const subAccount = await provider.request({
  method: 'wallet_addSubAccount',
  params: [{ version: '1', account: { type: 'create' } }],
})

Parameters

params[0].version
'1'
required
Protocol version. Must be '1'.
params[0].account
AddSubAccountAccount
required
Sub-account specification.

Returns

{
  address: '0x...',
  chainId?: '0x...',
  factory?: '0x...',
  factoryData?: '0x...',
}

Errors

CodeCause
4001User rejected creation
4100Wallet not connected