Skip to main content

@midnight/zswap v0.3.11Readme | API


@midnight/zswap v0.3.11 / UnprovenTransient

Class: UnprovenTransient

A Transient, before being proven

All "shielded" information in the transient can still be extracted at this stage!

Constructors

new UnprovenTransient()

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(): Uint8Array

Returns

Uint8Array


toString()

toString(compact?): string

Parameters

compact?: boolean

Returns

string


deserialize()

static deserialize(raw): UnprovenTransient

Parameters

raw: Uint8Array

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