Skip to main content

kaia_getBlockByHash RPC Method

Returns information about a block by block hash.

Updated on
Aug 7, 2024

kaia_getBlockByHash RPC Method

Parameters

BlockHash
string
REQUIRED
The Hash of a block
transaction detail flag
boolean
REQUIRED
The method returns the full transaction objects when this value is true otherwise, it returns only the hashes of the transactions

Returns

object
object
A block object, or null when no block was found:
blockScore
string
The score of the block, represented in hexadecimal format
baseFeePerGas
string
(Optional) A string of the base fee encoded in hexadecimal format. Please note that this response field will not be included in a block requested before the EIP-1559 upgrade
extraData
string
The “extra data” field of this block
gasUsed
string
The total used gas by all transactions in this block encoded as a hexadecimal
governanceData
string
Data related to governance, represented as a hexadecimal string
hash
string
The block hash of the requested block. null if pending
logsBloom
string
The bloom filter for the logs of the block. null if pending
number
string
The block number of the requested block encoded as a hexadecimal. null if pending
parentHash
string
The hash of the parent block
receiptsRoot
string
The root of the receipts trie of the block
reward
string
The address of the account that received the block reward
size
string
The size of this block in bytes as an Integer value encoded as hexadecimal
stateRoot
string
The root of the final state trie of the block
timestamp
string
The unix timestamp for when the block was collated
timestampFoS
string
An additional timestamp field, represented in hexadecimal format
totalBlockScore
string
The total score of the blockchain up to and including this block, represented in hexadecimal format
transactions
array
An array of transaction objects
transactionsRoot
string
The root of the transaction trie of the block
voteData
string
The data related to votes, represented as a hexadecimal string
Request
1
curl https://docs-demo.kaia-kairos.quiknode.pro/ \
2
-X POST \
3
-H "Content-Type: application/json" \
4
--data '{
5
"method": "kaia_getBlockByHash",
6
"id": 1,
7
"jsonrpc": "2.0",
8
"params": [
9
"0x1bb0ac2af3f485a81319da9fc3e4f051ec369cdb208c073bb75677d67b585039",
10
true
11
]
12
}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free