diff --git a/test-vectors/circuit2.circom b/test-vectors/circuit2.circom index 1cd0da2..db8dd2a 100644 --- a/test-vectors/circuit2.circom +++ b/test-vectors/circuit2.circom @@ -1,3 +1,5 @@ +pragma circom 2.0.0; + template CheckBits(n) { signal input in; signal bits[n]; @@ -15,8 +17,8 @@ template CheckBits(n) { } template Multiplier(n) { - signal private input a; - signal private input b; + signal input a; + signal input b; signal output c; signal inva; signal invb; diff --git a/test-vectors/circuit2.wasm b/test-vectors/circuit2.wasm index 3495132..706eee9 100644 Binary files a/test-vectors/circuit2.wasm and b/test-vectors/circuit2.wasm differ diff --git a/test-vectors/safe-circuit-witness.json b/test-vectors/safe-circuit-witness.json index edfa3ea..bf473a2 100644 --- a/test-vectors/safe-circuit-witness.json +++ b/test-vectors/safe-circuit-witness.json @@ -1 +1,134 @@ -["1","33","3","11","10944121435919637611123202872628637544274182200208017171849102093287904247809","15321770010287492655572484021680092561983855080291224040588742930603065946932","1","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","1","0","1","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"] +[ + "1", + "33", + "3", + "11", + "10944121435919637611123202872628637544274182200208017171849102093287904247809", + "15321770010287492655572484021680092561983855080291224040588742930603065946932", + "1", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "1", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" +] \ No newline at end of file diff --git a/test-vectors/safe-circuit.sh b/test-vectors/safe-circuit.sh new file mode 100755 index 0000000..14255ce --- /dev/null +++ b/test-vectors/safe-circuit.sh @@ -0,0 +1,15 @@ +# run from within test-vectors dir +DIR="test-vectors" +if [ ! -d "$DIR" ]; then + echo "Directory $DIR does not exist. Please ensure you are running this script from the correct location." + exit 1 +fi + +cd "$DIR" + +echo "compiling" +circom circuit2.circom --wasm + +node circuit2_js/generate_witness.js circuit2_js/circuit2.wasm mycircuit-input1.json circuit2_js/witness.wtns + +snarkjs wej circuit2_js/witness.wtns safe-circuit-witness.json \ No newline at end of file