| 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. However Semaphore also provides Solidity contracts (NPM: @webb-tools/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.
You can find Semaphore V1 on version/1.0.0.
Clone this repository:
git clone https://github.com/webb-tools/semaphore-anchor.gitAnd install the dependencies:
cd semaphore && yarnCopy 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 prettierOr to automatically format the code:
yarn prettier:writeSemaphore uses conventional commits. A command line utility to commit using the correct syntax can be used by running:
yarn commitIt will also automatically check that the modified files comply with ESLint and Prettier rules.
Download the Semaphore snark artifacts needed to generate and verify proofs:
yarn download:snark-artifactsRun Jest to test the JS libraries:
yarn test:librariesRun Mocha to test the contracts:
yarn test:contractsOr test everything with:
yarn testRun Rollup to build all the packages:
yarn buildCompile the smart contracts with Hardhat:
yarn compileRun TypeDoc to generate a documentation website for each package:
yarn docsThe output will be placed on the docs folder.