Zboxcli
A client CLI using GoSDK to interface the blockchain, storage platform, and blobbers (storage providers)
Install / Use
/learn @0chain/ZboxcliREADME
zbox - a CLI for Züs dStorage
zbox is a command line interface (CLI) tool to understand the capabilities of Züs dStorage and prototype your app. The utility is built using Züs GoSDK. For more information on Züs Network and the system overview, refer to docs.zus.network.

- zbox - a CLI for Züs dStorage
- Getting Started
- Running zbox
- Commands
-
Creating and Managing Allocations
- Create new allocation
- Update allocation
- Transfer allocation ownership
- Forbid Allocation
- Cancel allocation
- Finalise allocation
- List blobbers
- Detailed blobber information
- List all files
- List owner's allocations
- Update blobber settings
- Update Validator Settings
- List All Validators
- Get Validator Configuration
- Shutdown Blobber
- Shutdown Validator
- Kill Blobber
- Kill Validator
-
- Challenge pool information
- Create read pool
- Collect rewards
- Read pool info
- Lock tokens into read pool
- Unlock tokens from read pool
- Storage SC configurations
- Stake pool info
- Lock tokens into stake pool
- Unlock tokens from stake pool
- Stake pools info of user
- Write pool info
- Lock tokens into write pool
- Unlock tokens from write pool
- Download cost
- Upload cost
-
- Config
- Troubleshooting
Getting started
1. Installation
Prerequisites
- Go: Installation instructions for Mac, Linux and Windows can be found here.
Procedures
- Clone the
zboxclirepo and install
git clone https://github.com/0chain/zboxcli.git
cd zboxcli
make install
- Add config yaml at
~/.zcn/config.yaml
The following script sets https://demo.zus.network as your network.
cat > ~/.zcn/config.yaml << EOF
block_worker: https://mainnet.zus.network/dns
signature_scheme: bls0chain
min_submit: 50 # in percentage
min_confirmation: 50 # in percentage
confirmation_chain_length: 3
EOF
- Run
zboxclito display the list of supported commands.
./zbox
For machine requirements and pre-requisites, follow the guides below:
2. Run zbox commands
The following steps assume that your terminal's working directory is inside the zboxcli repo.
Running zbox
When you run the ./zbox command in terminal with no arguments, it will list all the available commands and the global flags. For working of specific command check commands section.
Usage:
zbox [command]
Available Commands:
alloc-cancel Cancel an allocation
alloc-fini Finalize an expired allocation
bl-info Get blobber info
bl-update Update blobber settings by its delegate_wallet owner
collect-reward Collect accrued rewards for a stake pool.
completion Generate the autocompletion script for the specified shell
copy copy an object(file/folder) to another folder on blobbers
cp-info Challenge pool information.
createdir Create directory
decrypt Decrypt text with passphrase
delete delete file from blobbers
download download file from blobbers
feed download segment files from remote live feed, and upload
get-download-cost Get downloading cost
get-upload-cost Get uploading cost
getallocation Gets the allocation info
getwallet Get wallet information
help Help about any command
kill-blobber punitively deactivate a blobber
kill-validator punitively deactivate a validator
list list files from blobbers
list-all list all files from blobbers
listallocations List allocations for the client
ls-blobbers Show active blobbers in storage SC.
ls-validators Show active Validators.
meta get meta data of files from blobbers
move move an object(file/folder) to another folder on blobbers
newallocation Creates a new allocation
rename rename an object(file/folder) on blobbers
rp-create Create read pool if missing
rp-info Read pool information.
rp-lock Lock some tokens in read pool.
rp-unlock Unlock some expired tokens in a read pool.
sc-config Show storage SC configuration.
share share files from blobbers
shutdown-blobber deactivate a blobber
shutdown-validator deactivate a validator
sign-data Sign given data
sp-info Stake pool information.
sp-lock Lock tokens lacking in stake pool.
sp-unlock Unlock tokens in stake pool.
sp-user-info Stake pool information for a user.
start-repair start repair file to blobbers
stats stats for file from blobbers
sync Sync files to/from blobbers
transferallocation Transfer an allocation from one account to another
update update file to blobbers
updateallocation Updates allocation's expiry and size
upload upload file to blobbers
validator-info Get validator info
validator-update Update validator settings by its delegate_wallet owner
version Prints version information
wp-lock Lock some tokens in write pool.
wp-unlock Unlock some expired tokens in a write pool.
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 zbox
--network string network file to overwrite the network details (if required, default is network.yaml)
--silent (default false) Do not show interactive sdk logs (shown by default)
--wallet string wallet file (default is wallet.json)
--wallet_client_id string wallet client_id
--wallet_client_key string wallet client_key
--withNonce int nonce that will be used in transaction (default is 0)
Use "zbox [command] --help" for more information about a command.
Global Flags
Global Flags are parameters in zbox that can be used with any command to override the default configuration.zbox supports the following global parameters.
| Flags | Description | Usage | | -------------------------- | -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ | | --config string | Specify a zbox configuration file (default is $HOME/.zcn/config.yaml) | zbox [command] --config config1.yaml | | --configDir string | Specify a zbox configuration directory (default is $HOME/.zcn) | zbox [command] --configDir /$HOME/.zcn2 | | -h, --help | Gives more information about a particular command. | zbox [command] --help | | --network string | Specify a network file to overwrite the network detai
