core-lightning/wire/extracted_bolt12_01_recurrence.patch
Rusty Russell 1e3cb01546 bolt12: import the latest spec, update to fit.
I know this is an unforgivably large diff, but the spec has changed so
much that most of this amounts to a rewrite.

Some points:
* We no longer have "offer_id" fields, we generate that locally, as all
  offer fields are mirrored into invoice_request and then invoice.
* Because of that mirroring, field names all have explicit offer/invreq/invoice
  prefixes.
* The `refund_for` fields have been removed from spec: will re-add locally later.
* quantity_min was removed, max == 0 now mean "must specify a quantity".
* I have put recurrence fields back in locally.

This brings us to 655df03d8729c0918bdacac99eb13fdb0ee93345 ("BOLT 12:
add explicit invoice_node_id.")

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-11-09 15:08:03 +01:00

88 lines
3.9 KiB
Diff

--- wire/bolt12_wire.csv.raw 2022-10-04 13:26:18.105307201 +1030
+++ wire/bolt12_wire.csv 2022-10-04 13:25:59.617242667 +1030
@@ -22,6 +22,14 @@
tlvdata,offer,offer_quantity_max,max,tu64,
tlvtype,offer,offer_node_id,24
tlvdata,offer,offer_node_id,node_id,point,
+tlvtype,offer,offer_recurrence,26
+tlvdata,offer,offer_recurrence,recurrence,recurrence,
+tlvtype,offer,offer_recurrence_paywindow,28
+tlvdata,offer,offer_recurrence_paywindow,paywindow,recurrence_paywindow,
+tlvtype,offer,offer_recurrence_limit,30
+tlvdata,offer,offer_recurrence_limit,max_period,tu32,
+tlvtype,offer,offer_recurrence_base,32
+tlvdata,offer,offer_recurrence_base,base,recurrence_base,
tlvtype,invoice_request,invreq_metadata,0
tlvdata,invoice_request,invreq_metadata,blob,byte,...
tlvtype,invoice_request,offer_chains,2
@@ -48,6 +60,14 @@
tlvdata,invoice_request,offer_quantity_max,max,tu64,
tlvtype,invoice_request,offer_node_id,24
tlvdata,invoice_request,offer_node_id,node_id,point,
+tlvtype,invoice_request,offer_recurrence,26
+tlvdata,invoice_request,offer_recurrence,recurrence,recurrence,
+tlvtype,invoice_request,offer_recurrence_paywindow,28
+tlvdata,invoice_request,offer_recurrence_paywindow,paywindow,recurrence_paywindow,
+tlvtype,invoice_request,offer_recurrence_limit,30
+tlvdata,invoice_request,offer_recurrence_limit,max_period,tu32,
+tlvtype,invoice_request,offer_recurrence_base,32
+tlvdata,invoice_request,offer_recurrence_base,base,recurrence_base,
tlvtype,invoice_request,invreq_chain,80
tlvdata,invoice_request,invreq_chain,chain,chain_hash,
tlvtype,invoice_request,invreq_amount,82
@@ -60,6 +84,10 @@
tlvdata,invoice_request,invreq_payer_id,key,point,
tlvtype,invoice_request,invreq_payer_note,89
tlvdata,invoice_request,invreq_payer_note,note,utf8,...
+tlvtype,invoice_request,invreq_recurrence_counter,90
+tlvdata,invoice_request,invreq_recurrence_counter,counter,tu32,
+tlvtype,invoice_request,invreq_recurrence_start,92
+tlvdata,invoice_request,invreq_recurrence_start,period_offset,tu32,
tlvtype,invoice_request,signature,240
tlvdata,invoice_request,signature,sig,bip340sig,
tlvtype,invoice,invreq_metadata,0
@@ -89,5 +117,13 @@
tlvtype,invoice,offer_node_id,24
tlvdata,invoice,offer_node_id,node_id,point,
+tlvtype,invoice,offer_recurrence,26
+tlvdata,invoice,offer_recurrence,recurrence,recurrence,
+tlvtype,invoice,offer_recurrence_paywindow,28
+tlvdata,invoice,offer_recurrence_paywindow,paywindow,recurrence_paywindow,
+tlvtype,invoice,offer_recurrence_limit,30
+tlvdata,invoice,offer_recurrence_limit,max_period,tu32,
+tlvtype,invoice,offer_recurrence_base,32
+tlvdata,invoice,offer_recurrence_base,base,recurrence_base,
tlvtype,invoice,invreq_chain,80
tlvdata,invoice,invreq_chain,chain,chain_hash,
tlvtype,invoice,invreq_amount,82
@@ -101,6 +141,10 @@
tlvdata,invoice,invreq_payer_id,key,point,
tlvtype,invoice,invreq_payer_note,89
tlvdata,invoice,invreq_payer_note,note,utf8,...
+tlvtype,invoice,invreq_recurrence_counter,90
+tlvdata,invoice,invreq_recurrence_counter,counter,tu32,
+tlvtype,invoice,invreq_recurrence_start,92
+tlvdata,invoice,invreq_recurrence_start,period_offset,tu32,
tlvtype,invoice,invoice_paths,160
tlvdata,invoice,invoice_paths,paths,blinded_path,...
tlvtype,invoice,invoice_blindedpay,162
@@ -119,6 +163,18 @@
tlvdata,invoice,invoice_features,features,byte,...
tlvtype,invoice,invoice_node_id,176
tlvdata,invoice,invoice_node_id,node_id,point,
+tlvtype,invoice,invoice_recurrence_basetime,178
+tlvdata,invoice,invoice_recurrence_basetime,basetime,tu64,
tlvtype,invoice,signature,240
tlvdata,invoice,signature,sig,bip340sig,
+subtype,recurrence
+subtypedata,recurrence,time_unit,byte,
+subtypedata,recurrence,period,tu32,
+subtype,recurrence_paywindow
+subtypedata,recurrence_paywindow,seconds_before,u32,
+subtypedata,recurrence_paywindow,proportional_amount,byte,
+subtypedata,recurrence_paywindow,seconds_after,tu32,
+subtype,recurrence_base
+subtypedata,recurrence_base,start_any_period,byte,
+subtypedata,recurrence_base,basetime,tu64,
subtype,blinded_payinfo