UnprovenInput
@midnight/zswap v3.0.2 β’ Readme | API
@midnight/zswap v3.0.2 / UnprovenInput
Class: UnprovenInput
A Input, before being proven
All "shielded" information in the input can still be extracted at this stage!
Constructorsβ
new UnprovenInput()β
private new UnprovenInput(): UnprovenInput
Returnsβ
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
Methodsβ
serialize()β
serialize(netid): Uint8Array
Parametersβ
β’ netid: NetworkId
Returnsβ
Uint8Array
toString()β
toString(compact?): string
Parametersβ
β’ compact?: boolean
Returnsβ
string
deserialize()β
static deserialize(raw, netid): UnprovenInput
Parametersβ
β’ raw: Uint8Array
β’ netid: NetworkId
Returnsβ
newContractOwned()β
static newContractOwned(
coin,
contract,
state): UnprovenInput
Creates a new input, spending a specific coin from a smart contract, against a state which contains this coin.
Note that inputs created in this way also need to be authorized by the contract
Parametersβ
β’ coin: QualifiedCoinInfo
β’ contract: string
β’ state: ZswapChainState