Skip to main content

BlockContext

For the complete documentation index, see llms.txt

@midnight-ntwrk/ledger v3.0.2 • Readme | API


@midnight-ntwrk/ledger v3.0.2 / BlockContext

Type alias: BlockContext

type BlockContext: {
blockHash: string;
secondsSinceEpoch: bigint;
secondsSinceEpochErr: number;
};

The context information about a block available inside the VM

Type declaration​

blockHash​

blockHash: string;

The hash of the block prior to this transaction, as a hex-encoded string

secondsSinceEpoch​

secondsSinceEpoch: bigint;

The seconds since the UNIX epoch that have elapsed

secondsSinceEpochErr​

secondsSinceEpochErr: number;

The maximum error on secondsSinceEpoch that should occur, as a positive seconds value