Skip to main content

ZswapInput

For the complete documentation index, see llms.txt

@midnight/ledger v8.0.3


@midnight/ledger / ZswapInput

Class: ZswapInput<P>

A shielded transaction input

Type Parameters​

P​

P extends Proofish

Properties​

contractAddress​

readonly contractAddress: undefined | string;

The contract address receiving the input, if the sender is a contract


nullifier​

readonly nullifier: string;

The nullifier of the input


proof​

readonly proof: P;

The proof of this input

Methods​

serialize()​

serialize(): Uint8Array;

Returns​

Uint8Array


toString()​

toString(compact?): string;

Parameters​

compact?​

boolean

Returns​

string


deserialize()​

static deserialize<P>(markerP, raw): ZswapInput<P>;

Type Parameters​

P​

P extends Proofish

Parameters​

markerP​

P["instance"]

raw​

Uint8Array

Returns​

ZswapInput<P>


newContractOwned()​

static newContractOwned(
coin,
segment,
contract,
state): UnprovenInput;

Parameters​

coin​

QualifiedShieldedCoinInfo

segment​

undefined | number

contract​

string

state​

ZswapChainState

Returns​

UnprovenInput