-
Notifications
You must be signed in to change notification settings - Fork 45
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
Expand InputType
with new variant: Bolt12 offer
#1121
Conversation
@hydra-yse your older PR #598 parses the offer to more detailed fields: breez-sdk-greenlight/libs/sdk-bindings/src/breez_sdk.udl Lines 735 to 755 in ad384b1
As that PR is still in review, I'm not sure if that structure is final ( So would you say we need those fields as defined there? If so, I can integrate them in this PR. |
6508e80
to
fa01549
Compare
I think they are needed, we need to parse the offer for the user. I also think our PR struct is out of date and I would suggest bumping the |
Also keep in mind there are invoice requests and invoices in bolt12, next to offers. We don't have to support them, but let's make the interface in such a way that we don't have to break anything to support them in the future. |
I tried to bump However due to inter-dependencies between crates, this means also updating
(This is reflected in the last commit f0d19cc . Almost half the errors are fixed, but I stopped when realizing the The only way to avoid the above is to store the unparsed Bolt12 option as Another option is to ask GL to update their Am I missing something? Do you see a simpler way to bump |
f0d19cc
to
a8a7057
Compare
As discussed, this is adding a simple In addition, Liquid SDK will attempt to parse the offer locally. |
a8a7057
to
c7abd3d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also add parsing for recurrence-
and quantity
based fields, or are those outside the scope of what will be used? Perhaps they can be added later as they seem useless for now. Besides that, looking good! 👍
IMO it's best to add them when they will also be tested and used. |
This helps circumvent an uniffi issue where sequence<LNOfferBlindedPath> fails to parse but sequence<LnOfferBlindedPath> is fine.
This PR extends the input parsed in
sdk-common
to recognize Bolt12 offers.