I have built an npm library that lets agents pay with lightning.
When Lightning Labs released their agent tools a few weeks ago, everything was in Go and designed for terminals. Shortly after Coinbase relased x402 support using stablecoins. I'm a TypeScript developer, so I wanted to use something that I could install with npm and use in a Node.js app. It didn't exist so I built it and called it Gateless.
Gateless is a fetch wrapper that handles L402 automatically. Your agent hits a 402 paywall, Gateless pays the Lightning invoice, retries with the token, and your code just gets the data back. It supports L402 and the newer Fewsats flow.
You can choose from two payment providers. LND (REST API, connect your own node) and NWC. The NWC provider uses NIP-47 over Nostr relays, which means you don't need to expose your node to the internet.
I have tested it with real sats against live L402 endpoints.
GitHub: https://github.com/satpathdev/gateless
npm: https://www.npmjs.com/package/@satpath/gateless
This is my first open-source Bitcoin project. I'm an experienced developer but only recently made the jump into building on Lightning.