Skip to main content

ProofErasedTransaction

For the complete documentation index, see llms.txt

@midnight/zswap v3.0.2 • Readme | API


@midnight/zswap v3.0.2 / ProofErasedTransaction

Class: ProofErasedTransaction

Transaction, with all proof information erased

Primarily for use in testing, or handling data known to be correct from external information

Constructors​

new ProofErasedTransaction()​

private new ProofErasedTransaction(): ProofErasedTransaction

Returns​

ProofErasedTransaction

Properties​

fallibleCoins​

readonly fallibleCoins: undefined | ProofErasedOffer;

The fallible Zswap offer


guaranteedCoins​

readonly guaranteedCoins: undefined | ProofErasedOffer;

The guaranteed Zswap offer


mint​

readonly mint: undefined | ProofErasedAuthorizedMint;

The mint this transaction represents, if applicable

Methods​

fees()​

fees(params): bigint

The cost of this transaction, in the atomic unit of the base token

Parameters​

• params: LedgerParameters

Returns​

bigint


identifiers()​

identifiers(): string[]

Returns the set of identifiers contained within this transaction. Any of these may be used to watch for a specific transaction.

Returns​

string[]


imbalances()​

imbalances(guaranteed, fees?): Map<string, bigint>

For given fees, and a given section (guaranteed/fallible), what the surplus or deficit of this transaction in any token type is.

Parameters​

• guaranteed: boolean

• fees?: bigint

Returns​

Map<string, bigint>


merge()​

merge(other): ProofErasedTransaction

Merges this transaction with another

Parameters​

• other: ProofErasedTransaction

Returns​

ProofErasedTransaction

Throws​

If both transactions have contract interactions, or they spend the same coins


serialize()​

serialize(netid): Uint8Array

Parameters​

• netid: NetworkId

Returns​

Uint8Array


toString()​

toString(compact?): string

Parameters​

• compact?: boolean

Returns​

string


deserialize()​

static deserialize(raw, netid): ProofErasedTransaction

Parameters​

• raw: Uint8Array

• netid: NetworkId

Returns​

ProofErasedTransaction