Offer
@midnight/zswap / 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
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
Returns
serialize()
serialize(netid): Uint8Array<ArrayBufferLike>
Parameters
netid
Returns
Uint8Array<ArrayBufferLike>
toString()
toString(compact?): string
Parameters
compact?
boolean
Returns
string
deserialize()
static deserialize(raw, netid): Offer
Parameters
raw
Uint8Array<ArrayBufferLike>