BOLTs: update to more recent bolt12 spec.

It's 2b7ad577d7a790b302bd1aa044b22c809c76e49d, which reverts the
point32 changes.

It also restores send_invoice in `invoice`, which we had removed
from spec and put into the recurrence patch.

I originally had implemented compatibility, but other changes
which followed this are far too widespread.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-EXPERIMENTAL: offers: complete rework of spec from other teams (yay!) breaks previous compatibility (boo!)
This commit is contained in:
Rusty Russell
2022-10-17 11:07:05 +10:30
parent eac8401f84
commit e30ea91908
17 changed files with 89 additions and 193 deletions

View File

@@ -30,7 +30,7 @@ On success, an object is returned, containing:
If **type** is "bolt12 offer", and **valid** is *true*:
- **offer\_id** (hex): the id of this offer (merkle hash of non-signature fields) (always 64 characters)
- **node\_id** (point32): x-only public key of the offering node
- **node\_id** (pubkey): public key of the offering node
- **description** (string): the description of the purpose of the offer
- **signature** (bip340sig, optional): BIP-340 signature of the *node_id* on this offer
- **chains** (array of hexs, optional): which blockchains this offer is for (missing implies bitcoin mainnet only):
@@ -72,7 +72,7 @@ If **type** is "bolt12 offer", and **valid** is *false*:
If **type** is "bolt12 invoice", and **valid** is *true*:
- **node\_id** (point32): x-only public key of the offering node
- **node\_id** (pubkey): public key of the offering node
- **signature** (bip340sig): BIP-340 signature of the *node_id* on this offer
- **amount\_msat** (msat): the amount in bitcoin
- **description** (string): the description of the purpose of the offer
@@ -95,7 +95,7 @@ If **type** is "bolt12 invoice", and **valid** is *true*:
- **recurrence\_counter** (u32, optional): the 0-based counter for a recurring payment
- **recurrence\_start** (u32, optional): the optional start period for a recurring payment
- **recurrence\_basetime** (u32, optional): the UNIX timestamp of the first recurrence period start
- **payer\_key** (point32, optional): the transient key which identifies the payer
- **payer\_key** (pubkey, optional): the transient key which identifies the payer
- **payer\_info** (hex, optional): the payer-provided blob to derive payer_key
- **fallbacks** (array of objects, optional): onchain addresses:
- **version** (u8): Segwit address version
@@ -123,7 +123,7 @@ If **type** is "bolt12 invoice", and **valid** is *false*:
If **type** is "bolt12 invoice_request", and **valid** is *true*:
- **offer\_id** (hex): the id of the offer this is requesting (merkle hash of non-signature fields) (always 64 characters)
- **payer\_key** (point32): the transient key which identifies the payer
- **payer\_key** (pubkey): the transient key which identifies the payer
- **chain** (hex, optional): which blockchain this invoice_request is for (missing implies bitcoin mainnet only) (always 64 characters)
- **amount\_msat** (msat, optional): the amount in bitcoin
- **features** (hex, optional): the array of feature bits for this offer
@@ -211,4 +211,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:610b6f9d61e79b503ff81cc164f79ea90883c6d10f5e7b28555aefabfd6e17bb)
[comment]: # ( SHA256STAMP:3348f74162c4a2737f1bc50f1903e7e25484747a1bc9ba7d3cd3f30b57589fdf)

View File

@@ -57,8 +57,8 @@
"minLength": 64
},
"node_id": {
"type": "point32",
"description": "x-only public key of the offering node"
"type": "pubkey",
"description": "public key of the offering node"
},
"signature": {
"type": "bip340sig",
@@ -325,8 +325,8 @@
"minLength": 64
},
"node_id": {
"type": "point32",
"description": "x-only public key of the offering node"
"type": "pubkey",
"description": "public key of the offering node"
},
"signature": {
"type": "bip340sig",
@@ -424,7 +424,7 @@
"description": "the UNIX timestamp of the first recurrence period start"
},
"payer_key": {
"type": "point32",
"type": "pubkey",
"description": "the transient key which identifies the payer"
},
"payer_info": {
@@ -652,7 +652,7 @@
"description": "the optional start period for a recurring payment"
},
"payer_key": {
"type": "point32",
"type": "pubkey",
"description": "the transient key which identifies the payer"
},
"payer_info": {