@midnight/zswap v3.0.2 • Readme | API
@midnight/zswap v3.0.2 / TransactionCostModel
Class: TransactionCostModel
Constructors
new TransactionCostModel()
private new TransactionCostModel(): TransactionCostModel
Returns
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
dummyTransactionCostModel()
static dummyTransactionCostModel(): TransactionCostModel
A dummy cost model, for use in testing