zwallet Commands

The following assumes your terminal’s working directory is inside the zwalletcli repo.

Global parameters

zwallet accepts global flags that override defaults and can be used with any command.

Parameter
Description
Default

-h, --help

Show help/parameters for the invoked command

--config

Config file name

config.yaml

--configDir

Config directory

~/.zcn

--network

Network override file name

network.yaml

--silent

Do not print detailed logs

false

--wallet

Wallet file name

wallet.json

--withNonce

Nonce to use for the transaction

0

--fee

Transaction fee to use

chain min if not set

Tip: add --json on commands that support it, and --verbose to see transaction hashes and diagnostic details.


Shell autocompletion

Command: zwallet completion [bash|zsh|fish|powershell] Generates completion scripts and prints enablement instructions for your shell.

Example:

zwallet completion bash    # or zsh / fish / powershell

See the sub‑command’s help for the exact enablement steps per shell.


Creating and restoring wallets

Create a wallet — create-wallet

Creates a wallet at the default location if none exists (~/.zcn/wallet.json).

Sample output

Recover a wallet — recoverwallet

Restore a wallet from its mnemonics. Useful when moving to a new machine or after loss.

Parameters

Flag
Required
Description
Default

--mnemonic

Yes

The full mnemonic phrase for the wallet to recover

--offline

No

Recover without registering on chain

false

Example

Verify recovered file


Exploring network nodes

List miners — ls-miners

Lists miners using the Miner smart contract.

Parameters

Flag
Required
Description
Default
Values

--json

No

Print as JSON

--active

No

Only active miners

true

boolean

--all

No

Include all registered miners (page 1 by default)

--limit

No

Limit number returned

20

integer

--offset

No

Skip first N

integer

--stakable

No

Only miners accepting new delegates

false

boolean

Example

Sample output

List sharders — ls-sharders

Lists sharders from the latest finalized Magic Block; use --all for all registered.

Parameters (same shape as miners)

Flag
Required
Description
Default
Values

--json

No

Print as JSON

--active

No

Only active sharders

true

boolean

--all

No

Include all registered sharders

--limit

No

Limit number returned

20

integer

--offset

No

Skip first N

integer

--stakable

No

Only sharders accepting new delegates

false

boolean

Example

Sample output (abridged)

List blobbers — getblobbers

Lists blobbers via the Storage smart contract.

Parameters

Flag
Required
Description

--all

No

Include inactive blobbers (if any)

Example

Sample output (abridged)


List authorizers — bridge-list-auth

Lists authorizers that validate client transactions.

Sample response

Get node ID by URL — getid

Prints a node’s ID from its URL (miner/sharder/blobber).

Parameter: --url <NODE_URL>

Example

Storage SC config — sc-config

Displays current Storage smart contract configuration.

Parameter: --json (optional)

Sample output (abridged)

Version — version

Prints zwallet and GoSDK versions.

Parameter: --json (optional)

Sample

Global chain configuration — global-config

Shows chain‑wide configuration (server_chain, tx, SC toggles, etc.).

Sample output (abridged)


Getting and sending tokens

Faucet — faucet

(Where enabled) requests tokens from the Faucet smart contract.

Check balance — getbalance

Retrieves wallet balances from sharders. (Locked tokens are not included.)

Parameter: --json (optional)

Use another wallet file:

If the wallet has no tokens yet, the command will output Get balance failed.

Send tokens — send

Transfers tokens to another wallet.

Parameters

Flag
Required
Description

--json

No

Print as JSON

--to_client_id

Yes

Recipient’s client ID

--tokens

Yes

Amount to send

--desc

Yes

Transfer description

--fee

No

Optional tx fee (defaults to chain)

Example

Use a different sender wallet:

Verify a transaction — verify

Checks whether a transaction hash is confirmed on chain.

Parameter

Flag
Required
Description

--hash

Yes

Transaction hash to verify

Not all commands print the transaction hash. Re‑run with --verbose to see hashes.

Example

Verbose:

Collect rewards — collect-reward

Transfers accrued stake‑pool rewards to your wallet. Rewards accrue for miners and sharders (and authorizers where applicable).

Parameters

Flag
Required
Description
Values

--provider_type

Yes

Provider type

miner / sharder / authorizer

--provider_id

Yes

Provider node ID

string

Example

Get nonce — getnonce

Shows the current nonce of the default wallet.


Staking on miners and sharders

The Miner smart contract allows staking on miner and sharder nodes. The maximum number of stake pools per node is limited by the node’s delegates setting. Use mn-config to discover limits (min/max stake, delegates, etc.).

Staking config — mn-config

Displays global staking parameters of the Miner SC.

Sample output (abridged)

Node info for staking — mn-info

Shows staking‑related stats for a miner or sharder.

Parameter

Flag
Required
Description

--id

Yes

Node ID (see ls-miners / ls-sharders)

Example

(See your output for JSON fields like service_charge, number_of_delegates, total_stake, pending pools, etc.)

Lock stake — mn-lock

Stake tokens on a node to earn rewards. If a node goes offline, stake pools are auto‑unlocked and funds are returned.

Parameters

Flag
Required
Description

--miner_id

Yes*

Miner node ID (alternative to --sharder_id)

--sharder_id

Yes*

Sharder node ID (alternative to --miner_id)

--tokens

Yes

Amount to stake (must meet min/max constraints)

*Pass either --miner_id or --sharder_id.

Some builds also accept --id <NODE_ID> as shown below.

Example

If locking fails, check:

  • Wallet has sufficient tokens

  • Node ID is valid

  • Node has delegate capacity available

Your stake pools — mn-user-info

Shows the wallet’s stake pools.

Parameters

Flag
Required
Description
Default

--client_id

No

Client ID to query

wallet at ~/.zcn/wallet.json

--json

No

Print as JSON

Example

Sample output (text)

Sample (JSON)

Stake pool info — mn-pool-info

Shows stake pool info for a given node. Without a pool flag, returns the list.

Parameter

Flag
Required
Description

--id

Yes

Node ID (miner or sharder)

Example

Sample (single)

Sample (list)

Unlock stake — mn-unlock

Requests unlock of a stake from a node; tokens are released at the next view change or reward round.

Parameters

Flag
Required
Description

--miner_id

Yes*

Miner node ID

--sharder_id

Yes*

Sharder node ID

*Pass either --miner_id or --sharder_id.

Example


Killing / deleting nodes

Requires the node’s delegate wallet / owner.

Kill a miner — mn-kill

Kill a sharder — sh-kill


Notes & tips

  • For transaction hashes, use --verbose if a command doesn’t print the hash by default.

  • Staking unlocks occur at the next view change or reward round—tokens won’t be immediately liquid.

  • Some staking commands accept --id <NODE_ID> interchangeably with --miner_id / --sharder_id as shown above.

  • When using Faucet or Bridge, ensure the target network supports those smart contracts in global-config / sc-config.

Last updated