Ledger information — token supply, balances, thresholded transactions, transaction details, and ledger events.
Method name: ledger. Supports API version 1 (params string) and version 2 (subcommand + arguments).
params{
"jsonrpc": "2.0",
"method": "ledger",
"params": ["ledger;list;coins;-net;Backbone;-limit;50;-offset;0"],
"id": 1,
"version": 1
}
Arguments are separated by ; only. Example: ledger;info;-hash;0xABC...;-net;Backbone.
subcommand + arguments{
"method": "ledger",
"subcommand": "list;coins",
"arguments": {"net": "Backbone", "limit": "1"},
"id": 1,
"version": 2
}
{
"method": "ledger",
"subcommand": ["list", "coins"],
"arguments": {"net": "Backbone", "limit": "1"},
"id": 2,
"version": 2
}
Multi-token subcommands: Use ; or a JSON array — not spaces.
"list;coins" or ["list","coins"] works; "list coins" is parsed as a single token and returns error code 1
(requires parameter ‘list’ or ‘info’ or ‘event’). Same rule applies to list;threshold, list;balance, and event;list.
| Option | v2 arguments key | Description |
|---|---|---|
-net <net_name> | net | Network name (required for all tested subcommands). |
-hash <tx_hash> | hash | Transaction hash (info, event dump, list threshold -hash). |
-limit <N> | limit | Maximum list results. |
-offset <N> | offset | Skip first N list results. |
-head | head (empty string) | Iterate from head (oldest first) in list subcommands. |
-unspent | unspent (empty string) | For info: search only unspent transaction in chains. |
-full | full (empty string) | Local CLI table mode: show full hashes/keys (no truncation). |
-h | h (empty string) | Local CLI table mode for list subcommands (see below). |
-group <name> | group | Filter event list by group. |
-H hex|base58 | H | Hash format for event key list (default hex). |
-history_limit <N> | history_limit | UTXO blocklist history depth in list coins (default 10; 0 = all). |
| Subcommand | v1 params | v2 subcommand | Public RPC |
|---|---|---|---|
list coins | ledger;list;coins;-net;<net>;[-limit;N][;-offset;N] | "list;coins" or ["list","coins"] | tested |
list threshold | ledger;list;threshold;-net;<net>;[-hash;<tx_hash>][;-limit;N][;-offset;N][;-head] | "list;threshold" | tested |
list balance | ledger;list;balance;-net;<net>;[-limit;N][;-offset;N][;-head] | "list;balance" | tested |
info | ledger;info;-hash;<tx_hash>;-net;<net>;[-unspent] | "info" | tested |
event list | ledger;event;list;-net;<net>;[-group;<name>] | "event;list" or ["event","list"] | tested |
event dump | ledger;event;dump;-net;<net>;-hash;<tx_hash> | "event;dump" | needs event tx hash |
event create | Requires wallet, certs, service UID | — | state-changing |
event key add|remove|list | Decree-chain operations | — | requires local certs |
{"jsonrpc":"2.0","method":"ledger","params":["ledger;list;coins;-net;Backbone;-limit;3;-offset;0"],"id":1,"version":1}
{"jsonrpc":"2.0","method":"ledger","params":["ledger;list;threshold;-net;Backbone;-limit;20;-head"],"id":2,"version":1}
{"jsonrpc":"2.0","method":"ledger","params":["ledger;info;-hash;0x135371432B6F6E7E53E53EF83F34B604DECF3C3F58DC84B62D6376F25FA5BE93;-net;Backbone"],"id":4,"version":1}
{"method":"ledger","subcommand":"list;coins","arguments":{"net":"Backbone","limit":"1"},"id":1,"version":2}
{"method":"ledger","subcommand":["list","coins"],"arguments":{"net":"Backbone","limit":"1"},"id":2,"version":2}
{"method":"ledger","subcommand":"list;balance","arguments":{"net":"Backbone","limit":"1"},"id":3,"version":2}
{
"type": 2,
"result": [ ... ],
"id": 1,
"version": 1
}
Errors appear inside result as {"errors": [{"code": N, "message": "..."}]}.
Token and balance fields are defined in dap_chain_ledger.c; transaction info fields in dap_chain_node_cli_cmd_tx.c. The response version echoes the request.
| Context | Version 1 | Version 2 |
|---|---|---|
list coins ticker | -->Token name | token_name |
list coins type | type | subtype |
list coins supply | Supply current / Supply total | supply_current / supply_total |
list coins decimals | Decimals | decimals |
list coins auth signs | Auth signs valid / Auth signs total | auth_sig_valid / auth_sig_total |
list coins public keys | Signatures public keys (hash, bytes) | sig_pkeys (pkey_hash, pkey_size) |
list coins emissions | Total emissions | total_emissions |
list threshold tx hash | Ledger thresholded tx_hash_fast | tx_hash |
list threshold time / size | time_created, tx_item_size | time_created, tx_item_size |
list balance key | Ledger balance key | balance_key |
list balance token / amount | token_ticker, balance | token_ticker, balance |
info tx hash | Datum_tx_hash | datum_tx_hash |
info timestamp | TS_Created | ts_created |
info ticker | Token_ticker / token ticker | token_ticker |
info spent outs | Spent OUTs / all OUTs yet unspent | spent_outs / all_outs_yet_unspent |
result[0] is an array: optional {"limit": N} / {"offset": N} objects, then one object per token.
Version 1:
{
"type": 2,
"result": [
[
{ "limit": 1 },
{
"-->Token name": "CELL",
"type": "CF20",
"flags": ["ALL_SENDER_ALLOWED"],
"description": "The token description is not set",
"Supply current": "0",
"Supply total": "0",
"Decimals": "18",
"Auth signs valid": 4,
"Auth signs total": 6,
"Signatures public keys": [ { "line": 0, "hash": "0x4118...", "pkey_type": "DAP_PKEY_TYPE_SIGN_DILITHIUM", "bytes": 1196 } ],
"tx_send_block": [ "Rj7J7MiX2bWy8sNyYTf2fmRtwKh2BgtWspSAsHVMcerXEqbVTzsg4EXe5ymSrLTDDKdYwu8JkkKwXDkbF5zbXEf5NnM2MqEqqJCnGqe3" ],
"utxo_blocklist_count": 0,
"Total emissions": 26898
}
]
],
"id": 1,
"version": 1
}
Version 2:
{
"type": 2,
"result": [
[
{ "limit": 1 },
{
"token_name": "CELL",
"subtype": "CF20",
"flags": ["ALL_SENDER_ALLOWED"],
"description": "The token description is not set",
"supply_current": "0",
"supply_total": "0",
"decimals": "18",
"auth_sig_valid": 4,
"auth_sig_total": 6,
"sig_pkeys": [ { "line": 0, "pkey_hash": "0x4118...", "pkey_type": "DAP_PKEY_TYPE_SIGN_DILITHIUM", "pkey_size": 1196 } ],
"tx_send_block": [ "Rj7J7MiX2bWy8sNyYTf2fmRtwKh2BgtWspSAsHVMcerXEqbVTzsg4EXe5ymSrLTDDKdYwu8JkkKwXDkbF5zbXEf5NnM2MqEqqJCnGqe3" ],
"utxo_blocklist_count": 0,
"total_emissions": 26898
}
]
],
"id": 1,
"version": 2
}
When no thresholded transactions exist:
{
"result": [
[
{ "limit": 3 },
{ "status": "0 items in ledger tx threshold" }
]
]
}
When items exist: version 1 uses Ledger thresholded tx_hash_fast; version 2 uses tx_hash. Both use time_created and tx_item_size.
Version 1:
{
"result": [
[
{ "limit": 1 },
{
"Ledger balance key": "Rj7J7MiX2bWy8sNya4yB7z86JReYjFyAjK94mmyjQmabzKSZMpimaQkwa1D139gYbBA5mmkrxRVCxVq68AxCejZZuoWWrKWiCGiDpQ33 CELL",
"token_ticker": "CELL",
"balance": "3000000000000000000"
}
]
]
}
Version 2:
{
"result": [
[
{ "limit": 1 },
{
"balance_key": "Rj7J7MiX2bWy8sNya4yB7z86JReYjFyAjK94mmyjQmabzKSZMpimaQkwa1D139gYbBA5mmkrxRVCxVq68AxCejZZuoWWrKWiCGiDpQ33 CELL",
"token_ticker": "CELL",
"balance": "3000000000000000000"
}
]
]
}
Version 1 Ledger balance key concatenates address and token ticker. balance is the raw uint256 value (divide by 10decimals for coins).
Returns full transaction dump from ledger. Requires -hash / hash and -net / net.
{
"result": [
{
"Datum_tx_hash": "0x135371432B6F6E7E53E53EF83F34B604DECF3C3F58DC84B62D6376F25FA5BE93",
"TS_Created": "Mon, 13 Jul 2026 15:07:16 +0000",
"Token_ticker": "CELL",
"hash": "0x135371432B6F6E7E53E53EF83F34B604DECF3C3F58DC84B62D6376F25FA5BE93",
"token ticker": "CELL",
"ITEMS": [
{ "item type": "OUT STD", "addr": "Rj7J7MiX2bWy8sNyX38bB86KTFUnSn7sdKDsTFa2RJyQTDWFaebrj6BucT7Wa5CSq77zwRAwevbiKy1sv1RBGTonM83D3xPDwoyGasZ7", "token": "CELL", "coins": "0.002", "value": "2000000000000000" },
{ "item type": "SIG", "Type": "sig_dil", "Public key hash": "0x9D424AB6F89812B42FE8F63EA3163304D93094BB3D8DF846549B514F6A18684D" }
],
"Spent OUTs": [],
"all OUTs yet unspent": "yes"
}
]
}
With version: 2, top-level keys become datum_tx_hash, ts_created, token_ticker, spent_outs, all_outs_yet_unspent; item fields use snake_case (item_type, addr, etc.). Optional flags: -unspent, -need_sign, -tx_to_json.
{
"result": [
{
"events": []
}
]
}
-h vs JSON-RPC response
HTTP JSON-RPC always returns JSON in result, even with -h in params (verified: identical JSON with and without -h).
Local cellframe-node-cli uses s_print_for_ledger_list to render ASCII tables when -h is set.
| Subcommand | Local CLI table columns | -full effect |
|---|---|---|
list coins | Token Ticker, Type, Decimals, Total Supply, Current Supply | n/a |
list threshold | Tx Hash, Time Created, Items Size | full tx hash (66 chars) |
list balance | Balance Key, Token, Balance | full balance key (120 chars) |
Without -full, threshold tx hash and balance key are truncated to the last 15 characters in the table view.