Overview
BlockHash is a brandedUint8Array type representing a 32-byte block identifier in Ethereum. Every block has a unique hash computed from its header.
Type Definition
Creating BlockHashes
from
Universal constructor accepting hex string or bytes.fromHex
Parse from hex string (with or without 0x prefix).fromBytes
Create fromUint8Array.
Converting BlockHashes
toHex
Convert to lowercase hex string with 0x prefix.Comparing BlockHashes
equals
Check equality using constant-time byte comparison.Errors
InvalidBlockHashLengthError: Bytes length is not 32. InvalidBlockHashFormatError: Invalid hex format or unsupported type.See Also
- BlockNumber - Block height
- TransactionHash - Transaction identifier
- Receipt - Transaction receipts

