@tevm/voltaire / primitives/ChainHead
primitives/ChainHead
Type Aliases
ChainHeadType
ChainHeadType = object
Defined in: src/primitives/ChainHead/ChainHeadType.ts:22
Current chain head information
Represents the latest block at the tip of the blockchain.
Typically obtained from eth_getBlockByNumber(“latest”).
Example
Properties
difficulty?
Defined in: src/primitives/ChainHead/ChainHeadType.ts:41 Block difficulty (0 post-merge)readonlyoptionaldifficulty:Type
hash
Defined in: src/primitives/ChainHead/ChainHeadType.ts:31 Block hashreadonlyhash:BlockHashType
number
Defined in: src/primitives/ChainHead/ChainHeadType.ts:26 Block numberreadonlynumber:BlockNumberType
timestamp
Defined in: src/primitives/ChainHead/ChainHeadType.ts:36 Block timestamp (Unix seconds)readonlytimestamp:Type
totalDifficulty?
Defined in: src/primitives/ChainHead/ChainHeadType.ts:46 Total difficulty from genesis to this blockreadonlyoptionaltotalDifficulty:Type
Variables
ChainHead
Defined in: src/primitives/ChainHead/index.ts:9constChainHead:object
Type Declaration
from()
from: (Create ChainHead from block data or RPC responsevalue) =>ChainHeadType=_from
Parameters
value
Chain head datadifficulty?
string | number | bigint
hash
string | BlockHashType
number
string | number | bigint
timestamp
string | number | bigint
totalDifficulty?
string | number | bigint
Returns
ChainHeadType
ChainHead
Example
Functions
from()
from(Defined in: src/primitives/ChainHead/from.js:16 Create ChainHead from block data or RPC responsevalue):ChainHeadType
Parameters
value
Chain head datadifficulty?
string | number | bigint
hash
string | BlockHashType
number
string | number | bigint
timestamp
string | number | bigint
totalDifficulty?
string | number | bigint
Returns
ChainHeadType
ChainHead

