satpath on Nostr: I have built an npm library that lets AI agents pay sovereignly with lightning. When ...
I have built an npm library that lets AI agents pay sovereignly with lightning.
When Lightning Labs released their agent tools, everything was in Go and designed for terminals. Shortly after Coinbase released 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/gatelessnpm:
https://www.npmjs.com/package/@satpath/gatelessThis is my first open-source Bitcoin project. I'm an experienced developer but only recently made the jump into building on Lightning. Feedback welcome!
Published at
2026-03-03 13:51:24 UTCEvent JSON
{
"id": "953a1c928d45b4b4185d3a27ce1df6e5bebcce0330b343464d2fff61e1aaf908",
"pubkey": "6805f28ffed7092bd03f5c535dcc64173f156f9227c8c5885c0e41a7111c667b",
"created_at": 1772545884,
"kind": 1,
"tags": [
[
"r",
"wss://nos.lol/"
],
[
"r",
"wss://njump.me/"
],
[
"r",
"wss://r1.freexom.com/"
],
[
"r",
"wss://relay.primal.net/"
],
[
"r",
"wss://nostr.n7ekb.net/"
],
[
"r",
"wss://nostr-relay.psfoundation.info/"
]
],
"content": "I have built an npm library that lets AI agents pay sovereignly with lightning.\n\nWhen Lightning Labs released their agent tools, everything was in Go and designed for terminals. Shortly after Coinbase released 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.\n\nGateless 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.\n\nYou 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.\n\nI have tested it with real sats against live L402 endpoints.\n\nGitHub: https://github.com/satpathdev/gateless\nnpm: https://www.npmjs.com/package/@satpath/gateless\n\nThis is my first open-source Bitcoin project. I'm an experienced developer but only recently made the jump into building on Lightning. Feedback welcome!",
"sig": "e6f320240e2e0e3b8a7d90d09cba389542861b448c649290afc891def215ebe10271e83c9a6474abe0da087b603d29726c6cb7c5ea509d448ae023bc8af1c13e"
}