UnprovenTransaction
@midnight/zswap v3.0.2 β’ Readme | API
@midnight/zswap v3.0.2 / UnprovenTransaction
Class: UnprovenTransaction
Transaction, prior to being proven
All "shielded" information in the transaction can still be extracted at this stage!
Constructorsβ
new UnprovenTransaction(guaranteed, fallible)β
new UnprovenTransaction(guaranteed, fallible?): UnprovenTransaction
Creates the transaction from guaranteed/fallible UnprovenOffers
Parametersβ
β’ guaranteed: UnprovenOffer
β’ fallible?: UnprovenOffer
Returnsβ
Propertiesβ
fallibleCoinsβ
readonly fallibleCoins: undefined | UnprovenOffer;
The fallible Zswap offer
guaranteedCoinsβ
readonly guaranteedCoins: undefined | UnprovenOffer;
The guaranteed Zswap offer
mintβ
readonly mint: undefined | UnprovenAuthorizedMint;
The mint this transaction represents, if applicable
Methodsβ
eraseProofs()β
eraseProofs(): ProofErasedTransaction
Erases the proofs contained in this transaction
Returnsβ
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[]
merge()β
merge(other): UnprovenTransaction
Merges this transaction with another
Parametersβ
β’ other: UnprovenTransaction
Returnsβ
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): UnprovenTransaction
Parametersβ
β’ raw: Uint8Array
β’ netid: NetworkId
Returnsβ
fromMint()β
static fromMint(mint): UnprovenTransaction
Creates a minting claim transaction, the funds claimed must have been legitimately minted previously.
Parametersβ
β’ mint: UnprovenAuthorizedMint