chain_get_block

This method returns the JSON representation of a Block from the network.

Reference: Here

Parameters:

  1. block_identifier - object the block identifier hash or height [BlockIdentifier]

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "chain_get_block",
  "params": [
    {
      "Hash": "13c2d7a68ecdd4b74bf4393c88915c836c863fc4bf11d7f2bd930a1bbccacdcb"
    }
  ]
}

Returned Value:

  • api_version - string RPC API version

  • block - JSON representation of a block [reference]

    • body

      • deploy_hashes - list of hex-encoded Hashes

      • proposer - string hex-encoded public key including algorithm tag prefix

      • transfer_hashes - list of hex-encoded Hashes

    • hash - string hash of the block

    • header

      • accumulated_seed - string accumulated seed hash digest

      • body_hash - string body hash digest

      • era_end - integer EraID

      • era_id - integer EraID

      • height - integer block height

      • parent_hash - string hash of the parent block

      • protocol_version - string Casper Platform protocol version

      • random_bit - boolean randomness bit

      • state_root_hash - string the state root hash digest

      • timestamp - string RFC 3339 timestamp

    • proofs - list of proofs

      • public_key - string hex-encoded public key including algorithm tag prefix

      • signature - string hex-encoded cryptographic signature, including the algorithm tag prefix

{
  "jsonrpc": "2.0",
  "result": {
    "api_version": "1.4.13",
    "block": {
      "body": {
        "deploy_hashes": [],
        "proposer": "01faa681d910a8ac877b81537d75db42395b9da0da1a3457d223151305f803da0e",
        "transfer_hashes": []
      },
      "hash": "cf167b0dca994533f1f2114951742662322cf97bdfc5a76e21263de0c7efd69d",
      "header": {
        "accumulated_seed": "9e6af2e7ccca84fc4398667648ab7705d6775d3f522556d819e13e405b7bd942",
        "body_hash": "55e2b72a8dea0c7f1f6a250efc390f161b76d4b3f516ff1ac43eb9bbc9b5008c",
        "era_end": null,
        "era_id": 9225,
        "height": 1724557,
        "parent_hash": "ee03e7efaa62f5b457d2843a69d78e31d959dd9f92f8ac92bcc44bf95ef800fd",
        "protocol_version": "1.4.13",
        "random_bit": true,
        "state_root_hash": "2525ea9a8f224f0456af95e3b53c0cb7d2b1261fdd89d1f24dd59d5f5098cf29",
        "timestamp": "2023-05-10T18:02:16.960Z"
      },
      "proofs": [
        {
          "public_key": "01000e6fce753895c0d08d5d6af62db4e9b0d070f10e69e2c6badf977b29bbeeee",
          "signature": "016ff83ebf327811c2a2243a7ace953eb6cb23aaabbdfe92148ec1864747886762647365b3c48cb395aca712704717177f3da79eb6e51cb7dd93a41c7f31620603"
        }
      ]
    }
  },
  "id": 1
}
curl https://mainnet.casper.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"id":1,"jsonrpc":"2.0","method":"chain_get_block","params":[]}'

Last updated