Account handlers
The account handlers let a Live App list the user’s accounts, prompt the user to pick one, and let the user verify a receive address on their Ledger device.
Method IDs
| Method ID | Direction | Wallet handler required? | Purpose |
|---|---|---|---|
account.list | Live App → Wallet | yes | List the user’s accounts, optionally filtered. |
account.request | Live App → Wallet | yes | Prompt the user to select an account. |
account.receive | Live App → Wallet | yes | Display an address on-device for the user to verify. |
If the wallet does not register the matching wallet handler, the server throws an RpcError with code SERVER_ERROR (-32000) wrapping a not implemented by wallet server error.
account.list
Returns every account the user has added in the wallet, optionally filtered by currency.
Parameters
| Parameter | Type | Required | Notes |
|---|---|---|---|
currencyIds | string[] | no | Filter by currency ID (for example ["bitcoin", "ethereum"]). When omitted, all accounts are returned. |
Result
{
rawAccounts: RawAccount[]
}The rawAccounts are the serialized Account objects.
account.request
Prompts the user to select an account in the wallet UI.
Parameters
| Parameter | Type | Required | Notes |
|---|---|---|---|
currencyIds | string[] | no | Restrict the picker to these currencies. |
showAccountFilter | boolean | no | Show the account filter UI. |
drawerConfiguration | object | no | Controls the drawer UI: assets.{filter, leftElement, rightElement} and networks.{leftElement, rightElement}, all optional strings. |
useCase | string | no | Tags the request with a use case (for example "swap"). |
uiUseCase | string | no | UI variant to render. |
When the wallet handler is invoked, the server also forwards a derived flag areCurrenciesFiltered (true when currencyIds is non-empty).
Result
{
rawAccount: RawAccount
}account.receive
Displays an account address on the Ledger device so the user can verify it. Use this before sharing the address with a counterparty.
Parameters
| Parameter | Type | Required | Notes |
|---|---|---|---|
accountId | string | yes | ID of the account whose address to display. |
tokenCurrency | string | no | Token currency ID, when the account holds tokens whose receive address differs from the parent account address. |
Result
{
address: string
}The returned address is the one the user confirmed on-device.
See also
- Account module (client): the client-side counterpart.
- Server reference,
allAccounts$: shape of theRawAccountreturned by these handlers. accounthandler source and schemas.