ProofErasedTransaction
@midnight-ntwrk/ledger v3.0.2 β’ Readme | API
@midnight-ntwrk/ledger 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β
Propertiesβ
contractCallsβ
readonly contractCalls: ContractAction[];
The contract interactions contained in this transaction
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β
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
wellFormed()β
wellFormed(ref_state, strictness): void
Tests well-formedness criteria, optionally including transaction balancing
For obvious reasons, doesn't check proofs
Parametersβ
β’ ref_state: LedgerState
β’ strictness: WellFormedStrictness
Returnsβ
void
Throwsβ
If the transaction is not well-formed for any reason
deserialize()β
static deserialize(raw, netid): ProofErasedTransaction
Parametersβ
β’ raw: Uint8Array
β’ netid: NetworkId