chain_get_state_root_hash

This method returns a state root hash at a given Block. If you do not specify a block_identifier, you will receive the highest state root hash.

This method will use 10 Compute Units.


Reference: Here

Parameters

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

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "chain_get_state_root_hash",
  "params": [
    {
      "Height": 10
    }
  ]
}

Returns

  • api_version - string RPC API version

  • state_root_hash - string hex-encoded hash digest

{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "api_version": "1.4.13",
    "state_root_hash": "0808080808080808080808080808080808080808080808080808080808080808"
  }
}
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_state_root_hash","params":[]}'

Last updated