Skip to content

offers: parse invoice and invoice request #3800

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
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JssDWt
Copy link
Contributor

@JssDWt JssDWt commented May 24, 2025

Add the ability to parse and display BOLT12 invoices and invoice requests. This makes it easy for users of LDK to serialize and deserialize BOLT12 invoices and invoice requests.

@ldk-reviews-bot
Copy link

ldk-reviews-bot commented May 24, 2025

👋 Thanks for assigning @jkczyz as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

@ldk-reviews-bot ldk-reviews-bot requested a review from tnull May 24, 2025 10:35
Copy link
Contributor

@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.

Code looks good, but I think we previously discussed this and had decided against introducing a serialization format for invoices and requests. Not sure if things changed since then though? (cc @jkczyz @TheBlueMatt)

@tnull tnull requested a review from jkczyz May 26, 2025 08:37
Copy link
Contributor

@vincenzopalazzo vincenzopalazzo left a comment

Choose a reason for hiding this comment

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

Overall LGTM, leaving a comment

I has a similar code in a bolt12 tool that I am building for ocean that allow to make verification on the offer + invoice. So would be good to have this feature somehow to allow more usable command line tools.

However, it is also possible to leave this to the caller, exposing some minimal information like AsRef and BECH32_HRP if at the moment, rust-lightning does not want to export this kind of serializzation.

@ldk-reviews-bot
Copy link

🔔 1st Reminder

Hey @jkczyz! This PR has been waiting for your review.
Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.

Add the ability to parse and display BOLT12 invoices and invoice
requests. This makes it easy for users of LDK to serialize and
deserialize BOLT12 invoices and invoice requests.
@JssDWt JssDWt force-pushed the jssdwt-expand-bolt12-parsing branch from 96fd362 to ffed552 Compare May 26, 2025 14:00
@JssDWt
Copy link
Contributor Author

JssDWt commented May 26, 2025

Pushed a change to assert_eq rather than if ... panic in the tests

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.

4 participants