ZKConfigProvider
Midnight.js API Reference v2.0.2
Midnight.js API Reference / @midnight-ntwrk/midnight-js-types / ZKConfigProvider
Class: abstract ZKConfigProvider<K>
A provider for zero-knowledge intermediate representations, prover keys, and verifier keys. All three are used by the ProofProvider to create a proof for a call transaction. The implementation of this provider depends on the runtime environment, since each environment has different conventions for accessing static artifacts.
Extended by
Type Parameters
K
K extends string
The type of the circuit ID used by the provider.
Constructors
Constructor
new ZKConfigProvider<
K>():ZKConfigProvider<K>
Returns
ZKConfigProvider<K>
Methods
get()
get(
circuitId):Promise<ZKConfig<K>>
Retrieves all zero-knowledge artifacts produced by compactc for the given circuit.
Parameters
circuitId
K
The circuit ID of the artifacts to retrieve.
Returns
Promise<ZKConfig<K>>
getProverKey()
abstractgetProverKey(circuitId):Promise<ProverKey>
Retrieves the prover key produced by compactc for the given circuit.
Parameters
circuitId
K
The circuit ID of the prover key to retrieve.
Returns
Promise<ProverKey>
getVerifierKey()
abstractgetVerifierKey(circuitId):Promise<VerifierKey>
Retrieves the verifier key produced by compactc for the given circuit.
Parameters
circuitId
K
The circuit ID of the verifier key to retrieve.
Returns
Promise<VerifierKey>
getVerifierKeys()
getVerifierKeys(
circuitIds):Promise<[K,VerifierKey][]>
Retrieves the verifier keys produced by compactc for the given circuits.
Parameters
circuitIds
K[]
The circuit IDs of the verifier keys to retrieve.
Returns
Promise<[K, VerifierKey][]>
getZKIR()
abstractgetZKIR(circuitId):Promise<ZKIR>
Retrieves the zero-knowledge intermediate representation produced by compactc for the given circuit.
Parameters
circuitId
K
The circuit ID of the ZKIR to retrieve.
Returns
Promise<ZKIR>