Zen Protocol Documentation
WebsiteTelegramBlogForum
  • Zen Protocol Docs
  • Apps
    • Headless Full Node
      • Full Node NPM Package
      • Build from Source
      • CLI
      • API
        • Wallet
        • Contracts
        • General
        • Blockchain
        • AddressDB
      • Deploy
        • Systemd
        • Shell script
        • Docker
      • Technical Model
      • AddressDB
    • Wallet
      • Desktop Wallet
        • Installers
      • Web Wallet
        • Run Locally
      • Wallet User Guide
        • Connect a Wallet
          • Create a Wallet
          • Import a Wallet
          • Watch Mode
        • My Wallet
          • Navigation Bar
          • Portfolio
          • Receive
          • Send / Execute
          • Transaction History
        • Contracts
          • Active Contracts
          • Execute a Contract
            • Message Body Field
          • Extend a Contract
          • Activate a Contract
        • Voting
          • Common Goods Pool
            • Generating a Ballot ID
          • Governance
        • Signer
        • Settings
          • Account Settings
          • Node Connectivity
      • Deprecated Desktop Wallet
        • Executable Installers
        • Wallet Structure
          • Video Tutorials
    • Explorer
    • Zen.js
      • Payment Processing
    • Oracle
      • Oracle GUI
      • Oracle Service
      • Oracle's API
      • Deploy
        • Systemd
        • Docker
      • How the Oracle contract works
      • How to create an Attestation token
    • Dex
      • Dex User Guide
        • Traded Pairs
        • Search Pairs
        • Order Book
        • Operations
        • My Wallet
        • Settings
      • How DEX contract works
    • Fixed Payout
      • Fixed Payout Generator User Guide
        • Issue
        • Redeem
        • Cancel
        • Verify
        • Settings
      • How the FP Contract works
      • How are the asset named?
  • Smart Contracts
  • Contract Structure
  • Contract Cost
  • Contract Activation
  • Contract Examples
  • Smart Contracts SDK
  • Contracts Language ZF*
  • Named Token Tutorial
  • Consensus
  • Common Goods Pool
  • Block Validation
  • Transaction Validation
  • Serialization
  • Use Cases
    • Create Unsigned Transaction
    • Secure Sign Transaction
    • Cold Storage using Full Node
  • Troubleshooting
    • Responsible Disclosure
    • Bug Bounty
    • Known Bugs
  • For Miners
    • Pools
    • GPU Mining
    • GPU Bounties
  • Check Crowdsale Contribution
  • Alpha call option
Powered by GitBook
On this page
  • Examples
  • Check your balances
  • Get wallet address
  • Send Transaction
  • Import Wallet
  • Resync Blockchain
  • Activate Contract
  1. Apps
  2. Headless Full Node

CLI

Interact with the headless Zen Node via the Command Line Interface

PreviousBuild from SourceNextAPI

Last updated 4 years ago

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
The zen-cli comes bundled together with the zen-node package. So start by installing and running the zen-node package in headless mode.