Comment on page
Wallet
The wallets handler allows you to manage your locally stored wallet keys
Creates and adds a new wallet to the list of wallets.
wallet add <name>
You cannot have two wallets with the same name including wallets on different chain configs.
wallet add test
The above command will prompt you to enter a passphrase for your account and then generate an output similar to:
Wallet added!
Your seed phrase is:
"Your seed phrase will be displayed here"
Do not share this with anyone. Please make sure to store this for future reference, without it you cannot recover your wallet.
Note: The output of the above command contains a seed phrase. It's recommended to save the seed phrase in a safe place to avoid losing it.
Use the specific chain faucet to send tokens to the address for test-net wallets..
You have created a new wallet address. To view the address we would need to list our wallets.
If you forget your password or lose your key, or you would like to use your key in another place, you can recover your key by using the
--recover
flag.The following example will recover a key with the seed phrase and store it in the local keystore with the name test:
wallet add test --recover
You'll be asked to enter and repeat the new password for your key, and enter the seed phrase. Then you get your key back.
Flag | Description | Usage |
---|---|---|
recover | Recovers a wallet by mnemonic. | --recover |
help | Displays info about the current command. | --help |
Lists all the added wallets.
wallet list
We get:
* test juno12x7efvfn94ynqkyvdcgdndh6rqrz6u6x20jes2
Add another wallet and try again:
wallet add test2
wallet list
Result:
* test juno12x7efvfn94ynqkyvdcgdndh6rqrz6u6x20jes2
test2 juno1sra207nk6uua39dg7g5nfscnfptjmdhyzexycj
The asterisk will show you which address is currently being used
Remove a specified wallet from the list.
wallet rm <wallet-name>
or just:
wallet rm
which will prompt you to chose which wallet you want to remove.
test@uni-6> wallet list
* test juno12x7efvfn94ynqkyvdcgdndh6rqrz6u6x20jes2
test2 juno1sra207nk6uua39dg7g5nfscnfptjmdhyzexycj
wallet rm test2
You will be promted to confirm this:
Are you sure you want to remove wallet test2? (Y/n) y
test2 wallet has been deleted:
$test@uni-3> wallet list
* test juno12x7efvfn94ynqkyvdcgdndh6rqrz6u6x20jes2
Set the default wallet to be used.
wallet use <wallet-name>
//list the wallets
? $test@uni-6> wallet list
* test juno1ygp0dvp7gccyk2vja6p7lr7f9ulasr2h4shhx5
test2 juno14vdzdygwg4p0l8d6ezrcsczsjy5eql79z57mvn
//Chose to use second wallet
? $test@uni-6> wallet use test2
//Check if the in use wallet has changed
? $test2@uni-6> wallet list
test juno1ygp0dvp7gccyk2vja6p7lr7f9ulasr2h4shhx5
* test2 juno14vdzdygwg4p0l8d6ezrcsczsjy5eql79z57mvn
Last modified 11d ago