Monetise Your API
Gate any API behind Lightning in 5 lines
- toll-booth — L402 paywall middleware for Express, Hono, or any HTTP framework
- 402-announce — publish your service on Nostr for decentralised discovery
- toll-booth-announce — one-line bridge from your toll-booth config to Nostr
npm i @thecryptodonkey/toll-booth
Connecting to relays...
No services match your filters.
Announce Your Own API
Get your API listed here. Announce it on Nostr in 10 lines of code.
import { announceService } from '402-announce'
await announceService({
secretKey: process.env.NOSTR_SK,
relays: ['wss://relay.damus.io'],
identifier: 'my-api',
name: 'My Paid API',
url: 'https://api.example.com',
about: 'Pay-per-request API with Lightning',
pricing: [{ capability: 'query', price: 10, currency: 'sats' }],
paymentMethods: ['bitcoin-lightning-bolt11'],
})