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

@parad0x_labs/openclaw-x402-pay

v2.0.0

Published

Self-custody x402 payments for OpenClaw agents on Solana. Your agent pays for x402-gated APIs, data, and other agents — you bring your own signer, so the skill never holds a private key — with a hard spend cap. Real-money mainnet is opt-in (set allowMainn

Readme

openclaw-x402-pay — self-custody x402 payments for OpenClaw agents

💜 If it earns its keep, star openclaw-skills — stars are how agent builders find it. (ClawHub listing: pending publish.)

Give your agent one tool — pay_x402 — that fetches an x402-gated URL and, if it answers HTTP 402 Payment Required, pays for it on Solana and returns the resource. Pairs with x402-gate (the charging side) to form the full agent-to-agent payment loop on a rail that's live on Solana mainnet — settlement is a standard SPL USDC transfer (mainnet USDC mint EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v) with the receipt hash carried in a Memo. There is no custom settlement program to trust — just the SPL Token and Memo programs.

Trust model — read this first

  • Bring your own signer. You supply an X402Signer (wallet adapter, hardware signer, KMS). The skill builds an unsigned transaction, hands it to your signer, and broadcasts the signed bytes. It never holds, requests, or reads a private key.
  • Devnet by default. Real-money mainnet payments require allowMainnet: true.
  • Hard spend cap. maxAmountUsdc is enforced before any transaction is built. A 402 demanding more is refused.
  • Minimal network surface. Talks only to your configured Solana RPC and the target URL. No telemetry, no third-party calls.
  • Protocol fee (0.05%). Each payment adds a second leg — a 5 bps transfer to the network treasury — in the same atomic transaction as the seller payment, so total debit is amount + ceil(amount × 0.05%). The fee and treasury are pinned in code, not taken from the challenge. Non-custodial: it settles directly on-chain. Surfaced as feeUsdc in the result.

Status: Public Beta. Self-custody, with a hard per-payment spend cap and devnet-by-default. Keep balances modest while in beta.

Standalone or together

Part of openclaw-skills. Every skill there is a self-contained module — no imports from sibling skills, own version, own CI lane — so installing, updating, or removing one never breaks another.

  • Standalone: yes — this is the buying side; it works against any x402-compliant endpoint, not just ours.
  • Pairs with: x402-gate on the selling agent — the two reconstruct identical receipt hashes with no shared state, forming the full agent-to-agent payment loop. Optional: context-capsule to keep long paying sessions cheap.

Use it

import plugin, { setX402Signer } from "@parad0x_labs/openclaw-x402-pay";

// Wire YOUR wallet in at startup. The skill only ever gets a serialized tx back.
setX402Signer({
  publicKey: myWallet.publicKey.toBase58(),
  signTransaction: async (txBase64) => myWallet.signSerialized(txBase64), // you sign
});

Then the agent can call the tool:

pay_x402({ url: "https://api.example.com/premium" })
→ { ok, status, body, paymentSignature, receiptHash, amountUsdc, feeUsdc, payTo, network }

Config

{
  "plugins": {
    "entries": {
      "x402-pay": {
        "maxAmountUsdc": 0.50,     // refuse any single payment above this
        "allowMainnet": false,      // true = real money on mainnet
        "rpcUrl": "https://..."     // optional private RPC
      }
    }
  }
}

| Key | Default | Description | |---|---|---| | maxAmountUsdc | 1.0 | Hard per-payment USDC cap, enforced before building any tx | | allowMainnet | false | Must be true to authorize mainnet (real-money) payments | | rpcUrl | public RPC | Optional Solana RPC override |

How a payment flows

  1. pay_x402 fetches the URL. Not a 402 → returns the body, no payment.
  2. On 402: parse the challenge, pick a requirement within the cap and allowed network (else refuse).
  3. Build an unsigned USDC transfer — two legs in one atomic tx: the seller payment and the pinned 0.05% protocol-fee transfer to the treasury (each with an idempotent recipient-ATA create) plus a memo carrying the receipt hash.
  4. Your signer signs it. The skill broadcasts and retries the request with the X-Payment proof header.
  5. Return the resource plus { paymentSignature, receiptHash, amountUsdc, feeUsdc }.

No external @parad0x_labs dependency

The Solana-specific constants and the x402 wire types are vendored inline. Runtime deps are only the well-known @solana/web3.js and @solana/spl-token.

Source

github.com/Parad0x-Labs/openclaw-skills/tree/main/skills/x402-pay