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

@receptum/server

v0.2.1

Published

Seller-side x402 middleware for Fastify and Express: price a route, answer HTTP 402, verify payment, issue receipts.

Readme

@receptum/server

Sell one job per request over x402 and return a seller-signed Receptum receipt with every result.

handlePaidJob(getHeader, run, config) answers 402 with x402 requirements, verifies the buyer's payment, runs your job, settles, and returns the output with PAYMENT-RESPONSE, Receptum-Receipt (base64url JSON) and Receptum-Receipt-Hash. If settlement fails, the output is withheld. Pass an anchor (EVM, XRPL or Stellar) to commit the receiptHash on-chain. Pass bindings (account bindings, SPEC §4.1) to attach proof that your did:key controls payTo; with bindingVerifiers the server checks them before settlement and refuses to charge if they don't cover the payee, or if the covering binding expires within BINDING_EXPIRY_MARGIN_SECONDS (300 s) of the receipt's deliveredAt. deliveredAt is fixed once, before settlement, and used in the final receipt, so a binding valid at the preflight also covers the receipt the buyer receives.

Bring an initialized x402ResourceServer with the schemes you accept. See examples/toy-renderer.

Mainnet x402 networks (opt-in)

Testnets are the default. To sell on a mainnet, register it explicitly with a mainnet facilitator you configure — there is no default mainnet facilitator — and opt in:

import { HTTPFacilitatorClient, x402ResourceServer } from "@x402/core/server";
import { ExactEvmScheme } from "@x402/evm/exact/server";
import { facilitatorUrlFor, handlePaidJob } from "@receptum/server";

const mainnet = {
  facilitators: { "eip155:8453": process.env.X402_FACILITATOR_URL! },
  allowMainnet: true,
};
const x402 = new x402ResourceServer(
  new HTTPFacilitatorClient({ url: facilitatorUrlFor("eip155:8453", mainnet) }),
).register("eip155:8453", new ExactEvmScheme());
await x402.initialize();

await handlePaidJob(getHeader, run, {
  x402,
  accepts: [{ scheme: "exact", network: "eip155:8453", payTo, price: "$0.25" }],
  allowMainnet: true, // or RECEPTUM_ALLOW_MAINNET=1
  resource,
  seller,
});

facilitatorUrlFor(network, config) returns https://x402.org/facilitator (X402_TESTNET_FACILITATOR_URL) for testnets only; for a mainnet it needs both facilitators[network] (https) and the opt-in. handlePaidJob throws MainnetNotAllowedError before quoting or charging when an accepts option is on a mainnet without allowMainnet. x402 exact moves funds buyer → seller directly; no Receptum contract holds money. See docs/MAINNET.md.