Open
Description
As long as lightningnetwork/lnd#7162 isn't addressed, there can only be one interceptor for HTLC forwards.
And that single slot is occupied if tapd
is connected to lnd
.
Therefore, someone operating litd
with Taproot Asset channels isn't able to use the HTLC forward interceptor to add custom application logic to their node.
Proposed solution
Add a bidirectional streaming RPC to tapd
with a structure similar to the HtlcInterceptor
RPC in lnd
that forwards events from lnd
.
The RPC should allow developers to:
- Reject or allow HTLCs (of any type, including non-asset/BTC-only HTLCs).
- See all asset-related metadata
tapd
uses to make asset routing decisions. For example:- The RFQ policy associated with an asset HTLC.
- The decision/response the RFQ order handler would return to
lnd
.
Open questions
- Should the RPC user be able to override a "deny" decision from the RFQ handler?
- Should the RPC user be allowed to modify the decision/response of the RFQ order handler?