Skip to main content

Generate an Address

After you have created an account, you have a single address in the account. But you can generate more addresses.

Account Approaches
Iota.js

You can also find this guide in the native iota.js library

Code Example

The following example will:

  1. Create an account manager.
  2. Get Alice's account which was created in the first guide.
  3. Generate an address in Alice's account.
Dotenv

This example uses dotenv, which is not safe for use in production environments.

wallet/examples/02_generate_address.rs
loading...

Run the example by running the following command:

cargo run --example generate_address --release

Expected Output

Generated address: rms1qzzk86qv30l4e85ljtccxa0ruy8y7u8zn2dle3g8dv2tl2m4cu227a7n2wj