From: Jeffrey Czyz Date: Wed, 6 Nov 2024 22:53:07 +0000 (-0600) Subject: Deprecate functions in invoice_utils module X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=b6ceafb4f6f8a1957d27d788e9f811e39cd4e5b1;p=rust-lightning Deprecate functions in invoice_utils module ChannelManager::create_bolt11_invoice is a simpler and more flexible way of creating a BOLT11 invoice, so deprecate the corresponding functions in the invoice_utils module. --- diff --git a/lightning/src/ln/invoice_utils.rs b/lightning/src/ln/invoice_utils.rs index be1b430dd..a39222c3f 100644 --- a/lightning/src/ln/invoice_utils.rs +++ b/lightning/src/ln/invoice_utils.rs @@ -313,6 +313,7 @@ fn rotate_through_iterators>(mut vecs: Vec) -> impl }) } +#[deprecated(note = "Use ChannelManager::create_bolt11_invoice instead.")] /// Utility to construct an invoice. Generally, unless you want to do something like a custom /// cltv_expiry, this is what you should be using to create an invoice. The reason being, this /// method stores the invoice's payment secret and preimage in `ChannelManager`, so (a) the user @@ -354,6 +355,7 @@ where channelmanager.create_bolt11_invoice(params) } +#[deprecated(note = "Use ChannelManager::create_bolt11_invoice instead.")] /// Utility to construct an invoice. Generally, unless you want to do something like a custom /// cltv_expiry, this is what you should be using to create an invoice. The reason being, this /// method stores the invoice's payment secret and preimage in `ChannelManager`, so (a) the user @@ -396,6 +398,7 @@ where channelmanager.create_bolt11_invoice(params) } +#[deprecated(note = "Use ChannelManager::create_bolt11_invoice instead.")] /// See [`create_invoice_from_channelmanager`]. /// /// This version allows for providing custom [`PaymentHash`] and description hash for the invoice. @@ -429,6 +432,7 @@ where channelmanager.create_bolt11_invoice(params) } +#[deprecated(note = "Use ChannelManager::create_bolt11_invoice instead.")] /// See [`create_invoice_from_channelmanager`]. /// /// This version allows for providing a custom [`PaymentHash`] for the invoice.