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 🙏

© 2025 – Pkg Stats / Ryan Hefner

zkpjwt-core

v0.1.1

Published

Zero-Knowledge Proof access control for Web3 - Privacy-preserving wallet allowlists using ZK proofs and Merkle trees on Arbitrum Stylus

Readme

🔐 ZKPJWT Core

Zero-Knowledge Proof JSON Web Token - Privacy-preserving access control for Web3

npm version License: MIT

ZKPJWT enables privacy-preserving wallet allowlists using Zero-Knowledge Proofs and Merkle trees. Verify membership without revealing which specific address you are.

Built with Arbitrum Stylus (Rust → WASM) for 10x cheaper gas costs.

🌟 Features

  • 🛡️ Zero-Knowledge Proofs: Groth16 proving system with BN254 curve
  • 🌳 Merkle Trees: Poseidon hash-based trees (up to 1024 addresses)
  • Arbitrum Stylus: ~21K gas per verification (94% cheaper than Solidity)
  • 🔒 Privacy-First: Prove membership without revealing your address
  • 🎯 Hybrid Verification: Full client-side verification + cheap on-chain check
  • 📦 TypeScript: Full type safety and modern DX

📦 Installation

npm install zkpjwt-core

🚀 Quick Start

import { 
  MerkleTreeBuilder, 
  ProofGenerator, 
  ProofVerifier,
  ContractClient 
} from 'zkpjwt-core';

// 1. Build Merkle tree from authorized addresses
const builder = new MerkleTreeBuilder({ levels: 10 });
await builder.initialize();
const tree = await builder.buildTree(addresses);

// 2. Generate ZK proof for your address
const merkleProof = builder.getMerkleProof(yourAddress);
const prover = new ProofGenerator();
const zkProof = await prover.generateProof(merkleProof);

// 3. Verify proof client-side (full Groth16 verification)
const verifier = new ProofVerifier();
const isValid = await verifier.verifyProof(zkProof);

// 4. Verify on-chain (cheap root check only)
const client = new ContractClient();
await client.connectWallet(privateKey);
const onChainValid = await client.verifyProof(zkProof.merkleRoot);

🎯 Use Cases

  • NFT Allowlists: Private mint eligibility without revealing wallet
  • DAO Voting: Anonymous voting while proving membership
  • Token Gating: Access control without exposing token holdings
  • DApp Access: Private authentication for Web3 apps

🏗️ Architecture

ZKPJWT uses a hybrid verification approach:

  1. Client-side: Full Groth16 pairing checks (cryptographically secure)
  2. On-chain: Simple Merkle root comparison (94% cheaper gas)

This gives you maximum security at minimum cost.

📊 Gas Costs

| Operation | Solidity | Stylus | Savings | |-----------|----------|--------|---------| | Full Groth16 Verify | ~350K | N/A | - | | Hybrid Verify | N/A | ~21K | 94% |

🔗 Links

  • 🌐 Website: https://zkpjwt.vercel.app
  • 📘 Documentation: https://zkpjwt.vercel.app/#docs
  • 🔐 Smart Contract: 0xa0539e9c...6496
  • 💻 GitHub: https://github.com/DevCristobalvc/zkp-jwt
  • 🎯 Live Demo: https://zkpjwt.vercel.app/#demo

🛠️ API Reference

MerkleTreeBuilder

Build Poseidon-based Merkle trees from address lists.

ProofGenerator

Generate Groth16 zero-knowledge proofs for Merkle membership.

ProofVerifier

Verify ZK proofs client-side with full pairing checks.

ContractClient

Interact with the Arbitrum Stylus contract for on-chain verification.

🏆 Built For

Arbitrum Global ARG25 Hackathon - November 2025

Leveraging Arbitrum Stylus for next-generation ZK infrastructure.

👨‍💻 Author

Cristobal Valencia (@DevCristobalvc)

  • GitHub: https://github.com/DevCristobalvc
  • npm: https://www.npmjs.com/~devcristobalvc
  • Email: [email protected]

📄 License

MIT © 2025 Cristobal Valencia


Built with ❤️ for Arbitrum Stylus