Skip to content

HRN: Emit new event type when Offer has been received and validated #3779

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
tnull opened this issue May 15, 2025 · 3 comments
Open

HRN: Emit new event type when Offer has been received and validated #3779

tnull opened this issue May 15, 2025 · 3 comments
Labels
good first issue Good for newcomers

Comments

@tnull
Copy link
Contributor

tnull commented May 15, 2025

Currently, when using the ChannelManager::pay_for_offer_from_human_readable_name API, the user gets no access to the offer data retrieved. It would be great to add a new event type that is emitted when the offer has been retrieved and validated, e.g. here:

if let Some((completed_requests, mut offer)) = offer_opt {

@TheBlueMatt
Copy link
Collaborator

Hmm, is there a reason you need the Offer directly or can you just access the offer fields via the Bolt12Invoice when the payment ultimately completes (which I believe was added upstream but is not in 0.1)?

@tnull
Copy link
Contributor Author

tnull commented May 15, 2025

Hmm, is there a reason you need the Offer directly or can you just access the offer fields via the Bolt12Invoice when the payment ultimately completes (which I believe was added upstream but is not in 0.1)?

Hmm, IIUC, PaymentSent would only give us the Bolt12Invoice, which doesn't even expose OfferId, for instance. But more generally: the payment might very well fail and we'd still like to be able to fill in some of the metadata fields and maybe even retry using the Offer, which would save us multiple RTTs for resolving/retrieving the offer once more.

@chuksys
Copy link

chuksys commented May 16, 2025

I'd like to pick this up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants