@tevm/voltaire / primitives/Block
primitives/Block
Type Aliases
BlockType
BlockType = object
Defined in: src/primitives/Block/BlockType.ts:16
Block type - represents complete Ethereum block
Full block with header, body, and computed metadata.
Used for block validation, storage, and propagation.
See
- https://voltaire.tevm.sh/primitives/block for Block documentation
- https://ethereum.org/en/developers/docs/blocks/ for block documentation
Since
0.0.0Properties
body
Defined in: src/primitives/Block/BlockType.ts:20 Block body (transactions, ommers, withdrawals)readonlybody:BlockBodyType
hash
Defined in: src/primitives/Block/BlockType.ts:22 Block hash (computed from RLP(header))readonlyhash:BlockHashType
header
Defined in: src/primitives/Block/BlockType.ts:18 Block header (metadata + Merkle roots)readonlyheader:BlockHeaderType
size
Defined in: src/primitives/Block/BlockType.ts:24 Block size in bytes (RLP-encoded)readonlysize:Type
totalDifficulty?
Defined in: src/primitives/Block/BlockType.ts:26 Total difficulty (cumulative, pre-merge only)readonlyoptionaltotalDifficulty:Type
Variables
Block
Defined in: src/primitives/Block/index.ts:22constBlock:object
Type Declaration
from()
from: (params) =>BlockType
Parameters
params
body
BlockBodyType
hash
string | BlockHashType
header
BlockHeaderType
size
string | number | bigint
totalDifficulty?
string | number | bigint
Returns
BlockType
Functions
_from()
_from(Defined in: src/primitives/Block/from.js:26 Create Block from componentsparams):BlockType
Parameters
params
Block parametersbody
BlockBodyType
Block body
hash
string | BlockHashType
Block hash
header
BlockHeaderType
Block header
size
string | number | bigint
Block size in bytes
totalDifficulty?
string | number | bigint
Total difficulty (optional, pre-merge)
Returns
BlockType
Block
Example
from()
from(Defined in: src/primitives/Block/index.ts:11params):BlockType
Parameters
params
body
BlockBodyType
hash
string | BlockHashType
header
BlockHeaderType
size
string | number | bigint
totalDifficulty?
string | number | bigint
Returns
BlockType
