Skip to main content

ContractOperation

@midnight-ntwrk/onchain-runtime v0.2.2 β€’ Readme | API


@midnight-ntwrk/onchain-runtime v0.2.2 / ContractOperation

Class: ContractOperation

An individual operation, or entry point of a contract, consisting primarily of a ZK verifier keys, potentially for different versions of the proving system.

Only the latest available version is exposed to this API.

Note that the serialized form of the key is checked on initialization

Constructors​

new ContractOperation()​

new ContractOperation(): ContractOperation

Returns​

ContractOperation

Properties​

verifierKey​

verifierKey: Uint8Array;

Methods​

serialize()​

serialize(networkid): Uint8Array

Parameters​

β€’ networkid: NetworkId

Returns​

Uint8Array


toString()​

toString(compact?): string

Parameters​

β€’ compact?: boolean

Returns​

string


deserialize()​

static deserialize(raw, networkid): ContractOperation

Parameters​

β€’ raw: Uint8Array

β€’ networkid: NetworkId

Returns​

ContractOperation