Skip to content

Commit

Permalink
Merge pull request #48 from hyperledger-labs/snarkjs
Browse files Browse the repository at this point in the history
  • Loading branch information
Chengxuan committed Aug 29, 2024
2 parents f9b4a17 + f670da7 commit 5d5d2a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions zkp/circuits/gen.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,15 @@ const processCircuit = async (circuit, ptau, skipSolidityGenaration) => {

log(circuit, `Generating test proving key with ${ptau}`);
await execAsync(
`snarkjs groth16 setup ${path.join(
`npx snarkjs groth16 setup ${path.join(
provingKeysRoot,
`${circuit}.r1cs`
)} ${ptauFile} ${zkeyOutput}`
);

log(circuit, `Generating verification key`);
await execAsync(
`snarkjs zkey export verificationkey ${zkeyOutput} ${path.join(
`npx snarkjs zkey export verificationkey ${zkeyOutput} ${path.join(
provingKeysRoot,
`${circuit}-vkey.json`
)}`
Expand All @@ -141,7 +141,7 @@ const processCircuit = async (circuit, ptau, skipSolidityGenaration) => {
`verifier_${circuit}.sol`
);
await execAsync(
`snarkjs zkey export solidityverifier ${zkeyOutput} ${solidityFile}`
`npx snarkjs zkey export solidityverifier ${zkeyOutput} ${solidityFile}`
);

log(circuit, `Modifying the contract name in the Solidity file`);
Expand Down
1 change: 1 addition & 0 deletions zkp/circuits/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"devDependencies": {
"axios": "^1.7.3",
"p-limit": "^6.1.0",
"snarkjs": "^0.7.4",
"yargs": "^17.7.2"
}
}

0 comments on commit 5d5d2a3

Please sign in to comment.