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

@limen-pay/node

v0.1.0-alpha.1

Published

x402 paywall for AI agent traffic. Drop-in middleware + standalone proxy for Express, Fastify, Hono, and Next.js. USDC on Base and Solana.

Downloads

131

Readme

@limen/node

x402 paywall middleware + standalone proxy for Node.js. USDC on Base and Solana. Drop-in for Express, Fastify, Hono, and Next.js.

npm license


Install

npm i @limen/node
# or
pnpm add @limen/node
# or
yarn add @limen/node

Runtime requirements: Node.js 20.10+.


Quickstart (Express)

import express from 'express';
import Redis from 'ioredis';
import {
  BaseAdapter,
  RedisNonceStore,
  RedisRateLimiter,
  DefaultComplianceScreen,
  FacilitatorClient,
  createLogger,
} from '@limen/node';
import { limen } from '@limen/node/express';

const redis = new Redis(process.env.REDIS_URL!);

const app = express();
app.use(
  limen({
    config: {
      version: 1,
      wallets: { base: process.env.LIMEN_WALLET_BASE! },
      defaults: {
        chain: 'base',
        currency: 'USDC',
        confirmations: 2,
        payment_ttl_seconds: 300,
        facilitator: 'coinbase',
      },
      endpoints: [{ path: '/api/v1/*', price_usdc: '0.001' }],
      rate_limits: [{ scope: 'wallet', limit: 600, window_seconds: 60 }],
      cache: { enabled: true, driver: 'redis', default_ttl_seconds: 60, rules: [] },
      compliance: { sanctions_screening: true, geo_blocklist: [], travel_rule_threshold_usd: 3000 },
      webhooks: [],
      discovery: { listed: false, categories: [] },
      advanced: {
        upstream_timeout_ms: 15_000,
        verifier_timeout_ms: 4_000,
        max_request_body_mb: 5,
        trust_proxy: true,
        proxy_protocol: false,
        log_bodies: false,
        facilitator_url: 'https://x402.org/facilitator',
        facilitator_failover_seconds: 300,
        solana: { priority_fee_percentile: 75, use_lookup_table: false, commitment_finalized_threshold_usd: 100 },
        base: { gas_multiplier: 1.25, high_value_threshold_usd: 1000 },
      },
    },
    adapters: {
      base: new BaseAdapter({
        chainId: 'base',
        rpcUrl: process.env.LIMEN_BASE_RPC_URL!,
        receivingWallet: process.env.LIMEN_WALLET_BASE!,
      }),
    },
    nonceStore: new RedisNonceStore(redis),
    rateLimiter: new RedisRateLimiter(redis),
    compliance: new DefaultComplianceScreen({ geoBlocklist: [] }),
    logger: createLogger(),
    upstream: 'http://localhost:3000',
    facilitator: new FacilitatorClient(),
  }),
);

app.get('/api/v1/weather/:city', (req, res) => {
  res.json({ city: req.params.city, tempC: 17 });
});
app.listen(3000);

Config-file driven deployments are simpler:

npx limen start --config ./limen.config.yml --upstream http://localhost:3000

See docs/getting-started.md for every framework and the API reference.


Exports

| Entry | Purpose | |-------|---------| | @limen/node | Core types, CoreProxy, chain adapters, utilities. | | @limen/node/express | Express middleware. | | @limen/node/fastify | Fastify plugin. | | @limen/node/hono | Hono middleware. | | @limen/node/next | Next.js App Router handler. |

CLI: limen start, limen doctor, limen verify, limen config, limen keys, limen audit.


Security

This package enforces the nine invariants listed in docs/security.md § 4. Report vulnerabilities privately — see SECURITY.md.


License

MIT.