BOLT12 invoice_feature methods for ChannelManager
[rust-lightning] / lightning / src / ln / channelmanager.rs
index 2aa2aab2a80e7b061763f08fd43761c2b044e1eb..4400bde203396ae328522ec3210c81d732b66246 100644 (file)
@@ -43,7 +43,7 @@ use crate::events::{Event, EventHandler, EventsProvider, MessageSendEvent, Messa
 // construct one themselves.
 use crate::ln::{inbound_payment, ChannelId, PaymentHash, PaymentPreimage, PaymentSecret};
 use crate::ln::channel::{Channel, ChannelPhase, ChannelContext, ChannelError, ChannelUpdateStatus, ShutdownResult, UnfundedChannelContext, UpdateFulfillCommitFetch, OutboundV1Channel, InboundV1Channel};
-use crate::ln::features::{ChannelFeatures, ChannelTypeFeatures, InitFeatures, NodeFeatures};
+use crate::ln::features::{Bolt12InvoiceFeatures, ChannelFeatures, ChannelTypeFeatures, InitFeatures, NodeFeatures};
 #[cfg(any(feature = "_test_utils", test))]
 use crate::ln::features::Bolt11InvoiceFeatures;
 use crate::routing::gossip::NetworkGraph;
@@ -8260,6 +8260,12 @@ where
                provided_bolt11_invoice_features(&self.default_configuration)
        }
 
+       /// Fetches the set of [`Bolt12InvoiceFeatures`] flags that are provided by or required by
+       /// [`ChannelManager`].
+       fn bolt12_invoice_features(&self) -> Bolt12InvoiceFeatures {
+               provided_bolt12_invoice_features(&self.default_configuration)
+       }
+
        /// Fetches the set of [`ChannelFeatures`] flags which are provided by or required by
        /// [`ChannelManager`].
        pub fn channel_features(&self) -> ChannelFeatures {
@@ -8821,6 +8827,12 @@ pub(crate) fn provided_bolt11_invoice_features(config: &UserConfig) -> Bolt11Inv
        provided_init_features(config).to_context()
 }
 
+/// Fetches the set of [`Bolt12InvoiceFeatures`] flags that are provided by or required by
+/// [`ChannelManager`].
+pub(crate) fn provided_bolt12_invoice_features(config: &UserConfig) -> Bolt12InvoiceFeatures {
+       provided_init_features(config).to_context()
+}
+
 /// Fetches the set of [`ChannelFeatures`] flags which are provided by or required by
 /// [`ChannelManager`].
 pub(crate) fn provided_channel_features(config: &UserConfig) -> ChannelFeatures {