Package org.ldk.structs
Class Event.HTLCIntercepted
- java.lang.Object
-
- org.ldk.structs.Event
-
- org.ldk.structs.Event.HTLCIntercepted
-
- Enclosing class:
- Event
public static final class Event.HTLCIntercepted extends Event
Used to indicate that we've intercepted an HTLC forward. This event will only be generated if you've encoded an intercept scid in the receiver's invoice route hints using [`ChannelManager::get_intercept_scid`] and have set [`UserConfig::accept_intercept_htlcs`]. [`ChannelManager::forward_intercepted_htlc`] or [`ChannelManager::fail_intercepted_htlc`] MUST be called in response to this event. See their docs for more information. [`ChannelManager::get_intercept_scid`]: crate::ln::channelmanager::ChannelManager::get_intercept_scid [`UserConfig::accept_intercept_htlcs`]: crate::util::config::UserConfig::accept_intercept_htlcs [`ChannelManager::forward_intercepted_htlc`]: crate::ln::channelmanager::ChannelManager::forward_intercepted_htlc [`ChannelManager::fail_intercepted_htlc`]: crate::ln::channelmanager::ChannelManager::fail_intercepted_htlc
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.ldk.structs.Event
Event.ChannelClosed, Event.ChannelPending, Event.ChannelReady, Event.DiscardFunding, Event.FundingGenerationReady, Event.HTLCHandlingFailed, Event.HTLCIntercepted, Event.OpenChannelRequest, Event.PaymentClaimable, Event.PaymentClaimed, Event.PaymentFailed, Event.PaymentForwarded, Event.PaymentPathFailed, Event.PaymentPathSuccessful, Event.PaymentSent, Event.PendingHTLCsForwardable, Event.ProbeFailed, Event.ProbeSuccessful, Event.SpendableOutputs
-
-
Field Summary
Fields Modifier and Type Field Description long
expected_outbound_amount_msat
How many msats the payer intended to route to the next node.long
inbound_amount_msat
How many msats were received on the inbound edge of this HTLC.byte[]
intercept_id
An id to help LDK identify which HTLC is being forwarded or failed.byte[]
payment_hash
The payment hash used for this HTLC.long
requested_next_hop_scid
The fake scid that was programmed as the next hop's scid, generated using [`ChannelManager::get_intercept_scid`].
-
Method Summary
-
Methods inherited from class org.ldk.structs.Event
channel_closed, channel_pending, channel_ready, clone, discard_funding, eq, equals, finalize, funding_generation_ready, htlchandling_failed, htlcintercepted, open_channel_request, payment_claimable, payment_claimed, payment_failed, payment_forwarded, payment_path_failed, payment_path_successful, payment_sent, pending_htlcs_forwardable, probe_failed, probe_successful, spendable_outputs, write
-
-
-
-
Field Detail
-
intercept_id
public final byte[] intercept_id
An id to help LDK identify which HTLC is being forwarded or failed.
-
requested_next_hop_scid
public final long requested_next_hop_scid
The fake scid that was programmed as the next hop's scid, generated using [`ChannelManager::get_intercept_scid`]. [`ChannelManager::get_intercept_scid`]: crate::ln::channelmanager::ChannelManager::get_intercept_scid
-
payment_hash
public final byte[] payment_hash
The payment hash used for this HTLC.
-
inbound_amount_msat
public final long inbound_amount_msat
How many msats were received on the inbound edge of this HTLC.
-
expected_outbound_amount_msat
public final long expected_outbound_amount_msat
How many msats the payer intended to route to the next node. Depending on the reason you are intercepting this payment, you might take a fee by forwarding less than this amount. Note that LDK will NOT check that expected fees were factored into this value. You MUST check that whatever fee you want has been included here or subtract it as required. Further, LDK will not stop you from forwarding more than you received.
-
-