@@ -18,7 +18,7 @@ pub mod bump_transaction;
1818
1919pub use bump_transaction:: BumpTransactionEvent ;
2020
21- use crate :: blinded_path:: message:: OffersContext ;
21+ use crate :: blinded_path:: message:: { BlindedMessagePath , OffersContext } ;
2222use crate :: blinded_path:: payment:: {
2323 Bolt12OfferContext , Bolt12RefundContext , PaymentContext , PaymentContextRef ,
2424} ;
@@ -28,6 +28,7 @@ use crate::ln::channelmanager::{InterceptId, PaymentId, RecipientOnionFields};
2828use crate :: ln:: types:: ChannelId ;
2929use crate :: ln:: { msgs, LocalHTLCFailureReason } ;
3030use crate :: offers:: invoice:: Bolt12Invoice ;
31+ use crate :: offers:: invoice_request:: InvoiceRequest ;
3132use crate :: offers:: static_invoice:: StaticInvoice ;
3233use crate :: onion_message:: messenger:: Responder ;
3334use crate :: routing:: gossip:: NetworkUpdate ;
@@ -1654,6 +1655,15 @@ pub enum Event {
16541655 /// The invoice that should be persisted and later provided to payers when handling a future
16551656 /// [`Event::StaticInvoiceRequested`].
16561657 invoice : StaticInvoice ,
1658+ /// The path to where invoice requests will be forwarded. As a static invoice
1659+ /// server, if we receive an invoice request on behalf of an async recipient, a static
1660+ /// invoice will be provided to the payer. However, we'll also forward the invoice
1661+ /// request to this path to the async recipient in case it is online so that the
1662+ /// recipient can provide a new invoice. This path should be persisted and later
1663+ /// provided to [`ChannelManager::send_response_static_invoice_request`].
1664+ ///
1665+ /// [`ChannelManager::send_response_static_invoice_request`]: crate::ln::channelmanager::ChannelManager::send_response_static_invoice_request
1666+ invoice_request_path : BlindedMessagePath ,
16571667 /// Useful for the recipient to replace a specific invoice stored by us as the static invoice
16581668 /// server.
16591669 ///
@@ -1686,12 +1696,14 @@ pub enum Event {
16861696 ///
16871697 /// If we previously persisted a [`StaticInvoice`] from an [`Event::PersistStaticInvoice`] that
16881698 /// 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`].
1699+ /// and forwarded to the payer via [`ChannelManager::send_response_static_invoice_request`].
1700+ /// The invoice request path previously persisted from [`Event::PersistStaticInvoice`] should
1701+ /// also be provided in [`ChannelManager::send_response_static_invoice_request`].
16901702 ///
16911703 /// [`ChannelManager::blinded_paths_for_async_recipient`]: crate::ln::channelmanager::ChannelManager::blinded_paths_for_async_recipient
16921704 /// [`ChannelManager::set_paths_to_static_invoice_server`]: crate::ln::channelmanager::ChannelManager::set_paths_to_static_invoice_server
16931705 /// [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
1694- /// [`ChannelManager::send_static_invoice `]: crate::ln::channelmanager::ChannelManager::send_static_invoice
1706+ /// [`ChannelManager::send_response_static_invoice_request `]: crate::ln::channelmanager::ChannelManager::send_response_static_invoice_request
16951707 StaticInvoiceRequested {
16961708 /// An identifier for the recipient previously surfaced in
16971709 /// [`Event::PersistStaticInvoice::recipient_id`]. Useful when paired with the `invoice_slot` to
@@ -1702,10 +1714,15 @@ pub enum Event {
17021714 /// retrieve the [`StaticInvoice`] requested by the payer.
17031715 invoice_slot : u16 ,
17041716 /// 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.
1717+ /// provided to [`ChannelManager::send_response_static_invoice_request `] along with the invoice.
17061718 ///
1707- /// [`ChannelManager::send_static_invoice `]: crate::ln::channelmanager::ChannelManager::send_static_invoice
1719+ /// [`ChannelManager::send_response_static_invoice_request `]: crate::ln::channelmanager::ChannelManager::send_response_static_invoice_request
17081720 reply_path : Responder ,
1721+ /// The invoice request that will be forwarded to the async recipient to give it a
1722+ /// chance to provide an invoice in case it is online. It should be provided to [`ChannelManager::send_response_static_invoice_request`].
1723+ ///
1724+ /// [`ChannelManager::send_response_static_invoice_request`]: crate::ln::channelmanager::ChannelManager::send_response_static_invoice_request
1725+ invoice_request : InvoiceRequest ,
17091726 } ,
17101727 /// Indicates that a channel funding transaction constructed interactively is ready to be
17111728 /// signed. This event will only be triggered if at least one input was contributed.
0 commit comments