feat: Manually Handle BOLT12 invoices#831
feat: Manually Handle BOLT12 invoices#831m1sterc001guy wants to merge 1 commit intolightningdevkit:mainfrom
Conversation
74f3c9a to
43b8d9f
Compare
|
👋 Hi! This PR is now in draft status. |
tnull
left a comment
There was a problem hiding this comment.
Thanks for this draft!
As mentioned on Discord: I think we so far held off exposing manual invoice handling in LDK Node as a) that seems like a rather complicated API that could be a footgun for many users b) it might also promote Bolt12Invoices as user-facing objects, which seems to be a contentious topic (if we did consider them user-facing, we also need to implement serialization / string representation for them, IMO, for example) c) there are ongoing design discussions.
So before we move forward here, we probably need to conclude the more general design/architectural discussions.
We would like to add BOLT12 send support to Fedimint. In order to support that, we need to be able to atomically link the payment of an invoice to the redemption of a Fedimint
OutgoingContract. LDK Node currently doesn't allow the integrator to inspect BOLT12 invoices and manually handle the payments.This PR is an attempt to allow the integrator to manually handle BOLT12 invoices. This would allow us to use the payment hash to atomically link the payment of the BOLT12 invoice with the redemption of the
OutgoingContractin Fedimint. We will also be able to verify that the invoice that the Fedimint Gateway's Lightning Node retrieved has the correct amount. I have a PoC branch of this working here.Let me know if this approach makes sense! Or if this is not the right spot for this. I didn't know if manually handling BOLT12 invoices is something that should be exposed in LDK Node.