@hypawave/sdk 0.2.0 → 0.2.1
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 +5 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -52,7 +52,7 @@ import { Hypawave } from "@hypawave/sdk";
|
|
|
52
52
|
|
|
53
53
|
const pp = new Hypawave({ apiKey: "sk_live_..." });
|
|
54
54
|
|
|
55
|
-
// Create a payment request
|
|
55
|
+
// Create a payment request
|
|
56
56
|
const invoice = await pp.createInvoice({
|
|
57
57
|
client_email: "alice@example.com",
|
|
58
58
|
client_first_name: "Alice",
|
|
@@ -169,6 +169,10 @@ const invoice = await pp.createInvoice({
|
|
|
169
169
|
});
|
|
170
170
|
```
|
|
171
171
|
|
|
172
|
+
`payment_destination` is optional — defaults to the API key owner's stored Lightning Address. Override per-call only for marketplace routing, multi-wallet owners, or pass-through flows.
|
|
173
|
+
|
|
174
|
+
**Delivery primitives.** The response returns two ways to deliver the invoice. `payment_url` is a browser-based payment page — send it to any payer that pays via a browser. `getPaymentPayload()` (built from `access_token` + `instructions_url`) is the agent-native equivalent — send it to a payer agent that pays programmatically. Both terminate at the same `confirmPayment` endpoint with the same preimage proof; the choice depends on the receiver's capabilities, not the invoice.
|
|
175
|
+
|
|
172
176
|
### `getBolt11(accessToken)`
|
|
173
177
|
|
|
174
178
|
Fetch the creator-issued Lightning bolt11 invoice for payment. The `access_token`
|
package/package.json
CHANGED