circuit build scripts

This commit is contained in:
poma 2019-07-12 13:55:23 +03:00
parent c31c3f49e0
commit 19f916e6fd

View File

@ -4,6 +4,11 @@
"description": "",
"main": "index.js",
"scripts": {
"build:circuit:compile": "circom circuits/withdraw.circom -o build/circuits/withdraw.json && snarkjs info -c build/circuits/withdraw.json",
"build:circuit:setup": "snarkjs setup --protocol groth -c build/circuits/withdraw.json --pk build/circuits/withdraw_proving_key.json --vk build/circuits/withdraw_verification_key.json",
"build:circuit:contract": "snarkjs generateverifier -v build/circuits/withdraw_verifier.sol --vk build/circuits/withdraw_verification_key.json",
"build:circuit": "mkdir -p build/circuits && npm run build:circuit:compile && npm run build:circuit:setup && npm run build:circuit:contract",
"build:contract": "truffle compile",
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],