Skip to content

A zero-knowledge protocol for anonymous signalling on Ethereum.

License

Notifications You must be signed in to change notification settings

Yoii-Inc/semaphore

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Semaphore icon. Semaphore

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

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: @semaphore-protocol/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.


📦 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/subgraph (docs) NPM version Downloads
@semaphore-protocol/hardhat NPM version Downloads

🛠 Install

Clone this repository:

git clone https://github.com/semaphore-protocol/semaphore.git

And install the dependencies:

cd semaphore && yarn

📜 Usage

Copy the .env.example file as .env:

cp .env.example .env

And add your environment variables.

Code quality and formatting

Run ESLint to analyze the code and catch bugs:

yarn lint

Run Prettier to check formatting rules:

yarn prettier

Or to automatically format the code:

yarn prettier:write

Conventional commits

Semaphore uses conventional commits. A command line utility to commit using the correct syntax can be used by running:

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:

yarn download:snark-artifacts

Testing

Run Jest to test the JS libraries:

yarn test:libraries

Run Mocha to test the contracts:

yarn test:contracts

Or test everything with:

yarn test

Build libraries & compile contracts

Run Rollup to build all the packages:

yarn build:libraries

Compile the smart contracts with Hardhat:

yarn compile:contracts

Documentation (JS libraries)

Run TypeDoc to generate a documentation website for each package:

yarn docs

The output will be placed on the docs folder.

About

A zero-knowledge protocol for anonymous signalling on Ethereum.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Solidity 63.0%
  • TypeScript 34.0%
  • EJS 2.4%
  • Other 0.6%