Midnight.js API Reference v1.0.0
Midnight.js API Reference / @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
K
extends string
The type of the circuit ID used by the provider.
Constructors
Constructor
new NodeZkConfigProvider<
K
>(directory
):NodeZkConfigProvider
<K
>
Parameters
directory
string
The path to the base directory containing the key and ZKIR subdirectories.
Returns
NodeZkConfigProvider
<K
>
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
>