-
Notifications
You must be signed in to change notification settings - Fork 184
/
3067.0.58.0.1733403903654.js.map
1 lines (1 loc) · 1.6 KB
/
3067.0.58.0.1733403903654.js.map
1
{"version":3,"file":"3067.0.58.0.1733403903654.js","mappings":"oRAAA,01C","sources":["webpack:///../../libs/remix-ws-templates/src/templates/semaphore/scripts/plonk/plonk_trusted_setup.ts"],"sourcesContent":["export default \"// eslint-disable-next-line @typescript-eslint/no-var-requires\\nconst snarkjs = require('snarkjs');\\n\\nconst logger = {\\n info: (...args) => console.log(...args),\\n debug: (...args) => console.log(...args)\\n};\\n\\n(async () => {\\n try {\\n // @ts-ignore\\n await remix.call('circuit-compiler', 'generateR1cs', 'circuits/semaphore.circom');\\n\\n const ptau_final = \\\"https://ipfs-cluster.ethdevops.io/ipfs/QmciCq5JcZQyTLvC9GRanrLBi82ZmSriq1Fr5zANkGHebf\\\";\\n // @ts-ignore\\n const r1csBuffer = await remix.call('fileManager', 'readFile', 'circuits/.bin/semaphore.r1cs', { encoding: null });\\n // @ts-ignore\\n const r1cs = new Uint8Array(r1csBuffer);\\n const zkey_final = { type: \\\"mem\\\" };\\n\\n console.log('plonk setup')\\n await snarkjs.plonk.setup(r1cs, ptau_final, zkey_final)\\n\\n console.log('exportVerificationKey')\\n const vKey = await snarkjs.zKey.exportVerificationKey(zkey_final)\\n await remix.call('fileManager', 'writeFile', 'scripts/plonk/zk/keys/verification_key.json', JSON.stringify(vKey, null, 2))\\n\\n console.log('save zkey_final')\\n // @ts-ignore\\n await remix.call('fileManager', 'writeFile', 'scripts/plonk/zk/keys/zkey_final.txt', (zkey_final as any).data, { encoding: null })\\n\\n console.log('setup done.')\\n\\n } catch (e) {\\n console.error(e.message)\\n }\\n})()\";"],"names":[],"sourceRoot":""}