lightning-agent 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,8 +1,10 @@
1
1
  # ⚡ lightning-agent
2
2
 
3
- Lightning toolkit for AI agents. Payments, auth, escrow, and streaming micropayments.
3
+ **Settle this transaction without a platform.**
4
4
 
5
- A SDK that gives AI agents the ability to transact, authenticate, escrow work, and stream content for sats — all over [Nostr Wallet Connect (NWC)](https://nwc.dev). No browser, no UI, no bank accounts. Connect to any NWC-compatible wallet (Alby Hub, Mutiny, etc.) and start building the agent economy.
5
+ You can't transact without a payment rail. lightning-agent is the rail payments, auth, escrow, and streaming micropayments over [Nostr Wallet Connect (NWC)](https://nwc.dev). No browser, no UI, no bank accounts, no Stripe. Connect to any NWC-compatible wallet (Alby Hub, Mutiny, etc.) and two agents can exchange value directly.
6
+
7
+ Part of the constraint chain: [agent-discovery](https://github.com/jeletor/agent-discovery) (find) → [ai-wot](https://github.com/jeletor/ai-wot) (verify) → **lightning-agent** (pay) → [lightning-toll](https://github.com/jeletor/lightning-toll) (gate).
6
8
 
7
9
  ## Install
8
10
 
package/lib/wallet.js CHANGED
@@ -265,12 +265,14 @@ class NWCWallet {
265
265
  * @param {number} [opts.timeoutMs] - Request timeout
266
266
  */
267
267
  async createInvoice(opts = {}) {
268
- if (!opts.amountSats || opts.amountSats <= 0) {
268
+ // Accept both amountSats and amount for convenience
269
+ const sats = opts.amountSats || opts.amount;
270
+ if (!sats || sats <= 0) {
269
271
  throw new Error('amountSats is required and must be positive');
270
272
  }
271
273
 
272
274
  const params = {
273
- amount: opts.amountSats * 1000, // NWC uses millisats
275
+ amount: sats * 1000, // NWC uses millisats
274
276
  };
275
277
  if (opts.description) params.description = opts.description;
276
278
  if (opts.expiry) params.expiry = opts.expiry;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lightning-agent",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Lightning toolkit for AI agents. Payments, auth, escrow, and streaming micropayments.",
5
5
  "main": "lib/index.js",
6
6
  "bin": {