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

@p15/compliance

v0.1.0

Published

Protocol15 compliance layer: selective disclosure, verification, one-time burn markers on ZK Compression, and the viewing-key escape hatch

Readme

@p15/compliance

Auditable-when-needed for Solana privacy. The compliance companion to @p15/stealth: prove what you did to a named auditor without handing over a god-key.

Two tiers:

  1. Selective disclosure (disclosure.ts, preferred): a signed, chain-verifiable statement covering a CHOSEN set of transactions, encrypted to a NAMED auditor's meta-address. Scoped, non-live, revocable, non-repudiable. Optional one-time mode burns an on-chain marker on open.
  2. Viewing key (audit.ts, escape hatch): epoch-scoped ElGamal + scan secret — a live "open the books" key for ONE epoch. No viewing key risks funds (the spend scalar never leaves the client).

One-time burn markers run on ZK Compression (markers.ts): opening a one-time disclosure creates a nullifier compressed account at a deterministic address. A second open reverts at the address tree (addresses are unique), so it opens at most once and leaves a public record — no server, no custom program, and a tiny network fee instead of locked rent. Needs a Photon-indexed RPC.

Pre-deposit screening (screening.ts): the ScreeningProvider seam checks the depositor's address at the one boundary where public funds cross into the private layer (makePrivate), without adding a wallet popup — screening is an async pre-check, not a tx. MockScreeningProvider runs offline (CI/devnet/tests); RangeScreeningProvider is the Range Risk API adapter, inert until RANGE_API_KEY / RANGE_API_URL are set. Select with SCREENING_PROVIDER=mock|range.

Install

npm install @p15/compliance @p15/stealth

Examples

1. Build + verify a selective disclosure

import { buildDisclosure, verifyDisclosure } from '@p15/compliance';

// Encrypted to the auditor's scan (x25519) key; signed by the holder's spend scalar.
const envelope = buildDisclosure({ records, auditorPublic: auditor.scanPublic, spendScalar: holder.spendScalar });
const verified = verifyDisclosure(auditor.scanSecret, envelope); // throws if tampered / wrong key

2. One-time disclosure with an on-chain burn

import { buildDisclosure } from '@p15/compliance';

const envelope = buildDisclosure({ records, holderKeys, auditorMetaAddress, oneTime: true });
// envelope carries an `id`; opening burns the marker (example 3).

3. Burn / check the ZK Compression marker

import { openCompressionRpc, isDisclosureOpened, buildBurnDisclosureMarkerIx } from '@p15/compliance';

const rpc = openCompressionRpc(process.env.COMPRESSION_RPC!); // Photon-indexed
if (await isDisclosureOpened(rpc, id)) throw new Error('already opened');
const ix = await buildBurnDisclosureMarkerIx({ rpc, payer: auditorWallet, id });
// sign + send `ix`; a second attempt reverts.

4. Pre-deposit screening

import { getScreeningProvider } from '@p15/compliance';

const provider = getScreeningProvider(); // offline mock by default
const { decision } = await provider.screen({ wallet, mint, amount, direction: 'deposit' });
// decision: 'allow' (proceed) | 'review' (soft notice + proceed) | 'deny' (block)

Runnable examples: npm run example (disclosure + screening round-trip), npm run example:disclosure, npm run example:screening, npm run example:marker (env-gated devnet).

Local development

Not published yet — consumed locally via file: (see docs/local-dev.md). Depends on @p15/stealth; build that first.

npm install --legacy-peer-deps
npm test                  # unit (offline)
npm run test:integration  # Range API — RUN_RANGE=1 + creds, else skipped
npm run build

Devnet only. Not for real funds.

Devnet only. Not for real funds.