Package org.ldk.structs
Class Event.PaymentReceived
- java.lang.Object
-
- org.ldk.structs.Event
-
- org.ldk.structs.Event.PaymentReceived
-
- Enclosing class:
- Event
public static final class Event.PaymentReceived extends Event
Indicates we've received (an offer of) money! Just gotta dig out that payment preimage and feed it to [`ChannelManager::claim_funds`] to get it.... Note that if the preimage is not known, you should call [`ChannelManager::fail_htlc_backwards`] to free up resources for this HTLC and avoid network congestion. If you fail to call either [`ChannelManager::claim_funds`] or [`ChannelManager::fail_htlc_backwards`] within the HTLC's timeout, the HTLC will be automatically failed. # Note LDK will not stop an inbound payment from being paid multiple times, so multiple `PaymentReceived` events may be generated for the same payment. [`ChannelManager::claim_funds`]: crate::ln::channelmanager::ChannelManager::claim_funds [`ChannelManager::fail_htlc_backwards`]: crate::ln::channelmanager::ChannelManager::fail_htlc_backwards
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.ldk.structs.Event
Event.ChannelClosed, Event.DiscardFunding, Event.FundingGenerationReady, Event.HTLCHandlingFailed, Event.OpenChannelRequest, Event.PaymentClaimed, Event.PaymentFailed, Event.PaymentForwarded, Event.PaymentPathFailed, Event.PaymentPathSuccessful, Event.PaymentReceived, Event.PaymentSent, Event.PendingHTLCsForwardable, Event.ProbeFailed, Event.ProbeSuccessful, Event.SpendableOutputs
-
-
Field Summary
Fields Modifier and Type Field Description longamount_msatThe value, in thousandths of a satoshi, that this payment is for.byte[]payment_hashThe hash for which the preimage should be handed to the ChannelManager.PaymentPurposepurposeInformation for claiming this received payment, based on whether the purpose of the payment is to pay an invoice or to send a spontaneous payment.
-
Method Summary
-
Methods inherited from class org.ldk.structs.Event
channel_closed, clone, discard_funding, finalize, funding_generation_ready, htlchandling_failed, open_channel_request, payment_claimed, payment_failed, payment_forwarded, payment_path_failed, payment_path_successful, payment_received, payment_sent, pending_htlcs_forwardable, probe_failed, probe_successful, spendable_outputs, write
-
-
-
-
Field Detail
-
payment_hash
public final byte[] payment_hash
The hash for which the preimage should be handed to the ChannelManager. Note that LDK will not stop you from registering duplicate payment hashes for inbound payments.
-
amount_msat
public final long amount_msat
The value, in thousandths of a satoshi, that this payment is for.
-
purpose
public final PaymentPurpose purpose
Information for claiming this received payment, based on whether the purpose of the payment is to pay an invoice or to send a spontaneous payment.
-
-