diff --git a/.eslintrc.json b/.eslintrc.json
index 21e030869..6d0404b92 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -3,14 +3,14 @@
"env": {
"es6": true
},
- "extends": ["airbnb-base", "airbnb-typescript/base", "plugin:jest/recommended", "plugin:jest/style", "prettier"],
+ "extends": ["airbnb-base", "airbnb-typescript/base", "prettier"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"project": ["./tsconfig.json", "./packages/**/tsconfig.json"]
},
- "plugins": ["@typescript-eslint", "jest"],
+ "plugins": ["@typescript-eslint"],
"rules": {
"no-console": ["warn", { "allow": ["info", "warn", "error"] }],
"no-restricted-syntax": "off",
diff --git a/.github/workflows/production.yml b/.github/workflows/production.yml
index b91de5ee0..70f7ba18f 100644
--- a/.github/workflows/production.yml
+++ b/.github/workflows/production.yml
@@ -51,8 +51,9 @@ jobs:
strategy:
matrix:
type:
- - js
- - sol
+ - circuits
+ - contracts
+ - libraries
steps:
- name: Checkout
@@ -86,7 +87,7 @@ jobs:
- name: Install dependencies
run: yarn
- - name: Test contracts or libraries
+ - name: Test libraries, contracts and circuits
run: yarn test:${{ matrix.type }}
- name: Coveralls
diff --git a/.github/workflows/pull-requests.yml b/.github/workflows/pull-requests.yml
index 2c5127ef6..08df69724 100644
--- a/.github/workflows/pull-requests.yml
+++ b/.github/workflows/pull-requests.yml
@@ -79,5 +79,5 @@ jobs:
- name: Install dependencies
run: yarn
- - name: Test contracts and libraries
+ - name: Test libraries, contracts and circuits
run: yarn test
diff --git a/README.md b/README.md
index 9eaedde15..1a16c4ea9 100644
--- a/README.md
+++ b/README.md
@@ -51,7 +51,8 @@
♚ [Yarn workspaces](https://yarnpkg.com/features/workspaces): minimal monorepo package management (`yarn`, `yarn build`, `yarn docs`)\
♛ [Conventional Commits](https://www.conventionalcommits.org): human and machine readable meaning to commit messages (`yarn commit`)\
-♜ [Jest](https://jestjs.io/): tests and test coverage for all packages (`yarn test`, `yarn test:all`)\
+♜ [Jest](https://jestjs.io/): tests and test coverage for all libraries (`yarn test:libraries`)\
+♜ [Mocha](https://mochajs.org/): tests for circuits and contracts (`yarn test:circuits`, `yarn test:contracts`)\
♞ [ESLint](https://eslint.org/), [Prettier](https://prettier.io/): code quality and formatting (`yarn prettier` & `yarn lint`)\
♝ [Typedocs](https://typedoc.org/): documentation generator for TypeScript (`yarn docs`)\
♟ [Benny](https://github.com/caderek/benny): simple benchmarking framework for JavaScript/TypeScript (`yarn benchmarks`)\
@@ -277,7 +278,7 @@ It will also automatically check that the modified files comply with ESLint and
### Testing
-Test the code with coverage:
+Test the code:
```bash
yarn test
diff --git a/jest.config.ts b/jest.config.ts
index 0fcf75517..9a5df9f0c 100644
--- a/jest.config.ts
+++ b/jest.config.ts
@@ -1,9 +1,12 @@
import fs from "fs"
import type { Config } from "@jest/types"
+const exclude = ["circuits", "imt.sol", "rollup-plugin-rust", "lazytower.sol", "lazytower.circom"]
+
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,
diff --git a/package.json b/package.json
index 933d4dd40..5c7f00fad 100644
--- a/package.json
+++ b/package.json
@@ -11,9 +11,10 @@
"build": "yarn build:js && yarn compile:sol",
"build:js": "yarn workspaces foreach --no-private run build",
"compile:sol": "yarn workspaces foreach run compile",
- "test": "yarn test:js && yarn test:sol",
- "test:js": "jest --coverage",
- "test:sol": "yarn workspace imt.sol test:coverage",
+ "test": "yarn test:libraries && yarn test:contracts && yarn test:circuits",
+ "test:libraries": "jest --coverage",
+ "test:circuits": "yarn workspace @zk-kit/circuits test",
+ "test:contracts": "yarn workspace imt.sol test:coverage",
"lint": "eslint . --ext .js,.ts && yarn workspace imt.sol lint",
"prettier": "prettier -c .",
"prettier:write": "prettier -w .",
@@ -57,7 +58,6 @@
"eslint-config-airbnb-typescript": "^16.1.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.25.2",
- "eslint-plugin-jest": "^25.7.0",
"husky": "^8.0.3",
"jest": "^27.4.1",
"jest-config": "^27.4.7",
diff --git a/packages/circuits/.gitignore b/packages/circuits/.gitignore
new file mode 100644
index 000000000..3527e0da8
--- /dev/null
+++ b/packages/circuits/.gitignore
@@ -0,0 +1,3 @@
+ptau
+circom/main
+circom/test
diff --git a/packages/circuits/.mocharc.json b/packages/circuits/.mocharc.json
new file mode 100644
index 000000000..ba10deedd
--- /dev/null
+++ b/packages/circuits/.mocharc.json
@@ -0,0 +1,7 @@
+{
+ "extension": ["ts"],
+ "require": "ts-node/register",
+ "spec": "./**/*.test.ts",
+ "timeout": 100000,
+ "exit": true
+}
diff --git a/packages/circuits/LICENSE b/packages/circuits/LICENSE
new file mode 100644
index 000000000..4377091ec
--- /dev/null
+++ b/packages/circuits/LICENSE
@@ -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.
diff --git a/packages/circuits/README.md b/packages/circuits/README.md
new file mode 100644
index 000000000..7ac1fb160
--- /dev/null
+++ b/packages/circuits/README.md
@@ -0,0 +1,54 @@
+
+
+ ZK-kit circuits
+
+ A comprehensive library of general-purpose zero-knowledge circuits.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+| This package offers a collection of reusable circuits designed for integration into other projects or protocols, promoting code modularization within the zero-knowledge ecosystem. |
+| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+
+## Circuits
+
+- Circom:
+ - [PoseidonProof](./circom/poseidon-proof.circom): It proves the possession of a Poseidon pre-image without revealing the pre-image itself.
+ - [BinaryMerkleRoot](./circom/binary-merkle-root.circom): It calculates the root of a binary Merkle tree using a provided proof-of-membership.
+
+## 🛠 Install
+
+### npm or yarn
+
+Install the `@zk-kit/circuits` package with npm:
+
+```bash
+npm i @zk-kit/circuits --save
+```
+
+or yarn:
+
+```bash
+yarn add @zk-kit/circuits
+```
diff --git a/packages/circuits/circom/binary-merkle-root.circom b/packages/circuits/circom/binary-merkle-root.circom
new file mode 100644
index 000000000..204d82dc3
--- /dev/null
+++ b/packages/circuits/circom/binary-merkle-root.circom
@@ -0,0 +1,41 @@
+pragma circom 2.1.5;
+
+include "poseidon.circom";
+include "mux1.circom";
+include "comparators.circom";
+
+// This circuit is designed to calculate the root of a binary Merkle
+// tree given a leaf, its depth, and the necessary sibling
+// information (aka proof of membership).
+// A circuit is designed without the capability to iterate through
+// a dynamic array. To address this, a parameter with the static maximum
+// tree depth is defined (i.e. 'MAX_DEPTH'). And additionally, the circuit
+// receives a dynamic depth as an input, which is utilized in calculating the
+// true root of the Merkle tree. The actual depth of the Merkle tree
+// may be equal to or less than the static maximum depth.
+template BinaryMerkleRoot(MAX_DEPTH) {
+ signal input leaf, depth, indices[MAX_DEPTH], siblings[MAX_DEPTH];
+
+ signal output out;
+
+ signal nodes[MAX_DEPTH + 1];
+ nodes[0] <== leaf;
+
+ signal roots[MAX_DEPTH];
+ var root = 0;
+
+ for (var i = 0; i < MAX_DEPTH; i++) {
+ var a = IsEqual()([depth, i]);
+
+ roots[i] <== a * nodes[i];
+
+ root += roots[i];
+
+ var c[2][2] = [ [nodes[i], siblings[i]], [siblings[i], nodes[i]] ];
+ var childNodes[2] = MultiMux1(2)(c, indices[i]);
+
+ nodes[i + 1] <== Poseidon(2)(childNodes);
+ }
+
+ out <== root;
+}
diff --git a/packages/circuits/circom/circuits.json b/packages/circuits/circom/circuits.json
new file mode 100644
index 000000000..6a94add26
--- /dev/null
+++ b/packages/circuits/circom/circuits.json
@@ -0,0 +1,11 @@
+{
+ "poseidon-proof": {
+ "file": "poseidon-proof",
+ "template": "PoseidonProof"
+ },
+ "binary-merkle-root": {
+ "file": "binary-merkle-root",
+ "template": "BinaryMerkleRoot",
+ "params": [4]
+ }
+}
diff --git a/packages/circuits/circom/poseidon-proof.circom b/packages/circuits/circom/poseidon-proof.circom
new file mode 100644
index 000000000..65f7c003b
--- /dev/null
+++ b/packages/circuits/circom/poseidon-proof.circom
@@ -0,0 +1,24 @@
+pragma circom 2.1.5;
+
+include "poseidon.circom";
+
+// This circuit can be used to prove the possession of a pre-image of a
+// hash without revealing the pre-image itself. It utilizes the Poseidon
+// hash function, a highly efficient and secure hash function suited
+// for zero-knowledge proof contexts.
+// A scope value can be used to define a nullifier to prevent the same
+// proof from being re-used twice.
+template PoseidonProof() {
+ // The circuit takes two inputs: the pre-image and an additional scope parameter.
+ signal input preimage;
+ signal input scope;
+
+ // It applies the Poseidon hash function to the pre-image to produce a hash digest.
+ signal output digest;
+ digest <== Poseidon(1)([preimage]);
+
+ // A nullifier is also computed using both the pre-image and the scope, providing a value
+ // to prevent the same proof from being reused twice.
+ signal output nullifier;
+ nullifier <== Poseidon(2)([scope, preimage]);
+}
diff --git a/packages/circuits/circomkit.json b/packages/circuits/circomkit.json
new file mode 100644
index 000000000..936e64b6e
--- /dev/null
+++ b/packages/circuits/circomkit.json
@@ -0,0 +1,17 @@
+{
+ "protocol": "groth16",
+ "prime": "bn128",
+ "version": "2.1.5",
+ "circuits": "./circom/circuits.json",
+ "dirPtau": "./ptau",
+ "dirCircuits": "./circom",
+ "dirInputs": "./inputs",
+ "dirBuild": "./build",
+ "optimization": 1,
+ "inspect": true,
+ "include": ["../../node_modules/circomlib/circuits"],
+ "groth16numContributions": 1,
+ "groth16askForEntropy": false,
+ "logLevel": "INFO",
+ "verbose": true
+}
diff --git a/packages/circuits/noir/.gitkeep b/packages/circuits/noir/.gitkeep
new file mode 100644
index 000000000..e69de29bb
diff --git a/packages/circuits/package.json b/packages/circuits/package.json
new file mode 100644
index 000000000..effc74938
--- /dev/null
+++ b/packages/circuits/package.json
@@ -0,0 +1,32 @@
+{
+ "name": "@zk-kit/circuits",
+ "version": "0.2.0",
+ "description": "A comprehensive library of general-purpose zero-knowledge circuits.",
+ "license": "MIT",
+ "files": [
+ "circom",
+ "noir",
+ "LICENSE",
+ "README.md"
+ ],
+ "repository": "git@github.com:privacy-scaling-explorations/zk-kit.git",
+ "homepage": "https://github.com/privacy-scaling-explorations/zk-kit/tree/main/packages/circuits.sol",
+ "scripts": {
+ "circom:compile": "circomkit compile",
+ "circom:setup": "circomkit setup",
+ "test": "mocha"
+ },
+ "dependencies": {
+ "circomlib": "^2.0.5"
+ },
+ "devDependencies": {
+ "@types/mocha": "^10.0.6",
+ "@zk-kit/smt": "workspace:^",
+ "circomkit": "0.0.19",
+ "mocha": "^10.2.0",
+ "poseidon-lite": "^0.2.0"
+ },
+ "publishConfig": {
+ "access": "public"
+ }
+}
diff --git a/packages/circuits/tests/binary-merkle-root.test.ts b/packages/circuits/tests/binary-merkle-root.test.ts
new file mode 100644
index 000000000..700717f1a
--- /dev/null
+++ b/packages/circuits/tests/binary-merkle-root.test.ts
@@ -0,0 +1,58 @@
+import { LeanIMT } from "@zk-kit/imt"
+import { WitnessTester } from "circomkit"
+import { poseidon2 } from "poseidon-lite"
+import { circomkit } from "./common"
+
+describe("binary-merkle-root", () => {
+ let circuit: WitnessTester<["leaf", "depth", "indices", "siblings"], ["out"]>
+
+ const MAX_DEPTH = 20
+
+ const tree = new LeanIMT((a, b) => poseidon2([a, b]))
+ const leaf = BigInt(0)
+
+ tree.insert(leaf)
+
+ for (let i = 1; i < 8; i += 1) {
+ tree.insert(BigInt(i))
+ }
+
+ const { siblings, 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 indices: number[] = []
+
+ for (let i = 0; i < MAX_DEPTH; i += 1) {
+ indices.push((index >> i) & 1)
+
+ if (siblings[i] === undefined) {
+ siblings[i] = BigInt(0)
+ }
+ }
+
+ const INPUT = {
+ leaf,
+ depth: tree.depth,
+ indices,
+ siblings
+ }
+
+ const OUTPUT = {
+ out: tree.root
+ }
+
+ before(async () => {
+ circuit = await circomkit.WitnessTester("binary-merkle-root", {
+ file: "binary-merkle-root",
+ template: "BinaryMerkleRoot",
+ params: [MAX_DEPTH]
+ })
+ })
+
+ it("Should calculate the root correctly", async () => {
+ await circuit.expectPass(INPUT, OUTPUT)
+ })
+})
diff --git a/packages/circuits/tests/common.ts b/packages/circuits/tests/common.ts
new file mode 100644
index 000000000..20f153fce
--- /dev/null
+++ b/packages/circuits/tests/common.ts
@@ -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
+})
diff --git a/packages/circuits/tests/poseidon-proof.test.ts b/packages/circuits/tests/poseidon-proof.test.ts
new file mode 100644
index 000000000..1662e87c4
--- /dev/null
+++ b/packages/circuits/tests/poseidon-proof.test.ts
@@ -0,0 +1,33 @@
+import { WitnessTester } from "circomkit"
+import { poseidon1, poseidon2 } from "poseidon-lite"
+import { circomkit } from "./common"
+
+describe("poseidon-proof", () => {
+ let circuit: WitnessTester<["preimage", "scope"], ["digest", "nullifier"]>
+
+ const preimage = 3
+ const scope = 2
+ const digest = poseidon1([preimage])
+ const nullifier = poseidon2([scope, preimage])
+
+ const INPUT = {
+ preimage,
+ scope
+ }
+
+ const OUTPUT = {
+ digest,
+ nullifier
+ }
+
+ before(async () => {
+ circuit = await circomkit.WitnessTester("poseidon-proof", {
+ file: "poseidon-proof",
+ template: "PoseidonProof"
+ })
+ })
+
+ it("Should compute hash correctly", async () => {
+ await circuit.expectPass(INPUT, OUTPUT)
+ })
+})
diff --git a/packages/imt.sol/test/BinaryIMT.ts b/packages/imt.sol/test/BinaryIMT.ts
index ae8adc7d5..bdb28a78e 100644
--- a/packages/imt.sol/test/BinaryIMT.ts
+++ b/packages/imt.sol/test/BinaryIMT.ts
@@ -5,7 +5,6 @@ import { run } from "hardhat"
import { poseidon2 } from "poseidon-lite"
import { BinaryIMT, BinaryIMTTest } from "../typechain-types"
-/* eslint-disable jest/valid-expect */
describe("BinaryIMT", () => {
let binaryIMTTest: BinaryIMTTest
let binaryIMT: BinaryIMT
diff --git a/packages/imt.sol/test/LazyIMT.ts b/packages/imt.sol/test/LazyIMT.ts
index fd6ddd68d..4f62c8aff 100644
--- a/packages/imt.sol/test/LazyIMT.ts
+++ b/packages/imt.sol/test/LazyIMT.ts
@@ -6,7 +6,6 @@ import { LazyIMT, LazyIMTTest } from "../typechain-types"
const random = () => poseidon2([Math.floor(Math.random() * 2 ** 40), 0])
-/* eslint-disable jest/valid-expect */
describe("LazyIMT", () => {
let lazyIMTTest: LazyIMTTest
let lazyIMT: LazyIMT
diff --git a/packages/imt.sol/test/LeanIMT.ts b/packages/imt.sol/test/LeanIMT.ts
index 94fd34fc8..2a0494daf 100644
--- a/packages/imt.sol/test/LeanIMT.ts
+++ b/packages/imt.sol/test/LeanIMT.ts
@@ -4,7 +4,6 @@ import { run } from "hardhat"
import { poseidon2 } from "poseidon-lite"
import { LeanIMT, LeanIMTTest } from "../typechain-types"
-/* eslint-disable jest/valid-expect */
describe("LeanIMT", () => {
let leanIMTTest: LeanIMTTest
let leanIMT: LeanIMT
diff --git a/packages/imt.sol/test/QuinaryIMT.ts b/packages/imt.sol/test/QuinaryIMT.ts
index 8fc085972..c6c7c874f 100644
--- a/packages/imt.sol/test/QuinaryIMT.ts
+++ b/packages/imt.sol/test/QuinaryIMT.ts
@@ -4,7 +4,6 @@ import { run } from "hardhat"
import { poseidon5 } from "poseidon-lite"
import { QuinaryIMT, QuinaryIMTTest } from "../typechain-types"
-/* eslint-disable jest/valid-expect */
describe("QuinaryIMT", () => {
let quinaryIMTTest: QuinaryIMTTest
let quinaryIMT: QuinaryIMT
diff --git a/packages/lazytower.circom/tests/index.test.ts b/packages/lazytower.circom/tests/index.test.ts
index 269a524f0..9d5eb53c9 100644
--- a/packages/lazytower.circom/tests/index.test.ts
+++ b/packages/lazytower.circom/tests/index.test.ts
@@ -3,8 +3,6 @@ import { poseidon2 } from "poseidon-lite"
import { LazyTowerHashChainProofBuilder } from "../../lazytower/src"
import { getTester, getUtils } from "./utils"
-/* eslint jest/expect-expect: ["error", { "assertFunctionNames": ["expect", "ok", "fail"] }] */
-
async function utils(templateName: string, args: number[]) {
const srcPath = path.join(__dirname, "..", "circuits", "lazytower-hash-chain.circom")
const libPath = path.join(__dirname, "..", "..", "..", "node_modules") // for circomlib
diff --git a/packages/lazytower.sol/test/LazyTowerHashChainTest.ts b/packages/lazytower.sol/test/LazyTowerHashChainTest.ts
index bb774b40f..6c1b8b126 100644
--- a/packages/lazytower.sol/test/LazyTowerHashChainTest.ts
+++ b/packages/lazytower.sol/test/LazyTowerHashChainTest.ts
@@ -4,7 +4,6 @@ import { ethers, run } from "hardhat"
import { poseidon } from "circomlibjs"
import ShiftTower from "./utils"
-/* eslint-disable jest/valid-expect */
describe("LazyTowerHashChainTest", () => {
let contract: Contract
diff --git a/yarn.lock b/yarn.lock
index 5888ea146..614d0c04c 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -4047,7 +4047,7 @@ __metadata:
languageName: node
linkType: hard
-"@types/mocha@npm:>=9.1.0":
+"@types/mocha@npm:>=9.1.0, @types/mocha@npm:^10.0.6":
version: 10.0.6
resolution: "@types/mocha@npm:10.0.6"
checksum: f7c836cf6cf27dc0f5970d262591b56f2a3caeaec8cfdc612c12e1cfbb207f601f710ece207e935164d4e3343b93be5054d0db5544f31f453b3923775d82099f
@@ -4266,17 +4266,6 @@ __metadata:
languageName: node
linkType: hard
-"@typescript-eslint/experimental-utils@npm:^5.0.0":
- version: 5.62.0
- resolution: "@typescript-eslint/experimental-utils@npm:5.62.0"
- dependencies:
- "@typescript-eslint/utils": 5.62.0
- peerDependencies:
- eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
- checksum: ce55d9f74eac5cb94d66d5db9ead9a5d734f4301519fb5956a57f4b405a5318a115b0316195a3c039e0111489138680411709cb769085d71e1e1db1376ea0949
- languageName: node
- linkType: hard
-
"@typescript-eslint/parser@npm:^5.9.1":
version: 5.62.0
resolution: "@typescript-eslint/parser@npm:5.62.0"
@@ -4399,6 +4388,19 @@ __metadata:
languageName: node
linkType: hard
+"@zk-kit/circuits@workspace:packages/circuits":
+ version: 0.0.0-use.local
+ resolution: "@zk-kit/circuits@workspace:packages/circuits"
+ dependencies:
+ "@types/mocha": ^10.0.6
+ "@zk-kit/smt": "workspace:^"
+ circomkit: 0.0.19
+ circomlib: ^2.0.5
+ mocha: ^10.2.0
+ poseidon-lite: ^0.2.0
+ languageName: unknown
+ linkType: soft
+
"@zk-kit/groth16@0.4.0, @zk-kit/groth16@workspace:packages/groth16":
version: 0.0.0-use.local
resolution: "@zk-kit/groth16@workspace:packages/groth16"
@@ -4486,7 +4488,7 @@ __metadata:
languageName: unknown
linkType: soft
-"@zk-kit/smt@workspace:packages/smt":
+"@zk-kit/smt@workspace:^, @zk-kit/smt@workspace:packages/smt":
version: 0.0.0-use.local
resolution: "@zk-kit/smt@workspace:packages/smt"
dependencies:
@@ -6072,7 +6074,7 @@ __metadata:
languageName: node
linkType: hard
-"chai@npm:^4.2.0, chai@npm:^4.3.6":
+"chai@npm:^4.2.0, chai@npm:^4.3.6, chai@npm:^4.3.7":
version: 4.3.10
resolution: "chai@npm:4.3.10"
dependencies:
@@ -6401,6 +6403,20 @@ __metadata:
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:0.5.1":
version: 0.5.1
resolution: "circomlib@npm:0.5.1"
@@ -8188,23 +8204,6 @@ __metadata:
languageName: node
linkType: hard
-"eslint-plugin-jest@npm:^25.7.0":
- version: 25.7.0
- resolution: "eslint-plugin-jest@npm:25.7.0"
- dependencies:
- "@typescript-eslint/experimental-utils": ^5.0.0
- peerDependencies:
- "@typescript-eslint/eslint-plugin": ^4.0.0 || ^5.0.0
- eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
- peerDependenciesMeta:
- "@typescript-eslint/eslint-plugin":
- optional: true
- jest:
- optional: true
- checksum: fc6da96131f4cbf33d15ef911ec8e600ccd71deb97d73c0ca340427cef7b01ff41a797e2e7d1e351abf97321a46ed0c0acff5ee8eeedac94961dd6dad1f718a9
- languageName: node
- linkType: hard
-
"eslint-scope@npm:^5.1.1":
version: 5.1.1
resolution: "eslint-scope@npm:5.1.1"
@@ -9109,7 +9108,7 @@ __metadata:
languageName: node
linkType: hard
-"ffjavascript@npm:^0.2.30, ffjavascript@npm:^0.2.35, ffjavascript@npm:^0.2.38":
+"ffjavascript@npm:0.2.62, ffjavascript@npm:^0.2.30, ffjavascript@npm:^0.2.35, ffjavascript@npm:^0.2.38":
version: 0.2.62
resolution: "ffjavascript@npm:0.2.62"
dependencies:
@@ -13337,6 +13336,13 @@ __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"
@@ -15487,6 +15493,18 @@ __metadata:
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.1.0":
version: 2.1.0
resolution: "randombytes@npm:2.1.0"
@@ -16825,6 +16843,26 @@ __metadata:
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
+
"socks-proxy-agent@npm:^8.0.1":
version: 8.0.2
resolution: "socks-proxy-agent@npm:8.0.2"
@@ -19576,7 +19614,6 @@ __metadata:
eslint-config-airbnb-typescript: ^16.1.0
eslint-config-prettier: ^8.3.0
eslint-plugin-import: ^2.25.2
- eslint-plugin-jest: ^25.7.0
husky: ^8.0.3
jest: ^27.4.1
jest-config: ^27.4.7