Learn how to create and manage Base Sub Accounts with Privy for streamlined user experience
config.embedded.ethereum.createOnLogin
to 'all-users'
wallet_getSubAccounts
RPC method. If the user does not have an existing Sub Account, create a new one for them using the wallet_addSubAccount
RPC:
useBaseAccountSdk
hook from Privy’s React SDK to access the instance of the Base Account SDK directly, and use the SDK’s subAccount.setToOwnerAccount
method to configure the embedded wallet to sign on behalf of the Sub Account’s operations:
personal_sign
: pass the Sub Account’s address, not the parent Base Account’s address, as the second parametereth_signTypedData_v4
: pass the Sub Account’s address, not the parent Base Account’s address, as the first parametereth_sendTransaction
: set from
in the transaction object to the Sub Account’s address, not the parent Base Account’s addresseth_sendTransaction
requests.
For more advanced Sub Account features and Spend Permissions, refer to the Base Account Sub Accounts guide.