block

Create and explore blockchains (block-type chains such as main on Backbone).

JSON-RPC

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

Version 1 — semicolon params

Put the full CLI command in params[0]. Every token is separated by ;not spaces.

{
  "jsonrpc": "2.0",
  "method": "block",
  "params": ["block;list;-net;Backbone;-limit;10;-offset;0"],
  "id": 1,
  "version": 1
}

Example: block;count;-net;Backbone (not block count -net Backbone).

Version 2 — subcommand + arguments

Omit params entirely. Argument keys map to CLI flags without a leading dash ("net"-net). Use string values for numbers ("limit": "10").

{
  "method": "block",
  "subcommand": "count",
  "arguments": {"net": "Backbone"},
  "id": 1,
  "version": 2
}

{
  "method": "block",
  "subcommand": "list",
  "arguments": {"net": "Backbone", "limit": "3", "offset": "0"},
  "id": 2,
  "version": 2
}

Multi-token subcommands (e.g. fee collect, reward set) must use ; or a JSON array — not spaces: "fee;collect" or ["fee","collect"].

Global options

Optionv2 arguments keyDescription
-net <net_name>netNetwork name (required).
-chain <chain_name>chainBlock chain name. Defaults to the network’s transaction/anchor chain (main on Backbone).
-limit <N>limitMaximum number of results (list).
-offset <N>offsetSkip first N results (list).
-headhead (empty string)Traverse from oldest block first (list).
-H hex|base58HHash output format for dump / find (default: hex).
-briefbrief (empty string)Brief dump output (datum num + hash only).
-datum <hash>datumDatum hash for find.
-hash <hash>hashBlock hash for dump.
-num <N>numBlock number for dump.
-hh (empty string)Human-readable table output in local CLI only (see below).

Explorer subcommands (read-only)

Subcommandv1 paramsv2 subcommandPublic RPC
listblock;list;-net;<net>;[-chain;<chain>;][-limit;N][;-offset;N][;-head]"list"tested
countblock;count;-net;<net>;[-chain;<chain>]"count"tested
lastblock;last;-net;<net>;-chain;<chain>"last"tested
findblock;find;-net;<net>;-chain;<chain>;-datum;<datum_hash>"find"slow / may timeout on public node
dumpblock;dump;-net;<net>;[-chain;<chain>;][-brief];{-hash;<hash>|-num;<num>}"dump"tested

list filter priority: date range → hash range → offset/limit. Date (-from_date/-to_date in YYMMDD) and hash (-from_hash/-to_hash) ranges cannot be mixed. Optional filters: signed, first_signed (require -cert or -pkey_hash), -unspent.

Example requests

Version 1

{"jsonrpc":"2.0","method":"block","params":["block;list;-net;Backbone;-limit;3;-offset;0"],"id":1,"version":1}

{"jsonrpc":"2.0","method":"block","params":["block;count;-net;Backbone"],"id":2,"version":1}

{"jsonrpc":"2.0","method":"block","params":["block;last;-net;Backbone;-chain;main"],"id":3,"version":1}

Version 2

{"method":"block","subcommand":"count","arguments":{"net":"Backbone"},"id":1,"version":2}

{"method":"block","subcommand":"list","arguments":{"net":"Backbone","limit":"3","offset":"0"},"id":2,"version":2}

{"method":"block","subcommand":"last","arguments":{"net":"Backbone","chain":"main"},"id":3,"version":2}

Response envelope

block is a JSON-response command. On success, HTTP body contains:

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

On error, the result array contains an object with an errors array (not a top-level JSON-RPC error field):

{
  "type": 2,
  "result": [
    {
      "errors": [
        { "code": 103, "message": "Enter block hash or block number" }
      ]
    }
  ],
  "id": 1,
  "version": 1
}

Version 1 vs version 2 response field names

The response version echoes the request version. Handlers in dap_chain_cs_blocks.c use labeled keys on version 1 and snake_case on version 2. Some summary keys (e.g. Backbone.main has blocks - ) are the same in both versions.

ContextVersion 1Version 2
list block numberblock numberblock_num
list block hashhashblock_hash
list timestampts_createts_create
last block numberLast block numlast_block_num
last block hashLast block hashlast_block_hash
last timestampts_createdts_created
find block listBlocksblocks
find countTotaltotal
dump block numberBlock numberblock_num
dump datum hashhashdatum_hash

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

block list

result is a two-element array: block rows (nested array) plus a filter summary object. Pagination metadata appears as objects {"limit": N} and optionally {"offset": N} inside the block array.

Version 1:

{
  "type": 2,
  "result": [
    [
      {
        "block number": 542723,
        "hash": "0x1BAA1E9BED45A899D7A24283FFCD0E3EF9E6F18D22E81BE4475DF5FFB3704322",
        "ts_create": "Tue, 14 Jul 2026 08:58:06 +0000"
      },
      { "limit": 2 }
    ],
    {
      "Backbone.main with filter - none, have blocks": 2
    }
  ],
  "id": 1,
  "version": 1
}

Version 2:

{
  "type": 2,
  "result": [
    [
      {
        "block_num": 542723,
        "block_hash": "0x1BAA1E9BED45A899D7A24283FFCD0E3EF9E6F18D22E81BE4475DF5FFB3704322",
        "ts_create": "Tue, 14 Jul 2026 08:58:06 +0000"
      },
      { "limit": 2 }
    ],
    {
      "Backbone.main with filter - none, have blocks": 2
    }
  ],
  "id": 2,
  "version": 2
}

block count

Count summary key is identical in both versions (network/chain-specific label).

{
  "type": 2,
  "result": [
    {
      "Backbone.main has blocks - ": 542723
    }
  ],
  "id": 1,
  "version": 2
}

block last

Requires -chain / chain. Returns last block metadata and total block count.

Version 1:

{
  "result": [
    {
      "Last block num": 542723,
      "Last block hash": "0x1BAA1E9BED45A899D7A24283FFCD0E3EF9E6F18D22E81BE4475DF5FFB3704322",
      "ts_created": "Tue, 14 Jul 2026 08:58:06 +0000",
      "Backbone.main has blocks": 542723
    }
  ]
}

Version 2:

{
  "result": [
    {
      "last_block_num": 542723,
      "last_block_hash": "0x1BAA1E9BED45A899D7A24283FFCD0E3EF9E6F18D22E81BE4475DF5FFB3704322",
      "ts_created": "Tue, 14 Jul 2026 08:58:06 +0000",
      "Backbone.main has blocks": 542723
    }
  ]
}

block find

Requires -datum / datum (transaction or other datum hash). Returns block hashes containing that datum. Version 1 uses Blocks/Total; version 2 uses blocks/total.

Local CLI -h vs JSON-RPC response

block, ledger, and token are registered in json_commands(): HTTP JSON-RPC always returns structured JSON in result, even when -h is present in the params string.

The -h flag affects local cellframe-node-cli only. After the node returns JSON, the CLI parser (s_print_for_block_list in dap_chain_node_cli.c) formats list output as an ASCII table when -h is set.

Contextblock;list;...;-h output
JSON-RPC (POST http://rpc.cellframe.net/)Same JSON array as without -h (verified).
Local CLI (cellframe-node-cli block list ... -h)ASCII table: columns Block #, Block hash, Time create; trailing limit/offset lines when present.

Write subcommands

The following require a node with master/miner role and local keys — not tested on public RPC. Multi-token forms use ; or JSON arrays: "fee;collect", ["reward","set"].

Back to index