A command line tool for interacting with the Koinos blockchain, built with TypeScript and koilib.
npm install
npm run build
npm linkRun in development mode:
npm run dev -- <command>
# or after linking:
kcli <command>npm run build-r, --rpc <url>- RPC endpoint URL (default: https://api.koinos.io)-c, --changes- Show latest changes and exit
kcli chain-infokcli block <height> # By block height
kcli block 1000000
kcli block <blockId> # By block ID
kcli block --full 1000000 # Show full transaction detailskcli balance <address>
kcli balance 1NsQbH5AhQXgtSNg1ejpFqTi2hmCWz1eQSkcli vhp <address>kcli token-balance <contractId> <address>kcli generate-walletkcli derive-from-seed "<seed phrase>" -n 5kcli address <privateKeyWIF>kcli nonce <address>kcli rc <address>kcli read-contract <contractId> <method> --args '{"key": "value"}'
kcli read-contract 15DJN4a8SgrbGhhGksSBASiSYjGnMU8dGL namekcli import-wallet <privateKeyWIF>kcli walletkcli delete-walletkcli register-producer-key <producerAddress> <publicKey>
kcli register-producer-key <publicKey> # Uses configured main producer address
kcli register-producer-key 14MHW6TF8gw8EuMRLCJc2PQHLzZLKuwGqb Aq4Ps_Ch-f8OZDnpQOov2SiMvdYyA5tn0oWa36QWnTeH
kcli register-producer-key <producerAddress> <publicKey> --dry-runThis command sends a transaction to the Proof-of-Burn contract (159myq5YUhhoVWu3wsHKHiJYKPKGUrGiyv) and calls register_public_key.
producerAddress: address that will produce blockspublicKey: block producer public key in base64url format (typically from$KOINOS_BASEDIR/block_producer/public.key)--dry-run: prepare and display the transaction without sending it
If the producer address is omitted, kcli uses mainProducerAddress from ~/.kcli/config.json.
kcli get-producer-key <producerAddress>
kcli get-producer-key # Uses configured main producer addressThis command reads PoB get_public_key and returns the public key assigned to the producer address (if any).
kcli producer-dashboard
kcli producer-dashboard --window 240 --interval 3 --top 25
kcli producer-dashboard --view peersShows a live text-based dashboard with two views: producers and peers.
--window: number of recent blocks to analyze (default:120)--interval: refresh interval in seconds (default:5)--top: number of producers to display (default:20)--view: initial view (producersorpeers, default:producers)- Switch views while running with
1(producers) and2(peers) - Exit with
qorCtrl+C - Includes per-producer
KOINandVHPcolumns (shown as whole numbers, no decimals) - Shows estimated APY (based on active producers in the analyzed window)
- Shows total virtual supply (
VHP + KOIN) - Detects Fogata pools by calling
get_pool_params; highlights those producer addresses in orange and shows poolname - Peers view shows active peer endpoint (IP:port), geolocation, ping in seconds, seen ratio, and a role heuristic (
Seed,Likely Producer,Possible Producer,Relay/Unknown) - Seed detection uses local node
p2p.peerconfig entries when available ($KOINOS_BASEDIR/config/config.yml,~/.koinos/config/config.yml,~/.koinos/config.yml,/etc/koinos/config.yml) - Geolocation is best-effort using
ipwho.is; role classification is heuristic (not an on-chain proof) - Block window fetch is automatically paginated, so
--windowcan be greater than1000
kcli burn -p 95 # Burn 95% of KOIN balance
kcli burn -a 10 # Burn exactly 10 KOIN
kcli burn -p 95 --dry-runkcli config --show
kcli config --default-account <address>
kcli config --main-producer-address <address>Default main producer address:
14MHW6TF8gw8EuMRLCJc2PQHLzZLKuwGqbkcli --rpc http://localhost:8080 chain-infokcli --changes