Coder Social home page Coder Social logo

0xbok / semaphore Goto Github PK

View Code? Open in Web Editor NEW

This project forked from semaphore-protocol/semaphore

0.0 0.0 0.0 6.09 MB

A zero-knowledge protocol for anonymous interactions.

Home Page: https://semaphore.pse.dev

License: MIT License

Shell 0.04% JavaScript 0.68% TypeScript 70.64% CSS 1.16% SCSS 2.56% Solidity 9.13% Circom 0.65% MDX 15.14%

semaphore's Introduction

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.

📦 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
@semaphore-protocol/heyauthn (docs) 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.

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 and TheGraph to build all the packages and the subgraph:

yarn build

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.

Releases

Bump a new version with:

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

It will create a commit and a git tag that will need to 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.

semaphore's People

Contributors

cedoor avatar vplasencia avatar kobigurk avatar 0xjei avatar recmo avatar 0xorbus avatar weijiekoh avatar zkfriendly avatar shiyingt avatar shaheenrehman avatar dicethedev avatar chancehudson avatar aguzmant103 avatar akinovak avatar saleel avatar zkzoomer avatar omahs avatar cddelta avatar dcposch avatar dbrans avatar patitonar avatar swellander avatar tomoima525 avatar mmqxyz avatar xiaoxianboy avatar wslyvh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.