This will clone the repo on your local machine in zwalletcli in your working directory.
Install dependencies
Move to the zwalletcli directory and run the install command
cd zwalletcli
make install
This installs the dependencies for the zwalletcli tool and then builds the tool binary.
Run the binary
Now the binary is in your zwalletcli directory, you can run it like this:
This output means the tool is installed successfully. It also shows the help text for the tools with the available commands and the global flags (flags applied with any command).
To show the help of any command, run the following:
./zwallet <command> --help
Running some basic commands
Let's try two of the simplest commands in zwalletcli:
1. Listing miners command ls-miners
This command lists the information of all the miners:
Output:
As you can see, the output shows all the miners, each with the id, Host and Port.
2. Listing sharders command ls-sharders
This command lists all the sharders registered in the network
Output:
As you can see, the output shows all the sharders, each with the id, host and port.
All the commands related to your own data will require a wallet. Use the "Configure your wallet" guide to create or specify a wallet to the command.
Next steps
Here are some useful guides and references for Zwalletcli:
❯ ./zwallet
Use Zwallet to store, send and execute smart contract on 0Chain platform.
Complete documentation is available at https://docs.zus.network/guides/zwallet-cli
Usage:
zwallet [command]
Available Commands:
bridge-burn-bnt burn bnt tokens
bridge-burn-eth burn eth tokens
bridge-burn-eurc burn eurc tokens
bridge-burn-usdc burn usdc tokens
bridge-burn-wzcn burn wzcn tokens
bridge-burn-zcn burn zcn tokens
bridge-get-wzcn-burn get confirmed burn ticket for ethereum burn transaction
bridge-get-zcn-burn get the confirmed burn ticket for zcn burn transaction
bridge-import-account Import Ethereum account to local key storage (default $HOME/.zcn/wallets)
bridge-list-accounts List Ethereum account registered in local key chain
bridge-list-auth List authorizers
bridge-mint-wzcn mint WZCN tokens using the hash of ZCN burn transaction
bridge-mint-zcn mint zcn tokens using the hash of Ethereum burn transaction
bridge-verify verify ethereum transaction
collect-reward Pay accrued rewards for a stake pool.
completion Generate the autocompletion script for the specified shell
create-wallet Create wallet and logs it into stdout (pass --register to register wallet to blockchain)
getbalance Get balance from sharders
getblobbers Get registered blobbers from sharders
getid Get Miner or Sharder ID from its URL
getnonce Get nonce from sharders
global-config Show global configurations.
help Help about any command
ls-miners Get miners from Miner SC
ls-sharders Get sharders from Miner SC
mn-info Get miner/sharder info from Miner SC.
mn-kill kill miner
mn-lock Add miner/sharder stake.
mn-pool-info Get miner/sharder pool info from Miner SC.
mn-unlock Unlock miner/sharder stake.
mn-update-settings Change miner/sharder settings in Miner SC.
mn-user-info Get miner/sharder user pools info from Miner SC.
recoverwallet Recover wallet
reset-user-nonce Reset user minted nonce
sc-config Show storage SC configuration.
send Send ZCN tokens to another wallet
sh-kill kill sharder
verify verify transaction
version Prints version information
Flags:
--config string config file (default is config.yaml)
--configDir string configuration directory (default is $HOME/.zcn)
--fee float transaction fee for the given transaction (if unset, it will be set to blockchain min fee)
-h, --help help for zwallet
--network string network file to overwrite the network details (if required, default is network.yaml)
--silent Do not print sdk logs in stderr (prints by default)
--wallet string wallet file (default is wallet.json)
--withNonce int nonce that will be used in transaction (default is 0)
Use "zwallet [command] --help" for more information about a command.