Files
zk-kit/packages/identity
Andrija Novakovic 7df917e2e8 create identity from message
Former-commit-id: f63c82db4edc272f349910170078021c66f972f8 [formerly de3f20005a]
Former-commit-id: 10e93ddcceb40697ebeac8049a7bb7b254eab3c8
2021-10-25 13:05:07 +02:00
..
2021-10-25 13:05:07 +02:00
2021-10-22 22:13:48 +02:00

Semaphore identities

Library for managing identites for Semaphore and Rln protocols.

Github license NPM version Downloads npm bundle size (scoped) Linter eslint Code style prettier


🛠 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);