UnprovenTransaction
@midnight-ntwrk/ledger v3.0.2 β’ Readme | API
@midnight-ntwrk/ledger 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, calls)β
new UnprovenTransaction(
guaranteed,
fallible?,
calls?): UnprovenTransaction
Creates the transaction from guaranteed/fallible UnprovenOffers, and a ContractCallsPrototype.
Parametersβ
β’ guaranteed: UnprovenOffer
β’ fallible?: UnprovenOffer
β’ calls?: ContractCallsPrototype
Returnsβ
Propertiesβ
contractCallsβ
readonly contractCalls: ContractAction[];
The contract interactions contained in this transaction
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[]
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): 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