Sigil documentation
ReferenceJSON-RPC

sigil_getLatestBlock

Read a stored block window ending at the latest height.

Method

sigil_getLatestBlock is registered in the canonical JSON-RPC catalog. Use POST /rpc, Content-Type: application/json, JSON-RPC 2.0 and a caller-controlled request id. Node RPC profile, build feature and runtime activation checks still apply.

Read a stored block window ending at the latest height.

Request binding

Source handler: rpc_server::handle_get_latest_blocks in sigil/node/sigil-node/src/rpc_server.rs, line 2569.

The handler directly reads these named fields: count. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality.

Read example

count: positive integer; defaults to 20, capped at 100. Returns blocks, latest_height, and count.

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "sigil_getLatestBlock",
  "params": {
    "count": 1
  }
}

Named YOUR_* values must be replaced with identifiers from the selected chain.

Responses and failures

Check HTTP status, parse the JSON-RPC envelope, reject error, and require result on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements.

On this page