Offer
@midnight/zswap v3.0.2 β’ Readme | API
@midnight/zswap v3.0.2 / Offer
Class: Offer
A full Zswap offer; the zswap part of a transaction
Consists of sets of Inputs, Outputs, and Transients, as well as a deltas vector of the transaction value
Constructorsβ
new Offer()β
private new Offer(): Offer
Returnsβ
Propertiesβ
deltasβ
readonly deltas: Map<string, bigint>;
The value of this offer for each token type; note that this may be negative
This is input coin values - output coin values, for value vectors
inputsβ
readonly inputs: Input[];
The inputs this offer is composed of
outputsβ
readonly outputs: Output[];
The outputs this offer is composed of
transientβ
readonly transient: Transient[];
The transients this offer is composed of
Methodsβ
merge()β
merge(other): Offer
Combine this offer with another
Parametersβ
β’ other: Offer
Returnsβ
serialize()β
serialize(netid): Uint8Array
Parametersβ
β’ netid: NetworkId
Returnsβ
Uint8Array
toString()β
toString(compact?): string
Parametersβ
β’ compact?: boolean
Returnsβ
string
deserialize()β
static deserialize(raw, netid): Offer
Parametersβ
β’ raw: Uint8Array
β’ netid: NetworkId