npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@kashscript/identity-zkp

v0.2.2

Published

Zero-knowledge primitives for did:kash — selective disclosure via Merkle commitments, plus a Web Worker-dispatched prover/verifier for Groth16 / PLONK circuits.

Readme

@kashscript/identity-zkp

Zero-knowledge primitives for did:kash. Selective disclosure via Merkle commitments + a Web-Worker-dispatched prover/verifier for Groth16 / PLONK circuits.

⚠ Partial Schedule B. The Merkle / selective-disclosure layer is permissive. The SNARK prover is a Commercial component requiring a paid Plan for Production Use. See LICENSE.

bun add @kashscript/identity-zkp @kashscript/identity-core
# optional: snarkjs as a peer dep for the prover
bun add snarkjs

Two layers, two licences

| Layer | Licence | Purpose | |---------------------------------|---------------|------------------------------------------------------| | Selective disclosure (Merkle) | Permissive | Prove one field of a DID Document without revealing the rest | | SNARK prover (Groth16 / PLONK) | Commercial | Generate succinct proofs of arbitrary predicates over identity data |

Most apps need only the Merkle layer; the SNARK prover is for compliance attestations, age-gating, KYC-once-prove-many flows, and similar high-assurance use cases.


Quickstart — selective disclosure

import { commitDocument, openCommitment } from "@kashscript/identity-zkp/disclosure";

// Holder: commit to the full DID Document, share only the commitment
const commitment = commitDocument(myDidDocument);

// Verifier: ask for a specific field
const proof = openCommitment(myDidDocument, commitment, ["country"]);

// Verifier: verify just that field
const ok = verifyOpening(commitment, proof);   // true iff country was in the original doc

The verifier learns only the requested field + a proof of inclusion in the original document — nothing about any other field.


Quickstart — SNARK proving (Commercial)

import { Worker } from "node:worker_threads";
import { ProverClient } from "@kashscript/identity-zkp/prover";

const prover = new ProverClient({
  worker: new Worker(new URL("@kashscript/identity-zkp/worker", import.meta.url)),
});

const proof = await prover.prove("age-over-18", { dob: "1992-05-14" });

The worker dispatch is mandatory: SNARK proving is CPU-expensive and must not block the main thread. The worker uses snarkjs under the hood (peer dep, optional install).


What's in the box

| Subpath | Purpose | |----------------------------------------|----------------------------------------------------| | @kashscript/identity-zkp | Default — re-exports Merkle + prover | | @kashscript/identity-zkp/merkle | Merkle tree primitives | | @kashscript/identity-zkp/disclosure | Selective-disclosure commit / open / verify | | @kashscript/identity-zkp/prover | SNARK prover client (Commercial) | | @kashscript/identity-zkp/verifier | SNARK verifier — permissive | | @kashscript/identity-zkp/worker | Web-Worker entry point for the prover | | @kashscript/identity-zkp/circuits | Bundled circuits (age-over-18, country-in-set, …) | | @kashscript/identity-zkp/errors | Typed error classes |


Licensing

See LICENSE. The licence file inlines the SSLA Schedule B terms that apply to the SNARK prover. The Merkle layer is at-least-as- permissive as Apache-2.0.