Skip to content

Conversation

@Dhanraj30
Copy link

hrn.rs | New file for HRN-related functionality.
mod.rs | Expose the HrnPayment struct and its methods.
error.rs | Add new error variants for HRN resolution failures.
store.rs | Extend PaymentDetails to include HRN metadata if needed.

TODO:

Implement the actual HRN resolution logic in the resolve_hrn_to_offer method.

Copy link
Collaborator

@tnull tnull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for looking into this, but it seems this PR is unfortunately going in the wrong direction.

LDK 0.1 already implements everything needed for HRN resolution when using the pay_for_offer_from_human_readable_name API.

We however need to implement some logic to retrieve, rank, and filter DNS resolver Destinations from the network graph, and possibly also allowing the user to override specific DNS resolvers via theConfig objects, which all need to be exposeable in Uniffi bindings.

I'm also still not sure if at the current state (where LDK's API only supports paying Offers from HRNs), we already need a new payment API object, or if this should just live on Bolt12Payment for now.

Error::OfferCreationFailed
})?;

let offer = offer_builder
Copy link
Contributor

@TheBlueMatt TheBlueMatt Jan 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're building an offer which we can use to receive payment to ourselves and then trying to pay it, paying ourselves. Instead, you need to look at the lightning-dns-resolver crate and its contained resolver to resolve the HRN to a URI.

@tnull
Copy link
Collaborator

tnull commented Mar 28, 2025

Closing this as abandoned.

@tnull tnull closed this Mar 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants