diff --git a/README.md b/README.md index 7c49588..30f93db 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ GitHub Workflow test - Coveralls + Coveralls Linter eslint diff --git a/docs/CNAME b/docs/CNAME new file mode 100644 index 0000000..0283c08 --- /dev/null +++ b/docs/CNAME @@ -0,0 +1 @@ +zkkit.appliedzkp.org diff --git a/jest.config.ts b/jest.config.ts index e02b62a..e443a12 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -8,7 +8,6 @@ const projects: any = fs rootDir: `packages/${name}`, displayName: name, moduleNameMapper: { - "@zk-kit/types": "/../../types/zk-kit/index.d.ts", "@zk-kit/(.*)": "/../$1/src/index.ts" // Interdependency packages. } })) diff --git a/package.json b/package.json index 5ae0089..987c30e 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "build:watch": "lerna run --parallel build:watch -- -- --watch", "test": "jest --coverage", "test:watch": "jest --coverage --watch", - "test:prod": "yarn lint && yarn test", + "test:prod": "yarn lint && yarn test && lerna run test", "lint": "eslint . --ext .js,.jsx,.ts,.tsx", "lint:fix": "eslint . --ext .js,.jsx,.ts,.tsx --fix", "prettier": "prettier -c .", diff --git a/packages/identity/build.tsconfig.json b/packages/identity/build.tsconfig.json index 355f4e1..7e15a6a 100644 --- a/packages/identity/build.tsconfig.json +++ b/packages/identity/build.tsconfig.json @@ -1,10 +1,7 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "declarationDir": "types", - "paths": { - "@zk-kit/types": ["types/zk-kit"] - } + "declarationDir": "types" }, "include": ["src"] } diff --git a/packages/identity/package.json b/packages/identity/package.json index c3c19b9..77cc736 100644 --- a/packages/identity/package.json +++ b/packages/identity/package.json @@ -1,6 +1,6 @@ { "name": "@zk-kit/identity", - "version": "1.2.0", + "version": "1.3.1", "description": "Library for managing identities for Semaphore and RLN protocols.", "license": "MIT", "main": "dist/index.node.js", diff --git a/packages/identity/src/identity.ts b/packages/identity/src/identity.ts index a1f9077..4724c02 100644 --- a/packages/identity/src/identity.ts +++ b/packages/identity/src/identity.ts @@ -1,6 +1,6 @@ -import { SerializedIdentity } from "@zk-kit/types" import { hexToBigint } from "bigint-conversion" import { poseidon } from "circomlibjs" +import { SerializedIdentity } from "./types" import { genRandomNumber, sha256 } from "./utils" // The strategy used to generate the ZK identity. diff --git a/packages/identity/src/types/index.ts b/packages/identity/src/types/index.ts new file mode 100644 index 0000000..e9459c5 --- /dev/null +++ b/packages/identity/src/types/index.ts @@ -0,0 +1,5 @@ +export type SerializedIdentity = { + identityNullifier: string + identityTrapdoor: string + secret: string[] +} diff --git a/packages/incremental-merkle-tree.sol/README.md b/packages/incremental-merkle-tree.sol/README.md index fa69328..68deeef 100644 --- a/packages/incremental-merkle-tree.sol/README.md +++ b/packages/incremental-merkle-tree.sol/README.md @@ -2,7 +2,7 @@

Incremental Merkle Trees (Solidity)

-

Incremental Merkle tree smart contracts.

+

Incremental Merkle tree Solidity libraries.

@@ -34,6 +34,13 @@ +## Libraries: + +✔️ [IncrementalBinaryTree](https://github.com/appliedzkp/zk-kit/blob/main/packages/incremental-merkle-tree.sol/contracts/IncrementalBinaryTree.sol) (Poseidon)\ +✔️ [IncrementalQuinTree](https://github.com/appliedzkp/zk-kit/blob/main/packages/incremental-merkle-tree.sol/contracts/IncrementalQuinTree.sol) (Poseidon) + +> The methods of each library are always the same (i.e `insert`, `remove`, `verify`). + --- ## 🛠 Install @@ -54,13 +61,15 @@ yarn add @zk-kit/incremental-merkle-tree.sol ## 📜 Usage +### Importing and using the library + ```solidity // SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@zk-kit/incremental-merkle-tree.sol/contracts/IncrementalBinaryTree.sol"; -contract Test { +contract Example { using IncrementalBinaryTree for IncrementalTreeData; event TreeCreated(bytes32 id, uint8 depth); @@ -70,7 +79,7 @@ contract Test { mapping(bytes32 => IncrementalTreeData) public trees; function createTree(bytes32 _id, uint8 _depth) external { - require(trees[_id].depth == 0, "Test: tree already exists"); + require(trees[_id].depth == 0, "Example: tree already exists"); trees[_id].init(_depth, 0); @@ -78,7 +87,7 @@ contract Test { } function insertLeaf(bytes32 _treeId, uint256 _leaf) external { - require(trees[_treeId].depth != 0, "Test: tree does not exist"); + require(trees[_treeId].depth != 0, "Example: tree does not exist"); trees[_treeId].insert(_leaf); @@ -88,10 +97,10 @@ contract Test { function removeLeaf( bytes32 _treeId, uint256 _leaf, - uint256[] memory _proofSiblings, - uint8[] memory _proofPathIndices + uint256[] calldata _proofSiblings, + uint8[] calldata _proofPathIndices ) external { - require(trees[_treeId].depth != 0, "Test: tree does not exist"); + require(trees[_treeId].depth != 0, "Example: tree does not exist"); trees[_treeId].remove(_leaf, _proofSiblings, _proofPathIndices); @@ -101,6 +110,55 @@ contract Test { ``` +### Creating an Hardhat task to deploy the contract + +```typescript +import { poseidon_gencontract as poseidonContract } from "circomlibjs" +import { Contract } from "ethers" +import { task, types } from "hardhat/config" + +task("deploy:example", "Deploy an Example contract") + .addOptionalParam("logs", "Print the logs", true, types.boolean) + .setAction(async ({ logs }, { ethers }): Promise => { + const poseidonT3ABI = poseidonContract.generateABI(2) + const poseidonT3Bytecode = poseidonContract.createCode(2) + + const [signer] = await ethers.getSigners() + + const PoseidonLibT3Factory = new ethers.ContractFactory(poseidonT3ABI, poseidonT3Bytecode, signer) + const poseidonT3Lib = await PoseidonLibT3Factory.deploy() + + await poseidonT3Lib.deployed() + + logs && console.log(`PoseidonT3 library has been deployed to: ${poseidonT3Lib.address}`) + + const IncrementalBinaryTreeLibFactory = await ethers.getContractFactory("IncrementalBinaryTree", { + libraries: { + PoseidonT3: poseidonT3Lib.address + } + }) + const incrementalBinaryTreeLib = await IncrementalBinaryTreeLibFactory.deploy() + + await incrementalBinaryTreeLib.deployed() + + logs && console.log(`IncrementalBinaryTree library has been deployed to: ${incrementalBinaryTreeLib.address}`) + + const ContractFactory = await ethers.getContractFactory("Example", { + libraries: { + IncrementalBinaryTree: incrementalBinaryTreeLib.address + } + }) + + const contract = await ContractFactory.deploy() + + await contract.deployed() + + logs && console.log(`Example contract has been deployed to: ${contract.address}`) + + return contract + }) +``` + ## Contacts ### Developers diff --git a/packages/incremental-merkle-tree.sol/contracts/BinaryTreeTest.sol b/packages/incremental-merkle-tree.sol/contracts/BinaryTreeTest.sol index 15a8644..3403c00 100644 --- a/packages/incremental-merkle-tree.sol/contracts/BinaryTreeTest.sol +++ b/packages/incremental-merkle-tree.sol/contracts/BinaryTreeTest.sol @@ -32,8 +32,8 @@ contract BinaryTreeTest { function removeLeaf( bytes32 _treeId, uint256 _leaf, - uint256[] memory _proofSiblings, - uint8[] memory _proofPathIndices + uint256[] calldata _proofSiblings, + uint8[] calldata _proofPathIndices ) external { require(trees[_treeId].depth != 0, "BinaryTreeTest: tree does not exist"); diff --git a/packages/incremental-merkle-tree.sol/contracts/IncrementalBinaryTree.sol b/packages/incremental-merkle-tree.sol/contracts/IncrementalBinaryTree.sol index 86bf087..ce61113 100644 --- a/packages/incremental-merkle-tree.sol/contracts/IncrementalBinaryTree.sol +++ b/packages/incremental-merkle-tree.sol/contracts/IncrementalBinaryTree.sol @@ -76,8 +76,8 @@ library IncrementalBinaryTree { function remove( IncrementalTreeData storage self, uint256 leaf, - uint256[] memory proofSiblings, - uint8[] memory proofPathIndices + uint256[] calldata proofSiblings, + uint8[] calldata proofPathIndices ) public { require(verify(self, leaf, proofSiblings, proofPathIndices), "IncrementalBinaryTree: leaf is not part of the tree"); @@ -111,8 +111,8 @@ library IncrementalBinaryTree { function verify( IncrementalTreeData storage self, uint256 leaf, - uint256[] memory proofSiblings, - uint8[] memory proofPathIndices + uint256[] calldata proofSiblings, + uint8[] calldata proofPathIndices ) private view returns (bool) { require(leaf < SNARK_SCALAR_FIELD, "IncrementalBinaryTree: leaf must be < SNARK_SCALAR_FIELD"); require( diff --git a/packages/incremental-merkle-tree.sol/contracts/IncrementalQuinTree.sol b/packages/incremental-merkle-tree.sol/contracts/IncrementalQuinTree.sol index 851896a..a49157c 100644 --- a/packages/incremental-merkle-tree.sol/contracts/IncrementalQuinTree.sol +++ b/packages/incremental-merkle-tree.sol/contracts/IncrementalQuinTree.sol @@ -86,8 +86,8 @@ library IncrementalQuinTree { function remove( IncrementalTreeData storage self, uint256 leaf, - uint256[4][] memory proofSiblings, - uint8[] memory proofPathIndices + uint256[4][] calldata proofSiblings, + uint8[] calldata proofPathIndices ) public { require(verify(self, leaf, proofSiblings, proofPathIndices), "IncrementalQuinTree: leaf is not part of the tree"); @@ -125,8 +125,8 @@ library IncrementalQuinTree { function verify( IncrementalTreeData storage self, uint256 leaf, - uint256[4][] memory proofSiblings, - uint8[] memory proofPathIndices + uint256[4][] calldata proofSiblings, + uint8[] calldata proofPathIndices ) private view returns (bool) { require(leaf < SNARK_SCALAR_FIELD, "IncrementalQuinTree: leaf must be < SNARK_SCALAR_FIELD"); require( diff --git a/packages/incremental-merkle-tree.sol/contracts/QuinTreeTest.sol b/packages/incremental-merkle-tree.sol/contracts/QuinTreeTest.sol index 4f6233a..b35eb85 100644 --- a/packages/incremental-merkle-tree.sol/contracts/QuinTreeTest.sol +++ b/packages/incremental-merkle-tree.sol/contracts/QuinTreeTest.sol @@ -32,8 +32,8 @@ contract QuinTreeTest { function removeLeaf( bytes32 _treeId, uint256 _leaf, - uint256[4][] memory _proofSiblings, - uint8[] memory _proofPathIndices + uint256[4][] calldata _proofSiblings, + uint8[] calldata _proofPathIndices ) external { require(trees[_treeId].depth != 0, "QuinTreeTest: tree does not exist"); diff --git a/packages/incremental-merkle-tree.sol/package.json b/packages/incremental-merkle-tree.sol/package.json index 3328f30..0a0ffeb 100644 --- a/packages/incremental-merkle-tree.sol/package.json +++ b/packages/incremental-merkle-tree.sol/package.json @@ -1,7 +1,7 @@ { "name": "@zk-kit/incremental-merkle-tree.sol", - "version": "0.2.0", - "description": "Incremental Merkle tree smart contracts.", + "version": "0.3.0", + "description": "Incremental Merkle tree Solidity libraries.", "license": "MIT", "files": [ "contracts/", diff --git a/packages/incremental-merkle-tree/build.tsconfig.json b/packages/incremental-merkle-tree/build.tsconfig.json index 355f4e1..7e15a6a 100644 --- a/packages/incremental-merkle-tree/build.tsconfig.json +++ b/packages/incremental-merkle-tree/build.tsconfig.json @@ -1,10 +1,7 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "declarationDir": "types", - "paths": { - "@zk-kit/types": ["types/zk-kit"] - } + "declarationDir": "types" }, "include": ["src"] } diff --git a/packages/incremental-merkle-tree/package.json b/packages/incremental-merkle-tree/package.json index a3fd70a..4af5039 100644 --- a/packages/incremental-merkle-tree/package.json +++ b/packages/incremental-merkle-tree/package.json @@ -1,6 +1,6 @@ { "name": "@zk-kit/incremental-merkle-tree", - "version": "0.4.1", + "version": "0.4.2", "description": "Incremental Merkle tree implementation in TypeScript.", "license": "MIT", "iife": "dist/index.js", diff --git a/packages/incremental-merkle-tree/src/createProof.ts b/packages/incremental-merkle-tree/src/createProof.ts index 5e07911..8390d3e 100644 --- a/packages/incremental-merkle-tree/src/createProof.ts +++ b/packages/incremental-merkle-tree/src/createProof.ts @@ -1,6 +1,5 @@ -import { MerkleProof } from "@zk-kit/types" import checkParameter from "./checkParameter" -import { Node } from "./types" +import { MerkleProof, Node } from "./types" export default function createProof( index: number, diff --git a/packages/incremental-merkle-tree/src/incremental-merkle-tree.ts b/packages/incremental-merkle-tree/src/incremental-merkle-tree.ts index 626e7b4..b11c148 100644 --- a/packages/incremental-merkle-tree/src/incremental-merkle-tree.ts +++ b/packages/incremental-merkle-tree/src/incremental-merkle-tree.ts @@ -1,9 +1,8 @@ -import { MerkleProof } from "@zk-kit/types" import checkParameter from "./checkParameter" import _createProof from "./createProof" import _indexOf from "./indexOf" import _insert from "./insert" -import { HashFunction, Node } from "./types" +import { HashFunction, MerkleProof, Node } from "./types" import _update from "./update" import _verifyProof from "./verifyProof" diff --git a/packages/incremental-merkle-tree/src/types/index.ts b/packages/incremental-merkle-tree/src/types/index.ts index 65ff857..f8e47c3 100644 --- a/packages/incremental-merkle-tree/src/types/index.ts +++ b/packages/incremental-merkle-tree/src/types/index.ts @@ -1,3 +1,10 @@ export type Node = any export type HashFunction = (values: Node[]) => Node + +export type MerkleProof = { + root: any + leaf: any + siblings: any[] + pathIndices: number[] +} diff --git a/packages/incremental-merkle-tree/src/verifyProof.ts b/packages/incremental-merkle-tree/src/verifyProof.ts index dd4c246..0bb97c7 100644 --- a/packages/incremental-merkle-tree/src/verifyProof.ts +++ b/packages/incremental-merkle-tree/src/verifyProof.ts @@ -1,6 +1,5 @@ -import { MerkleProof } from "@zk-kit/types" import checkParameter from "./checkParameter" -import { HashFunction } from "./types" +import { HashFunction, MerkleProof } from "./types" export default function verifyProof(proof: MerkleProof, hash: HashFunction): boolean { checkParameter(proof, "proof", "object") diff --git a/packages/protocols/build.tsconfig.json b/packages/protocols/build.tsconfig.json index 3d90418..330b2e3 100644 --- a/packages/protocols/build.tsconfig.json +++ b/packages/protocols/build.tsconfig.json @@ -1,11 +1,9 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "allowJs": true, - "declarationDir": "types", - "paths": { - "@zk-kit/types": ["types/zk-kit"] - } + "baseUrl": ".", + "declarationDir": "dist/types", + "allowJs": true }, "include": ["src"] } diff --git a/packages/protocols/package.json b/packages/protocols/package.json index 5d69008..5b96414 100644 --- a/packages/protocols/package.json +++ b/packages/protocols/package.json @@ -1,6 +1,6 @@ { "name": "@zk-kit/protocols", - "version": "1.2.5", + "version": "1.4.2", "description": "Client library for generating and verifying Semaphore & RLN ZK proofs.", "license": "MIT", "main": "dist/index.node.js", @@ -30,15 +30,15 @@ "access": "public" }, "devDependencies": { - "@rollup/plugin-typescript": "^8.3.0", "rollup-plugin-cleanup": "^3.2.1", + "rollup-plugin-typescript2": "^0.31.2", "typedoc": "^0.22.11" }, "dependencies": { - "@zk-kit/incremental-merkle-tree": "^0.4.1", "@ethersproject/bytes": "^5.5.0", "@ethersproject/solidity": "^5.5.0", "@ethersproject/strings": "^5.5.0", + "@zk-kit/incremental-merkle-tree": "^0.4.2", "circomlibjs": "0.0.8", "ffjavascript": "0.2.38", "snarkjs": "^0.4.13" diff --git a/packages/protocols/rollup.config.ts b/packages/protocols/rollup.config.ts index 0dce073..3f01973 100644 --- a/packages/protocols/rollup.config.ts +++ b/packages/protocols/rollup.config.ts @@ -1,4 +1,4 @@ -import typescript from "@rollup/plugin-typescript" +import typescript from "rollup-plugin-typescript2" import * as fs from "fs" import cleanup from "rollup-plugin-cleanup" @@ -19,5 +19,8 @@ export default { { file: pkg.exports.import, format: "es", banner } ], external: Object.keys(pkg.dependencies), - plugins: [typescript({ tsconfig: "./build.tsconfig.json" }), cleanup({ comments: "jsdoc" })] + plugins: [ + typescript({ tsconfig: "./build.tsconfig.json", useTsconfigDeclarationDir: true }), + cleanup({ comments: "jsdoc" }) + ] } diff --git a/packages/protocols/src/index.ts b/packages/protocols/src/index.ts index 43796a5..9ffafb8 100644 --- a/packages/protocols/src/index.ts +++ b/packages/protocols/src/index.ts @@ -1,6 +1,7 @@ -import { FullProof, MerkleProof, SolidityProof } from "@zk-kit/types" +import { MerkleProof } from "@zk-kit/incremental-merkle-tree" import RLN from "./rln" import Semaphore from "./semaphore" +import { FullProof, SolidityProof } from "./types" import { generateMerkleProof, genExternalNullifier, genSignalHash } from "./utils" export { diff --git a/packages/protocols/src/rln.ts b/packages/protocols/src/rln.ts index 4fb1cbb..544ee77 100644 --- a/packages/protocols/src/rln.ts +++ b/packages/protocols/src/rln.ts @@ -1,5 +1,6 @@ -import { MerkleProof, StrBigInt } from "@zk-kit/types" +import { MerkleProof } from "@zk-kit/incremental-merkle-tree" import { poseidon } from "circomlibjs" +import { StrBigInt } from "./types" import { Fq, genSignalHash } from "./utils" import ZkProtocol from "./zk-protocol" diff --git a/packages/protocols/src/semaphore.ts b/packages/protocols/src/semaphore.ts index bcc63a0..d49d9f3 100644 --- a/packages/protocols/src/semaphore.ts +++ b/packages/protocols/src/semaphore.ts @@ -1,5 +1,6 @@ -import { MerkleProof, SemaphoreWitness, StrBigInt } from "@zk-kit/types" +import { MerkleProof } from "@zk-kit/incremental-merkle-tree" import { poseidon } from "circomlibjs" +import { SemaphoreWitness, StrBigInt } from "./types" import { genSignalHash } from "./utils" import ZkProtocol from "./zk-protocol" diff --git a/packages/protocols/src/types/index.ts b/packages/protocols/src/types/index.ts new file mode 100644 index 0000000..cedefa7 --- /dev/null +++ b/packages/protocols/src/types/index.ts @@ -0,0 +1,25 @@ +export type StrBigInt = string | bigint + +export type Proof = { + pi_a: StrBigInt[] + pi_b: StrBigInt[][] + pi_c: StrBigInt[] + protocol: string + curve: string +} + +export type FullProof = { + proof: Proof + publicSignals: StrBigInt[] +} + +export type SolidityProof = StrBigInt[] + +export type SemaphoreWitness = { + identity_nullifier: StrBigInt + identity_trapdoor: StrBigInt + path_elements: StrBigInt[] + identity_path_index: number[] + external_nullifier: StrBigInt + signal_hash: StrBigInt +} diff --git a/packages/protocols/src/utils.ts b/packages/protocols/src/utils.ts index 69a8b5e..ce74a34 100644 --- a/packages/protocols/src/utils.ts +++ b/packages/protocols/src/utils.ts @@ -1,10 +1,10 @@ import { hexlify } from "@ethersproject/bytes" import { keccak256 } from "@ethersproject/solidity" import { toUtf8Bytes } from "@ethersproject/strings" -import { IncrementalMerkleTree } from "@zk-kit/incremental-merkle-tree" -import { MerkleProof, StrBigInt } from "@zk-kit/types" +import { IncrementalMerkleTree, MerkleProof } from "@zk-kit/incremental-merkle-tree" import { poseidon } from "circomlibjs" import { ZqField } from "ffjavascript" +import { StrBigInt } from "./types" export const SNARK_FIELD_SIZE = BigInt("21888242871839275222246405745257275088548364400416034343698204186575808495617") diff --git a/packages/protocols/src/zk-protocol.ts b/packages/protocols/src/zk-protocol.ts index 73936a6..36bd766 100644 --- a/packages/protocols/src/zk-protocol.ts +++ b/packages/protocols/src/zk-protocol.ts @@ -1,5 +1,7 @@ -import { FullProof, SolidityProof } from "@zk-kit/types" import { groth16 } from "snarkjs" +import { FullProof, SolidityProof } from "./types" +import { getFileBuffer } from "./utils" +import { builder } from "./witness_calculator" export default class ZkProtocol { /** @@ -32,16 +34,17 @@ export default class ZkProtocol { * @returns The Solidity compatible proof. */ public static packToSolidityProof(fullProof: FullProof): SolidityProof { - const { proof, publicSignals } = fullProof + const { proof } = fullProof - return { - a: [proof.pi_a[0], proof.pi_a[1]], - b: [ - [proof.pi_b[0][1], proof.pi_b[0][0]], - [proof.pi_b[1][1], proof.pi_b[1][0]] - ], - c: [proof.pi_c[0], proof.pi_c[1]], - inputs: publicSignals - } + return [ + proof.pi_a[0], + proof.pi_a[1], + proof.pi_b[0][1], + proof.pi_b[0][0], + proof.pi_b[1][1], + proof.pi_b[1][0], + proof.pi_c[0], + proof.pi_c[1] + ] } } diff --git a/packages/protocols/yarn.lock b/packages/protocols/yarn.lock index db1618d..9c6f751 100644 --- a/packages/protocols/yarn.lock +++ b/packages/protocols/yarn.lock @@ -228,21 +228,12 @@ fastfile "0.0.19" ffjavascript "^0.2.48" -"@rollup/plugin-typescript@^8.3.0": - version "8.3.0" - resolved "https://registry.yarnpkg.com/@rollup/plugin-typescript/-/plugin-typescript-8.3.0.tgz#bc1077fa5897b980fc27e376c4e377882c63e68b" - integrity sha512-I5FpSvLbtAdwJ+naznv+B4sjXZUcIvLLceYpITAn7wAP8W0wqc5noLdGIp9HGVntNhRWXctwPYrSSFQxtl0FPA== +"@rollup/pluginutils@^4.1.2": + version "4.1.2" + resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-4.1.2.tgz#ed5821c15e5e05e32816f5fb9ec607cdf5a75751" + integrity sha512-ROn4qvkxP9SyPeHaf7uQC/GPFY6L/OWy9+bd9AwcjOAWQwxRscoEyAUD8qCY5o5iL4jqQwoLk2kaTKJPb/HwzQ== dependencies: - "@rollup/pluginutils" "^3.1.0" - resolve "^1.17.0" - -"@rollup/pluginutils@^3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.1.0.tgz#706b4524ee6dc8b103b3c995533e5ad680c02b9b" - integrity sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg== - dependencies: - "@types/estree" "0.0.39" - estree-walker "^1.0.1" + estree-walker "^2.0.1" picomatch "^2.2.2" "@sindresorhus/is@^0.14.0": @@ -257,6 +248,14 @@ dependencies: defer-to-connect "^1.0.1" +"@ts-type/package-dts@^1.0.58": + version "1.0.58" + resolved "https://registry.yarnpkg.com/@ts-type/package-dts/-/package-dts-1.0.58.tgz#75f6fdf5f1e8f262a5081b90346439b4c4bc8d01" + integrity sha512-Ry5RPZDAnSz/gyLtjd2a2yNC07CZ/PCOsuDzYj3phOolIgEH68HXRw6SbsDlavnVUEenDYj5GUM10gQ5iVEbVQ== + dependencies: + "@types/semver" "^7.3.9" + ts-type "^2.1.4" + "@types/bn.js@^4.11.5": version "4.11.6" resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.6.tgz#c306c70d9358aaea33cd4eda092a742b9505967c" @@ -271,11 +270,6 @@ dependencies: "@types/node" "*" -"@types/estree@0.0.39": - version "0.0.39" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" - integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw== - "@types/node@*": version "17.0.9" resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.9.tgz#0b7f161afb5b1cc12518d29b2cdc7175d5490628" @@ -300,6 +294,21 @@ dependencies: "@types/node" "*" +"@types/semver@^7.3.9": + version "7.3.9" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.9.tgz#152c6c20a7688c30b967ec1841d31ace569863fc" + integrity sha512-L/TMpyURfBkf+o/526Zb6kd/tchUP3iBDEPjqjb+U2MAJhVRxxrmr2fwpe08E7QsV7YLcpq0tUaQ9O9x97ZIxQ== + +"@yarn-tool/resolve-package@^1.0.40": + version "1.0.42" + resolved "https://registry.yarnpkg.com/@yarn-tool/resolve-package/-/resolve-package-1.0.42.tgz#4a72c1a77b7035dc86250744d2cdbc16292bc4f8" + integrity sha512-1BAsoiD6jGAaPc7mRH0UxIVXgRSTv7fnhwfKkaFUYpqsU4ZR7KIigZTMcb2bujtlzKQbNneMPQGjiqe3F8cmlw== + dependencies: + "@ts-type/package-dts" "^1.0.58" + pkg-dir "< 6 >= 5" + tslib "^2.3.1" + upath2 "^3.1.12" + accepts@~1.3.7: version "1.3.7" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" @@ -708,6 +717,11 @@ combined-stream@^1.0.6, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" +commondir@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" + integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs= + concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" @@ -1027,10 +1041,10 @@ estree-walker@^0.6.1: resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.6.1.tgz#53049143f40c6eb918b23671d1fe3219f3a1b362" integrity sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w== -estree-walker@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-1.0.1.tgz#31bc5d612c96b704106b477e6dd5d8aa138cb700" - integrity sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg== +estree-walker@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac" + integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w== etag@~1.8.1: version "1.8.1" @@ -1253,6 +1267,31 @@ finalhandler@~1.1.2: statuses "~1.5.0" unpipe "~1.0.0" +find-cache-dir@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.2.tgz#b30c5b6eff0730731aea9bbd9dbecbd80256d64b" + integrity sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig== + dependencies: + commondir "^1.0.1" + make-dir "^3.0.2" + pkg-dir "^4.1.0" + +find-up@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + +find-up@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + foreach@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" @@ -1282,6 +1321,15 @@ fresh@0.5.2: resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= +fs-extra@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.0.0.tgz#9ff61b655dde53fb34a82df84bb214ce802e17c1" + integrity sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + fs-extra@^4.0.2: version "4.0.3" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" @@ -1408,7 +1456,7 @@ got@^7.1.0: url-parse-lax "^1.0.0" url-to-options "^1.0.1" -graceful-fs@^4.1.2, graceful-fs@^4.1.6: +graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0: version "4.2.9" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.9.tgz#041b05df45755e587a24942279b9d113146e1c96" integrity sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ== @@ -1597,7 +1645,7 @@ is-callable@^1.1.4, is-callable@^1.2.4: resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w== -is-core-module@^2.8.0: +is-core-module@^2.8.1: version "2.8.1" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.8.1.tgz#f59fdfca701d5879d0a6b100a40aa1560ce27211" integrity sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA== @@ -1789,6 +1837,15 @@ jsonfile@^4.0.0: optionalDependencies: graceful-fs "^4.1.6" +jsonfile@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" + integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== + dependencies: + universalify "^2.0.0" + optionalDependencies: + graceful-fs "^4.1.6" + jsprim@^1.2.2: version "1.4.2" resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.2.tgz#712c65533a15c878ba59e9ed5f0e26d5b77c5feb" @@ -1815,6 +1872,20 @@ keyv@^3.0.0: dependencies: json-buffer "3.0.0" +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" + +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + logplease@^1.2.15: version "1.2.15" resolved "https://registry.yarnpkg.com/logplease/-/logplease-1.2.15.tgz#3da442e93751a5992cc19010a826b08d0293c48a" @@ -1842,6 +1913,13 @@ magic-string@^0.25.7: dependencies: sourcemap-codec "^1.4.4" +make-dir@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" + integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== + dependencies: + semver "^6.0.0" + marked@^4.0.10: version "4.0.10" resolved "https://registry.yarnpkg.com/marked/-/marked-4.0.10.tgz#423e295385cc0c3a70fa495e0df68b007b879423" @@ -2133,6 +2211,34 @@ p-finally@^1.0.0: resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= +p-limit@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + +p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + p-timeout@^1.1.1: version "1.2.1" resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-1.2.1.tgz#5eb3b353b7fce99f101a1038880bb054ebbea386" @@ -2140,6 +2246,11 @@ p-timeout@^1.1.1: dependencies: p-finally "^1.0.0" +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + parse-asn1@^5.0.0, parse-asn1@^5.1.5: version "5.1.6" resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.6.tgz#385080a3ec13cb62a62d39409cb3e88844cdaed4" @@ -2161,16 +2272,35 @@ parseurl@~1.3.3: resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= +path-is-network-drive@^1.0.13: + version "1.0.13" + resolved "https://registry.yarnpkg.com/path-is-network-drive/-/path-is-network-drive-1.0.13.tgz#c9aa0183eb72c328aa83f43def93ddcb9d7ec4d4" + integrity sha512-Hg74mRN6mmXV+gTm3INjFK40ncAmC/Lo4qoQaSZ+GT3hZzlKdWQSqAjqyPeW0SvObP2W073WyYEBWY9d3wOm3A== + dependencies: + tslib "^2.3.1" + path-parse@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== +path-strip-sep@^1.0.10: + version "1.0.10" + resolved "https://registry.yarnpkg.com/path-strip-sep/-/path-strip-sep-1.0.10.tgz#2be4e789406b298af8709ff79af716134b733b98" + integrity sha512-JpCy+8LAJQQTO1bQsb/84s1g+/Stm3h39aOpPRBQ/paMUGVPPZChLTOTKHoaCkc/6sKuF7yVsnq5Pe1S6xQGcA== + dependencies: + tslib "^2.3.1" + path-to-regexp@0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" @@ -2202,6 +2332,20 @@ picomatch@^2.2.2: resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== +"pkg-dir@< 6 >= 5": + version "5.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-5.0.0.tgz#a02d6aebe6ba133a928f74aec20bafdfe6b8e760" + integrity sha512-NPE8TDbzl/3YQYY7CSS228s3g2ollTFnc+Qi3tqmqJp9Vg2ovUpixcJEo2HJScN2Ez+kEaal6y70c0ehqJBJeA== + dependencies: + find-up "^5.0.0" + +pkg-dir@^4.1.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" + integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== + dependencies: + find-up "^4.0.0" + prepend-http@^1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" @@ -2364,12 +2508,12 @@ request@^2.79.0: tunnel-agent "^0.6.0" uuid "^3.3.2" -resolve@^1.17.0: - version "1.21.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.21.0.tgz#b51adc97f3472e6a5cf4444d34bc9d6b9037591f" - integrity sha512-3wCbTpk5WJlyE4mSOtDLhqQmGFi0/TD9VPwmiolnk8U0wRgMEktqCXd3vy5buTO3tljvalNvKrjHEfrd2WpEKA== +resolve@^1.20.0: + version "1.22.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.0.tgz#5e0b8c67c15df57a89bdbabe603a002f21731198" + integrity sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw== dependencies: - is-core-module "^2.8.0" + is-core-module "^2.8.1" path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" @@ -2403,6 +2547,18 @@ rollup-plugin-cleanup@^3.2.1: js-cleanup "^1.2.0" rollup-pluginutils "^2.8.2" +rollup-plugin-typescript2@^0.31.2: + version "0.31.2" + resolved "https://registry.yarnpkg.com/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.31.2.tgz#463aa713a7e2bf85b92860094b9f7fb274c5a4d8" + integrity sha512-hRwEYR1C8xDGVVMFJQdEVnNAeWRvpaY97g5mp3IeLnzhNXzSVq78Ye/BJ9PAaUfN4DXa/uDnqerifMOaMFY54Q== + dependencies: + "@rollup/pluginutils" "^4.1.2" + "@yarn-tool/resolve-package" "^1.0.40" + find-cache-dir "^3.3.2" + fs-extra "^10.0.0" + resolve "^1.20.0" + tslib "^2.3.1" + rollup-pluginutils@^2.8.2: version "2.8.2" resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz#72f2af0748b592364dbd3389e600e5a9444a351e" @@ -2439,6 +2595,11 @@ secp256k1@^4.0.1: node-addon-api "^2.0.0" node-gyp-build "^4.2.0" +semver@^6.0.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + send@0.17.2: version "0.17.2" resolved "https://registry.yarnpkg.com/send/-/send-0.17.2.tgz#926622f76601c41808012c8bf1688fe3906f7820" @@ -2534,10 +2695,10 @@ skip-regex@^1.0.2: resolved "https://registry.yarnpkg.com/skip-regex/-/skip-regex-1.0.2.tgz#ac655d77e7c771ac2b9f37585fea37bff56ad65b" integrity sha512-pEjMUbwJ5Pl/6Vn6FsamXHXItJXSRftcibixDmNCWbWhic0hzHrwkMZo0IZ7fMRH9KxcWDFSkzhccB4285PutA== -snarkjs@^0.4.13: - version "0.4.13" - resolved "https://registry.yarnpkg.com/snarkjs/-/snarkjs-0.4.13.tgz#acf5baa70413fe3c2b1de2082eee59f2759472a7" - integrity sha512-+GlCPLveNrFZob1PejLzRYsvyMLpTArkS/ncqodNJfWwrcfg60HRngvMZBvTP2Toa5LD1hS61c3ajbNIcPj5EQ== +snarkjs@^0.4.12: + version "0.4.12" + resolved "https://registry.yarnpkg.com/snarkjs/-/snarkjs-0.4.12.tgz#0344cb6d107b92be3ec29fa321e83232058d9209" + integrity sha512-3WBzv9p0QlwtrM7Zgq3oW5L/4Q5bZEZpGN6IS522jUffKXF2temXzVvn7lukOIr/acaVKyj/DkYdt2JIas2B5A== dependencies: "@iden3/binfileutils" "0.0.10" blake2b-wasm "^2.4.0" @@ -2675,6 +2836,19 @@ tough-cookie@~2.5.0: psl "^1.1.28" punycode "^2.1.1" +ts-type@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/ts-type/-/ts-type-2.1.4.tgz#d268d52ac054ef3076bf1c3b2fde0d4d5496e6a3" + integrity sha512-wnajiiIMhn/RHJ1oPld95siKmMJrOgaT6+rMmC8vO1LORgDFEzKP2nBmEFM5b4XVe7Q0J5KcU9oRJFzju7UzrA== + dependencies: + tslib "^2.3.1" + typedarray-dts "^1.0.0" + +tslib@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" + integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== + tunnel-agent@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" @@ -2705,6 +2879,11 @@ type@^2.5.0: resolved "https://registry.yarnpkg.com/type/-/type-2.5.0.tgz#0a2e78c2e77907b252abe5f298c1b01c63f0db3d" integrity sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw== +typedarray-dts@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/typedarray-dts/-/typedarray-dts-1.0.0.tgz#9dec9811386dbfba964c295c2606cf9a6b982d06" + integrity sha512-Ka0DBegjuV9IPYFT1h0Qqk5U4pccebNIJCGl8C5uU7xtOs+jpJvKGAY4fHGK25hTmXZOEUl9Cnsg5cS6K/b5DA== + typedarray-to-buffer@^3.1.5: version "3.1.5" resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" @@ -2743,11 +2922,25 @@ universalify@^0.1.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== +universalify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" + integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== + unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= +upath2@^3.1.12: + version "3.1.12" + resolved "https://registry.yarnpkg.com/upath2/-/upath2-3.1.12.tgz#441b3dfbadde21731017bd1b7beb169498efd0a9" + integrity sha512-yC3eZeCyCXFWjy7Nu4pgjLhXNYjuzuUmJiRgSSw6TJp8Emc+E4951HGPJf+bldFC5SL7oBLeNbtm1fGzXn2gxw== + dependencies: + path-is-network-drive "^1.0.13" + path-strip-sep "^1.0.10" + tslib "^2.3.1" + uri-js@^4.2.2: version "4.4.1" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" @@ -3215,3 +3408,8 @@ yallist@^3.0.0, yallist@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== diff --git a/packages/sparse-merkle-tree/build.tsconfig.json b/packages/sparse-merkle-tree/build.tsconfig.json index 355f4e1..7e15a6a 100644 --- a/packages/sparse-merkle-tree/build.tsconfig.json +++ b/packages/sparse-merkle-tree/build.tsconfig.json @@ -1,10 +1,7 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "declarationDir": "types", - "paths": { - "@zk-kit/types": ["types/zk-kit"] - } + "declarationDir": "types" }, "include": ["src"] } diff --git a/tsconfig.json b/tsconfig.json index 42b7752..80ad710 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -13,7 +13,6 @@ "declarationDir": "types", "typeRoots": ["node_modules/@types", "types"], "paths": { - "@zk-kit/types": ["types/zk-kit"], "@zk-kit/*": ["packages/*/src"] } }, diff --git a/types/zk-kit/index.d.ts b/types/zk-kit/index.d.ts deleted file mode 100644 index 7fed242..0000000 --- a/types/zk-kit/index.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -export type StrBigInt = string | bigint - -export declare type Proof = { - pi_a: StrBigInt[] - pi_b: StrBigInt[][] - pi_c: StrBigInt[] - protocol: string - curve: string -} - -export declare type FullProof = { - proof: Proof - publicSignals: StrBigInt[] -} - -export declare type SolidityProof = { - a: [StrBigInt, StrBigInt] - b: [[StrBigInt, StrBigInt], [StrBigInt, StrBigInt]] - c: [StrBigInt, StrBigInt] - inputs: StrBigInt[] -} - -export declare type SemaphoreWitness = { - identity_nullifier: StrBigInt - identity_trapdoor: StrBigInt - path_elements: StrBigInt[] - identity_path_index: number[] - external_nullifier: StrBigInt - signal_hash: StrBigInt -} - -export declare type MerkleProof = { - root: any - leaf: any - siblings: any[] - pathIndices: number[] -} - -export declare type SerializedIdentity = { - identityNullifier: string - identityTrapdoor: string - secret: string[] -}