chunk - NEAR Protocol

Returns the details of a chunk, by chunk hash, or by block_id plus shard_id. Includes the chunk header and its transactions and receipts.

Method

chunk

Parameters

The params object carries:

ParameterExampleDescription
chunk_id"3xY7k...chunkhash"—

Example

bashexport NEAR_RPC=https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/

curl -X POST "${NEAR_RPC}" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc": "2.0", "id": "getblock.io", "method": "chunk", "params": {"chunk_id": "3xY7k...chunkhash"}}'

Response

json{
    "header": {
        "chunk_hash": "3xY...",
        "shard_id": 0,
        "height_created": 152000000,
        "gas_used": 1200000000000,
        "gas_limit": 1000000000000000
    },
    "transactions": [
        {
            "hash": "B2d...",
            "signer_id": "example.near",
            "receiver_id": "token.near"
        }
    ],
    "receipts": []
}

Response Fields

FieldTypeDescription
headerobjectChunk header: hash, shard_id, height, gas used/limit
transactionsarrayTransactions included in the chunk
receiptsarrayReceipts processed in the chunk

Use Cases

  • Transaction extraction: Read a shard's transactions from a chunk
  • Shard data: Inspect per-shard gas usage

Error Handling

ErrorMessageDescription
-32700 / Parse errorParse errorThe JSON request was malformed
-32601 / Method not foundMethod not foundThe method is unknown or disabled on this node version
HANDLER_ERRORRequested data not foundThe account, block, chunk, or transaction does not exist or is garbage-collected (use an archival node)
403 / RBAC: access deniedAccess deniedThe GetBlock access token is missing or incorrect