Wallets enable you to store your credits and transaction on the chain. It provides you an address for others to send you credits, allows you to sign transactions to transfer credit to others, and check you account credit balance.
Let's create you a wallet. Make sure you are in the shell. Firstly, you can check all the available saved by running
As of now, you do not have any saved wallets yet, so we'll create one.
$ createWallet label:"My first wallet"
Type in the action
createWallet. This action requires one option which is the label to name the wallet for you to keep track of different wallets. You would need to enclose the name of the label in double quotes ("") if you have spaces in the value such as in the example above, to indicate the value string.
After you type in the above, you would be prompted to enter a password.
The password is required by default to encrypt your wallet private key so that even if someone were to get a copy of your wallet, the would still not be able to transaction with it without the password. Make sure that you remember the password, as there is no way to recover it. The minimum requirement for the password is 8 characters, at least 1 uppercase and lowercase letter, and 1 digit. However, we recommend you to secure it with a password higher these requirements.
The password is encrypted with AES-GCM-256 and uses Argon2i for key derivation. As much these help protect your wallet, the encryption is only as strong as your password. Consider to use a password manager to generate and manage secure passwords.
Once you have entered the password, you will get the credentials for your wallet.
The credentials for your wallet are:
The public/private key pair is generated using P-384 (designated as "secp384r1") elliptic curve for the ECDSA algorithm as it the among the most secure and portable. All private keys are encrypted by default and only decrypted when recovering a wallet or signing a transaction.
The encrypted private key buffer has the following structure:
The address always has a length fo 25 bytes. It contains the following values:
Once you have create a wallet, you can set a selected wallet. The selected wallet would be used as a default when you need to set a sender for a transaction or set a receiver for mining reward. First, let's list the available wallets.
You should see the available list of created wallets. It should include the wallet you have just created above.
Copy the address of the wallet you wish to select as the default wallet. Run the
selectedWallet action to view the currently selected wallet. There should be none if you have not selected it yet.
$ selectedWallet No selected wallet
To select the wallet, run the
selectWallet action with 'address' with the address option. After that, you can run the
selectedWallet action again to confirm the selected wallet.
$ selectWallet address:0x0034e57af12566612ae069c67952bd58308b6d034e5180e056
You can do a confirmation that you have the correct password to access to you wallet. It is to ensure that you can access the credits sent to your address. Run the following with your saved wallet address and input your password after prompted
$ verifyWallet address:0x00d5860cad65704e75f784f29911c5aa9ddc13894e4bdfa657
It should respond with a 'Yes'
You can delete any of your saved wallets. Once you lose the wallet private key, you will have no way of recovering it. Be sure to keep a copy of the private key if you wish to recover it later. To do so, run
deleteWallet and pass the address of the saved wallet as an option.
$ deleteWallet address:0x00d5860cad65704e75f784f29911c5aa9ddc13894e4bdfa657
If the wallet you deleted the selected wallet, then you no longer have any default wallet.
To recover a wallet from the private key use the
recoverWallet action with required options 'privateKey' and 'label'.
$ recoverWallet privateKey:<0x000102...> label:"My recovered wallet"
That is all for the essentials. For the full list of wallet actions, go to the wallet reference.