项目作者: appliedzkp

项目描述 :
A privacy gadget for Ethereum
高级语言: Solidity
项目地址: git://github.com/appliedzkp/semaphore.git
创建时间: 2019-04-05T14:42:26Z
项目社区:https://github.com/appliedzkp/semaphore

开源协议:

下载







Semaphore icon







Github license


GitHub Workflow test


Coveralls


DeepScan grade


Linter eslint


Code style prettier

Repository top language




Commitizen friendly

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.

📦 Packages




















































Package Version Downloads


@semaphore-protocol/core




NPM 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/utils


(docs)




NPM version




Downloads

🛠 Install

Clone this repository:

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

Install the dependencies:

  1. cd semaphore && yarn

And build the repository:

  1. yarn build

📜 Usage

Copy the .env.example file as .env:

  1. cp .env.example .env

And add your environment variables.

Code quality and formatting

Run ESLint to analyze the code and catch bugs:

  1. yarn lint

Run Prettier to check formatting rules:

  1. yarn format

Or to automatically format the code:

  1. yarn format:write

Conventional commits

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

  1. git commit

It will also automatically check that the modified files comply with ESLint and Prettier rules.

Testing

Run Jest to test the JS libraries:

  1. yarn test:libraries

Run Mocha to test the contracts:

  1. yarn test:contracts

Or test everything with:

  1. yarn test

Build libraries & compile contracts

Run Rollup and @graphprotocol/graph-cli">TheGraph to build all the packages and the subgraph:

  1. yarn build

Compile the smart contracts with Hardhat:

  1. yarn compile:contracts

Documentation (JS libraries)

Run TypeDoc to generate a documentation website for each package:

  1. yarn docs

The output will be placed on the docs folder.

Releases

Bump a new version with:

  1. yarn version:bump <version>
  2. # e.g. yarn version:bump 2.0.0

It will create a commit and a git tag that will need to be pushed on the main branch. A workflow will be triggered and will
publish the Semaphore packages on npm and release a new version on Github with its changelogs automatically.