Installation

Quick start using Zwallet (pre-config - build - run)

Pre-requisites

Before you start, make sure the following is installed on your machine:

  • Golang (1.21+)

  • Make (the make command)

Clone the repo

You need to clone the zwalletcli repo:

git clone https://github.com/0chain/zwalletcli.git

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:

Last updated