Semaphore icon. Semaphore

Github license GitHub Workflow test Coveralls DeepScan grade Linter eslint Code style prettier Repository top language

👥 Contributing   |   🤝 Code of conduct   |   🔎 Issues   |   🗣️ Chat & Support

| Semaphore is a protocol, designed to be a simple and generic privacy layer for Ethereum DApps. Using zero knowledge, Ethereum users can prove their membership of a group and send signals such as votes or endorsements without revealing their original identity. | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | The core of the Semaphore protocol is in the [circuit logic](/packages/circuits/scheme.png). However Semaphore also provides [Solidity contracts](/packages/contracts) and JavaScript libraries to make the steps for offchain proof creation and onchain verification easier. To learn more about Semaphore visit [semaphore.appliedzkp.org](https://semaphore.appliedzkp.org). ## 📦 Packages
Package Version Downloads
@semaphore-protocol/contracts NPM version Downloads
@semaphore-protocol/identity (docs) NPM version Downloads
@semaphore-protocol/group (docs) NPM version Downloads
@semaphore-protocol/proof (docs) NPM version Downloads
@semaphore-protocol/data (docs) NPM version Downloads
@semaphore-protocol/hardhat NPM version Downloads
@semaphore-protocol/cli NPM version Downloads
@semaphore-protocol/heyauthn (docs) NPM version Downloads
## 💡 Projects The following are some of the internal and external projects that use Semaphore. If you want to include your project, open an [issue](https://github.com/semaphore-protocol/semaphore/issues/new?assignees=&labels=documentation++%F0%9F%93%96&template=----project.md&title=) or create a PR by adding the project information to the `projects.json` file.
Project Description Links
Semaphore Explorer Semaphore explorer for on-chain groups. Github | Discord
Semaphore Discord Bot A Discord bot for Semaphore. Github | Discord
Unirep Private and nonrepudiable reputation system based on ZKP. Github | Discord
ZK Proof of Humanity A project to allows humans, registered in Proof of Humanity, to prove their humanity without doxing. Github
Plurality An Identity Lego Building Block for dapp creators that lets them identify their users without
using any third-party KYC provider or other middlemen, whilst preserving the privacy of users.
Github
ZeroTherapy AMA privacy application built with Semaphore. Github
## 🛠 Install Clone this repository: ```bash git clone https://github.com/semaphore-protocol/semaphore.git ``` And install the dependencies: ```bash cd semaphore && yarn ``` ## 📜 Usage Copy the `.env.example` file as `.env`: ```bash cp .env.example .env ``` And add your environment variables. ### Code quality and formatting Run [ESLint](https://eslint.org/) to analyze the code and catch bugs: ```bash yarn lint ``` Run [Prettier](https://prettier.io/) to check formatting rules: ```bash yarn prettier ``` Or to automatically format the code: ```bash yarn prettier:write ``` ### Conventional commits 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 ``` It will also automatically check that the modified files comply with ESLint and Prettier rules. ### Snark artifacts Download the Semaphore snark artifacts needed to generate and verify proofs: ```bash yarn download:snark-artifacts ``` ### Testing Run [Jest](https://jestjs.io/) to test the JS libraries: ```bash yarn test:libraries ``` Run [Mocha](https://mochajs.org/) to test the contracts: ```bash yarn test:contracts ``` Or test everything with: ```bash yarn test ``` ### Build libraries & compile contracts Run [Rollup](https://www.rollupjs.org) to build all the packages: ```bash yarn build:libraries ``` Compile the smart contracts with [Hardhat](https://hardhat.org/): ```bash yarn compile:contracts ``` ### Documentation (JS libraries) Run [TypeDoc](https://typedoc.org/) to generate a documentation website for each package: ```bash yarn docs ``` The output will be placed on the `docs` folder.