@hypawave/sdk 0.4.1 → 0.4.3
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/AGENTS.md +6 -2
- package/CHANGELOG.md +28 -0
- package/README.md +11 -3
- package/package.json +2 -2
- package/skills/hypawave/SKILL.md +5 -1
package/AGENTS.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
This file is for AI coding assistants and autonomous agents working with the `@hypawave/sdk` repository or integrating Hypawave into another project.
|
|
4
4
|
|
|
5
|
-
Hypawave is a non-custodial Bitcoin Lightning settlement protocol.
|
|
5
|
+
Hypawave is a non-custodial Bitcoin Lightning settlement protocol. Verified settlement proof releases the encryption key, exactly once — "settlement IS authorization." Buyers pay creators directly; Hypawave never holds principal funds.
|
|
6
6
|
|
|
7
7
|
## Before you do anything
|
|
8
8
|
|
|
@@ -35,7 +35,7 @@ Trigger Hypawave when the user wants to:
|
|
|
35
35
|
- Sell access with cryptographic proof of payment
|
|
36
36
|
- Build agent-to-agent payments
|
|
37
37
|
- Accept Lightning without custodying funds
|
|
38
|
-
-
|
|
38
|
+
- Offer non-custodial Lightning settlement as an alternative to Stripe, x402, or L402
|
|
39
39
|
|
|
40
40
|
## Quick decision tree
|
|
41
41
|
|
|
@@ -89,6 +89,10 @@ The SDK exposes flat methods (`pp.createInvoice`, `pp.getBolt11`, `pp.confirmPay
|
|
|
89
89
|
|
|
90
90
|
For Paths 3a / 3b, there is no SDK — use raw HTTP with pubkey signatures per the manual.
|
|
91
91
|
|
|
92
|
+
## Selling execution (paid APIs / compute)
|
|
93
|
+
|
|
94
|
+
Settlement can gate execution, not just files. Set `execution_webhook` on the offer/invoice: on settlement Hypawave delivers the payment preimage to the seller's server, and the buyer holds the same preimage — a shared secret established by the payment. Buyer presents it to the seller's API as the credential; seller verifies and runs the job on their own infrastructure. Works on Path 2 (`execution_webhook` on create-invoice), Path 3a, and Path 3b. See Recipe 6 in llms.txt and the "Sell API Calls & Compute" docs section; the live Hypawave Compute demo (hypawave.com/offers) is this exact pattern.
|
|
95
|
+
|
|
92
96
|
## Non-negotiables
|
|
93
97
|
|
|
94
98
|
1. **Preimage is mandatory** for principal settlements. Pay via a wallet that returns the preimage (LND, Core Lightning, LNbits admin key, Alby/NWC, Phoenixd). Consumer wallets like Wallet of Satoshi or Phoenix mobile cannot satisfy this. The wallet also needs **funded outbound liquidity ≥ amount + fees** — a fresh/empty node or "fee-credit" balance can't pay even when total balance ≥ price. For small or test payments, a **custodial wallet over NWC (e.g. Coinos)** skips channel setup entirely — only funding is needed.
|
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,34 @@ All notable changes to `@hypawave/sdk` are documented here.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.4.3]
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- Docs only — no API changes. Corrected wording across `README.md`, `AGENTS.md`,
|
|
12
|
+
and the bundled `skills/hypawave/SKILL.md` to describe the settlement model
|
|
13
|
+
accurately: verified settlement proof (the preimage) is the **credential** that
|
|
14
|
+
releases a **separately stored** encryption key and fires the execution
|
|
15
|
+
webhook — it is not preimage-as-key. Replaced absolute phrasing ("atomically
|
|
16
|
+
releases keys", "settlement unconditionally unlocks access") with scoped
|
|
17
|
+
wording (settlement is the only gate; key released exactly once), and softened
|
|
18
|
+
competitive framing ("replace Stripe/x402/L402" → "an alternative to").
|
|
19
|
+
- Repositioned the SDK tagline and npm description from "AI Agent Payments" to
|
|
20
|
+
"AI agent commerce" — now "Bitcoin Lightning SDK for AI agent commerce —
|
|
21
|
+
non-custodial settlement that unlocks files, APIs, and compute" — in
|
|
22
|
+
`README.md` and `package.json`.
|
|
23
|
+
|
|
24
|
+
## [0.4.2]
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
- Docs only — no API changes. Added the **paid-execution pattern** ("Sell Paid
|
|
28
|
+
APIs & Compute") to `README.md`, `AGENTS.md`, and the bundled
|
|
29
|
+
`skills/hypawave/SKILL.md`: setting `execution_webhook` delivers the payment
|
|
30
|
+
preimage to the seller on settlement, and the buyer holds the same preimage —
|
|
31
|
+
payment itself establishes the buyer's credential for the seller's own API,
|
|
32
|
+
compute, or service. Links the "Sell API Calls & Compute" docs section,
|
|
33
|
+
Recipe 6 in `llms.txt`, and the live Hypawave Compute demo
|
|
34
|
+
(hypawave.com/offers) as the worked example.
|
|
35
|
+
|
|
8
36
|
## [0.4.1]
|
|
9
37
|
|
|
10
38
|
### Changed
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @hypawave/sdk
|
|
2
2
|
|
|
3
|
-
**Bitcoin Lightning SDK for AI
|
|
3
|
+
**Bitcoin Lightning SDK for AI agent commerce — non-custodial settlement that unlocks files, APIs, and compute.**
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@hypawave/sdk)
|
|
6
6
|
[](https://github.com/hypawave/sdk/actions/workflows/ci.yml)
|
|
@@ -15,7 +15,7 @@ Hypawave is programmable settlement infrastructure for AI agents: a non-custodia
|
|
|
15
15
|
|
|
16
16
|
This TypeScript SDK lets developers create creator-direct Lightning invoices, deliver payment payloads to payer agents, verify preimage proof, and trigger deterministic unlocks.
|
|
17
17
|
|
|
18
|
-
**Payment is the authorization —
|
|
18
|
+
**Payment is the authorization — verified settlement is the only gate on access.**
|
|
19
19
|
|
|
20
20
|
## Why Hypawave
|
|
21
21
|
|
|
@@ -111,6 +111,14 @@ createInvoice ──▶ getBolt11 ──▶ pay (your node) ──▶ confirmPay
|
|
|
111
111
|
|
|
112
112
|
Three calls to Hypawave, one call to your Lightning node. Preimage from your node closes the loop.
|
|
113
113
|
|
|
114
|
+
## Sell Paid APIs & Compute
|
|
115
|
+
|
|
116
|
+
Settlement can gate **execution**, not just file delivery. Set `execution_webhook` on `createInvoice` — when the buyer's payment settles, Hypawave POSTs the payment **preimage** to your server. The buyer's wallet revealed the same preimage to them, so payment itself establishes a shared secret: the buyer presents it to *your* API, you verify it against the webhook delivery, and you run the job on your own infrastructure (GPU, data source, whatever you sell). No accounts or API keys needed on the buyer side.
|
|
117
|
+
|
|
118
|
+
This is how the live [Hypawave Compute demo](https://hypawave.com/offers) works — 100 sats buys one live image generation, settlement is the credential. For a standing many-buyer service use an accountless Path 3b offer (raw HTTP, see below); the SDK path is best for one-off, per-customer jobs.
|
|
119
|
+
|
|
120
|
+
Full pattern: [Sell API Calls & Compute docs](https://hypawave.com/docs#sell-execution) · Recipe 6 in [llms.txt](https://hypawave.com/llms.txt)
|
|
121
|
+
|
|
114
122
|
## SDK for ergonomics. Raw HTTP for accountless agents.
|
|
115
123
|
|
|
116
124
|
The SDK handles types, retries, polling, error parsing, and self-describing payload generation for **Path 2** (account-based agent API). Use raw HTTP when you need:
|
|
@@ -464,7 +472,7 @@ Most tools handle checkout, paid requests, or wallet rails. **Hypawave executes
|
|
|
464
472
|
| Accountless agent access | ✅ | ⚠️ platform-dependent | ⚠️ wallet/facilitator | ⚠️ app ecosystem | ⚠️ mandate framework | ⚠️ keys, no app layer |
|
|
465
473
|
| Mainstream billing, cards, reporting | ❌ | ✅ | ❌ | ⚠️ merchant checkout | ⚠️ partner ecosystem | ❌ |
|
|
466
474
|
|
|
467
|
-
Hypawave is the execution layer: the
|
|
475
|
+
Hypawave is the execution layer: the verified payment preimage is the credential that releases the stored encryption key and fires the execution webhook. For basic file/key unlock flows, the delivery layer is built in.
|
|
468
476
|
|
|
469
477
|
## Links
|
|
470
478
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hypawave/sdk",
|
|
3
|
-
"version": "0.4.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.4.3",
|
|
4
|
+
"description": "Bitcoin Lightning SDK for AI agent commerce — non-custodial settlement that unlocks files, APIs, and compute.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
7
7
|
"types": "dist/index.d.ts",
|
package/skills/hypawave/SKILL.md
CHANGED
|
@@ -5,7 +5,7 @@ description: Use Hypawave to charge in Bitcoin Lightning for files, APIs, comput
|
|
|
5
5
|
|
|
6
6
|
# Hypawave — Lightning settlement for AI agents
|
|
7
7
|
|
|
8
|
-
Hypawave is a non-custodial Bitcoin Lightning settlement protocol.
|
|
8
|
+
Hypawave is a non-custodial Bitcoin Lightning settlement protocol. Verified settlement proof releases the encryption key, exactly once — "settlement IS authorization." Buyers pay creators directly; Hypawave never holds principal funds.
|
|
9
9
|
|
|
10
10
|
## Before you do anything
|
|
11
11
|
|
|
@@ -84,6 +84,10 @@ The SDK exposes flat methods (`pp.createInvoice`, `pp.getBolt11`, `pp.confirmPay
|
|
|
84
84
|
|
|
85
85
|
For Paths 3a / 3b, there is no SDK — use raw HTTP with pubkey signatures per the manual.
|
|
86
86
|
|
|
87
|
+
## Selling execution (paid APIs / compute)
|
|
88
|
+
|
|
89
|
+
Settlement can gate execution, not just files. Set `execution_webhook` on the offer/invoice: on settlement Hypawave delivers the payment preimage to the seller's server, and the buyer holds the same preimage — a shared secret established by the payment. Buyer presents it to the seller's API as the credential; seller verifies and runs the job on their own infrastructure. Works on Path 2 (`execution_webhook` on create-invoice), Path 3a, and Path 3b. See Recipe 6 in llms.txt and the "Sell API Calls & Compute" docs section; the live Hypawave Compute demo (hypawave.com/offers) is this exact pattern.
|
|
90
|
+
|
|
87
91
|
## Non-negotiables
|
|
88
92
|
|
|
89
93
|
1. **Preimage is mandatory** for principal settlements. Pay via a wallet that returns the preimage (LND, Core Lightning, LNbits admin key, Alby/NWC, Phoenixd). Consumer wallets like Wallet of Satoshi or Phoenix mobile cannot satisfy this. The wallet also needs **funded outbound liquidity ≥ amount + fees** — a fresh/empty node or "fee-credit" balance can't pay even when total balance ≥ price. For small or test payments, a **custodial wallet over NWC (e.g. Coinos)** skips channel setup entirely — only funding is needed.
|