Files
Vivian Plasencia 1dc597a175 chore: v4.14.0
2025-10-27 11:21:28 +01:00
..
2025-10-27 11:21:28 +01:00

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)