Manage Accounts
Work with multiple smart accounts and custom derivation paths.
This guide explains how to retrieve accounts by index and use custom derivation paths.
Retrieve Accounts by Index
You can retrieve multiple smart accounts using wallet.getAccount() with different index values:
const account0 = await wallet.getAccount(0)
const address0 = await account0.getAddress()
console.log('Account 0 address:', address0)
const account1 = await wallet.getAccount(1)
const address1 = await account1.getAddress()
console.log('Account 1 address:', address1)Retrieve Account by Custom Derivation Path
You can retrieve an account at a specific derivation path using wallet.getAccountByPath():
const customAccount = await wallet.getAccountByPath("0'/0/5")
const customAddress = await customAccount.getAddress()
console.log('Custom account address:', customAddress)Next Steps
With accounts set up, learn how to check balances.