List Addresses
Accounts and Addresses
The SDK supports a multi-account approach and a single-account approach.
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
- Rust
- Typescript (Node.js)
- Python
- Instantiate a
Wallet
and get Alice'sAccount
which was created in the first guide. - Get all the
AccountAddress
related to theAccount
by calling theAccount.addresses()
function.
- Instantiate a
Wallet
and get Alice'sAccount
which was created in the first guide. - Get all the
Addresses
related to theAccount
by calling theAccount.addresses()
function.
- Instantiate a
Wallet
and get Alice'sAccount
which was created in the first guide. - Get all the
Addresses
related to theAccount
by calling theAccount.addresses()
function.
Full Example Code
- Rust
- Typescript (Node.js)
- Python
sdk/examples/how_tos/accounts_and_addresses/list_addresses.rs
loading...
bindings/nodejs/examples/how_tos/accounts_and_addresses/list-addresses.ts
loading...
bindings/python/examples/how_tos/accounts_and_addresses/list_addresses.py
loading...
Expected Output
rms1qpjt6zr7rfvl27le5xjcv0qhr90l92wtm6eu6v6jhtgvrjp7mwufq6nqxn8
rms1qrjahvcjhfl668vegm8vej48prsdh9n4rwpzr33j60m6vvux5yjhg2w9hq3