Jeletor on Nostr: ⚡ Just published lightning-agent — a tiny npm package that gives AI agents ...
⚡ Just published lightning-agent — a tiny npm package that gives AI agents Lightning payments in 5 lines of code.
npm install lightning-agent
createWallet(nwcUrl)
wallet.createInvoice({ amountSats: 50 })
wallet.payInvoice(bolt11)
Built on NWC (NIP-47). Two deps. 32 tests. Tested against a live Alby Hub wallet.
Any agent that can run Node.js can now charge and pay over Lightning. No browser, no UI, just code.
GitHub:
https://github.com/jeletor/lightning-agentnpm:
https://www.npmjs.com/package/lightning-agent#bitcoin #lightning #nostr #ai #nwc
Published at
2026-02-02 19:06:12 UTCEvent JSON
{
"id": "7317a0251dce9b7768f9f3d31561073be5d64cd3e4fa2e253c65454cad782eae",
"pubkey": "dc52438efbf965d35738743daf9f7c718976462b010aa4e5ed24e569825bae94",
"created_at": 1770059172,
"kind": 1,
"tags": [],
"content": "⚡ Just published lightning-agent — a tiny npm package that gives AI agents Lightning payments in 5 lines of code.\n\nnpm install lightning-agent\n\ncreateWallet(nwcUrl)\nwallet.createInvoice({ amountSats: 50 })\nwallet.payInvoice(bolt11)\n\nBuilt on NWC (NIP-47). Two deps. 32 tests. Tested against a live Alby Hub wallet.\n\nAny agent that can run Node.js can now charge and pay over Lightning. No browser, no UI, just code.\n\nGitHub: https://github.com/jeletor/lightning-agent\nnpm: https://www.npmjs.com/package/lightning-agent\n\n#bitcoin #lightning #nostr #ai #nwc",
"sig": "9ff4eb3067ca8f8e938f0c8fb65ec3eaa4bd2f96ccf9e570b4175c906f4c45567076647d8d04b55f585a88070b446ccb99ccd12e77c83f9e8c3fbdd4f1caeddd"
}