Skip to main content

UnprovenOutput

For the complete documentation index, see llms.txt

@midnight/zswap v4.0.0-rc


@midnight/zswap / UnprovenOutput

Class: UnprovenOutput

증명되기 전의 Output입니다.

이 단계에서 출력의 모든 "차폐" 정보를 추출할 수 있습니다. stage!

Properties​

commitment​

readonly commitment: string;

출력의 커밋먼트입니다.


contractAddress​

readonly contractAddress: undefined | string;

수신자가 컨트랙트인 경우 출력을 수신하는 컨트랙트 주소입니다.

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): UnprovenOutput

Parameters​

raw​

Uint8Array<ArrayBufferLike>

netid​

NetworkId

Returns​

UnprovenOutput


new()​

static new(
coin,
segment,
target_cpk,
target_epk): UnprovenOutput

사용자의 코인 공개 키를 대상으로 새 출력을 생성합니다.

선택적으로 사용자의 암호화 공개 키로 암호화된 암호문을 포함합니다. encryption public key, which may be omitted only if the CoinInfo is transferred to the recipient another way

Parameters​

coin​

CoinInfo

segment​

number

target_cpk​

string

target_epk​

string

Returns​

UnprovenOutput


newContractOwned()​

static newContractOwned(
coin,
segment,
contract): UnprovenOutput

스마트 컨트랙트를 대상으로 새 출력을 생성합니다.

A contract must also explicitly receive a coin created in this way for the output to be valid

Parameters​

coin​

CoinInfo

segment​

number

contract​

string

Returns​

UnprovenOutput