Skip to main content

ZswapOffer

For the complete documentation index, see llms.txt

@midnight/ledger v8.0.3


@midnight/ledger / ZswapOffer

Class: ZswapOffer<P>

트랜잭션의 Zswap 부분인 완전한 Zswap 오퍼입니다.

ZswapInput, ZswapOutput, ZswapTransient 집합과 트랜잭션 값의 deltas 벡터로 구성됩니다.

Type Parameters

P

P extends Proofish

Properties

deltas

readonly deltas: Map<string, bigint>;

각 토큰 유형별 이 오퍼의 값입니다. 음수일 수 있습니다.

값 벡터에서 입력 코인 값 - 출력 코인 값입니다.


inputs

readonly inputs: ZswapInput<P>[];

이 오퍼를 구성하는 입력입니다.


outputs

readonly outputs: ZswapOutput<P>[];

이 오퍼를 구성하는 출력입니다.


transients

readonly transients: ZswapTransient<P>[];

이 오퍼를 구성하는 트랜지언트입니다.

Methods

merge()

merge(other): ZswapOffer<P>;

이 오퍼를 다른 오퍼와 결합합니다.

Parameters

other

ZswapOffer<P>

Returns

ZswapOffer<P>


serialize()

serialize(): Uint8Array;

Returns

Uint8Array


toString()

toString(compact?): string;

Parameters

compact?

boolean

Returns

string


deserialize()

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

Type Parameters

P

P extends Proofish

Parameters

markerP

P["instance"]

raw

Uint8Array

Returns

ZswapOffer<P>


fromInput()

static fromInput<P>(
input,
type_?,
value?): ZswapOffer<P>;

Creates a singleton offer, from an ZswapInput and its value vector

The type_ and value parameters are deprecated and will be ignored.

Type Parameters

P

P extends Proofish

Parameters

input

ZswapInput<P>

type_?

string

value?

bigint

Returns

ZswapOffer<P>


fromOutput()

static fromOutput<P>(
output,
type_?,
value?): ZswapOffer<P>;

Creates a singleton offer, from an ZswapOutput and its value vector

The type_ and value parameters are deprecated and will be ignored.

Type Parameters

P

P extends Proofish

Parameters

output

ZswapOutput<P>

type_?

string

value?

bigint

Returns

ZswapOffer<P>


fromTransient()

static fromTransient<P>(transient): ZswapOffer<P>;

Creates a singleton offer, from a ZswapTransient

Type Parameters

P

P extends Proofish

Parameters

transient

ZswapTransient<P>

Returns

ZswapOffer<P>