CLI

Interact with the headless Zen Node via the Command Line Interface

Open your terminal and run zen-node

Now you can open another tab and your terminal and run zen-cli commands

USAGE: zen-cli [--help] [--port <port>] [--test] [<subcommand> [<options>]]
SUBCOMMANDS:
balance <options> get wallet balance
history <options> list wallet transactions
address <options> get wallet address
resync <options> resync wallet
import <options> import wallet seed from mnemonic sentence
send <options> send asset to address
activate <options> activate contract
extend <options> extend contract activation
execute <options> execute contract
active <options> list active contracts
publishblock <options> publish a block to the network
accountexists <options> check for an existing account
checkpassword <options> check a password
mnemonicphrase <options> get the mnemonic phrase
exportzenpublickey <options> export zen extended public key
importzenpublickey <options> import zen extended public key
and create watch-only account
removewallet <options> remove wallet
publickey <options> derive a public key
from a given derivation path
rawtx-create <options> create a raw transaction that pass
the asset and amount to the address
rawtx-sign <options> sign all possible inputs of the raw
transaction and return the signed
transaction
rawtx-publish <options> publish a fully signed raw transaction
wallet-create <options> create a wallet from a newly generated
mnemonic phrase
blockchain-info <options> get blockchain info
walletkeys <options> get wallet keys
signmessage <options> sign message with your privates
Use 'zen-cli <subcommand> --help' for additional information.
OPTIONS:
--port, -p <port> port of zen-node API
--test, -t use testnet port
--help display this list of options.

Examples

Check your balances

> zen-cli balance
Asset | Balance
============================
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 | 1900000000

Get wallet address

> zen-cli address
tp1q7n4l3dldcv69wfyqm32mpkwvf56q5kjdv7ma5p2668z05ljcv2gsq3ke4q

Send Transaction

> zen-cli spend 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 1000000 tp1q7n4l3dldcv69wfyqm32mpkwvf56q5kjdv7ma5p2668z05ljcv2gsq3ke4q
Ok "Binary [||]"

Import Wallet

> zen-cli import mypassword ability able about above absent absorb abstract absurd abuse access accident account accuse achieve acid acoustic acquire across act action actor actress actual adapt

Resync Blockchain

> zen-cli resync
Success

Activate Contract

> zen-cli activate path-to-file number-of-blocks rlimit
Success