Skip to main content
@tevm/voltaire
@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

Since

0.0.0

Properties

body
readonly body: BlockBodyType
Defined in: src/primitives/Block/BlockType.ts:20 Block body (transactions, ommers, withdrawals)
hash
readonly hash: BlockHashType
Defined in: src/primitives/Block/BlockType.ts:22 Block hash (computed from RLP(header))
header
readonly header: BlockHeaderType
Defined in: src/primitives/Block/BlockType.ts:18 Block header (metadata + Merkle roots)
size
readonly size: Type
Defined in: src/primitives/Block/BlockType.ts:24 Block size in bytes (RLP-encoded)
totalDifficulty?
readonly optional totalDifficulty: Type
Defined in: src/primitives/Block/BlockType.ts:26 Total difficulty (cumulative, pre-merge only)

Variables

Block

const Block: object
Defined in: src/primitives/Block/index.ts:22

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(params): BlockType
Defined in: src/primitives/Block/from.js:26 Create Block from components

Parameters

params
Block parameters
body
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

const block = Block.from({
  header: blockHeader,
  body: blockBody,
  hash: "0x1234...",
  size: 1024n,
  totalDifficulty: 12345678n // Optional, pre-merge
});

from()

from(params): BlockType
Defined in: src/primitives/Block/index.ts:11

Parameters

params
body
BlockBodyType
hash
string | BlockHashType
header
BlockHeaderType
size
string | number | bigint
totalDifficulty?
string | number | bigint

Returns

BlockType