🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@zk-kit/identity

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zk-kit/identity

Library for managing identities for Semaphore and RLN protocols.

latest
Source
npmnpm
Version
1.4.1
Version published
Maintainers
2
Created
Source

ZK identities

Library for managing identities for Semaphore and RLN protocols.

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

🗣️ Chat & Support   |   📘 Docs

🛠 Install

npm or yarn

Install the @zk-kit/identity package with npm:

npm i @zk-kit/identity

or yarn:

yarn add @zk-kit/identity

📜 Usage

Creating an identity with a random strategy:

import { ZkIdentity } from "@zk-kit/identity"
// const { ZkIdentity } = require("@zk-kit/identity") // with commonJS

const identity = new ZkIdentity()

const trapdoor = identity.getTrapdoor()
const nullifier = identity.getNullifier()
const secret = identity.getSecret()
const multipartSecret = identity.getMultipartSecret()

const identityCommitment = identity.genIdentityCommitment()

Creating an identity with a message strategy:

import { ZkIdentity, Strategy } from "@zk-kit/identity"

const identity = new ZkIdentity(Strategy.MESSAGE, "message")

Creating an identity with a serialized strategy:

import { ZkIdentity, Strategy } from "@zk-kit/identity"

const identity = new ZkIdentity()
const serializedIdentity = identity.serializeIdentity()

const identity2 = new ZkIdentity(Strategy.SERIALIZED, serializedIdentity)

FAQs

Package last updated on 10 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts