@semaphore-protocol/core
TypeScript icon, indicating that this package has built-in type declarations

4.0.0-beta.9 • Public • Published

Semaphore core

Core library for the essential Semaphore features.

NPM license NPM version Downloads Linter eslint Code style prettier

This library is a simple re-export of the Semaphore core libraries: @semaphore-protocol/identity, @semaphore-protocol/group, @semaphore-protocol/proof. So that developers can install a single package to use all the core functionalities of the protocol.

🛠 Install

npm or yarn

Install the @semaphore-protocol/core package with npm:

npm i @semaphore-protocol/core

or yarn:

yarn add @semaphore-protocol/core

📜 Usage

import { Identity, Group, generateProof, verifyProof } from "@semaphore-protocol/core"

const identity1 = new Identity()
const identity2 = new Identity()
const identity3 = new Identity()

const group = new Group([identity1.commitment, identity2.commitment, identity3.commitment])

const message = "Hello world"
const scope = "Semaphore"

const proof = await generateProof(identity1, group, message, scope)

await verifyProof(proof)

Readme

Keywords

none

Package Sidebar

Install

npm i @semaphore-protocol/core

Weekly Downloads

100

Version

4.0.0-beta.9

License

MIT

Unpacked Size

6.59 kB

Total Files

15

Last publish

Collaborators

  • vplasencia
  • cedoor