Skip to main content

@midnight/ledger v3.0.2Readme | API


@midnight/ledger v3.0.2 / TransactionContext

Class: TransactionContext

The context against which a transaction is run.

Constructors

new TransactionContext(ref_state, block_context, whitelist)

new TransactionContext(
ref_state,
block_context,
whitelist?): TransactionContext

Parameters

ref_state: LedgerState

A past ledger state that is used as a reference point for 'static' data.

block_context: BlockContext

Information about the block this transaction is, or will be, contained in.

whitelist?: Set<string>

A list of contracts that are being tracked, or undefined to track all contracts.

Returns

TransactionContext

Methods

toString()

toString(compact?): string

Parameters

compact?: boolean

Returns

string