diff --git a/apps/circuit-compiler/src/app/actions/index.ts b/apps/circuit-compiler/src/app/actions/index.ts index 1a59520ea3..a994b18ba1 100644 --- a/apps/circuit-compiler/src/app/actions/index.ts +++ b/apps/circuit-compiler/src/app/actions/index.ts @@ -51,6 +51,8 @@ export const runSetupAndExport = async (plugin: CircomPluginClient, appState: Ap if (appState.exportVerificationKey) { const vKey = await snarkjs.zKey.exportVerificationKey(zkey_final) await plugin.call('fileManager', 'writeFile', `${extractParentFromKey(appState.filePath)}/groth16/zk/keys/verification_key.json`, JSON.stringify(vKey, null, 2)) + // @ts-ignore + await plugin.call('fileManager', 'writeFile', `${extractParentFromKey(appState.filePath)}/groth16/zk/keys/zkey_final.txt`, (zkey_final as any).data, { encoding: null }) } if (appState.exportVerificationContract) { const templates = { groth16: GROTH16_VERIFIER } @@ -63,6 +65,8 @@ export const runSetupAndExport = async (plugin: CircomPluginClient, appState: Ap if (appState.exportVerificationKey) { const vKey = await snarkjs.zKey.exportVerificationKey(zkey_final) await plugin.call('fileManager', 'writeFile', `${extractParentFromKey(appState.filePath)}/plonk/zk/keys/verification_key.json`, JSON.stringify(vKey, null, 2)) + // @ts-ignore + await plugin.call('fileManager', 'writeFile', `${extractParentFromKey(appState.filePath)}/plonk/zk/keys/zkey_final.txt`, (zkey_final as any).data, { encoding: null }) } if (appState.exportVerificationContract) { const templates = { plonk: PLONK_VERIFIER } diff --git a/apps/circuit-compiler/src/app/components/setupExports.tsx b/apps/circuit-compiler/src/app/components/setupExports.tsx index dc881dfbaa..2116c6a8ec 100644 --- a/apps/circuit-compiler/src/app/components/setupExports.tsx +++ b/apps/circuit-compiler/src/app/components/setupExports.tsx @@ -39,7 +39,7 @@ export function SetupExports () { checked={circuitApp.appState.provingScheme === 'groth16'} readOnly /> -