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

@subetha/provider

v0.1.0

Published

Provider-side scheme server, payment handler, offer validation, and facilitator HTTP client for the SubEtha x402 payment scheme.

Readme

@subetha/provider

Provider-side scheme server, payment handler, offer validation, and facilitator HTTP client for the SubEtha x402 payment scheme.

Install

npm install @subetha/provider @x402/core

@x402/core is a peer dependency (type-level integration with the official x402 server interfaces). @subetha/x402-scheme is installed automatically as a regular dependency.

Requires Node.js >= 20 (ESM).

Usage

Mount the SubEtha scheme server and payment handler into your own API, pointing them at an externally reachable SubEtha Facilitator service (this package does not start one):

import {
  SubethaFacilitatorClient,
  SubethaSchemeServer,
  subethaHandler,
} from "@subetha/provider";

// HTTP client for your Facilitator (x402 /verify /settle /supported + SubEtha's
// POST /challenge extension, which mints the one-time burn address per offer).
const facilitator = new SubethaFacilitatorClient("https://facilitator.example.com");

// Scheme server for "subetha-zerc20" — structurally implements the official
// x402 SchemeNetworkServer, so it plugs into @x402/core server middleware.
const schemeServer = new SubethaSchemeServer(facilitator);

// Wrap a return-value resource handler into an Express-compatible route handler.
app.post(
  "/api/complete",
  subethaHandler(async (req) => ({ body: { answer: 42 } })),
);

How the packages relate

  • @subetha/x402-scheme — shared scheme types, the client-side payload builder, and fee parsing. It is the leaf of the dependency chain.
  • @subetha/provider (this package) — the provider (resource-server) side: scheme server, payment handler, offer validation, and an HTTP client for a SubEtha Facilitator.

The provider talks to a SubEtha Facilitator as an external HTTP service — these packages include no Facilitator runtime or backend and do not enable launching one. The end-to-end private settlement path additionally requires a running Facilitator and the official zERC20 toolchain, which are not part of these packages.

Documentation

  • Protocol: https://github.com/peaceandwhisky/SubEtha/blob/main/docs/PROTOCOL.md
  • Facilitator: https://github.com/peaceandwhisky/SubEtha/blob/main/docs/FACILITATOR.md
  • Fees: https://github.com/peaceandwhisky/SubEtha/blob/main/docs/FEES.md
  • Repository README: https://github.com/peaceandwhisky/SubEtha#readme

License

SubEtha's own code (this package) is licensed under Apache-2.0 (see LICENSE, NOTICE).

The end-to-end private-settlement path additionally depends on the official zERC20 toolchain (@zerc20/sdk and the zERC20 contracts), which is licensed under BUSL-1.1 with Additional Use Grant = None and is not included in this package. Production or commercial use of that toolchain requires a commercial license obtained directly from the zERC20 licensor; installing this package grants no such right. This package does not claim any official partnership, certification, or endorsement by the zERC20 team.