Create and explore blockchains (block-type chains such as main on Backbone).
Method name: block. Supports API version 1 (params string) and version 2 (subcommand + arguments).
paramsPut 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).
subcommand + argumentsOmit 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"].
| Option | v2 arguments key | Description |
|---|---|---|
-net <net_name> | net | Network name (required). |
-chain <chain_name> | chain | Block chain name. Defaults to the network’s transaction/anchor chain (main on Backbone). |
-limit <N> | limit | Maximum number of results (list). |
-offset <N> | offset | Skip first N results (list). |
-head | head (empty string) | Traverse from oldest block first (list). |
-H hex|base58 | H | Hash output format for dump / find (default: hex). |
-brief | brief (empty string) | Brief dump output (datum num + hash only). |
-datum <hash> | datum | Datum hash for find. |
-hash <hash> | hash | Block hash for dump. |
-num <N> | num | Block number for dump. |
-h | h (empty string) | Human-readable table output in local CLI only (see below). |
| Subcommand | v1 params | v2 subcommand | Public RPC |
|---|---|---|---|
list | block;list;-net;<net>;[-chain;<chain>;][-limit;N][;-offset;N][;-head] | "list" | tested |
count | block;count;-net;<net>;[-chain;<chain>] | "count" | tested |
last | block;last;-net;<net>;-chain;<chain> | "last" | tested |
find | block;find;-net;<net>;-chain;<chain>;-datum;<datum_hash> | "find" | slow / may timeout on public node |
dump | block;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.
{"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}
{"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}
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
}
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.
| Context | Version 1 | Version 2 |
|---|---|---|
list block number | block number | block_num |
list block hash | hash | block_hash |
list timestamp | ts_create | ts_create |
last block number | Last block num | last_block_num |
last block hash | Last block hash | last_block_hash |
last timestamp | ts_created | ts_created |
find block list | Blocks | blocks |
find count | Total | total |
dump block number | Block number | block_num |
dump datum hash | hash | datum_hash |
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
}
Count summary key is identical in both versions (network/chain-specific label).
{
"type": 2,
"result": [
{
"Backbone.main has blocks - ": 542723
}
],
"id": 1,
"version": 2
}
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
}
]
}
Requires -datum / datum (transaction or other datum hash). Returns block hashes containing that datum. Version 1 uses Blocks/Total; version 2 uses blocks/total.
-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.
| Context | block;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. |
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"].
new, new_datum_add, new_datum_del, new_datum_list, new_completefee collect, reward set|show|collect, autocollect status|renew