@@ -21,7 +21,7 @@ use crate::blinded_path::utils;
21
21
use crate :: io;
22
22
use crate :: io:: Cursor ;
23
23
use crate :: ln:: channelmanager:: PaymentId ;
24
- use crate :: ln:: onion_utils;
24
+ use crate :: ln:: { PaymentHash , onion_utils} ;
25
25
use crate :: offers:: nonce:: Nonce ;
26
26
use crate :: onion_message:: packet:: ControlTlvs ;
27
27
use crate :: sign:: { NodeSigner , Recipient } ;
@@ -152,6 +152,18 @@ pub enum OffersContext {
152
152
/// [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
153
153
nonce : Nonce ,
154
154
} ,
155
+ /// Context used by a [`BlindedPath`] as a reply path for a [`Bolt12Invoice`].
156
+ ///
157
+ /// This variant is intended to be received when handling an [`InvoiceError`].
158
+ ///
159
+ /// [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
160
+ /// [`InvoiceError`]: crate::offers::invoice_error::InvoiceError
161
+ InboundPayment {
162
+ /// The same payment hash as [`Bolt12Invoice::payment_hash`].
163
+ ///
164
+ /// [`Bolt12Invoice::payment_hash`]: crate::offers::invoice::Bolt12Invoice::payment_hash
165
+ payment_hash : PaymentHash ,
166
+ } ,
155
167
}
156
168
157
169
impl_writeable_tlv_based_enum ! ( MessageContext ,
@@ -168,6 +180,9 @@ impl_writeable_tlv_based_enum!(OffersContext,
168
180
( 0 , payment_id, required) ,
169
181
( 1 , nonce, required) ,
170
182
} ,
183
+ ( 3 , InboundPayment ) => {
184
+ ( 0 , payment_hash, required) ,
185
+ } ,
171
186
) ;
172
187
173
188
/// Construct blinded onion message hops for the given `intermediate_nodes` and `recipient_node_id`.
0 commit comments