Skip to main content

@midnight/ledger v3.0.2Readme | API


@midnight/ledger v3.0.2 / TransactionCostModel

Class: TransactionCostModel

Constructors

new TransactionCostModel()

private new TransactionCostModel(): TransactionCostModel

Returns

TransactionCostModel

Properties

inputFeeOverhead

readonly inputFeeOverhead: bigint;

The increase in fees to expect from adding a new input to a transaction


outputFeeOverhead

readonly outputFeeOverhead: bigint;

The increase in fees to expect from adding a new output to a transaction

Methods

serialize()

serialize(netid): Uint8Array

Parameters

netid: NetworkId

Returns

Uint8Array


toString()

toString(compact?): string

Parameters

compact?: boolean

Returns

string


deserialize()

static deserialize(raw, netid): TransactionCostModel

Parameters

raw: Uint8Array

netid: NetworkId

Returns

TransactionCostModel


dummyTransactionCostModel()

static dummyTransactionCostModel(): TransactionCostModel

A dummy cost model, for use in testing

Returns

TransactionCostModel