Skip to main content

LedgerParameters

For the complete documentation index, see llms.txt

@midnight/ledger v8.0.3


@midnight/ledger / LedgerParameters

Class: LedgerParameters

Parameters used by the Midnight ledger, including transaction fees and bounds

Properties​

dust​

readonly dust: DustParameters;

The parameters associated with DUST.


feePrices​

readonly feePrices: FeePrices;

The fee prices for transaction


transactionCostModel​

readonly transactionCostModel: TransactionCostModel;

The cost model used for transaction fees contained in these parameters

Methods​

maxPriceAdjustment()​

maxPriceAdjustment(): number;

The maximum price adjustment per block with the current parameters, as a multiplicative factor (that is: 1.1 would indicate a 10% adjustment). Will always return the positive (>1) adjustment factor. Note that negative adjustments are the additive inverse (1.1 has a corresponding 0.9 downward adjustment), not the multiplicative as might reasonably be assumed.

Returns​

number


normalizeFullness()​

normalizeFullness(fullness): NormalizedCost;

Normalizes a detailed block fullness cost to the block limits.

Parameters​

fullness​

SyntheticCost

Returns​

NormalizedCost

Throws​

if any of the block limits is exceeded


serialize()​

serialize(): Uint8Array;

Returns​

Uint8Array


toString()​

toString(compact?): string;

Parameters​

compact?​

boolean

Returns​

string


deserialize()​

static deserialize(raw): LedgerParameters;

Parameters​

raw​

Uint8Array

Returns​

LedgerParameters


initialParameters()​

static initialParameters(): LedgerParameters;

The initial parameters of Midnight

Returns​

LedgerParameters