Skip to content
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

Resolve return behavior for BOLT12 Offers #321

Open
slanesuke opened this issue Jul 5, 2024 · 1 comment
Open

Resolve return behavior for BOLT12 Offers #321

slanesuke opened this issue Jul 5, 2024 · 1 comment

Comments

@slanesuke
Copy link
Contributor

While adding BIP21 URI support to ldk-node, I've faced some complexities when URIs include an offer in the lightning parameter.

During testing, I attempted to send a payment with an amount larger than what's available on the channel. Ideally, the lightning parameter with an offer or invoice should fail and move on to the on-chain payment.

When paying a BOLT11 invoice, the PaymentId is returned only if the payment is successful making it easy to handle and move on. However, with BOLT12, sending a payment returns a PaymentId whether the payment is successful or not. We should resolve the difference in behavior between BOLT11 and BOLT12.

When given an offer in the lightning parameter, it would be nice to handle whether the payment was a success or failure before moving on to the next payment option.

@slanesuke slanesuke changed the title Resolving return behavior for BOLT12 Offers Resolve return behavior for BOLT12 Offers Jul 5, 2024
@slanesuke
Copy link
Contributor Author

Manually handling an invoice request/invoice using an event has been added to LDK: lightningdevkit/rust-lightning#3078. After the next LDK upgrade I think we could take care of this

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

No branches or pull requests

1 participant