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

zap1-x402-demo

v0.1.0

Published

Reference pattern: ZAP1 attestation layer above any x402 payment rail

Downloads

130

Readme

zap1-x402-demo

Reference implementation showing how ZAP1 attestation layers above any x402 payment rail to produce privacy-preserving "proof of paid access" receipts anchored to Zcash.

What this demonstrates

Given an HTTP service returning 402 Payment Required via the x402 protocol and settling through some rail (e.g. CipherPay / Kenbak), the server emits a ZAP1-attestable receipt that:

  • is deterministically hashed from {payment_hash, amount, timestamp, resource_uri}
  • is submitted as a ZAP1 leaf via @frontiercompute/zap1-attest
  • is periodically anchored to Zcash mainnet via a Merkle root transaction
  • can be independently verified by the original client (or any third party) later
  • reveals no identity linkage (receipt hash only, no client fingerprints)

Files

  • src/server.js — Express server with x402 middleware + ZAP1 receipt emission
  • src/client.js — demo client that pays the 402, receives the receipt, and later verifies it
  • src/receipt_canonicalize.js — deterministic receipt canonicalization (same pattern as hyperdeck trade_attest_hook)

Usage

npm install @frontiercompute/zap1-attest
# (sets ZAP1_API_KEY from https://api.frontiercompute.cash — free trial)
ZAP1_API_KEY=... node src/server.js &
node src/client.js  # pays 402, gets receipt, verifies against Zcash anchor

Architecture

[client]   --(1) GET /resource----->  [server]
[server]   --(2) 402 + x402 instr-->  [client]
[client]   --(3) pay via x402 rail->  [settlement  ]  (e.g. CipherPay)
[client]   --(4) GET + proof------->  [server]
[server]   --(5) emit zap1 leaf---->  [api.frontiercompute.cash]
[api]      --(6) anchor to zcash-->   [zcash mainnet]
[server]   --(7) 200 + receipt_id->   [client]
[any later] --(8) verify------------>  [api /verify/{leaf}]

Steps 3 and 5 are independent — the x402 rail handles settlement, ZAP1 handles the attestation layer above it. A server using this pattern can swap settlement rails (CipherPay, another x402-compatible service) without changing the attestation code.

Status

Reference pattern. Not a deployed service. The primitives (zap1-attest SDK, api.frontiercompute.cash attestation backend) are live and operational. Integration into any specific x402 gateway is a small amount of glue code — this repo shows the glue.

License

MIT.