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

New Poseidon library #173

Merged
merged 1 commit into from
Nov 23, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
"@typescript-eslint/eslint-plugin": "^5.9.1",
"@typescript-eslint/parser": "^5.9.1",
"babel-jest": "^27.4.6",
"circomlibjs": "^0.0.8",
"commitizen": "^4.2.4",
"cz-conventional-changelog": "^3.3.0",
"dotenv": "^16.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/group/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@
},
"dependencies": {
"@zk-kit/incremental-merkle-tree": "1.0.0",
"circomlibjs": "0.0.8"
"poseidon-lite": "^0.0.2"
}
}
2 changes: 1 addition & 1 deletion packages/group/src/group.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { IncrementalMerkleTree, MerkleProof } from "@zk-kit/incremental-merkle-tree"
import { poseidon } from "circomlibjs"
import poseidon from "poseidon-lite"
import { Member } from "./types"

export default class Group {
Expand Down
2 changes: 1 addition & 1 deletion packages/identity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@
"@ethersproject/random": "^5.5.1",
"@ethersproject/sha2": "^5.6.1",
"@ethersproject/strings": "^5.6.1",
"circomlibjs": "0.0.8"
"poseidon-lite": "^0.0.2"
}
}
2 changes: 1 addition & 1 deletion packages/identity/src/identity.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BigNumber } from "@ethersproject/bignumber"
import { poseidon } from "circomlibjs"
import poseidon from "poseidon-lite"
import checkParameter from "./checkParameter"
import { generateCommitment, genRandomNumber, isJsonArray, sha256 } from "./utils"

Expand Down
2 changes: 1 addition & 1 deletion packages/identity/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { BigNumber } from "@ethersproject/bignumber"
import { randomBytes } from "@ethersproject/random"
import { sha256 as _sha256 } from "@ethersproject/sha2"
import { toUtf8Bytes } from "@ethersproject/strings"
import { poseidon } from "circomlibjs"
import poseidon from "poseidon-lite"

/**
* Returns an hexadecimal sha256 hash of the message passed as parameter.
Expand Down
14 changes: 10 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3021,7 +3021,7 @@ __metadata:
resolution: "@semaphore-protocol/group@workspace:packages/group"
dependencies:
"@zk-kit/incremental-merkle-tree": 1.0.0
circomlibjs: 0.0.8
poseidon-lite: ^0.0.2
rollup-plugin-cleanup: ^3.2.1
rollup-plugin-typescript2: ^0.31.2
typedoc: ^0.22.11
Expand Down Expand Up @@ -3053,7 +3053,7 @@ __metadata:
"@ethersproject/random": ^5.5.1
"@ethersproject/sha2": ^5.6.1
"@ethersproject/strings": ^5.6.1
circomlibjs: 0.0.8
poseidon-lite: ^0.0.2
rollup-plugin-cleanup: ^3.2.1
rollup-plugin-typescript2: ^0.31.2
typedoc: ^0.22.11
Expand Down Expand Up @@ -6498,7 +6498,7 @@ __metadata:
languageName: node
linkType: hard

"circomlibjs@npm:0.0.8, circomlibjs@npm:^0.0.8":
"circomlibjs@npm:^0.0.8":
version: 0.0.8
resolution: "circomlibjs@npm:0.0.8"
dependencies:
Expand Down Expand Up @@ -15568,6 +15568,13 @@ __metadata:
languageName: node
linkType: hard

"poseidon-lite@npm:^0.0.2":
version: 0.0.2
resolution: "poseidon-lite@npm:0.0.2"
checksum: b10a29ec8b84caa75dcbb323e7586f220ed5e2d338864484cbc735ee871aafcae599b1c98c521aebd9b82798d5d354328d7750d7dd4bd0c51f7f6d0b79cbe00e
languageName: node
linkType: hard

"posix-character-classes@npm:^0.1.0":
version: 0.1.1
resolution: "posix-character-classes@npm:0.1.1"
Expand Down Expand Up @@ -16956,7 +16963,6 @@ __metadata:
"@typescript-eslint/eslint-plugin": ^5.9.1
"@typescript-eslint/parser": ^5.9.1
babel-jest: ^27.4.6
circomlibjs: ^0.0.8
commitizen: ^4.2.4
cz-conventional-changelog: ^3.3.0
dotenv: ^16.0.2
Expand Down