Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

snarkjs

Package Overview
Dependencies
Maintainers
1
Versions
136
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

snarkjs - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

16

cli.js

@@ -549,2 +549,7 @@ /*

async function fileExists(file) {
return fs.promises.access(file, fs.constants.F_OK)
.then(() => true)
.catch(() => false);
}
// solidity genverifier [circuit_final.zkey] [verifier.sol]

@@ -571,5 +576,10 @@ async function zkeyExportSolidityVerifier(params, options) {

templates.groth16 = await fs.promises.readFile(path.join(__dirname, "templates", "verifier_groth16.sol.ejs"), "utf8");
templates.plonk = await fs.promises.readFile(path.join(__dirname, "templates", "verifier_plonk.sol.ejs"), "utf8");
if (await fileExists(path.join(__dirname, "templates"))) {
templates.groth16 = await fs.promises.readFile(path.join(__dirname, "templates", "verifier_groth16.sol.ejs"), "utf8");
templates.plonk = await fs.promises.readFile(path.join(__dirname, "templates", "verifier_plonk.sol.ejs"), "utf8");
} else {
templates.groth16 = await fs.promises.readFile(path.join(__dirname, "..", "templates", "verifier_groth16.sol.ejs"), "utf8");
templates.plonk = await fs.promises.readFile(path.join(__dirname, "..", "templates", "verifier_plonk.sol.ejs"), "utf8");
}
const verifierCode = await zkey.exportSolidityVerifier(zkeyName, templates, logger);

@@ -576,0 +586,0 @@

2

package.json
{
"name": "snarkjs",
"type": "module",
"version": "0.4.0",
"version": "0.4.1",
"description": "zkSNARKs implementation in JavaScript",

@@ -6,0 +6,0 @@ "main": "./build/main.cjs",

@@ -6,3 +6,3 @@

This is a **JavaScript and Pure Web Assembly implementation of zkSNARK schemes.** It uses the Groth16 Protocol (3 point only and 3 pairings).
This is a **JavaScript and Pure Web Assembly implementation of zkSNARK and PLONK schemes.** It uses the Groth16 Protocol (3 point only and 3 pairings) and PLONK.

@@ -306,14 +306,14 @@ This library includes all the tools required to perform trusted setup multi-party ceremonies: including the universal [*powers of tau*](https://medium.com/coinmonks/announcing-the-perpetual-powers-of-tau-ceremony-to-benefit-all-zk-snark-projects-c3da86af8377) ceremony, and the second phase circuit specific ceremonies.

Currently, snarkjs supports 2 proving systems: groth16 and plonk.
Currently, snarkjs supports 2 proving systems: groth16 and PLONK.
Groth16 requires a trusted ceremony for each circuit. Plonk does not require it, it's enought with the powers of tau ceremony which is universal.
Groth16 requires a trusted ceremony for each circuit. PLONK does not require it, it's enought with the powers of tau ceremony which is universal.
#### Plonk
```sh
snarkjs plonk setup circuit.r1cs pot12_final.ptau circuit_0000.zkey
snarkjs plonk setup circuit.r1cs pot12_final.ptau circuit_final.zkey
```
You can jump directly to Section 21 as plonk does not require a specific trusted ceremony.
You can jump directly to Section 21 as PLONK does not require a specific trusted ceremony.
### Groth16
#### Groth16
```sh

@@ -427,3 +427,3 @@ snarkjs groth16 setup circuit.r1cs pot12_final.ptau circuit_0000.zkey

#### Plonk
#### PLONK

@@ -450,3 +450,3 @@ ```sh

#### Plonk
#### PLONK
```sh

@@ -453,0 +453,0 @@ snarkjs plonk verify verification_key.json public.json proof.json

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc