Compare commits

...

213 Commits

Author SHA1 Message Date
Vivian Plasencia
bb089c5544 chore: v4.13.0-beta.0 2025-07-22 23:06:14 +02:00
Vivian Plasencia
88004d9092 fix: under constrained bug binary merkle root (#1012)
* Fix/update binary merkle root circuit version (#1000)

* fix(circuits)!: update binary merkle root circuit version

re #999

* chore: update snarkjs version from 0.7.4 to 0.7.5

* refactor: update the proof package and smart contracts  (#1011)

refactor: update the proof package and smart contracts with new zk artifacts
2025-07-22 23:02:00 +02:00
Vivian Plasencia
e7ca1d9487 chore: v4.12.1 2025-07-21 23:45:40 +02:00
Vivian Plasencia
1b82dcdded chore(group): update lean-imt version 2.2.3 -> 2.2.4 (#1010) 2025-07-21 16:36:43 -05:00
Vivian Plasencia
cd04b0c5c7 chore: v4.12.0 2025-07-17 16:38:26 +02:00
aritra
b6a7a9883b refactor: transport selection logic (#1007) 2025-07-17 16:30:04 +02:00
aritra
fc1fe4d086 Allow injecting existing PublicClient into SemaphoreViem (#1006)
* refactor: allow injecting existing PublicClient into SemaphoreViem

* fix: remove comment
2025-07-17 13:48:13 +02:00
Vivian Plasencia
feb8c9c97d docs(website): add ethdam video recording (#996) 2025-06-09 15:50:00 +02:00
César Henrique
b56e9690a8 Test(data): add test coverage for getEvents utility (#989)
test(data): add test coverage for getEvents utility

re #986
2025-05-26 19:10:24 +02:00
Vivian Plasencia
c973bab503 cocs: add new issue link (#988)
* docs: update contributing file

* docs: update pull request template

* docs: add new issue link to contributing
2025-05-25 23:14:11 +02:00
Vivian Plasencia
27aee4bf43 Docs/update contributing (#987)
* docs: update contributing file

* docs: update pull request template
2025-05-25 22:54:29 +02:00
Vivian Plasencia
ea62310df6 chore: v4.11.1 2025-05-21 16:49:07 +02:00
Vivian Plasencia
6bc415f4d5 fix(data): fix semaphore viem class (#985)
re #984
2025-05-21 16:44:38 +02:00
Vivian Plasencia
18f77ac0bb chore: v4.11.0 2025-05-20 14:00:27 +02:00
Sarkazein
f3c4cf27e2 feat(data): implement Viem lib alternative to SemaphoreEthers (#966)
* feat(data): implement Viem lib alternative to Ethers for @semaphore-protocol/data package class

This adds a Viem-based alternative to SemaphoreEthers, allowing
developers to choose their preferred Ethereum library.

Closes #343

* chore(data): update yarn.lock for viem dependency

* chore(data): improve test coverage for SemaphoreViem class

* chore(data): improve test coverage for SemaphoreViem class
2025-05-20 13:51:34 +02:00
Sri Hari S
57132a38df Added warning to the Semaphore docs (#983)
Update identities.mdx

Added warning to the Semaphore docs
2025-05-19 13:54:36 +02:00
Vivian Plasencia
6ef16976f7 docs(website): update semaphore roadmap (#981) 2025-05-07 14:42:59 +02:00
Vivian Plasencia
2849ca1d24 chore: v4.10.0 2025-05-06 22:36:52 +02:00
Vivian Plasencia
d05d783852 chore:deploy contracts (#980)
* chore: update semaphore contract address

re #978

* feat: add ethereum as a supported network

re #977

* feat: add ethereum subgraph and deploy subgraphs

re #978, #977
2025-05-06 22:28:08 +02:00
Vivian Plasencia
993e46a427 docs(website): update events (#979) 2025-05-05 19:03:45 +02:00
Jimmy Chu
f984c1e864 chore(website): add a new project in project page (#972) 2025-04-03 00:11:54 +02:00
Vivian Plasencia
5c9d1737d3 chore: v4.9.2 2025-03-31 12:50:00 +02:00
Vivian Plasencia
1318b0e74b docs: update releases section in readme file 2025-03-31 12:44:51 +02:00
Vivian Plasencia
c0fcc94e82 docs: add more info to the readme file about the release of the packages (#971) 2025-03-31 12:41:49 +02:00
Vivian Plasencia
e70ae1151b chore: update leanimt sol version (#970) 2025-03-31 12:30:58 +02:00
Vivian Plasencia
fd38539908 docs(website): add scaling semaphore with pir to the roadmap (#969) 2025-03-18 01:03:24 +01:00
Vivian Plasencia
8bd45d8c46 docs: add specification document link to website and docs (#965) 2025-03-06 13:55:29 +01:00
Vivian Plasencia
534e69683a docs(website): update roadmap to add semaphore noir implementation (#962) 2025-03-04 12:35:58 +01:00
Vivian Plasencia
a0a3b9380b docs(website): update spec status to true on roadmap (#959) 2025-03-03 11:02:33 +01:00
Vivian Plasencia
bc9f7df1da chore: v4.9.1 2025-02-24 23:19:29 +01:00
Vivian Plasencia
571ffdab0e chore(group): update leanimt package version (#957) 2025-02-24 23:15:07 +01:00
ewynx
773696f40c Fix broken link for LeanMIT (#956)
chore: fixes broken link for LeanMIT
2025-02-24 22:26:29 +01:00
Vivian Plasencia
f679583498 chore: v4.9.0 2025-02-03 13:26:48 +01:00
Vivian Plasencia
05926d0ef7 chore: update utils package version (#954) 2025-02-03 12:57:30 +01:00
Faezeh Shakouri
eef277281d Refactor/type-validation (#951)
* chore(data): add @zk-kit/utils dependency

* refactor(data): refactor parameter validation using @zk-kit/utils
2025-02-03 12:40:32 +01:00
Chidozie DAVID
b96467f3d4 revert(subgraph): reverses changes made (#952)
re #915
2025-02-03 12:35:25 +01:00
zanastas
e530412f27 Add new article (#918)
* Add new article

* Update apps/website/src/data/articles.json

remove referral link

Co-authored-by: Vivian Plasencia <v.pcalana@gmail.com>

---------

Co-authored-by: Vivian Plasencia <v.pcalana@gmail.com>
2025-01-29 00:04:39 +01:00
Vivian Plasencia
4df7693367 chore(subgraph): update matchstick-as dependency (#946)
* chore(subgraph): update matchstick-as dependency

* chore(subgraph): update dependency versions

* ci: update pull request workflow to install libssl1.1 before testing the subgraph

* ci: update pull requests workflow

* ci: update ubuntu version

* ci: update ubuntu version in tests

* ci: update ubuntu version
2025-01-27 14:47:11 +01:00
Sumit Vekariya
0ca80ca716 docs: fixed circuit logic url (#931)
fix: circuit logic url
2025-01-27 13:13:39 +01:00
youyyytrok
ed8141e873 docs: fix broken link and typo correction (#923)
* broken redirect CONTRIBUTING.md

* typo README.md
2025-01-27 13:10:57 +01:00
Vivian Plasencia
0f4aca3ded docs: make year update dynamically on website and docs (#945)
* docs: make year update dynamically on website and docs

* docs(docs): make year update dynamically
2025-01-20 21:45:32 +01:00
Vivian Plasencia
6e2ef756bc docs(website): update roadmap (#943)
docs(website): update roadmap on the website
2025-01-20 19:59:46 +01:00
hanghuge
c2dce437b4 chore: fix 404 status URL (#917)
Signed-off-by: hanghuge <cmoman@outlook.com>
2025-01-20 12:43:47 +00:00
0xpanoramix
8b91d75c6f feat(website): add obscurus to projects section (#941)
re #939
2025-01-20 13:06:46 +01:00
Vivian Plasencia
abfcf9f006 docs: update contributing and pull_request_template files 2025-01-14 15:10:17 +01:00
Vivian Plasencia
a2e8f5a15c chore: v4.8.2 2024-12-18 13:06:36 +01:00
Vivian Plasencia
f77df8d98f fix: include solhint config file in contracts templates (#929) 2024-12-18 13:01:35 +01:00
Vivian Plasencia
2b9fde2676 chore: v4.8.1 2024-12-18 11:41:01 +01:00
Vivian Plasencia
ac4ddfc6eb chore(cli-template-contracts-foundry): add prepublish script (#927)
chore(cli-template-contracts-foundry): add prepublish script to publish foundry template
2024-12-18 11:32:36 +01:00
Vivian Plasencia
afae06e8e1 chore: v4.8.0 2024-12-17 15:06:02 +01:00
Jimmy Chu
4cc6980b55 Add CLI Foundry Template (cont.) (#905)
* Semaphore identity example code bug fix

* Receive suggestion for consistency

* chore: forge init

* forge install: forge-std

v1.9.2

* Foundry CLI First Draft

* modules

* forge install: semaphore

v4.0.3

* forge install: zk-kit.solidity

* forge install: poseidon-solidity

v0.0.5

* forge install: openzeppelin-contracts

v5.0.2

* modules

* forge install: semaphore

v4.0.3

* forge install: zk-kit.solidity

* forge install: poseidon-solidity

v0.0.5

* forge install: openzeppelin-contracts

v5.0.2

* modules

* forge install: semaphore

v4.0.3

* forge install: zk-kit.solidity

* forge install: poseidon-solidity

v0.0.5

* forge install: openzeppelin-contracts

v5.0.2

* modules

* forge install: semaphore

v4.0.3

* forge install: zk-kit.solidity

* forge install: poseidon-solidity

v0.0.5

* forge install: openzeppelin-contracts

v5.0.2

* modules

* forge install: semaphore

v4.0.3

* forge install: zk-kit.solidity

* forge install: poseidon-solidity

v0.0.5

* forge install: openzeppelin-contracts

v5.0.2

* modules

* forge install: semaphore

v4.0.3

* forge install: zk-kit.solidity

* forge install: poseidon-solidity

v0.0.5

* forge install: openzeppelin-contracts

v5.0.2

* forge install: forge-std

v1.9.2

* modules

* forge install: semaphore

v4.0.3

* forge install: zk-kit.solidity

* forge install: poseidon-solidity

v0.0.5

* forge install: openzeppelin-contracts

v5.0.2

* modules

* forge install: semaphore

v4.0.3

* forge install: zk-kit.solidity

* forge install: poseidon-solidity

v0.0.5

* forge install: openzeppelin-contracts

v5.0.2

* forge install: forge-std

v1.9.2

* modules

* forge install: semaphore

v4.0.3

* forge install: zk-kit.solidity

* forge install: poseidon-solidity

v0.0.5

* forge install: openzeppelin-contracts

v5.0.2

* forge install: forge-std

v1.9.2

* modules

* forge install: semaphore

v4.0.3

* forge install: zk-kit.solidity

* forge install: poseidon-solidity

v0.0.5

* forge install: openzeppelin-contracts

v5.0.2

* modules

* forge install: semaphore

v4.0.3

* forge install: zk-kit.solidity

* forge install: poseidon-solidity

v0.0.5

* forge install: openzeppelin-contracts

v5.0.2

* forge install: forge-std

v1.9.2

* modules

* forge install: semaphore

v4.0.3

* forge install: zk-kit.solidity

* forge install: poseidon-solidity

v0.0.5

* forge install: openzeppelin-contracts

v5.0.2

* forge install: forge-std

v1.9.2

* change test name

* modify declaration of semaphore and verifier

* Modify Test Function Name

* Add Test Chain Target

* forge std install

* refactor(cli-template-contracts-foundry): change default Anvil address and private key

* chore(cli-template-contracts-foundry): add comments

* refactor(cli-template-contracts-foundry): add Semaphore & SemaphoreVerifier addresses for test chain

* chore(cli-template-contracts-foundry): add forge coverage for Makefile

* chore(cli-template-contracts-foundry): add env.example

* docs(cli-template-contracts-foundry): add command instructions

* updated

* forge build works

* Fixed for linting

* chore(cli-template-contracts-foundry): make the lint, prettier, and lint-staged pass

* chore(cli-template-contracts-foundry): replace Makefile(removed) with package.json

* chore(cli-template-contracts-foundry): passing the ci test

* updated test

* feat(cli-template-contracts-foundry): complete cli-template-contracts-foundry

re #854, #185

* Update dependencies

* Add explanation on `yarn dev`

* fix(cli-template-contracts-foundry): fix `yarn dev` command and add docs on integrate w/ boilerplate

* Added yarnrc

* updated version

* Added Foundry in template option

---------

Co-authored-by: weipooppys93030 <55434365+weipooppys93030@users.noreply.github.com>
Co-authored-by: timou0911 <x0928048316@gmail.com>
Co-authored-by: csiejimmyliu <91661606+csiejimmyliu@users.noreply.github.com>
2024-12-17 14:48:36 +01:00
cedoor
6b04ec0eca chore: v4.7.3 2024-12-12 08:55:13 +00:00
Jake C-T
13a9480165 fix(core): bump ethers to v6.13.4 (#921)
Update ethers version to resolve ws security issue (CVE-2024-37890).
Move contract address check outside of branch statement so Typescript can see.
Add build instructions to setup to resolve 'Cannot find module '@semaphore-protocol/...' when
running tests for the first time.

re #920
2024-12-12 08:53:17 +00:00
cedoor
53967a9a3c chore: v4.7.2 2024-12-09 10:44:07 +01:00
Lautaro Di Sanza
5b92c0a2bc fix(group): after a sequence of updates a proof is invalid (#910)
* fix(group): after a sequence of updates a proof is invalid

* fix(group): after a sequence of updates a proof is invalid
2024-12-09 10:43:08 +01:00
Dmytrol
31c776ea68 Fix Typo in Quick Setup Documentation (#916)
typos quick-setup.md
2024-12-06 10:05:56 +05:30
Vivian Plasencia
8d83d59220 chore: v4.7.1 2024-12-05 18:49:30 +01:00
Vivian Plasencia
9e4fb5376c chore: update subgraph versions (#913)
re #912
2024-12-05 18:45:49 +01:00
Vivian Plasencia
745edb8e92 chore(website): add ethindia event to the website (#911) 2024-12-04 19:15:22 +01:00
Cypher Pepe
e732992952 docs: Typo Fixes and Documentation Updates (#907)
* typo howitworks.md

* typos libsemaphore.md

* typos what-is-semaphore.md

* typo subgraph.md

* typo identities.mdx

* typo proofs.mdx

* typos page.tsx

* typo page.tsx
2024-12-02 14:35:45 +07:00
Dmitry
3fcce15375 Fix typo in section.identities.box2.description Update code.json (#909)
Correct "identtity" to "identity"
2024-12-02 14:34:08 +07:00
Cedoor
ebb6731d89 docs(subgraph): update README.md (#906)
* docs(subgraph): update README.md

* docs(subgraph): update README.md
2024-11-28 18:02:55 +07:00
wangjingcun
0c23acf9cf chore: fix 404 status URL (#904)
Signed-off-by: wangjingcun <wangjingcun@aliyun.com>
2024-11-28 14:57:10 +07:00
cedoor
3e7db08eeb chore: v4.7.0 2024-11-27 17:24:57 +07:00
Cedoor
8adfc30da8 chore(contracts): add scroll sepolia to supported networks (#902)
* chore(contracts): add scroll sepolia to supported networks

* chore(contracts): deploy contracts on scroll sepolia

re #899

* chore(contracts): deploy semaphore on correct scroll sepolia network

re #899
2024-11-27 17:24:08 +07:00
sripwoud
42639662c3 docs: add soldeer install instructions (#903)
* docs: add  `soldeer` install instructions

* update README
2024-11-27 12:36:36 +07:00
Shikhar Singh
64025516c0 feat: clean node_modules before building subgraph (#884)
* feat(cli): remove @semaphore-protocol/cli prepublish script

The idea is to remove the prepublish script from the scripts object of the package.json file of
every cli template when the template is downloaded using the CLI.

BREAKING CHANGE: n

* refactor(cli): add comment

* refactor(cli): create seperate file for removePrePublishScript function

* refactor(cli): using updatedPackageJsonContent var instead of calling readFileSync again

* fix(subgraph): clean node_modules before building subgraph

* refactor(subgraph): fix: test typo

* refactor(subgraph): refactor: remove nohoist

* refactor(subgraph): refactor: workspaces structure
2024-11-26 09:42:42 +01:00
sripwoud
91f8a4be2a fix(ci): publish pkg if no releases yet (#900)
* fix(ci): publish pkg if no releases yet

* chore(ci): add workflow release trigger

* fix: workflow dispatch instead of workflow release
2024-11-26 15:21:07 +07:00
Bryer
ebd9a27c1b typo fix Update CONTRIBUTING.md (#901)
Corrected phrasing in "Commit rules" section
2024-11-26 15:20:14 +07:00
cedoor
bada8b8792 chore: v4.6.0 2024-11-25 13:09:50 +07:00
Cedoor
e93b19c566 chore(contracts): deploy contracts (#892)
* chore(contracts): deploy contracts

* chore(subgraph): deploy new subgraphs
2024-11-25 13:08:31 +07:00
leopardracer
862f715d05 fix: typos in documentation files (#898)
* Update usage.md

* Update glossary.md
2024-11-25 12:42:49 +07:00
Dmitry
3ed6c38587 Fixed closing tag issue in Update README.md (#894)
In the table section, there is a minor mistake in the closing tag. Instead of using </tbody>, it should be </tbody>. This is a formatting mistake.
2024-11-20 15:53:14 +07:00
Cedoor
7e183f3d2c refactor(contracts): support version range (#891)
re #888
2024-10-31 13:19:05 +00:00
Jimmy Chu
901d0954c0 refactor(contracts): specify gas cost in SemaphoreVerifier precompile calls (#883)
* chore(contracts): remove sub() from gas() in staticcall at SemaphoreVerifier

re #871

* refactor(contracts): using fixed gas cost on precompile calls

re #871

* refactor(contracts): increease fixed gas cost with safety buffer
2024-10-31 12:35:19 +00:00
Erick Vasquez
caebc1a4ab feat: add veilescrow to projects section (#890) 2024-10-30 18:46:38 +01:00
Vivian Plasencia
9b419f0c78 docs: add benchmarks page (#889)
* docs(docs): add benchmarks page to the docs

re #815

* chore(docs): update the docusaurus version
2024-10-30 10:54:13 +01:00
Vivian Plasencia
c67b888eb6 chore: v4.5.0 2024-10-28 20:23:40 +01:00
Vivian Plasencia
376cd11808 docs(identity): add export import identity to the docs (#887)
re #872
2024-10-28 13:29:35 +01:00
Vivian Plasencia
58132a9478 feat(identity): export point and signature types (#886)
* feat(identity): export point and signature types

re #885

* docs(identity): add the generate commitment function to the readme file
2024-10-28 13:29:03 +01:00
Vivian Plasencia
fadcf19206 chore: v4.4.2 2024-10-23 22:42:39 +02:00
Shikhar Singh
3be17268ab feat: remove prepublish script when creating template with Semaphore CLI (#882)
* feat(cli): remove @semaphore-protocol/cli prepublish script

The idea is to remove the prepublish script from the scripts object of the package.json file of
every cli template when the template is downloaded using the CLI.

BREAKING CHANGE: n

* refactor(cli): add comment

* refactor(cli): create seperate file for removePrePublishScript function

* refactor(cli): using updatedPackageJsonContent var instead of calling readFileSync again
2024-10-23 22:07:48 +02:00
Vivian Plasencia
82cdc60af6 fix: update shebang lines in the ts scripts (#881)
re #880
2024-10-23 10:50:46 +01:00
sripwoud
6c9ede6931 ci: install soldeer in release workflow (#867)
* ci: install `soldeer` in release workflow

* ci: setup soldeer login file (#868)

* chore: trigger release workflow

* chore: format

* ci: set `soldeer` credentials in github workspace

* chore: remove commentouts

* chore: add back tag trigger
2024-10-22 09:20:34 +01:00
cedoor
e6576cdc47 chore: v4.4.1 2024-10-21 12:41:11 +01:00
cedoor
c07dc88490 style: format code with prettier 2024-10-21 12:02:54 +01:00
Yago Pajariño
67060dd412 Update cli monorepo ethers and subgraph web app UI (#841)
* refactor(cli-template-monorepo-ethers): update cli-template-monorepo-ethers web app UI

re #836

* refactor(cli-template-monorepo-subgraph): update cli-template-monorepo-subgraph web app UI

re #836

* refactor(cli-template-monorepo-subgraph): rename subgraph web app on package.json

re #836

* refactor: update yarn.lock

re #836

* chore: fix indentation error on yarn.lock

re 836

* chore: update cli monorepo package.json

re #836

* chore(cli-template-monorepo-ethers): remove .env values

* chore(cli-template-monorepo-subgraph): change .env values

* chore(cli-template-monorepo-ethers): update .gitignore file

* chore(cli-template-monorepo-subgraph): update .gitignore file

* style(cli-template-monorepo-ethers): update globals.css

* refactor(cli-template-monorepo-ethers): replace chakra with plain html+css on cli-ethers page.tsx

* style(cli-template-monorepo-ethers): import globals css in layout

* style(cli-template-monorepo-ethers): remove chakra ui elements

* refactor(cli-template-monorepo-ethers): remove chakra ui from layout

* refactor(cli-template-monorepo-ethers): remove chakra ui from PageContainer, Stepper

* style(cli-template-monorepo-ethers): add font link

* chore(cli-template-monorepo-ethers): remove unused groups page

* style(cli-template-monorepo-ethers): remove chakra ui from group page

* style(cli-template-monorepo-ethers): remove chakra ui from proof page

* style(cli-template-monorepo-ethers): update css and add class names

* style(cli-template-monorepo-ethers): add css declarations

* style(cli-template-monorepo-ethers): add github icon

* style(cli-template-monorepo-ethers): add left arrow on stepper

* style(cli-template-monorepo-ethers): remove chakra from proofs page

* style(cli-template-monorepo-ethers): minor style improvements

* style(cli-template-monorepo-ethers): remove chakra libraries from package.json

* refactor(cli-template-monorepo-ethers): update yarn.lock file after package.json modified

* style(cli-template-monorepo-ethers): fix deepscan issues

* chore(cli-template-monorepo-ethers): remove unused packages and update dotenv version

* style(cli-template-monorepo-ethers): update stylesheet

* chore(cli-template-monorepo-ethers): update github logo

* chore(cli-template-monorepo-ethers): add loader to join group button

* chore(cli-template-monorepo-subgraph): update packages

* style(cli-template-monorepo-subgraph): update stylesheet

* style(cli-template-monorepo-subgraph): update user interface

* chore: update yarn.lock

* style: change styling and add feedback link

* chore(cli-template-monorepo-subgraph): remove unused styles and icons

* chore: remove unused context logs

* chore(cli-template-monorepo-subgraph): change data source subgraph web app

* chore: change repo url

* chore: remove unused hook useSemaphore
2024-10-21 11:58:05 +01:00
Cedoor
a4e540d8f4 chore(website): update roadmap (#878) 2024-10-18 13:03:16 +01:00
Jimmy Chu
79976f33cb Split SemaphoreVerifier key points into a separate library (#875)
* refactor(scripts): added a script to convert bigint to hex

* refactor(contracts): split SemaphoreVerifier verification key points into a separate library (#330)

* chore(contracts): yarn format & lint

* refactor(contracts): update SemaphoreVerifierKeyPts library to be internal

re #330

* chore(contracts): update spacing

* chore(contracts): updated per peer review and added invariant check for VerifierKeyPts lib

* chore(contracts): update invariant check to revert with custom error
2024-10-17 14:21:41 +01:00
cedoor
822530f2cf chore: v4.4.0 2024-10-17 14:19:38 +01:00
Vivian Plasencia
b3f862979d feat(identity): add generate commitment function (#877)
This static method is particularly useful after signature verification, as it allows retrieval of
the corresponding commitment associated with the public key.

re #873
2024-10-17 13:28:49 +02:00
cedoor
06e11d5c34 chore: v4.3.1 2024-10-16 12:20:26 +01:00
cedoor
88d4470b11 ci(circuits): add sudo before running wget command 2024-10-16 12:16:22 +01:00
Vivian Plasencia
bb1c6984b2 ci: add -O flag to the wget command 2024-10-16 13:04:32 +02:00
cedoor
5841327477 ci(circuits): update circom url 2024-10-16 11:52:02 +01:00
cedoor
eab3ab30c6 ci(circuits): update circom url 2024-10-16 11:48:30 +01:00
Cedoor
cd6dc38f9e ci(circuits): set static version of circom (#874)
* fix(circuits): add override for circom_runtime

* chore(circuits): use yarn syntax for overrides

* ci(circuits): set static version of circom
2024-10-16 11:05:07 +01:00
cedoor
3cb1b5757d revert(circuits): set previous circomkit version as static 2024-10-15 11:30:11 +01:00
cedoor
a8db8393c1 chore(circuits): update circomkit config 2024-10-15 11:24:55 +01:00
cedoor
391b571c31 chore(circuits): update circomkit dep version 2024-10-15 11:21:04 +01:00
cedoor
4c2769099f chore(circuits): update dev dependencies 2024-10-15 11:05:08 +01:00
Cedoor
29cabb49d6 build: move poseidon-lite to dependencies (#870) 2024-10-15 10:58:51 +01:00
cedoor
48b0694586 chore: v4.3.0 2024-10-03 12:46:01 +01:00
Cedoor
28684fdb1a Chore/mainnet deployments (#869)
* chore(contracts): deploy semaphore contracts on base

re #865

* chore(contracts): deploy semaphore contracts on linea

re #865

* refactor(data): add types for new networks

re #865
2024-10-03 12:42:36 +01:00
Cedoor
49a16635d8 chore(website): update roadmap.json (#866) 2024-10-01 19:04:11 +01:00
cedoor
4bfe6d8791 chore: v4.2.0 2024-10-01 18:48:37 +01:00
Cedoor
a3d97795fe Chore/new testnets (#864)
* chore(contracts): deploy contracts on base sepolia

re #863

* chore(contracts): deploy contracts on linea sepolia

re #863
2024-10-01 18:36:55 +01:00
cedoor
4c8d297902 chore: v4.1.0 2024-10-01 11:35:27 +01:00
Cedoor
fdbadf5b71 Chore/mainnet deployments (#862)
* chore(contracts): deploy contracts on arbitrum

re #859

* chore(contracts): deploy contracts on polygon

re #859

* chore(contracts): deploy contracts on optimism

re #859
2024-10-01 11:31:29 +01:00
Vivian Plasencia
4496eee137 docs(website): update events (#857) 2024-09-20 17:53:55 +02:00
Cedoor
215a12e25c docs(website): add new project (#856)
re #855
2024-09-20 16:24:23 +01:00
Cedoor
87331114c1 chore: replace discord link with telegram (#853) 2024-09-03 12:49:31 +02:00
sripwoud
0d41562dad chore: publish contracts to soldeer (#820)
* chore: define separate version.ts script

* chore: include publishing to soldeer in script

* fix(contracts): push to soldeer

re 800

* ci: fetch latest contract version from soldeer

* refactor: do not use execa in scripts

* fix: do not exit process in script

* chore: remove comments

* refactor: use shebang in ts scripts

* chore(contracts): add soldeerignore

* chore: inherit stdio in scripts

* chore: remove dry run flag

* chore: uncomment

* chore: fix typo in comment
2024-08-28 16:26:48 +02:00
Elias Rad
c435712656 docs fix spelling issues (#852)
* Update README.md

* Update contract-api.md

* Update howitworks.md

* Update libsemaphore.md
2024-08-28 16:26:31 +02:00
Vivian Plasencia
7d48311474 chore: v4.0.3 2024-08-13 09:53:22 +02:00
csiejimmyliu
5ef73e2819 Semaphore Identity example code bug fix (Fix #848) (#849)
* Semaphore identity example code bug fix

* Receive suggestion for consistency

---------

Co-authored-by: weipooppys93030 <55434365+weipooppys93030@users.noreply.github.com>
2024-08-12 23:29:04 +02:00
cedoor
de7bdd6d17 chore: v4.0.2 2024-08-12 12:00:57 +02:00
Cedoor
21c2739f19 fix(group): update lean-imt dependency (#850)
re #847
2024-08-12 11:56:08 +02:00
Vivian Plasencia
1ed170d0db chore: add pairwise to the list of projects (#846)
* chore: add pairwise to the list of projects

re #845

* refactor: remove slash from the website url

* refactor: remove www from website url
2024-07-31 13:12:54 +01:00
Cedoor
bc041486b0 chore(website): add new project (#844)
re #839
2024-07-31 10:51:52 +01:00
cedoor
5db1bccb84 chore: v4.0.1 2024-07-31 10:39:27 +01:00
Cedoor
b2da0a685a fix(proof): replace root public signal with actual root (#843)
The public signal of proof related to the Merkle root could obviously be different from what is
expected to be the root of the group. Therefore, for the proof to be valid, it is necessary that the
group root passed as a parameter matches the proof/circuit root output.

re #842
2024-07-31 10:38:02 +01:00
Cedoor
9329eed754 docs(docs): update credits.md (#840) 2024-07-26 18:59:56 +02:00
Cedoor
75563ee0d5 docs(docs): update v4 doc (#837)
* docs(docs): update v4 doc

* Update apps/docs/docusaurus.config.ts

Co-authored-by: Vivian Plasencia <v.pcalana@gmail.com>

---------

Co-authored-by: Vivian Plasencia <v.pcalana@gmail.com>
2024-07-25 12:51:06 +01:00
Cedoor
368bbd4bcd docs(website): add roadmap to home page (#834)
* docs(website): add roadmap to home page

re #833

* fix(website): add key property

re #833

* docs(website): add vertical roadmap
2024-07-25 12:50:49 +01:00
Vivian Plasencia
da2fae673d chore: v4.0.0 2024-07-25 13:39:24 +02:00
Cedoor
ff61aae040 chore(proof): update artifacts version (#838) 2024-07-25 12:32:00 +01:00
Vivian Plasencia
44ad964beb chore: v4.0.0-beta.19 2024-07-25 12:55:21 +02:00
Vivian Plasencia
d54d67345d fix: update cli ethers and subgraph templates (#835)
fix: fix cli ethers and subgraph templates
2024-07-25 12:16:57 +02:00
Vivian Plasencia
b5f8ee7929 refactor: support groups with tree depth 0 in cli templates (#832)
refactor: support groups with tree depth 0
2024-07-19 17:29:32 +01:00
cedoor
698cef0a80 chore: v4.0.0-beta.18 2024-07-19 14:11:17 +01:00
Cedoor
af4aec2127 refactor(proof)!: set tree depth = 1 when a group has 1 member (#831)
re #812
2024-07-19 14:10:19 +01:00
Vivian Plasencia
af4fe8de82 fix: cli templates (#830)
* fix(cli-template-monorepo-ethers): update hook dependencies

* fix(cli-template-monorepo-subgraph): update hook dependencies

* docs: update template readme files

* Update packages/cli-template-contracts-hardhat/README.md

Co-authored-by: Cedoor <me@cedoor.dev>

* style: format code

* docs: update note text style

---------

Co-authored-by: Cedoor <me@cedoor.dev>
2024-07-19 14:08:01 +01:00
Vivian Plasencia
90caadf5dc refactor(cli): create an empty yarn.lock file when generating a semahore project with the cli (#828)
refactor(cli): create an empty yarn.lock file when generating a semaphore project with the cli

Now devs will be able to install dependencies successfully right after creating a project with the
CLI.

re #827
2024-07-19 11:32:50 +01:00
cedoor
1e4e63cc31 chore: v4.0.0-beta.17 2024-07-18 22:34:57 +01:00
cedoor
4e54c159e6 chore(subgraph): deploy new subgraphs 2024-07-18 22:33:24 +01:00
Cedoor
0d55ccbb15 chore: update verification keys and deploy contracts (#826)
* chore: update verification keys

* fix(contracts): update verification key parameters

* chore: deploy contracts

* chore(contracts): remove script to copy abi after compiling
2024-07-18 18:48:36 +01:00
Ben Green
57747467bd docs(website): adding AsteriskDAO to project list (#824) 2024-07-15 20:41:12 +01:00
ctrlc03
d9fff6129c chore(contracts): add custom chain config for etherscan api (#823) 2024-07-15 14:53:58 +01:00
Cedoor
0f6505c014 build: build components sequentially (#821) 2024-07-11 14:43:36 +01:00
Cedoor
6c9be1bb5e docs: add link to pse acceleration program (#822) 2024-07-10 12:28:01 +01:00
Chidozie DAVID
fe5cf653c1 Refactor/sempahore abi to utils (#818)
* ci(contracts): a script that moves the abi.json file created to utils folder

A script could be run immediately after compilation to copy the file
artifacts/contracts/Semaphore.sol/Semaphore.json to packages/utils/src/semaphore-abi.json. Then all
packages/apps that need the interface can import it from @semaphore-protocol/utils.

re #817

* refactor(utils): allows packages to import abi from @semaphore-protocol/utils

re #817

* refactor(cli-template-monorepo-ethers): installs ncp and exports Semaphore Abi byte code

re #817

* refactor(contracts): added a script that automates movement of semaphore-abi.json

* chore(cli): changed the dependency and moved to ncp for copying semaphore abi

Changed the importation of abi in utils to _interface and moved the ncp to a dev depency

* chore(utils): changed ab to _interface and update to package.json

* chore(cli): deleted Cli-template file and made a document change

delted some cli-template file, changed yarn commit to git commit and fixed the yarn compile  script
2024-07-09 23:24:48 +01:00
Cedoor
ced5f6a2d5 chore(contracts): add function to deploy contracts deterministically (#816)
* chore(contracts): add function to deploy contracts deterministically

re #766

* chore(contracts): return correct contract instance

re #766
2024-07-05 14:23:09 +01:00
sripwoud
1b046fd8d1 perf: speed up local scripts (#810)
* chore: parallelize build scripts

* chore: run tests concurrently

* chore: group test log outputs

* chore: execute lint and format scripts concurrently

* refactor: do no use wildcard for test script`
2024-07-04 17:24:43 +02:00
cedoor
5fe6e4cd5f chore: v4.0.0-beta.16 2024-07-01 16:29:18 +01:00
Giacomo
e63209914d Add missing implicit method from contract to interface (#814)
refactor(contracts): add missing implicit method from interface
2024-07-01 16:28:15 +01:00
cedoor
504c0f7f9c chore: v4.0.0-beta.15 2024-06-28 11:02:25 +01:00
Cedoor
a1628f635a chore: deploy contracts and replace mumbai with amoy (#809)
* chore: remove unused env variable

* chore: deploy contracts and replace mumbai with amoy

* docs(subgraph): update README.md

* style(subgraph): format code with prettier

* docs(contracts): update deploy command name
2024-06-28 10:59:08 +01:00
cedoor
bb1975a949 chore: v4.0.0-beta.14 2024-06-24 12:41:04 +01:00
Cedoor
b9a163e613 docs: update pull_request_template.md (#807)
Update pull_request_template.md
2024-06-24 12:40:18 +01:00
Cedoor
7ec35c22f8 chore(proof): update @zk-kit/artifacts dep version (#806) 2024-06-24 12:39:31 +01:00
cedoor
f19daf7896 chore: v4.0.0-beta.13 2024-06-18 12:09:38 +01:00
Cedoor
3572f4493d fix(identity)!: update type of private key (#803)
* fix(identity)!: update type of private key

The new types support buffers and text, so that there is less ambiguity on strings.

* refactor(identity): use base64 as encoding for exported priv keys

re #799

* Update packages/identity/src/index.ts

Co-authored-by: Andrew Twyman <artwyman@users.noreply.github.com>

* test(identity): add more tests

re #799

---------

Co-authored-by: Andrew Twyman <artwyman@users.noreply.github.com>
2024-06-18 12:08:20 +01:00
dropbigfish
2830d3d0dc chore: fix wrong link in README.md (#802)
Signed-off-by: dropbigfish <fillfish@foxmail.com>
2024-06-13 11:20:10 +01:00
Giacomo
62b6b170a6 Announce Trusted Setup V4 ceremony (#794)
* chore(website): add trusted setup ceremony on the website

* docs(docs): add trusted setup ceremony instructions on documentation

* chore(docs): add candidate plan for prod ceremony

re n

* fix(docs): rename file to avoid mismatching hyphens

* style(website): follow style guide for hover

* fix(website): wrong link to ceremony

* fix(docs): switch emoji
2024-06-11 10:46:27 +02:00
Vivian Plasencia
5d513f92fb chore: v4.0.0-beta.12 2024-05-31 15:17:01 +02:00
sripwoud
0c942220b6 chore(proof): bump @zk-kit/artifacts to 1.4.1 (#798)
chore(proof): bump `@zk-kit/artifacts`

includes a retry mechanism to fetch artifacts
2024-05-31 14:43:17 +02:00
Vivian Plasencia
9237e147b8 chore: add runs-on to docs workflow (#797) 2024-05-31 13:16:45 +02:00
Vivian Plasencia
1dbc310333 chore: update verification keys (#795)
These are the new keys after the staging ceremony.
2024-05-31 13:02:34 +02:00
sripwoud
4870175577 docs: add link to API Reference (typedoc) (#790)
* chore: shorten `docs` scripts

`githubPages` is true by default
https://rb.gy/hzopfn

* docs: update README.md

* chore: trigger docs workflow only on changes in relevant files

* refactor: provide `cname` typedoc option via config file

* chore: remove heyauthn from exclude typedoc list
2024-05-30 17:29:56 +02:00
Vivian Plasencia
55e887c111 chore: update video url and thumbnail (#793) 2024-05-22 15:20:12 +02:00
Vivian Plasencia
f934c02214 chore: v4.0.0-beta.11 2024-05-21 09:48:11 +02:00
Vivian Plasencia
43fba00845 chore: update zk kit dependencies (#791)
* chore: update @zk-kit/baby-jubjub and @zk-kit/eddsa-poseidon dependencies

re #786

* chore(group): use the new @zk-kit/lean-imt library

re #786

* chore: update @zk-kit/utils version

re #786

* chore(contracts): use the new @zk-kit/lean-imt.sol library in contracts

re #786
2024-05-21 09:43:55 +02:00
sripwoud
7b3621a701 refactor: add @zk-kit/artifacts (#788)
* refactor: add `@zk-kit/artifacts`

* chore: update `jest.config.ts`

* test: increase timeouts

* chore: bump `@zk-kit/utils`

* fix: bump `@zk-kit/artifacts`
2024-05-20 12:16:01 -05:00
Vivian Plasencia
f3f3688476 test(circuits): add test using the identity library (#785)
There is a new test using the Semaphore Identity package to test compatibility between the Identity
library and the circuit.

re #484
2024-05-17 10:01:44 +01:00
Vivian Plasencia
0fa785bc58 chore: v4.0.0-beta.10 2024-05-16 12:47:57 +02:00
Vivian Plasencia
51ebe9db4d feat: support more tree depths (#779)
* feat: support more tree depth

Now Semaphore v4 will support tree depth from 2 to 32.

re #778

* test(proof): update tests to support circuit changes and tree depth 2 - 32

re #778

* fix(contracts): update verifier VK_POINTS

re #778

* test(proof): make tests more atomic

* chore: support tree depth 1

re #778
2024-05-16 12:41:46 +02:00
Vivian Plasencia
c88175bb2d chore: update zk-kit dependencies (#781)
* chore: update @zk-kit/imt and @zk-kit/imt.sol dependencies

re #776

* chore(identity): update dependency @zk-kit/eddsa-poseidon

re #776

* chore: update dependency @zk-kit/utils

re #776

* chore: add fixed version of zk-kit packages

re #776

* chore(identity): update dependency @zk-kit/baby-jubjub

re #776

* chore: update @zk-kit/baby-jubjub package version

re #776

* chore(identity): update @zk-kit/eddsa-poseidon package version

re #776

* chore: update yarn.lock file
2024-05-15 16:52:12 +01:00
Cedoor
ea175fa90c chore: add code owners (#784)
Through Github rulesets and the definition of code owners, it is possible to automate the review
process without additional workflows. It also makes responsibilities within the project clearer. The
current CODEOWNERS file is very simple but more complex rules can be introduced in the future.

re #783
2024-05-15 14:41:35 +01:00
Cedoor
f9e41fb306 chore(circuits): update binary-merkle-root dependency (#780)
re #776
2024-05-13 17:15:18 +01:00
Cedoor
47bfebd4ed docs(docs): add v4 audit report (#777) 2024-05-12 11:17:14 +01:00
Vivian Plasencia
9e5b2285fc test: add missing tests in the js libraries (#774)
* test: add missing tests

Now all lines of js libraries are 100% covered.

re #484

* test(proof): update message type

re #484

* test(proof): update constant

re #484

* test(proof): update number constant

re #484
2024-05-09 12:53:20 +01:00
aguzmant103
de15989638 chore(website): update event list (#775) 2024-05-08 23:15:49 +02:00
sripwoud
2e56ab6b07 chore: optimize pull-requests workflow (#765)
* chore: optimize pull-requests workflow

* fix: quote glob pattern

* fix: append `$` to variables in workflow

* chore: include `yaml` files in lintstaged format check

* feat: detect to_format or to_lint changed files

* feat: run test workflow steps conditionally

* Update .github/workflows/pull-requests.yml

Co-authored-by: Daehyun Paik <paik@a30a.dev>

* Update .github/workflows/pull-requests.yml

Co-authored-by: Daehyun Paik <paik@a30a.dev>

* fix: build utils before contracts

* fix: build identity pkg before running contracts tests

* fix: need to quote `true`

* fix: build group pkg before running contracts tests

* fix: build `{group,identity,proof}` before running circuits tests

* fix: build `proof` pkg before running contracts tests

* fix: build utils before testing circuits

* fix: build `utils` before `subgraph` pkg

---------

Co-authored-by: Daehyun Paik <paik@a30a.dev>
2024-05-08 11:10:00 +01:00
hw
3329922077 test(contracts): update contract tests to be more atomic and use loadFixture (#706) (#770)
test(contracts): update contract test

update contract test to be more atomic and use loadFixture

re #706
2024-05-08 10:55:47 +01:00
Giacomo
6b6bc6a98e Improve documentation for @semaphore/cli package (#771)
docs(cli): improve code comments and readme of the @semaphore/cli package
2024-05-07 14:31:04 +01:00
Giacomo
b9fa75cba3 Improve documentation for @semaphore/data package (#768)
* docs(data): improve code comments and readme of the @semaphore/data package

* docs(data): update package.json description and small nit on README
2024-05-07 14:30:43 +01:00
Giacomo
1b34ad312d Improve documentation for @semaphore/hardhat package (#772)
* docs(hardhat): improve code comments and readme for @semaphore/hardhat package

* docs(hardhat): update package.json description
2024-05-07 14:27:32 +01:00
Vivek
74df3c204d Update articles.json (#769) 2024-05-07 10:47:15 +02:00
Nick Addison
08af4a315f Added missing await in proofs example (#767)
Added missing await in proofs example
2024-05-07 10:46:58 +02:00
cedoor
ddfe4ffd56 chore: v4.0.0-beta.9 2024-05-02 16:29:22 +01:00
Cedoor
87f63451e3 fix(group): add check for zero values in group constructor (#764) 2024-05-02 16:28:21 +01:00
Vivian Plasencia
f8deb64285 chore: update config (#763)
* chore: update lint-staged config

* chore: use czg instead of cz + cz-git

re #738

* chore: use cat instead of vim editor to write commits

re #738

* chore: use secrets.GITHUB_TOKEN instead of secrets.GH_TOKEN

re #738

* style: add a space at the end of the pre-commit file
2024-05-01 10:45:27 +02:00
Vivian Plasencia
82bc47fb24 test(proof): increase timeout for tests generating proofs (#762)
re #761
2024-04-30 15:39:38 +02:00
Seva Zhidkov
5ced7db5f8 docs: fix 404 broken link to circuit file (#760)
docs: fix broken link to circuit file 

broken since [this commit](d9d5de1569 (diff-27cc20ba62610ee534566b1969efe92677c1c6af8940cdc20b57fcb0b4e0c6b3))
2024-04-30 14:33:03 +02:00
Vivian Plasencia
5c224f214c fix: update format code command (#759) 2024-04-29 18:07:36 +02:00
sripwoud
0b9ba376db chore(docs): format mdx files (#754)
* chore(docs): format `mdx` files with `remark`

`prettier` doesn't not have proper support for MDX v3.
Docusaurus recommends using `remark` instead.
https://docusaurus.io/docs/markdown-features/react

re #503

* chore(docs): add remark lint plugins

* chore: bump yarn.lock

* chore: add `quiet` option to remark
2024-04-29 17:13:35 +02:00
cedoor
a9410fa6d1 chore: v4.0.0-beta.8 2024-04-26 18:09:23 +02:00
Cedoor
79bd8d6305 fix: update snarkjs dependency version (#755)
re #713, #675
2024-04-26 17:59:14 +02:00
Vivian Plasencia
c5448fe1f0 Move heyauthn package (#753)
chore: remove heyauthn package

The heyauthn package was moved to the semaphore-protocol extensions repo.

re #752
2024-04-25 15:57:23 +02:00
sripwoud
cf1cffdf65 refactor!: use maybeGetSemaphoreSnarkArtifacts from `@zk-kit/utils (#747)
* chore(proof): bump `@zk-kit/utils` dep

* refactor(proof): use `maybeGetSemaphoreSnarkArtifacts` from `@zk-kit/utils`

Delete logic related to fetching snark artifacts (wasm and zkey files) that was moved to
`@zk-kit/utils`

* revert(proof): add back `requireObject(snarkArtifacts)` check

* chore(proof): update rollup.browser.config.ts

* docs(proof): update README

* chore(proof): remove unused import in rollup.browser.config.ts

* Update packages/proof/package.json

Co-authored-by: Cedoor <me@cedoor.dev>

* docs(proof): add links to other repos in proof README

* chore: bump `yarn.lock`

* docs(proof): add punctuation

---------

Co-authored-by: Cedoor <me@cedoor.dev>
2024-04-24 16:43:19 +02:00
Cedoor
41a85e0e45 Merge pull request #748 from semaphore-protocol/gitignore
chore: update `.gitignore`
2024-04-24 15:08:17 +02:00
Cedoor
6502c17f7b Merge pull request #750 from semaphore-protocol/fix/docs
docs: fix `typedoc` compilation warnings
2024-04-24 15:07:24 +02:00
Cedoor
1849055e88 Merge pull request #751 from semaphore-protocol/fix/install-circom-deps
ci: fix circom deps installation steps
2024-04-24 15:01:04 +02:00
sripwoud
e536debb16 ci: add comment 2024-04-24 14:36:13 +02:00
sripwoud
4ba367bee4 chore: format 2024-04-24 13:56:48 +02:00
sripwoud
ce6d622202 ci: remove microsoft.prod sources file 2024-04-24 13:54:20 +02:00
sripwoud
3b08b67175 ci: debug pull-requests workflow 2024-04-24 13:52:02 +02:00
sripwoud
68181aa1fb docs: fix warnings about function signatures 2024-04-24 13:29:58 +02:00
sripwoud
6225b9b7c0 docs: fix typedoc entryPoints 2024-04-24 13:29:25 +02:00
sripwoud
940db25a87 chore: update .gitignore
Don't version control `asdf` and `direnv` configuration files
2024-04-24 13:09:22 +02:00
Cedoor
9dc768376c Merge pull request #743 from semaphore-protocol/fix/baby-jubjub
Add check to make sure Baby Jubjub secret scalar is < l
2024-04-19 11:04:57 +02:00
cedoor
ba8132561a chore: update lockfile 2024-04-17 10:46:45 +02:00
Cedoor
5aaa9e4f69 Merge pull request #742 from semaphore-protocol/docs/update-code
Update Solidity code to create groups in documentation website
2024-04-16 09:21:17 +01:00
cedoor
f19b632e1e docs(docs): update solidity code to create groups 2024-04-15 16:55:32 +01:00
cedoor
b40f9f13e9 test(circuits): add new test for l = r - 1 2024-04-12 18:45:34 +01:00
cedoor
e884186488 refactor(circuits): remove greater-than check and update less-than bits 2024-04-12 16:22:49 +01:00
Cedoor
a4a6837f5a Merge pull request #737 from Stumble/yumin/fix-alias
fix: incorrect alias check brought from snarkjs. (possible security vulnerability)
2024-04-12 12:12:23 +01:00
Cedoor
2aee16e082 Merge pull request #741 from 0xbok/sol-op
perf(contracts): turn on solidity optimizer
2024-04-09 10:58:49 +01:00
0xbok
7c99c74fac perf(contracts): turn on solidity optimizer
Turn on solidity optimizer

re #740
2024-04-09 02:12:08 +04:00
Yumin Xia
8e246c48bf fix: incorrect alias check brought from snarkjs. 2024-04-05 12:21:59 -07:00
cedoor
75eac56e9f chore: update lockfile 2024-03-29 17:51:34 +00:00
cedoor
d9d5de1569 fix(circuits): check whether the secret scalar is within the r field 2024-03-29 17:49:40 +00:00
270 changed files with 16436 additions and 9421 deletions

View File

@@ -1,5 +1,4 @@
DEFAULT_NETWORK=hardhat
TREE_DEPTH=10
REPORT_GAS=false
BACKEND_PRIVATE_KEY=
COINMARKETCAP_API_KEY=

View File

@@ -26,5 +26,13 @@
"no-console": ["warn", { "allow": ["info", "warn", "error"] }],
"@typescript-eslint/lines-between-class-members": "off",
"no-param-reassign": "off"
}
},
"overrides": [
{
"files": ["./scripts/*"],
"rules": {
"no-console": "off"
}
}
]
}

1
.github/CODEOWNERS vendored Normal file
View File

@@ -0,0 +1 @@
* @semaphore-protocol/core-devs

View File

@@ -29,12 +29,12 @@
<!-- Please check if the PR fulfills these requirements. -->
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have run `yarn prettier` and `yarn lint` without getting any errors
- [ ] I have run `yarn format` and `yarn lint` without getting any errors
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules
> [!IMPORTANT]
> We do not accept pull requests for minor grammatical fixes (e.g., correcting typos, rewording sentences) or for fixing broken links, unless they significantly improve clarity or functionality. These contributions, while appreciated, are not a priority for merging. If you notice any of these issues, please create a [GitHub Issue](https://github.com/semaphore-protocol/semaphore/issues/new?template=BLANK_ISSUE) to report them so they can be properly tracked and addressed.

View File

@@ -1,14 +0,0 @@
name: auto-assign
on:
pull_request:
types: [opened]
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: wow-actions/auto-assign@v3
with:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
reviewers: org/core-devs

View File

@@ -2,8 +2,16 @@ name: docs
on:
push:
branches:
- main
branches: [main]
paths:
[
"apps/docs/**",
"packages/data/**",
"packages/group/**",
"packages/identity/**",
"packages/proof/**",
"packages/utils/**"
]
jobs:
gh-pages:

View File

@@ -24,23 +24,17 @@ jobs:
- name: Install dependencies
run: yarn
- name: Build libraries
run: yarn build:libraries
- name: Build packages and apps
run: yarn build
- name: Compile contracts
run: yarn compile:contracts
- name: Build subgraph
run: yarn build:subgraph
- name: Run Prettier
run: yarn prettier
- name: Format
run: yarn format
- name: Run Eslint
run: yarn lint
test-subgraph:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04 # Context: https://github.com/graphprotocol/graph-tooling/issues/1546#issuecomment-2589680195
steps:
- uses: actions/checkout@v4
@@ -82,11 +76,14 @@ jobs:
cache: yarn
# https://github.com/iden3/circuits/blob/8fffb6609ecad0b7bcda19bb908bdb544bdb3cf7/.github/workflows/main.yml#L18-L22
# https://stackoverflow.com/a/78377916
- name: Setup Circom deps
run: sudo apt-get update && sudo apt-get install -y wget nlohmann-json3-dev libgmp-dev nasm g++ build-essential
run: |
sudo rm /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update && sudo apt-get install -y wget nlohmann-json3-dev libgmp-dev nasm g++ build-essential
- name: Setup Circom
run: wget https://github.com/iden3/circom/releases/latest/download/circom-linux-amd64 && sudo mv ./circom-linux-amd64 /usr/bin/circom && sudo chmod +x /usr/bin/circom
run: sudo wget https://github.com/iden3/circom/releases/download/v2.1.9/circom-linux-amd64 -O /usr/bin/circom && sudo chmod +x /usr/bin/circom
- name: Install dependencies
run: yarn

View File

@@ -22,23 +22,60 @@ jobs:
- name: Install dependencies
run: yarn
- name: Build libraries
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44
with:
files_yaml: |
circuits:
- packages/circuits/**/*.{circom,json,ts}
contracts:
- packages/contracts/**/*.{js,json,ts,sol}
docs:
- apps/docs/**/*
libraries:
- packages/**/*.{js,json,ts}
- '!packages/{circuits,contracts}/**/*'
subgraph:
- apps/subgraph/**/*
to_format:
- '**/*.{cjs,js,json,jsx,md,mdx,sol,ts,tsx,yaml,yml}'
to_lint:
- '**/*.{cjs,js,jsx,ts,tsx}'
- if: steps.changed-files.outputs.contracts_any_changed == 'true'
name: Compile and lint contracts
run: |
yarn workspace @semaphore-protocol/utils build
yarn compile:contracts
yarn workspace semaphore-contracts lint
- if: steps.changed-files.outputs.docs_any_changed == 'true'
name: Build and format docs
run: |
yarn workspace semaphore-docs build
yarn workspace semaphore-docs format
- if: steps.changed-files.outputs.libraries_any_changed == 'true'
name: Build libraries
run: yarn build:libraries
- name: Compile contracts
run: yarn compile:contracts
- if: steps.changed-files.outputs.subgraph_any_changed == 'true'
name: Build subgraph
run: |
yarn workspace @semaphore-protocol/utils build
yarn build:subgraph
- name: Build subgraph
run: yarn build:subgraph
- if: steps.changed-files.outputs.to_format_any_changed == 'true'
name: Format
run: yarn run prettier --check ${{ steps.changed-files.outputs.to_format_all_changed_files }}
- name: Run Prettier
run: yarn prettier
- name: Run Eslint
run: yarn lint
- if: steps.changed-files.outputs.to_lint_any_changed == 'true'
name: Run Eslint
run: yarn run eslint ${{ steps.changed-files.outputs.to_lint_all_changed_files }} --ext .cjs,.js,.jsx,.ts,.tsx
test:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04 # Context: https://github.com/graphprotocol/graph-tooling/issues/1546#issuecomment-2589680195
steps:
- uses: actions/checkout@v4
@@ -49,21 +86,55 @@ jobs:
node-version: 20
cache: yarn
# https://github.com/iden3/circuits/blob/8fffb6609ecad0b7bcda19bb908bdb544bdb3cf7/.github/workflows/main.yml#L18-L22
- name: Setup Circom deps
run: sudo apt-get update && sudo apt-get install -y wget nlohmann-json3-dev libgmp-dev nasm g++ build-essential
- name: Setup Circom
run: wget https://github.com/iden3/circom/releases/latest/download/circom-linux-amd64 && sudo mv ./circom-linux-amd64 /usr/bin/circom && sudo chmod +x /usr/bin/circom
- name: Install dependencies
run: yarn
- name: Build libraries
run: yarn build:libraries
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44
with:
files_yaml: |
circuits:
- packages/circuits/**/*.{circom,json,ts}
contracts:
- packages/contracts/**/*.{js,json,ts,sol}
libraries:
- packages/**/*.{js,json,ts}
- '!packages/{circuits,contracts}/**/*'
subgraph:
- apps/subgraph/**/*
- name: Build subgraph
run: yarn build:subgraph
# https://github.com/iden3/circuits/blob/8fffb6609ecad0b7bcda19bb908bdb544bdb3cf7/.github/workflows/main.yml#L18-L22
# https://stackoverflow.com/a/78377916
- if: steps.changed-files.outputs.circuits_any_changed == 'true'
name: Setup Circom and Test circuits
run: |
sudo rm /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update && sudo apt-get install -y wget nlohmann-json3-dev libgmp-dev nasm g++ build-essential
sudo wget https://github.com/iden3/circom/releases/download/v2.1.9/circom-linux-amd64 -O /usr/bin/circom && sudo chmod +x /usr/bin/circom
yarn workspace @semaphore-protocol/group build
yarn workspace @semaphore-protocol/identity build
yarn workspace @semaphore-protocol/proof build
yarn workspace @semaphore-protocol/utils build
yarn test:circuits
- name: Test contracts, libraries, circuits and subgraph
run: yarn test
- if: steps.changed-files.outputs.contracts_any_changed == 'true'
name: Build and Test contracts
run: |
yarn workspace @semaphore-protocol/group build
yarn workspace @semaphore-protocol/identity build
yarn workspace @semaphore-protocol/proof build
yarn workspace @semaphore-protocol/utils build
yarn compile:contracts
yarn test:contracts
- if: steps.changed-files.outputs.libraries_any_changed == 'true'
name: Build and Test libraries
run: yarn build:libraries && yarn test:libraries
- if: steps.changed-files.outputs.subgraph_any_changed == 'true'
name: Build and Test Subgraph
run: |
yarn workspace @semaphore-protocol/utils build
yarn build:subgraph
yarn test:subgraph

View File

@@ -4,6 +4,7 @@ permissions:
contents: write
on:
workflow_dispatch:
push:
tags:
- "v*"
@@ -17,6 +18,16 @@ jobs:
with:
fetch-depth: 0
- name: Install soldeer
uses: taiki-e/install-action@v2
with:
tool: soldeer
- name: Store soldeer login credential
env:
SOLDEER_TOKEN: ${{ secrets.SOLDEER_TOKEN }}
run: |
echo "$SOLDEER_TOKEN" > "$GITHUB_WORKSPACE"/soldeer_login
- name: Install Node.js
uses: actions/setup-node@v4
with:
@@ -37,6 +48,7 @@ jobs:
run: yarn version:publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
SOLDEER_LOGIN_FILE: ${{ github.workspace }}/soldeer_login
- run: yarn version:release
env:

8
.gitignore vendored
View File

@@ -86,5 +86,13 @@ typechain-types
!.yarn/sdks
!.yarn/versions
# asdf
.tool-versions
# direnv
.envrc
# Other
snark-artifacts
*.zip

4
.husky/pre-commit Normal file
View File

@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname "$0")/_/husky.sh"
npx lint-staged

View File

@@ -2,5 +2,5 @@
. "$(dirname -- "$0")/_/husky.sh"
if [ "$NO_HOOK" != "1" ]; then
exec < /dev/tty && yarn cz --hook || true
exec < /dev/tty && npx czg --hook || true
fi

View File

@@ -1,3 +1,4 @@
{
"**/*.{js,ts}": ["prettier --write", "eslint --fix"]
"**/*.{js,ts,jsx,tsx,md,json,sol,yaml,yml}": "prettier --write",
"**/*.{js,ts,jsx,tsx}": "eslint"
}

1
.soldeerignore Normal file
View File

@@ -0,0 +1 @@
package.json

View File

@@ -22,7 +22,7 @@ Pull requests are great if you want to add a feature or fix a bug. Here's a quic
3. Add a test for your change. Only refactoring and documentation changes require no new tests.
4. Make sure to check out the [Style Guide](/CONTRIBUTING#style-guide) and ensure that your code complies with the rules.
4. Make sure to check out the [Style Guide](/CONTRIBUTING.md#style-guide) and ensure that your code complies with the rules.
5. Make the test pass.
@@ -30,6 +30,9 @@ Pull requests are great if you want to add a feature or fix a bug. Here's a quic
7. Push to your fork and submit a pull request on our `main` branch. Please provide us with some explanation of why you made the changes you made. For new features make sure to explain a standard use case to us.
> [!IMPORTANT]
> We do not accept pull requests for minor grammatical fixes (e.g., correcting typos, rewording sentences) or for fixing broken links, unless they significantly improve clarity or functionality. These contributions, while appreciated, are not a priority for merging. If you notice any of these issues, please create a [GitHub Issue](https://github.com/semaphore-protocol/semaphore/issues/new?template=BLANK_ISSUE) to report them so they can be properly tracked and addressed.
## CI (Github Actions) Tests
We use GitHub Actions to test each PR before it is merged.
@@ -42,7 +45,7 @@ When you submit your PR (or later change that code), a CI build will automatical
We always use ESLint and Prettier. To check that your code follows the rules, simply run the npm script `yarn lint`.
### Commits rules
### Commit rules
For commits it is recommended to use [Conventional Commits](https://www.conventionalcommits.org).

View File

@@ -1,9 +1,9 @@
<p align="center">
<h1 align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/semaphore-protocol/.github/blob/main/assets/semaphore-logo-light.svg">
<source media="(prefers-color-scheme: light)" srcset="https://github.com/semaphore-protocol/.github/blob/main/assets/semaphore-logo-dark.svg">
<img width="250" alt="Semaphore icon" src="https://github.com/semaphore-protocol/.github/blob/main/assets/semaphore-logo-dark.svg">
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/semaphore-protocol/.github/main/assets/semaphore-logo-light.svg">
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/semaphore-protocol/.github/main/assets/semaphore-logo-dark.svg">
<img width="250" alt="Semaphore icon" src="https://raw.githubusercontent.com/semaphore-protocol/.github/main/assets/semaphore-logo-dark.svg">
</picture>
</h1>
</p>
@@ -53,9 +53,13 @@
🔎 Issues
</a>
<span>&nbsp;&nbsp;|&nbsp;&nbsp;</span>
<a href="https://semaphore.pse.dev/discord">
<a href="https://semaphore.pse.dev/telegram">
🗣️ Chat &amp; Support
</a>
<span>&nbsp;&nbsp;|&nbsp;&nbsp;</span>
<a href="https://js.semaphore.pse.dev">
💻 API Reference
</a>
</h4>
</div>
@@ -64,6 +68,9 @@
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/offchain verification easier. To learn more about Semaphore visit [semaphore.pse.dev](https://semaphore.pse.dev).
> [!IMPORTANT]
> Help Semaphore prosper by sharing your ideas with the PSE [acceleration program](https://github.com/privacy-scaling-explorations/acceleration-program).
## 📦 Packages
<table>
@@ -257,29 +264,7 @@ The core of the Semaphore protocol is in the [circuit logic](/packages/circuits/
</a>
</td>
</tr>
<tr>
<td>
<a href="/packages/heyauthn">
@semaphore-protocol/heyauthn
</a>
<a href="https://js.semaphore.pse.dev/modules/_semaphore_protocol_heyauthn">
(docs)
</a>
</td>
<td>
<!-- NPM version -->
<a href="https://npmjs.org/package/@semaphore-protocol/heyauthn">
<img src="https://img.shields.io/npm/v/@semaphore-protocol/heyauthn.svg?style=flat-square" alt="NPM version" />
</a>
</td>
<td>
<!-- Downloads -->
<a href="https://npmjs.org/package/@semaphore-protocol/heyauthn">
<img src="https://img.shields.io/npm/dm/@semaphore-protocol/heyauthn.svg?style=flat-square" alt="Downloads" />
</a>
</td>
</tr>
<tbody>
</tbody>
</table>
## 🛠 Install
@@ -290,12 +275,18 @@ Clone this repository:
git clone https://github.com/semaphore-protocol/semaphore.git
```
And install the dependencies:
Install the dependencies:
```bash
cd semaphore && yarn
```
And build the repository:
```bash
yarn build
```
## 📜 Usage
Copy the `.env.example` file as `.env`:
@@ -317,13 +308,13 @@ yarn lint
Run [Prettier](https://prettier.io/) to check formatting rules:
```bash
yarn prettier
yarn format
```
Or to automatically format the code:
```bash
yarn prettier:write
yarn format:write
```
### Conventional commits
@@ -331,7 +322,7 @@ yarn prettier:write
Semaphore uses [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/). A [command line utility](https://github.com/commitizen/cz-cli) to commit using the correct syntax can be used by running:
```bash
yarn commit
git commit
```
It will also automatically check that the modified files comply with ESLint and Prettier rules.
@@ -382,12 +373,28 @@ The output will be placed on the `docs` folder.
### Releases
Bump a new version with:
Steps:
1. Bump a new version with:
```bash
yarn version:bump <version>
# e.g. yarn version:bump 2.0.0
```
It will create a commit and a git tag that will need to pushed on the main branch. A workflow will be triggered and will
publish the Semaphore packages on [npm](https://www.npmjs.com/) and release a new version on Github with its changelogs automatically.
This step creates a commit and a git tag.
2. Push the changes to main:
```bash
git push origin main
```
3. Push the new git tag:
```bash
git push origin <version>
# e.g. git push origin v2.0.0
```
After pushing the new git tag, a workflow will be triggered to publish the Semaphore packages on [npm](https://www.npmjs.com/) and release a new version on GitHub with its changelogs automatically.

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 315 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

View File

@@ -67,7 +67,7 @@ const config: Config = {
announcementBar: {
id: "semaphore-v4-beta",
content:
'<b>Semaphore V4-beta is out 🎉 <a href="/getting-started">Try it out</a> and let us know for any feedback on <a href="https://semaphore.pse.dev/discord" target="_blank">Discord</a> or <a href="https://github.com/orgs/semaphore-protocol/discussions" target="_blank">Github</a>!</b>',
'<b><a href="https://github.com/semaphore-protocol/semaphore/releases/tag/v4.0.0" target="_blank">Semaphore V4</a> is out 🎉 <a href="/getting-started">Try it out</a> and let us know if you have any feedback on <a href="https://semaphore.pse.dev/telegram" target="_blank">Telegram</a> or <a href="https://github.com/orgs/semaphore-protocol/discussions" target="_blank">Github</a>!</b>',
backgroundColor: "#dde6fc",
textColor: "#000000"
},

View File

@@ -386,12 +386,9 @@
"message": "Connect"
},
"footer.right.connect.link1": {
"message": "Discord"
"message": "Telegram"
},
"footer.right.connect.link2": {
"message": "X (Twitter)"
},
"footer.copyright": {
"message": "Copyright © 2024 Ethereum Foundation"
}
}

View File

@@ -42,7 +42,7 @@
"message": "Valores públicos"
},
"section.identities.box2.description": {
"message": "Semaphore utiliza la función hash Poseidon para crear el identtity commitment a partir de los valores privados. Los identity commitments se pueden compartir públicamente, de forma similar a las direcciones Ethereum."
"message": "Semaphore utiliza la función hash Poseidon para crear el identity commitment a partir de los valores privados. Los identity commitments se pueden compartir públicamente, de forma similar a las direcciones Ethereum."
},
"section.identities.box3.title": {
"message": "Generar identidades"
@@ -386,12 +386,9 @@
"message": "Conecta con nosotros"
},
"footer.right.connect.link1": {
"message": "Discord"
"message": "Telegram"
},
"footer.right.connect.link2": {
"message": "X (Twitter)"
},
"footer.copyright": {
"message": "Copyright © 2024 Ethereum Foundation"
}
}

View File

@@ -12,6 +12,6 @@ as well as relevant circuits in
which the Semaphore zk-SNARK uses.
The summary of the audit results can be found
[here](https://github.com/appliedzkp/semaphore/tree/master/audit). After three
[here](https://github.com/semaphore-protocol/semaphore/blob/main/apps/docs/versioned_docs/version-V1/audit.md). After three
rounds of fixes, all security and performance issues were fixed, and the few
remaining issues are minor and do not affect security.

View File

@@ -58,7 +58,7 @@ Hardhat includes the Hardhat Network, a local Ethereum network for development.
## Install Semaphore packages
Semaphore provides contracts, JavaScript libraries and an Hardhat plugin for developers building zero-knowledge applications.
Semaphore provides contracts, JavaScript libraries and a Hardhat plugin for developers building zero-knowledge applications.
- `@semaphore-protocol/contracts` provides contracts to manage groups and verify Semaphore proofs on-chain.
- JavaScript libraries help developers build zero-knowledge applications.

View File

@@ -14,7 +14,7 @@ También proporciona un mecanismo simple para evitar la doble señalización, lo
## ¿Dónde puedo hacer preguntas sobre Semaphore?
Puede hacer preguntas sobre Semaphore en [Discord](https://semaphore.pse.dev/discord) o abriendo un [Semaphore Discussion](https://github.com/semaphore-protocol/semaphore/discussions).
Puede hacer preguntas sobre Semaphore en [Telegram](https://semaphore.pse.dev/telegram) o abriendo un [Semaphore Discussion](https://github.com/semaphore-protocol/semaphore/discussions).
## ¿Por qué las identidades requieren tanto `identity trapdoor` como `identity nullifier`?

View File

@@ -18,34 +18,31 @@ Hay dos formas para hacer esto, usando [`SemaphoreSubgraph`](https://github.com/
## Instalar librería
<Tabs
defaultValue="npm"
groupId="package-managers"
values={[
defaultValue="npm"
groupId="package-managers"
values={[
{label: 'npm', value: 'npm'},
{label: 'Yarn', value: 'yarn'},
{label: 'pnpm', value: 'pnpm'}
]}>
<TabItem value="npm">
]}
>
<TabItem value="npm">
```bash
npm install @semaphore-protocol/data@^3
```
</TabItem>
```bash
npm install @semaphore-protocol/data@^3
```
<TabItem value="yarn">
```bash
yarn add @semaphore-protocol/data@^3
```
</TabItem>
</TabItem>
<TabItem value="yarn">
```bash
yarn add @semaphore-protocol/data@^3
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm add @semaphore-protocol/data@^3
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm add @semaphore-protocol/data@^3
```
</TabItem>
</Tabs>
## Obtener datos usando SemaphoreSubgraph
@@ -113,6 +110,7 @@ const semaphoreSubgraph = new SemaphoreSubgraph("sepolia")
const { members } = await semaphoreSubgraph.getGroup(groupId, { members: true })
const group = new Group(groupId, 20, members)
```
:::
## Obtener datos usando SemaphoreEthers
@@ -178,4 +176,5 @@ const semaphoreEthers = new SemaphoreEthers("sepolia")
const members = await semaphoreEthers.getGroupMembers(groupId)
const group = new Group(groupId, 20, members)
```
:::

View File

@@ -11,70 +11,67 @@ import TabItem from "@theme/TabItem"
Un [grupo Semaphore](/V3/glossary/#grupo-semaphore) contiene los [identity commitments](/V3/glossary/#compromiso-de-identidad-identity-commitment) (compromisos de identidad) de miembros del grupo.
Estos son algunos ejemplos de uso de los grupos:
- Encuesta con preguntas a la que se unen las personas que acudieron a un evento para calificarlo,
- votación a la que se unen los miembros para votar por una propuesta,
- Denunciantes que están verificados como empleados de una organización.
- Encuesta con preguntas a la que se unen las personas que acudieron a un evento para calificarlo,
- votación a la que se unen los miembros para votar por una propuesta,
- Denunciantes que están verificados como empleados de una organización.
Un grupo Semaphore es un [árbol de Merkle incremental](/V3/glossary/#árbol-de-merkle-merkle-tree), y los miembros del grupo (por ejemplo, [identity commitments](/V3/glossary/#compromiso-de-identidad-identity-commitment)) son las hojas del árbol.
Los grupos Semaphore determinan los siguientes tres parámetro:
- **Group id**: un identificador único para el grupo;
- **Tree depth**: el número máximo de miembros que puede contener un grupo (`max size = 2 ^ tree depth`);
- **Members** la lista de miembros para inicializar el grupo.
- **Group id**: un identificador único para el grupo;
- **Tree depth**: el número máximo de miembros que puede contener un grupo (`max size = 2 ^ tree depth`);
- **Members** la lista de miembros para inicializar el grupo.
Aprenda cómo trabajar con grupos.
- [**Grupos off-chain**](#grupos-off-chain-externos-a-la-cadena)
- [**Grupos on-chain**](#grupos-on-chain)
- [**Grupos off-chain**](#grupos-off-chain-externos-a-la-cadena)
- [**Grupos on-chain**](#grupos-on-chain)
## Grupos off-chain (externos a la cadena)
- [Crear un grupo](#crear-un-grupo)
- [Añadir miembros](#añadir-miembros)
- [Remover o actualizar miembros](#remover-o-actualizar-miembros)
- [Crear un grupo](#crear-un-grupo)
- [Añadir miembros](#añadir-miembros)
- [Remover o actualizar miembros](#remover-o-actualizar-miembros)
### Crear un grupo
Utilice la clase `Group` de la librería [`@semaphore-protocol/group`](https://github.com/semaphore-protocol/semaphore/blob/main/packages/group) para crear un grupo off-chain con los siguientes parámetros:
- `Group id`: un identificar único para el grupo;
- `Tree depth`: (_default `20`_) el número máximo de usuarios que puede contener un grupo, el valor por defecto es 20 (`max size = 2 ^ tree depth`).
- `Members`: (_default `[]`_) la lista de miembros para inicializar el grupo.
- `Group id`: un identificar único para el grupo;
- `Tree depth`: (*default `20`*) el número máximo de usuarios que puede contener un grupo, el valor por defecto es 20 (`max size = 2 ^ tree depth`).
- `Members`: (*default `[]`*) la lista de miembros para inicializar el grupo.
#### Instalar librería:
<Tabs
defaultValue="npm"
groupId="package-managers"
values={[
defaultValue="npm"
groupId="package-managers"
values={[
{label: 'npm', value: 'npm'},
{label: 'Yarn', value: 'yarn'},
{label: 'pnpm', value: 'pnpm'}
]}>
<TabItem value="npm">
]}
>
<TabItem value="npm">
```bash
npm install @semaphore-protocol/group@^3
```
</TabItem>
```bash
npm install @semaphore-protocol/group@^3
```
<TabItem value="yarn">
```bash
yarn add @semaphore-protocol/group@^3
```
</TabItem>
</TabItem>
<TabItem value="yarn">
```bash
yarn add @semaphore-protocol/group@^3
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm add @semaphore-protocol/group@^3
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm add @semaphore-protocol/group@^3
```
</TabItem>
</Tabs>
Para crear un grupo con el número de usuarios que aparece por defecto (20) _`treeDepth`_, llame la función para construir un `Group` sin el segundo parámetro. Por ejemplo:
Para crear un grupo con el número de usuarios que aparece por defecto (20) *`treeDepth`*, llame la función para construir un `Group` sin el segundo parámetro. Por ejemplo:
```ts
import { Group } from "@semaphore-protocol/group"
@@ -82,7 +79,7 @@ import { Group } from "@semaphore-protocol/group"
const group = new Group(1)
```
El siguiente código de ejemplo pasa por _`treeDepth`_ para crear un grupo para `2 ^ 30 = 1073741824` miembros:
El siguiente código de ejemplo pasa por *`treeDepth`* para crear un grupo para `2 ^ 30 = 1073741824` miembros:
```ts
import { Group } from "@semaphore-protocol/group"

View File

@@ -11,48 +11,47 @@ import TabItem from "@theme/TabItem"
Para unirse a un [grupo Semaphore](/V3/glossary#grupo-semaphore), un usuario primero deberá crear una [identidad Semaphore](/V3/glossary#identidad-semaphore).
Una identidad Semaphore contiene dos valores generados junto con la identidad:
- Identity trapdoor (Identidad trampilla)
- Identity nullifier (Anulador de identidad)
- Identity trapdoor (Identidad trampilla)
- Identity nullifier (Anulador de identidad)
Para utilizar y verificar su identidad, la persona dueña de la identidad (usuario) debe conocer los valores trapdoor y nullifier.
Para prevenir fraudes, la persona dueña debe conservar de forma secreta ambos valores.
## Crear identidades
En su código, utilice la librería [`@semaphore-protocol/identity`](https://github.com/semaphore-protocol/semaphore/tree/main/packages/identity) para crear una identidad Semaphore _de forma determinística_ (del hash de un mensaje) o _de forma aleatoria_.
En su código, utilice la librería [`@semaphore-protocol/identity`](https://github.com/semaphore-protocol/semaphore/tree/main/packages/identity) para crear una identidad Semaphore *de forma determinística* (del hash de un mensaje) o *de forma aleatoria*.
- [**Crear identidades aleatorias**](#crear-identidades-aleatorias)
- [**Crear identidades determinísticas**](#crear-identidades-determinísticas)
- [**Crear identidades aleatorias**](#crear-identidades-aleatorias)
- [**Crear identidades determinísticas**](#crear-identidades-determinísticas)
### Instalar librería:
<Tabs
defaultValue="npm"
groupId="package-managers"
values={[
defaultValue="npm"
groupId="package-managers"
values={[
{label: 'npm', value: 'npm'},
{label: 'Yarn', value: 'yarn'},
{label: 'pnpm', value: 'pnpm'}
]}>
<TabItem value="npm">
]}
>
<TabItem value="npm">
```bash
npm install @semaphore-protocol/identity@^3
```
</TabItem>
```bash
npm install @semaphore-protocol/identity@^3
```
</TabItem>
<TabItem value="yarn">
```bash
yarn add @semaphore-protocol/identity@^3
```
<TabItem value="yarn">
```bash
yarn add @semaphore-protocol/identity@^3
```
</TabItem>
</TabItem>
<TabItem value="pnpm">
```bash
pnpm add @semaphore-protocol/identity@^3
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm add @semaphore-protocol/identity@^3
```
</TabItem>
</Tabs>
### Crear identidades aleatorias
@@ -67,8 +66,8 @@ const { trapdoor, nullifier, commitment } = new Identity()
La nueva identidad contiene dos valores aleatorios secretos: `trapdoor` y `nullifier`, y un valor público: `commitment`.
El hash Poseidon del identity nullifier y trapdoor se conoce como _identity secret_ (el secreto de identidad),
y su hash es el _identity commitment_ (compromiso de identidad).
El hash Poseidon del identity nullifier y trapdoor se conoce como *identity secret* (el secreto de identidad),
y su hash es el *identity commitment* (compromiso de identidad).
Un identity commitment (compromiso de identidad), de forma similar a las direcciones Ethereum, es un valor público que se utiliza en los grupos Semaphore para representar la
identidad de un miembro del grupo. Los valores secretos son similares a las llaves privadas
@@ -77,7 +76,7 @@ Ethereum y se utilizan para generar pruebas de conocimiento cero (ZKP) Semaphore
### Crear identidades determinísticas
Si transmite un mensaje como un parámetro, Semaphore genera `trapdoor` y `nullifier`
del hash _SHA256_ del mensaje.
del hash *SHA256* del mensaje.
El mensaje puede ser una contraseña o un mensaje que el usuario firma de forma criptográfica con una llave privada.
Al utilizar identidades determinísticas siempre deberá mantener secreto el mensaje.

View File

@@ -10,56 +10,54 @@ import TabItem from "@theme/TabItem"
Una vez que un usuario liga su [identidad Semaphore](/V3/glossary#identidad-semaphore) a un [grupo Semaphore](/V3/glossary#grupo-semaphore), el usuario puede emitir una señal anónima con una prueba de conocimiento cero (ZKP) que demuestre lo siguiente:
- el usuario es un miembro del grupo,
- el mismo usuario creo tanto la señal como la prueba.
- el usuario es un miembro del grupo,
- el mismo usuario creo tanto la señal como la prueba.
Las y los desarrolladores pueden utilizar Semaphore para realizar las siguientes acciones:
- [**Generar una prueba externa a la cadena (off-chain)**](#generar-una-prueba-off-chain)
- [**Verificar una prueba externa a la cadena (off-chain)**](#verificar-una-prueba-off-chain)
- [**Verificar una prueba interna a la cadena (on-chain)**](#verificar-una-prueba-on-chain)
- [**Generar una prueba externa a la cadena (off-chain)**](#generar-una-prueba-off-chain)
- [**Verificar una prueba externa a la cadena (off-chain)**](#verificar-una-prueba-off-chain)
- [**Verificar una prueba interna a la cadena (on-chain)**](#verificar-una-prueba-on-chain)
## Generar una prueba off-chain
Utilice la librería [`@semaphore-protocol/proof`](https://github.com/semaphore-protocol/semaphore/tree/main/packages/proof) para generar una prueba off-chain.
Para generar una prueba, transforme los siguientes parámetros con la función `generateProof`:
- `identity`: la identidad Semaphore del usuario emitiendo la señal y generando la prueba;
- `group`: el grupo al cual pertenece el usuario;
- `externalNullifier`: el valor que impide la emisión de dos señales por el mismo usuario;
- `signal`: la señal que el usuario quiere enviar de forma anónima;
- `snarkArtifacts`: la `zkey` y `wasm` de los [archivos confiables de configuración](/V3/glossary/#archivos-confiables-de-configuración-trusted-setup-files).
- `identity`: la identidad Semaphore del usuario emitiendo la señal y generando la prueba;
- `group`: el grupo al cual pertenece el usuario;
- `externalNullifier`: el valor que impide la emisión de dos señales por el mismo usuario;
- `signal`: la señal que el usuario quiere enviar de forma anónima;
- `snarkArtifacts`: la `zkey` y `wasm` de los [archivos confiables de configuración](/V3/glossary/#archivos-confiables-de-configuración-trusted-setup-files).
#### Instalar librería:
<Tabs
defaultValue="npm"
groupId="package-managers"
values={[
defaultValue="npm"
groupId="package-managers"
values={[
{label: 'npm', value: 'npm'},
{label: 'Yarn', value: 'yarn'},
{label: 'pnpm', value: 'pnpm'}
]}>
<TabItem value="npm">
]}
>
<TabItem value="npm">
```bash
npm install @semaphore-protocol/proof@^3
```
</TabItem>
```bash
npm install @semaphore-protocol/proof@^3
```
<TabItem value="yarn">
```bash
yarn add @semaphore-protocol/proof@^3
```
</TabItem>
</TabItem>
<TabItem value="yarn">
```bash
yarn add @semaphore-protocol/proof@^3
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm add @semaphore-protocol/proof@^3
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm add @semaphore-protocol/proof@^3
```
</TabItem>
</Tabs>
En el caso de uso de un sistema de votación, una vez que todos los votantes hayan ligado sus [identidades](/V3/guides/identities#crear-identidades) al [grupo](/V3/guides/groups) de la votación,
@@ -86,6 +84,7 @@ Si estás generando la prueba en el lado del cliente, puedes evitar agregar los
```ts
const fullProof = await generateProof(identity, group, externalNullifier, signal)
```
:::
## Verificar una prueba off-chain
@@ -93,8 +92,8 @@ const fullProof = await generateProof(identity, group, externalNullifier, signal
Utilice la librería [`@semaphore-protocol/proof`](https://github.com/semaphore-protocol/semaphore/tree/main/packages/proof) para verificar una prueba Semaphore off-chain.
Para verificar una prueba, transforme los siguientes parámetros con la función `verifyProof`:
- `fullProof`: la prueba Semaphore;
- `treeDepth`: la profundidad del árbol de Merkle.
- `fullProof`: la prueba Semaphore;
- `treeDepth`: la profundidad del árbol de Merkle.
La siguiente muestra de código demuestra cómo verificar la prueba generada previamente:
@@ -116,12 +115,12 @@ Vea nuestros [contratos desplegados](/V3/deployed-contracts) para encontrar las
Para verificar las pruebas Semaphore en su contrato, importe `ISemaphore.sol`, transfórmelo a la dirección `Semaphore.sol` y llame el método `verifyProof` con los siguientes parámetros:
- `groupId`: el identificador del grupo;
- `merkleTreeRoot`: la raíz del árbol de Merkle;
- `signal`: la señal que el usuario quiere enviar de forma anónima ;
- `nullifierHash`: un nullifier hash (hash anulador);
- `externalNullifier`: el valor que impide la emisión de dos señales por el mismo usuario;
- `proof`: una prueba Semaphore que es compatible con Solidity.
- `groupId`: el identificador del grupo;
- `merkleTreeRoot`: la raíz del árbol de Merkle;
- `signal`: la señal que el usuario quiere enviar de forma anónima ;
- `nullifierHash`: un nullifier hash (hash anulador);
- `externalNullifier`: el valor que impide la emisión de dos señales por el mismo usuario;
- `proof`: una prueba Semaphore que es compatible con Solidity.
:::info
Puede importar `ISemaphore.sol` y otros contratos Semaphore del módulo NPM [`@semaphore-protocol/contracts`](https://github.com/semaphore-protocol/semaphore/tree/main/packages/contracts).

View File

@@ -31,37 +31,34 @@ El CLI [`semaphore`](https://github.com/semaphore-protocol/semaphore/tree/main/p
Para comenzar a trabajar en su proyecto, instale las siguientes dependencias:
<Tabs
defaultValue="npm"
groupId="package-managers"
values={[
defaultValue="npm"
groupId="package-managers"
values={[
{label: 'npm', value: 'npm'},
{label: 'Yarn', value: 'yarn'},
{label: 'pnpm', value: 'pnpm'}
]}>
<TabItem value="npm">
]}
>
<TabItem value="npm">
```bash
cd my-app
npm i
```
</TabItem>
```bash
cd my-app
npm i
```
<TabItem value="yarn">
```bash
cd my-app
yarn
```
</TabItem>
</TabItem>
<TabItem value="yarn">
```bash
cd my-app
yarn
```
</TabItem>
<TabItem value="pnpm">
```bash
cd my-app
pnpm install
```
</TabItem>
<TabItem value="pnpm">
```bash
cd my-app
pnpm install
```
</TabItem>
</Tabs>
## Output
@@ -116,34 +113,31 @@ cd apps/contracts
Y compile sus contratos al correr:
<Tabs
defaultValue="npm"
groupId="package-managers"
values={[
defaultValue="npm"
groupId="package-managers"
values={[
{label: 'npm', value: 'npm'},
{label: 'Yarn', value: 'yarn'},
{label: 'pnpm', value: 'pnpm'}
]}>
<TabItem value="npm">
]}
>
<TabItem value="npm">
```bash
npm run compile
```
</TabItem>
```bash
npm run compile
```
<TabItem value="yarn">
```bash
yarn compile
```
</TabItem>
</TabItem>
<TabItem value="yarn">
```bash
yarn compile
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm compile
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm compile
```
</TabItem>
</Tabs>
### Pruebe los contratos
@@ -151,100 +145,91 @@ pnpm compile
Pruebe sus contratos al correr:
<Tabs
defaultValue="npm"
groupId="package-managers"
values={[
defaultValue="npm"
groupId="package-managers"
values={[
{label: 'npm', value: 'npm'},
{label: 'Yarn', value: 'yarn'},
{label: 'pnpm', value: 'pnpm'}
]}>
<TabItem value="npm">
]}
>
<TabItem value="npm">
```bash
npm test
```
</TabItem>
```bash
npm test
```
<TabItem value="yarn">
```bash
yarn test
```
</TabItem>
</TabItem>
<TabItem value="yarn">
```bash
yarn test
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm test
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm test
```
</TabItem>
</Tabs>
Genere un reporte de la prueba de cobertura:
<Tabs
defaultValue="npm"
groupId="package-managers"
values={[
defaultValue="npm"
groupId="package-managers"
values={[
{label: 'npm', value: 'npm'},
{label: 'Yarn', value: 'yarn'},
{label: 'pnpm', value: 'pnpm'}
]}>
<TabItem value="npm">
]}
>
<TabItem value="npm">
```bash
npm run test:coverage
```
</TabItem>
```bash
npm run test:coverage
```
<TabItem value="yarn">
```bash
yarn test:coverage
```
</TabItem>
</TabItem>
<TabItem value="yarn">
```bash
yarn test:coverage
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm test:coverage
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm test:coverage
```
</TabItem>
</Tabs>
O un reporte de la prueba de gas:
<Tabs
defaultValue="npm"
groupId="package-managers"
values={[
defaultValue="npm"
groupId="package-managers"
values={[
{label: 'npm', value: 'npm'},
{label: 'Yarn', value: 'yarn'},
{label: 'pnpm', value: 'pnpm'}
]}>
<TabItem value="npm">
]}
>
<TabItem value="npm">
```bash
npm run test:report-gas
```
</TabItem>
```bash
npm run test:report-gas
```
<TabItem value="yarn">
```bash
yarn test:report-gas
```
</TabItem>
</TabItem>
<TabItem value="yarn">
```bash
yarn test:report-gas
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm test:report-gas
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm test:report-gas
```
</TabItem>
</Tabs>
### Desplegar contratos
@@ -255,82 +240,76 @@ En la carpeta raíz del proyecto:
1. Agregue sus variables de entorno en el archivo `.env`.
:::note
Deberá por lo menos configurar un URL válido en Ethereum (ejemplo: Infura) y una llave privada con algunos ethers.
:::
:::note
Deberá por lo menos configurar un URL válido en Ethereum (ejemplo: Infura) y una llave privada con algunos ethers.
:::
2. Vaya a la carpeta `apps/contracts` y desplegue su contrato.
<Tabs
defaultValue="npm"
groupId="package-managers"
values={[
<Tabs
defaultValue="npm"
groupId="package-managers"
values={[
{label: 'npm', value: 'npm'},
{label: 'Yarn', value: 'yarn'},
{label: 'pnpm', value: 'pnpm'}
]}>
<TabItem value="npm">
]}
>
<TabItem value="npm">
```bash
npm run deploy -- --semaphore <semaphore-address> --group <group-id> --network goerli
```
</TabItem>
```bash
npm run deploy -- --semaphore <semaphore-address> --group <group-id> --network goerli
```
<TabItem value="yarn">
```bash
yarn deploy --semaphore <semaphore-address> --group <group-id> --network goerli
```
</TabItem>
</TabItem>
<TabItem value="yarn">
<TabItem value="pnpm">
```bash
pnpm deploy --semaphore <semaphore-address> --group <group-id> --network goerli
```
</TabItem>
</Tabs>
```bash
yarn deploy --semaphore <semaphore-address> --group <group-id> --network goerli
```
:::note
Revise las direcciones de los contratos de Semaphore [aquí](/V3/deployed-contracts).
:::
</TabItem>
<TabItem value="pnpm">
```bash
pnpm deploy --semaphore <semaphore-address> --group <group-id> --network goerli
```
</TabItem>
</Tabs>
:::note
Revise las direcciones de los contratos de Semaphore [aquí](/V3/deployed-contracts).
:::
:::caution
El group id (id del grupo) es un número.
:::
:::caution
El group id (id del grupo) es un número.
:::
### Inicie la app
Inicie la aplicación:
<Tabs
defaultValue="npm"
groupId="package-managers"
values={[
defaultValue="npm"
groupId="package-managers"
values={[
{label: 'npm', value: 'npm'},
{label: 'Yarn', value: 'yarn'},
{label: 'pnpm', value: 'pnpm'}
]}>
<TabItem value="npm">
]}
>
<TabItem value="npm">
```bash
npm run dev
```
</TabItem>
```bash
npm run dev
```
<TabItem value="yarn">
```bash
yarn dev
```
</TabItem>
</TabItem>
<TabItem value="yarn">
```bash
yarn dev
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm dev
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm dev
```
</TabItem>
</Tabs>

View File

@@ -19,7 +19,7 @@ Para utilizar los contratos e interfaces Semaphore en su proyecto, instale el pa
Semaphore ofrece los siguientes contratos base:
- [`SemaphoreVerifier.sol`](https://github.com/semaphore-protocol/semaphore/blob/main/packages/contracts/base/SemaphoreVerifier.sol): contiene una función para verificar pruebas Semaphore;
- [`SemaphoreVerifier.sol`](https://github.com/semaphore-protocol/semaphore/blob/v3.15.2/packages/contracts/contracts/base/SemaphoreVerifier.sol): contiene una función para verificar pruebas Semaphore;
- [`SemaphoreGroups.sol`](https://github.com/semaphore-protocol/semaphore/blob/main/packages/contracts/base/SemaphoreGroups.sol): contiene las funciones para crear grupos y añadir/remover/actualizar miembros.
Los contratos base están relacionados de forma muy cercana al protocolo.

View File

@@ -7,7 +7,7 @@ import TabItem from "@theme/TabItem"
# Solución de problemas
Si estas sugerencias no funcionan, no dude en preguntar en las [Semaphore Discussions](https://github.com/semaphore-protocol/semaphore/discussions) o en el canal `dev-chat` en el [Semaphore Discord](https://semaphore.pse.dev/discord).
Si estas sugerencias no funcionan, no dude en preguntar en las [Semaphore Discussions](https://github.com/semaphore-protocol/semaphore/discussions) o en el canal [Semaphore Telegram](https://semaphore.pse.dev/telegram).
## Usando Semaphore en the frontend
@@ -70,65 +70,59 @@ Para resolver eso:
1- Instale `@esbuild-plugins/node-globals-polyfill` y `@esbuild-plugins/node-modules-polyfill`
<Tabs
defaultValue="npm"
groupId="package-managers"
values={[
defaultValue="npm"
groupId="package-managers"
values={[
{label: 'npm', value: 'npm'},
{label: 'Yarn', value: 'yarn'},
{label: 'pnpm', value: 'pnpm'}
]}>
<TabItem value="npm">
]}
>
<TabItem value="npm">
```bash
npm install @esbuild-plugins/node-globals-polyfill
```
</TabItem>
```bash
npm install @esbuild-plugins/node-globals-polyfill
```
<TabItem value="yarn">
```bash
yarn add @esbuild-plugins/node-globals-polyfill
```
</TabItem>
</TabItem>
<TabItem value="yarn">
```bash
yarn add @esbuild-plugins/node-globals-polyfill
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm add @esbuild-plugins/node-globals-polyfill
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm add @esbuild-plugins/node-globals-polyfill
```
</TabItem>
</Tabs>
<Tabs
defaultValue="npm"
groupId="package-managers"
values={[
defaultValue="npm"
groupId="package-managers"
values={[
{label: 'npm', value: 'npm'},
{label: 'Yarn', value: 'yarn'},
{label: 'pnpm', value: 'pnpm'}
]}>
<TabItem value="npm">
]}
>
<TabItem value="npm">
```bash
npm install @esbuild-plugins/node-modules-polyfill
```
</TabItem>
```bash
npm install @esbuild-plugins/node-modules-polyfill
```
<TabItem value="yarn">
```bash
yarn add @esbuild-plugins/node-modules-polyfill
```
</TabItem>
</TabItem>
<TabItem value="yarn">
```bash
yarn add @esbuild-plugins/node-modules-polyfill
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm add @esbuild-plugins/node-modules-polyfill
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm add @esbuild-plugins/node-modules-polyfill
```
</TabItem>
</Tabs>
2- Modifique `vite.config.ts` para añadirlos:
@@ -236,4 +230,4 @@ Para comprobarlo, puede utilizar la [Semaphore CLI](https://github.com/semaphore
### Transacción revertida al usar el mismo external nullifier
Cuando genera una prueba usando el mismo external nullifier que usó para verificar una prueba antes, la transacción se revertirá porque ese external nullifier ya se usó. Si desea enviar y verificar varias pruebas de la misma identidad, debe usar un external nullifier diferente cada vez que genere una prueba.
Cuando genera una prueba usando el mismo external nullifier que usó para verificar una prueba antes, la transacción se revertirá porque ese external nullifier ya se usó. Si desea enviar y verificar varias pruebas de la misma identidad, debe usar un external nullifier diferente cada vez que genere una prueba.

View File

@@ -11,13 +11,15 @@
"clear": "docusaurus clear",
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids"
"write-heading-ids": "docusaurus write-heading-ids",
"format": "remark ./**/*.mdx --frail --quiet",
"format:write": "remark ./**/*.mdx --output"
},
"dependencies": {
"@docusaurus/core": "3.1.1",
"@docusaurus/preset-classic": "3.1.1",
"@docusaurus/core": "3.5.2",
"@docusaurus/preset-classic": "3.5.2",
"@mdx-js/react": "^3.0.0",
"@semaphore-protocol/utils": "4.0.0-beta.7",
"@semaphore-protocol/utils": "4.13.0-beta.0",
"@svgr/webpack": "^5.5.0",
"clsx": "^1.2.1",
"docusaurus-plugin-sass": "^0.2.5",
@@ -29,9 +31,14 @@
"url-loader": "^4.1.1"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "3.1.1",
"@docusaurus/tsconfig": "3.1.1",
"@docusaurus/module-type-aliases": "3.5.2",
"@docusaurus/tsconfig": "3.5.2",
"@types/react": "^18.2.29",
"remark-cli": "^12.0.0",
"remark-frontmatter": "^5.0.0",
"remark-mdx": "^3.0.1",
"remark-preset-lint-consistent": "^6.0.0",
"remark-preset-lint-recommended": "^7.0.0",
"typescript": "~5.2.2"
},
"browserslist": {
@@ -48,5 +55,22 @@
},
"engines": {
"node": ">=18.0"
},
"remarkConfig": {
"settings": {
"bullet": "-"
},
"plugins": [
"remark-mdx",
"remark-preset-lint-consistent",
"remark-preset-lint-recommended",
[
"remark-frontmatter",
{
"type": "yaml",
"marker": "-"
}
]
]
}
}

View File

@@ -32,7 +32,7 @@ function Footer() {
id: "footer.right.connect.title"
})}
</h3>
<Link href="https://semaphore.pse.dev/discord" target="_blank">
<Link href="https://semaphore.pse.dev/telegram" target="_blank">
{translate({
id: "footer.right.connect.link1"
})}
@@ -54,11 +54,7 @@ function Footer() {
<hr />
<div>
<p>
{translate({
id: "footer.copyright"
})}
</p>
<p>Copyright © {new Date().getFullYear()} Ethereum Foundation</p>
<Logo
style={{ marginRight: -8 }}

View File

@@ -12,6 +12,6 @@ as well as relevant circuits in
which the Semaphore zk-SNARK uses.
The summary of the audit results can be found
[here](https://github.com/appliedzkp/semaphore/tree/master/audit). After three
[here](https://github.com/semaphore-protocol/semaphore/blob/main/apps/docs/versioned_docs/version-V1/audit.md). After three
rounds of fixes, all security and performance issues were fixed, and the few
remaining issues are minor and do not affect security.

View File

@@ -21,7 +21,7 @@ The first external nullifier will be added as an external nullifier to the
contract, and this external nullifier will be active once the deployment
completes.
## Add, deactivate, or reactivate external nullifiiers
## Add, deactivate, or reactivate external nullifiers
**Contract ABI**:

View File

@@ -10,8 +10,8 @@ An identity is comprised of the following information:
1. An [EdDSA](https://en.wikipedia.org/wiki/EdDSA) private key. Note that it is
_not_ an Ethereum private key.
2. An identity nullifier, whih is a random 32-byte value.
3. An identity trapdoor, whih is a random 32-byte value.
2. An identity nullifier, which is a random 32-byte value.
3. An identity trapdoor, which is a random 32-byte value.
An identity commitment is the Pedersen hash of:
@@ -121,7 +121,7 @@ authenticity of the signal and prevents front-running attacks.
## Cryptographic primitives
Semaphore uses MiMC for the Merkle tree, Pedersen commmitments for the identity
Semaphore uses MiMC for the Merkle tree, Pedersen commitments for the identity
commitments, Blake2 for the nullifiers hash, and EdDSA for the signature.
MiMC is a relatively new hash function. We use the recommended MiMC

View File

@@ -145,7 +145,7 @@ Returns `false` otherwise.
**`signMsg(privKey: EddsaPrivateKey, msg: SnarkBigInt): EdDSAMiMcSpongeSignature)`**
Encapsualtes `circomlib.eddsa.signMiMCSponge` to sign a message `msg` using private key `privKey`.
Encapsulates `circomlib.eddsa.signMiMCSponge` to sign a message `msg` using private key `privKey`.
**`verifySignature(msg: SnarkBigInt, signature: EdDSAMiMcSpongeSignature, pubKey: EddsaPublicKey)`: boolean**
@@ -190,7 +190,7 @@ const genWitness = async (
- `circuit` is the output of `genCircuit()`.
- `identity` is the `Identity` whose identity commitment you want to prove is
in the set of registered identities.
- `idCommitments` is an array of registered identity commmitments; i.e. the
- `idCommitments` is an array of registered identity commitments; i.e. the
leaves of the tree.
- `treeDepth` is the number of levels which the Merkle tree used has
- `externalNullifier` is the current external nullifier
@@ -204,7 +204,7 @@ It returns an object as such:
- `msg`: The hash of the external nullifier and the signal hash
- `signature`: The signature on the above msg.
- `tree`: The Merkle tree object after it has been updated with the identity commitment
- `identityPath`: The Merkle path to the identity commmitment
- `identityPath`: The Merkle path to the identity commitment
- `identityPathIndex`: The leaf index of the identity commitment
- `identityPathElements`: The elements along the above Merkle path
@@ -212,7 +212,7 @@ Only `witness` is essential to generate the proof; the other data is only
useful for debugging and additional off-chain checks, such as verifying the
signature and the Merkle tree root.
**`formatForVerifierContract = (proof: SnarkProof, publicSignals: SnarkPublicSignals`**
**`formatForVerifierContract = (proof: SnarkProof, publicSignals: SnarkPublicSignals)`**
Converts the data in `proof` and `publicSignals` to strings and rearranges
elements of `proof.pi_b` so that `snarkjs`'s `verifier.sol` will accept it.

View File

@@ -26,7 +26,7 @@ With the Client contract as the owner of the Semaphore contract, the Client
contract may call owner-only Semaphore functions such as
`addExternalNullifier()`.
## Add, deactivate, or reactivate external nullifiiers
## Add, deactivate, or reactivate external nullifiers
These functions add, deactivate, and reactivate an external nullifier respectively.
As each identity can only signal once to an external nullifier, and as a signal

View File

@@ -55,7 +55,7 @@ In sum, Semaphore provides the ability to:
### External nullifiers
Think of an external nullifier as a voting booth where each user may only cast
one vote. If they try to cast a second vote a the same booth, that vote is
one vote. If they try to cast a second vote at the same booth, that vote is
invalid.
An external nullifier is any 29-byte value. Semaphore always starts with one
@@ -89,7 +89,7 @@ An anonymous voting app would be configured differently:
| ----------------------------------- | ------------------------ |
| The hash of the respondent's answer | The hash of the question |
This allows any user to vote with an arbitary response (e.g. yes, no, or maybe)
This allows any user to vote with an arbitrary response (e.g. yes, no, or maybe)
to any question. The user, however, can only vote once per question.
## About the code

View File

@@ -9,7 +9,7 @@ Site owners publish _subgraphs_ that expose site data for anyone to query.
Semaphore's subgraph allows you to retrieve data from the [`Semaphore.sol`](https://github.com/semaphore-protocol/semaphore/tree/v2.6.1/packages/contracts/Semaphore.sol) smart contract.
:::tip
The Graph protocol uses the [GraphQL](https://graphql.org/) query lanaguage. For examples, see the [GraphQL API documentation](https://thegraph.com/docs/developer/graphql-api). Visit the [subgraph repository](https://github.com/semaphore-protocol/subgraph) to see the list of Semaphore subgraphs.
The Graph protocol uses the [GraphQL](https://graphql.org/) query language. For examples, see the [GraphQL API documentation](https://thegraph.com/docs/developer/graphql-api). Visit the [subgraph repository](https://github.com/semaphore-protocol/subgraph) to see the list of Semaphore subgraphs.
:::
## Schema

View File

@@ -14,7 +14,7 @@ It also provides a simple mechanism to prevent double-signaling, which means you
## Where can I ask questions about Semaphore?
You can ask questions about Semaphore on [Discord](https://semaphore.pse.dev/discord) or by opening a [Semaphore Discussion](https://github.com/semaphore-protocol/semaphore/discussions).
You can ask questions about Semaphore on [Telegram](https://semaphore.pse.dev/telegram) or by opening a [Semaphore Discussion](https://github.com/semaphore-protocol/semaphore/discussions).
## Why do identities require both the `identity trapdoor` and the `identity nullifier`?

View File

@@ -37,7 +37,7 @@ For more information, see [Merkle tree in Wikipedia](https://en.wikipedia.org/wi
## Nullifier
A value used to prevent double entry or double signalling.
A value used to prevent double entry or double signaling.
See [Circuit nullifier hash](/V3/technical-reference/circuits/#nullifier-hash).

View File

@@ -18,34 +18,31 @@ There are two ways to do this, using [`SemaphoreSubgraph`](https://github.com/se
## Install library
<Tabs
defaultValue="npm"
groupId="package-managers"
values={[
defaultValue="npm"
groupId="package-managers"
values={[
{label: 'npm', value: 'npm'},
{label: 'Yarn', value: 'yarn'},
{label: 'pnpm', value: 'pnpm'}
]}>
<TabItem value="npm">
]}
>
<TabItem value="npm">
```bash
npm install @semaphore-protocol/data@^3
```
</TabItem>
```bash
npm install @semaphore-protocol/data@^3
```
<TabItem value="yarn">
```bash
yarn add @semaphore-protocol/data@^3
```
</TabItem>
</TabItem>
<TabItem value="yarn">
```bash
yarn add @semaphore-protocol/data@^3
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm add @semaphore-protocol/data@^3
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm add @semaphore-protocol/data@^3
```
</TabItem>
</Tabs>
## Fetch data using SemaphoreSubgraph
@@ -113,6 +110,7 @@ const semaphoreSubgraph = new SemaphoreSubgraph("sepolia")
const { members } = await semaphoreSubgraph.getGroup(groupId, { members: true })
const group = new Group(groupId, 20, members)
```
:::
## Fetch data using SemaphoreEthers
@@ -178,4 +176,5 @@ const semaphoreEthers = new SemaphoreEthers("sepolia")
const members = await semaphoreEthers.getGroupMembers(groupId)
const group = new Group(groupId, 20, members)
```
:::

View File

@@ -11,70 +11,67 @@ import TabItem from "@theme/TabItem"
A [Semaphore group](/V3/glossary/#semaphore-group) contains [identity commitments](/V3/glossary/#identity-commitment) of group members.
Example uses of groups include the following:
- poll question that attendees join to rate an event,
- ballot that members join to vote on a proposal,
- whistleblowers who are verified employees of an organization.
- poll question that attendees join to rate an event,
- ballot that members join to vote on a proposal,
- whistleblowers who are verified employees of an organization.
A Semaphore group is an [incremental Merkle tree](/V3/glossary/#merkle-tree), and group members (i.e., [identity commitments](/V3/glossary/#identity-commitment)) are tree leaves.
Semaphore groups set the following three parameters:
- **Group id**: a unique identifier for the group;
- **Tree depth**: the maximum number of members a group can contain (`max size = 2 ^ tree depth`);
- **Members**: the list of members to initialize the group.
- **Group id**: a unique identifier for the group;
- **Tree depth**: the maximum number of members a group can contain (`max size = 2 ^ tree depth`);
- **Members**: the list of members to initialize the group.
Learn how to work with groups.
- [**Off-chain groups**](#off-chain-groups)
- [**On-chain groups**](#on-chain-groups)
- [**Off-chain groups**](#off-chain-groups)
- [**On-chain groups**](#on-chain-groups)
## Off-chain groups
- [Create a group](#create-a-group)
- [Add members](#add-members)
- [Remove or update members](#remove-or-update-members)
- [Create a group](#create-a-group)
- [Add members](#add-members)
- [Remove or update members](#remove-or-update-members)
### Create a group
Use the [`@semaphore-protocol/group`](https://github.com/semaphore-protocol/semaphore/blob/v3.15.2/packages/group) library `Group` class to create an off-chain group with the following parameters:
- `Group id`: a unique identifier for the group;
- `Tree depth`: (_default `20`_) the maximum number of members a group can contain (`max size = 2 ^ tree depth`).
- `Members`: (_default `[]`_) the list of members to initialize the group.
- `Group id`: a unique identifier for the group;
- `Tree depth`: (*default `20`*) the maximum number of members a group can contain (`max size = 2 ^ tree depth`).
- `Members`: (*default `[]`*) the list of members to initialize the group.
#### Install library:
<Tabs
defaultValue="npm"
groupId="package-managers"
values={[
defaultValue="npm"
groupId="package-managers"
values={[
{label: 'npm', value: 'npm'},
{label: 'Yarn', value: 'yarn'},
{label: 'pnpm', value: 'pnpm'}
]}>
<TabItem value="npm">
]}
>
<TabItem value="npm">
```bash
npm install @semaphore-protocol/group@^3
```
</TabItem>
```bash
npm install @semaphore-protocol/group@^3
```
<TabItem value="yarn">
```bash
yarn add @semaphore-protocol/group@^3
```
</TabItem>
</TabItem>
<TabItem value="yarn">
```bash
yarn add @semaphore-protocol/group@^3
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm add @semaphore-protocol/group@^3
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm add @semaphore-protocol/group@^3
```
</TabItem>
</Tabs>
To create a group with default _`treeDepth`_, call the `Group` constructor without the second parameter. For example:
To create a group with default *`treeDepth`*, call the `Group` constructor without the second parameter. For example:
```ts
import { Group } from "@semaphore-protocol/group"
@@ -82,7 +79,7 @@ import { Group } from "@semaphore-protocol/group"
const group = new Group(1)
```
The following example code passes _`treeDepth`_ to create a group for `2 ^ 30 = 1073741824` members:
The following example code passes *`treeDepth`* to create a group for `2 ^ 30 = 1073741824` members:
```ts
import { Group } from "@semaphore-protocol/group"

View File

@@ -11,50 +11,47 @@ import TabItem from "@theme/TabItem"
In order to join a [Semaphore group](/V3/glossary#semaphore-group), a user must first create a [Semaphore identity](/V3/glossary#semaphore-identity).
A Semaphore identity contains two values generated with the identity:
- Identity trapdoor
- identity nullifier
- Identity trapdoor
- identity nullifier
To use and verify the identity, the identity owner (user) must know the trapdoor and nullifier values.
To prevent fraud, the owner should keep both values secret.
## Create identities
In your code, use the [`@semaphore-protocol/identity`](https://github.com/semaphore-protocol/semaphore/tree/v3.15.2/packages/identity) library to create a Semaphore identity _deterministically_ (from the hash of a message) or _randomly_.
In your code, use the [`@semaphore-protocol/identity`](https://github.com/semaphore-protocol/semaphore/tree/v3.15.2/packages/identity) library to create a Semaphore identity *deterministically* (from the hash of a message) or *randomly*.
- [**Create random identities**](#create-random-identities)
- [**Create deterministic identities**](#create-deterministic-identities)
- [**Create random identities**](#create-random-identities)
- [**Create deterministic identities**](#create-deterministic-identities)
### Install library:
<Tabs
defaultValue="npm"
groupId="package-managers"
values={[
defaultValue="npm"
groupId="package-managers"
values={[
{label: 'npm', value: 'npm'},
{label: 'Yarn', value: 'yarn'},
{label: 'pnpm', value: 'pnpm'}
]}>
<TabItem value="npm">
]}
>
<TabItem value="npm">
```bash
npm install @semaphore-protocol/identity@^3
```
</TabItem>
```bash
npm install @semaphore-protocol/identity@^3
```
<TabItem value="yarn">
```bash
yarn add @semaphore-protocol/identity@^3
```
</TabItem>
</TabItem>
<TabItem value="yarn">
```bash
yarn add @semaphore-protocol/identity@^3
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm add @semaphore-protocol/identity@^3
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm add @semaphore-protocol/identity@^3
```
</TabItem>
</Tabs>
### Create random identities
@@ -69,8 +66,8 @@ const { trapdoor, nullifier, commitment } = new Identity()
The new identity contains two random secret values: `trapdoor` and `nullifier`, and one public value: `commitment`.
The Poseidon hash of the identity nullifier and trapdoor is called the _identity secret_,
and its hash is the _identity commitment_.
The Poseidon hash of the identity nullifier and trapdoor is called the *identity secret*,
and its hash is the *identity commitment*.
An identity commitment, similarly to Ethereum addresses, is a public value used
in Semaphore groups to represent the identity of a group member. The secret values are similar to
@@ -79,7 +76,7 @@ Ethereum private keys and are used to generate Semaphore zero-knowledge proofs a
### Create deterministic identities
If you pass a message as a parameter, Semaphore generates `trapdoor` and `nullifier`
from the _SHA256_ hash of the message.
from the *SHA256* hash of the message.
The message might be a password or a message that the user cryptographically signs with a private key.
When using deterministic identities, you should always keep the message secret.

View File

@@ -10,57 +10,54 @@ import TabItem from "@theme/TabItem"
Once a user joins their [Semaphore identity](/V3/glossary#semaphore-identity) to a [Semaphore group](/V3/glossary#semaphore-group), the user can signal anonymously with a zero-knowledge proof that proves the following:
- the user is a member of the group,
- the same user created the signal and the proof.
- the user is a member of the group,
- the same user created the signal and the proof.
Developers can use Semaphore for the following:
- [**Generate a proof off-chain**](#generate-a-proof-off-chain)
- [**Verify a proof off-chain**](#verify-a-proof-off-chain)
- [**Verify a proof on-chain**](#verify-a-proof-on-chain)
- [**Generate a proof off-chain**](#generate-a-proof-off-chain)
- [**Verify a proof off-chain**](#verify-a-proof-off-chain)
- [**Verify a proof on-chain**](#verify-a-proof-on-chain)
## Generate a proof off-chain
Use the [`@semaphore-protocol/proof`](https://github.com/semaphore-protocol/semaphore/tree/v3.15.2/packages/proof) library to generate an off-chain proof.
To generate a proof, pass the following parameters to the `generateProof` function:
- `identity`: the Semaphore identity of the user broadcasting the signal and generating the proof;
- `group`: the group to which the user belongs;
- `externalNullifier`: the value that prevents double-signaling;
- `signal`: the signal the user wants to send anonymously;
- `snarkArtifacts`: the `zkey` and `wasm` [trusted setup files](/V3/glossary/#trusted-setup-files).
- `identity`: the Semaphore identity of the user broadcasting the signal and generating the proof;
- `group`: the group to which the user belongs;
- `externalNullifier`: the value that prevents double-signaling;
- `signal`: the signal the user wants to send anonymously;
- `snarkArtifacts`: the `zkey` and `wasm` [trusted setup files](/V3/glossary/#trusted-setup-files).
#### Install library:
<Tabs
defaultValue="npm"
groupId="package-managers"
values={[
defaultValue="npm"
groupId="package-managers"
values={[
{label: 'npm', value: 'npm'},
{label: 'Yarn', value: 'yarn'},
{label: 'pnpm', value: 'pnpm'}
]}>
<TabItem value="npm">
]}
>
<TabItem value="npm">
```bash
npm install @semaphore-protocol/proof@^3
```
</TabItem>
```bash
npm install @semaphore-protocol/proof@^3
```
<TabItem value="yarn">
```bash
yarn add @semaphore-protocol/proof@^3
```
</TabItem>
</TabItem>
<TabItem value="yarn">
```bash
yarn add @semaphore-protocol/proof@^3
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm add @semaphore-protocol/proof@^3
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm add @semaphore-protocol/proof@^3
```
</TabItem>
</Tabs>
In the voting system use case, once all the voters have joined their [identities](/V3/guides/identities#create-identities) to the ballot [group](/V3/guides/groups),
@@ -87,6 +84,7 @@ If you are generating the proof on the client side, you can avoid adding the sna
```ts
const fullProof = await generateProof(identity, group, externalNullifier, signal)
```
:::
## Verify a proof off-chain
@@ -94,8 +92,8 @@ const fullProof = await generateProof(identity, group, externalNullifier, signal
Use the [`@semaphore-protocol/proof`](https://github.com/semaphore-protocol/semaphore/tree/v3.15.2/packages/proof) library to verify a Semaphore proof off-chain.
To verify a proof, pass the following to the `verifyProof` function:
- `fullProof`: the Semaphore proof;
- `treeDepth`: the Merkle tree depth.
- `fullProof`: the Semaphore proof;
- `treeDepth`: the Merkle tree depth.
The following code sample shows how to verify the previously generated proof:
@@ -117,12 +115,12 @@ See our [deployed contracts](/V3/deployed-contracts) to find the addresses for y
To verify Semaphore proofs in your contract, import `ISemaphore.sol`, pass it the `Semaphore.sol` address and call the `verifyProof` method with following parameters:
- `groupId`: the identifier of the group;
- `merkleTreeRoot`: the root of the Merkle tree;
- `signal`: the signal the user wants to send anonymously;
- `nullifierHash`: a nullifier hash;
- `externalNullifier`: the value that prevents double-signaling;
- `proof`: a Solidity-compatible Semaphore proof.
- `groupId`: the identifier of the group;
- `merkleTreeRoot`: the root of the Merkle tree;
- `signal`: the signal the user wants to send anonymously;
- `nullifierHash`: a nullifier hash;
- `externalNullifier`: the value that prevents double-signaling;
- `proof`: a Solidity-compatible Semaphore proof.
:::info
You can import `ISemaphore.sol` and other Semaphore contracts from the [`@semaphore-protocol/contracts`](https://github.com/semaphore-protocol/semaphore/tree/v3.15.2/packages/contracts) NPM module.

View File

@@ -31,37 +31,34 @@ The [`semaphore CLI`](https://github.com/semaphore-protocol/semaphore/tree/v3.15
To start working on your project, install the dependencies:
<Tabs
defaultValue="npm"
groupId="package-managers"
values={[
defaultValue="npm"
groupId="package-managers"
values={[
{label: 'npm', value: 'npm'},
{label: 'Yarn', value: 'yarn'},
{label: 'pnpm', value: 'pnpm'}
]}>
<TabItem value="npm">
]}
>
<TabItem value="npm">
```bash
cd my-app
npm i
```
</TabItem>
```bash
cd my-app
npm i
```
<TabItem value="yarn">
```bash
cd my-app
yarn
```
</TabItem>
</TabItem>
<TabItem value="yarn">
```bash
cd my-app
yarn
```
</TabItem>
<TabItem value="pnpm">
```bash
cd my-app
pnpm install
```
</TabItem>
<TabItem value="pnpm">
```bash
cd my-app
pnpm install
```
</TabItem>
</Tabs>
## Output
@@ -116,34 +113,31 @@ cd apps/contracts
And compile your contracts:
<Tabs
defaultValue="npm"
groupId="package-managers"
values={[
defaultValue="npm"
groupId="package-managers"
values={[
{label: 'npm', value: 'npm'},
{label: 'Yarn', value: 'yarn'},
{label: 'pnpm', value: 'pnpm'}
]}>
<TabItem value="npm">
]}
>
<TabItem value="npm">
```bash
npm run compile
```
</TabItem>
```bash
npm run compile
```
<TabItem value="yarn">
```bash
yarn compile
```
</TabItem>
</TabItem>
<TabItem value="yarn">
```bash
yarn compile
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm compile
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm compile
```
</TabItem>
</Tabs>
### Test contracts
@@ -151,100 +145,91 @@ pnpm compile
Test your contracts:
<Tabs
defaultValue="npm"
groupId="package-managers"
values={[
defaultValue="npm"
groupId="package-managers"
values={[
{label: 'npm', value: 'npm'},
{label: 'Yarn', value: 'yarn'},
{label: 'pnpm', value: 'pnpm'}
]}>
<TabItem value="npm">
]}
>
<TabItem value="npm">
```bash
npm test
```
</TabItem>
```bash
npm test
```
<TabItem value="yarn">
```bash
yarn test
```
</TabItem>
</TabItem>
<TabItem value="yarn">
```bash
yarn test
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm test
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm test
```
</TabItem>
</Tabs>
Generate a test coverage report:
<Tabs
defaultValue="npm"
groupId="package-managers"
values={[
defaultValue="npm"
groupId="package-managers"
values={[
{label: 'npm', value: 'npm'},
{label: 'Yarn', value: 'yarn'},
{label: 'pnpm', value: 'pnpm'}
]}>
<TabItem value="npm">
]}
>
<TabItem value="npm">
```bash
npm run test:coverage
```
</TabItem>
```bash
npm run test:coverage
```
<TabItem value="yarn">
```bash
yarn test:coverage
```
</TabItem>
</TabItem>
<TabItem value="yarn">
```bash
yarn test:coverage
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm test:coverage
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm test:coverage
```
</TabItem>
</Tabs>
Or a test gas report:
<Tabs
defaultValue="npm"
groupId="package-managers"
values={[
defaultValue="npm"
groupId="package-managers"
values={[
{label: 'npm', value: 'npm'},
{label: 'Yarn', value: 'yarn'},
{label: 'pnpm', value: 'pnpm'}
]}>
<TabItem value="npm">
]}
>
<TabItem value="npm">
```bash
npm run test:report-gas
```
</TabItem>
```bash
npm run test:report-gas
```
<TabItem value="yarn">
```bash
yarn test:report-gas
```
</TabItem>
</TabItem>
<TabItem value="yarn">
```bash
yarn test:report-gas
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm test:report-gas
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm test:report-gas
```
</TabItem>
</Tabs>
### Deploy contracts
@@ -255,82 +240,76 @@ In the project root folder:
1. Add your environment variables in the `.env` file.
:::note
You should at least set a valid Infura API Key (you could use Alchemy as well) and a private key with some ethers.
:::
:::note
You should at least set a valid Infura API Key (you could use Alchemy as well) and a private key with some ethers.
:::
2. Go to the `apps/contracts` folder and deploy your contract.
<Tabs
defaultValue="npm"
groupId="package-managers"
values={[
<Tabs
defaultValue="npm"
groupId="package-managers"
values={[
{label: 'npm', value: 'npm'},
{label: 'Yarn', value: 'yarn'},
{label: 'pnpm', value: 'pnpm'}
]}>
<TabItem value="npm">
]}
>
<TabItem value="npm">
```bash
npm run deploy -- --semaphore <semaphore-address> --group <group-id> --network arbitrum-goerli
```
</TabItem>
```bash
npm run deploy -- --semaphore <semaphore-address> --group <group-id> --network arbitrum-goerli
```
<TabItem value="yarn">
```bash
yarn deploy --semaphore <semaphore-address> --group <group-id> --network arbitrum-goerli
```
</TabItem>
</TabItem>
<TabItem value="yarn">
<TabItem value="pnpm">
```bash
pnpm deploy --semaphore <semaphore-address> --group <group-id> --network arbitrum-goerli
```
</TabItem>
</Tabs>
```bash
yarn deploy --semaphore <semaphore-address> --group <group-id> --network arbitrum-goerli
```
:::note
Check the Semaphore contract addresses [here](/V3/deployed-contracts).
:::
</TabItem>
<TabItem value="pnpm">
```bash
pnpm deploy --semaphore <semaphore-address> --group <group-id> --network arbitrum-goerli
```
</TabItem>
</Tabs>
:::note
Check the Semaphore contract addresses [here](/V3/deployed-contracts).
:::
:::caution
The group id is a number.
:::
:::caution
The group id is a number.
:::
### Start app
Start the application:
<Tabs
defaultValue="npm"
groupId="package-managers"
values={[
defaultValue="npm"
groupId="package-managers"
values={[
{label: 'npm', value: 'npm'},
{label: 'Yarn', value: 'yarn'},
{label: 'pnpm', value: 'pnpm'}
]}>
<TabItem value="npm">
]}
>
<TabItem value="npm">
```bash
npm run dev
```
</TabItem>
```bash
npm run dev
```
<TabItem value="yarn">
```bash
yarn dev
```
</TabItem>
</TabItem>
<TabItem value="yarn">
```bash
yarn dev
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm dev
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm dev
```
</TabItem>
</Tabs>

View File

@@ -7,7 +7,7 @@ import TabItem from "@theme/TabItem"
# Troubleshooting
If these suggestions do not work, feel free to ask in the [Semaphore Discussions](https://github.com/semaphore-protocol/semaphore/discussions) or in the `dev-chat` channel in the [Semaphore Discord](https://semaphore.pse.dev/discord).
If these suggestions do not work, feel free to ask in the [Semaphore Discussions](https://github.com/semaphore-protocol/semaphore/discussions) or in the [Semaphore Telegram](https://semaphore.pse.dev/telegram).
## Using Semaphore in the frontend
@@ -70,65 +70,59 @@ To solve that:
1- Install `@esbuild-plugins/node-globals-polyfill` and `@esbuild-plugins/node-modules-polyfill`
<Tabs
defaultValue="npm"
groupId="package-managers"
values={[
defaultValue="npm"
groupId="package-managers"
values={[
{label: 'npm', value: 'npm'},
{label: 'Yarn', value: 'yarn'},
{label: 'pnpm', value: 'pnpm'}
]}>
<TabItem value="npm">
]}
>
<TabItem value="npm">
```bash
npm install @esbuild-plugins/node-globals-polyfill
```
</TabItem>
```bash
npm install @esbuild-plugins/node-globals-polyfill
```
<TabItem value="yarn">
```bash
yarn add @esbuild-plugins/node-globals-polyfill
```
</TabItem>
</TabItem>
<TabItem value="yarn">
```bash
yarn add @esbuild-plugins/node-globals-polyfill
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm add @esbuild-plugins/node-globals-polyfill
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm add @esbuild-plugins/node-globals-polyfill
```
</TabItem>
</Tabs>
<Tabs
defaultValue="npm"
groupId="package-managers"
values={[
defaultValue="npm"
groupId="package-managers"
values={[
{label: 'npm', value: 'npm'},
{label: 'Yarn', value: 'yarn'},
{label: 'pnpm', value: 'pnpm'}
]}>
<TabItem value="npm">
]}
>
<TabItem value="npm">
```bash
npm install @esbuild-plugins/node-modules-polyfill
```
</TabItem>
```bash
npm install @esbuild-plugins/node-modules-polyfill
```
<TabItem value="yarn">
```bash
yarn add @esbuild-plugins/node-modules-polyfill
```
</TabItem>
</TabItem>
<TabItem value="yarn">
```bash
yarn add @esbuild-plugins/node-modules-polyfill
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm add @esbuild-plugins/node-modules-polyfill
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm add @esbuild-plugins/node-modules-polyfill
```
</TabItem>
</Tabs>
2- Modify the `vite.config.ts` to add them:

View File

@@ -0,0 +1,131 @@
---
sidebar_position: 8
---
# Benchmarks
Semaphore v4 introduces new features and performance improvements. Detailed changes are available in the [release changelog](https://github.com/semaphore-protocol/semaphore/releases/tag/v4.0.0).
The primary changes in benchmark values are driven by the two major protocol updates:
- New [Identity schema](https://github.com/semaphore-protocol/semaphore/tree/main/packages/identity).
- [LeanIMT](https://github.com/privacy-scaling-explorations/zk-kit/tree/main/packages/lean-imt): New optimized IMT.
## New Identity schema
Semaphore v4 includes a new schema for the identities allowing the creation and verification of signatures.
Although the new Identity package is slightly slower than the one in Semaphore v3 (by just a few milliseconds), the trade-off is minimal considering the included functionality.
The new identity schema adds additional constraints to the Semaphore v4 circuit; however, this does not negatively impact overall performance of the protocol.
## LeanIMT
Semaphore v4 uses the LeanIMT data structure for group operations, an improvement over the IMT used in v3.
For further details, see the [LeanIMT paper](https://github.com/privacy-scaling-explorations/zk-kit/tree/main/papers/leanimt).
The LeanIMT offers dynamic depth, resulting in faster and more cost-effective group operations, across Node.js, browser and smart contracts.
Semaphore v4 support tree depths from 1 to 32, while v3 supports depths from 16 to 32, both for proof generation and verification.
## System Specifications and Software environment
All the benchmarks were run in an environment with these properties:
**System Specifications**
Computer: MacBook Pro
Chip: Apple M2 Pro
Memory (RAM): 16 GB
Operating System: macOS Sequoia version 15.0.1
**Software environment**
Node.js version: 20.18.0
Browser: Google Chrome Version 130.0.6723.92 (Official Build) (arm64)
## Running the benchmarks
### Javascript and Circom
GitHub repository to the run Node.js, browser and Circom benchmarks: https://github.com/vplasencia/semaphore-benchmarks
### Solidity
GitHub repository to run the Solidity benchmarks: https://github.com/semaphore-protocol/semaphore
## Node.js benchmarks
### Identities
![Identities](../../assets/img-benchmarks/node/identity-node-benchmarks.png)
### Create Group
Create group, either empty or with initial members.
![Create Group](../../assets/img-benchmarks/node/create-group-node-benchmarks.png)
### Add Member
Add a member to groups with different sizes.
![Add Member](../../assets/img-benchmarks/node/add-member-node-benchmarks.png)
### Generate Proof
Generate a proof using groups with different numbers of members.
![Generate Proof](../../assets/img-benchmarks/node/generate-proof-node-benchmarks.png)
### Verify Proof
Verify a proof using groups with different numbers of members.
![Verify Proof](../../assets/img-benchmarks/node/verify-proof-node-benchmarks.png)
## Browser benchmarks
Main functions used in the browser.
![Browser benchmarks](../../assets/img-benchmarks/browser/browser-benchmarks.png)
## Circuit benchmarks
### Semaphore V3
<img
src={require('../../assets/img-benchmarks/circuits/semaphore-v3-circuits-benchmarks.png').default}
alt="Circuit benchmarks Semaphore v3"
style={{ width: '300px', height: 'auto' }}
/>
### Semaphore V4
<img
src={require('../../assets/img-benchmarks/circuits/semaphore-v4-circuits-benchmarks.png').default}
alt="Circuit benchmarks Semaphore v4"
style={{ width: '300px', height: 'auto' }}
/>
## Contracts
<img
src={require('../../assets/img-benchmarks/contracts/contract-benchmarks.png').default}
alt="Contract Benchmarks"
style={{ width: '590px', height: 'auto' }}
/>
### Semaphore V3 gas report
![Contracts benchmarks Semaphore v3](../../assets/img-benchmarks/contracts/semaphore-v3-contracts-benchmarks.png)
### Semaphore V4 gas report
![Contracts benchmarks Semaphore v4](../../assets/img-benchmarks/contracts/semaphore-v4-contracts-benchmarks.png)

View File

@@ -1,5 +1,5 @@
---
sidebar_position: 11
sidebar_position: 13
---
# Credits
@@ -17,3 +17,4 @@ Semaphore is the work of several people, for a complete list of contributors you
- [LauNaMu](https://github.com/0xyNaMu)
- [0xjei](https://github.com/0xjei)
- [Mari Poveda](https://github.com/maripoveda)
- [Gauthier](https://github.com/sripwoud)

View File

@@ -1,12 +1,12 @@
---
sidebar_position: 10
sidebar_position: 12
---
# FAQ
## Where can I ask questions about Semaphore?
You can ask questions about Semaphore on [Discord](https://semaphore.pse.dev/discord) or by opening a [Semaphore Discussion](https://github.com/semaphore-protocol/semaphore/discussions). The most frequent questions will be listed below.
You can ask questions about Semaphore on [Telegram](https://semaphore.pse.dev/telegram) or by opening a [Semaphore Discussion](https://github.com/semaphore-protocol/semaphore/discussions). The most frequent questions will be listed below.
## Why should I prevent proofs from being verified twice?

View File

@@ -111,23 +111,23 @@ In the project root folder:
1. Add your environment variables in the `.env` file.
:::note
You should at least set a valid Infura API Key (you could use Alchemy as well) and a private key with some ethers.
:::
:::note
You should at least set a valid Infura API Key (you could use Alchemy as well) and a private key with some ethers.
:::
2. Go to the `apps/contracts` folder and deploy your contract.
```bash
yarn deploy --semaphore <semaphore-address> --group <group-id> --network sepolia
```
```bash
yarn deploy --semaphore <semaphore-address> --group <group-id> --network sepolia
```
:::note
Check the Semaphore contract addresses [here](/deployed-contracts).
:::
:::note
Check the Semaphore contract addresses [here](/deployed-contracts).
:::
:::caution
The group id is a number.
:::
:::caution
The group id is a number.
:::
### Start app

View File

@@ -1,5 +1,5 @@
---
sidebar_position: 7
sidebar_position: 9
---
# Glossary
@@ -14,7 +14,7 @@ The public [Semaphore identity](#identity) value used in [Semaphore groups](#gro
## Group
A group is a [Merkle tree](#merkle-tree) in which each leaf is an [identity commitment](#identity-commitment) for a user. Semaphore uses the [LeanIMT](https://zkkit.pse.dev/classes/_zk_kit_imt.LeanIMT.html) implementation, which is an optimized binary incremental Merkle tree. The tree nodes are calculated using [Poseidon](https://www.poseidon-hash.info).
A group is a [Merkle tree](#merkle-tree) in which each leaf is an [identity commitment](#identity-commitment) for a user. Semaphore uses the [LeanIMT](https://zkkit.pse.dev/classes/_zk_kit_lean_imt.LeanIMT.html) implementation, which is an optimized binary incremental Merkle tree. The tree nodes are calculated using [Poseidon](https://www.poseidon-hash.info).
## Merkle tree

View File

@@ -11,9 +11,9 @@ import TabItem from "@theme/TabItem"
A [Semaphore group](/glossary/#group) contains [identity commitments](/glossary/#identity-commitment) of group members.
Example uses of groups include the following:
- poll question that attendees join to rate an event,
- ballot that members join to vote on a proposal,
- whistleblowers who are verified employees of an organization.
- poll question that attendees join to rate an event,
- ballot that members join to vote on a proposal,
- whistleblowers who are verified employees of an organization.
:::info
Semaphore V4 uses the [ZK-Kit](https://github.com/privacy-scaling-explorations/zk-kit) LeanIMT (i.e., Lean Incremental
@@ -28,34 +28,31 @@ Use the [`@semaphore-protocol/group`](https://github.com/semaphore-protocol/sema
### Install package
<Tabs
defaultValue="npm"
groupId="package-managers"
values={[
defaultValue="npm"
groupId="package-managers"
values={[
{label: 'npm', value: 'npm'},
{label: 'Yarn', value: 'yarn'},
{label: 'pnpm', value: 'pnpm'}
]}>
<TabItem value="npm">
]}
>
<TabItem value="npm">
```bash
npm install @semaphore-protocol/group
```
</TabItem>
```bash
npm install @semaphore-protocol/group
```
<TabItem value="yarn">
```bash
yarn add @semaphore-protocol/group
```
</TabItem>
</TabItem>
<TabItem value="yarn">
```bash
yarn add @semaphore-protocol/group
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm add @semaphore-protocol/group
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm add @semaphore-protocol/group
```
</TabItem>
</Tabs>
:::info
@@ -142,39 +139,36 @@ Use the [`@semaphore-protocol/contracts`](https://github.com/semaphore-protocol/
### Install package
<Tabs
defaultValue="npm"
groupId="package-managers"
values={[
defaultValue="npm"
groupId="package-managers"
values={[
{label: 'npm', value: 'npm'},
{label: 'Yarn', value: 'yarn'},
{label: 'pnpm', value: 'pnpm'}
]}>
<TabItem value="npm">
]}
>
<TabItem value="npm">
```bash
npm install @semaphore-protocol/contracts
```
</TabItem>
```bash
npm install @semaphore-protocol/contracts
```
<TabItem value="yarn">
```bash
yarn add @semaphore-protocol/contracts
```
</TabItem>
</TabItem>
<TabItem value="yarn">
```bash
yarn add @semaphore-protocol/contracts
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm add @semaphore-protocol/contracts
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm add @semaphore-protocol/contracts
```
</TabItem>
</Tabs>
### Create a group
To create a group initialize your contract with the `Semaphore.sol` address and a group ID.
To create a group initialize your contract with the `Semaphore.sol` address.
The `createGroup` function can be used to create a Semaphore group. For example:
```solidity
@@ -187,16 +181,15 @@ contract YourContract {
uint256 public groupId;
constructor(ISemaphore _semaphore, uint256 _groupId) {
constructor(ISemaphore _semaphore) {
semaphore = _semaphore;
groupId = _groupId;
semaphore.createGroup(groupId, address(this));
groupId = semaphore.createGroup();
}
}
```
`Semaphore.sol` also includes a mechanism to verify Semaphore proofs created with old Merkle tree roots, the duration of which can optionally be defined by the admin in the `createGroup` function as the third parameter. The default value duration is 1 hour and it should be fine for most use-cases. For more context see the issue [#98](https://github.com/semaphore-protocol/semaphore/issues/98).
`Semaphore.sol` also includes a mechanism to verify Semaphore proofs created with old Merkle tree roots, the duration of which can optionally be defined by the admin in the `createGroup` function. The default value duration is 1 hour and it should be fine for most use-cases. For more context see the issue [#98](https://github.com/semaphore-protocol/semaphore/issues/98).
### Add members
@@ -241,4 +234,3 @@ function removeMember(uint256 identityCommitment, uint256[] calldata merkleProof
:::info
If you want to see an example of a working contract, have a look at the [`contracts-hardhat`](https://github.com/semaphore-protocol/semaphore/tree/main/packages/cli-template-contracts-hardhat) CLI template. You can also create a project with that template by running `semaphore create my-app --template contracts-hardhat`.
:::

View File

@@ -11,46 +11,43 @@ import TabItem from "@theme/TabItem"
In order to join a [Semaphore group](/glossary#group), a user must first create a [Semaphore identity](/glossary#identity).
A Semaphore identity contains three values generated with the identity:
- Private key
- Public key
- Commitment
- Private key
- Public key
- Commitment
To use and verify the identity, the identity owner (user) must know its private key.
To prevent fraud, the owner should keep their private key secret.
## Install package
In your code, use the [`@semaphore-protocol/identity`](https://github.com/semaphore-protocol/semaphore/tree/main/packages/identity) package to manage Semaphore identites.
In your code, use the [`@semaphore-protocol/identity`](https://github.com/semaphore-protocol/semaphore/tree/main/packages/identity) package to manage Semaphore identities.
<Tabs
defaultValue="npm"
groupId="package-managers"
values={[
defaultValue="npm"
groupId="package-managers"
values={[
{label: 'npm', value: 'npm'},
{label: 'Yarn', value: 'yarn'},
{label: 'pnpm', value: 'pnpm'}
]}>
<TabItem value="npm">
]}
>
<TabItem value="npm">
```bash
npm install @semaphore-protocol/identity
```
</TabItem>
```bash
npm install @semaphore-protocol/identity
```
<TabItem value="yarn">
```bash
yarn add @semaphore-protocol/identity
```
</TabItem>
</TabItem>
<TabItem value="yarn">
```bash
yarn add @semaphore-protocol/identity
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm add @semaphore-protocol/identity
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm add @semaphore-protocol/identity
```
</TabItem>
</Tabs>
:::info
@@ -88,6 +85,11 @@ You may choose to delegate such functionality to existing wallets such as Metama
1. In Metamask, a user signs a message with the private key of their Ethereum account.
2. In your application, the user creates a deterministic identity with the signed message that acts as your Semaphore private key.
3. The user can now recreate their Semaphore identity whenever they want by signing the same message with their Ethereum account in Metamask.
:::
:::warning Privacy risk
If a user signs the **same message** on multiple websites using MetaMask, all those websites will be able to **generate the same Semaphore identity**. This undermines anonymity and may allow third parties to **link identities across platforms** or even **gain control over a user's identity**.\
To mitigate this, encourage users to sign **unique messages per application** or implement safeguards that detect and warn about reuse.
:::
## Sign and verify messages
@@ -112,3 +114,33 @@ After a message is signed, anyone can verify the signature using the message its
// Static method.
Identity.verifySignature(message, signature, identity1.publicKey)
```
## Export and import an identity
A Semaphore Identity can be exported and then imported later for reuse.
### Export an identity
Returns the private key encoded as a base64 string.
```ts
import { Identity } from "@semaphore-protocol/identity"
const identity = new Identity()
const privateKey = identity.export()
```
### Import an identity
Returns a Semaphore identity based on a private key encoded as a base64 string.
```ts
import { Identity } from "@semaphore-protocol/identity"
const identity = new Identity()
const privateKey = identity.export()
const identity2 = Identity.import(privateKey)
```

View File

@@ -10,8 +10,8 @@ import TabItem from "@theme/TabItem"
Once a user joins a [Semaphore group](/glossary#group) with their [Semaphore identity](/glossary#identity), the user can send their anonymous [message](/glossary#message) with a zero-knowledge proof that proves the following:
- the user is a member of the group,
- the same user created the message and the proof.
- the user is a member of the group,
- the same user created the message and the proof.
A unique [nullifier](/glossary#nullifier) is also generated for each proof that can be used to check whether that proof has already been validated.
@@ -20,34 +20,31 @@ A unique [nullifier](/glossary#nullifier) is also generated for each proof that
In your code, use the [`@semaphore-protocol/proof`](https://github.com/semaphore-protocol/semaphore/tree/main/packages/proof) package to generate and verify a proof.
<Tabs
defaultValue="npm"
groupId="package-managers"
values={[
defaultValue="npm"
groupId="package-managers"
values={[
{label: 'npm', value: 'npm'},
{label: 'Yarn', value: 'yarn'},
{label: 'pnpm', value: 'pnpm'}
]}>
<TabItem value="npm">
]}
>
<TabItem value="npm">
```bash
npm install @semaphore-protocol/proof
```
</TabItem>
```bash
npm install @semaphore-protocol/proof
```
<TabItem value="yarn">
```bash
yarn add @semaphore-protocol/proof
```
</TabItem>
</TabItem>
<TabItem value="yarn">
```bash
yarn add @semaphore-protocol/proof
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm add @semaphore-protocol/proof
```
</TabItem>
<TabItem value="pnpm">
```bash
pnpm add @semaphore-protocol/proof
```
</TabItem>
</Tabs>
:::info
@@ -73,7 +70,7 @@ import { Group } from "@semaphore-protocol/group"
const semaphoreSubgraph = new SemaphoreSubgraph("sepolia")
const { members } = semaphoreSubgraph.getGroup("42", { members: true })
const { members } = await semaphoreSubgraph.getGroup("42", { members: true })
const group = new Group(members)
```
@@ -82,7 +79,7 @@ const group = new Group(members)
Each proof requires a [scope](/glossary#scope), on which each user may only generate one valid proof. The scope, together with the user's private key, is used to generate the nullifier, which is the value you can actually use to check whether a proof with that scope has already been generated by that user. In a voting application where double-voting must be prevented, the scope could be the ballot id, or the Merkle root of the group.
### 4. Generate the anomymous message
### 4. Generate the anonymous message
Finally, you can generate the proof with the anonymous message using the `generateProof` function. For example:

View File

@@ -1,5 +1,5 @@
---
sidebar_position: 8
sidebar_position: 10
---
import Articles from '@site/src/components/Articles';

View File

@@ -1,5 +1,5 @@
---
sidebar_position: 6
sidebar_position: 7
---
import RemoteCode from '@site/src/components/RemoteCode';
@@ -7,7 +7,7 @@ import RemoteCode from '@site/src/components/RemoteCode';
# Subgraph
[The Graph](https://thegraph.com/) is a protocol for indexing networks like Ethereum and IPFS.
Site owners publish _subgraphs_ that expose site data for anyone to query.
Site owners publish *subgraphs* that expose site data for anyone to query.
Semaphore's subgraph allows you to retrieve data from the [`Semaphore.sol`](https://github.com/semaphore-protocol/semaphore/blob/main/packages/contracts/contracts/Semaphore.sol) smart contract.
:::tip
@@ -16,5 +16,4 @@ The Graph protocol uses the [GraphQL](https://graphql.org/) query language. For
## Schema
<RemoteCode url="https://raw.githubusercontent.com/semaphore-protocol/semaphore/main/apps/subgraph/schema.graphql"
title="apps/subgraph/schema.graphql" language="graphql" />
<RemoteCode url="https://raw.githubusercontent.com/semaphore-protocol/semaphore/main/apps/subgraph/schema.graphql" title="apps/subgraph/schema.graphql" language="graphql" />

View File

@@ -4,7 +4,7 @@ sidebar_position: 2
# Circuits
The [Semaphore circuit](https://github.com/semaphore-protocol/semaphore/tree/main/packages/circuits/semaphore.circom) is the heart of the protocol and consists of three parts:
The [Semaphore circuit](https://github.com/semaphore-protocol/semaphore/blob/main/packages/circuits/src/semaphore.circom) is the heart of the protocol and consists of three parts:
- [Proof of membership](#proof-of-membership)
- [Nullifier](#nullifier)

View File

@@ -1,5 +1,5 @@
---
sidebar_position: 9
sidebar_position: 11
---
import Tabs from "@theme/Tabs"
@@ -7,13 +7,7 @@ import TabItem from "@theme/TabItem"
# Troubleshooting
If these suggestions do not work, feel free to ask for more help and support on [Github Discussions](https://github.com/semaphore-protocol/semaphore/discussions) or [Discord](https://semaphore.pse.dev/discord) ("dev-chat" channel).
## Creating a Group
When you create a group and the transaction is reverted, make sure that the group id you are using does not exist on the network you are using.
To check that, you can use the [Semaphore CLI](https://github.com/semaphore-protocol/semaphore/tree/main/packages/cli) with the command `get-groups` and the network you are using and then, make sure that your group id is not part of that list. You can also use the [Semaphore explorer](https://explorer.semaphore.pse.dev/).
If these suggestions do not work, feel free to ask for more help and support on [Github Discussions](https://github.com/semaphore-protocol/semaphore/discussions) or [Telegram](https://semaphore.pse.dev/telegram).
## Transaction reverted when using the same nullifier

View File

@@ -11,6 +11,8 @@ slug: /
Additionally, it provides a simple mechanism to prevent double-signaling.
Use cases include private voting, whistleblowing, anonymous DAOs and mixers.
For in-depth technical details about Semaphore, refer to the [Semaphore V4 Specification](https://github.com/zkspecs/zkspecs/blob/main/specs/3/README.md).
## Features
With Semaphore, you can allow your users to do the following:
@@ -33,19 +35,20 @@ Semaphore is designed to be a simple and generic _privacy layer_ for decentraliz
## About the code
The core of the protocol is the [circuit logic](https://github.com/semaphore-protocol/semaphore/tree/main/packages/circuits/semaphore.circom).
The core of the protocol is the [circuit logic](https://github.com/semaphore-protocol/semaphore/tree/main/packages/circuits/src/semaphore.circom).
In addition to circuits,
Semaphore provides [Solidity contracts](https://github.com/semaphore-protocol/semaphore/tree/main/packages/contracts)
and [JavaScript libraries](https://github.com/semaphore-protocol/semaphore/tree/main#-packages) that allow developers to generate zero-knowledge proofs and verify them with minimal effort.
## Trusted Setup Ceremony
The [secure parameters](https://snark-artifacts.pse.dev) for generating valid proofs with Semaphore circuits were generated in a [Trusted Setup Ceremony](https://ceremony.pse.dev/projects/Semaphore%20V4%20Ceremony) that was completed with over 400 participants on [13 July 2024](https://etherscan.io/block/20300394).
### Audits
| Version | Auditors | Report | Scope |
| ------- | --------------------------------- | --------------------------------------------------------------------------------------------------------------------- | ------------------------ |
| v2.0.0 | [PSE](https://pse.dev/) | [Semaphore_2.0.0_Audit.pdf](https://github.com/semaphore-protocol/semaphore/files/9850441/Semaphore_2.0.0_Audit.pdf) | `circuits`, `contracts` |
| v2.5.0 | [PSE](https://pse.dev/) | [Semaphore_2.5.0_Audit.pdf](https://github.com/semaphore-protocol/semaphore/files/9845008/Semaphore_2.5.0_Audit.pdf) | `contracts`, `libraries` |
| v3.0.0 | [Veridise](https://veridise.com/) | [Semaphore_3.0.0_Audit.pdf](https://github.com/semaphore-protocol/semaphore/files/10513776/Semaphore_3.0.0_Audit.pdf) | `circuits`, `contracts` |
:::caution
Semaphore V4 is in early testing and might have bugs. Please, don't use it in production.
:::
| Version | Auditors | Report | Scope |
| ------- | --------------------------------- | -------------------------------------------------------------------------------- | ------------------------------------ |
| v2.0.0 | [PSE](https://pse.dev/) | [Semaphore_2.0.0_Audit.pdf](https://semaphore.pse.dev/Semaphore_2.0.0_Audit.pdf) | `circuits`, `contracts` |
| v2.5.0 | [PSE](https://pse.dev/) | [Semaphore_2.5.0_Audit.pdf](https://semaphore.pse.dev/Semaphore_2.5.0_Audit.pdf) | `contracts`, `libraries` |
| v3.0.0 | [Veridise](https://veridise.com/) | [Semaphore_3.0.0_Audit.pdf](https://semaphore.pse.dev/Semaphore_3.0.0_Audit.pdf) | `circuits`, `contracts` |
| v4.0.0 | [PSE](https://pse.dev/) | [Semaphore_4.0.0_Audit.pdf](https://semaphore.pse.dev/Semaphore_4.0.0_Audit.pdf) | `circuits`, `contracts`, `libraries` |

View File

@@ -1 +1 @@
["V4-beta", "V3", "V2", "V1"]
["V4", "V3", "V2", "V1"]

View File

@@ -31,7 +31,7 @@
🔎 Issues
</a>
<span>&nbsp;&nbsp;|&nbsp;&nbsp;</span>
<a href="https://semaphore.pse.dev/discord">
<a href="https://semaphore.pse.dev/telegram">
🗣️ Chat &amp; Support
</a>
</h4>
@@ -42,14 +42,23 @@
## Networks
| Semaphore version | Sepolia | Mumbai | Optimism Sepolia | Arbitrum Sepolia | Arbitrum One |
| ----------------- | ---------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| v2.0 | N/A | N/A | N/A | N/A | [semaphore-protocol/arbitrum](https://thegraph.com/hosted-service/subgraph/semaphore-protocol/arbitrum) |
| v2.5 | N/A | N/A | N/A | N/A | N/A |
| v2.6 | N/A | N/A | N/A | N/A | [semaphore-protocol/arbitrum-86337c](https://thegraph.com/hosted-service/subgraph/semaphore-protocol/arbitrum-86337c) |
| v3.0 - v3.1 | N/A | N/A | N/A | N/A | [semaphore-protocol/arbitrum-72dca3](https://thegraph.com/hosted-service/subgraph/semaphore-protocol/arbitrum-72dca3) |
| >= v3.2 | [semaphore-sepolia](https://api.studio.thegraph.com/query/14377/semaphore-sepolia/v3.6.1) | [semaphore-mumbai](https://api.studio.thegraph.com/query/14377/semaphore-mumbai/v3.6.1) | N/A | N/A | [semaphore-arbitrum](https://api.studio.thegraph.com/query/14377/semaphore-arbitrum/v3.6.1) |
| >= v4.0.0-beta | [semaphore-sepolia](https://api.studio.thegraph.com/query/14377/semaphore-sepolia/v4.0.0-beta) | [semaphore-matic-mumbai](https://api.studio.thegraph.com/query/14377/semaphore-matic-mumbai/v4.0.0-beta) | [semaphore-optimism-sepolia](https://api.studio.thegraph.com/query/14377/semaphore-optimism-sepolia/v4.0.0-beta) | [semaphore-arbitrum-sepolia](https://api.studio.thegraph.com/query/14377/semaphore-arbitrum-sepolia/v4.0.0-beta) | N/A |
You can access any subgraph supported by Semaphore with the following URL: `https://api.studio.thegraph.com/query/14377/semaphore-<network-name>/v4.2.0`.
Supported networks:
- `sepolia`
- `ethereum`
- `optimism`
- `optimism-sepolia`
- `arbitrum`
- `arbitrum-sepolia`
- `matic`
- `matic-amoy`
- `base-sepolia`
- `base`
- `linea-sepolia`
- `linea`
- `scroll-sepolia`
## 🛠 Install
@@ -134,5 +143,5 @@ yarn deploy-local
Once the subgraph is published it will start indexing. You can query the subgraph using the following GraphQL endpoint:
```
http://127.0.0.1:8000/subgraphs/name/sempahore/graphql
http://127.0.0.1:8000/subgraphs/name/semaphore/graphql
```

File diff suppressed because one or more lines are too long

View File

@@ -6,9 +6,11 @@
"private": true,
"scripts": {
"codegen": "node scripts/generate-subgraph.js ${0} && graph codegen",
"codegen:sepolia": "yarn codegen sepolia",
"build": "graph build",
"auth": "graph auth --studio",
"deploy": "graph deploy --node https://api.studio.thegraph.com/deploy/ ${0}",
"build:sepolia": "yarn codegen:sepolia && graph build",
"auth": "graph auth",
"deploy": "graph deploy ${0}",
"start-ipfs": "node scripts/start-ipfs.js",
"create-local": "graph create --node http://localhost:8020/ semaphore",
"remove-local": "graph remove --node http://localhost:8020/ semaphore",
@@ -16,13 +18,13 @@
"test": "graph test Semaphore -v 0.5.0"
},
"dependencies": {
"@graphprotocol/graph-cli": "0.67.0",
"@graphprotocol/graph-ts": "0.32.0",
"@graphprotocol/graph-cli": "0.95.0",
"@graphprotocol/graph-ts": "0.37.0",
"@semaphore-protocol/utils": "workspace:packages/utils"
},
"devDependencies": {
"@types/mustache": "^4.2.2",
"matchstick-as": "0.5.0",
"@types/mustache": "^4.2.5",
"matchstick-as": "0.6.0",
"mustache": "^4.2.0"
}
}

View File

@@ -6,6 +6,25 @@ const network = process.argv.at(2)
const template = readFileSync("./subgraph.template.yaml", "utf-8")
const subgraph = Mustache.render(template, { network, ...getDeployedContract(network) })
function mapNetwork(n) {
if (n === "matic-amoy") {
return "polygon-amoy"
}
if (n === "arbitrum") {
return "arbitrum-one"
}
if (n === "ethereum") {
return "mainnet"
}
return network
}
const subgraph = Mustache.render(template, {
network: mapNetwork(network),
...getDeployedContract(network)
})
writeFileSync("./subgraph.yaml", subgraph)

View File

@@ -18,7 +18,7 @@ dataSources:
- Member
abis:
- name: Semaphore
file: ./abis/Semaphore.json
file: ../../node_modules/@semaphore-protocol/utils/src/semaphore-interface.json
eventHandlers:
- event: GroupCreated(indexed uint256)
handler: createGroup

View File

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

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -26,7 +26,7 @@ export default function Build() {
url: "https://github.com/semaphore-protocol/boilerplate",
details: [
"Begin your projects with a ready-to-use example template",
"Create identity, join group, send anonmous feedback",
"Create identity, join group, send anonymous feedback",
"Easily modify to align with specific project goals"
]
},
@@ -44,19 +44,16 @@ export default function Build() {
]
const linksInfo = [
{
title: "PSE acceleration program",
href: "https://github.com/privacy-scaling-explorations/acceleration-program"
},
{
title: "Good first issues",
href: "https://github.com/semaphore-protocol/semaphore/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22"
},
{
title: "Enhance the protocol",
href: "https://github.com/semaphore-protocol/semaphore/discussions/new?category=ideas"
},
{
title: "Give feedback about the website",
href: "https://github.com/semaphore-protocol/semaphore/discussions/new?category=website"
}
]
return (
<VStack justify="center">
<VStack pt="170px" pb="128px">
@@ -136,7 +133,7 @@ export default function Build() {
</VStack>
</Flex>
<Box position="relative" w={{ base: "full", xl: "727px" }} h="630" overflow="hidden">
<Box position="relative" w={{ base: "full", xl: "727px" }} h="630px" overflow="hidden">
<Image
src="https://semaphore.cedoor.dev/flower-shadow.jpg"
alt=""

View File

@@ -1,9 +1,10 @@
import { Box, Container } from "@chakra-ui/react"
import { Box, Container, Link } from "@chakra-ui/react"
import type { Metadata } from "next"
import Script from "next/script"
import Footer from "../components/Footer"
import Navbar from "../components/Navbar"
import Providers from "./providers"
import Banner from "@/components/Banner"
export const metadata: Metadata = {
title: "Semaphore",
@@ -30,9 +31,23 @@ export default function RootLayout({ children }: { children: React.ReactNode })
<html lang="en" suppressHydrationWarning>
<body suppressHydrationWarning>
<Providers>
<Banner>
<Link
_hover={{
textDecoration: "underline",
textDecorationColor: "primary.600"
}}
href="https://github.com/semaphore-protocol/semaphore/releases/tag/v4.0.0"
ml="1"
isExternal
>
<b>Semaphore V4</b>
</Link>{" "}
has been released 🚀
</Banner>
<Navbar />
<Container maxW="1440px" px={{ base: "5", md: "10" }}>
<Box h="96px" />
<Box h="146px" /> {/* Adjusted to account for TopBanner and Navbar */}
{children}
<Footer />
</Container>

View File

@@ -1,11 +1,13 @@
import { Box, Button, Card, CardBody, HStack, Heading, Image, Link, Stack, Text, VStack } from "@chakra-ui/react"
import NextLink from "next/link"
import { Sora } from "next/font/google"
import NextLink from "next/link"
import Carousel from "../components/Carousel"
import ProjectCard from "../components/ProjectCard"
import events from "../data/events.json"
import allProjects from "../data/projects.json"
import IconDiscord from "../icons/IconDiscord"
import IconTelegram from "../icons/IconTelegram"
import HRoadmap from "@/components/HRoadmap"
import VRoadmap from "@/components/VRoadmap"
const sora = Sora({
subsets: ["latin"]
@@ -220,6 +222,35 @@ export default function Home() {
</Card>
</HStack>
<VStack mb="32" spacing="32">
<VStack w="full" maxW="1110px">
<Heading fontSize={{ base: "30px", md: "44px" }} pb="90px">
2024-2025 Roadmap
</Heading>
<HStack display={{ base: "none", md: "flex" }} w="full" mt="60px">
<HRoadmap />
</HStack>
<VStack display={{ base: "flex", md: "none" }}>
<VRoadmap />
</VStack>
</VStack>
<VStack maxW="650" align="center" spacing="8">
<Heading fontSize={{ base: "30px", md: "44px" }}>Join the Semaphore community</Heading>
<Text fontSize={{ base: "16px", md: "18px" }} textAlign="center">
Ask questions, suggest ideas, stay up-to-date, and meet other people building privacy
applications with Zero Knowledge.
</Text>
<Link href="https://semaphore.pse.dev/telegram" isExternal>
<Button leftIcon={<IconTelegram />} size="lg">
Telegram
</Button>
</Link>
</VStack>
</VStack>
<VStack justify="center" spacing="40" py="32" position="relative">
<Box
zIndex="-1"
@@ -239,27 +270,16 @@ export default function Home() {
/>
</Box>
<Stack direction={{ base: "column", md: "row" }} px={{ base: "0", md: "12" }} spacing="32">
<VStack maxW="450" align="left" spacing="8">
<Heading fontSize={{ base: "30px", md: "44px" }}>Join the Semaphore community</Heading>
<Text fontSize={{ base: "16px", md: "18px" }}>
Ask questions, suggest ideas, stay up-to-date, and meet other people building privacy
applications with Zero Knowledge.
</Text>
<Link href="https://semaphore.pse.dev/discord" isExternal>
<Button leftIcon={<IconDiscord />} size="lg">
Discord
</Button>
</Link>
</VStack>
<Stack direction={{ base: "column", md: "row" }} px={{ base: "0", md: "12" }} w="full">
<Box flex="1" />
<Card
bg="inherit"
flex="1"
bg="darkBlue"
color="white"
backdropFilter="blur(4px)"
borderRadius="18px"
border="1px"
borderColor="white"
borderColor="text.900"
padding="50px"
>
<CardBody padding="0">
@@ -267,7 +287,7 @@ export default function Home() {
Upcoming Events
</Heading>
<VStack align="left" spacing="10" maxH="600" overflowY="auto">
<VStack align="left" spacing="10" maxH="600px" overflowY="auto">
{events.map((event) => (
<Link href={event.link} key={event.name} isExternal>
<VStack align="left">

View File

@@ -0,0 +1,28 @@
import { Box, Text } from "@chakra-ui/react"
interface BannerProps {
children: React.ReactNode
}
export default function Banner({ children }: BannerProps) {
return (
<Box
bg="darkBlueBg"
py="3"
textAlign="center"
borderBottom="1px solid"
color="text"
fontSize="sm"
position="fixed"
top="0"
left="0"
right="0"
zIndex="2"
display="flex"
justifyContent="center"
alignItems="center"
>
<Text>{children}</Text>
</Box>
)
}

View File

@@ -2,7 +2,7 @@ import { Divider, Heading, HStack, Link, Stack, Text, VStack } from "@chakra-ui/
import Image from "next/image"
import NextLink from "next/link"
import IconArrowUpRight from "../icons/IconArrowUpRight"
import IconDiscord from "../icons/IconDiscord"
import IconTelegram from "../icons/IconTelegram"
import IconThumbsUp from "../icons/IconThumbsUp"
import IconX from "@/icons/IconX"
@@ -59,11 +59,11 @@ export default function Footer() {
<Divider />
<VStack spacing="5">
<HStack spacing="5">
<Link href="https://semaphore.pse.dev/discord" isExternal>
<Link href="https://semaphore.pse.dev/telegram" isExternal>
<HStack>
<IconDiscord boxSize={{ base: "16px", md: "24px" }} />
<IconTelegram boxSize={{ base: "16px", md: "24px" }} />
<Heading fontSize={{ base: "14px", md: "18px" }} fontWeight="normal">
Discord
Telegram
</Heading>
</HStack>
</Link>
@@ -88,7 +88,7 @@ export default function Footer() {
</Link>
<Text fontSize={{ base: "12px", md: "14px" }} color="text.500" pt="2">
Copyright © 2024 Ethereum Foundation
Copyright © {new Date().getFullYear()} Ethereum Foundation
</Text>
</VStack>
</VStack>

View File

@@ -0,0 +1,58 @@
import { Box, Text } from "@chakra-ui/react"
import roadmap from "../data/roadmap.json"
import IconInnerCheck from "../icons/IconInnerCheck"
export default function HRoadmap() {
return roadmap.map((milestone, i) => (
<Box
key={milestone.name}
borderBottomWidth={i % 2 === 0 ? "5px" : "0px"}
borderTopWidth={i % 2 !== 0 ? "5px" : "0px"}
borderLeftWidth="1px"
borderColor="#1E46F2"
transform={i % 2 === 0 ? "translateY(-74px)" : ""}
h="80px"
w="full"
pos="relative"
>
{milestone.done ? (
<IconInnerCheck
pos="absolute"
top={i % 2 !== 0 ? "-14px" : "inherit"}
bottom={i % 2 === 0 ? "-14px" : "inherit"}
left="-12px"
bg="#1E46F2"
borderRadius="50px"
p="7px"
w="24px"
h="24px"
color="white"
/>
) : (
<Box
pos="absolute"
top={i % 2 !== 0 ? "-14px" : "inherit"}
bottom={i % 2 === 0 ? "-14px" : "inherit"}
left="-12px"
bg="darkBlueBg"
borderWidth="5px"
borderColor="#1E46F2"
borderRadius="50px"
w="24px"
h="24px"
/>
)}
<Text
pos="absolute"
bg="darkBlueBg"
fontSize="14px"
py="5px"
top={i % 2 === 0 ? "-35px" : "inherit"}
bottom={i % 2 !== 0 ? "-35px" : "inherit"}
left="-1px"
>
{milestone.name}
</Text>
</Box>
))
}

View File

@@ -20,7 +20,7 @@ import {
} from "@chakra-ui/react"
import Image from "next/image"
import NextLink from "next/link"
import IconDiscord from "../icons/IconDiscord"
import IconTelegram from "../icons/IconTelegram"
import IconMenu from "../icons/IconMenu"
import IconThumbsUp from "../icons/IconThumbsUp"
import NavbarLinks from "./NavbarLinks"
@@ -30,7 +30,7 @@ export default function Navbar() {
const { isOpen, onOpen, onClose } = useDisclosure()
return (
<HStack zIndex="1" py="7" top="0" left="0" right="0" position="fixed" bgColor="darkBlueBg">
<HStack zIndex="1" py="7" top="42px" left="0" right="0" position="fixed" bgColor="darkBlueBg">
<Container maxW="1440px" px={{ base: "5", md: "10" }}>
<HStack justify="space-between">
<Link as={NextLink} href="/">
@@ -71,11 +71,11 @@ export default function Navbar() {
<VStack w="full" justify="center" spacing="5">
<HStack spacing="5">
<Link href="https://semaphore.pse.dev/discord" isExternal>
<Link href="https://semaphore.pse.dev/telegram" isExternal>
<HStack>
<IconDiscord boxSize={{ base: "16px", md: "24px" }} />
<IconTelegram boxSize={{ base: "16px", md: "24px" }} />
<Heading fontSize={{ base: "14px", md: "18px" }} fontWeight="normal">
Discord
Telegram
</Heading>
</HStack>
</Link>

View File

@@ -0,0 +1,61 @@
import { Box, Text } from "@chakra-ui/react"
import roadmap from "../data/roadmap.json"
import IconInnerCheck from "../icons/IconInnerCheck"
export default function VRoadmap() {
return roadmap.map((milestone, i) => (
<Box
key={milestone.name}
ml="-74px"
borderLeftWidth={i % 2 === 0 ? "5px" : "0px"}
borderRightWidth={i % 2 !== 0 ? "5px" : "0px"}
borderTopWidth="1px"
borderColor="#1E46F2"
transform={i % 2 === 0 ? "translateX(74px)" : ""}
h="80px"
w="80px"
pos="relative"
>
{milestone.done ? (
<IconInnerCheck
pos="absolute"
right={i % 2 !== 0 ? "-14px" : "inherit"}
left={i % 2 === 0 ? "-14px" : "inherit"}
top="-12px"
bg="#1E46F2"
borderRadius="50px"
p="7px"
w="24px"
h="24px"
color="white"
/>
) : (
<Box
pos="absolute"
right={i % 2 !== 0 ? "-14px" : "inherit"}
left={i % 2 === 0 ? "-14px" : "inherit"}
top="-12px"
bg="darkBlueBg"
borderWidth="5px"
borderColor="#1E46F2"
borderRadius="50px"
w="24px"
h="24px"
/>
)}
<Text
pos="absolute"
bg="darkBlueBg"
fontSize="14px"
w="140px"
px="16px"
textAlign={i % 2 === 0 ? "left" : "right"}
left={i % 2 === 0 ? "70px" : "inherit"}
right={i % 2 !== 0 ? "70px" : "inherit"}
top="-5px"
>
{milestone.name}
</Text>
</Box>
))
}

View File

@@ -33,5 +33,26 @@
"date": "2023-10-30",
"authors": ["Laszlo Fazekas"],
"url": "https://hackernoon.com/brief-introduction-of-semaphore-a-zero-knowledge-group-membership-protocol"
},
{
"title": "Semaphore v3 overview + simplification",
"minRead": 7,
"date": "2024-01-01",
"authors": ["Vivek Bhupatiraju"],
"url": "https://vivs.wiki/Semaphore"
},
{
"title": "Getting Started with Semaphore: Building Privacy-Preserving dApps on Ethereum",
"minRead": 7,
"date": "2024-12-09",
"authors": ["glasswing"],
"url": "https://mirror.xyz/0xBE98D44c29D179588b7E717Db8898529e5cD770F/5Xlv1jzwJKfKgP-m257kjivBlUIM_cwTzsmpf9F0Su8"
},
{
"title": "Semaphore V4 Specification",
"minRead": 10,
"date": "2025-03-01",
"authors": ["Semaphore Team"],
"url": "https://github.com/zkspecs/zkspecs/blob/main/specs/3/README.md"
}
]

View File

@@ -1,14 +1,20 @@
[
{
"name": "ETHGlobal - Circuit Breaker",
"date": "Feb 2-21, 2024",
"description": "Semaphore team will deliver the online workshop \"Semaphore: The power of anonymity\" about building ZK applications. It will also mention improvements on Semaphore v4 and ZK-KIT.",
"link": "https://ethglobal.com/events/circuitbreaker"
"name": "ETHDam",
"date": "May 9-11, 2025",
"description": "Semaphore team will deliver an in-person talk.",
"link": "https://www.ethdam.com/"
},
{
"name": "ETHDam",
"date": "Apr 12-14, 2024",
"description": "Semaphore team will deliver an in-person talk and sponsor prizes for the hackathon.",
"link": "https://www.ethdam.com/"
"name": "ZuBerlin",
"date": "June 14-22, 2025",
"description": "Semaphore team will deliver an in-person talk.",
"link": "https://zuberlin.city/"
},
{
"name": "Devconnect",
"date": "Nov 17-22, 2025",
"description": "Semaphore team will deliver an in-person talk and run workshops.",
"link": "https://devconnect.org/"
}
]

View File

@@ -11,15 +11,14 @@
}
},
{
"name": "Unirep",
"tagline": "Private and nonrepudiable reputation system based on ZKP.",
"categories": ["Reputation", "Identity", "Social"],
"pse": true,
"name": "Worldcoin",
"categories": ["Identity"],
"tagline": "A global digital currency offering universal access to a more inclusive financial system.",
"pse": false,
"icon": "",
"links": {
"website": "https://developer.unirep.io",
"github": "https://github.com/Unirep",
"discord": "https://discord.gg/VzMMDJmYc5"
"github": "https://github.com/worldcoin",
"website": "https://worldcoin.org"
}
},
{
@@ -33,6 +32,26 @@
"website": "https://bandada.pse.dev"
}
},
{
"name": "ZkDemocracy",
"categories": ["Infra", "Data"],
"tagline": "ZkDemocracy is a ready-to-use anonymous voting system based on Semaphore.",
"pse": false,
"icon": "",
"links": {
"github": "https://github.com/TheBojda/zkdemocracy"
}
},
{
"name": "Super Secret ZK Ballot",
"tagline": "A Solidity contract for anonymous voting.",
"categories": ["Voting"],
"pse": false,
"icon": "",
"links": {
"github": "https://github.com/dutragustavo/super-secret-zkballot"
}
},
{
"name": "ZK Proof of Humanity",
"tagline": "A project that allows humans, registered in Proof of Humanity, to prove their humanity without doxing.",
@@ -106,20 +125,7 @@
"icon": "",
"links": {
"website": "https://explorer.semaphore.pse.dev",
"github": "https://github.com/semaphore-protocol/explorer",
"discord": "https://semaphore.pse.dev/discord"
}
},
{
"name": "Semaphore Discord Bot",
"tagline": "A Discord Bot for Semaphore",
"categories": ["Development"],
"pse": true,
"icon": "",
"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.pse.dev/discord"
"github": "https://github.com/semaphore-protocol/explorer"
}
},
{
@@ -487,14 +493,15 @@
}
},
{
"name": "Worldcoin",
"categories": ["Identity"],
"tagline": "A global digital currency offering universal access to a more inclusive financial system.",
"pse": false,
"name": "Unirep",
"tagline": "Private and nonrepudiable reputation system based on ZKP.",
"categories": ["Reputation", "Identity", "Social"],
"pse": true,
"icon": "",
"links": {
"github": "https://github.com/worldcoin",
"website": "https://worldcoin.org"
"website": "https://developer.unirep.io",
"github": "https://github.com/Unirep",
"discord": "https://discord.gg/VzMMDJmYc5"
}
},
{
@@ -526,5 +533,58 @@
"links": {
"website": "https://medium.com/remix-ide/remix-release-v0-37-0-dbc750f7ab15"
}
},
{
"name": "AsteriskDAO",
"tagline": "Womens health data lake dAPP for OCD to give researchers access to female-specific data",
"categories": ["Health", "Data"],
"pse": false,
"icon": "",
"links": {
"github": "https://github.com/AsteriskDAO",
"website": "https://ethglobal.com/showcase/asteriskdao-4hvhf"
}
},
{
"name": "Pairwise",
"tagline": "A fun pseudonymous way to signal in Retro Funding 4.",
"categories": ["Retro Funding", "Public Goods", "Privacy", "Community"],
"pse": false,
"icon": "",
"links": {
"github": "https://github.com/GeneralMagicio/pairwise-RPGF4",
"website": "https://pairwise.vote"
}
},
{
"name": "VeilEscrow",
"categories": ["Privacy", "Coordination"],
"tagline": "Secure, private, and decentralized escrows for anonymous transactions",
"pse": false,
"icon": "",
"links": {
"github": "https://github.com/evgongora/VeilEscrow"
}
},
{
"name": "Obscurus",
"categories": ["Voting", "Privacy"],
"tagline": "An anonymity layer for Safe Wallet owners, built using Semaphore and Zodiac.",
"pse": false,
"icon": "",
"links": {
"github": "https://github.com/quartz-technology/obscurus"
}
},
{
"name": "Semaphore Modular Smart Account Modules",
"categories": ["Wallet", "Privacy"],
"tagline": "Anonymous multi-sig wallet with Semaphore",
"pse": false,
"icon": "",
"links": {
"github": "https://github.com/jimmychu0807/semaphore-msa-modules",
"website": "https://semaphore-msa-modules.jimmychu0807.hk"
}
}
]

View File

@@ -0,0 +1,46 @@
[
{
"name": "Launched New Website",
"done": true
},
{
"name": "V4 Audit",
"done": true
},
{
"name": "V4 Trusted Setup",
"done": true
},
{
"name": "V4 Stable Release",
"done": true
},
{
"name": "LeanIMT Paper",
"done": true
},
{
"name": "Support more Testnets/Mainnets",
"done": true
},
{
"name": "New Explorer",
"done": true
},
{
"name": "Semaphore V4 Specification",
"done": true
},
{
"name": "Semaphore Rust Implementation",
"done": true
},
{
"name": "Semaphore Noir Implementation",
"done": false
},
{
"name": "Scaling Semaphore with PIR",
"done": false
}
]

View File

@@ -116,7 +116,15 @@
"eventName": "ETHGlobal Circuit Breaker",
"date": "2024-02-02",
"speakers": ["Vivian Plasencia"],
"url": "https://youtu.be/tx1Xglf07yE",
"thumbnail": "https://img.youtube.com/vi/tx1Xglf07yE/0.jpg"
"url": "https://youtu.be/ux5Xy_lpiYk",
"thumbnail": "https://img.youtube.com/vi/ux5Xy_lpiYk/0.jpg"
},
{
"title": "Scaling Semaphore",
"eventName": "ETHDam",
"date": "2025-05-10",
"speakers": ["Vivian Plasencia"],
"url": "https://youtu.be/IkYtKSQLR-A",
"thumbnail": "https://img.youtube.com/vi/IkYtKSQLR-A/0.jpg"
}
]

Some files were not shown because too many files have changed in this diff Show More