Skip to main content

List Accounts

As your application may handle many accounts or addresses, the IOTA SDK provides a convenient function to list all of the Accounts related to a wallet, wallet.getAccounts().

This allows you to provide accurate and up-to-date information to your users, such as the account name, balance, transaction history, and other relevant metadata, facilitating seamless management of multiple accounts within your platform.

Accounts and Addresses

Example Code

  1. Instantiate a Wallet.
  2. Call the Wallet.get_accounts() function to retrieve all the Accounts related to the wallet.
sdk/examples/how_tos/accounts_and_addresses/list_accounts.rs
loading...

Full Example Code

sdk/examples/how_tos/accounts_and_addresses/list_accounts.rs
loading...

Expected Output

Alice