mirror of
https://github.com/privacy-scaling-explorations/zk-kit.git
synced 2026-04-22 03:00:15 -04:00
Former-commit-id: f63c82db4edc272f349910170078021c66f972f8 [formerly de3f20005a]
Former-commit-id: 10e93ddcceb40697ebeac8049a7bb7b254eab3c8
Semaphore identities
Library for managing identites for Semaphore and Rln protocols.
🛠 Install
npm or yarn
Install the @libsem/identity package with npm:
npm i @libsem/identity
or yarn:
yarn add @libsem/identity
📜 Usage
Import
import { ZkIdentity, Identity } from "@libsem/identity"
const { ZkIdentity } = require("@libsem/identity")
Mainpulation
const identity: ZkIdentity = new ZkIdentity();
const identityCommitment: bigint = identity.genIdentityCommitment();
Serialization
const identity: ZkIdentity = new ZkIdentity();
const serialized: string = identity.serializeIdentity()
const unserialized: ZkIdentity = ZkIdentity.genFromSerialized(serialized);