-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add support for paying to BOLT12 #549
Conversation
Co-authored-by: Ross Savage <[email protected]>
# Conflicts: # cli/src/commands.rs # lib/core/src/sdk.rs
Don't try to extract invoice description, because it is added later during persist.
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.
Looking good
Co-authored-by: Ross Savage <[email protected]>
MRH with Bolt12 is not possible because receive is not yet supported.
Removed self-transfer check TODO, because self-transfers are not possible with Bolt12 when receive is not supported.
a3477b4
to
9920648
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.
Other than @dangeross comments I think it looks good!
Dart changes look good |
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
This PR adds support for paying to a BOLT12 offer.
The flow is as follows:
send_payment_via_swap
with the BOLT12 invoice as argument, instead of the usual BOLT11Open questions
PaymentDetails::Lightning
with a new field forbolt12_invoice
? And / or an optionalbolt12_offer
?bolt11
field toinvoice
, so it means either BOLT11 or BOLT12 invoice?prepare
? This may take a long time for slow endpoints (Phoenix), causing the user to wait a few seconds forprepare
to return.sdk_common::input_parser
to parse BOLT12 offers / invoice? Or keep changes local to the Liquid SDK?Open TODOs
Detect / handle MRH in BOLT12 invoiceslist_payments
shows payments asPending
list_payments
shows the bolt12 invoice underbolt11
(should show offer instead)