Skip to main content

@midnight/ledger v3.0.2Readme | API


@midnight/ledger v3.0.2 / encodeCoinInfo

Function: encodeCoinInfo()

encodeCoinInfo(coin): {
color: Uint8Array;
nonce: Uint8Array;
value: bigint;
}

Encode a CoinInfo into a Compact's CoinInfo TypeScript representation

Parameters

coin: CoinInfo

Returns

{
color: Uint8Array;
nonce: Uint8Array;
value: bigint;
}

color

color: Uint8Array;

nonce

nonce: Uint8Array;

value

value: bigint;