@@ -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 } ;
@@ -137,6 +137,17 @@ pub enum OffersContext {
137
137
/// [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
138
138
payment_id : PaymentId
139
139
} ,
140
+ /// Context used by a [`BlindedPath`] for replying to a [`Bolt12Invoice`] with an
141
+ /// [`InvoiceError`].
142
+ ///
143
+ /// [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
144
+ /// [`InvoiceError`]: crate::offers::invoice_error::InvoiceError
145
+ InboundPayment {
146
+ /// The same payment hash as [`Bolt12Invoice::payment_hash`].
147
+ ///
148
+ /// [`Bolt12Invoice::payment_hash`]: crate::offers::invoice::Bolt12Invoice::payment_hash
149
+ payment_hash : PaymentHash ,
150
+ } ,
140
151
}
141
152
142
153
impl_writeable_tlv_based_enum ! ( MessageContext , ;
@@ -152,6 +163,9 @@ impl_writeable_tlv_based_enum!(OffersContext,
152
163
( 2 , OutboundPayment ) => {
153
164
( 0 , payment_id, required) ,
154
165
} ,
166
+ ( 3 , InboundPayment ) => {
167
+ ( 0 , payment_hash, required) ,
168
+ } ,
155
169
; ) ;
156
170
157
171
/// Construct blinded onion message hops for the given `intermediate_nodes` and `recipient_node_id`.
0 commit comments