π₯ Contributing Β Β |Β Β π€ Code of conduct Β Β |Β Β π Issues Β Β |Β Β π£οΈ Chat & Support Β Β |Β Β π» API Reference
| Semaphore is a generic privacy layer. Leveraging zero-knowledge technology, users can prove their membership in groups and send messages (extending from votes to endorsements) off-chain or across EVM-compatible blockchains, all without revealing their personal identity. |
|---|
The core of the Semaphore protocol is in the circuit logic. However, Semaphore also provides Solidity 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.
Important
Help Semaphore prosper by sharing your ideas with the PSE acceleration program.
Clone this repository:
git clone https://github.com/semaphore-protocol/semaphore.gitInstall the dependencies:
cd semaphore && yarnAnd build the repository:
yarn buildCopy the .env.example file as .env:
cp .env.example .envAnd add your environment variables.
Run ESLint to analyze the code and catch bugs:
yarn lintRun Prettier to check formatting rules:
yarn formatOr to automatically format the code:
yarn format:writeSemaphore uses conventional commits. A command line utility to commit using the correct syntax can be used by running:
git commitIt will also automatically check that the modified files comply with ESLint and Prettier rules.
Run Jest to test the JS libraries:
yarn test:librariesRun Mocha to test the contracts:
yarn test:contractsOr test everything with:
yarn testRun Rollup and TheGraph to build all the packages and the subgraph:
yarn buildCompile the smart contracts with Hardhat:
yarn compile:contractsRun TypeDoc to generate a documentation website for each package:
yarn docsThe output will be placed on the docs folder.
Steps:
- Bump a new version with:
yarn version:bump <version>
# e.g. yarn version:bump 2.0.0This step creates a commit and a git tag.
- Push the changes to main:
git push origin main- Push the new git tag:
git push origin <version>
# e.g. git push origin v2.0.0After pushing the new git tag, a workflow will be triggered to publish the Semaphore packages on npm and release a new version on GitHub with its changelogs automatically.