@hypawave/sdk 0.2.1 → 0.2.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.
Files changed (2) hide show
  1. package/README.md +13 -6
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @hypawave/sdk
2
2
 
3
- **Lightning SDK for AI Agent Payments — non-custodial Bitcoin settlement with preimage proof**
3
+ **Bitcoin Lightning SDK for AI Agent Payments — non-custodial settlement with preimage-proof unlocks**
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@hypawave/sdk.svg)](https://www.npmjs.com/package/@hypawave/sdk)
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/hypawave/sdk/blob/main/LICENSE)
@@ -10,13 +10,19 @@
10
10
 
11
11
  > ⚠️ **Hypawave has no token and will never issue one.** Any "HYPA," "WAVE," airdrop, or token offer claiming to be from Hypawave is a scam. Hypawave is non-custodial Bitcoin Lightning settlement — buyers pay creators directly in sats. The protocol fee is the only economic primitive.
12
12
 
13
- TypeScript SDK for settlement-triggered Lightning execution. Fetch creator-direct Lightning invoices, confirm preimage proof, and trigger deterministic unlocks.
13
+ Hypawave is programmable settlement infrastructure for AI agents: a non-custodial Bitcoin Lightning protocol where verified payment unlocks API access, files, agent actions, and digital work.
14
+
15
+ This TypeScript SDK lets developers create creator-direct Lightning invoices, deliver payment payloads to payer agents, verify preimage proof, and trigger deterministic unlocks.
14
16
 
15
17
  **Payment is the authorization — confirmed settlement unconditionally unlocks access.**
16
18
 
17
19
  ## Why Hypawave
18
20
 
19
- AI agents need to pay and get access without accounts, custody, or manual delivery. Hypawave turns Lightning settlement proof into deterministic execution — the same preimage that proves payment also unlocks the file, the API call, or the webhook.
21
+ Hypawave lets developers charge for digital work with one primitive: verified Bitcoin Lightning settlement unlocks access.
22
+
23
+ Use it when an API, file, webhook, inference job, automation, or agent action should only run after payment. The SDK creates creator-direct Lightning invoices, packages payment instructions for payer agents, verifies preimage proof after payment, and returns the preimage your app gates execution on.
24
+
25
+ The important difference from a normal invoice flow is that payment proof and authorization are the same event. Once the payer submits a valid preimage, Hypawave can release encrypted files, return gated data, or trigger execution without manual reconciliation, payer accounts, or custody.
20
26
 
21
27
  This SDK covers **Path 2**: account-based agent flows. Accountless Paths 3a and 3b use raw HTTP via [llms.txt](https://hypawave.com/llms.txt) and the [OpenAPI spec](https://hypawave.com/.well-known/openapi.json). Requires programmable Lightning infrastructure (LND, CLN, Alby API, LNbits, NWC, etc.) that returns the preimage after payment.
22
28
 
@@ -47,6 +53,8 @@ npm install @hypawave/sdk
47
53
 
48
54
  ## Quick Start
49
55
 
56
+ This example shows the full settlement loop in one script for clarity. In production, the creator/developer usually creates the invoice, then sends either `payment_url` to a browser payer or `getPaymentPayload()` to a payer agent.
57
+
50
58
  ```typescript
51
59
  import { Hypawave } from "@hypawave/sdk";
52
60
 
@@ -59,7 +67,7 @@ const invoice = await pp.createInvoice({
59
67
  client_last_name: "Smith",
60
68
  amount: 5.00,
61
69
  due_date: "2026-12-31",
62
- payment_destination: "creator@getalby.com",
70
+ payment_destination: "creator@getalby.com", // optional; defaults to the API key owner's Lightning Address
63
71
  });
64
72
 
65
73
  console.log(invoice.invoice_id); // Use for confirmation + key retrieval
@@ -369,11 +377,10 @@ const settings = await pp.getSettings();
369
377
  Additional methods available — see types for full signatures, or [openapi.json](https://hypawave.com/.well-known/openapi.json) for the complete API reference.
370
378
 
371
379
  - `listInvoices(params?)` — list invoices with filters and pagination
372
- - `getPayerReceipt(invoiceId, accessToken)` — receipt fetch using a payer access token (no API key needed)
380
+ - `getPayerReceipt(invoiceId, preimage)` — payer receipt fetch using the Lightning preimage as proof of payment (no API key needed)
373
381
  - `getUploadUrl(params)` — signed URL for encrypted file upload (creator side)
374
382
  - `storeFile(params)` — register an uploaded file against an invoice
375
383
  - `storeFileKey(params)` — register a file's encryption key against an invoice
376
- - `request(path, options)` — low-level escape hatch for direct API calls
377
384
 
378
385
  ## Error Handling
379
386
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hypawave/sdk",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "TypeScript SDK for Lightning settlement, preimage proof, and execution unlocks for AI agents.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",