How to use the snarkjs.generateVerifier function in snarkjs

To help you get started, weโ€™ve selected a few snarkjs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github LimeChain / etherlime / packages / etherlime / cli-commands / zk-proof / generate-verify.js View on Github external
const run = async (vk) => {
	console.log('===== Creating Smart Contract for OnChain verification =====');
	const verifierKey = zkSnark.unstringifyBigInts(require(`${process.cwd()}/${trustedSetupPath}/${vk}`));
	const template = zkSnark.generateVerifier(verifierKey);
	fs.writeFileSync(`${contractsPath}/Verifier.sol`, template);
	console.log('===== Smart Contract Created Successfully. Please check your contracts folder =====');
};