Dusk CLI Wallet Tutorial

Hi there and thank you for your interest in Dusk

We've put together this tutorial to help guide you in setting up a CLI (command line interface) wallet. The guidance herein is written for novice users who may not be familiar with the CLI. Experienced users should consider skipping directly to the repository and follow the README there.

Compile & Install

Start your terminal application.

If the program runs successfully, you will be provided with 3 options...

ā€¢ Create a new wallet and store it in this computer
ā€¢ Access a lost wallet using the recovery phrase
ā€¢ Exit

First Steps

Create A New Wallet

  • Select Create a new wallet and store it in this computer
  • Enter a wallet name
  • Make a note of your recovery phrase and store it somewhere safe. You will need this if you need to recover your wallet in the future. Enter y when asked Have you backed up your recovery phrase? (y/n)
  • Enter a strong password for your wallet
  • Confirm your password

Well done! You just created your first Dusk Wallet šŸŽ‰

Using The CLI Wallet

Access Your Wallet

Simply fill in the following command

rusk-wallet

A menu will be displayed in your terminal once you have created a wallet, or re-authenticate with your password...

ā€¢ Retrieve my public spend key
ā€¢ Check my current balance
ā€¢ Send Dusk
ā€¢ Stake Dusk
ā€¢ Check stake
ā€¢ Unstake Dusk
ā€¢ Export provisioner BLS key pair

Option: Retrieve a key by selecting a spend key

The default is 0 but you can enter a number from 0 to 2^64. Your wallet can have different keys for different purposes. For example, one key might be for work, one for family, one for investments etc. e.g.

> 0 = Family
> 1 = Work
> 2 = Investment
> 3 = Savings

For this tutorial we use spend key index 0 for all examples, but you can use any spend key index, provided you have created it.

Option: Check my current balance

Enter the spend key 0 and, if you're following this tutorial from the beginning, you will see the following output before the menu is displayed again:

> Total balance for key 0 is: 0 Dusk
> Maximum spendable per TX is: 0 Dusk

You have no Dusk šŸ˜§

The simplest way to get some DUSK in your wallet is to visit the Dusk Faucet and follow the instructions.

Option: Send Dusk

Now lets send some DUSK from you wallet.

For this you need a recipient address. You have 2 options to get hold of another address.

  1. Send DUSK too another spend key within your wallet. For example remember you can have multiply keys Family[0] - Work[1] etc. To get the spend key 1, simply retrieve a key by selecting a spend key (from the wallet main menu) and copy the public spend key for index 1.

  2. Send DUSK to an another Dusk wallet. If you know another wallet holder, you can ask them for their address and use that.

  • Select Send Dusk
  • Enter the spend key 0
  • Enter the recipients address
  • Enter the amount of DUSK you want to transfer
  • Enter the gas limit for this transaction (use the default: 500000000)
  • Enter the gas price for this transaction (use the default: 0.000000001)
  • Enter y when asked to proceed
  • Enter y to launch the block explorer. This will cause the browser to open your web browser showing the transaction details in the Dusk Block Explorer.

Congratulations! You just made your first transaction šŸŽ‰

Option: Stake Dusk

Coming soon...

Option: Check stake

Coming soon...

Unstake Dusk

Coming soon...

Option: Export provisioner BLS key pair

For anyone who wants to run a provisioner node, you must also export your BLS key pair. This enables the provisioner to receive block rewards.

  • Enter the stake key 0
  • Enter y when asked to encrypt the exported key pair file
  • Enter your wallet password

Congratulations! You just exported a BLS key pair šŸŽ‰

`Other...` Operations

Option: Create a new wallet and store it in this computer

  • Enter a wallet name
  • Make a note of your recovery phrase and store it somewhere safe. You will need this if you need to recover your wallet in the future. Enter y when asked Have you backed up your recovery phrase? (y/n)
  • Enter a strong password for your wallet
  • Confirm your password

Well done! You just created your Dusk Wallet šŸŽ‰

Access Your Wallet

Option: Access a lost wallet using the recovery phrase

Did you remember to store your recovery phrase? This is where you can use that phrase to recover your wallet if you lose access to it for any reason.

  • Enter a name for the wallet that will be recreated after the recovery is complete. This doesn't need to be the same as the original wallet.
  • Please enter the recovery phrase:

Your wallet will now be available to access. For example, if you check your balance you will see your wallet has some dusk on it.

Congratulations! You just recovered your wallet šŸŽ‰

Deleting Your Wallet

You're sure?

Your wallet is stored in your home directory $HOME/.dusk. The following command will remove all of the Dusk wallets for your user.

rm -r $HOME/.dusk

Need help? Reach out to us on our Discord server and join our growing community of Dusketeers!