@@ -4876,7 +4876,7 @@ where
48764876 ///
48774877 /// # Custom Routing Parameters
48784878 /// Users can customize routing parameters via [`RouteParametersConfig`].
4879- /// To use default settings, call the function with `RouteParametersConfig::default()` .
4879+ /// To use default settings, call the function with [ `RouteParametersConfig::default`] .
48804880 pub fn pay_for_bolt11_invoice(
48814881 &self, invoice: &Bolt11Invoice, payment_id: PaymentId, amount_msats: Option<u64>,
48824882 route_params_config: RouteParametersConfig, retry_strategy: Retry
@@ -10390,8 +10390,10 @@ where
1039010390 /// - `amount_msats` if overpaying what is required for the given `quantity` is desired, and
1039110391 /// - `payer_note` for [`InvoiceRequest::payer_note`].
1039210392 ///
10393- /// If `max_total_routing_fee_msat` is not specified, The default from
10394- /// [`RouteParameters::from_payment_params_and_value`] is applied.
10393+ /// # Custom Routing Parameters
10394+ ///
10395+ /// Users can customize routing parameters via [`RouteParametersConfig`].
10396+ /// To use default settings, call the function with [`RouteParametersConfig::default`].
1039510397 ///
1039610398 /// # Payment
1039710399 ///
@@ -10545,15 +10547,17 @@ where
1054510547 }
1054610548
1054710549 /// Pays for an [`Offer`] looked up using [BIP 353] Human Readable Names resolved by the DNS
10548- /// resolver(s) at `dns_resolvers` which resolve names according to bLIP 32.
10550+ /// resolver(s) at `dns_resolvers` which resolve names according to [ bLIP 32] .
1054910551 ///
1055010552 /// If the wallet supports paying on-chain schemes, you should instead use
1055110553 /// [`OMNameResolver::resolve_name`] and [`OMNameResolver::handle_dnssec_proof_for_uri`] (by
1055210554 /// implementing [`DNSResolverMessageHandler`]) directly to look up a URI and then delegate to
1055310555 /// your normal URI handling.
1055410556 ///
10555- /// If `max_total_routing_fee_msat` is not specified, the default from
10556- /// [`RouteParameters::from_payment_params_and_value`] is applied.
10557+ /// # Custom Routing Parameters
10558+ ///
10559+ /// Users can customize routing parameters via [`RouteParametersConfig`].
10560+ /// To use default settings, call the function with [`RouteParametersConfig::default`].
1055710561 ///
1055810562 /// # Payment
1055910563 ///
@@ -10563,40 +10567,46 @@ where
1056310567 ///
1056410568 /// To revoke the request, use [`ChannelManager::abandon_payment`] prior to receiving the
1056510569 /// invoice. If abandoned, or an invoice isn't received in a reasonable amount of time, the
10566- /// payment will fail with an [`Event::InvoiceRequestFailed`].
10570+ /// payment will fail with an [`PaymentFailureReason::UserAbandoned`] or
10571+ /// [`PaymentFailureReason::InvoiceRequestExpired`], respectively.
1056710572 ///
1056810573 /// # Privacy
1056910574 ///
1057010575 /// For payer privacy, uses a derived payer id and uses [`MessageRouter::create_blinded_paths`]
10571- /// to construct a [`BlindedPath `] for the reply path. For further privacy implications, see the
10576+ /// to construct a [`BlindedMessagePath `] for the reply path. For further privacy implications, see the
1057210577 /// docs of the parameterized [`Router`], which implements [`MessageRouter`].
1057310578 ///
1057410579 /// # Limitations
1057510580 ///
1057610581 /// Requires a direct connection to the given [`Destination`] as well as an introduction node in
10577- /// [`Offer::paths`] or to [`Offer::signing_pubkey `], if empty. A similar restriction applies to
10582+ /// [`Offer::paths`] or to [`Offer::issuer_signing_pubkey `], if empty. A similar restriction applies to
1057810583 /// the responding [`Bolt12Invoice::payment_paths`].
1057910584 ///
1058010585 /// # Errors
1058110586 ///
1058210587 /// Errors if:
1058310588 /// - a duplicate `payment_id` is provided given the caveats in the aforementioned link,
1058410589 ///
10590+ /// [BIP 353]: https://github.com/bitcoin/bips/blob/master/bip-0353.mediawiki
10591+ /// [bLIP 32]: https://github.com/lightning/blips/blob/master/blip-0032.md
1058510592 /// [`Bolt12Invoice::payment_paths`]: crate::offers::invoice::Bolt12Invoice::payment_paths
1058610593 /// [`OMNameResolver::resolve_name`]: crate::onion_message::dns_resolution::OMNameResolver::resolve_name
1058710594 /// [`OMNameResolver::handle_dnssec_proof_for_uri`]: crate::onion_message::dns_resolution::OMNameResolver::handle_dnssec_proof_for_uri
1058810595 /// [Avoiding Duplicate Payments]: #avoiding-duplicate-payments
10596+ /// [`BlindedMessagePath`]: crate::blinded_path::message::BlindedMessagePath
10597+ /// [`PaymentFailureReason::UserAbandoned`]: crate::events::PaymentFailureReason::UserAbandoned
10598+ /// [`PaymentFailureReason::InvoiceRequestRejected`]: crate::events::PaymentFailureReason::InvoiceRequestRejected
1058910599 #[cfg(feature = "dnssec")]
1059010600 pub fn pay_for_offer_from_human_readable_name(
10591- &self, name: HumanReadableName, amount_msats: u64, payment_id: PaymentId,
10601+ &self, name: HumanReadableName, amount_msats: u64, payment_id: PaymentId, payer_note: Option<String>,
1059210602 retry_strategy: Retry, route_params_config: RouteParametersConfig,
1059310603 dns_resolvers: Vec<Destination>,
1059410604 ) -> Result<(), ()> {
1059510605 let (onion_message, context) =
1059610606 self.flow.hrn_resolver.resolve_name(payment_id, name, &*self.entropy_source)?;
1059710607
1059810608 let expiration = StaleExpiration::TimerTicks(1);
10599- self.pending_outbound_payments.add_new_awaiting_offer(payment_id, expiration, retry_strategy, route_params_config, amount_msats)?;
10609+ self.pending_outbound_payments.add_new_awaiting_offer(payment_id, expiration, retry_strategy, route_params_config, amount_msats, payer_note )?;
1060010610
1060110611 self.flow.enqueue_dns_onion_message(
1060210612 onion_message, context, dns_resolvers,
@@ -12463,9 +12473,9 @@ where
1246312473 // offer, but tests can deal with that.
1246412474 offer = replacement_offer;
1246512475 }
12466- if let Ok(amt_msats) = self.pending_outbound_payments.amt_msats_for_payment_awaiting_offer (payment_id) {
12476+ if let Ok(( amt_msats, payer_note)) = self.pending_outbound_payments.params_for_payment_awaiting_offer (payment_id) {
1246712477 let offer_pay_res =
12468- self.pay_for_offer_intern(&offer, None, Some(amt_msats), None , payment_id, Some(name),
12478+ self.pay_for_offer_intern(&offer, None, Some(amt_msats), payer_note , payment_id, Some(name),
1246912479 |invoice_request, nonce| {
1247012480 let retryable_invoice_request = RetryableInvoiceRequest {
1247112481 invoice_request: invoice_request.clone(),
0 commit comments