diff --git a/tooling/noir_js/src/program.ts b/tooling/noir_js/src/program.ts index 0c129aa3a72..21b9f0efc66 100644 --- a/tooling/noir_js/src/program.ts +++ b/tooling/noir_js/src/program.ts @@ -8,6 +8,10 @@ export class Noir { private backend: Backend, ) {} + async init(): Promise { + await this.backend.instantiate(); + } + // Initial inputs to your program async generateFinalProof(inputs: any): Promise { const serializedWitness = await generateWitness(this.circuit, inputs); diff --git a/tooling/noir_js_types/lib/types.ts b/tooling/noir_js_types/lib/types.ts index 2b6ea8ad4b0..0904e8f4b3d 100644 --- a/tooling/noir_js_types/lib/types.ts +++ b/tooling/noir_js_types/lib/types.ts @@ -10,6 +10,8 @@ export interface Backend { verifyFinalProof(proof: Uint8Array): Promise; verifyIntermediateProof(proof: Uint8Array): Promise; + + instantiate(): Promise; } export type CompiledCircuit = {