@@ -77,7 +77,7 @@ struct InvoiceContents {
7777	fallbacks :  Option < Vec < FallbackAddress > > , 
7878	features :  Bolt12InvoiceFeatures , 
7979	signing_pubkey :  PublicKey , 
80- 	message_paths :  Vec < BlindedPath > , 
80+ 	async_receive_paths :  Vec < BlindedPath > , 
8181} 
8282
8383/// Builds a [`StaticInvoice`] from an [`Offer`]. 
@@ -98,14 +98,14 @@ impl<'a> StaticInvoiceBuilder<'a> {
9898/// after `created_at`. 
9999pub  fn  for_offer_using_derived_keys < T :  secp256k1:: Signing > ( 
100100		offer :  & ' a  Offer ,  payment_paths :  Vec < ( BlindedPayInfo ,  BlindedPath ) > , 
101- 		message_paths :  Vec < BlindedPath > ,  created_at :  Duration ,  expanded_key :  & ExpandedKey , 
101+ 		async_receive_paths :  Vec < BlindedPath > ,  created_at :  Duration ,  expanded_key :  & ExpandedKey , 
102102		secp_ctx :  & Secp256k1 < T > , 
103103	)  -> Result < Self ,  Bolt12SemanticError >  { 
104104		if  offer. chains ( ) . len ( )  > 1  { 
105105			return  Err ( Bolt12SemanticError :: UnexpectedChain ) ; 
106106		} 
107107
108- 		if  payment_paths. is_empty ( )  || message_paths . is_empty ( )  || offer. paths ( ) . is_empty ( )  { 
108+ 		if  payment_paths. is_empty ( )  || async_receive_paths . is_empty ( )  || offer. paths ( ) . is_empty ( )  { 
109109			return  Err ( Bolt12SemanticError :: MissingPaths ) ; 
110110		} 
111111
@@ -123,8 +123,13 @@ impl<'a> StaticInvoiceBuilder<'a> {
123123			return  Err ( Bolt12SemanticError :: InvalidSigningPubkey ) ; 
124124		} 
125125
126- 		let  invoice =
127- 			InvoiceContents :: new ( offer,  payment_paths,  message_paths,  created_at,  signing_pubkey) ; 
126+ 		let  invoice = InvoiceContents :: new ( 
127+ 			offer, 
128+ 			payment_paths, 
129+ 			async_receive_paths, 
130+ 			created_at, 
131+ 			signing_pubkey, 
132+ 		) ; 
128133
129134		Ok ( Self  {  offer_bytes :  & offer. bytes ,  invoice,  keys } ) 
130135	} 
@@ -230,8 +235,8 @@ macro_rules! invoice_accessors { ($self: ident, $contents: expr) => {
230235
231236	/// Paths to the recipient for indicating that a held HTLC is available to claim when they next 
232237/// come online. 
233- pub  fn  message_paths ( & $self)  -> & [ BlindedPath ]  { 
234- 		$contents. message_paths ( ) 
238+ pub  fn  async_receive_paths ( & $self)  -> & [ BlindedPath ]  { 
239+ 		$contents. async_receive_paths ( ) 
235240	} 
236241
237242	/// The quantity of items supported, from [`Offer::supported_quantity`]. 
@@ -327,12 +332,12 @@ impl InvoiceContents {
327332
328333	fn  new ( 
329334		offer :  & Offer ,  payment_paths :  Vec < ( BlindedPayInfo ,  BlindedPath ) > , 
330- 		message_paths :  Vec < BlindedPath > ,  created_at :  Duration ,  signing_pubkey :  PublicKey , 
335+ 		async_receive_paths :  Vec < BlindedPath > ,  created_at :  Duration ,  signing_pubkey :  PublicKey , 
331336	)  -> Self  { 
332337		Self  { 
333338			offer :  offer. contents . clone ( ) , 
334339			payment_paths, 
335- 			message_paths , 
340+ 			async_receive_paths , 
336341			created_at, 
337342			relative_expiry :  None , 
338343			fallbacks :  None , 
@@ -352,7 +357,7 @@ impl InvoiceContents {
352357
353358		let  invoice = InvoiceTlvStreamRef  { 
354359			paths :  Some ( Iterable ( self . payment_paths . iter ( ) . map ( |( _,  path) | path) ) ) , 
355- 			message_paths :  Some ( self . message_paths . as_ref ( ) ) , 
360+ 			invoice_message_paths :  Some ( self . async_receive_paths . as_ref ( ) ) , 
356361			blindedpay :  Some ( Iterable ( self . payment_paths . iter ( ) . map ( |( payinfo,  _) | payinfo) ) ) , 
357362			created_at :  Some ( self . created_at . as_secs ( ) ) , 
358363			relative_expiry :  self . relative_expiry . map ( |duration| duration. as_secs ( )  as  u32 ) , 
@@ -399,8 +404,8 @@ impl InvoiceContents {
399404		self . offer . paths ( ) 
400405	} 
401406
402- 	fn  message_paths ( & self )  -> & [ BlindedPath ]  { 
403- 		& self . message_paths [ ..] 
407+ 	fn  async_receive_paths ( & self )  -> & [ BlindedPath ]  { 
408+ 		& self . async_receive_paths [ ..] 
404409	} 
405410
406411	fn  supported_quantity ( & self )  -> Quantity  { 
@@ -510,7 +515,7 @@ impl TryFrom<PartialInvoiceTlvStream> for InvoiceContents {
510515				fallbacks, 
511516				features, 
512517				node_id, 
513- 				message_paths , 
518+ 				invoice_message_paths , 
514519				payment_hash, 
515520				amount, 
516521			} , 
@@ -524,7 +529,7 @@ impl TryFrom<PartialInvoiceTlvStream> for InvoiceContents {
524529		} 
525530
526531		let  payment_paths = construct_payment_paths ( blindedpay,  paths) ?; 
527- 		let  message_paths  = message_paths . ok_or ( Bolt12SemanticError :: MissingPaths ) ?; 
532+ 		let  async_receive_paths  = invoice_message_paths . ok_or ( Bolt12SemanticError :: MissingPaths ) ?; 
528533
529534		let  created_at = match  created_at { 
530535			None  => return  Err ( Bolt12SemanticError :: MissingCreationTime ) , 
@@ -548,7 +553,7 @@ impl TryFrom<PartialInvoiceTlvStream> for InvoiceContents {
548553		Ok ( InvoiceContents  { 
549554			offer :  OfferContents :: try_from ( offer_tlv_stream) ?, 
550555			payment_paths, 
551- 			message_paths , 
556+ 			async_receive_paths , 
552557			created_at, 
553558			relative_expiry, 
554559			fallbacks, 
@@ -679,7 +684,7 @@ mod tests {
679684		assert_eq ! ( invoice. offer_features( ) ,  & OfferFeatures :: empty( ) ) ; 
680685		assert_eq ! ( invoice. absolute_expiry( ) ,  None ) ; 
681686		assert_eq ! ( invoice. offer_request_paths( ) ,  & [ blinded_path( ) ] ) ; 
682- 		assert_eq ! ( invoice. message_paths ( ) ,  & [ blinded_path( ) ] ) ; 
687+ 		assert_eq ! ( invoice. async_receive_paths ( ) ,  & [ blinded_path( ) ] ) ; 
683688		assert_eq ! ( invoice. issuer( ) ,  None ) ; 
684689		assert_eq ! ( invoice. supported_quantity( ) ,  Quantity :: One ) ; 
685690		assert_ne ! ( invoice. signing_pubkey( ) ,  recipient_pubkey( ) ) ; 
@@ -726,7 +731,7 @@ mod tests {
726731					fallbacks:  None , 
727732					features:  None , 
728733					node_id:  Some ( & offer_signing_pubkey) , 
729- 					message_paths :  Some ( & paths) , 
734+ 					invoice_message_paths :  Some ( & paths) , 
730735				} , 
731736				SignatureTlvStreamRef  {  signature:  Some ( & invoice. signature( ) )  } , 
732737			) 
@@ -1055,9 +1060,9 @@ mod tests {
10551060		} 
10561061
10571062		// Error if message paths are missing. 
1058- 		let  missing_message_paths_invoice  = invoice ( ) ; 
1059- 		let  mut  tlv_stream = missing_message_paths_invoice . as_tlv_stream ( ) ; 
1060- 		tlv_stream. 1 . message_paths  = None ; 
1063+ 		let  missing_async_receive_paths_invoice  = invoice ( ) ; 
1064+ 		let  mut  tlv_stream = missing_async_receive_paths_invoice . as_tlv_stream ( ) ; 
1065+ 		tlv_stream. 1 . invoice_message_paths  = None ; 
10611066		match  StaticInvoice :: try_from ( tlv_stream_to_bytes ( & tlv_stream) )  { 
10621067			Ok ( _)  => panic ! ( "expected error" ) , 
10631068			Err ( e)  => { 
0 commit comments