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

@xpaysh/agent-kit-testing

v0.1.1

Published

Mock payment-protected API server for testing agents (supports x402, AP2, etc.)

Readme

@xpaysh/agent-kit-testing

Mock payment-protected API server for testing AI agents with x402 micropayments.

Overview

A fully-featured mock API server with x402 payment protection for testing and developing AI agents. Includes multiple endpoints with different pricing tiers, perfect for development and integration testing.

Features

  • Payment-Protected Endpoints: Weather, crypto, news, and data analysis APIs
  • Free Endpoints: Health check and utility endpoints for testing
  • Variable Pricing: Different price points for testing spending controls
  • Express Integration: Built with x402-express middleware
  • Easy Setup: Run locally or deploy for team testing

Installation

npm install @xpaysh/agent-kit-testing

Quick Start

import express from 'express';
import { paymentMiddleware } from 'x402-express';

// Or use the pre-built server
import './node_modules/@xpaysh/agent-kit-testing/dist/server.js';

Running the Mock Server

# Install
npm install @xpaysh/agent-kit-testing

# Run
npx @xpaysh/agent-kit-testing

Or set environment variables:

PORT=3001
PAY_TO_ADDRESS=0x742d35Cc6634C0532925a3b844D2dF1e6fc2e8666

npm start

Available Endpoints

Free Endpoints

  • GET /health - Health check
  • GET /api/free/time - Current server time
  • POST /api/free/echo - Echo any JSON payload

Paid Endpoints (x402 Protected)

  • GET /api/weather - Weather data ($0.01 per request)
  • GET /api/crypto - Cryptocurrency prices ($0.005 per request)
  • GET /api/news - News articles ($0.02 per request)
  • POST /api/analyze - Data analysis ($0.05 per request)

Testing Your Agent

import { SmartProxy } from '@xpaysh/agent-kit-core';

const smartProxy = new SmartProxy({
  privateKey: process.env.PRIVATE_KEY,
  network: 'base-sepolia',
  spendingLimits: { dailyLimit: 1 }
});

// Test against mock server
const weather = await smartProxy.protectedFetch('http://localhost:3001/api/weather');
console.log('Weather data:', weather.data);
console.log('Cost:', weather.cost); // $0.01

Documentation

For comprehensive documentation, guides, and examples, visit:

Links

License

MIT © xPay