@midnight/zswap v3.0.2 • Readme | API
@midnight/zswap v3.0.2 / UnprovenTransient
Class: UnprovenTransient
A Transient, before being proven
All "shielded" information in the transient can still be extracted at this stage!
Constructors
new UnprovenTransient()
private new UnprovenTransient(): UnprovenTransient
Returns
Properties
commitment
readonly commitment: string;
The commitment of the transient
contractAddress
readonly contractAddress: undefined | string;
The contract address creating the transient, if applicable
nullifier
readonly nullifier: string;
The nullifier of the transient
Methods
serialize()
serialize(netid): Uint8Array
Parameters
• netid: NetworkId
Returns
Uint8Array
toString()
toString(compact?): string
Parameters
• compact?: boolean
Returns
string
deserialize()
static deserialize(raw, netid): UnprovenTransient
Parameters
• raw: Uint8Array
• netid: NetworkId
Returns
newFromContractOwnedOutput()
static newFromContractOwnedOutput(coin, output): UnprovenTransient
Creates a new contract-owned transient, from a given output and its coin.
The QualifiedCoinInfo should have an mt_index
of 0
Parameters
• coin: QualifiedCoinInfo
• output: UnprovenOutput