[Java] Properly convert strings to/from Modified UTF-8
[ldk-java] / src / main / java / org / ldk / enums / FailureCode.java
1 package org.ldk.enums;
2
3 /**
4  * This enum is used to specify which error data to send to peers when failing back an HTLC
5  * using [`ChannelManager::fail_htlc_backwards_with_reason`].
6  * 
7  * For more info on failure codes, see <https://github.com/lightning/bolts/blob/master/04-onion-routing.md#failure-messages>.
8  */
9 public enum FailureCode {
10         /**
11          * We had a temporary error processing the payment. Useful if no other error codes fit
12          * and you want to indicate that the payer may want to retry.
13          */
14         LDKFailureCode_TemporaryNodeFailure,
15         /**
16          * We have a required feature which was not in this onion. For example, you may require
17          * some additional metadata that was not provided with this payment.
18          */
19         LDKFailureCode_RequiredNodeFeatureMissing,
20         /**
21          * You may wish to use this when a `payment_preimage` is unknown, or the CLTV expiry of
22          * the HTLC is too close to the current block height for safe handling.
23          * Using this failure code in [`ChannelManager::fail_htlc_backwards_with_reason`] is
24          * equivalent to calling [`ChannelManager::fail_htlc_backwards`].
25          */
26         LDKFailureCode_IncorrectOrUnknownPaymentDetails,
27         ; static native void init();
28         static { init(); }
29 }