Skip to main content

List Addresses

Accounts and Addresses

An Account is always initialised with a default Address. However, depending on you approach, your application may handle many addresses. The IOTA SDK provides a convenient function to list all the Addresses related to an Account: account.addresses().

This function will retrieve accurate and up-to-date information such as the address balance, transaction history, and other relevant metadata, facilitating seamless management of multiple users within your platform.

Example Code

  1. Instantiate a Wallet and get Alice's Account which was created in the first guide.
  2. Get all the AccountAddress related to the Account by calling the Account.addresses() function.
sdk/examples/how_tos/accounts_and_addresses/list_addresses.rs
loading...

Full Example Code

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

Expected Output

rms1qpjt6zr7rfvl27le5xjcv0qhr90l92wtm6eu6v6jhtgvrjp7mwufq6nqxn8
rms1qrjahvcjhfl668vegm8vej48prsdh9n4rwpzr33j60m6vvux5yjhg2w9hq3