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

@forgemeshlabs/pay-per-crawl-core

v0.1.2

Published

Pay-per-Crawl core: crawler classifier, x402 v1/v2 + MPP 402 challenges, facilitator verify/settle, discovery files. Runs on Node 20+, Cloudflare Workers and the Next.js edge runtime.

Readme

@forgemeshlabs/pay-per-crawl-core

Framework-neutral engine for x402 / MPP pay-per-crawl. Web-standard Request/Response; runs on Node 20+, Cloudflare Workers and the Next.js edge runtime. One runtime dependency (@noble/hashes, for keccak256 and HMAC).

npm install @forgemeshlabs/pay-per-crawl-core
import { createGate, dohResolver } from "@forgemeshlabs/pay-per-crawl-core";

const gate = createGate({
  payTo: "0xYourWallet", priceUsd: 0.01, mode: "gate",     // "monitor" logs only
  resolver: dohResolver(),                                  // rDNS for search engines (or nodeResolver())
  trustHeader: "cf-connecting-ip",                          // see "Trusted client IP" in the root README
});

const disc = gate.discovery(request);        // /.well-known/x402.json, /llms.txt, /agents.txt
if (disc) return disc;
const r = await gate.handle(request, { ip });
if (r.type === "respond") return r.response; // 402 / 403
// r.headers: Link + payment receipts, add them to the response you serve

Options

payTo, priceUsd (min 0.005), mode (monitor | gate), facilitatorUrl (default PayAI), facilitatorAuth, classPolicy, botOverrides, allowPaths, gateAssets, gateAllMethods, discovery, siteName, siteDescription, contact, llmsLinks, mppSecret, trustHeader, baseUrl, store, resolver, fetch, catalog, onEvent. A bad config (no wallet in gate mode, price under the floor) downgrades safely and logs a warning instead of throwing.

parseConfig(env) maps PAY_TO, PRICE_USD, MODE, FACILITATOR_URL, CLASS_POLICY (JSON), BOT_OVERRIDES (JSON), ALLOW_PATHS, TRUST_HEADER, MPP_SECRET, SITE_NAME, BASE_URL, GATE_ASSETS, DISCOVERY onto these options. Set MPP_SECRET to a long random string.

Pieces

  • classify(ua, headers, ip, {resolver, store, catalog}) with the 85-agent catalog and rDNS verification. dohResolver() (DNS-over-HTTPS, works anywhere) or nodeResolver() from @forgemeshlabs/pay-per-crawl-core/node-dns (Node only).
  • X402 class: envelopeV2, bodyV1, mppChallenge, extractPayment, precheck, verifyAndSettle, mppReceipt.
  • memoryStore(), kvStore(kvNamespace): replay lock and rDNS cache. KV is eventually consistent, so the lock is best effort; the on-chain EIP-3009 nonce is the hard guard against double spend.
  • createProReporter({key, site, store}): optional batched reporting to the hosted dashboard. Never required.

How money flows

Payments go from the crawler to payTo. The facilitator only relays the signed authorization. No account, no custody, no revenue share.

MIT.