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

zkrune-sdk

v1.2.1

Published

JavaScript SDK for zkRune - Generate zero-knowledge proofs with Zcash's Groth16 technology

Readme

zkrune-sdk

JavaScript SDK for zkRune - Generate zero-knowledge proofs in your app.

Installation

npm install zkrune-sdk
# or
yarn add zkrune-sdk

Quick Start

import { generateProof, templates } from 'zkrune-sdk';

// Generate an age verification proof
const result = await generateProof({
  templateId: templates.AGE_VERIFICATION,
  inputs: {
    birthYear: '1995',
    currentYear: '2024',
    minimumAge: '18'
  }
});

if (result.success) {
  console.log('Proof generated!', result.proof);
  console.log('Time taken:', result.timing, 'ms');
}

Features

  • Browser & Node.js compatible
  • Real Groth16 zk-SNARKs
  • 13 ready-to-use templates
  • Client-side proof generation
  • TypeScript support
  • Zero dependencies (except snarkjs)
  • Zcash-powered privacy

Available Templates

Identity & Access

  • age-verification - Prove age without revealing exact date
  • credential-proof - Prove valid credentials without revealing data
  • membership-proof - Prove membership without identity

Financial

  • balance-proof - Prove minimum balance without amount
  • token-swap - Prove sufficient balance for swap anonymously
  • range-proof - Prove value in range without exact number

Governance

  • private-voting - Vote anonymously with proof
  • quadratic-voting - Fair governance voting with quadratic weighting

Cryptography & Advanced

  • hash-preimage - Prove you know secret X where hash(X) = Y
  • signature-verification - Verify signatures without revealing private key
  • patience-proof - Prove you waited a time period
  • nft-ownership - Prove NFT ownership without revealing which NFT
  • anonymous-reputation - Prove reputation score exceeds threshold

API Reference

generateProof(options)

Generates a zero-knowledge proof.

Parameters:

  • templateId (string) - Template identifier
  • inputs (object) - Input values for the circuit
  • circuitPath (string, optional) - Custom circuit path

Returns: Promise<ZKProofResult>

verifyProof(params)

Verifies a zero-knowledge proof.

Parameters:

  • proof - The Groth16 proof object
  • publicSignals - Public signals array
  • verificationKey - Verification key object

Returns: Promise<boolean>

Examples

Balance Proof

import { generateProof, templates } from 'zkrune-sdk';

const proof = await generateProof({
  templateId: templates.BALANCE_PROOF,
  inputs: {
    balance: '10000',
    minimumBalance: '5000'
  }
});

Membership Proof

const proof = await generateProof({
  templateId: templates.MEMBERSHIP_PROOF,
  inputs: {
    memberId: '123456',
    groupHash: '999'
  }
});

NFT Ownership Proof

const proof = await generateProof({
  templateId: templates.NFT_OWNERSHIP,
  inputs: {
    nftId: '42',
    collectionId: '100'
  }
});

Quadratic Voting

const proof = await generateProof({
  templateId: templates.QUADRATIC_VOTING,
  inputs: {
    voteCount: '5',
    credits: '25'
  }
});

Links

License

MIT