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
The SDK supports a multi-account approach and a single-account approach.
Example Code
- Rust
- Typescript (Node.js)
- Python
- Instantiate a
Wallet
and get Alice'sAccount
which was created in the first guide. - Generate an
AccountAddress
in Alice's account by calling theAccount.generate_ed25519_addresses()
function.
- Instantiate a
Wallet
and get Alice'sAccount
which was created in the first guide. - Generate an
Address
in Alice's account by calling theAccount.generateEd25519Addresses()
function.
- Instantiate a
Wallet
and get Alice'sAccount
which was created in the first guide. - Generate an
Address
in Alice's account by calling theAccount.generate_ed25519_addresses()
function.
Full Example Code
- Rust
- Typescript (Node.js)
- Python
sdk/examples/how_tos/accounts_and_addresses/create_address.rs
loading...
bindings/nodejs/examples/how_tos/accounts_and_addresses/create-address.ts
loading...
bindings/python/examples/how_tos/accounts_and_addresses/create_address.py
loading...
Expected Output
Generated address: rms1qrjahvcjhfl668vegm8vej48prsdh9n4rwpzr33j60m6vvux5yjhg2w9hq3