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

@junglo/paywall-core

v0.1.0

Published

Charge AI crawlers and QR-paywall humans on any site: pure pricing core (price/gate/license), x402 payment middleware for Hono/Workers, QR paylinks, RSL + Content-Signal feed generation.

Readme

@junglo/paywall-core

Charge AI crawlers and QR-paywall humans on any site — in about 5 lines.

A pure, dependency-light core for the two-lane paywall:

  • Bot lane: HTTP 402 challenges per the x402 protocol — verified crawlers pay per crawl in USDC, straight to the creator's wallet. Unverified scrapers get nothing.
  • Human lane: QR / payment-link paywalls on the creator's own rail (e.g. Stripe Payment Links) — 100% of content revenue passes through, never touching your platform.
  • Licensing lane: RSL feed + Content-Signal robots.txt/headers, generated from the same pricing rules that enforce the paywall — the license never lies.

Runs on Cloudflare Workers, Bun, Node. Pure core has zero dependencies; edges add only uqr (QR) and a hono peer (middleware).

Install

bun add @junglo/paywall-core hono

The 5 lines

import { Hono } from "hono";
import { price, x402Middleware } from "@junglo/paywall-core";

const app = new Hono();
app.use("/article/:id", x402Middleware({
  terms: (c) => price(lookup(c.req.param("id")), { kind: "bot", verified: true }, "x402"),
}));
app.get("/article/:id", (c) => c.text("the premium words"));
export default app;

Crawlers without payment get 402 + machine-readable terms; with a valid X-PAYMENT they get content plus an X-PAYMENT-RESPONSE settlement receipt.

The pure core

// What does this class of accessor owe? (policy — no I/O, no session)
price(content, accessor, lane) → Terms
//   lanes: "human" | "x402" (bot, 402/USDC) | "ppc" (Cloudflare Pay Per Crawl, settled upstream)
//   Terms: allow | blocked | payment-required (paylink/x402) | subscription-required

// Has this visitor already paid? (session resolution)
gate(session, terms) → { allowed, reason, terms }

// Machine-readable licensing derived from the same terms
license(content, terms) → RSLFragment

Pricing models per content: humans — free, paid (one-off paylink), subscription, archive-paywall (free while fresh, paywalled after N days); bots — blocked, free, per-crawl (x402, USDC to the creator's wallet). Unverified bots (Web Bot Auth fails) never reach a payment lane.

The edges

x402Middleware({ terms, facilitator?, network?, settle? })  // Hono/Workers middleware
httpFacilitator(url)   // adapter for any x402 facilitator (/verify, /settle)
qrPaylink(url)         // checkout URL → { url, svg } — Workers-safe QR
rslFeed(catalog, opts) // → { xml, robotsTxt, headers } for the whole site
  • Defaults target base-sepolia (testnet) via the public x402.org facilitator; set network: "base" (+ your facilitator) for production USDC.
  • The facilitator is pluggable — a small verify/settle interface. Use ours, your own, or wire in the official x402-hono middleware instead; price()/gate() don't care.
  • Settlement happens after the content is served; a failed settle replaces the response with a fresh 402.

First consumer

apps/paywall-demo in this repo: one Hono worker exposing a paid /article (402 → pay-per-crawl), a /buy page with a QR to the creator's Stripe Payment Link, /rsl.xml and /robots.txt. Runs locally with bun run dev, deploys unchanged with wrangler deploy.

Honesty notes

  • x402, RSL and Content Signals are young, fast-moving standards (2025–26). The protocol shapes here follow x402 v1 and are covered by tests against a mock facilitator; re-verify against live facilitators before production money flows.
  • Money is integer minor units (cents). The x402 lane is USD/USDC only (6-decimal atomic conversion built in).
  • This package prices and challenges; it does not store sessions, entitlements or keys — that's your app (or the PUB£¥$H€R platform, its first big consumer).

License

MIT © junglostore