Returns the block header information for a given block number. This method provides header data without the transaction list, offering a lightweight way to access block metadata.
eth_getHeaderByNumber JSON-RPC method returns the block header information for a given block number. This method provides header data without the transaction list, offering a lightweight way to access block metadata and is more efficient than fetching the full block when only header information is needed.
null if the block doesn’t exist.
hash — The block hashparentHash — Hash of the parent blocknumber — The block numbertimestamp — The unix timestamp when the block was collatedgasLimit — The maximum gas allowed in this blockgasUsed — The total gas used by all transactions in this blockdifficulty — The difficulty for this blocktotalDifficulty — The total difficulty of the chain until this blockminer — The address of the beneficiary to whom the mining rewards were givennonce — The nonce used to generate this blocksha3Uncles — SHA3 of the uncles data in the blocklogsBloom — The bloom filter for the logs of the blocktransactionsRoot — The root of the transaction trie of the blockstateRoot — The root of the final state trie of the blockreceiptsRoot — The root of the receipts trie of the block"latest" — The most recent block in the chain"earliest" — The genesis block (block 0)"pending" — The pending state/transactionseth_getHeaderByNumber method is useful for applications that need to: