debug_getRawHeader - Robinhood
debug_getRawHeader. Returns the RLP-encoded raw block header.
debug_getRawHeader - robinhood [Value: 20CU]
Returns the RLP-encoded bytes of a block header, exactly as stored by the node
Use cases
- Verify a block hash independently by re-hashing the raw header bytes
- Support light-client or header-only sync tooling
- Feed raw header bytes into custom cross-client verification pipelines
Constraints
- Requires an archive node for blocks other than recent ones
- Returns raw bytes, not a decoded header object
Unlock Access to 100+ chains
Boost your app's speed and reliability with dRPC - get your access API key
Language
Request
Examples
curl https://lb.drpc.live/robinhood/{API-KEY} \
-X POST \
-H "Content-Type: application/json" \
-d '{"method":"debug_getRawHeader",
"params":["latest"],
"id":1,
"jsonrpc":"2.0"}'
Response
200
{
"jsonrpc": "2.0",
"id": 1,
"result": "0xf90236a09f73691f6dabca4f0a99b05d0a701995506aa311dcaa9ce9833d6f4ca474c162a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d493479..."
}Request params
idinteger
jsonrpcstring
methodstring
array
blockNumberstring
Block number in hex, or a block tag, to fetch the raw header for.
- latest [default] - The most recent block in the blockchain (default).
- earliest - The first block, also known as the genesis block.
- pending - Transactions that have been broadcast but not yet included in a block.
Response
200
The RLP-encoded block header, as a hexadecimal stringResponse params
object
idinteger
jsonrpcstring
resultstring
The RLP-encoded header as a hexadecimal string.