Skip to main content

UnprovenTransient

@midnight/zswap v4.0.0-rc


@midnight/zswap / UnprovenTransient

Class: UnprovenTransient

A Transient, before being proven

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

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<ArrayBufferLike>

Parameters

netid

NetworkId

Returns

Uint8Array<ArrayBufferLike>


toString()

toString(compact?): string

Parameters

compact?

boolean

Returns

string


deserialize()

static deserialize(raw, netid): UnprovenTransient

Parameters

raw

Uint8Array<ArrayBufferLike>

netid

NetworkId

Returns

UnprovenTransient


newFromContractOwnedOutput()

static newFromContractOwnedOutput(
coin,
segment,
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

segment

number

output

UnprovenOutput

Returns

UnprovenTransient