feat(circuits): update semaphore circuits

re #357
This commit is contained in:
cedoor
2023-12-05 19:41:36 +00:00
parent 3866734abb
commit 58cfdf7d6b
16 changed files with 574 additions and 147 deletions

View File

@@ -16,9 +16,6 @@ packages/contracts/deployed-contracts/undefined.json
packages/contracts/deployed-contracts/hardhat.json
packages/contracts/deployed-contracts/localhost.json
# circuits
circuits
# contracts
Verifier*.sol

View File

@@ -1,9 +1,12 @@
import fs from "fs"
import type { Config } from "@jest/types"
const exclude = ["circuits", "contracts"]
const projects: any = fs
.readdirSync("./packages", { withFileTypes: true })
.filter((directory) => directory.isDirectory())
.filter((directory) => !exclude.includes(directory.name))
.map(({ name }) => ({
rootDir: `packages/${name}`,
displayName: name,

View File

@@ -16,6 +16,7 @@
"test:libraries": "jest --coverage",
"test:subgraph": "yarn workspace semaphore-subgraph test",
"test:contracts": "yarn workspace semaphore-contracts test:coverage",
"test:circuits": "yarn workspace @semaphore-protocol/circuits test",
"lint": "eslint . --ext .js,.ts,.tsx && yarn workspace semaphore-contracts lint",
"prettier": "prettier -c .",
"prettier:write": "prettier -w .",

3
packages/circuits/.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
ptau
main
test

View File

@@ -0,0 +1,7 @@
{
"extension": ["ts"],
"require": "ts-node/register",
"spec": "./tests/*.test.ts",
"timeout": 100000,
"exit": true
}

21
packages/circuits/LICENSE Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2023 Ethereum Foundation
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -9,8 +9,14 @@
<a href="https://github.com/semaphore-protocol">
<img src="https://img.shields.io/badge/project-Semaphore-blue.svg?style=flat-square">
</a>
<a href="https://github.com/semaphore-protocol/semaphore/blob/main/LICENSE">
<img alt="Github license" src="https://img.shields.io/github/license/semaphore-protocol/semaphore.svg?style=flat-square">
<a href="https://github.com/semaphore-protocol/semaphore/tree/main/packages/circuits/LICENSE">
<img alt="NPM license" src="https://img.shields.io/npm/l/%40semaphore-protocol%2Fcircuits?style=flat-square">
</a>
<a href="https://www.npmjs.com/package/@semaphore-protocol/circuits">
<img alt="NPM version" src="https://img.shields.io/npm/v/@semaphore-protocol/circuits?style=flat-square" />
</a>
<a href="https://npmjs.org/package/@semaphore-protocol/circuits">
<img alt="Downloads" src="https://img.shields.io/npm/dm/@semaphore-protocol/circuits.svg?style=flat-square" />
</a>
</p>

View File

@@ -0,0 +1,17 @@
{
"protocol": "groth16",
"prime": "bn128",
"version": "2.1.5",
"circuits": "./circuits.json",
"dirPtau": "./ptau",
"dirCircuits": "./",
"dirInputs": "./inputs",
"dirBuild": "./build",
"optimization": 1,
"inspect": true,
"include": ["../../node_modules/circomlib/circuits", "../../node_modules/@zk-kit/circuits/circom"],
"groth16numContributions": 1,
"groth16askForEntropy": false,
"logLevel": "INFO",
"verbose": true
}

View File

@@ -0,0 +1,7 @@
{
"semaphore": {
"file": "semaphore",
"template": "Semaphore",
"params": [4]
}
}

View File

@@ -1,7 +1,38 @@
{
"name": "circuits",
"private": true,
"name": "@semaphore-protocol/circuits",
"version": "3.15.1",
"description": "Semaphore Circom circuits to generate zero-knowledge proofs.",
"license": "MIT",
"files": [
"**/*.circom",
"!main",
"!test",
"LICENSE",
"README.md"
],
"repository": "https://github.com/semaphore-protocol/semaphore",
"homepage": "https://github.com/semaphore-protocol/semaphore/tree/main/packages/data",
"bugs": {
"url": "https://github.com/semaphore-protocol/semaphore.git/issues"
},
"scripts": {
"compile": "circomkit compile semaphore",
"setup": "circomkit setup semaphore",
"test": "mocha"
},
"publishConfig": {
"access": "public"
},
"dependencies": {
"circomlib": "^2.0.2"
"@zk-kit/circuits": "0.2.3",
"circomlib": "2.0.5"
},
"devDependencies": {
"@types/mocha": "^10.0.6",
"@zk-kit/eddsa-poseidon": "0.3.1",
"@zk-kit/imt": "^2.0.0-beta",
"circomkit": "^0.0.19",
"mocha": "^10.2.0",
"poseidon-lite": "^0.2.0"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -1,90 +1,25 @@
pragma circom 2.0.0;
pragma circom 2.1.5;
include "../node_modules/circomlib/circuits/poseidon.circom";
include "./tree.circom";
include "babyjub.circom";
include "poseidon.circom";
include "binary-merkle-root.circom";
template CalculateSecret() {
signal input identityNullifier;
signal input identityTrapdoor;
template Semaphore(MAX_DEPTH) {
signal input privateKey;
signal input treeDepth, treeIndices[MAX_DEPTH], treeSiblings[MAX_DEPTH];
signal input message;
signal input scope;
signal output out;
signal output treeRoot, nullifier;
component poseidon = Poseidon(2);
var Ax, Ay;
(Ax, Ay) = BabyPbk()(privateKey);
poseidon.inputs[0] <== identityNullifier;
poseidon.inputs[1] <== identityTrapdoor;
var treeLeaf = Poseidon(2)([Ax, Ay]);
out <== poseidon.out;
treeRoot <== BinaryMerkleRoot(MAX_DEPTH)(treeLeaf, treeDepth, treeIndices, treeSiblings);
nullifier <== Poseidon(2)([scope, privateKey]);
// Dummy constraint to prevent compiler from optimizing it.
signal dummySquare <== message * message;
}
template CalculateIdentityCommitment() {
signal input secret;
signal output out;
component poseidon = Poseidon(1);
poseidon.inputs[0] <== secret;
out <== poseidon.out;
}
template CalculateNullifierHash() {
signal input externalNullifier;
signal input identityNullifier;
signal output out;
component poseidon = Poseidon(2);
poseidon.inputs[0] <== externalNullifier;
poseidon.inputs[1] <== identityNullifier;
out <== poseidon.out;
}
// The current Semaphore smart contracts require nLevels <= 32 and nLevels >= 16.
template Semaphore(nLevels) {
signal input identityNullifier;
signal input identityTrapdoor;
signal input treePathIndices[nLevels];
signal input treeSiblings[nLevels];
signal input signalHash;
signal input externalNullifier;
signal output root;
signal output nullifierHash;
component calculateSecret = CalculateSecret();
calculateSecret.identityNullifier <== identityNullifier;
calculateSecret.identityTrapdoor <== identityTrapdoor;
signal secret;
secret <== calculateSecret.out;
component calculateIdentityCommitment = CalculateIdentityCommitment();
calculateIdentityCommitment.secret <== secret;
component calculateNullifierHash = CalculateNullifierHash();
calculateNullifierHash.externalNullifier <== externalNullifier;
calculateNullifierHash.identityNullifier <== identityNullifier;
component inclusionProof = MerkleTreeInclusionProof(nLevels);
inclusionProof.leaf <== calculateIdentityCommitment.out;
for (var i = 0; i < nLevels; i++) {
inclusionProof.siblings[i] <== treeSiblings[i];
inclusionProof.pathIndices[i] <== treePathIndices[i];
}
root <== inclusionProof.root;
// Dummy square to prevent tampering signalHash.
signal signalHashSquared;
signalHashSquared <== signalHash * signalHash;
nullifierHash <== calculateNullifierHash.out;
}
component main {public [signalHash, externalNullifier]} = Semaphore(20);

View File

@@ -0,0 +1,12 @@
import { Circomkit } from "circomkit"
import { readFileSync } from "fs"
import path from "path"
const configFilePath = path.join(__dirname, "../circomkit.json")
const config = JSON.parse(readFileSync(configFilePath, "utf-8"))
// eslint-disable-next-line import/prefer-default-export
export const circomkit = new Circomkit({
...config,
verbose: false
})

View File

@@ -0,0 +1,72 @@
import { derivePublicKey, deriveSecretScalar } from "@zk-kit/eddsa-poseidon"
import { LeanIMT } from "@zk-kit/imt"
import { WitnessTester } from "circomkit"
import { poseidon2 } from "poseidon-lite"
import { circomkit } from "./common"
describe("semaphore", () => {
let circuit: WitnessTester<
["privateKey", "treeDepth", "treeIndices", "treeSiblings", "scope", "message"],
["nullifier", "treeRoot"]
>
const MAX_DEPTH = 20
const scope = 32
const message = 43
const privateKey = 1
const publicKey = derivePublicKey(privateKey)
const leaf = poseidon2(publicKey)
const tree = new LeanIMT((a, b) => poseidon2([a, b]))
tree.insert(leaf)
for (let i = 1; i < 4; i += 1) {
tree.insert(BigInt(i))
}
const { siblings: treeSiblings, index } = tree.generateProof(0)
// The index must be converted to a list of indices, 1 for each tree level.
// The circuit tree depth is 20, so the number of siblings must be 20, even if
// the tree depth is actually 3. The missing siblings can be set to 0, as they
// won't be used to calculate the root in the circuit.
const treeIndices: number[] = []
for (let i = 0; i < MAX_DEPTH; i += 1) {
treeIndices.push((index >> i) & 1)
if (treeSiblings[i] === undefined) {
treeSiblings[i] = BigInt(0)
}
}
const INPUT = {
privateKey: deriveSecretScalar(privateKey),
treeDepth: tree.depth,
treeIndices,
treeSiblings,
scope,
message
}
const OUTPUT = {
nullifier: poseidon2([scope, deriveSecretScalar(privateKey)]),
treeRoot: tree.root
}
before(async () => {
circuit = await circomkit.WitnessTester("semaphore", {
file: "semaphore",
template: "Semaphore",
params: [MAX_DEPTH]
})
})
it("Should calculate the root and the nullifier correctly", async () => {
await circuit.expectPass(INPUT, OUTPUT)
})
})

View File

@@ -1,40 +0,0 @@
pragma circom 2.0.0;
include "../node_modules/circomlib/circuits/poseidon.circom";
include "../node_modules/circomlib/circuits/mux1.circom";
template MerkleTreeInclusionProof(nLevels) {
signal input leaf;
signal input pathIndices[nLevels];
signal input siblings[nLevels];
signal output root;
component poseidons[nLevels];
component mux[nLevels];
signal hashes[nLevels + 1];
hashes[0] <== leaf;
for (var i = 0; i < nLevels; i++) {
pathIndices[i] * (1 - pathIndices[i]) === 0;
poseidons[i] = Poseidon(2);
mux[i] = MultiMux1(2);
mux[i].c[0][0] <== hashes[i];
mux[i].c[0][1] <== siblings[i];
mux[i].c[1][0] <== siblings[i];
mux[i].c[1][1] <== hashes[i];
mux[i].s <== pathIndices[i];
poseidons[i].inputs[0] <== mux[i].out[0];
poseidons[i].inputs[1] <== mux[i].out[1];
hashes[i + 1] <== poseidons[i].out;
}
root <== hashes[nLevels];
}

387
yarn.lock
View File

@@ -6745,6 +6745,23 @@ __metadata:
languageName: node
linkType: hard
"@iden3/bigarray@npm:0.0.2":
version: 0.0.2
resolution: "@iden3/bigarray@npm:0.0.2"
checksum: a58a4aa75284f7c74ef8a43dd0720764e94389ae4314213f18de9d712fbdb170dd0e9b48672ad297b5f15bd1658d3bff33fe1998e189b48cbf501f1fe78f0adc
languageName: node
linkType: hard
"@iden3/binfileutils@npm:0.0.11":
version: 0.0.11
resolution: "@iden3/binfileutils@npm:0.0.11"
dependencies:
fastfile: 0.0.20
ffjavascript: ^0.2.48
checksum: ca61db1325c7e038c6bd723c856eff5f2c82c76394db09d3350ef4f5b7525e3c9ab1f7429900ff5d3e9d26c5970bf5900e6126ccb5c5caa597c16a47336a6be8
languageName: node
linkType: hard
"@ipld/dag-cbor@npm:^7.0.0":
version: 7.0.3
resolution: "@ipld/dag-cbor@npm:7.0.3"
@@ -8704,6 +8721,21 @@ __metadata:
languageName: node
linkType: hard
"@semaphore-protocol/circuits@workspace:packages/circuits":
version: 0.0.0-use.local
resolution: "@semaphore-protocol/circuits@workspace:packages/circuits"
dependencies:
"@types/mocha": ^10.0.6
"@zk-kit/circuits": 0.2.3
"@zk-kit/eddsa-poseidon": 0.3.1
"@zk-kit/imt": ^2.0.0-beta
circomkit: ^0.0.19
circomlib: 2.0.5
mocha: ^10.2.0
poseidon-lite: ^0.2.0
languageName: unknown
linkType: soft
"@semaphore-protocol/cli-template-contracts-hardhat@workspace:packages/cli-template-contracts-hardhat":
version: 0.0.0-use.local
resolution: "@semaphore-protocol/cli-template-contracts-hardhat@workspace:packages/cli-template-contracts-hardhat"
@@ -10202,6 +10234,13 @@ __metadata:
languageName: node
linkType: hard
"@types/mocha@npm:^10.0.6":
version: 10.0.6
resolution: "@types/mocha@npm:10.0.6"
checksum: f7c836cf6cf27dc0f5970d262591b56f2a3caeaec8cfdc612c12e1cfbb207f601f710ece207e935164d4e3343b93be5054d0db5544f31f453b3923775d82099f
languageName: node
linkType: hard
"@types/mocha@npm:^9.1.0, @types/mocha@npm:^9.1.1":
version: 9.1.1
resolution: "@types/mocha@npm:9.1.1"
@@ -11123,6 +11162,22 @@ __metadata:
languageName: node
linkType: hard
"@zk-kit/circuits@npm:0.2.3":
version: 0.2.3
resolution: "@zk-kit/circuits@npm:0.2.3"
dependencies:
circomlib: ^2.0.5
checksum: 9d7f812c7c67d33870b44c1c45bd52fb10c1a5f60c8c99e3765216cb2e9326c9a7d17542e4460baa65902944f5d7e1986ee01d15f5bbc7398d4c4166fc33d770
languageName: node
linkType: hard
"@zk-kit/eddsa-poseidon@npm:0.3.1":
version: 0.3.1
resolution: "@zk-kit/eddsa-poseidon@npm:0.3.1"
checksum: 5c3a9274908907d4d988c19bebf0d97c961e6a500c2e063a7aa8ecc33f95dace9549f442f8bbf1fa94542b687cf761ba7f77cf7d64165ccd28aad22c3caecd29
languageName: node
linkType: hard
"@zk-kit/groth16@npm:0.3.0":
version: 0.3.0
resolution: "@zk-kit/groth16@npm:0.3.0"
@@ -11133,6 +11188,13 @@ __metadata:
languageName: node
linkType: hard
"@zk-kit/imt@npm:^2.0.0-beta":
version: 2.0.0-beta
resolution: "@zk-kit/imt@npm:2.0.0-beta"
checksum: e4fdde4c171df9ab2c0b02f38ba480418231239aebf362098186a59537c19e24d7985ff11ff9e908f23d54ca620e81edfecf82d52b2c881677f89cd8654cdb80
languageName: node
linkType: hard
"@zk-kit/incremental-merkle-tree.sol@npm:1.3.3":
version: 1.3.3
resolution: "@zk-kit/incremental-merkle-tree.sol@npm:1.3.3"
@@ -12528,6 +12590,19 @@ __metadata:
languageName: node
linkType: hard
"bfj@npm:^7.0.2":
version: 7.1.0
resolution: "bfj@npm:7.1.0"
dependencies:
bluebird: ^3.7.2
check-types: ^11.2.3
hoopy: ^0.1.4
jsonpath: ^1.1.1
tryer: ^1.0.1
checksum: 36da9ed36c60f377a3f43bb0433092af7dc40442914b8155a1330ae86b1905640baf57e9c195ab83b36d6518b27cf8ed880adff663aa444c193be149e027d722
languageName: node
linkType: hard
"big.js@npm:^5.2.2":
version: 5.2.2
resolution: "big.js@npm:5.2.2"
@@ -12674,7 +12749,7 @@ __metadata:
languageName: node
linkType: hard
"bluebird@npm:^3.5.0":
"bluebird@npm:^3.5.0, bluebird@npm:^3.7.2":
version: 3.7.2
resolution: "bluebird@npm:3.7.2"
checksum: 869417503c722e7dc54ca46715f70e15f4d9c602a423a02c825570862d12935be59ed9c7ba34a9b31f186c017c23cac6b54e35446f8353059c101da73eac22ef
@@ -13538,6 +13613,21 @@ __metadata:
languageName: node
linkType: hard
"chai@npm:^4.3.6, chai@npm:^4.3.7":
version: 4.3.10
resolution: "chai@npm:4.3.10"
dependencies:
assertion-error: ^1.1.0
check-error: ^1.0.3
deep-eql: ^4.1.3
get-func-name: ^2.0.2
loupe: ^2.3.6
pathval: ^1.1.1
type-detect: ^4.0.8
checksum: 536668c60a0d985a0fbd94418028e388d243a925d7c5e858c7443e334753511614a3b6a124bac9ca077dfc4c37acc367d62f8c294960f440749536dc181dfc6d
languageName: node
linkType: hard
"chalk@npm:3.0.0":
version: 3.0.0
resolution: "chalk@npm:3.0.0"
@@ -13715,6 +13805,22 @@ __metadata:
languageName: node
linkType: hard
"check-error@npm:^1.0.3":
version: 1.0.3
resolution: "check-error@npm:1.0.3"
dependencies:
get-func-name: ^2.0.2
checksum: e2131025cf059b21080f4813e55b3c480419256914601750b0fee3bd9b2b8315b531e551ef12560419b8b6d92a3636511322752b1ce905703239e7cc451b6399
languageName: node
linkType: hard
"check-types@npm:^11.2.3":
version: 11.2.3
resolution: "check-types@npm:11.2.3"
checksum: f99ff09ae65e63cfcfa40a1275c0a70d8c43ffbf9ac35095f3bf030cc70361c92e075a9975a1144329e50b4fe4620be6bedb4568c18abc96071a3e23aed3ed8e
languageName: node
linkType: hard
"cheerio-select@npm:^2.1.0":
version: 2.1.0
resolution: "cheerio-select@npm:2.1.0"
@@ -13744,6 +13850,13 @@ __metadata:
languageName: node
linkType: hard
"child_process@npm:^1.0.2":
version: 1.0.2
resolution: "child_process@npm:1.0.2"
checksum: bd814d82bc8c6e85ed6fb157878978121cd03b5296c09f6135fa3d081fd9a6a617a6d509c50397711df713af403331241a9c0397a7fad30672051485e156c2a1
languageName: node
linkType: hard
"chokidar@npm:3.3.0":
version: 3.3.0
resolution: "chokidar@npm:3.3.0"
@@ -13840,6 +13953,17 @@ __metadata:
languageName: node
linkType: hard
"circom_runtime@npm:0.1.21":
version: 0.1.21
resolution: "circom_runtime@npm:0.1.21"
dependencies:
ffjavascript: 0.2.56
bin:
calcwit: calcwit.js
checksum: 3071f1e0fba9a5fb41c940454edb911ce09edfd5d0bd12156ec79045a0bf3ff2cc5b35f46e84e42902ef8bb0a4166f428b75d0ceb363c0d485f1a111b27daba1
languageName: node
linkType: hard
"circom_runtime@npm:0.1.24":
version: 0.1.24
resolution: "circom_runtime@npm:0.1.24"
@@ -13851,7 +13975,37 @@ __metadata:
languageName: node
linkType: hard
"circomlib@npm:^2.0.2":
"circom_tester@npm:^0.0.19":
version: 0.0.19
resolution: "circom_tester@npm:0.0.19"
dependencies:
chai: ^4.3.6
child_process: ^1.0.2
ffjavascript: ^0.2.56
fnv-plus: ^1.3.1
r1csfile: ^0.0.41
snarkjs: 0.5.0
tmp-promise: ^3.0.3
util: ^0.12.4
checksum: 703d7317493ddafb33462b5b0caf9b8a95bde938429e030d024fa7ac41ccb45a9ddbe8ebb93f91138dbee94bb2e0d504570c0aca070802d79ee532ba1ae5db0e
languageName: node
linkType: hard
"circomkit@npm:^0.0.19":
version: 0.0.19
resolution: "circomkit@npm:0.0.19"
dependencies:
chai: ^4.3.7
circom_tester: ^0.0.19
loglevel: ^1.8.1
snarkjs: ^0.7.0
bin:
circomkit: dist/bin/index.js
checksum: b3d7ef5b29277ee31af7fcb7a53af46c43321d16ab238b803e2fb65a88143a8aae02eebc7c8387e6d0158450ca8bee053adb40e34331392b5fa0f1d2dabc6b40
languageName: node
linkType: hard
"circomlib@npm:2.0.5, circomlib@npm:^2.0.2, circomlib@npm:^2.0.5":
version: 2.0.5
resolution: "circomlib@npm:2.0.5"
checksum: df8c3e0d51007758e30bb7ebad059ce692836420c85179088a20581c0adbf8f969d8cf901f9047adfcb80d45741eef4abe4d0d5e4c46748ace06e04256b5bfe7
@@ -13870,14 +14024,6 @@ __metadata:
languageName: node
linkType: hard
"circuits@workspace:packages/circuits":
version: 0.0.0-use.local
resolution: "circuits@workspace:packages/circuits"
dependencies:
circomlib: ^2.0.2
languageName: unknown
linkType: soft
"cjs-module-lexer@npm:^1.0.0":
version: 1.2.2
resolution: "cjs-module-lexer@npm:1.2.2"
@@ -15524,7 +15670,7 @@ __metadata:
languageName: node
linkType: hard
"deep-eql@npm:^4.0.1, deep-eql@npm:^4.1.2":
"deep-eql@npm:^4.0.1, deep-eql@npm:^4.1.2, deep-eql@npm:^4.1.3":
version: 4.1.3
resolution: "deep-eql@npm:4.1.3"
dependencies:
@@ -16665,6 +16811,25 @@ __metadata:
languageName: node
linkType: hard
"escodegen@npm:^1.8.1":
version: 1.14.3
resolution: "escodegen@npm:1.14.3"
dependencies:
esprima: ^4.0.1
estraverse: ^4.2.0
esutils: ^2.0.2
optionator: ^0.8.1
source-map: ~0.6.1
dependenciesMeta:
source-map:
optional: true
bin:
escodegen: bin/escodegen.js
esgenerate: bin/esgenerate.js
checksum: 381cdc4767ecdb221206bbbab021b467bbc2a6f5c9a99c9e6353040080bdd3dfe73d7604ad89a47aca6ea7d58bc635f6bd3fbc8da9a1998e9ddfa8372362ccd0
languageName: node
linkType: hard
"escodegen@npm:^2.0.0":
version: 2.0.0
resolution: "escodegen@npm:2.0.0"
@@ -16955,6 +17120,16 @@ __metadata:
languageName: node
linkType: hard
"esprima@npm:1.2.2":
version: 1.2.2
resolution: "esprima@npm:1.2.2"
bin:
esparse: ./bin/esparse.js
esvalidate: ./bin/esvalidate.js
checksum: 4f10006f0e315f2f7d8cf6630e465f183512f1ab2e862b11785a133ce37ed1696573deefb5256e510eaa4368342b13b393334477f6ccdcdb8f10e782b0f5e6dc
languageName: node
linkType: hard
"esprima@npm:2.7.x, esprima@npm:^2.7.1":
version: 2.7.3
resolution: "esprima@npm:2.7.3"
@@ -17000,7 +17175,7 @@ __metadata:
languageName: node
linkType: hard
"estraverse@npm:^4.1.1":
"estraverse@npm:^4.1.1, estraverse@npm:^4.2.0":
version: 4.3.0
resolution: "estraverse@npm:4.3.0"
checksum: a6299491f9940bb246124a8d44b7b7a413a8336f5436f9837aaa9330209bd9ee8af7e91a654a3545aee9c54b3308e78ee360cef1d777d37cfef77d2fa33b5827
@@ -17694,6 +17869,13 @@ __metadata:
languageName: node
linkType: hard
"fastfile@npm:0.0.20":
version: 0.0.20
resolution: "fastfile@npm:0.0.20"
checksum: e5d6e5f57a9b58c9534202e477cbffbca2182c407171950695ddb5c3e6b89554bc8561fbb6e370c99e371a8f23486a23fbaca527827886cec4897d481cbd03b6
languageName: node
linkType: hard
"fastq@npm:^1.6.0":
version: 1.15.0
resolution: "fastq@npm:1.15.0"
@@ -17767,6 +17949,17 @@ __metadata:
languageName: node
linkType: hard
"ffjavascript@npm:0.2.56":
version: 0.2.56
resolution: "ffjavascript@npm:0.2.56"
dependencies:
wasmbuilder: 0.0.16
wasmcurves: 0.2.0
web-worker: ^1.2.0
checksum: d4e02263db4a94d111cdc7c1211ae96769370f5c8c3c338331e0ef99faed7b55e640bedf23fa8a83fc9a77f0e81140ea8f32e392812a00e15ca504221b879a4f
languageName: node
linkType: hard
"ffjavascript@npm:0.2.60, ffjavascript@npm:^0.2.45":
version: 0.2.60
resolution: "ffjavascript@npm:0.2.60"
@@ -17778,6 +17971,17 @@ __metadata:
languageName: node
linkType: hard
"ffjavascript@npm:0.2.62, ffjavascript@npm:^0.2.48, ffjavascript@npm:^0.2.56":
version: 0.2.62
resolution: "ffjavascript@npm:0.2.62"
dependencies:
wasmbuilder: 0.0.16
wasmcurves: 0.2.2
web-worker: ^1.2.0
checksum: c292e88fd160e16aadfac27870fc5532d3ed1f2306f51d77ef37d5077fca0146b475ffa44a52b80a489ce8834f9c1f4853265499dcb5d0b8f0ec551341c318da
languageName: node
linkType: hard
"figlet@npm:^1.5.2":
version: 1.5.2
resolution: "figlet@npm:1.5.2"
@@ -18062,6 +18266,13 @@ __metadata:
languageName: node
linkType: hard
"fnv-plus@npm:^1.3.1":
version: 1.3.1
resolution: "fnv-plus@npm:1.3.1"
checksum: 4d3de8026d538ffab13dfa38ac0662b045b2ad0f920efa54f1ca65f59ad1a49b4d62482c5fcdc9cce0a18d9852df1db97c618937089d85678ce03f2e76b07e8b
languageName: node
linkType: hard
"focus-lock@npm:^1.0.0":
version: 1.0.0
resolution: "focus-lock@npm:1.0.0"
@@ -18579,6 +18790,13 @@ __metadata:
languageName: node
linkType: hard
"get-func-name@npm:^2.0.1, get-func-name@npm:^2.0.2":
version: 2.0.2
resolution: "get-func-name@npm:2.0.2"
checksum: 3f62f4c23647de9d46e6f76d2b3eafe58933a9b3830c60669e4180d6c601ce1b4aa310ba8366143f55e52b139f992087a9f0647274e8745621fa2af7e0acf13b
languageName: node
linkType: hard
"get-intrinsic@npm:^1.0.2, get-intrinsic@npm:^1.1.1, get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.0":
version: 1.2.0
resolution: "get-intrinsic@npm:1.2.0"
@@ -19923,6 +20141,13 @@ __metadata:
languageName: node
linkType: hard
"hoopy@npm:^0.1.4":
version: 0.1.4
resolution: "hoopy@npm:0.1.4"
checksum: cfa60c7684c5e1ee4efe26e167bc54b73f839ffb59d1d44a5c4bf891e26b4f5bcc666555219a98fec95508fea4eda3a79540c53c05cc79afc1f66f9a238f4d9e
languageName: node
linkType: hard
"hosted-git-info@npm:^2.1.4":
version: 2.8.9
resolution: "hosted-git-info@npm:2.8.9"
@@ -22571,6 +22796,17 @@ __metadata:
languageName: node
linkType: hard
"jsonpath@npm:^1.1.1":
version: 1.1.1
resolution: "jsonpath@npm:1.1.1"
dependencies:
esprima: 1.2.2
static-eval: 2.0.2
underscore: 1.12.1
checksum: 5480d8e9e424fe2ed4ade6860b6e2cefddb21adb3a99abe0254cd9428e8ef9b0c9fb5729d6a5a514e90df50d645ccea9f3be48d627570e6222dd5dadc28eba7b
languageName: node
linkType: hard
"jsonpointer@npm:^5.0.0":
version: 5.0.1
resolution: "jsonpointer@npm:5.0.1"
@@ -23140,6 +23376,20 @@ __metadata:
languageName: node
linkType: hard
"loglevel@npm:^1.8.1":
version: 1.8.1
resolution: "loglevel@npm:1.8.1"
checksum: a1a62db40291aaeaef2f612334c49e531bff71cc1d01a2acab689ab80d59e092f852ab164a5aedc1a752fdc46b7b162cb097d8a9eb2cf0b299511106c29af61d
languageName: node
linkType: hard
"logplease@npm:^1.2.15":
version: 1.2.15
resolution: "logplease@npm:1.2.15"
checksum: c2ac90a75dfa28234f67c79a112baf3c7d7a3011a6d16b052e299ad2f37430fd17959fa116629e14ef3b56796a2dd7015802d0a835ded107ceacb0ca5a44393f
languageName: node
linkType: hard
"long@npm:^4.0.0":
version: 4.0.0
resolution: "long@npm:4.0.0"
@@ -23188,6 +23438,15 @@ __metadata:
languageName: node
linkType: hard
"loupe@npm:^2.3.6":
version: 2.3.7
resolution: "loupe@npm:2.3.7"
dependencies:
get-func-name: ^2.0.1
checksum: 96c058ec7167598e238bb7fb9def2f9339215e97d6685d9c1e3e4bdb33d14600e11fe7a812cf0c003dfb73ca2df374f146280b2287cae9e8d989e9d7a69a203b
languageName: node
linkType: hard
"lower-case@npm:^2.0.2":
version: 2.0.2
resolution: "lower-case@npm:2.0.2"
@@ -24809,7 +25068,7 @@ __metadata:
languageName: node
linkType: hard
"mocha@npm:^10.0.0":
"mocha@npm:^10.0.0, mocha@npm:^10.2.0":
version: 10.2.0
resolution: "mocha@npm:10.2.0"
dependencies:
@@ -27855,6 +28114,30 @@ __metadata:
languageName: node
linkType: hard
"r1csfile@npm:0.0.41, r1csfile@npm:^0.0.41":
version: 0.0.41
resolution: "r1csfile@npm:0.0.41"
dependencies:
"@iden3/bigarray": 0.0.2
"@iden3/binfileutils": 0.0.11
fastfile: 0.0.20
ffjavascript: 0.2.56
checksum: eec689416f66f09db2d6ca66fac1ef6841b088ab29abcde487145ebd2110916c92583e11ac86f0cdcc4e8a3a7c7df9ff5352ad959e8ae385d37c3b51cec5cf4d
languageName: node
linkType: hard
"r1csfile@npm:0.0.47":
version: 0.0.47
resolution: "r1csfile@npm:0.0.47"
dependencies:
"@iden3/bigarray": 0.0.2
"@iden3/binfileutils": 0.0.11
fastfile: 0.0.20
ffjavascript: 0.2.60
checksum: edeb325b83851a71cbca2e5de56eb622ee5347ecae921b526a5fc484c4825b6b30c73b6fde40e9bc5112b9d21e046af885bf212ed9cee2efbc6de93b8454ec06
languageName: node
linkType: hard
"randombytes@npm:^2.0.0, randombytes@npm:^2.0.1, randombytes@npm:^2.0.5, randombytes@npm:^2.1.0":
version: 2.1.0
resolution: "randombytes@npm:2.1.0"
@@ -30213,6 +30496,46 @@ __metadata:
languageName: node
linkType: hard
"snarkjs@npm:0.5.0":
version: 0.5.0
resolution: "snarkjs@npm:0.5.0"
dependencies:
"@iden3/binfileutils": 0.0.11
bfj: ^7.0.2
blake2b-wasm: ^2.4.0
circom_runtime: 0.1.21
ejs: ^3.1.6
fastfile: 0.0.20
ffjavascript: 0.2.56
js-sha3: ^0.8.0
logplease: ^1.2.15
r1csfile: 0.0.41
bin:
snarkjs: build/cli.cjs
checksum: f0233103548bcd0f75b2ff8998ba02437e5131486d126c4a6a31355cd3558c7ce4311e21d5f24ea9ca198d0556e91e63e2ec6aef8da44014c16b29b6a7086ca2
languageName: node
linkType: hard
"snarkjs@npm:^0.7.0":
version: 0.7.2
resolution: "snarkjs@npm:0.7.2"
dependencies:
"@iden3/binfileutils": 0.0.11
bfj: ^7.0.2
blake2b-wasm: ^2.4.0
circom_runtime: 0.1.24
ejs: ^3.1.6
fastfile: 0.0.20
ffjavascript: 0.2.62
js-sha3: ^0.8.0
logplease: ^1.2.15
r1csfile: 0.0.47
bin:
snarkjs: build/cli.cjs
checksum: c784e2171278403b2356ddc42fac47093e7cf4c48c0ef46ac3c269c308795d2da63a00dd6b92521b166f3d0349d0b8301454f5a9633b5db447755b4568c4b5e7
languageName: node
linkType: hard
"sockjs@npm:^0.3.24":
version: 0.3.24
resolution: "sockjs@npm:0.3.24"
@@ -30647,6 +30970,15 @@ __metadata:
languageName: node
linkType: hard
"static-eval@npm:2.0.2":
version: 2.0.2
resolution: "static-eval@npm:2.0.2"
dependencies:
escodegen: ^1.8.1
checksum: 335a923c5ccb29add404ac23d0a55c0da6cee3071f6f67a7053aeac0dedc6dbfc53ac9269e9c25f403f5b7603a291ef47d7114f99bde241184f7aa3f9286dc32
languageName: node
linkType: hard
"statuses@npm:2.0.1":
version: 2.0.1
resolution: "statuses@npm:2.0.1"
@@ -31671,7 +32003,7 @@ __metadata:
languageName: node
linkType: hard
"tmp-promise@npm:3.0.3":
"tmp-promise@npm:3.0.3, tmp-promise@npm:^3.0.3":
version: 3.0.3
resolution: "tmp-promise@npm:3.0.3"
dependencies:
@@ -31833,6 +32165,13 @@ __metadata:
languageName: node
linkType: hard
"tryer@npm:^1.0.1":
version: 1.0.1
resolution: "tryer@npm:1.0.1"
checksum: 1cf14d7f67c79613f054b569bfc9a89c7020d331573a812dfcf7437244e8f8e6eb6893b210cbd9cc217f67c1d72617f89793df231e4fe7d53634ed91cf3a89d1
languageName: node
linkType: hard
"ts-command-line-args@npm:^2.2.0":
version: 2.4.2
resolution: "ts-command-line-args@npm:2.4.2"
@@ -32011,7 +32350,7 @@ __metadata:
languageName: node
linkType: hard
"type-detect@npm:4.0.8, type-detect@npm:^4.0.0, type-detect@npm:^4.0.5":
"type-detect@npm:4.0.8, type-detect@npm:^4.0.0, type-detect@npm:^4.0.5, type-detect@npm:^4.0.8":
version: 4.0.8
resolution: "type-detect@npm:4.0.8"
checksum: 62b5628bff67c0eb0b66afa371bd73e230399a8d2ad30d852716efcc4656a7516904570cd8631a49a3ce57c10225adf5d0cbdcb47f6b0255fe6557c453925a15
@@ -32368,6 +32707,13 @@ __metadata:
languageName: node
linkType: hard
"underscore@npm:1.12.1":
version: 1.12.1
resolution: "underscore@npm:1.12.1"
checksum: ec327603aa112b99fe9d74cd9bf3b3b7451465a9d2610ceab269a532e3f191650ab017903be34dc86fe406a11d04d8905a3b04dd4c129493e51bee09a3f3074c
languageName: node
linkType: hard
"undici-types@npm:~5.25.1":
version: 5.25.3
resolution: "undici-types@npm:5.25.3"
@@ -32834,7 +33180,7 @@ __metadata:
languageName: node
linkType: hard
"util@npm:^0.12.0, util@npm:^0.12.5":
"util@npm:^0.12.0, util@npm:^0.12.4, util@npm:^0.12.5":
version: 0.12.5
resolution: "util@npm:0.12.5"
dependencies:
@@ -33092,6 +33438,15 @@ __metadata:
languageName: node
linkType: hard
"wasmcurves@npm:0.2.0":
version: 0.2.0
resolution: "wasmcurves@npm:0.2.0"
dependencies:
wasmbuilder: 0.0.16
checksum: 0769ca2d0c2f99619436f86dcab16294d94cc0c8a114b0c5e6ed71df49625a6ad35000011fee57471b7647838eeb75f631e74b200996ac2513e8ca0c47e5b8d0
languageName: node
linkType: hard
"wasmcurves@npm:0.2.2":
version: 0.2.2
resolution: "wasmcurves@npm:0.2.2"