-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix input size and corresponding files
- Loading branch information
1 parent
eb8817c
commit ca3b577
Showing
10 changed files
with
239 additions
and
21 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
const fs = require('fs'); | ||
const { join } = require('path'); | ||
const snarkjs = require('snarkjs'); | ||
|
||
const INPUT_PATH = join(__dirname, '../../circom-circuit/gov-sig-setup/input.json'); | ||
const input = JSON.parse(fs.readFileSync(INPUT_PATH, 'utf8')); | ||
const WASM_PATH = join(__dirname, "../../circom-circuit/gov-sig-build/verify-gov-sig_js/verify-gov-sig.wasm"); | ||
const ZKEY_PATH = join(__dirname, "../../circom-circuit/gov-sig-setup/circuit_final.zkey"); | ||
|
||
async function main() { | ||
const { proof, publicSignals } = await snarkjs.groth16.fullProve( | ||
input, | ||
WASM_PATH, | ||
ZKEY_PATH); | ||
console.log("publicSignals", publicSignals); | ||
console.log("proof", proof); | ||
|
||
console.log("generating calldata"); | ||
|
||
const calldataBlob = await snarkjs.groth16.exportSolidityCallData(proof, publicSignals); | ||
const calldata = calldataBlob.split(','); | ||
|
||
console.log(calldata); | ||
|
||
} | ||
main().catch(console.error); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters