Class Event.PaymentClaimable

  • Enclosing class:
    Event

    public static final class Event.PaymentClaimable
    extends Event
    Indicates that we've been offered a payment and it needs to be claimed via calling [`ChannelManager::claim_funds`] with the preimage given in [`PaymentPurpose`]. 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 `PaymentClaimable` events may be generated for the same payment. # Note This event used to be called `PaymentReceived` in LDK versions 0.0.112 and earlier. [`ChannelManager::claim_funds`]: crate::ln::channelmanager::ChannelManager::claim_funds [`ChannelManager::fail_htlc_backwards`]: crate::ln::channelmanager::ChannelManager::fail_htlc_backwards
    • Field Detail

      • receiver_node_id

        @Nullable
        public final byte[] receiver_node_id
        The node that will receive the payment after it has been claimed. This is useful to identify payments received via [phantom nodes]. This field will always be filled in when the event was generated by LDK versions 0.0.113 and above. [phantom nodes]: crate::chain::keysinterface::PhantomKeysManager Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
      • 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.
      • via_channel_id

        @Nullable
        public final byte[] via_channel_id
        The `channel_id` indicating over which channel we received the payment. Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
      • via_user_channel_id

        public final Option_u128Z via_user_channel_id
        The `user_channel_id` indicating over which channel we received the payment.