@midnight/zswap v3.0.2 • Readme | API
@midnight/zswap v3.0.2 / 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: UnprovenOffer
Returns
serialize()
serialize(netid): Uint8Array
Parameters
• netid: NetworkId
Returns
Uint8Array
toString()
toString(compact?): string
Parameters
• compact?: boolean
Returns
string
deserialize()
static deserialize(raw, netid): UnprovenOffer
Parameters
• raw: Uint8Array
• netid: NetworkId
Returns
fromInput()
static fromInput(
input,
type_,
value): UnprovenOffer
Creates a singleton offer, from an UnprovenInput and its value vector
Parameters
• input: UnprovenInput
• 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: UnprovenOutput
• type_: string
• value: bigint
Returns
fromTransient()
static fromTransient(transient): UnprovenOffer
Creates a singleton offer, from an UnprovenTransient
Parameters
• transient: UnprovenTransient