Block

Queries network and returns block for given height or hash. You can also use finality param to return latest block details.

Note: You may choose to search by a specific block or finality, you can not choose both.

Parameters

  • method: block

  • params:

    • [block_Id], ["block_hash"] or

    • finality: optimistic or final

Returns

Data about the block that was queried.

Example

//Request
curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc": "2.0","id": "dontcare","method": "block","params": {"block_id": 9834819}}' http://<your_app_id>.ankr.com
//Response
{
"jsonrpc": "2.0",
"result": {
"author": "nfvalidator3.near",
"header": {
"height": 9834819,
"epoch_id": "11111111111111111111111111111111",
"next_epoch_id": "EPnLgE7iEq9s7yTkos96M3cWymH5avBAPm3qx3NXqR8H",
"hash": "2637yihKRdjCU2nEqzJ8MmiumQ8W43KvC5388eKFAWhA",
"prev_hash": "81zAH2pJzXWXpA6EGe9mmqpWFZsAHenxAphApDRoCb6D",
"prev_state_root": "CZ8qkR6eZS3H9mEpwcfxeW2aHhGFoxEccYYRCxbHh9Rj",
"chunk_receipts_root": "9ETNjrt6MkwTgSVMMbpukfxRshSD1avBUUa4R4NuqwHv",
"chunk_headers_root": "B35LL3mBMGEkQJxjvwybxsWdCxVfzyRyc99PLKbh2925",
"chunk_tx_root": "7tkzFg8RHBmMw1ncRJZCCZAizgq4rwCftTKYLce8RU8t",
"outcome_root": "7tkzFg8RHBmMw1ncRJZCCZAizgq4rwCftTKYLce8RU8t",
"chunks_included": 1,
"challenges_root": "11111111111111111111111111111111",
"timestamp": 1595380040220889125,
"timestamp_nanosec": "1595380040220889125",
"random_value": "Chf6sD28DJiP2r5CE73Kx1MQPXvnYqd39VD9LSF9rnwq",
"validator_proposals": [],
"chunk_mask": [true],
"gas_price": "1000000000",
"rent_paid": "0",
"validator_reward": "0",
"total_supply": "999999998901546733089199166000000",
"challenges_result": [],
"last_final_block": "AhevSAdUnU8Vk7HUJq5n8cPKze6PUXwLUwyE79m3aMaw",
"last_ds_final_block": "81zAH2pJzXWXpA6EGe9mmqpWFZsAHenxAphApDRoCb6D",
"next_bp_hash": "C4121SKfZh1MC38ukZaxHsEXNYrBbqAk77P7yLmQffs5",
"block_merkle_root": "HDdszv3E3HNJkorvFaXtqi4pYNpJ5eLTZ5RdnbNkpjcA",
"approvals": ["ed25519:66UmyVC2STxqE8VJZ89gGm1J12pgrbBe9a3Up3gfgUoXPKb1PAMX8m9ArDz89JmbFHMw3fXwc9YyQGT98qJhbKGf", "ed25519:MustTz8rRRDzmc82f239aqB4AKy4ZnvGjn6HFogRWJxGocTZGNUWRtpLsnUj23PPaDoYZmjCGoMA9mVFQSPksa7", "ed25519:3B4ck3gpJEFozPinxJ2ztE79MHvHmTUnFbwReKTCZ8cq1gLHzNrE7T77w8CPRdHamMwUbyqd4fqGqcAQPs8BKHio", "ed25519:2ZQZoPQpULEqzR9yPJJbhy7jH3yJUoL9yTn9kGNqNCkgkKJWX4PYyxSV76jZLst7ZE6je88TH9yqZe2P4Fa2HwB1"],
"signature": "ed25519:4bRzBicvi1WvxSTAdJU4ayMHAd4CbLHkeAmfqLS1cg3s3isWv5ywtJir6iAnqR1bAD3xQhhR1CRPH7R1dEiVuezd",
"latest_protocol_version": 30
},
"chunks": [{
"chunk_hash": "GJDXyJHb2x2gGwbRq81NXr3krMy2RA6kuFG9ptefA2pd",
"prev_block_hash": "81zAH2pJzXWXpA6EGe9mmqpWFZsAHenxAphApDRoCb6D",
"outcome_root": "11111111111111111111111111111111",
"prev_state_root": "4S3nM9HGZzQ3nN3daHoYpAjnMzUS7cYSAr4WzEE8n8h7",
"encoded_merkle_root": "9zYue7drR1rhfzEEoc4WUXzaYRnRNihvRoGt1BgK7Lkk",
"encoded_length": 8,
"height_created": 9834819,
"height_included": 9834819,
"shard_id": 0,
"gas_used": 0,
"gas_limit": 1000000000000000,
"rent_paid": "0",
"validator_reward": "0",
"balance_burnt": "0",
"outgoing_receipts_root": "H4Rd6SGeEBTbxkitsCdzfu9xL9HtZ2eHoPCQXUeZ6bW4",
"tx_root": "11111111111111111111111111111111",
"validator_proposals": [],
"signature": "ed25519:cKJNznpgy8WPeYNNatirULaesi58njMSti7MBFV8XWYupvS6Cfv4BTqDLvu1wt7JCkRKCUXBdFzGv2KRX6oUNQY"
}]
},
"id": "dontcare"
}