UnprovenOutput
@midnight-ntwrk/ledger v3.0.2 β’ Readme | API
@midnight-ntwrk/ledger v3.0.2 / UnprovenOutput
Class: UnprovenOutput
An Output before being proven
All "shielded" information in the output can still be extracted at this stage!
Constructorsβ
new UnprovenOutput()β
private new UnprovenOutput(): UnprovenOutput
Returnsβ
Propertiesβ
commitmentβ
readonly commitment: string;
The commitment of the output
contractAddressβ
readonly contractAddress: undefined | string;
The contract address receiving the output, if the recipient is a contract
Methodsβ
serialize()β
serialize(netid): Uint8Array
Parametersβ
β’ netid: NetworkId
Returnsβ
Uint8Array
toString()β
toString(compact?): string
Parametersβ
β’ compact?: boolean
Returnsβ
string
deserialize()β
static deserialize(raw, netid): UnprovenOutput
Parametersβ
β’ raw: Uint8Array
β’ netid: NetworkId
Returnsβ
new()β
static new(
coin,
target_cpk,
target_epk?): UnprovenOutput
Creates a new output, targeted to a user's coin public key.
Optionally the output contains a ciphertext encrypted to the user's encryption public key, which may be omitted only if the CoinInfo is transferred to the recipient another way
Parametersβ
β’ coin: CoinInfo
β’ target_cpk: string
β’ target_epk?: string
Returnsβ
newContractOwned()β
static newContractOwned(coin, contract): UnprovenOutput
Creates a new output, targeted to a smart contract
A contract must also explicitly receive a coin created in this way for the output to be valid
Parametersβ
β’ coin: CoinInfo
β’ contract: string