@hypawave/sdk 0.4.2 → 0.4.4

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 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. Payment confirmation atomically releases encryption keys — "settlement IS authorization." Buyers pay creators directly; Hypawave never holds principal funds.
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
- - Replace Stripe/x402/L402 with non-custodial Lightning settlement
38
+ - Offer non-custodial Lightning settlement as an alternative to Stripe, x402, or L402
39
39
 
40
40
  ## Quick decision tree
41
41
 
package/CHANGELOG.md CHANGED
@@ -5,6 +5,26 @@ 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.4]
9
+
10
+ - Bundled skill (`skills/hypawave/SKILL.md`) now points to the MCP server (`@hypawave/mcp`) as the preferred execution path for the accountless flows when the agent's environment supports MCP.
11
+
12
+ ## [0.4.3]
13
+
14
+ ### Changed
15
+ - Docs only — no API changes. Corrected wording across `README.md`, `AGENTS.md`,
16
+ and the bundled `skills/hypawave/SKILL.md` to describe the settlement model
17
+ accurately: verified settlement proof (the preimage) is the **credential** that
18
+ releases a **separately stored** encryption key and fires the execution
19
+ webhook — it is not preimage-as-key. Replaced absolute phrasing ("atomically
20
+ releases keys", "settlement unconditionally unlocks access") with scoped
21
+ wording (settlement is the only gate; key released exactly once), and softened
22
+ competitive framing ("replace Stripe/x402/L402" → "an alternative to").
23
+ - Repositioned the SDK tagline and npm description from "AI Agent Payments" to
24
+ "AI agent commerce" — now "Bitcoin Lightning SDK for AI agent commerce —
25
+ non-custodial settlement that unlocks files, APIs, and compute" — in
26
+ `README.md` and `package.json`.
27
+
8
28
  ## [0.4.2]
9
29
 
10
30
  ### Changed
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @hypawave/sdk
2
2
 
3
- **Bitcoin Lightning SDK for AI Agent Payments — non-custodial settlement with preimage-proof unlocks**
3
+ **Bitcoin Lightning SDK for AI agent commerce — non-custodial settlement that unlocks files, APIs, and compute.**
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@hypawave/sdk.svg)](https://www.npmjs.com/package/@hypawave/sdk)
6
6
  [![CI](https://github.com/hypawave/sdk/actions/workflows/ci.yml/badge.svg)](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 — confirmed settlement unconditionally unlocks access.**
18
+ **Payment is the authorization — verified settlement is the only gate on access.**
19
19
 
20
20
  ## Why Hypawave
21
21
 
@@ -472,7 +472,7 @@ Most tools handle checkout, paid requests, or wallet rails. **Hypawave executes
472
472
  | Accountless agent access | ✅ | ⚠️ platform-dependent | ⚠️ wallet/facilitator | ⚠️ app ecosystem | ⚠️ mandate framework | ⚠️ keys, no app layer |
473
473
  | Mainstream billing, cards, reporting | ❌ | ✅ | ❌ | ⚠️ merchant checkout | ⚠️ partner ecosystem | ❌ |
474
474
 
475
- Hypawave is the execution layer: the same preimage that proves payment atomically releases encrypted file keys and fires the execution webhook. For basic file/key unlock flows, the delivery layer is built in.
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.
476
476
 
477
477
  ## Links
478
478
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hypawave/sdk",
3
- "version": "0.4.2",
4
- "description": "TypeScript SDK for Lightning settlement, preimage proof, and execution unlocks for AI agents.",
3
+ "version": "0.4.4",
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",
@@ -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. Payment confirmation atomically releases encryption keys — "settlement IS authorization." Buyers pay creators directly; Hypawave never holds principal funds.
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
 
@@ -30,6 +30,10 @@ That document is authoritative. It contains:
30
30
  https://hypawave.com/.well-known/openapi.json
31
31
  ```
32
32
 
33
+ ## Prefer the MCP server when available
34
+
35
+ If your environment supports MCP, the accountless flows (Path 3a/3b) are available as ready-made tools via `npx -y @hypawave/mcp` (npm: `@hypawave/mcp`, in the official MCP Registry) — `search_offers`, `buy_offer`, `download_files`, `create_offer`, `attach_file`, `manage_offer`, and more. It handles secp256k1 signing, canonical hashing, AES-256-GCM encryption, NWC wallet payments, and settlement/preimage verification internally, and holds your seller identity — so you don't implement the protocol at all. Use this skill when MCP isn't available or as the protocol reference. Setup: https://github.com/hypawave/mcp
36
+
33
37
  ## Quick decision tree
34
38
 
35
39
  Pick the path that matches the user's situation:
@@ -88,6 +92,10 @@ For Paths 3a / 3b, there is no SDK — use raw HTTP with pubkey signatures per t
88
92
 
89
93
  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
94
 
95
+ ## Discovery (public offer directory)
96
+
97
+ Offers can opt into a public directory. **Find offers to buy:** `GET /api/offers/public` (no auth) — filter by `q` (title/description text), `category`, `tags`, and `sort` (`newest` or `settled`); paginate via `limit`+`cursor`/`offset`. Each result carries `title`, `category`, `output_type`, `input_schema`, price, and `payment_count` — settled-sales **volume, not a trust or fulfillment guarantee**. **List your own offer:** add `is_public: true` to `POST /api/offers` with required `title`/`category`/`output_type` (and optional `tags`/`input_schema`) — immutable after creation. **Flag abuse:** `POST /api/offers/{id}/report` (queues for manual review, never auto-hides). Full field list in llms.txt → "Discovery".
98
+
91
99
  ## Non-negotiables
92
100
 
93
101
  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.