Skip to main content

Create a Wallet Account

The first thing you will need to do when you are getting started with the wallet.rs library is to create a wallet account.

Account Approaches

Code Example

The following example will:

  1. Create an account manager.
  2. Use it to store the Stronghold mnemonic.
  3. Create a wallet with the alias "Alice".
Dotenv

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

wallet/examples/01_create_wallet.rs
loading...

Run the example by running the following command:

cargo run --example create_wallet --release

Expected Output

Generated a new account