How to Create an Algorand Wallet

Learn how easy it is to create an Algorand Wallet.

Wallets are collections of addresses and their corresponding keys. Every node can have one or more wallet(s), but only one default wallet.

When running goal account or clerk commands the default wallet will be used unless the -w option is used. This option allows commands to be executed for a specific wallet. You can also change the default wallet by using the goal wallet -f option.

This tutorial walks through the following

  1. How to Add a New Wallet
  2. How to Set the Default Wallet
  3. How to Add an Account to the Wallet

Note: Use the following to create a list of the accounts managed by a specific node:

goal account list -d ~/net1/Primary

1. How to Add a New Wallet

You can list the current wallets a node manages by running the following command:

goal wallet list -d ~/net1/Primary

This will return output similar to the following:

\##################################################  
Wallet: unencrypted-default-wallet (default)  
ID: 58575db964e9c84bacfe9aaefa6799d8  
##################################################

This node only has the default wallet created when we created the private network. By default, this is unencrypted, which is not ideal.

To create a new wallet run this command:

goal wallet new MyWallet -d ~/net1/Primary

This will create a wallet and you will be prompted to enter the password for the wallet. In addition, you will be given the option to retrieve the mnemonic/backup phrase should you ever need to recover the wallet

You can recover a specific wallet using:

goal wallet new MyWallet -r -d ~/net1/Primary

If you list the wallets again you will see the newly created one:

##################################################  
Wallet: MyWallet  
ID: 8b916462b5b3f078f58a3feb6cd726bb  
##################################################  
Wallet: unencrypted-default-wallet (default)  
ID: 58575db964e9c84bacfe9aaefa6799d8  
##################################################

2. How to Set the Default Wallet

You can set the default wallet with:

goal wallet -f MyWallet -d ~/net1/Primary

3. How to Add an Account to the Wallet

You can use the goal account commands to list accounts in the new wallet:

goal account list-d ~/net1/Primary

You should see this message “Did not find any account. Please import or create a new one.”

However, if you look at the unencrypted-default-wallet wallet you will see the account balance using the -w flag:

goal account list -d ~/net1/Primary -w unencrypted-default-wallet
[online]    YNG5HO2ICZBX43YO4WFC23R7SYUEIJRDUULECUC2BEIJOQFULNNL6JXFWM YNG5HO2ICZBX43YO4WFC23R7SYUEIJRDUULECUC2BEIJOQFULNNL6JXFWM  
5000020000000000 microAlgos

You can also use the goal account commands to add accounts in the new wallet:

goal account new -d ~/net1/Primary
goal account list -d ~/net1/Primary

You can also specify the wallet when creating an account:

goal account new -w MyWallet -d ~/net1/Primary

You can list the accounts:

goal account list -d ~/net1/Primary

Your account list should look similar to this:

[offline] Unnamed-1   DZEP2GVN5HFPG3EBJ7R7DFHBGZGYQ7TEVMW5UVYB5O46XZS3ZVAQZ2F6SI 0 microAlgos  
[offline] Unnamed-0 673GRF6NA7HRVWG4E5NIHOPCC4MBFDYZOUQ6KLYBPYWC34HTHVCX7FMZYM 0 microAlgos *Default

You can list the wallets with:

goal wallet list -d ~/net1/Primary

Your wallet list should look similar to this:

##################################################  
Wallet:   MyWallet (default)  
ID:  8b916462b5b3f078f58a3feb6cd726bb  
##################################################  
Wallet:   unencrypted-default-wallet  
ID:  58575db964e9c84bacfe9aaefa6799d8  
##################################################

👋 Need Help?

Contact us through email or our support page for any issues, bugs, or assistance you may need.