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
1
USAGE: zen-cli [--help] [--port <port>] [--test] [<subcommand> [<options>]]
2
3
SUBCOMMANDS:
4
5
balance <options> get wallet balance
6
history <options> list wallet transactions
7
address <options> get wallet address
8
resync <options> resync wallet
9
import <options> import wallet seed from mnemonic sentence
10
send <options> send asset to address
11
activate <options> activate contract
12
extend <options> extend contract activation
13
execute <options> execute contract
14
active <options> list active contracts
15
publishblock <options> publish a block to the network
16
accountexists <options> check for an existing account
17
checkpassword <options> check a password
18
mnemonicphrase <options> get the mnemonic phrase
19
exportzenpublickey <options> export zen extended public key
20
importzenpublickey <options> import zen extended public key
21
and create watch-only account
22
removewallet <options> remove wallet
23
publickey <options> derive a public key
24
from a given derivation path
25
rawtx-create <options> create a raw transaction that pass
26
the asset and amount to the address
27
rawtx-sign <options> sign all possible inputs of the raw
28
transaction and return the signed
29
transaction
30
rawtx-publish <options> publish a fully signed raw transaction
31
wallet-create <options> create a wallet from a newly generated
32
mnemonic phrase
33
blockchain-info <options> get blockchain info
34
walletkeys <options> get wallet keys
35
signmessage <options> sign message with your privates
36
37
Use 'zen-cli <subcommand> --help' for additional information.
38
39
OPTIONS:
40
41
--port, -p <port> port of zen-node API
42
--test, -t use testnet port
43
--help display this list of options.
44
45
Copied!

Examples

Check your balances

1
> zen-cli balance
2
3
Asset | Balance
4
============================
5
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 | 1900000000
Copied!

Get wallet address

1
> zen-cli address
2
3
tp1q7n4l3dldcv69wfyqm32mpkwvf56q5kjdv7ma5p2668z05ljcv2gsq3ke4q
Copied!

Send Transaction

1
> zen-cli spend 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 1000000 tp1q7n4l3dldcv69wfyqm32mpkwvf56q5kjdv7ma5p2668z05ljcv2gsq3ke4q
2
3
Ok "Binary [||]"
Copied!

Import Wallet

1
> 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
2
3
4
5
Copied!

Resync Blockchain

1
> zen-cli resync
2
3
Success
Copied!

Activate Contract

1
> zen-cli activate path-to-file number-of-blocks rlimit
2
3
4
Success
Copied!
Last modified 1yr ago