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

@amplifyworld/sdk

v0.1.0

Published

TypeScript SDK for the $AMPS token on Base — build AI-powered apps with token payments

Readme

⚡ AMPS Developer Toolkit

The official TypeScript SDK for building apps powered by $AMPS tokens on Base chain.

Built for developers and AI agent builders who want to charge for services in AMPS tokens.

Quick Start

npm install @amplifyworld/sdk viem
import { createAmpsClient } from '@amplifyworld/sdk'

// Read-only (check balances, watch events)
const amps = createAmpsClient()
const balance = await amps.getBalance('0x...')
console.log(`${balance.formatted} AMPS`) // "1,500.25 AMPS"

// With wallet (transfer, approve)
const amps = createAmpsClient({ privateKey: '0x...' })
await amps.transfer('0xRecipient', '100')

RPC endpoint

By default, createAmpsClient and createAmpsGateway use Base's free public RPC (https://mainnet.base.org). It's fine for light testing, but it's shared and rate-limited — repeated reads/writes in a short window can throw "over rate limit". For anything with real or sustained traffic, pass your own rpcUrl:

const amps = createAmpsClient({ rpcUrl: 'https://base-mainnet.g.alchemy.com/v2/YOUR_KEY' })

(Alchemy, Infura, and QuickNode all have free tiers with much higher per-key limits than the shared public endpoint.)

AI Payment Gateway

Charge users in $AMPS per API call — the killer feature for AI agent developers:

import { createAmpsGateway } from '@amplifyworld/sdk'

const gateway = createAmpsGateway({
  privateKey: process.env.SERVICE_WALLET_KEY,
  pricing: {
    'chat.completion': '0.5',  // 0.5 AMPS per chat
    'image.generate': '2.0',   // 2 AMPS per image
  },
})

const receipt = await gateway.charge({
  payer: '0xUserAddress',
  service: 'chat.completion',
})
// receipt.txHash, receipt.amount, receipt.timestamp

Express Middleware

Gate API routes behind AMPS payments with one line:

import { ampsPaywall } from '@amplifyworld/sdk/middleware'

app.post('/api/generate', ampsPaywall({
  price: '1.0',
  recipient: '0xYourWallet',
}), handler)
// Returns 402 Payment Required with AMPS payment instructions

Features

| Feature | Description | |---|---| | Core SDK | getBalance, transfer, approve, transferFrom, watchTransfers | | AI Gateway | Charge-per-call with pricing tables, dynamic pricing, sessions | | Middleware | Express payment paywall with x402-style 402 responses | | Receipts | On-chain payment verification and proof | | Type-Safe | Full TypeScript with exported types for everything | | Minimal | Zero runtime dependencies beyond viem |

Token Details

| | | |---|---| | Name | AmplifyWorld | | Symbol | AMPS | | Chain | Base (8453) | | Type | ERC-20 | | Decimals | 18 | | Contract | 0x1A074F116786248FC79B130E6379293C7EF604a4 | | Website | amplifyworld.ai |

Examples

# Basic transfer
cd examples/basic-transfer && npx tsx index.ts

# AI chatbot with AMPS payments
cd examples/ai-chatbot && npx tsx index.ts

# Express API with payment paywall
cd examples/express-api && npx tsx index.ts

# Coin flip game — full pay-to-play flow with a real connected wallet
cd examples/coin-flip-game && npx tsx server.ts

The coin flip game is the most complete demo — it runs in a no-setup simulation mode by default, or against real $AMPS on Base mainnet with a MetaMask-style wallet connection. See examples/coin-flip-game/README.md for live-mode setup.

Links

License

MIT