Skip to main content

Create an Address

After you have created an account, you have a single address in the account. This should be enough for one user using the single-account model. However, if you want to use the multi-account-account model, you will need to generate an address for each user in this account.

Accounts and Addresses

Example Code

  1. Instantiate a Wallet and get Alice's Account which was created in the first guide.
  2. Generate an AccountAddress in Alice's account by calling the Account.generate_ed25519_addresses() function.
sdk/examples/how_tos/accounts_and_addresses/create_address.rs
loading...

Full Example Code

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

Expected Output

Generated address: rms1qrjahvcjhfl668vegm8vej48prsdh9n4rwpzr33j60m6vvux5yjhg2w9hq3