@@ -159,6 +159,14 @@ mod sealed {
159
159
] ) ;
160
160
define_context ! ( OfferContext , [ ] ) ;
161
161
define_context ! ( InvoiceRequestContext , [ ] ) ;
162
+ define_context ! ( Bolt12InvoiceContext , [
163
+ // Byte 0
164
+ ,
165
+ // Byte 1
166
+ ,
167
+ // Byte 2
168
+ BasicMPP ,
169
+ ] ) ;
162
170
// This isn't a "real" feature context, and is only used in the channel_type field in an
163
171
// `OpenChannel` message.
164
172
define_context ! ( ChannelTypeContext , [
@@ -342,7 +350,7 @@ mod sealed {
342
350
define_feature ! ( 15 , PaymentSecret , [ InitContext , NodeContext , InvoiceContext ] ,
343
351
"Feature flags for `payment_secret`." , set_payment_secret_optional, set_payment_secret_required,
344
352
supports_payment_secret, requires_payment_secret) ;
345
- define_feature ! ( 17 , BasicMPP , [ InitContext , NodeContext , InvoiceContext ] ,
353
+ define_feature ! ( 17 , BasicMPP , [ InitContext , NodeContext , InvoiceContext , Bolt12InvoiceContext ] ,
346
354
"Feature flags for `basic_mpp`." , set_basic_mpp_optional, set_basic_mpp_required,
347
355
supports_basic_mpp, requires_basic_mpp) ;
348
356
define_feature ! ( 19 , Wumbo , [ InitContext , NodeContext ] ,
@@ -369,7 +377,7 @@ mod sealed {
369
377
370
378
#[ cfg( test) ]
371
379
define_feature ! ( 123456789 , UnknownFeature ,
372
- [ NodeContext , ChannelContext , InvoiceContext , OfferContext , InvoiceRequestContext ] ,
380
+ [ NodeContext , ChannelContext , InvoiceContext , OfferContext , InvoiceRequestContext , Bolt12InvoiceContext ] ,
373
381
"Feature flags for an unknown feature used in testing." , set_unknown_feature_optional,
374
382
set_unknown_feature_required, supports_unknown_test_feature, requires_unknown_test_feature) ;
375
383
}
@@ -432,6 +440,8 @@ pub type InvoiceFeatures = Features<sealed::InvoiceContext>;
432
440
pub type OfferFeatures = Features < sealed:: OfferContext > ;
433
441
/// Features used within an `invoice_request`.
434
442
pub type InvoiceRequestFeatures = Features < sealed:: InvoiceRequestContext > ;
443
+ /// Features used within an `invoice`.
444
+ pub type Bolt12InvoiceFeatures = Features < sealed:: Bolt12InvoiceContext > ;
435
445
436
446
/// Features used within the channel_type field in an OpenChannel message.
437
447
///
0 commit comments