mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 09:54:16 +01:00
1e3cb01546
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>
7.9 KiB
7.9 KiB
1 | tlvtype,offer,offer_chains,2 |
---|---|
2 | tlvdata,offer,offer_chains,chains,chain_hash,... |
3 | tlvtype,offer,offer_metadata,4 |
4 | tlvdata,offer,offer_metadata,data,byte,... |
5 | tlvtype,offer,offer_currency,6 |
6 | tlvdata,offer,offer_currency,iso4217,utf8,... |
7 | tlvtype,offer,offer_amount,8 |
8 | tlvdata,offer,offer_amount,amount,tu64, |
9 | tlvtype,offer,offer_description,10 |
10 | tlvdata,offer,offer_description,description,utf8,... |
11 | tlvtype,offer,offer_features,12 |
12 | tlvdata,offer,offer_features,features,byte,... |
13 | tlvtype,offer,offer_absolute_expiry,14 |
14 | tlvdata,offer,offer_absolute_expiry,seconds_from_epoch,tu64, |
15 | tlvtype,offer,offer_paths,16 |
16 | tlvdata,offer,offer_paths,paths,blinded_path,... |
17 | tlvtype,offer,offer_issuer,18 |
18 | tlvdata,offer,offer_issuer,issuer,utf8,... |
19 | tlvtype,offer,offer_quantity_max,20 |
20 | tlvdata,offer,offer_quantity_max,max,tu64, |
21 | tlvtype,offer,offer_node_id,22 |
22 | tlvdata,offer,offer_node_id,node_id,point, |
23 | tlvtype,offer,offer_recurrence,26 |
24 | tlvdata,offer,offer_recurrence,recurrence,recurrence, |
25 | tlvtype,offer,offer_recurrence_paywindow,28 |
26 | tlvdata,offer,offer_recurrence_paywindow,paywindow,recurrence_paywindow, |
27 | tlvtype,offer,offer_recurrence_limit,30 |
28 | tlvdata,offer,offer_recurrence_limit,max_period,tu32, |
29 | tlvtype,offer,offer_recurrence_base,32 |
30 | tlvdata,offer,offer_recurrence_base,base,recurrence_base, |
31 | tlvtype,invoice_request,invreq_metadata,0 |
32 | tlvdata,invoice_request,invreq_metadata,blob,byte,... |
33 | tlvtype,invoice_request,offer_chains,2 |
34 | tlvdata,invoice_request,offer_chains,chains,chain_hash,... |
35 | tlvtype,invoice_request,offer_metadata,4 |
36 | tlvdata,invoice_request,offer_metadata,data,byte,... |
37 | tlvtype,invoice_request,offer_currency,6 |
38 | tlvdata,invoice_request,offer_currency,iso4217,utf8,... |
39 | tlvtype,invoice_request,offer_amount,8 |
40 | tlvdata,invoice_request,offer_amount,amount,tu64, |
41 | tlvtype,invoice_request,offer_description,10 |
42 | tlvdata,invoice_request,offer_description,description,utf8,... |
43 | tlvtype,invoice_request,offer_features,12 |
44 | tlvdata,invoice_request,offer_features,features,byte,... |
45 | tlvtype,invoice_request,offer_absolute_expiry,14 |
46 | tlvdata,invoice_request,offer_absolute_expiry,seconds_from_epoch,tu64, |
47 | tlvtype,invoice_request,offer_paths,16 |
48 | tlvdata,invoice_request,offer_paths,paths,blinded_path,... |
49 | tlvtype,invoice_request,offer_issuer,18 |
50 | tlvdata,invoice_request,offer_issuer,issuer,utf8,... |
51 | tlvtype,invoice_request,offer_quantity_max,20 |
52 | tlvdata,invoice_request,offer_quantity_max,max,tu64, |
53 | tlvtype,invoice_request,offer_node_id,22 |
54 | tlvdata,invoice_request,offer_node_id,node_id,point, |
55 | tlvtype,invoice_request,offer_recurrence,26 |
56 | tlvdata,invoice_request,offer_recurrence,recurrence,recurrence, |
57 | tlvtype,invoice_request,offer_recurrence_paywindow,28 |
58 | tlvdata,invoice_request,offer_recurrence_paywindow,paywindow,recurrence_paywindow, |
59 | tlvtype,invoice_request,offer_recurrence_limit,30 |
60 | tlvdata,invoice_request,offer_recurrence_limit,max_period,tu32, |
61 | tlvtype,invoice_request,offer_recurrence_base,32 |
62 | tlvdata,invoice_request,offer_recurrence_base,base,recurrence_base, |
63 | tlvtype,invoice_request,invreq_chain,80 |
64 | tlvdata,invoice_request,invreq_chain,chain,chain_hash, |
65 | tlvtype,invoice_request,invreq_amount,82 |
66 | tlvdata,invoice_request,invreq_amount,msat,tu64, |
67 | tlvtype,invoice_request,invreq_features,84 |
68 | tlvdata,invoice_request,invreq_features,features,byte,... |
69 | tlvtype,invoice_request,invreq_quantity,86 |
70 | tlvdata,invoice_request,invreq_quantity,quantity,tu64, |
71 | tlvtype,invoice_request,invreq_payer_id,88 |
72 | tlvdata,invoice_request,invreq_payer_id,key,point, |
73 | tlvtype,invoice_request,invreq_payer_note,89 |
74 | tlvdata,invoice_request,invreq_payer_note,note,utf8,... |
75 | tlvtype,invoice_request,invreq_recurrence_counter,90 |
76 | tlvdata,invoice_request,invreq_recurrence_counter,counter,tu32, |
77 | tlvtype,invoice_request,invreq_recurrence_start,92 |
78 | tlvdata,invoice_request,invreq_recurrence_start,period_offset,tu32, |
79 | tlvtype,invoice_request,signature,240 |
80 | tlvdata,invoice_request,signature,sig,bip340sig, |
81 | tlvtype,invoice,invreq_metadata,0 |
82 | tlvdata,invoice,invreq_metadata,blob,byte,... |
83 | tlvtype,invoice,offer_chains,2 |
84 | tlvdata,invoice,offer_chains,chains,chain_hash,... |
85 | tlvtype,invoice,offer_metadata,4 |
86 | tlvdata,invoice,offer_metadata,data,byte,... |
87 | tlvtype,invoice,offer_currency,6 |
88 | tlvdata,invoice,offer_currency,iso4217,utf8,... |
89 | tlvtype,invoice,offer_amount,8 |
90 | tlvdata,invoice,offer_amount,amount,tu64, |
91 | tlvtype,invoice,offer_description,10 |
92 | tlvdata,invoice,offer_description,description,utf8,... |
93 | tlvtype,invoice,offer_features,12 |
94 | tlvdata,invoice,offer_features,features,byte,... |
95 | tlvtype,invoice,offer_absolute_expiry,14 |
96 | tlvdata,invoice,offer_absolute_expiry,seconds_from_epoch,tu64, |
97 | tlvtype,invoice,offer_paths,16 |
98 | tlvdata,invoice,offer_paths,paths,blinded_path,... |
99 | tlvtype,invoice,offer_issuer,18 |
100 | tlvdata,invoice,offer_issuer,issuer,utf8,... |
101 | tlvtype,invoice,offer_quantity_max,20 |
102 | tlvdata,invoice,offer_quantity_max,max,tu64, |
103 | tlvtype,invoice,offer_node_id,22 |
104 | tlvdata,invoice,offer_node_id,node_id,point, |
105 | tlvtype,invoice,offer_recurrence,26 |
106 | tlvdata,invoice,offer_recurrence,recurrence,recurrence, |
107 | tlvtype,invoice,offer_recurrence_paywindow,28 |
108 | tlvdata,invoice,offer_recurrence_paywindow,paywindow,recurrence_paywindow, |
109 | tlvtype,invoice,offer_recurrence_limit,30 |
110 | tlvdata,invoice,offer_recurrence_limit,max_period,tu32, |
111 | tlvtype,invoice,offer_recurrence_base,32 |
112 | tlvdata,invoice,offer_recurrence_base,base,recurrence_base, |
113 | tlvtype,invoice,invreq_chain,80 |
114 | tlvdata,invoice,invreq_chain,chain,chain_hash, |
115 | tlvtype,invoice,invreq_amount,82 |
116 | tlvdata,invoice,invreq_amount,msat,tu64, |
117 | tlvtype,invoice,invreq_features,84 |
118 | tlvdata,invoice,invreq_features,features,byte,... |
119 | tlvtype,invoice,invreq_quantity,86 |
120 | tlvdata,invoice,invreq_quantity,quantity,tu64, |
121 | tlvtype,invoice,invreq_payer_id,88 |
122 | tlvdata,invoice,invreq_payer_id,key,point, |
123 | tlvtype,invoice,invreq_payer_note,89 |
124 | tlvdata,invoice,invreq_payer_note,note,utf8,... |
125 | tlvtype,invoice,invreq_recurrence_counter,90 |
126 | tlvdata,invoice,invreq_recurrence_counter,counter,tu32, |
127 | tlvtype,invoice,invreq_recurrence_start,92 |
128 | tlvdata,invoice,invreq_recurrence_start,period_offset,tu32, |
129 | tlvtype,invoice,invoice_paths,160 |
130 | tlvdata,invoice,invoice_paths,paths,blinded_path,... |
131 | tlvtype,invoice,invoice_blindedpay,162 |
132 | tlvdata,invoice,invoice_blindedpay,payinfo,blinded_payinfo,... |
133 | tlvtype,invoice,invoice_created_at,164 |
134 | tlvdata,invoice,invoice_created_at,timestamp,tu64, |
135 | tlvtype,invoice,invoice_relative_expiry,166 |
136 | tlvdata,invoice,invoice_relative_expiry,seconds_from_creation,tu32, |
137 | tlvtype,invoice,invoice_payment_hash,168 |
138 | tlvdata,invoice,invoice_payment_hash,payment_hash,sha256, |
139 | tlvtype,invoice,invoice_amount,170 |
140 | tlvdata,invoice,invoice_amount,msat,tu64, |
141 | tlvtype,invoice,invoice_fallbacks,172 |
142 | tlvdata,invoice,invoice_fallbacks,fallbacks,fallback_address,... |
143 | tlvtype,invoice,invoice_features,174 |
144 | tlvdata,invoice,invoice_features,features,byte,... |
145 | tlvtype,invoice,invoice_node_id,176 |
146 | tlvdata,invoice,invoice_node_id,node_id,point, |
147 | tlvtype,invoice,invoice_recurrence_basetime,178 |
148 | tlvdata,invoice,invoice_recurrence_basetime,basetime,tu64, |
149 | tlvtype,invoice,signature,240 |
150 | tlvdata,invoice,signature,sig,bip340sig, |
151 | subtype,recurrence |
152 | subtypedata,recurrence,time_unit,byte, |
153 | subtypedata,recurrence,period,tu32, |
154 | subtype,recurrence_paywindow |
155 | subtypedata,recurrence_paywindow,seconds_before,u32, |
156 | subtypedata,recurrence_paywindow,proportional_amount,byte, |
157 | subtypedata,recurrence_paywindow,seconds_after,tu32, |
158 | subtype,recurrence_base |
159 | subtypedata,recurrence_base,start_any_period,byte, |
160 | subtypedata,recurrence_base,basetime,tu64, |
161 | subtype,blinded_payinfo |
162 | subtypedata,blinded_payinfo,fee_base_msat,u32, |
163 | subtypedata,blinded_payinfo,fee_proportional_millionths,u32, |
164 | subtypedata,blinded_payinfo,cltv_expiry_delta,u16, |
165 | subtypedata,blinded_payinfo,htlc_minimum_msat,u64, |
166 | subtypedata,blinded_payinfo,htlc_maximum_msat,u64, |
167 | subtypedata,blinded_payinfo,flen,u16, |
168 | subtypedata,blinded_payinfo,features,byte,flen |
169 | subtype,fallback_address |
170 | subtypedata,fallback_address,version,byte, |
171 | subtypedata,fallback_address,len,u16, |
172 | subtypedata,fallback_address,address,byte,len |
173 | tlvtype,invoice_error,erroneous_field,1 |
174 | tlvdata,invoice_error,erroneous_field,tlv_fieldnum,tu64, |
175 | tlvtype,invoice_error,suggested_value,3 |
176 | tlvdata,invoice_error,suggested_value,value,byte,... |
177 | tlvtype,invoice_error,error,5 |
178 | tlvdata,invoice_error,error,msg,utf8,... |