snarkjs-scrypt
Advanced tools
Comparing version 0.4.27 to 0.4.29
{ | ||
"name": "snarkjs-scrypt", | ||
"type": "module", | ||
"version": "0.4.27", | ||
"version": "0.4.29", | ||
"description": "zkSNARKs implementation in JavaScript", | ||
@@ -52,3 +52,4 @@ "main": "./build/main.cjs", | ||
"logplease": "^1.2.15", | ||
"r1csfile": "0.0.40" | ||
"r1csfile": "0.0.40", | ||
"zokrates-js-scrypt": "1.1.4" | ||
}, | ||
@@ -61,2 +62,3 @@ "devDependencies": { | ||
"@rollup/plugin-virtual": "^2.0.3", | ||
"@rollup/plugin-wasm": "5.2.0", | ||
"chai": "^4.2.0", | ||
@@ -63,0 +65,0 @@ "eslint": "^8.7.0", |
@@ -40,3 +40,3 @@ | ||
```sh | ||
npm install -g snarkjs@latest | ||
npm install -g snarkjs-scrypt | ||
``` | ||
@@ -465,17 +465,6 @@ | ||
```sh | ||
snarkjs zkey export solidityverifier circuit_final.zkey verifier.sol | ||
snarkjs zkey export scryptverifier circuit_final.zkey verifier.scrypt | ||
``` | ||
Finally, we export the verifier as a Solidity smart-contract so that we can publish it on-chain -- using [remix](https://remix.ethereum.org/) for example. For the details on how to do this, refer to section 4 of [this tutorial](https://blog.iden3.io/first-zk-proof.html). | ||
### 26. Simulate a verification call | ||
```sh | ||
snarkjs zkey export soliditycalldata public.json proof.json | ||
``` | ||
We use `soliditycalldata` to simulate a verification call, and cut and paste the result directly in the verifyProof field in the deployed smart contract in the remix environment. | ||
And voila! That's all there is to it :) | ||
## Using Node | ||
@@ -485,7 +474,7 @@ | ||
npm init | ||
npm install snarkjs | ||
npm install snarkjs-scrypt | ||
``` | ||
```js | ||
const snarkjs = require("snarkjs"); | ||
const snarkjs = require("snarkjs-scrypt"); | ||
const fs = require("fs"); | ||
@@ -521,3 +510,3 @@ | ||
``` | ||
cp node_modules/snarkjs/build/snarkjs.min.js . | ||
cp node_modules/snarkjs-scrypt/build/snarkjs.min.js . | ||
``` | ||
@@ -524,0 +513,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
25789059
4
12
12
15
17374
580
+ Addedzokrates-js-scrypt@1.1.4
+ Addedzokrates-js-scrypt@1.1.4(transitive)