Skip to content

Commit cd85a80

Browse files
authored
Merge pull request #4083 from TheBlueMatt/2025-09-deprecate-direct-chanman-hrn-resolution
Deprecate `pay_for_offer_from_human_readable_name`
2 parents 2e61d94 + cface29 commit cd85a80

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

lightning-dns-resolver/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,7 @@ mod test {
388388
let amt = 42_000;
389389
let mut opts = OptionalOfferPaymentParams::default();
390390
opts.payer_note = payer_note.clone();
391+
#[allow(deprecated)]
391392
nodes[0]
392393
.node
393394
.pay_for_offer_from_human_readable_name(name, amt, payment_id, opts, resolvers)

lightning/src/ln/channelmanager.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12592,13 +12592,10 @@ where
1259212592
/// Pays for an [`Offer`] looked up using [BIP 353] Human Readable Names resolved by the DNS
1259312593
/// resolver(s) at `dns_resolvers` which resolve names according to [bLIP 32].
1259412594
///
12595-
/// If the wallet supports paying on-chain schemes, you should instead use
12596-
/// [`OMNameResolver::resolve_name`] and [`OMNameResolver::handle_dnssec_proof_for_uri`] (by
12597-
/// implementing [`DNSResolverMessageHandler`]) directly to look up a URI and then delegate to
12598-
/// your normal URI handling.
12599-
///
12600-
/// Alternatively, the [`bitcoin-payment-instructions`] crate provides an implementation of
12601-
/// much of this logic, and may be useful to decode and resolve payment instructions generally.
12595+
/// Because most wallets support on-chain or other payment schemes beyond only offers, this is
12596+
/// deprecated in favor of the [`bitcoin-payment-instructions`] crate, which can be used to
12597+
/// build an [`OfferFromHrn`] and call [`Self::pay_for_offer_from_hrn`]. Thus, this method is
12598+
/// deprecated.
1260212599
///
1260312600
/// # Payment
1260412601
///
@@ -12630,6 +12627,7 @@ where
1263012627
/// [`PaymentFailureReason::UserAbandoned`]: crate::events::PaymentFailureReason::UserAbandoned
1263112628
/// [`PaymentFailureReason::InvoiceRequestRejected`]: crate::events::PaymentFailureReason::InvoiceRequestRejected
1263212629
#[cfg(feature = "dnssec")]
12630+
#[deprecated(note = "Use bitcoin-payment-instructions and pay_for_offer_from_hrn instead")]
1263312631
pub fn pay_for_offer_from_human_readable_name(
1263412632
&self, name: HumanReadableName, amount_msats: u64, payment_id: PaymentId,
1263512633
optional_params: OptionalOfferPaymentParams, dns_resolvers: Vec<Destination>,

0 commit comments

Comments
 (0)