ledger

Ledger information — token supply, balances, thresholded transactions, transaction details, and ledger events.

JSON-RPC

Method name: ledger. Supports API version 1 (params string) and version 2 (subcommand + arguments).

Version 1 — semicolon 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.

Version 2 — 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.

Global options

Optionv2 arguments keyDescription
-net <net_name>netNetwork name (required for all tested subcommands).
-hash <tx_hash>hashTransaction hash (info, event dump, list threshold -hash).
-limit <N>limitMaximum list results.
-offset <N>offsetSkip first N list results.
-headhead (empty string)Iterate from head (oldest first) in list subcommands.
-unspentunspent (empty string)For info: search only unspent transaction in chains.
-fullfull (empty string)Local CLI table mode: show full hashes/keys (no truncation).
-hh (empty string)Local CLI table mode for list subcommands (see below).
-group <name>groupFilter event list by group.
-H hex|base58HHash format for event key list (default hex).
-history_limit <N>history_limitUTXO blocklist history depth in list coins (default 10; 0 = all).

Subcommands

Subcommandv1 paramsv2 subcommandPublic RPC
list coinsledger;list;coins;-net;<net>;[-limit;N][;-offset;N]"list;coins" or ["list","coins"]tested
list thresholdledger;list;threshold;-net;<net>;[-hash;<tx_hash>][;-limit;N][;-offset;N][;-head]"list;threshold"tested
list balanceledger;list;balance;-net;<net>;[-limit;N][;-offset;N][;-head]"list;balance"tested
infoledger;info;-hash;<tx_hash>;-net;<net>;[-unspent]"info"tested
event listledger;event;list;-net;<net>;[-group;<name>]"event;list" or ["event","list"]tested
event dumpledger;event;dump;-net;<net>;-hash;<tx_hash>"event;dump"needs event tx hash
event createRequires wallet, certs, service UIDstate-changing
event key add|remove|listDecree-chain operationsrequires local certs

Example requests

Version 1

{"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}

Version 2

{"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}

Response envelope

{
  "type": 2,
  "result": [ ... ],
  "id": 1,
  "version": 1
}

Errors appear inside result as {"errors": [{"code": N, "message": "..."}]}.

Version 1 vs version 2 response field names

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.

ContextVersion 1Version 2
list coins ticker-->Token nametoken_name
list coins typetypesubtype
list coins supplySupply current / Supply totalsupply_current / supply_total
list coins decimalsDecimalsdecimals
list coins auth signsAuth signs valid / Auth signs totalauth_sig_valid / auth_sig_total
list coins public keysSignatures public keys (hash, bytes)sig_pkeys (pkey_hash, pkey_size)
list coins emissionsTotal emissionstotal_emissions
list threshold tx hashLedger thresholded tx_hash_fasttx_hash
list threshold time / sizetime_created, tx_item_sizetime_created, tx_item_size
list balance keyLedger balance keybalance_key
list balance token / amounttoken_ticker, balancetoken_ticker, balance
info tx hashDatum_tx_hashdatum_tx_hash
info timestampTS_Createdts_created
info tickerToken_ticker / token tickertoken_ticker
info spent outsSpent OUTs / all OUTs yet unspentspent_outs / all_outs_yet_unspent

Response fields (verified on rpc.cellframe.net / Backbone, Jul 2026)

list coins

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
}

list threshold

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.

list balance

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).

info

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.

event list

{
  "result": [
    {
      "events": []
    }
  ]
}

Local CLI -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.

SubcommandLocal CLI table columns-full effect
list coinsToken Ticker, Type, Decimals, Total Supply, Current Supplyn/a
list thresholdTx Hash, Time Created, Items Sizefull tx hash (66 chars)
list balanceBalance Key, Token, Balancefull balance key (120 chars)

Without -full, threshold tx hash and balance key are truncated to the last 15 characters in the table view.

Back to index