Compare commits

...

37 Commits

Author SHA1 Message Date
cedoor
41a2f2f7cb chore: v3.12.2
Former-commit-id: ab4d6e5358
2023-10-11 11:13:28 -07:00
cedoor
c591cc48e9 fix(hardhat): set correct circomlibjs dependency version
Former-commit-id: 8f408e2124
2023-10-11 11:13:08 -07:00
cedoor
b2a33eaf58 chore: v3.12.1
Former-commit-id: 38b2eb9e83
2023-10-11 10:48:48 -07:00
cedoor
8b419a024b chore: update snarkjs and circomlibjs types versions
Former-commit-id: b156568f8e
2023-10-11 10:48:19 -07:00
cedoor
1e53e6fc49 chore: v3.12.0
Former-commit-id: 32b6ac4f14
2023-10-11 09:52:16 -07:00
Cedoor
f9dd755b63 Merge pull request #368 from semaphore-protocol/chore/new-snarkjs-version
New SnarkJS dependency version

Former-commit-id: ac632db341
2023-10-11 11:50:58 -05:00
cedoor
78edf03771 chore(proof): update snarkjs dependency version
Former-commit-id: 395c60259b
2023-10-10 11:38:51 -07:00
Cedoor
70b9bb0ddc Merge pull request #363 from semaphore-protocol/chore/snarkjs-circomlibjs-types
New Snarkjs/Circomlibjs type definitions

Former-commit-id: f212684cf2
2023-09-21 17:50:36 +01:00
cedoor
a6bb9bba73 chore: add snarkjs and circomlibjs type definitions
re #362


Former-commit-id: ebe3628561
2023-09-21 17:40:24 +01:00
Cedoor
8cc9d7feae Merge pull request #349 from aguzmant103/main
Adding Bandada to project list

Former-commit-id: 4280bff004
2023-09-21 17:39:56 +01:00
Cedoor
f72d228e51 Merge branch 'main' into main
Former-commit-id: daf558955b
2023-09-21 17:39:47 +01:00
cedoor
e6d30cdb7a Merge branch 'dev'
Former-commit-id: 715b1f8ac5
2023-09-13 19:23:56 +01:00
Cedoor
841ed4bbd9 Merge pull request #361 from semaphore-protocol/chore/typedoc
New typedoc configuration

Former-commit-id: 437fa9a682
2023-09-13 19:23:26 +01:00
cedoor
437ade277a chore: update lockfile
Former-commit-id: 222153e5a7
2023-09-13 17:59:43 +01:00
cedoor
fb66869a3c chore: update typedoc configuration
re #360


Former-commit-id: 7ac640cda7
2023-09-13 17:53:53 +01:00
cedoor
8afa2252e2 chore: v3.11.1
Former-commit-id: 05704e35c9
2023-09-12 14:59:34 +01:00
Cedoor
7af714bb98 Merge pull request #359 from semaphore-protocol/fix/semaphore-ethers
Check address value before setting it in `SemaphoreEthers` class

Former-commit-id: 91429e01f0
2023-09-12 14:58:15 +01:00
cedoor
c434f8af5b style(data): remove console log
re #358


Former-commit-id: 729764dd1c
2023-09-12 14:57:51 +01:00
cedoor
9fec16129b fix(data): check address value before setting it
fix #358


Former-commit-id: 20f28318d0
2023-09-12 14:33:02 +01:00
Cedoor
482b64d031 Merge pull request #356 from semaphore-protocol/ref/improve-error-messages
Improve error messages

Former-commit-id: e1f66a7d80
2023-09-04 17:56:58 +02:00
vplasencia
7163e6f460 refactor(cli): improve error messages
Former-commit-id: d420484f49
2023-09-04 17:50:59 +02:00
cedoor
5d2e1ca5a3 chore: update pse domain
Former-commit-id: 6f7dd99ddb
2023-09-01 12:48:43 +02:00
aguzmant103
031229939a Adding Bandada to project list
Former-commit-id: 09e062d291
2023-08-22 12:42:32 -06:00
cedoor
9d24c8184a chore: v3.11.0
Former-commit-id: 478e6fa382
2023-08-21 16:24:13 +02:00
cedoor
ae359322e9 test(data): add test for identityCommitment filter
Former-commit-id: 7a07dda628
2023-08-21 16:23:10 +02:00
Cedoor
33998d90f7 Merge pull request #346 from semaphore-protocol/chore/snarkjs-version
New snarkjs version

Former-commit-id: 44acbf806f
2023-08-21 16:13:47 +02:00
Cedoor
d9de7c1033 Merge pull request #347 from semaphore-protocol/refactor/proof-exports
`MerkleProof` type to exports

Former-commit-id: ac555f59a1
2023-08-21 16:13:37 +02:00
cedoor
120f99b416 refactor(proof): add MerkleProof type to exports
re #337


Former-commit-id: 8afa314891
2023-08-21 13:24:16 +02:00
Cedoor
b95cb17135 Merge pull request #338 from wslyvh/main
New filter option to query groups based on identity commitment

Former-commit-id: 7467aac9e7
2023-08-21 13:18:51 +02:00
cedoor
507c252d36 chore(proof): update snarkjs version
re #339


Former-commit-id: 82ad9a543b
2023-08-21 13:17:33 +02:00
wslyvh
82db6a1eb7 feat: add identitycommitment as groups filter
Allow to filter on identity commitments when getting subgraph groups


Former-commit-id: 369257d40b
2023-08-14 10:05:19 +02:00
cedoor
c60ab38882 docs: add new project to readme file
Former-commit-id: 7d26d4e66c
2023-08-02 12:00:53 +02:00
Cedoor
cba5940f36 Merge pull request #336 from semaphore-protocol/docs/add-project
Add StealthComms to the projects file

Former-commit-id: e5bcd18045
2023-08-02 11:57:42 +02:00
vplasencia
110e3de844 docs: change tagline
Former-commit-id: 763663ca3e
2023-08-02 10:47:09 +02:00
vplasencia
f60e85335d docs: fix typo
Former-commit-id: a786f10ba5
2023-08-02 10:40:06 +02:00
vplasencia
ef4cef65cd docs: fix typo
Former-commit-id: 44177ce5b7
2023-08-02 10:35:07 +02:00
vplasencia
f69534683d docs: add a new project to the projects file
Former-commit-id: 8552640cd0
2023-08-02 10:25:25 +02:00
67 changed files with 274 additions and 1297 deletions

View File

@@ -40,7 +40,5 @@ jobs:
uses: crazy-max/ghaction-github-pages@v2.5.0
with:
build_dir: docs
jekyll: false
fqdn: js.semaphore.appliedzkp.org
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

4
.gitignore vendored
View File

@@ -63,9 +63,7 @@ node_modules/
# Production
build
dist
docs/*
!docs/CNAME
!docs/index.html
docs
# Hardhat
artifacts

View File

@@ -3,7 +3,7 @@
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/semaphore-protocol/website/blob/main/static/img/semaphore-icon-dark.svg">
<source media="(prefers-color-scheme: light)" srcset="https://github.com/semaphore-protocol/website/blob/main/static/img/semaphore-icon.svg">
<img width="40" alt="Semaphore icon." src="https://github.com/semaphore-protocol/website/blob/main/static/img/semaphore-icon.svg">
<img width="40" alt="Semaphore icon" src="https://github.com/semaphore-protocol/website/blob/main/static/img/semaphore-icon.svg">
</picture>
Semaphore
</h1>
@@ -52,7 +52,7 @@
🔎 Issues
</a>
<span>&nbsp;&nbsp;|&nbsp;&nbsp;</span>
<a href="https://semaphore.appliedzkp.org/discord">
<a href="https://semaphore.pse.dev/discord">
🗣️ Chat &amp; Support
</a>
</h4>
@@ -61,7 +61,7 @@
| Semaphore is a protocol, designed to be a simple and generic privacy layer for Ethereum DApps. Using zero knowledge, Ethereum users can prove their membership of a group and send signals such as votes or endorsements without revealing their original identity. |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
The core of the Semaphore protocol is in the [circuit logic](/packages/circuits/scheme.png). However Semaphore also provides [Solidity contracts](/packages/contracts) and JavaScript libraries to make the steps for offchain proof creation and onchain verification easier. To learn more about Semaphore visit [semaphore.appliedzkp.org](https://semaphore.appliedzkp.org).
The core of the Semaphore protocol is in the [circuit logic](/packages/circuits/scheme.png). However Semaphore also provides [Solidity contracts](/packages/contracts) and JavaScript libraries to make the steps for offchain proof creation and onchain verification easier. To learn more about Semaphore visit [semaphore.pse.dev](https://semaphore.pse.dev).
## 📦 Packages
@@ -94,7 +94,7 @@ The core of the Semaphore protocol is in the [circuit logic](/packages/circuits/
<a href="/packages/identity">
@semaphore-protocol/identity
</a>
<a href="https://js.semaphore.appliedzkp.org/identity">
<a href="https://js.semaphore.pse.dev/modules/_semaphore_protocol_identity">
(docs)
</a>
</td>
@@ -116,7 +116,7 @@ The core of the Semaphore protocol is in the [circuit logic](/packages/circuits/
<a href="/packages/group">
@semaphore-protocol/group
</a>
<a href="https://js.semaphore.appliedzkp.org/group">
<a href="https://js.semaphore.pse.dev/modules/_semaphore_protocol_group">
(docs)
</a>
</td>
@@ -138,7 +138,7 @@ The core of the Semaphore protocol is in the [circuit logic](/packages/circuits/
<a href="/packages/proof">
@semaphore-protocol/proof
</a>
<a href="https://js.semaphore.appliedzkp.org/proof">
<a href="https://js.semaphore.pse.dev/modules/_semaphore_protocol_proof">
(docs)
</a>
</td>
@@ -160,7 +160,7 @@ The core of the Semaphore protocol is in the [circuit logic](/packages/circuits/
<a href="/packages/data">
@semaphore-protocol/data
</a>
<a href="https://js.semaphore.appliedzkp.org/data">
<a href="https://js.semaphore.pse.dev/modules/_semaphore_protocol_data">
(docs)
</a>
</td>
@@ -220,7 +220,7 @@ The core of the Semaphore protocol is in the [circuit logic](/packages/circuits/
<a href="/packages/heyauthn">
@semaphore-protocol/heyauthn
</a>
<a href="https://js.semaphore.appliedzkp.org/heyauthn">
<a href="https://js.semaphore.pse.dev/modules/_semaphore_protocol_heyauthn">
(docs)
</a>
</td>
@@ -251,7 +251,25 @@ The following are some of the internal and external projects that use Semaphore.
<tbody>
<tr>
<td>
<a href="https://explorer.semaphore.appliedzkp.org">
<a href="https://bandada.pse.dev">
Bandada
</a>
</td>
<td>
An open-source system for managing privacy-preserving groups of anonymous individuals. Create and manage onchain and offchain Semaphore groups using UI or API.
</td>
<td>
<a href="https://github.com/privacy-scaling-explorations/bandada">
Github
</a>|
<a href="https://discord.com/invite/sF5CT5rzrR">
Discord
</a>
</td>
</tr>
<tr>
<td>
<a href="https://explorer.semaphore.pse.dev">
Semaphore Explorer
</a>
</td>
@@ -262,7 +280,7 @@ The following are some of the internal and external projects that use Semaphore.
<a href="https://github.com/semaphore-protocol/explorer">
Github
</a>|
<a href="https://semaphore.appliedzkp.org/discord">
<a href="https://semaphore.pse.dev/discord">
Discord
</a>
</td>
@@ -280,7 +298,7 @@ The following are some of the internal and external projects that use Semaphore.
<a href="https://github.com/semaphore-protocol/discord-bot">
Github
</a>|
<a href="https://semaphore.appliedzkp.org/discord">
<a href="https://semaphore.pse.dev/discord">
Discord
</a>
</td>
@@ -361,6 +379,21 @@ The following are some of the internal and external projects that use Semaphore.
</a>
</td>
</tr>
<tr>
<td>
<a href="https://stealthcomms.surge.sh/">
StealthComms
</a>
</td>
<td>
A project that allows users to prove their membership in a group and send messages/signals without revealing their original identity.
</td>
<td>
<a href="https://github.com/atomniketh/zk-app">
Github
</a>
</td>
</tr>
<tbody>
</table>

View File

@@ -1,123 +0,0 @@
<!DOCTYPE html>
<html style="height: 100%">
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="IE=edge" />
<title>Semaphore packages</title>
<meta
name="description"
content="A monorepo of Semaphore packages."
/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"
/>
</head>
<body
style="
margin: 0;
background-color: #EAF0F4;
color: #000;
height: 100%;
font-family: 'Courier New', monospace;
display: flex;
flex-direction: column;
justify-content: space-between;
"
>
<div
style="
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
flex: 1;
padding: 0 20px;
text-align: center;
"
>
<div style="display: flex">
<span style="margin-right: 5px">
<img width="40" src="https://raw.githubusercontent.com/semaphore-protocol/website/main/static/img/semaphore-icon.svg">
</span>
<h1 style="margin: 0; font-size: 40px">Semaphore packages</h1>
</div>
<p style="max-width: 500px">
A monorepo of Semaphore packages.
</p>
<ul style="list-style-type: none; padding: 0; margin: 0; margin-top: 10px"></ul>
</div>
<footer
style="
display: flex;
justify-content: center;
padding: 15px 20px;
background-color: #EAF0F4;
"
>
<div
style="
display: flex;
justify-content: space-between;
align-items: center;
width: 900px;
"
>
<p style="margin: 0; font-size: 16px">
Copyright © 2022 Ethereum Foundation
</p>
<div>
<a
style="margin-right: 15px; text-decoration: none"
target="_blank"
href="https://github.com/semaphore-protocol/semaphore"
>
<i
class="fa fa-github"
style="font-size: 24px; color: #000"
></i>
</a>
</div>
</div>
</footer>
</body>
<script>
const url =
"https://api.github.com/repos/semaphore-protocol/semaphore/contents?ref=gh-pages"
function insertLinks(packages) {
const [element] = window.document.getElementsByTagName("ul")
let html = ""
for (const package of packages) {
html += `<li style="display: flex; align-items: center; margin-bottom: 8px">
<a style="margin-right: 15px" target="_blank" href="https://github.com/semaphore-protocol/semaphore/tree/main/packages/${package}">
<i class="fa fa-github" style="font-size: 24px; color: #000"></i>
</a>
<a style="color: #000; text-decoration: none; font-size: 16px"
onmouseover="this.style.color='#404A4E';"
onmouseout="this.style.color='#000';"
target="_blank" href="https://semaphore-protocol.github.io/semaphore/${package}">
@semaphore-protocol/${package} >
</a></li>`
}
element.innerHTML = html
}
fetch(url)
.then((response) => response.json())
.then((data) => {
const ignore = [".nojekyll", "index.html", "CNAME"]
const packages = data
.map((c) => c.name)
.filter((name) => !ignore.includes(name))
localStorage.setItem("packages", JSON.stringify(packages))
insertLinks(packages)
})
</script>
</html>

View File

@@ -17,7 +17,7 @@
"lint": "eslint . --ext .js,.ts && yarn workspace contracts lint",
"prettier": "prettier -c .",
"prettier:write": "prettier -w .",
"docs": "yarn workspaces foreach --no-private run docs",
"docs": "typedoc --cname js.semaphore.pse.dev --githubPages true",
"version:bump": "yarn workspaces foreach --no-private version -d ${0} && yarn version apply --all && git commit -am \"chore: v${0}\" && git tag v${0}",
"version:publish": "yarn build:libraries && yarn remove:template-files && yarn workspaces foreach --no-private npm publish --tolerate-republish --access public",
"version:release": "changelogithub",
@@ -50,11 +50,13 @@
"@commitlint/cli": "^16.0.2",
"@commitlint/config-conventional": "^16.0.0",
"@rollup/plugin-typescript": "^8.3.0",
"@types/circomlibjs": "^0.1.4",
"@types/download": "^8.0.1",
"@types/glob": "^7.2.0",
"@types/jest": "^27.4.0",
"@types/node": "^17.0.9",
"@types/rimraf": "^3.0.2",
"@types/snarkjs": "^0.7.5",
"@typescript-eslint/eslint-plugin": "^5.9.1",
"@typescript-eslint/parser": "^5.9.1",
"babel-jest": "^27.4.6",
@@ -77,6 +79,7 @@
"rollup": "^2.64.0",
"ts-node": "^10.4.0",
"tslib": "^2.3.1",
"typedoc": "^0.25.1",
"typescript": "^4.7.0"
},
"config": {

View File

@@ -28,10 +28,10 @@
🔎 Issues
</a>
<span>&nbsp;&nbsp;|&nbsp;&nbsp;</span>
<a href="https://semaphore.appliedzkp.org/discord">
<a href="https://semaphore.pse.dev/discord">
🗣️ Chat &amp; Support
</a>
</h4>
</div>
To learn more about circuits visit [semaphore.appliedzkp.org](https://semaphore.appliedzkp.org/docs/technical-reference/circuits).
To learn more about circuits visit [semaphore.pse.dev](https://semaphore.pse.dev/docs/technical-reference/circuits).

View File

@@ -48,7 +48,7 @@ yarn deploy --semaphore <semaphore-address> --group <group-id> --network goerli
```
> **Note**
> Check the Semaphore contract addresses [here](https://semaphore.appliedzkp.org/docs/deployed-contracts#semaphore).
> Check the Semaphore contract addresses [here](https://semaphore.pse.dev/docs/deployed-contracts#semaphore).
> **Warning**
> The group id is a number!

View File

@@ -1,6 +1,6 @@
{
"name": "@semaphore-protocol/cli-template-contracts-hardhat",
"version": "3.10.1",
"version": "3.12.2",
"description": "Semaphore Hardhat template.",
"license": "Unlicense",
"files": [
@@ -36,10 +36,10 @@
"@nomicfoundation/hardhat-toolbox": "^2.0.0",
"@nomiclabs/hardhat-ethers": "^2.0.0",
"@nomiclabs/hardhat-etherscan": "^3.0.0",
"@semaphore-protocol/group": "3.10.1",
"@semaphore-protocol/hardhat": "3.10.1",
"@semaphore-protocol/identity": "3.10.1",
"@semaphore-protocol/proof": "3.10.1",
"@semaphore-protocol/group": "3.12.2",
"@semaphore-protocol/hardhat": "3.12.2",
"@semaphore-protocol/identity": "3.12.2",
"@semaphore-protocol/proof": "3.12.2",
"@typechain/ethers-v5": "^10.1.0",
"@typechain/hardhat": "^6.1.2",
"@types/chai": "^4.2.0",
@@ -58,7 +58,7 @@
"typescript": ">=4.5.0"
},
"dependencies": {
"@semaphore-protocol/contracts": "3.10.1"
"@semaphore-protocol/contracts": "3.12.2"
},
"config": {
"solidity": {

View File

@@ -33,7 +33,7 @@ yarn deploy --semaphore <semaphore-address> --group <group-id> --network arbitru
3. Copy your contract artifacts from `apps/contracts/build/contracts/contracts` folder to `apps/web-app/contract-artifacts` folders manually. Or run `yarn copy:contract-artifacts` in the project root to do it automatically.
> **Note**
> Check the Semaphore contract addresses [here](https://semaphore.appliedzkp.org/docs/deployed-contracts).
> Check the Semaphore contract addresses [here](https://semaphore.pse.dev/docs/deployed-contracts).
> **Warning**
> The group id is a number!

View File

@@ -18,10 +18,10 @@
"@nomicfoundation/hardhat-chai-matchers": "^1.0.5",
"@nomiclabs/hardhat-ethers": "^2.0.0",
"@nomiclabs/hardhat-etherscan": "^3.1.7",
"@semaphore-protocol/group": "3.10.1",
"@semaphore-protocol/hardhat": "3.10.1",
"@semaphore-protocol/identity": "3.10.1",
"@semaphore-protocol/proof": "3.10.1",
"@semaphore-protocol/group": "3.12.2",
"@semaphore-protocol/hardhat": "3.12.2",
"@semaphore-protocol/identity": "3.12.2",
"@semaphore-protocol/proof": "3.12.2",
"@typechain/ethers-v5": "^10.0.0",
"@typechain/hardhat": "^6.0.0",
"@types/chai": "^4.3.1",
@@ -40,7 +40,7 @@
"typechain": "^8.0.0"
},
"dependencies": {
"@semaphore-protocol/contracts": "3.10.1"
"@semaphore-protocol/contracts": "3.12.2"
},
"config": {
"solidity": {

View File

@@ -10,10 +10,10 @@
},
"dependencies": {
"@next/font": "13.0.3",
"@semaphore-protocol/data": "3.10.1",
"@semaphore-protocol/group": "3.10.1",
"@semaphore-protocol/identity": "3.10.1",
"@semaphore-protocol/proof": "3.10.1",
"@semaphore-protocol/data": "3.12.2",
"@semaphore-protocol/group": "3.12.2",
"@semaphore-protocol/identity": "3.12.2",
"@semaphore-protocol/proof": "3.12.2",
"@types/react": "18.0.25",
"@types/react-dom": "18.0.8",
"dotenv": "^16.0.3",

View File

@@ -84,7 +84,7 @@ export default function GroupsPage() {
<p>
Semaphore{" "}
<a
href="https://semaphore.appliedzkp.org/docs/guides/groups"
href="https://semaphore.pse.dev/docs/guides/groups"
target="_blank"
rel="noreferrer noopener nofollow"
>

View File

@@ -40,7 +40,7 @@ export default function IdentitiesPage() {
<p>
Users interact with the protocol using a Semaphore{" "}
<a
href="https://semaphore.appliedzkp.org/docs/guides/identities"
href="https://semaphore.pse.dev/docs/guides/identities"
target="_blank"
rel="noreferrer noopener nofollow"
>

View File

@@ -112,7 +112,7 @@ export default function ProofsPage() {
<p>
Semaphore members can anonymously{" "}
<a
href="https://semaphore.appliedzkp.org/docs/guides/proofs"
href="https://semaphore.pse.dev/docs/guides/proofs"
target="_blank"
rel="noreferrer noopener nofollow"
>

View File

@@ -1,6 +1,6 @@
{
"name": "@semaphore-protocol/cli-template-monorepo-ethers",
"version": "3.10.1",
"version": "3.12.2",
"description": "Semaphore Hardhat + Next.js + SemaphoreEthers template.",
"license": "Unlicense",
"files": [

View File

@@ -33,7 +33,7 @@ yarn deploy --semaphore <semaphore-address> --group <group-id> --network arbitru
3. Copy your contract artifacts from `apps/contracts/build/contracts/contracts` folder to `apps/web-app/contract-artifacts` folders manually. Or run `yarn copy:contract-artifacts` in the project root to do it automatically.
> **Note**
> Check the Semaphore contract addresses [here](https://semaphore.appliedzkp.org/docs/deployed-contracts).
> Check the Semaphore contract addresses [here](https://semaphore.pse.dev/docs/deployed-contracts).
> **Warning**
> The group id is a number!

View File

@@ -18,10 +18,10 @@
"@nomicfoundation/hardhat-chai-matchers": "^1.0.5",
"@nomiclabs/hardhat-ethers": "^2.0.0",
"@nomiclabs/hardhat-etherscan": "^3.1.7",
"@semaphore-protocol/group": "3.10.1",
"@semaphore-protocol/hardhat": "3.10.1",
"@semaphore-protocol/identity": "3.10.1",
"@semaphore-protocol/proof": "3.10.1",
"@semaphore-protocol/group": "3.12.2",
"@semaphore-protocol/hardhat": "3.12.2",
"@semaphore-protocol/identity": "3.12.2",
"@semaphore-protocol/proof": "3.12.2",
"@typechain/ethers-v5": "^10.0.0",
"@typechain/hardhat": "^6.0.0",
"@types/chai": "^4.3.1",
@@ -40,7 +40,7 @@
"typechain": "^8.0.0"
},
"dependencies": {
"@semaphore-protocol/contracts": "3.10.1"
"@semaphore-protocol/contracts": "3.12.2"
},
"config": {
"solidity": {

View File

@@ -10,10 +10,10 @@
},
"dependencies": {
"@next/font": "13.0.3",
"@semaphore-protocol/data": "3.10.1",
"@semaphore-protocol/group": "3.10.1",
"@semaphore-protocol/identity": "3.10.1",
"@semaphore-protocol/proof": "3.10.1",
"@semaphore-protocol/data": "3.12.2",
"@semaphore-protocol/group": "3.12.2",
"@semaphore-protocol/identity": "3.12.2",
"@semaphore-protocol/proof": "3.12.2",
"@types/react": "18.0.25",
"@types/react-dom": "18.0.8",
"dotenv": "^16.0.3",

View File

@@ -84,7 +84,7 @@ export default function GroupsPage() {
<p>
Semaphore{" "}
<a
href="https://semaphore.appliedzkp.org/docs/guides/groups"
href="https://semaphore.pse.dev/docs/guides/groups"
target="_blank"
rel="noreferrer noopener nofollow"
>

View File

@@ -40,7 +40,7 @@ export default function IdentitiesPage() {
<p>
Users interact with the protocol using a Semaphore{" "}
<a
href="https://semaphore.appliedzkp.org/docs/guides/identities"
href="https://semaphore.pse.dev/docs/guides/identities"
target="_blank"
rel="noreferrer noopener nofollow"
>

View File

@@ -112,7 +112,7 @@ export default function ProofsPage() {
<p>
Semaphore members can anonymously{" "}
<a
href="https://semaphore.appliedzkp.org/docs/guides/proofs"
href="https://semaphore.pse.dev/docs/guides/proofs"
target="_blank"
rel="noreferrer noopener nofollow"
>

View File

@@ -1,6 +1,6 @@
{
"name": "@semaphore-protocol/cli-template-monorepo-subgraph",
"version": "3.10.1",
"version": "3.12.2",
"description": "Semaphore Hardhat + Next.js + SemaphoreSubgraph template.",
"license": "Unlicense",
"files": [

View File

@@ -40,7 +40,7 @@
🔎 Issues
</a>
<span>&nbsp;&nbsp;|&nbsp;&nbsp;</span>
<a href="https://semaphore.appliedzkp.org/discord">
<a href="https://semaphore.pse.dev/discord">
🗣️ Chat &amp; Support
</a>
</h4>

View File

@@ -1,7 +1,7 @@
{
"name": "@semaphore-protocol/cli",
"type": "module",
"version": "3.10.1",
"version": "3.12.2",
"description": "A command line tool to set up your Semaphore project and get group data.",
"license": "MIT",
"bin": {
@@ -39,11 +39,10 @@
"@types/semver": "^7.3.13",
"rollup-plugin-cleanup": "^3.2.1",
"rollup-plugin-typescript2": "^0.31.2",
"ts-node": "^10.9.1",
"typedoc": "^0.22.11"
"ts-node": "^10.9.1"
},
"dependencies": {
"@semaphore-protocol/data": "3.10.1",
"@semaphore-protocol/data": "3.12.2",
"axios": "^1.3.2",
"boxen": "^7.0.1",
"chalk": "^5.1.2",

View File

@@ -132,7 +132,10 @@ program
const groupIds = await getGroupIds(network)
if (groupIds === null) return
if (groupIds === null) {
console.info(`\n ${logSymbols.info}`, `info: there are no groups on the '${network}' network\n`)
return
}
const content = `${chalk.bold("Groups")} (${groupIds.length}): \n${groupIds
.map((id: any) => ` - ${id}`)
@@ -160,7 +163,10 @@ program
if (!groupId) {
const groupIds = await getGroupIds(network)
if (groupIds === null) return
if (groupIds === null) {
console.info(`\n ${logSymbols.info}`, `info: there are no groups on the '${network}' network\n`)
return
}
groupId = await getGroupId(groupIds)
}
@@ -193,6 +199,11 @@ program
}
}
if (!group) {
console.info(`\n ${logSymbols.error}`, "error: the group does not exist\n")
return
}
let content = ` ${chalk.bold("Id")}: ${group.id}\n`
content += ` ${chalk.bold("Admin")}: ${group.admin}\n`
content += ` ${chalk.bold("Merkle tree")}:\n`
@@ -223,7 +234,10 @@ program
if (!groupId) {
const groupIds = await getGroupIds(network)
if (groupIds === null) return
if (groupIds === null) {
console.info(`\n ${logSymbols.info}`, `info: there are no groups on the '${network}' network\n`)
return
}
groupId = await getGroupId(groupIds)
}
@@ -286,7 +300,10 @@ program
if (!groupId) {
const groupIds = await getGroupIds(network)
if (groupIds === null) return
if (groupIds === null) {
console.info(`\n ${logSymbols.info}`, `info: there are no groups on the '${network}' network\n`)
return
}
groupId = await getGroupId(groupIds)
}

View File

@@ -34,13 +34,13 @@
🔎 Issues
</a>
<span>&nbsp;&nbsp;|&nbsp;&nbsp;</span>
<a href="https://semaphore.appliedzkp.org/discord">
<a href="https://semaphore.pse.dev/discord">
🗣️ Chat &amp; Support
</a>
</h4>
</div>
To learn more about contracts visit [semaphore.appliedzkp.org](https://semaphore.appliedzkp.org/docs/technical-reference/contracts).
To learn more about contracts visit [semaphore.pse.dev](https://semaphore.pse.dev/docs/technical-reference/contracts).
---

View File

@@ -1,6 +1,6 @@
{
"name": "@semaphore-protocol/contracts",
"version": "3.10.1",
"version": "3.12.2",
"description": "Semaphore contracts to manage groups and broadcast anonymous signals.",
"license": "MIT",
"files": [

View File

@@ -30,7 +30,7 @@
"@types/rimraf": "^3.0.2",
"chai": "^4.3.5",
"circomlib": "^2.0.2",
"circomlibjs": "^0.0.8",
"circomlibjs": "^0.1.7",
"download": "^8.0.0",
"ethers": "^5.6.8",
"hardhat": "^2.9.7",
@@ -38,7 +38,6 @@
"js-logger": "^1.6.1",
"prettier-plugin-solidity": "^1.0.0-beta.19",
"rimraf": "^3.0.2",
"snarkjs": "^0.4.13",
"solhint": "^3.3.6",
"solhint-plugin-prettier": "^0.0.5",
"solidity-coverage": "^0.7.21",

View File

@@ -1,4 +1,4 @@
import { poseidon_gencontract as poseidonContract } from "circomlibjs"
import { poseidonContract } from "circomlibjs"
import { task, types } from "hardhat/config"
task("deploy:semaphore-voting", "Deploy a SemaphoreVoting contract")

View File

@@ -1,4 +1,4 @@
import { poseidon_gencontract as poseidonContract } from "circomlibjs"
import { poseidonContract } from "circomlibjs"
import { task, types } from "hardhat/config"
task("deploy:semaphore-whistleblowing", "Deploy a SemaphoreWhistleblowing contract")

View File

@@ -1,4 +1,4 @@
import { poseidon_gencontract as poseidonContract } from "circomlibjs"
import { poseidonContract } from "circomlibjs"
import { task, types } from "hardhat/config"
import { saveDeployedContracts } from "../scripts/utils"

View File

@@ -18,7 +18,7 @@
<a href="https://npmjs.org/package/@semaphore-protocol/data">
<img alt="Downloads" src="https://img.shields.io/npm/dm/@semaphore-protocol/data.svg?style=flat-square" />
</a>
<a href="https://js.semaphore.appliedzkp.org/data">
<a href="https://js.semaphore.pse.dev/data">
<img alt="Documentation typedoc" src="https://img.shields.io/badge/docs-typedoc-744C7C?style=flat-square">
</a>
<a href="https://eslint.org/">
@@ -43,7 +43,7 @@
🔎 Issues
</a>
<span>&nbsp;&nbsp;|&nbsp;&nbsp;</span>
<a href="https://semaphore.appliedzkp.org/discord">
<a href="https://semaphore.pse.dev/discord">
🗣️ Chat &amp; Support
</a>
</h4>

View File

@@ -1,6 +1,6 @@
{
"name": "@semaphore-protocol/data",
"version": "3.10.1",
"version": "3.12.2",
"description": "A library to query Semaphore contracts.",
"license": "MIT",
"main": "dist/index.node.js",
@@ -23,8 +23,7 @@
"scripts": {
"build:watch": "rollup -c rollup.config.ts -w --configPlugin typescript",
"build": "rimraf dist && rollup -c rollup.config.ts --configPlugin typescript",
"prepublishOnly": "yarn build",
"docs": "typedoc src/index.ts --out ../../docs/data"
"prepublishOnly": "yarn build"
},
"publishConfig": {
"access": "public"
@@ -32,8 +31,7 @@
"devDependencies": {
"@rollup/plugin-json": "^6.0.0",
"rollup-plugin-cleanup": "^3.2.1",
"rollup-plugin-typescript2": "^0.31.2",
"typedoc": "^0.22.11"
"rollup-plugin-typescript2": "^0.31.2"
},
"dependencies": {
"@ethersproject/contracts": "^5.7.0",

View File

@@ -31,7 +31,11 @@ describe("SemaphoreEthers", () => {
const semaphore2 = new SemaphoreEthers("matic")
const semaphore3 = new SemaphoreEthers("optimism-goerli")
const semaphore4 = new SemaphoreEthers("arbitrum-goerli")
const semaphore5 = new SemaphoreEthers("homestead", {
const semaphore5 = new SemaphoreEthers("arbitrum-goerli", {
address: "0x0000000000000000000000000000000000000000",
startBlock: 0
})
const semaphore6 = new SemaphoreEthers("homestead", {
address: "0x0000000000000000000000000000000000000000",
startBlock: 0
})
@@ -42,9 +46,10 @@ describe("SemaphoreEthers", () => {
expect(semaphore2.network).toBe("maticmum")
expect(semaphore3.network).toBe("optimism-goerli")
expect(semaphore4.network).toBe("arbitrum-goerli")
expect(semaphore5.network).toBe("homestead")
expect(semaphore5.options.startBlock).toBe(0)
expect(semaphore5.options.address).toContain("0x000000")
expect(semaphore6.network).toBe("homestead")
expect(semaphore6.options.startBlock).toBe(0)
expect(semaphore6.options.address).toContain("0x000000")
})
it("Should instantiate a SemaphoreEthers object with different providers", () => {

View File

@@ -43,37 +43,35 @@ export default class SemaphoreEthers {
switch (networkOrEthereumURL) {
case "arbitrum":
options.address = "0xc60E0Ee1a2770d5F619858C641f14FC4a6401520"
options.startBlock = 77278430
options.address ??= "0xc60E0Ee1a2770d5F619858C641f14FC4a6401520"
options.startBlock ??= 77278430
break
case "arbitrum-goerli":
options.address = "0x3889927F0B5Eb1a02C6E2C20b39a1Bd4EAd76131"
options.startBlock = 15174410
options.address ??= "0x3889927F0B5Eb1a02C6E2C20b39a1Bd4EAd76131"
options.startBlock ??= 15174410
break
case "maticmum":
options.address = "0x3889927F0B5Eb1a02C6E2C20b39a1Bd4EAd76131"
options.startBlock = 33995010
options.address ??= "0x3889927F0B5Eb1a02C6E2C20b39a1Bd4EAd76131"
options.startBlock ??= 33995010
break
case "goerli":
options.address = "0x3889927F0B5Eb1a02C6E2C20b39a1Bd4EAd76131"
options.startBlock = 8777695
options.address ??= "0x3889927F0B5Eb1a02C6E2C20b39a1Bd4EAd76131"
options.startBlock ??= 8777695
break
case "sepolia":
options.address = "0x3889927F0B5Eb1a02C6E2C20b39a1Bd4EAd76131"
options.startBlock = 3231111
options.address ??= "0x3889927F0B5Eb1a02C6E2C20b39a1Bd4EAd76131"
options.startBlock ??= 3231111
break
case "optimism-goerli":
options.address = "0x3889927F0B5Eb1a02C6E2C20b39a1Bd4EAd76131"
options.startBlock = 7632846
options.address ??= "0x3889927F0B5Eb1a02C6E2C20b39a1Bd4EAd76131"
options.startBlock ??= 7632846
break
default:
if (options.address === undefined) {
throw new Error(`You should provide a Semaphore contract address for this network`)
}
if (options.startBlock === undefined) {
options.startBlock = 0
}
options.startBlock ??= 0
}
let provider: Provider

View File

@@ -202,7 +202,8 @@ describe("SemaphoreSubgraph", () => {
const expectedValue = await semaphore.getGroups({
filters: {
admin: "0x7bcd6f009471e9974a77086a69289d16eadba286"
admin: "0x7bcd6f009471e9974a77086a69289d16eadba286",
identityCommitment: "123"
}
})

View File

@@ -68,13 +68,17 @@ export default class SemaphoreSubgraph {
let filtersQuery = ""
if (options.filters) {
const { admin, timestamp, timestampGte, timestampLte } = options.filters
const { admin, identityCommitment, timestamp, timestampGte, timestampLte } = options.filters
const filterFragments = []
if (admin) {
filterFragments.push(`admin: "${admin}"`)
}
if (identityCommitment) {
filterFragments.push(`members_: { identityCommitment: "${identityCommitment}" }`)
}
/* istanbul ignore next */
if (timestamp) {
filterFragments.push(`timestamp: "${jsDateToGraphqlDate(timestamp)}"`)

View File

@@ -24,6 +24,7 @@ export type GroupOptions = {
verifiedProofs?: boolean
filters?: {
admin?: string
identityCommitment?: string
timestamp?: Date
timestampGte?: Date
timestampLte?: Date

View File

@@ -0,0 +1,3 @@
{
"entryPoints": ["src/index.ts"]
}

View File

@@ -18,7 +18,7 @@
<a href="https://npmjs.org/package/@semaphore-protocol/group">
<img alt="Downloads" src="https://img.shields.io/npm/dm/@semaphore-protocol/group.svg?style=flat-square" />
</a>
<a href="https://js.semaphore.appliedzkp.org/group">
<a href="https://js.semaphore.pse.dev/group">
<img alt="Documentation typedoc" src="https://img.shields.io/badge/docs-typedoc-744C7C?style=flat-square">
</a>
<a href="https://eslint.org/">
@@ -43,7 +43,7 @@
🔎 Issues
</a>
<span>&nbsp;&nbsp;|&nbsp;&nbsp;</span>
<a href="https://semaphore.appliedzkp.org/discord">
<a href="https://semaphore.pse.dev/discord">
🗣️ Chat &amp; Support
</a>
</h4>

View File

@@ -1,6 +1,6 @@
{
"name": "@semaphore-protocol/group",
"version": "3.10.1",
"version": "3.12.2",
"description": "A library to create and manage Semaphore groups.",
"license": "MIT",
"main": "dist/index.node.js",
@@ -23,8 +23,7 @@
"scripts": {
"build:watch": "rollup -c rollup.config.ts -w --configPlugin typescript",
"build": "rimraf dist && rollup -c rollup.config.ts --configPlugin typescript",
"prepublishOnly": "yarn build",
"docs": "typedoc src/index.ts --out ../../docs/group"
"prepublishOnly": "yarn build"
},
"publishConfig": {
"access": "public"
@@ -34,8 +33,7 @@
"@rollup/plugin-node-resolve": "^15.0.1",
"poseidon-lite": "^0.2.0",
"rollup-plugin-cleanup": "^3.2.1",
"rollup-plugin-typescript2": "^0.31.2",
"typedoc": "^0.22.11"
"rollup-plugin-typescript2": "^0.31.2"
},
"dependencies": {
"@ethersproject/bignumber": "^5.7.0",

View File

@@ -0,0 +1,3 @@
{
"entryPoints": ["src/index.ts"]
}

View File

@@ -40,7 +40,7 @@
🔎 Issues
</a>
<span>&nbsp;&nbsp;|&nbsp;&nbsp;</span>
<a href="https://semaphore.appliedzkp.org/discord">
<a href="https://semaphore.pse.dev/discord">
🗣️ Chat &amp; Support
</a>
</h4>

View File

@@ -1,6 +1,6 @@
{
"name": "@semaphore-protocol/hardhat",
"version": "3.10.1",
"version": "3.12.2",
"description": "A Semaphore Hardhat plugin to deploy verifiers and Semaphore contract.",
"license": "MIT",
"main": "dist/index.node.js",
@@ -38,8 +38,8 @@
},
"dependencies": {
"@nomiclabs/hardhat-ethers": "^2.1.1",
"@semaphore-protocol/contracts": "3.10.1",
"circomlibjs": "^0.0.8",
"@semaphore-protocol/contracts": "3.12.2",
"circomlibjs": "^0.1.7",
"ethers": "^5.7.1",
"hardhat-dependency-compiler": "^1.1.3"
}

View File

@@ -1,4 +1,4 @@
import { poseidon_gencontract as poseidonContract } from "circomlibjs"
import { poseidonContract } from "circomlibjs"
import { task, types } from "hardhat/config"
task("deploy:semaphore", "Deploy a Semaphore contract")

View File

@@ -18,7 +18,7 @@
<a href="https://npmjs.org/package/@semaphore-protocol/heyauthn">
<img alt="Downloads" src="https://img.shields.io/npm/dm/@semaphore-protocol/heyauthn.svg?style=flat-square" />
</a>
<a href="https://js.semaphore.appliedzkp.org/heyauthn">
<a href="https://js.semaphore.pse.dev/heyauthn">
<img alt="Documentation typedoc" src="https://img.shields.io/badge/docs-typedoc-744C7C?style=flat-square">
</a>
<a href="https://eslint.org/">
@@ -43,7 +43,7 @@
🔎 Issues
</a>
<span>&nbsp;&nbsp;|&nbsp;&nbsp;</span>
<a href="https://semaphore.appliedzkp.org/discord">
<a href="https://semaphore.pse.dev/discord">
🗣️ Chat &amp; Support
</a>
</h4>

View File

@@ -1,6 +1,6 @@
{
"name": "@semaphore-protocol/heyauthn",
"version": "3.10.1",
"version": "3.12.2",
"description": "A library to allow developers to create and manage Semaphore identities using WebAuthn",
"license": "MIT",
"main": "dist/index.node.js",
@@ -23,19 +23,17 @@
"scripts": {
"build:watch": "rollup -c rollup.config.ts -w --configPlugin typescript",
"build": "rimraf dist && rollup -c rollup.config.ts --configPlugin typescript",
"prepublishOnly": "yarn build",
"docs": "typedoc src/index.ts --out ../../docs/heyauthn"
"prepublishOnly": "yarn build"
},
"publishConfig": {
"access": "public"
},
"devDependencies": {
"rollup-plugin-cleanup": "^3.2.1",
"rollup-plugin-typescript2": "^0.31.2",
"typedoc": "^0.22.11"
"rollup-plugin-typescript2": "^0.31.2"
},
"dependencies": {
"@semaphore-protocol/identity": "3.10.1",
"@semaphore-protocol/identity": "3.12.2",
"@simplewebauthn/browser": "7.2.0",
"@simplewebauthn/server": "7.2.0"
}

View File

@@ -0,0 +1,3 @@
{
"entryPoints": ["src/index.ts"]
}

View File

@@ -18,7 +18,7 @@
<a href="https://npmjs.org/package/@semaphore-protocol/identity">
<img alt="Downloads" src="https://img.shields.io/npm/dm/@semaphore-protocol/identity.svg?style=flat-square" />
</a>
<a href="https://js.semaphore.appliedzkp.org/identity">
<a href="https://js.semaphore.pse.dev/identity">
<img alt="Documentation typedoc" src="https://img.shields.io/badge/docs-typedoc-744C7C?style=flat-square">
</a>
<a href="https://eslint.org/">
@@ -43,7 +43,7 @@
🔎 Issues
</a>
<span>&nbsp;&nbsp;|&nbsp;&nbsp;</span>
<a href="https://semaphore.appliedzkp.org/discord">
<a href="https://semaphore.pse.dev/discord">
🗣️ Chat &amp; Support
</a>
</h4>

View File

@@ -1,6 +1,6 @@
{
"name": "@semaphore-protocol/identity",
"version": "3.10.1",
"version": "3.12.2",
"description": "A library to create Semaphore identities.",
"license": "MIT",
"main": "dist/index.node.js",
@@ -23,8 +23,7 @@
"scripts": {
"build:watch": "rollup -c rollup.config.ts -w --configPlugin typescript",
"build": "rimraf dist && rollup -c rollup.config.ts --configPlugin typescript",
"prepublishOnly": "yarn build",
"docs": "typedoc src/index.ts --out ../../docs/identity"
"prepublishOnly": "yarn build"
},
"publishConfig": {
"access": "public"
@@ -34,8 +33,7 @@
"@rollup/plugin-node-resolve": "^15.0.1",
"poseidon-lite": "^0.2.0",
"rollup-plugin-cleanup": "^3.2.1",
"rollup-plugin-typescript2": "^0.31.2",
"typedoc": "^0.22.11"
"rollup-plugin-typescript2": "^0.31.2"
},
"dependencies": {
"@ethersproject/bignumber": "^5.5.0",

View File

@@ -0,0 +1,3 @@
{
"entryPoints": ["src/index.ts"]
}

View File

@@ -18,7 +18,7 @@
<a href="https://npmjs.org/package/@semaphore-protocol/proof">
<img alt="Downloads" src="https://img.shields.io/npm/dm/@semaphore-protocol/proof.svg?style=flat-square" />
</a>
<a href="https://js.semaphore.appliedzkp.org/proof">
<a href="https://js.semaphore.pse.dev/proof">
<img alt="Documentation typedoc" src="https://img.shields.io/badge/docs-typedoc-744C7C?style=flat-square">
</a>
<a href="https://eslint.org/">
@@ -43,7 +43,7 @@
🔎 Issues
</a>
<span>&nbsp;&nbsp;|&nbsp;&nbsp;</span>
<a href="https://semaphore.appliedzkp.org/discord">
<a href="https://semaphore.pse.dev/discord">
🗣️ Chat &amp; Support
</a>
</h4>

View File

@@ -1,6 +1,6 @@
{
"name": "@semaphore-protocol/proof",
"version": "3.10.1",
"version": "3.12.2",
"description": "A library to generate and verify Semaphore proofs.",
"license": "MIT",
"main": "dist/index.node.js",
@@ -23,8 +23,7 @@
"scripts": {
"build:watch": "rollup -c rollup.config.ts -w --configPlugin typescript",
"build": "rimraf dist && rollup -c rollup.config.ts --configPlugin typescript",
"prepublishOnly": "yarn build",
"docs": "typedoc src/index.ts --out ../../docs/proof"
"prepublishOnly": "yarn build"
},
"publishConfig": {
"access": "public"
@@ -36,12 +35,11 @@
"ffjavascript": "^0.2.54",
"poseidon-lite": "^0.2.0",
"rollup-plugin-cleanup": "^3.2.1",
"rollup-plugin-typescript2": "^0.31.2",
"typedoc": "^0.22.11"
"rollup-plugin-typescript2": "^0.31.2"
},
"peerDependencies": {
"@semaphore-protocol/group": "3.10.1",
"@semaphore-protocol/identity": "3.10.1"
"@semaphore-protocol/group": "3.12.2",
"@semaphore-protocol/identity": "3.12.2"
},
"dependencies": {
"@ethersproject/bignumber": "^5.5.0",
@@ -49,6 +47,6 @@
"@ethersproject/keccak256": "^5.7.0",
"@ethersproject/strings": "^5.5.0",
"@zk-kit/incremental-merkle-tree": "0.4.3",
"snarkjs": "0.4.13"
"snarkjs": "0.7.1"
}
}

View File

@@ -3,10 +3,10 @@ import { BytesLike, Hexable } from "@ethersproject/bytes"
import { Group } from "@semaphore-protocol/group"
import type { Identity } from "@semaphore-protocol/identity"
import { MerkleProof } from "@zk-kit/incremental-merkle-tree"
import { groth16 } from "snarkjs"
import { groth16, NumericString } from "snarkjs"
import hash from "./hash"
import packProof from "./packProof"
import { FullProof, SnarkArtifacts } from "./types"
import { SemaphoreProof, SnarkArtifacts } from "./types"
/**
* Generates a Semaphore proof.
@@ -23,7 +23,7 @@ export default async function generateProof(
externalNullifier: BytesLike | Hexable | number | bigint,
signal: BytesLike | Hexable | number | bigint,
snarkArtifacts?: SnarkArtifacts
): Promise<FullProof> {
): Promise<SemaphoreProof> {
let merkleProof: MerkleProof
if ("depth" in groupOrMerkleProof) {
@@ -61,8 +61,8 @@ export default async function generateProof(
return {
merkleTreeRoot: publicSignals[0],
nullifierHash: publicSignals[1],
signal: BigNumber.from(signal).toString(),
externalNullifier: BigNumber.from(externalNullifier).toString(),
signal: BigNumber.from(signal).toString() as NumericString,
externalNullifier: BigNumber.from(externalNullifier).toString() as NumericString,
proof: packProof(proof)
}
}

View File

@@ -1,15 +1,16 @@
import { BigNumber } from "@ethersproject/bignumber"
import { BytesLike, Hexable, zeroPad } from "@ethersproject/bytes"
import { keccak256 } from "@ethersproject/keccak256"
import { NumericString } from "snarkjs"
/**
* Creates a keccak256 hash of a message compatible with the SNARK scalar modulus.
* @param message The message to be hashed.
* @returns The message digest.
*/
export default function hash(message: BytesLike | Hexable | number | bigint): bigint {
export default function hash(message: BytesLike | Hexable | number | bigint): NumericString {
message = BigNumber.from(message).toTwos(256).toHexString()
message = zeroPad(message, 32)
return BigInt(keccak256(message)) >> BigInt(8)
return (BigInt(keccak256(message)) >> BigInt(8)).toString() as NumericString
}

View File

@@ -6,7 +6,7 @@ import calculateNullifierHash from "./calculateNullifierHash"
import generateProof from "./generateProof"
import hash from "./hash"
import packProof from "./packProof"
import { FullProof } from "./types"
import { SemaphoreProof } from "./types"
import unpackProof from "./unpackProof"
import verifyProof from "./verifyProof"
@@ -21,7 +21,7 @@ describe("Proof", () => {
const identity = new Identity()
let fullProof: FullProof
let fullProof: SemaphoreProof
let curve: any
beforeAll(async () => {
@@ -34,9 +34,7 @@ describe("Proof", () => {
describe("# generateProof", () => {
it("Should not generate Semaphore proofs if the identity is not part of the group", async () => {
const group = new Group(treeDepth)
group.addMembers([BigInt(1), BigInt(2)])
const group = new Group(treeDepth, 20, [BigInt(1), BigInt(2)])
const fun = () =>
generateProof(identity, group, externalNullifier, signal, {
@@ -48,9 +46,7 @@ describe("Proof", () => {
})
it("Should not generate a Semaphore proof with default snark artifacts with Node.js", async () => {
const group = new Group(treeDepth)
group.addMembers([BigInt(1), BigInt(2), identity.commitment])
const group = new Group(treeDepth, 20, [BigInt(1), BigInt(2), identity.commitment])
const fun = () => generateProof(identity, group, externalNullifier, signal)
@@ -58,9 +54,7 @@ describe("Proof", () => {
})
it("Should generate a Semaphore proof passing a group as parameter", async () => {
const group = new Group(treeDepth)
group.addMembers([BigInt(1), BigInt(2), identity.commitment])
const group = new Group(treeDepth, 20, [BigInt(1), BigInt(2), identity.commitment])
fullProof = await generateProof(identity, group, externalNullifier, signal, {
wasmFilePath,
@@ -72,9 +66,7 @@ describe("Proof", () => {
}, 20000)
it("Should generate a Semaphore proof passing a Merkle proof as parameter", async () => {
const group = new Group(treeDepth)
group.addMembers([BigInt(1), BigInt(2), identity.commitment])
const group = new Group(treeDepth, 20, [BigInt(1), BigInt(2), identity.commitment])
fullProof = await generateProof(identity, group.generateMerkleProof(2), externalNullifier, signal, {
wasmFilePath,
@@ -104,47 +96,35 @@ describe("Proof", () => {
it("Should hash the signal value correctly", async () => {
const signalHash = hash(signal)
expect(signalHash.toString()).toBe(
"8665846418922331996225934941481656421248110469944536651334918563951783029"
)
expect(signalHash).toBe("8665846418922331996225934941481656421248110469944536651334918563951783029")
})
it("Should hash the external nullifier value correctly", async () => {
const externalNullifierHash = hash(externalNullifier)
expect(externalNullifierHash.toString()).toBe(
expect(externalNullifierHash).toBe(
"244178201824278269437519042830883072613014992408751798420801126401127326826"
)
})
it("Should hash a number", async () => {
expect(hash(2).toString()).toBe(
"113682330006535319932160121224458771213356533826860247409332700812532759386"
)
expect(hash(2)).toBe("113682330006535319932160121224458771213356533826860247409332700812532759386")
})
it("Should hash a big number", async () => {
expect(hash(BigInt(2)).toString()).toBe(
"113682330006535319932160121224458771213356533826860247409332700812532759386"
)
expect(hash(BigInt(2))).toBe("113682330006535319932160121224458771213356533826860247409332700812532759386")
})
it("Should hash an hex number", async () => {
expect(hash("0x2").toString()).toBe(
"113682330006535319932160121224458771213356533826860247409332700812532759386"
)
expect(hash("0x2")).toBe("113682330006535319932160121224458771213356533826860247409332700812532759386")
})
it("Should hash an string number", async () => {
expect(hash("2").toString()).toBe(
"113682330006535319932160121224458771213356533826860247409332700812532759386"
)
expect(hash("2")).toBe("113682330006535319932160121224458771213356533826860247409332700812532759386")
})
it("Should hash an array", async () => {
expect(hash([2]).toString()).toBe(
"113682330006535319932160121224458771213356533826860247409332700812532759386"
)
expect(hash([2])).toBe("113682330006535319932160121224458771213356533826860247409332700812532759386")
})
})

View File

@@ -1,6 +1,7 @@
import calculateNullifierHash from "./calculateNullifierHash"
import generateProof from "./generateProof"
import verifyProof from "./verifyProof"
import calculateNullifierHash from "./calculateNullifierHash"
export { generateProof, verifyProof, calculateNullifierHash }
export { MerkleProof } from "@zk-kit/incremental-merkle-tree"
export * from "./types"
export { generateProof, verifyProof, calculateNullifierHash }

View File

@@ -1,19 +1,20 @@
import { SnarkJSProof, Proof } from "./types"
import { Groth16Proof } from "snarkjs"
import { PackedProof } from "./types"
/**
* Packs a proof into a format compatible with Semaphore.
* @param originalProof The proof generated with SnarkJS.
* @param proof The Groth16 proof generated with SnarkJS.
* @returns The proof compatible with Semaphore.
*/
export default function packProof(originalProof: SnarkJSProof): Proof {
export default function packProof(proof: Groth16Proof): PackedProof {
return [
originalProof.pi_a[0],
originalProof.pi_a[1],
originalProof.pi_b[0][1],
originalProof.pi_b[0][0],
originalProof.pi_b[1][1],
originalProof.pi_b[1][0],
originalProof.pi_c[0],
originalProof.pi_c[1]
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]
]
}

View File

@@ -1,33 +1,25 @@
export type BigNumberish = string | bigint
import type { NumericString } from "snarkjs"
export type SnarkArtifacts = {
wasmFilePath: string
zkeyFilePath: string
}
export type SnarkJSProof = {
pi_a: BigNumberish[]
pi_b: BigNumberish[][]
pi_c: BigNumberish[]
protocol: string
curve: string
export type SemaphoreProof = {
merkleTreeRoot: NumericString
signal: NumericString
nullifierHash: NumericString
externalNullifier: NumericString
proof: PackedProof
}
export type FullProof = {
merkleTreeRoot: BigNumberish
signal: BigNumberish
nullifierHash: BigNumberish
externalNullifier: BigNumberish
proof: Proof
}
export type Proof = [
BigNumberish,
BigNumberish,
BigNumberish,
BigNumberish,
BigNumberish,
BigNumberish,
BigNumberish,
BigNumberish
export type PackedProof = [
NumericString,
NumericString,
NumericString,
NumericString,
NumericString,
NumericString,
NumericString,
NumericString
]

View File

@@ -1,11 +1,12 @@
import { SnarkJSProof, Proof } from "./types"
import { Groth16Proof } from "snarkjs"
import { PackedProof } from "./types"
/**
* Unpacks a proof into its original form.
* @param proof The proof compatible with Semaphore.
* @returns The proof compatible with SnarkJS.
*/
export default function unpackProof(proof: Proof): SnarkJSProof {
export default function unpackProof(proof: PackedProof): Groth16Proof {
return {
pi_a: [proof[0], proof[1]],
pi_b: [

View File

@@ -1,6 +1,6 @@
import { groth16 } from "snarkjs"
import hash from "./hash"
import { FullProof } from "./types"
import { SemaphoreProof } from "./types"
import unpackProof from "./unpackProof"
import verificationKeys from "./verificationKeys.json"
@@ -11,7 +11,7 @@ import verificationKeys from "./verificationKeys.json"
* @returns True if the proof is valid, false otherwise.
*/
export default function verifyProof(
{ merkleTreeRoot, nullifierHash, externalNullifier, signal, proof }: FullProof,
{ merkleTreeRoot, nullifierHash, externalNullifier, signal, proof }: SemaphoreProof,
treeDepth: number
): Promise<boolean> {
if (treeDepth < 16 || treeDepth > 32) {

View File

@@ -0,0 +1,3 @@
{
"entryPoints": ["src/index.ts"]
}

View File

@@ -4,9 +4,9 @@
"tagline": "Semaphore explorer for on-chain groups.",
"icon": "",
"links": {
"website": "https://community.semaphore.appliedzkp.org/semaphore-explorer",
"website": "https://community.semaphore.pse.dev/semaphore-explorer",
"github": "https://github.com/semaphore-protocol/explorer",
"discord": "https://semaphore.appliedzkp.org/discord"
"discord": "https://semaphore.pse.dev/discord"
}
},
{
@@ -16,7 +16,7 @@
"links": {
"website": "https://discord.com/api/oauth2/authorize?client_id=1082429985496772628&permissions=1024&scope=bot",
"github": "https://github.com/semaphore-protocol/discord-bot",
"discord": "https://semaphore.appliedzkp.org/discord"
"discord": "https://semaphore.pse.dev/discord"
}
},
{
@@ -31,7 +31,7 @@
},
{
"name": "Plurality",
"tagline": " An Identity Lego Building Block for dapp creators that lets them identify their users without using any third-party KYC provider or other middlemen, whilst preserving the privacy of users.",
"tagline": "An Identity Lego Building Block for dapp creators that lets them identify their users without using any third-party KYC provider or other middlemen, whilst preserving the privacy of users.",
"icon": "",
"links": {
"github": "https://github.com/Web3-Plurality"
@@ -39,7 +39,7 @@
},
{
"name": "ZK Proof of Humanity",
"tagline": "A project to allows humans, registered in Proof of Humanity, to prove their humanity without doxing.",
"tagline": "A project that allows humans, registered in Proof of Humanity, to prove their humanity without doxing.",
"icon": "",
"links": {
"website": "https://zk-proof-of-humanity.vercel.app",
@@ -63,5 +63,14 @@
"website": "https://bq2.netlify.app/",
"github": "https://github.com/0xdeenz/bq2"
}
},
{
"name": "StealthComms",
"tagline": "A project that allows users to prove their membership in a group and send messages/signals without revealing their original identity.",
"icon": "",
"links": {
"website": "https://stealthcomms.surge.sh/",
"github": "https://github.com/atomniketh/zk-app"
}
}
]

6
typedoc.json Normal file
View File

@@ -0,0 +1,6 @@
{
"entryPoints": ["packages/*"],
"name": "Semaphore SDK",
"entryPointStrategy": "packages",
"exclude": ["**/cli-template*", "**/circuits", "**/contracts", "**/hardhat", "**/cli"]
}

View File

@@ -1,895 +0,0 @@
/** Declaration file generated by dts-gen */
declare module "circomlibjs" {
export class evmasm {
constructor(...args: any[])
add(...args: any[]): void
addmod(...args: any[]): void
address(...args: any[]): void
and(...args: any[]): void
balance(...args: any[]): void
blockhash(...args: any[]): void
byte(...args: any[]): void
call(...args: any[]): void
callcode(...args: any[]): void
calldatacopy(...args: any[]): void
calldataload(...args: any[]): void
calldatasize(...args: any[]): void
caller(...args: any[]): void
callvalue(...args: any[]): void
codecopy(...args: any[]): void
codesize(...args: any[]): void
coinbase(...args: any[]): void
create(...args: any[]): void
createTxData(...args: any[]): void
delegatecall(...args: any[]): void
difficulty(...args: any[]): void
div(...args: any[]): void
dup(...args: any[]): void
eq(...args: any[]): void
exp(...args: any[]): void
extcodecopy(...args: any[]): void
extcodesize(...args: any[]): void
gas(...args: any[]): void
gaslimit(...args: any[]): void
gasprice(...args: any[]): void
gt(...args: any[]): void
invalid(...args: any[]): void
iszero(...args: any[]): void
jmp(...args: any[]): void
jmpi(...args: any[]): void
keccak(...args: any[]): void
label(...args: any[]): void
log0(...args: any[]): void
log1(...args: any[]): void
log2(...args: any[]): void
log3(...args: any[]): void
log4(...args: any[]): void
lt(...args: any[]): void
mload(...args: any[]): void
mod(...args: any[]): void
msize(...args: any[]): void
mstore(...args: any[]): void
mstore8(...args: any[]): void
mul(...args: any[]): void
mulmod(...args: any[]): void
not(...args: any[]): void
number(...args: any[]): void
or(...args: any[]): void
origin(...args: any[]): void
pc(...args: any[]): void
pop(...args: any[]): void
push(...args: any[]): void
return(...args: any[]): void
returndatacopy(...args: any[]): void
returndatasize(...args: any[]): void
revert(...args: any[]): void
sdiv(...args: any[]): void
selfdestruct(...args: any[]): void
sgt(...args: any[]): void
sha3(...args: any[]): void
shor(...args: any[]): void
signextend(...args: any[]): void
sload(...args: any[]): void
slt(...args: any[]): void
smod(...args: any[]): void
sstore(...args: any[]): void
staticcall(...args: any[]): void
stop(...args: any[]): void
sub(...args: any[]): void
swap(...args: any[]): void
timestamp(...args: any[]): void
}
export class smt_memdb {
constructor(...args: any[])
get(...args: any[]): void
getRoot(...args: any[]): void
multiDel(...args: any[]): void
multiGet(...args: any[]): void
multiIns(...args: any[]): void
setRoot(...args: any[]): void
}
export function poseidon(inputs: any): any
export function poseidon_slow(inputs: any): any
export namespace babyjub {
const A: any
const Base8: any[]
const D: any
const Generator: any[]
const order: any
const p: any
const subOrder: any
function addPoint(a: any, b: any): any
function inCurve(P: any): any
function inSubgroup(P: any): any
function mulPointEscalar(base: any, e: any): any
function packPoint(P: any): any
function unpackPoint(_buff: any): any
namespace F {
const R: any
const Ri: any
const bitLength: number
const half: any
const m: number
const mask: any
const n32: number
const n64: number
const n8: number
const negone: any
const nqr: any
const nqr_to_t: any
const one: any
const p: any
const s: number
const sqrt_q: any
const sqrt_s: number
const sqrt_t: any
const sqrt_tm1d2: any
const sqrt_z: any
const t: any
const two: any
const type: string
const zero: any
function add(...args: any[]): void
function band(...args: any[]): void
function bnot(...args: any[]): void
function bor(...args: any[]): void
function bxor(...args: any[]): void
function div(...args: any[]): void
function e(...args: any[]): void
function eq(...args: any[]): void
function exp(...args: any[]): void
function fromRng(...args: any[]): void
function fromRprBE(...args: any[]): void
function fromRprBEM(...args: any[]): void
function fromRprLE(...args: any[]): void
function fromRprLEM(...args: any[]): void
function geq(...args: any[]): void
function gt(...args: any[]): void
function idiv(...args: any[]): void
function inv(...args: any[]): void
function isZero(...args: any[]): void
function land(...args: any[]): void
function leq(...args: any[]): void
function lnot(...args: any[]): void
function lor(...args: any[]): void
function lt(...args: any[]): void
function mod(...args: any[]): void
function mul(...args: any[]): void
function mulScalar(...args: any[]): void
function neg(...args: any[]): void
function neq(...args: any[]): void
function normalize(...args: any[]): void
function pow(...args: any[]): void
function random(...args: any[]): void
function shl(...args: any[]): void
function shr(...args: any[]): void
function sqrt(a: any): any
function sqrt_old(...args: any[]): void
function square(...args: any[]): void
function sub(...args: any[]): void
function toRprBE(...args: any[]): void
function toRprBEM(...args: any[]): void
function toRprLE(...args: any[]): void
function toRprLEM(...args: any[]): void
function toString(...args: any[]): void
}
}
export namespace eddsa {
function packSignature(sig: any): any
function pruneBuffer(_buff: any): any
function prv2pub(prv: any): any
function sign(prv: any, msg: any): any
function signMiMC(prv: any, msg: any): any
function signMiMCSponge(prv: any, msg: any): any
function signPoseidon(prv: any, msg: any): any
function unpackSignature(sigBuff: any): any
function verify(msg: any, sig: any, A: any): any
function verifyMiMC(msg: any, sig: any, A: any): any
function verifyMiMCSponge(msg: any, sig: any, A: any): any
function verifyPoseidon(msg: any, sig: any, A: any): any
}
export namespace mimc7 {
function getConstants(seed: any, nRounds: any): any
function getIV(seed: any): any
function hash(_x_in: any, _k: any): any
function multiHash(arr: any, key: any): any
namespace F {
const R: any
const Ri: any
const bitLength: number
const half: any
const m: number
const mask: any
const n32: number
const n64: number
const n8: number
const negone: any
const nqr: any
const nqr_to_t: any
const one: any
const p: any
const s: number
const sqrt_q: any
const sqrt_s: number
const sqrt_t: any
const sqrt_tm1d2: any
const sqrt_z: any
const t: any
const two: any
const type: string
const zero: any
function add(...args: any[]): void
function band(...args: any[]): void
function bnot(...args: any[]): void
function bor(...args: any[]): void
function bxor(...args: any[]): void
function div(...args: any[]): void
function e(...args: any[]): void
function eq(...args: any[]): void
function exp(...args: any[]): void
function fromRng(...args: any[]): void
function fromRprBE(...args: any[]): void
function fromRprBEM(...args: any[]): void
function fromRprLE(...args: any[]): void
function fromRprLEM(...args: any[]): void
function geq(...args: any[]): void
function gt(...args: any[]): void
function idiv(...args: any[]): void
function inv(...args: any[]): void
function isZero(...args: any[]): void
function land(...args: any[]): void
function leq(...args: any[]): void
function lnot(...args: any[]): void
function lor(...args: any[]): void
function lt(...args: any[]): void
function mod(...args: any[]): void
function mul(...args: any[]): void
function mulScalar(...args: any[]): void
function neg(...args: any[]): void
function neq(...args: any[]): void
function normalize(...args: any[]): void
function pow(...args: any[]): void
function random(...args: any[]): void
function shl(...args: any[]): void
function shr(...args: any[]): void
function sqrt(a: any): any
function sqrt_old(...args: any[]): void
function square(...args: any[]): void
function sub(...args: any[]): void
function toRprBE(...args: any[]): void
function toRprBEM(...args: any[]): void
function toRprLE(...args: any[]): void
function toRprLEM(...args: any[]): void
function toString(...args: any[]): void
}
}
export namespace mimc_gencontract {
const abi: {
constant: boolean
inputs: {
name: string
type: string
}[]
name: string
outputs: {
name: string
type: string
}[]
payable: boolean
stateMutability: string
type: string
}[]
function createCode(seed: any, n: any): any
}
export namespace mimcsponge {
function getConstants(seed: any, nRounds: any): any
function getIV(seed: any): any
function hash(_xL_in: any, _xR_in: any, _k: any): any
function multiHash(arr: any, key: any, numOutputs: any): any
}
export namespace mimcsponge_gencontract {
const abi: {
constant: boolean
inputs: {
name: string
type: string
}[]
name: string
outputs: {
name: string
type: string
}[]
payable: boolean
stateMutability: string
type: string
}[]
function createCode(seed: any, n: any): any
}
export namespace pedersenHash {
function getBasePoint(baseHashType: any, pointIdx: any): any
function hash(msg: any, options: any): any
}
export namespace poseidon_gencontract {
function createCode(nInputs: any): any
function generateABI(nInputs: any): any
}
export namespace smt {
class SMT {
constructor(...args: any[])
delete(...args: any[]): void
find(...args: any[]): void
insert(...args: any[]): void
update(...args: any[]): void
}
class SMTMemDB {
constructor(...args: any[])
get(...args: any[]): void
getRoot(...args: any[]): void
multiDel(...args: any[]): void
multiGet(...args: any[]): void
multiIns(...args: any[]): void
setRoot(...args: any[]): void
}
function loadFromFile(fileName: any): void
function newMemEmptyTrie(): any
}
export namespace smt_hashes_mimc {
function hash0(left: any, right: any): any
function hash1(key: any, value: any): any
namespace F {
const R: any
const Ri: any
const bitLength: number
const half: any
const m: number
const mask: any
const n32: number
const n64: number
const n8: number
const negone: any
const nqr: any
const nqr_to_t: any
const one: any
const p: any
const s: number
const sqrt_q: any
const sqrt_s: number
const sqrt_t: any
const sqrt_tm1d2: any
const sqrt_z: any
const t: any
const two: any
const type: string
const zero: any
function add(...args: any[]): void
function band(...args: any[]): void
function bnot(...args: any[]): void
function bor(...args: any[]): void
function bxor(...args: any[]): void
function div(...args: any[]): void
function e(...args: any[]): void
function eq(...args: any[]): void
function exp(...args: any[]): void
function fromRng(...args: any[]): void
function fromRprBE(...args: any[]): void
function fromRprBEM(...args: any[]): void
function fromRprLE(...args: any[]): void
function fromRprLEM(...args: any[]): void
function geq(...args: any[]): void
function gt(...args: any[]): void
function idiv(...args: any[]): void
function inv(...args: any[]): void
function isZero(...args: any[]): void
function land(...args: any[]): void
function leq(...args: any[]): void
function lnot(...args: any[]): void
function lor(...args: any[]): void
function lt(...args: any[]): void
function mod(...args: any[]): void
function mul(...args: any[]): void
function mulScalar(...args: any[]): void
function neg(...args: any[]): void
function neq(...args: any[]): void
function normalize(...args: any[]): void
function pow(...args: any[]): void
function random(...args: any[]): void
function shl(...args: any[]): void
function shr(...args: any[]): void
function sqrt(a: any): any
function sqrt_old(...args: any[]): void
function square(...args: any[]): void
function sub(...args: any[]): void
function toRprBE(...args: any[]): void
function toRprBEM(...args: any[]): void
function toRprLE(...args: any[]): void
function toRprLEM(...args: any[]): void
function toString(...args: any[]): void
}
}
export namespace smt_hashes_poseidon {
function hash0(left: any, right: any): any
function hash1(key: any, value: any): any
namespace F {
const R: any
const Ri: any
const bitLength: number
const half: any
const m: number
const mask: any
const n32: number
const n64: number
const n8: number
const negone: any
const nqr: any
const nqr_to_t: any
const one: any
const p: any
const s: number
const sqrt_q: any
const sqrt_s: number
const sqrt_t: any
const sqrt_tm1d2: any
const sqrt_z: any
const t: any
const two: any
const type: string
const zero: any
function add(...args: any[]): void
function band(...args: any[]): void
function bnot(...args: any[]): void
function bor(...args: any[]): void
function bxor(...args: any[]): void
function div(...args: any[]): void
function e(...args: any[]): void
function eq(...args: any[]): void
function exp(...args: any[]): void
function fromRng(...args: any[]): void
function fromRprBE(...args: any[]): void
function fromRprBEM(...args: any[]): void
function fromRprLE(...args: any[]): void
function fromRprLEM(...args: any[]): void
function geq(...args: any[]): void
function gt(...args: any[]): void
function idiv(...args: any[]): void
function inv(...args: any[]): void
function isZero(...args: any[]): void
function land(...args: any[]): void
function leq(...args: any[]): void
function lnot(...args: any[]): void
function lor(...args: any[]): void
function lt(...args: any[]): void
function mod(...args: any[]): void
function mul(...args: any[]): void
function mulScalar(...args: any[]): void
function neg(...args: any[]): void
function neq(...args: any[]): void
function normalize(...args: any[]): void
function pow(...args: any[]): void
function random(...args: any[]): void
function shl(...args: any[]): void
function shr(...args: any[]): void
function sqrt(a: any): any
function sqrt_old(...args: any[]): void
function square(...args: any[]): void
function sub(...args: any[]): void
function toRprBE(...args: any[]): void
function toRprBEM(...args: any[]): void
function toRprLE(...args: any[]): void
function toRprLEM(...args: any[]): void
function toString(...args: any[]): void
}
}
}

View File

@@ -1,57 +0,0 @@
/** Declaration file generated by dts-gen */
declare module "snarkjs" {
export = snarkjs
declare const snarkjs: {
groth16: {
exportSolidityCallData: any
fullProve: any
prove: any
verify: any
}
plonk: {
exportSolidityCallData: any
fullProve: any
prove: any
setup: any
verify: any
}
powersOfTau: {
beacon: any
challengeContribute: any
contribute: any
convert: any
exportChallenge: any
exportJson: any
importResponse: any
newAccumulator: any
preparePhase2: any
truncate: any
verify: any
}
r1cs: {
exportJson: any
info: any
print: any
}
wtns: {
calculate: any
debug: any
exportJson: any
}
zKey: {
beacon: any
bellmanContribute: any
contribute: any
exportBellman: any
exportJson: any
exportSolidityVerifier: any
exportVerificationKey: any
importBellman: any
newZKey: any
verifyFromInit: any
verifyFromR1cs: any
}
}
}

View File

@@ -1 +1 @@
d7a758856d660ddfe7eb99dc5a63862d9ce8114e
edeee2dd41620444c5d02da44f177e7bec77ac3b