Skip to main content

TransactionCostModel

@midnight-ntwrk/ledger v3.0.2 β€’ Readme | API


@midnight-ntwrk/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