NEAR Protocol RPC: Chunk by Block ID and Shard ID (1.0.0)

Retrieve chunk data using block ID and shard ID coordinates

Languages
Servers
Mainnet
https://rpc.mainnet.fastnear.com/
Testnet
https://rpc.testnet.fastnear.com/

Get chunk by block ID and shard ID

Request

Retrieves chunk details using block ID and shard ID coordinates

Bodyapplication/jsonrequired
jsonrpcstringrequired
Value"2.0"
idstringrequired
Example: "fastnear"
methodstringrequired
Value"chunk"
paramsobjectrequired
params.​block_idinteger or stringrequired

Block height (integer) or block hash (string)

One of:

Block height (integer) or block hash (string)

integer

Block height (integer) or block hash (string)

params.​shard_idintegerrequired

Shard identifier

curl -i -X POST \
  https://rpc.mainnet.fastnear.com/ \
  -H 'Content-Type: application/json' \
  -d '{
    "jsonrpc": "2.0",
    "id": "fastnear",
    "method": "chunk",
    "params": {
      "block_id": "BnHU4MCqsNVgLRCiZteef85VYxCbNzwkWEo1cEG8Z6VX",
      "shard_id": 0
    }
  }'

Responses

Successful response

Bodyapplication/json
jsonrpcstringrequired
Value"2.0"
idstring or numberrequired
One of:
string
resultobject
errorobject
Response
application/json
{ "jsonrpc": "2.0", "id": "string", "result": { "author": "string", "header": {}, "receipts": [], "transactions": [] }, "error": { "code": 0, "message": "string", "data": {} } }