1710fa7bbe1aea1df7f18fc1c2cd9e6a9d5ea41d
[ldk-java] / src / main / java / org / ldk / enums / PaymentFailureReason.java
1 package org.ldk.enums;
2
3 /**
4  * The reason the payment failed. Used in [`Event::PaymentFailed`].
5  */
6 public enum PaymentFailureReason {
7         /**
8          * The intended recipient rejected our payment.
9          */
10         LDKPaymentFailureReason_RecipientRejected,
11         /**
12          * The user chose to abandon this payment by calling [`ChannelManager::abandon_payment`].
13          * 
14          * [`ChannelManager::abandon_payment`]: crate::ln::channelmanager::ChannelManager::abandon_payment
15          */
16         LDKPaymentFailureReason_UserAbandoned,
17         /**
18          * We exhausted all of our retry attempts while trying to send the payment, or we
19          * exhausted the [`Retry::Timeout`] if the user set one. If at any point a retry
20          * attempt failed while being forwarded along the path, an [`Event::PaymentPathFailed`] will
21          * have come before this.
22          * 
23          * [`Retry::Timeout`]: crate::ln::channelmanager::Retry::Timeout
24          */
25         LDKPaymentFailureReason_RetriesExhausted,
26         /**
27          * The payment expired while retrying, based on the provided
28          * [`PaymentParameters::expiry_time`].
29          * 
30          * [`PaymentParameters::expiry_time`]: crate::routing::router::PaymentParameters::expiry_time
31          */
32         LDKPaymentFailureReason_PaymentExpired,
33         /**
34          * We failed to find a route while retrying the payment.
35          */
36         LDKPaymentFailureReason_RouteNotFound,
37         /**
38          * This error should generally never happen. This likely means that there is a problem with
39          * your router.
40          */
41         LDKPaymentFailureReason_UnexpectedError,
42         ; static native void init();
43         static { init(); }
44 }