-
Notifications
You must be signed in to change notification settings - Fork 404
Allow calling claim_funds()
on intercepted HTLCs
#2839
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
Comments
After some investigation, it looks like Related discussion: fedimint/fedimint#3131 |
I have some time this weekend to hack away at a proof of concept using |
Was hacking with @tvolk131 today and realized that It seems the only way to do this is using the HTLC interceptor, one question is that if you can use |
Discussed this elsewhere in greater detail, but I think it would be a much simpler scheme to have the gateway generate the invoice and just be a simple Lightning node receiving a payment rather than dealing with (the limitations of) HTLC interception. This could look like this, roughly:
|
This is definitely something we'd consider (it wouldn't be that hard to add), but (like with general intercept-all-HTLC's support) we'd really like to see a concrete design that needs it before moving forward there. As @tnull points out, for your usecase the gateway can simply generate the invoice (or, in a BOLT12 world, provide the blinded path to the client if you want them to generate the offer, or simply generate the offer itself). If there's some reason that's suboptimal, let us know and we can revisit this. |
Closing this issue as superseded by #2855. |
Currently, according to documentation for
HTLCIntercepted
,ChannelManager::forward_intercepted_htlc
orChannelManager::fail_intercepted_htlc
must be called in response to all intercepted HTLCs. Essentially we can either re-route the payment to a real channel, or unwind it. But what if we want to get the pre-image out-of-band? I'd like to be able to respond to anHTLCIntercepted
event by fetching the pre-image outside of the lightning protocol and simply providing it to theChannelManager
to claim the funds.claim_funds()
is just the method I'm looking for! If callingclaim_funds()
on intercepted HTLCs would already work, let's update the documentation to reflect this. If not, let's add support for it. Either way, we should updatedo_test_intercepted_payment()
.For context, I'm working on building a Fedimint lightning gateway, where pre-images are received through what is essentially a federation-enforced HTLC, and the final hop happens separate from lightning.
The text was updated successfully, but these errors were encountered: