@midnight-ntwrk/midnight-js-node-zk-config-provider v0.2.5 • API
Midnight.js API Reference v0.2.5 / @midnight-ntwrk/midnight-js-node-zk-config-provider / NodeZkConfigProvider
Class: NodeZkConfigProvider<K>
Implementation of ZKConfigProvider that reads the keys and zkIR from the local filesystem.
Extends
Type parameters
• K extends string
The type of the circuit ID used by the provider.
Constructors
new NodeZkConfigProvider(directory)
new NodeZkConfigProvider<
K
>(directory
):NodeZkConfigProvider
<K
>
Parameters
• directory: string
The path to the base directory containing the key and ZKIR subdirectories.
Returns
Overrides
Properties
directory
readonly
directory:string
The path to the base directory containing the key and ZKIR subdirectories.
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
>
Parameters
• circuitId: K
Returns
Promise
<ProverKey
>
Overrides
getVerifierKey()
getVerifierKey(
circuitId
):Promise
<VerifierKey
>
ZKConfigProvider.getVerifierKey
Parameters
• circuitId: K
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
>
Parameters
• circuitId: K
Returns
Promise
<ZKIR
>