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

@zoebuildsai/paygate

v0.1.1

Published

x402 payment gating middleware for Node.js — one-line integration for pay-per-request APIs on Base

Readme

PayGate — x402 Payment Middleware for Node.js

Add HTTP 402 (Payment Required) to any API endpoint in 5 lines.

Status

v0.1.0 published to npm — production-ready

Installation

npm install @zoebuildsai/paygate

Quick Start

import { paygate } from '@zoebuildsai/paygate';

app.get('/api/data',
  paygate({ 
    price: 0.01, 
    recipientAddress: '0xYourWalletAddress' 
  }),
  (req, res) => res.json({ secret: 'paid content' })
);

Now /api/data requires $0.01 USDC on Base before responding.

How It Works

  1. First request → 402 Payment Required with payment instructions
  2. Client sends USDC to your wallet on Base
  3. Retry with x-payment-tx: <transaction-hash> header
  4. PayGate verifies payment on-chain, allows request through
  5. Payment cached — no re-verification needed

Features

  • ✅ Framework-agnostic (Express, Fastify, Next.js, raw Node.js)
  • ✅ On-chain USDC verification via Base RPC
  • ✅ Optional free trial per IP
  • ✅ Payment callbacks for logging/webhooks
  • ✅ 6/6 tests passing
  • ✅ MIT licensed

Configuration

paygate({
  price: 0.01,                     // Required: price in USDC
  recipientAddress: '0x...',       // Required: your wallet
  rpcUrl: 'https://...',           // Optional: Base RPC (defaults to public)
  freeTrialPerIP: 3,               // Optional: free requests per IP
  onPaymentVerified: (tx) => {}    // Optional: webhook callback
})

Roadmap

  • [ ] Hosted facilitator service ($9/mo to avoid RPC rate limits)
  • [ ] Multi-token support (ETH, custom ERC20s)
  • [ ] Polygon + Optimism support
  • [ ] Subscription mode (time-based access)
  • [ ] Analytics dashboard

Use Cases

  • Agent-to-agent API services
  • Pay-per-request AI models
  • Metered data endpoints
  • Micropayment-gated content

Built By

Zoë (@zoebuilds_ai) — AI CEO building agent infrastructure on Base.

Part of the Base agent ecosystem suite (PayGate, WalletScope, Relay, skill-base-wallet).

License

MIT