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

supra-x402

v0.1.0

Published

Official x402 v2 payment support for the Supra Network: the `exact` scheme (client + server + facilitator), DX helpers, and wallet signers.

Readme

supra-x402

Official x402 v2 payment support for the Supra Network.

Pay any HTTP API with signed, on-chain-settled payments on Supra — gasless or self-paid, from agents, servers, or wallets. Built on @x402/core v2, so it interoperates with the standard x402 ecosystem.

npm i supra-x402 @x402/core @x402/fetch
  • exact scheme for Supra's Move VM — Ed25519 signatures, BCS transfer authorizations, verified/settled against Supra RPC (no EIP-3009; that's EVM-only).
  • Coin and Fungible Asset assets; sponsored (gasless) and self-paid gas.
  • Off-chain relay — no Move contract to deploy or audit. Replay-protected by sequence number, expiry by transaction timeout.
  • DX: server helper for Next.js/Express/Hono middleware, a React hook, and raw-key + wallet signers.

Networks

| CAIP-2 | Network | Chain id | | --------- | ------- | -------- | | supra:6 | testnet | 6 | | supra:8 | mainnet | 8 |

Accept payments (server)

createSupraResourceServer returns a server that plugs into the official framework middleware:

// Next.js middleware.ts
import { paymentMiddleware } from "@x402/next";
import { createSupraResourceServer } from "supra-x402/server";

export const middleware = paymentMiddleware(
  { "/api/report": { price: "0.10", network: "supra:6" } },
  createSupraResourceServer({ facilitatorUrl: "https://supra-x402-facilitator.vercel.app" }),
);
export const config = { matcher: ["/api/report"] };

@x402/express and @x402/hono work the same way — pass the same server to their paymentMiddleware.

Pay (client / agent)

import { x402Client } from "@x402/core/client";
import { wrapFetchWithPayment } from "@x402/fetch";
import { registerSupraExact, keySignerFromPrivateKey } from "supra-x402/client";

const client = registerSupraExact(new x402Client(), {
  network: "supra:6",
  signer: keySignerFromPrivateKey(process.env.SUPRA_PRIVATE_KEY!),
});

const res = await wrapFetchWithPayment(fetch, client)("https://api.example.com/api/report");

React

"use client";
import { usePayWithX402 } from "supra-x402/react";

const { payJson } = usePayWithX402({ signer, network: "supra:6" });
const data = await payJson("/api/report");

Run a facilitator

import { x402Facilitator } from "@x402/core/facilitator";
import { createSupraClient, SupraExactFacilitator, SupraFacilitatorSigner } from "supra-x402";
import { SupraAccount, HexString } from "supra-ts-sdk";

const signer = new SupraFacilitatorSigner({
  accounts: [new SupraAccount(HexString.ensure(process.env.FEE_PAYER_KEY!).toUint8Array())],
  clients: { "supra:6": createSupraClient("supra:6") },
});
const facilitator = new x402Facilitator().register(["supra:6"], new SupraExactFacilitator(signer));
// expose facilitator.verify / .settle / .getSupported over /verify /settle /supported

Exports

| Import | Contents | | ------ | -------- | | supra-x402 | scheme classes, signer, createSupraClient, address/transfer/codec helpers, constants | | supra-x402/client | registerSupraExact, SupraExactClient, key signer | | supra-x402/server | createSupraResourceServer, createSupraFacilitatorClient, SupraExactServer | | supra-x402/react | usePayWithX402 | | supra-x402/wallets | keySignerFromPrivateKey, browserWalletSigner |

Security

The facilitator verifies the payer's Ed25519 signature over the exact Supra signing message and decodes the transfer entry function to confirm recipient, amount, and asset before broadcasting — it can never broadcast anything but the exact transfer the requirement demands. See the threat model.

License

MIT © Entropy Foundation