FetchZkConfigProvider
Midnight.js API Reference v2.0.2
Midnight.js API Reference / @midnight-ntwrk/midnight-js-fetch-zk-config-provider / FetchZkConfigProvider
Class: FetchZkConfigProvider<K>
Retrieves ZK artifacts from a remote source.
Extendsβ
Type Parametersβ
Kβ
K extends string
Constructorsβ
Constructorβ
new FetchZkConfigProvider<
K>(baseURL,fetchFunc):FetchZkConfigProvider<K>
Parametersβ
baseURLβ
string
The endpoint to query for ZK artifacts.
fetchFuncβ
{(input, init?): Promise<Response>; (input, init?): Promise<Response>; }
The function to use to execute queries.
Returnsβ
FetchZkConfigProvider<K>
Overridesβ
Propertiesβ
baseURLβ
readonlybaseURL:string
The endpoint to query for ZK artifacts.
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>>
Inherited fromβ
getProverKey()β
getProverKey(
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>
Overridesβ
getVerifierKey()β
getVerifierKey(
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>
Overridesβ
ZKConfigProvider.getVerifierKey
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][]>
Inherited fromβ
ZKConfigProvider.getVerifierKeys
getZKIR()β
getZKIR(
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>