xpay: support paying a (simple) bolt12 offer directly.

fetchinvoice is still good for detailed diagnostics and handling
recurring invoices and alternate currencies, but this covers the
"throw some sats" case well.

Changelog-Added: JSON-RPC: `xpay` can now pay a simple offer directly, rather than requiring fetchinvoice first.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2025-08-18 11:00:52 +09:30
parent aea7358976
commit 103a49ef51
6 changed files with 159 additions and 23 deletions

View File

@@ -17,7 +17,7 @@
"invstring": {
"type": "string",
"description": [
"bolt11 or bolt12 invoice"
"bolt11 or bolt12 invoice, or a bolt12 (non-recursive) offer. If it's an offer, the invoice is fetch using `fetchinvoice` automatically."
]
},
"amount_msat": {