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

@privacy-protocol/beacon

v0.1.1

Published

Client SDK for the Beacon ZK proof oracle — generate membership proofs and verify them on-chain via the VerifierHub.

Readme

@privacy-protocol/beacon

Client SDK for the Beacon ZK proof oracle. Generate membership proofs in the browser or Node and hand the (proof, publicInputs) straight to your consumer contract via VerifierHub.verify. Proving runs locally — secrets never leave the device.

Install

npm install @privacy-protocol/beacon @noir-lang/[email protected] @aztec/[email protected]

The two proving libraries are peer dependencies pinned to exact versions — they must match the versions the deployed verifier was built with, or proofs won't verify on-chain. Do not bump them independently of the deployed catalog circuit.

Usage

import { proveMembershipFromWitness, MEMBERSHIP_ID } from "@privacy-protocol/beacon";

// `scope` binds the proof to your app context (e.g. your contract address or a proposal id).
const { proof, publicInputs } = await proveMembershipFromWitness({
  scope: myContractAddress,        // bytes32 / bigint / hex
  secret,                          // the member's private identity secret
  leafIndex,                       // their position in the tree
  siblingPath,                     // their Merkle path (from the published member set)
  root,                            // the on-chain membership root
});

// publicInputs = [scope, root, nullifier]
await myGate.doGatedAction(proof, publicInputs); // your contract calls hub.verify(MEMBERSHIP_ID, ...)

Demo / small-group helper (one party holds all secrets):

import { proveMembershipFromSecrets } from "@privacy-protocol/beacon";
const res = await proveMembershipFromSecrets({ scope, secrets, voterIndex });

API

| Export | Purpose | | --- | --- | | proveMembershipFromWitness | Prove from a member's own witness (secret + sibling path). The production path. | | proveMembershipFromSecrets | Build the tree from all secrets + prove for one index (demo/small group). | | MEMBERSHIP_ID, CATALOG | On-chain circuit ids (match CircuitRegistry.circuitId). Pin these in your contract. | | circuitId(name, version) | Compute a circuit id, identical to the on-chain registry. | | createIdentity, computeLeaf, computeNullifier | Identity + commitment + nullifier helpers. | | buildMembershipTree, buildMembershipTreeFromLeaves | Poseidon2 Merkle tree (depth 32) + sibling paths. | | toBytes32, toField, requireField, poseidon2 | Field / hashing utilities. |

Develop

npm run typecheck
npm run smoke   # proves the demo inputs, checks deterministic outputs, writes the Foundry fixture
npm run build

npm run smoke writes a real proof to ../test/fixtures/membership_valid.json; running forge test in beacon/ then confirms the SDK's proof verifies against the on-chain verifier.

Toolchain: TypeScript 6 · viem 2 · @noir-lang/noir_js 1.0.0-beta.16 · @aztec/bb.js 3.0.0-nightly.20251104.