Skip to content
This repository has been archived by the owner on Sep 18, 2022. It is now read-only.

semaphore-protocol/semaphore.js

Repository files navigation

⚠️ JavaScript libraries were moved to the main Semaphore repository

Semaphore icon. Semaphore.JS

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

Semaphore provides a set of JavaScript libraries to create identities, groups, generate zero-knowledge proofs and verify them with minimal effort.

📦 Packages

Package 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

🛠 Install

Clone this repository:

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

and install the dependencies:

cd semaphore.js && yarn

📜 Usage

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 code with coverage:

yarn test

Build packages

Run Rollup to build all the packages:

yarn build

A dist folder will be created inside each package.

Documentation

Run TypeDoc to generate a documentation website for each package:

yarn docs

The output will be placed on the docs folder.