Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(imt-lean-imt): change import path #5

Merged
merged 6 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"repository": "[email protected]:zk-passport/zk-kit.git",
"homepage": "https://www.openpassport.app/",
"scripts": {
"_build": "yarn workspaces foreach -A -t --no-private run build",
"build": "turbo _build",
"_yarnBuild": "yarn workspaces foreach -A -t --no-private run build",
"build": "turbo _build && yarn workspaces foreach -A -t --no-private run build",
"_test": "jest --coverage",
"test": "turbo _test",
"test:library": "jest --coverage packages/${0}",
Expand All @@ -25,8 +25,7 @@
"remove:stable-version-field": "ts-node scripts/remove-stable-version-field.ts ${0} && yarn format:prettier:write",
"precommit": "lint-staged",
"postinstall": "husky && git config --local core.editor cat",
"style": "turbo lint:eslint format:prettier",
"publish": "npm publish --access public"
"style": "turbo lint:eslint format:prettier"
},
"keywords": [
"javascript",
Expand Down
16 changes: 7 additions & 9 deletions packages/imt/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zk-kit/imt",
"version": "2.0.0-beta.6",
"name": "@openpassport/zk-kit-imt",
"version": "0.0.4",
"description": "Incremental Merkle tree implementation in TypeScript.",
"type": "module",
"license": "MIT",
Expand All @@ -22,14 +22,12 @@
"LICENSE",
"README.md"
],
"repository": "[email protected]:privacy-scaling-explorations/zk-kit.git",
"homepage": "https://github.com/privacy-scaling-explorations/zk-kit/tree/main/packages/imt",
"bugs": {
"url": "https://github.com/privacy-scaling-explorations/zk-kit.git/issues"
},
"repository": "[email protected]:zk-passport/zk-kit.git",
"homepage": "https://www.openpassport.app/",
"scripts": {
"build": "rimraf dist && rollup -c rollup.config.ts --configPlugin typescript",
"prepublishOnly": "yarn build"
"prepublishOnly": "yarn build",
"publish": "npm publish --access public"
},
"publishConfig": {
"access": "public"
Expand All @@ -47,6 +45,6 @@
"rollup-plugin-polyfill-node": "^0.13.0"
},
"dependencies": {
"@zk-kit/utils": "1.2.1"
"@openpassport/zk-kit-utils": "0.0.1"
}
}
2 changes: 1 addition & 1 deletion packages/imt/rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default [
{ file: pkg.exports["."].require, format: "cjs", banner },
{ file: pkg.exports["."].default, format: "es", banner }
],
external: [...Object.keys(pkg.dependencies), "@zk-kit/utils/error-handlers"],
external: [...Object.keys(pkg.dependencies), "@openpassport/zk-kit-utils/error-handlers"],
plugins: [typescript({ tsconfig: "./build.tsconfig.json" }), cleanup({ comments: "jsdoc" })]
},
{
Expand Down
10 changes: 8 additions & 2 deletions packages/imt/src/imt.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
import { requireArray, requireFunction, requireNumber, requireObject, requireTypes } from "@zk-kit/utils/error-handlers"
import {
requireArray,
requireFunction,
requireNumber,
requireObject,
requireTypes
} from "@openpassport/zk-kit-utils/error-handlers"
import { IMTHashFunction, IMTMerkleProof, IMTNode } from "./types"

/**
Expand Down Expand Up @@ -132,7 +138,7 @@ export default class IMT {
public get leaves(): IMTNode[] {
return this._nodes[0].slice()
}

/**
* The list of zero values calculated during the initialization of the tree.
* @returns The list of pre-computed zeroes.
Expand Down
16 changes: 7 additions & 9 deletions packages/lean-imt/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zk-kit/lean-imt",
"version": "2.2.1",
"name": "@openpassport/zk-kit-lean-imt",
"version": "0.0.4",
"description": "Lean Incremental Merkle tree implementation in TypeScript.",
"type": "module",
"license": "MIT",
Expand All @@ -22,14 +22,12 @@
"LICENSE",
"README.md"
],
"repository": "[email protected]:privacy-scaling-explorations/zk-kit.git",
"homepage": "https://github.com/privacy-scaling-explorations/zk-kit/tree/main/packages/lean-imt",
"bugs": {
"url": "https://github.com/privacy-scaling-explorations/zk-kit.git/issues"
},
"repository": "[email protected]:zk-passport/zk-kit.git",
"homepage": "https://www.openpassport.app/",
"scripts": {
"build": "rimraf dist && rollup -c rollup.config.ts --configPlugin typescript",
"prepublishOnly": "yarn build"
"prepublishOnly": "yarn build",
"publish": "npm publish --access public"
},
"publishConfig": {
"access": "public"
Expand All @@ -47,6 +45,6 @@
"rollup-plugin-polyfill-node": "^0.13.0"
},
"dependencies": {
"@zk-kit/utils": "1.2.1"
"@openpassport/zk-kit-utils": "0.0.1"
}
}
2 changes: 1 addition & 1 deletion packages/lean-imt/rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default [
{ file: pkg.exports["."].require, format: "cjs", banner },
{ file: pkg.exports["."].default, format: "es", banner }
],
external: [...Object.keys(pkg.dependencies), "@zk-kit/utils/error-handlers"],
external: [...Object.keys(pkg.dependencies), "@openpassport/zk-kit-utils/error-handlers"],
plugins: [typescript({ tsconfig: "./build.tsconfig.json" }), cleanup({ comments: "jsdoc" })]
},
{
Expand Down
2 changes: 1 addition & 1 deletion packages/lean-imt/src/lean-imt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
requireDefined,
requireNumber,
requireString
} from "@zk-kit/utils/error-handlers"
} from "@openpassport/zk-kit-utils/error-handlers"
import { LeanIMTHashFunction, LeanIMTMerkleProof } from "./types"

/**
Expand Down
11 changes: 6 additions & 5 deletions packages/smt/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zk-kit/smt",
"version": "1.0.1",
"name": "@openpassport/zk-kit-smt",
"version": "0.0.1",
"description": "Sparse Merkle tree implementation in TypeScript.",
"type": "module",
"license": "MIT",
Expand All @@ -27,16 +27,17 @@
"README.md",
"LICENSE"
],
"repository": "[email protected]:privacy-scaling-explorations/zk-kit.git",
"homepage": "https://github.com/privacy-scaling-explorations/zk-kit/tree/main/packages/smt",
"repository": "[email protected]:zk-passport/zk-kit.git",
"homepage": "https://www.openpassport.app/",
"author": {
"name": "Cedoor",
"email": "[email protected]",
"url": "https://cedoor.dev"
},
"scripts": {
"build": "rimraf dist && rollup -c rollup.config.ts --configPlugin typescript",
"prepublishOnly": "yarn build"
"prepublishOnly": "yarn build",
"publish": "npm publish --access public"
},
"publishConfig": {
"access": "public"
Expand Down
14 changes: 6 additions & 8 deletions packages/utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zk-kit/utils",
"version": "1.2.1",
"name": "@openpassport/zk-kit-utils",
"version": "0.0.1",
"description": "Essential zero-knowledge utility library for JavaScript developers.",
"type": "module",
"license": "MIT",
Expand Down Expand Up @@ -56,14 +56,12 @@
"LICENSE",
"README.md"
],
"repository": "[email protected]:privacy-scaling-explorations/zk-kit.git",
"homepage": "https://github.com/privacy-scaling-explorations/zk-kit/tree/main/packages/utils",
"bugs": {
"url": "https://github.com/privacy-scaling-explorations/zk-kit.git/issues"
},
"repository": "[email protected]:zk-passport/zk-kit.git",
"homepage": "https://www.openpassport.app/",
"scripts": {
"build": "rimraf dist && rollup -c rollup.config.ts --configPlugin typescript",
"prepublishOnly": "yarn build"
"prepublishOnly": "yarn build",
"publish": "npm publish --access public"
},
"publishConfig": {
"access": "public"
Expand Down
5 changes: 4 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
"allowSyntheticDefaultImports": true,
"typeRoots": ["node_modules/@types", "types"],
"paths": {
"@zk-kit/*": ["packages/*/src"]
"@zk-kit/*": ["packages/*/src"],
"@openpassport/zk-kit-utils/*": ["packages/zk-kit-utils/src"],
"@openpassport/zk-kit-lean-imt/*": ["packages/zk-kit-lean-imt/src"],
"@openpassport/zk-kit-imt/*": ["packages/zk-kit-imt/src"]
}
},
"ts-node": {
Expand Down
143 changes: 76 additions & 67 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1964,6 +1964,76 @@ __metadata:
languageName: node
linkType: hard

"@openpassport/zk-kit-imt@workspace:packages/imt":
version: 0.0.0-use.local
resolution: "@openpassport/zk-kit-imt@workspace:packages/imt"
dependencies:
"@openpassport/zk-kit-utils": "npm:0.0.1"
"@rollup/plugin-node-resolve": "npm:^15.2.3"
"@rollup/plugin-terser": "npm:^0.4.4"
"@rollup/plugin-typescript": "npm:^11.1.6"
incrementalquintree: "npm:^1.0.9"
poseidon-lite: "npm:^0.2.0"
rimraf: "npm:^5.0.5"
rollup: "npm:^4.12.0"
rollup-plugin-cleanup: "npm:^3.2.1"
rollup-plugin-dts: "npm:^6.1.1"
rollup-plugin-polyfill-node: "npm:^0.13.0"
languageName: unknown
linkType: soft

"@openpassport/zk-kit-lean-imt@workspace:packages/lean-imt":
version: 0.0.0-use.local
resolution: "@openpassport/zk-kit-lean-imt@workspace:packages/lean-imt"
dependencies:
"@openpassport/zk-kit-utils": "npm:0.0.1"
"@rollup/plugin-node-resolve": "npm:^15.2.3"
"@rollup/plugin-terser": "npm:^0.4.4"
"@rollup/plugin-typescript": "npm:^11.1.6"
incrementalquintree: "npm:^1.0.9"
poseidon-lite: "npm:^0.2.0"
rimraf: "npm:^5.0.5"
rollup: "npm:^4.12.0"
rollup-plugin-cleanup: "npm:^3.2.1"
rollup-plugin-dts: "npm:^6.1.1"
rollup-plugin-polyfill-node: "npm:^0.13.0"
languageName: unknown
linkType: soft

"@openpassport/zk-kit-smt@workspace:packages/smt":
version: 0.0.0-use.local
resolution: "@openpassport/zk-kit-smt@workspace:packages/smt"
dependencies:
"@aztec/bb.js": "npm:^0.40.1"
"@rollup/plugin-terser": "npm:^0.4.4"
"@rollup/plugin-typescript": "npm:^11.1.6"
"@types/crypto-js": "npm:^4.1.1"
circomlibjs: "npm:^0.0.8"
crypto-js: "npm:^4.1.1"
rimraf: "npm:^5.0.5"
rollup: "npm:^4.12.0"
rollup-plugin-cleanup: "npm:^3.2.1"
rollup-plugin-dts: "npm:^6.1.1"
languageName: unknown
linkType: soft

"@openpassport/zk-kit-utils@npm:0.0.1, @openpassport/zk-kit-utils@workspace:packages/utils":
version: 0.0.0-use.local
resolution: "@openpassport/zk-kit-utils@workspace:packages/utils"
dependencies:
"@rollup/plugin-alias": "npm:^5.1.0"
"@rollup/plugin-terser": "npm:^0.4.4"
"@rollup/plugin-typescript": "npm:^11.1.6"
"@types/snarkjs": "npm:^0"
buffer: "npm:^6.0.3"
rimraf: "npm:^5.0.5"
rollup: "npm:^4.12.0"
rollup-plugin-cleanup: "npm:^3.2.1"
rollup-plugin-dts: "npm:^6.1.1"
rollup-plugin-polyfill-node: "npm:^0.13.0"
languageName: unknown
linkType: soft

"@openpassport/zk-kit@workspace:.":
version: 0.0.0-use.local
resolution: "@openpassport/zk-kit@workspace:."
Expand Down Expand Up @@ -3142,24 +3212,6 @@ __metadata:
languageName: unknown
linkType: soft

"@zk-kit/imt@workspace:packages/imt":
version: 0.0.0-use.local
resolution: "@zk-kit/imt@workspace:packages/imt"
dependencies:
"@rollup/plugin-node-resolve": "npm:^15.2.3"
"@rollup/plugin-terser": "npm:^0.4.4"
"@rollup/plugin-typescript": "npm:^11.1.6"
"@zk-kit/utils": "npm:1.2.1"
incrementalquintree: "npm:^1.0.9"
poseidon-lite: "npm:^0.2.0"
rimraf: "npm:^5.0.5"
rollup: "npm:^4.12.0"
rollup-plugin-cleanup: "npm:^3.2.1"
rollup-plugin-dts: "npm:^6.1.1"
rollup-plugin-polyfill-node: "npm:^0.13.0"
languageName: unknown
linkType: soft

"@zk-kit/lazytower@workspace:packages/lazytower":
version: 0.0.0-use.local
resolution: "@zk-kit/lazytower@workspace:packages/lazytower"
Expand All @@ -3174,24 +3226,6 @@ __metadata:
languageName: unknown
linkType: soft

"@zk-kit/lean-imt@workspace:packages/lean-imt":
version: 0.0.0-use.local
resolution: "@zk-kit/lean-imt@workspace:packages/lean-imt"
dependencies:
"@rollup/plugin-node-resolve": "npm:^15.2.3"
"@rollup/plugin-terser": "npm:^0.4.4"
"@rollup/plugin-typescript": "npm:^11.1.6"
"@zk-kit/utils": "npm:1.2.1"
incrementalquintree: "npm:^1.0.9"
poseidon-lite: "npm:^0.2.0"
rimraf: "npm:^5.0.5"
rollup: "npm:^4.12.0"
rollup-plugin-cleanup: "npm:^3.2.1"
rollup-plugin-dts: "npm:^6.1.1"
rollup-plugin-polyfill-node: "npm:^0.13.0"
languageName: unknown
linkType: soft

"@zk-kit/logical-expressions@workspace:packages/logical-expressions":
version: 0.0.0-use.local
resolution: "@zk-kit/logical-expressions@workspace:packages/logical-expressions"
Expand Down Expand Up @@ -3243,39 +3277,14 @@ __metadata:
languageName: unknown
linkType: soft

"@zk-kit/smt@workspace:packages/smt":
version: 0.0.0-use.local
resolution: "@zk-kit/smt@workspace:packages/smt"
dependencies:
"@aztec/bb.js": "npm:^0.40.1"
"@rollup/plugin-terser": "npm:^0.4.4"
"@rollup/plugin-typescript": "npm:^11.1.6"
"@types/crypto-js": "npm:^4.1.1"
circomlibjs: "npm:^0.0.8"
crypto-js: "npm:^4.1.1"
rimraf: "npm:^5.0.5"
rollup: "npm:^4.12.0"
rollup-plugin-cleanup: "npm:^3.2.1"
rollup-plugin-dts: "npm:^6.1.1"
languageName: unknown
linkType: soft

"@zk-kit/utils@npm:1.2.1, @zk-kit/utils@workspace:packages/utils":
version: 0.0.0-use.local
resolution: "@zk-kit/utils@workspace:packages/utils"
"@zk-kit/utils@npm:1.2.1":
version: 1.2.1
resolution: "@zk-kit/utils@npm:1.2.1"
dependencies:
"@rollup/plugin-alias": "npm:^5.1.0"
"@rollup/plugin-terser": "npm:^0.4.4"
"@rollup/plugin-typescript": "npm:^11.1.6"
"@types/snarkjs": "npm:^0"
buffer: "npm:^6.0.3"
rimraf: "npm:^5.0.5"
rollup: "npm:^4.12.0"
rollup-plugin-cleanup: "npm:^3.2.1"
rollup-plugin-dts: "npm:^6.1.1"
rollup-plugin-polyfill-node: "npm:^0.13.0"
languageName: unknown
linkType: soft
checksum: 10/05cb209adadad753ae9ca9be7a1664fb4c3259a703f64e8b0af637e5fa4b2a9099c21b80a30df62cfe826b165941e1dfe0e95decde5a4eafd53328692cb0a4b8
languageName: node
linkType: hard

"JSONStream@npm:^1.3.5":
version: 1.3.5
Expand Down
Loading