30a0d2b345afc62ab44385e58382ec6c14a823b8
[ldk-java] / src / main / java / org / ldk / enums / RetryableSendFailure.java
1 package org.ldk.enums;
2
3 /**
4  * Indicates an immediate error on [`ChannelManager::send_payment`]. Further errors may be
5  * surfaced later via [`Event::PaymentPathFailed`] and [`Event::PaymentFailed`].
6  * 
7  * [`ChannelManager::send_payment`]: crate::ln::channelmanager::ChannelManager::send_payment
8  * [`Event::PaymentPathFailed`]: crate::events::Event::PaymentPathFailed
9  * [`Event::PaymentFailed`]: crate::events::Event::PaymentFailed
10  */
11 public enum RetryableSendFailure {
12         /**
13          * The provided [`PaymentParameters::expiry_time`] indicated that the payment has expired. Note
14          * that this error is *not* caused by [`Retry::Timeout`].
15          * 
16          * [`PaymentParameters::expiry_time`]: crate::routing::router::PaymentParameters::expiry_time
17          */
18         LDKRetryableSendFailure_PaymentExpired,
19         /**
20          * We were unable to find a route to the destination.
21          */
22         LDKRetryableSendFailure_RouteNotFound,
23         /**
24          * Indicates that a payment for the provided [`PaymentId`] is already in-flight and has not
25          * yet completed (i.e. generated an [`Event::PaymentSent`] or [`Event::PaymentFailed`]).
26          * 
27          * [`PaymentId`]: crate::ln::channelmanager::PaymentId
28          * [`Event::PaymentSent`]: crate::events::Event::PaymentSent
29          * [`Event::PaymentFailed`]: crate::events::Event::PaymentFailed
30          */
31         LDKRetryableSendFailure_DuplicatePayment,
32         ; static native void init();
33         static { init(); }
34 }