UnprovenOffer
@midnight/zswap / UnprovenOffer
Class: UnprovenOffer
A Offer, prior to being proven
All "shielded" information in the offer can still be extracted at this stage!
Constructors
new UnprovenOffer()
new UnprovenOffer(): UnprovenOffer
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: UnprovenInput[];
The inputs this offer is composed of
outputs
readonly outputs: UnprovenOutput[];
The outputs this offer is composed of
transient
readonly transient: UnprovenTransient[];
The transients this offer is composed of
Methods
merge()
merge(other): UnprovenOffer
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): UnprovenOffer
Parameters
raw
Uint8Array<ArrayBufferLike>
netid
Returns
fromInput()
static fromInput(
input,
type_,
value): UnprovenOffer
Creates a singleton offer, from an UnprovenInput and its value vector
Parameters
input
type_
string
value
bigint
Returns
fromOutput()
static fromOutput(
output,
type_,
value): UnprovenOffer
Creates a singleton offer, from an UnprovenOutput and its value vector
Parameters
output
type_
string
value
bigint
Returns
fromTransient()
static fromTransient(transient): UnprovenOffer
Creates a singleton offer, from an UnprovenTransient