Skip to main content

UnprovenTransient

@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​

UnprovenTransient

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​

UnprovenTransient


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

Returns​

UnprovenTransient