Configuring your wallet
Configuring the wallet you use to run transactions via the CLI tools.
Before you can use the CLIs to manage your data on the network, you need to have a wallet. A wallet is simply a file (in JSON format) that contains your keys, by which you can access your account on the network.
The wallet has:
Your client ID.
You Public Key,
Your Private Key.
Your Mnemonics.
Your initial nonce.
Example for a wallet:
All the commands of the CLI tools expect the wallet file (named wallet.json
) to be saved in the configDir
(which is by default ~/.zcn).
Creating a new wallet
If you don't have a wallet already, you can create a new wallet using zwalletcli
This will create you a new wallet and store it as: ~/.zcn/wallet.json
You can also specify different name for your wallet:
Getting tokens to your wallet
Now that you created your tokens, you need to fund it with some tokens to be able to pay transaction fees and storage cost, or even to stake providers for reward. There are a couple of different ways by which you can achieve this:
Getting tokens using Bolt Webapp
Once you generated the wallet, you can use Bolt app to fund some tokens to it, as follows:
Login to Bolt using your wallet, check the Export Wallet feature documentation in Bolt for more details.
Connect your Metamask wallet as prompted.
Use bolt to deposit tokens to your exported wallet using the ERC-20 tokens in your Metamask wallet. Check the DEX flow documentation for more information.
Sending tokens from an existing wallet
If you have an existing wallet which has tokens, you can send tokens from it to your newly created wallet. You can do this either using the send
command of Zwallet CLI, or using Bolt (check Send/Receive feature documentation of Bolt).
Note that in order to use send
command to send tokens from your existing wallet, you'll need to have the wallet in JSON format in a file on your system and provide its path to the CLI, as defined in the next section.
Using the wallet in your commands
All CLI commands use the wallet stored in your ~/.zcn
directory and named wallet.json
by default. To specify a different wallet name and path:
This will make the command use ~/.zcn/my-custom-wallet.json
as your wallet. Also to change the default path where it gets the wallet file:
This will make the command use the wallet stored in ./myzus/my-custom-wallet
but will also use the config.yaml
file stored in the same directory.
Last updated