@@ -18,7 +18,7 @@ pub mod bump_transaction;
18
18
19
19
pub use bump_transaction:: BumpTransactionEvent ;
20
20
21
- use crate :: blinded_path:: message:: OffersContext ;
21
+ use crate :: blinded_path:: message:: { BlindedMessagePath , OffersContext } ;
22
22
use crate :: blinded_path:: payment:: {
23
23
Bolt12OfferContext , Bolt12RefundContext , PaymentContext , PaymentContextRef ,
24
24
} ;
@@ -28,6 +28,7 @@ use crate::ln::channelmanager::{InterceptId, PaymentId, RecipientOnionFields};
28
28
use crate :: ln:: types:: ChannelId ;
29
29
use crate :: ln:: { msgs, LocalHTLCFailureReason } ;
30
30
use crate :: offers:: invoice:: Bolt12Invoice ;
31
+ use crate :: offers:: invoice_request:: InvoiceRequest ;
31
32
use crate :: offers:: static_invoice:: StaticInvoice ;
32
33
use crate :: onion_message:: messenger:: Responder ;
33
34
use crate :: routing:: gossip:: NetworkUpdate ;
@@ -1654,6 +1655,13 @@ pub enum Event {
1654
1655
/// The invoice that should be persisted and later provided to payers when handling a future
1655
1656
/// [`Event::StaticInvoiceRequested`].
1656
1657
invoice : StaticInvoice ,
1658
+ /// The path to where invoice requests will be forwarded. If we receive an invoice
1659
+ /// request, we'll forward it to the async recipient over this path in case the
1660
+ /// recipient is online to provide a new invoice. This path should be persisted and
1661
+ /// later provided to [`ChannelManager::respond_to_static_invoice_request`].
1662
+ ///
1663
+ /// [`ChannelManager::respond_to_static_invoice_request`]: crate::ln::channelmanager::ChannelManager::respond_to_static_invoice_request
1664
+ invoice_request_path : BlindedMessagePath ,
1657
1665
/// Useful for the recipient to replace a specific invoice stored by us as the static invoice
1658
1666
/// server.
1659
1667
///
@@ -1686,12 +1694,14 @@ pub enum Event {
1686
1694
///
1687
1695
/// If we previously persisted a [`StaticInvoice`] from an [`Event::PersistStaticInvoice`] that
1688
1696
/// matches the below `recipient_id` and `invoice_slot`, that invoice should be retrieved now
1689
- /// and forwarded to the payer via [`ChannelManager::send_static_invoice`].
1697
+ /// and forwarded to the payer via [`ChannelManager::respond_to_static_invoice_request`].
1698
+ /// The invoice request path previously persisted from [`Event::PersistStaticInvoice`] should
1699
+ /// also be provided in [`ChannelManager::respond_to_static_invoice_request`].
1690
1700
///
1691
1701
/// [`ChannelManager::blinded_paths_for_async_recipient`]: crate::ln::channelmanager::ChannelManager::blinded_paths_for_async_recipient
1692
1702
/// [`ChannelManager::set_paths_to_static_invoice_server`]: crate::ln::channelmanager::ChannelManager::set_paths_to_static_invoice_server
1693
1703
/// [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
1694
- /// [`ChannelManager::send_static_invoice `]: crate::ln::channelmanager::ChannelManager::send_static_invoice
1704
+ /// [`ChannelManager::respond_to_static_invoice_request `]: crate::ln::channelmanager::ChannelManager::respond_to_static_invoice_request
1695
1705
StaticInvoiceRequested {
1696
1706
/// An identifier for the recipient previously surfaced in
1697
1707
/// [`Event::PersistStaticInvoice::recipient_id`]. Useful when paired with the `invoice_slot` to
@@ -1702,10 +1712,16 @@ pub enum Event {
1702
1712
/// retrieve the [`StaticInvoice`] requested by the payer.
1703
1713
invoice_slot : u16 ,
1704
1714
/// The path over which the [`StaticInvoice`] will be sent to the payer, which should be
1705
- /// provided to [`ChannelManager::send_static_invoice `] along with the invoice.
1715
+ /// provided to [`ChannelManager::respond_to_static_invoice_request `] along with the invoice.
1706
1716
///
1707
- /// [`ChannelManager::send_static_invoice `]: crate::ln::channelmanager::ChannelManager::send_static_invoice
1717
+ /// [`ChannelManager::respond_to_static_invoice_request `]: crate::ln::channelmanager::ChannelManager::respond_to_static_invoice_request
1708
1718
reply_path : Responder ,
1719
+ /// The invoice request that will be forwarded to the async recipient to give the
1720
+ /// recipient a chance to provide an invoice in case it is online. It should be
1721
+ /// provided to [`ChannelManager::respond_to_static_invoice_request`].
1722
+ ///
1723
+ /// [`ChannelManager::respond_to_static_invoice_request`]: crate::ln::channelmanager::ChannelManager::respond_to_static_invoice_request
1724
+ invoice_request : InvoiceRequest ,
1709
1725
} ,
1710
1726
/// Indicates that a channel funding transaction constructed interactively is ready to be
1711
1727
/// signed. This event will only be triggered if at least one input was contributed.
0 commit comments