kaia_getBlockByHash

The eth_getBlockByHash method returns information about a block by block hash on the Kaia network. This method retrieves detailed block data including transactions, gas used, timestamp, and other metadata.


You can choose to receive full transaction objects or just transaction hashes, making it flexible for different use cases from block explorers to lightweight blockchain monitoring applications. Developers use this to analyze specific blocks, extract transaction data, verify block contents, and build blockchain analytics. Unlike eth_getBlockByNumber, this method uses the immutable block hash, making it reliable for referencing specific blocks even after chain reorganizations.

Parameters

parameter
type
description
blockHash
string (required)
Hash of the block (32-byte hex string with 0x prefix)
fullTransactions
boolean (required)
If true, returns full transaction objects with all fields; if false, returns only an array of transaction hashes for better performance
Return Object

The method returns a block object, or null if the block is not found:

field
type
description
number
string
The block number encoded as hexadecimal
hash
string
Hash of the block (32 bytes)
parentHash
string
Hash of the parent block (32 bytes)
nonce
string
Hash of the generated proof-of-work (8 bytes)
sha3Uncles
string
SHA3 of the uncles data in the block (32 bytes)
logsBloom
string
The bloom filter for the logs of the block (256 bytes)
transactionsRoot
string
The root of the transaction trie of the block (32 bytes)
stateRoot
string
The root of the final state trie of the block (32 bytes)
receiptsRoot
string
The root of the receipts trie of the block (32 bytes)
miner
string
The address of the beneficiary to whom the block rewards were given (20 bytes)
difficulty
string
Integer of the difficulty for this block (hex)
totalDifficulty
string
Integer of the total difficulty of the chain until this block (hex)
extraData
string
The extra data field of this block (max 32 bytes)
size
string
The size of this block in bytes (hex)
gasLimit
string
The maximum gas allowed in this block (hex)
gasUsed
string
The total gas used by all transactions in this block (hex)
timestamp
string
The unix timestamp for when the block was collated (hex)
transactions
array
Array of transaction objects (if fullTransactions=true) or array of transaction hashes (if fullTransactions=false)
uncles
array
Array of uncle hashes (32 bytes each)
baseFeePerGas
string
The base fee per gas for this block (hex)
Request Example
Request
Response Example
Response

Share on
Share on FacebookShare on XShare on LinkedIn
Did you find this page useful?