POSTchunk

NEAR Mainnethttps://near-mainnet.nodit.io/

Returns the chunk header and the transactions and receipts included in the chunk.

Call it with chunk_id (chunk hash), or with block_id and shard_id together. Get the chunk hash from chunks[].chunk_hash in the block method response. If the chunk cannot be found, the UNKNOWN_CHUNK error is returned; for a shard ID that does not exist, the INVALID_SHARD_ID error; if the block cannot be found, the UNKNOWN_BLOCK error.

Request Body
jsonrpcstringrequired
idstringrequired

Request ID. Any string; it is returned unchanged in the response.

methodstringrequired
chunk_idstring

Chunk hash (base58). Cannot be used with block_id and shard_id.

block_idinteger

Specifies the block to query by block height (integer) or block hash (base58 string). Cannot be used together with finality.

shard_idinteger

Shard ID. Set together with block_id.

Responses
jsonrpcstring

JSON-RPC version

idstring

Request ID

authorstring

Account ID of the validator that produced the chunk

headerobject

Chunk header

chunk_hashstring

Chunk hash (base58)

prev_block_hashstring

Previous block hash (base58)

outcome_rootstring

Merkle root of this chunk's execution outcomes (base58)

prev_state_rootstring

Shard state root before the chunk is applied (base58)

encoded_merkle_rootstring

Merkle root of the encoded chunk data (base58)

encoded_lengthinteger

Size of the encoded chunk data (bytes)

height_createdinteger

Block height at which the chunk was created

height_includedinteger

Block height at which the chunk was included

shard_idinteger

ID of the shard the chunk belongs to

gas_usedinteger

Gas used in the chunk

gas_limitinteger

Gas limit of the chunk

balance_burntstring

Amount burnt in the chunk (yoctoNEAR, decimal string)

outgoing_receipts_rootstring

Merkle root of receipts sent to other shards (base58)

tx_rootstring

Merkle root of the transactions in the chunk (base58)

validator_proposalsobject[]

Validator stake changes proposed in the chunk

congestion_infoobject

Shard congestion info. Total gas of delayed and buffered receipts (delayed_receipts_gas, buffered_receipts_gas), receipt size (receipt_bytes), and the allowed shard (allowed_shard).

bandwidth_requestsobject

Bandwidth this shard requests for sending to other shards

proposed_splitobject

Shard split proposed for dynamic resharding. null when there is no proposal.

signaturestring

Signature of the chunk producer

rent_paidstring

Deprecated field; always "0".

validator_rewardstring

Deprecated field; always "0".

transactionsobject[]

Signed transactions included in the chunk

signer_idstring

Account ID that signed the transaction

public_keystring

Public key used for signing

nonceinteger

Access key nonce

receiver_idstring

Account ID receiving the transaction

actionsobject[]

Actions of the transaction. Each item is an object keyed by the action type name (for example Transfer, FunctionCall, Delegate).

signaturestring

Transaction signature

hashstring

Transaction hash (base58)

priority_feeinteger

Deprecated field; always 0.

receiptsobject[]

Receipts included in the chunk. Empty when there are none.

predecessor_idstring

Account ID that created the receipt

receiver_idstring

Account ID receiving the receipt

receipt_idstring

Receipt ID (base58)

receiptobject

Receipt body. Keyed by either Action (actions to execute) or Data (data to deliver).

priorityinteger

Deprecated field; always 0.

namestring (enum)

Error class. REQUEST_VALIDATION_ERROR (invalid request), HANDLER_ERROR (processing error), INTERNAL_ERROR (node internal error)

causeobject

The specific cause of the error.

namestring

Name of the error cause (e.g. UNKNOWN_BLOCK, UNKNOWN_ACCOUNT, PARSE_ERROR)

infoobject

Additional information about the error (block hash, height, account ID, etc.)

codeinteger

Legacy JSON-RPC error code (e.g. -32000 server error, -32700 parse error, -32601 method not found)

messagestring

Legacy error message

datastring

Legacy error details

X-API-KEY
RequestCU30
cURL
curl -X POST "https://near-mainnet.nodit.io/" \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": "dontcare",
    "method": "chunk",
    "params": {
      "chunk_id": "Bwb7e4kc3EazNa2UNS18LGwpCUNtKCebcMwEDckqVAuW",
      "block_id": 220785385,
      "shard_id": 10
    }
  }'
Response
Example · 200
{
  "jsonrpc": "2.0",
  "id": "dontcare",
  "result": {
    "author": "northstakenear.poolv1.near",
    "header": {
      "balance_burnt": "0",
      "bandwidth_requests": {
        "V1": {
          "requests": []
        }
      },
      "chunk_hash": "Bwb7e4kc3EazNa2UNS18LGwpCUNtKCebcMwEDckqVAuW",
      "congestion_info": {
        "allowed_shard": 12,
        "buffered_receipts_gas": "0",
        "delayed_receipts_gas": "0",
        "receipt_bytes": 0
      },
      "encoded_length": 526,
      "encoded_merkle_root": "3PtDhuYvav6hrN9GGu5wVPx7p3KptKaCX99YzdjvuKbj",
      "gas_limit": 1000000000000000,
      "gas_used": 0,
      "height_created": 220785299,
      "height_included": 220785299,
      "outcome_root": "11111111111111111111111111111111",
      "outgoing_receipts_root": "GkXFM5VkSNfBLbDv8igetxFxFj9f3pcsnjKC37w1CzCA",
      "prev_block_hash": "EchVfdovVaSQLUp4p5hXg9mxRow7VyfA1w5Ax5ev3iV2",
      "prev_state_root": "8PiaWyhACTaqbPe8LPeYAtPFgZjrLv6JsRg64cNRWAPe",
      "proposed_split": null,
      "rent_paid": "0",
      "shard_id": 10,
      "signature": "ed25519:4R3aGDYqfSVE1x8SZr7rhjqCPEVHfdCvdDJem6K5evttEEYNgb3V3WvAYQ2BENAZ5SZdVXe62zfFqewxPCLcaZCH",
      "tx_root": "BG1meqDgUX7erusU7UN5YH5q6UKrJccqftT9jrTdyb2L",
      "validator_proposals": [],
      "validator_reward": "0"
    },
    "receipts": [],
    "transactions": [
      {
        "actions": [
          {
            "Delegate": {
              "delegate_action": {
                "actions": [
                  {
                    "FunctionCall": {
                      "args": "eyJjaGFyZ2VfZ2FzX2ZlZSI6dHJ1ZSwic2lnbmF0dXJlIjoiMWY3MWMxMzk5OTFjNGUwMDRmNGNhZWJjMjM4NDIyZTk0MzMzNmQwMGNiNzlhZmNjNDg5M2UzZTE2OWI2OWE3NCIsIm1pbmluZ190aW1lIjoiNDUwMDciLCJtYXhfdHMiOiIxNzkyNDg4ODgyNzM2ODgxOTIwIn0=",
                      "deposit": "0",
                      "gas": 20000000000000,
                      "method_name": "l2_claim"
                    }
                  }
                ],
                "max_block_height": 221185293,
                "nonce": 117245306001780,
                "public_key": "ed25519:GxKiWi42sV92ijqade5AoTBo9vUpEWoZKUw8i2BmuwaE",
                "receiver_id": "game.hot.tg",
                "sender_id": "6464297750.tg"
              },
              "signature": "ed25519:5Fhq2Eqa1CUeceTjFGqx1JiD13oGkp1Ag2rkbX2x2asREVbrggjGU4FLbvdziAXAeDaShZ43JV6hXJ7G5nCUT3DZ"
            }
          }
        ],
        "hash": "5VPiJGhxiKsBk8a8W3NyVPTkEG3QY9y5iZ9PsQpAyYE9",
        "nonce": 114560347115868,
        "priority_fee": 0,
        "public_key": "ed25519:68EKbqA3fcSE8upq2bU1EawvURWZJXtTsbw3eK23a2Kf",
        "receiver_id": "6464297750.tg",
        "signature": "ed25519:ncxmj7JgkcToxBxsGXgA22FYz55qSobM8SnEBUiD82pnY5WSQJcHC862S4LC3mdKavyeVVXQWUkk6eNyzQaN8Ee",
        "signer_id": "0here.tg"
      }
    ]
  }
}