Bump version to 0.0.100.2
[ldk-java] / src / main / java / org / ldk / impl / bindings.java
index 511f6839d654b27c996e47797530406319463a2a..7dabbeba60bef62216cd98d88c0661cbda8a2829 100644 (file)
@@ -1,5 +1,11 @@
 package org.ldk.impl;
 import org.ldk.enums.*;
+import java.io.File;
+import java.io.InputStream;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.StandardCopyOption;
 
 public class bindings {
        public static class VecOrSliceDef {
@@ -11,7 +17,24 @@ public class bindings {
                }
        }
        static {
-               System.loadLibrary("lightningjni");
+               try {
+                       // Try to load natively first, this works on Android and in testing.
+                       System.loadLibrary("lightningjni");
+               } catch (UnsatisfiedLinkError _ignored) {
+                       // Otherwise try to load from the library jar.
+                       File tmpdir = new File(System.getProperty("java.io.tmpdir"), "ldk-java-nativelib");
+                       tmpdir.mkdir(); // If it fails to create, assume it was there already
+                       tmpdir.deleteOnExit();
+                       String libname = "liblightningjni_" + System.getProperty("os.name").replaceAll(" ", "") +
+                               "-" + System.getProperty("os.arch").replaceAll(" ", "") + ".nativelib";
+                       try (InputStream is = bindings.class.getResourceAsStream("/" + libname)) {
+                               Path libpath = new File(tmpdir.toPath().toString(), "liblightningjni.so").toPath();
+                               Files.copy(is, libpath, StandardCopyOption.REPLACE_EXISTING);
+                               Runtime.getRuntime().load(libpath.toString());
+                       } catch (IOException e) {
+                               throw new IllegalArgumentException(e);
+                       }
+               }
                init(java.lang.Enum.class, VecOrSliceDef.class);
                init_class_cache();
                if (!get_lib_version_string().equals(get_ldk_java_bindings_version()))
@@ -25,7 +48,7 @@ public class bindings {
        static native String get_lib_version_string();
 
        public static String get_ldk_java_bindings_version() {
-               return "v0.0.98.1";
+               return "v0.0.100.2";
        }
        public static native String get_ldk_c_bindings_version();
        public static native String get_ldk_version();
@@ -54,6 +77,10 @@ public class bindings {
        static { SemanticError.values(); /* Force enum statics to run */ }
        static { SiPrefix.values(); /* Force enum statics to run */ }
        public static native long LDKCVec_u8Z_new(byte[] elems);
+       // struct LDKCVec_u8Z TxOut_get_script_pubkey (struct LDKTxOut* thing)
+       public static native byte[] TxOut_get_script_pubkey(long thing);
+       // uint64_t TxOut_get_value (struct LDKTxOut* thing)
+       public static native long TxOut_get_value(long thing);
        public static native boolean LDKCResult_SecretKeyErrorZ_result_ok(long arg);
        public static native byte[] LDKCResult_SecretKeyErrorZ_get_ok(long arg);
        public static native Secp256k1Error LDKCResult_SecretKeyErrorZ_get_err(long arg);
@@ -106,6 +133,12 @@ public class bindings {
        public static native boolean LDKCResult_CVec_SignatureZNoneZ_result_ok(long arg);
        public static native byte[][] LDKCResult_CVec_SignatureZNoneZ_get_ok(long arg);
        public static native void LDKCResult_CVec_SignatureZNoneZ_get_err(long arg);
+       public static native boolean LDKCResult_ShutdownScriptDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_ShutdownScriptDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_ShutdownScriptDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_ShutdownScriptInvalidShutdownScriptZ_result_ok(long arg);
+       public static native long LDKCResult_ShutdownScriptInvalidShutdownScriptZ_get_ok(long arg);
+       public static native long LDKCResult_ShutdownScriptInvalidShutdownScriptZ_get_err(long arg);
        public static native boolean LDKCResult_NoneErrorZ_result_ok(long arg);
        public static native void LDKCResult_NoneErrorZ_get_ok(long arg);
        public static native IOError LDKCResult_NoneErrorZ_get_err(long arg);
@@ -201,6 +234,10 @@ public class bindings {
                public final static class IgnoreError extends LDKErrorAction {
                        IgnoreError() { }
                }
+               public final static class IgnoreAndLog extends LDKErrorAction {
+                       public Level ignore_and_log;
+                       IgnoreAndLog(Level ignore_and_log) { this.ignore_and_log = ignore_and_log; }
+               }
                public final static class SendErrorMessage extends LDKErrorAction {
                        public long msg;
                        SendErrorMessage(long msg) { this.msg = msg; }
@@ -299,6 +336,11 @@ public class bindings {
                        public long msg;
                        BroadcastChannelUpdate(long msg) { this.msg = msg; }
                }
+               public final static class SendChannelUpdate extends LDKMessageSendEvent {
+                       public byte[] node_id;
+                       public long msg;
+                       SendChannelUpdate(byte[] node_id, long msg) { this.node_id = node_id; this.msg = msg; }
+               }
                public final static class HandleError extends LDKMessageSendEvent {
                        public byte[] node_id;
                        public long action;
@@ -400,6 +442,7 @@ public class bindings {
                 byte[] write();
        }
        public static native long LDKSign_new(LDKSign impl, LDKBaseSign BaseSign, long pubkeys);
+       public static native long LDKSign_get_BaseSign(long arg);
        // LDKCVec_u8Z Sign_write LDKSign *NONNULL_PTR this_arg
        public static native byte[] Sign_write(long this_arg);
        public static native boolean LDKCResult_SignDecodeErrorZ_result_ok(long arg);
@@ -425,6 +468,19 @@ public class bindings {
        public static native boolean LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_result_ok(long arg);
        public static native long[] LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_ok(long arg);
        public static native IOError LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_err(long arg);
+       public static class LDKCOption_u16Z {
+               private LDKCOption_u16Z() {}
+               public final static class Some extends LDKCOption_u16Z {
+                       public short some;
+                       Some(short some) { this.some = some; }
+               }
+               public final static class None extends LDKCOption_u16Z {
+                       None() { }
+               }
+               static native void init();
+       }
+       static { LDKCOption_u16Z.init(); }
+       public static native LDKCOption_u16Z LDKCOption_u16Z_ref_from_ptr(long ptr);
        public static class LDKAPIError {
                private LDKAPIError() {}
                public final static class APIMisuseError extends LDKAPIError {
@@ -447,6 +503,10 @@ public class bindings {
                public final static class MonitorUpdateFailed extends LDKAPIError {
                        MonitorUpdateFailed() { }
                }
+               public final static class IncompatibleShutdownScript extends LDKAPIError {
+                       public long script;
+                       IncompatibleShutdownScript(long script) { this.script = script; }
+               }
                static native void init();
        }
        static { LDKAPIError.init(); }
@@ -481,6 +541,9 @@ public class bindings {
        public static native boolean LDKCResult_NonePaymentSendFailureZ_result_ok(long arg);
        public static native void LDKCResult_NonePaymentSendFailureZ_get_ok(long arg);
        public static native long LDKCResult_NonePaymentSendFailureZ_get_err(long arg);
+       public static native boolean LDKCResult_PaymentHashPaymentSendFailureZ_result_ok(long arg);
+       public static native byte[] LDKCResult_PaymentHashPaymentSendFailureZ_get_ok(long arg);
+       public static native long LDKCResult_PaymentHashPaymentSendFailureZ_get_err(long arg);
        public static class LDKNetAddress {
                private LDKNetAddress() {}
                public final static class IPv4 extends LDKNetAddress {
@@ -538,7 +601,7 @@ public class bindings {
        public interface LDKKeysInterface {
                 byte[] get_node_secret();
                 byte[] get_destination_script();
-                byte[] get_shutdown_pubkey();
+                long get_shutdown_scriptpubkey();
                 long get_channel_signer(boolean inbound, long channel_value_satoshis);
                 byte[] get_secure_random_bytes();
                 long read_chan_signer(byte[] reader);
@@ -549,8 +612,8 @@ public class bindings {
        public static native byte[] KeysInterface_get_node_secret(long this_arg);
        // LDKCVec_u8Z KeysInterface_get_destination_script LDKKeysInterface *NONNULL_PTR this_arg
        public static native byte[] KeysInterface_get_destination_script(long this_arg);
-       // LDKPublicKey KeysInterface_get_shutdown_pubkey LDKKeysInterface *NONNULL_PTR this_arg
-       public static native byte[] KeysInterface_get_shutdown_pubkey(long this_arg);
+       // LDKShutdownScript KeysInterface_get_shutdown_scriptpubkey LDKKeysInterface *NONNULL_PTR this_arg
+       public static native long KeysInterface_get_shutdown_scriptpubkey(long this_arg);
        // LDKSign KeysInterface_get_channel_signer LDKKeysInterface *NONNULL_PTR this_arg, bool inbound, uint64_t channel_value_satoshis
        public static native long KeysInterface_get_channel_signer(long this_arg, boolean inbound, long channel_value_satoshis);
        // LDKThirtyTwoBytes KeysInterface_get_secure_random_bytes LDKKeysInterface *NONNULL_PTR this_arg
@@ -639,6 +702,22 @@ public class bindings {
        public static native byte[] LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(long ptr);
        public static native long[] LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(long ptr);
        public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_new(long[] elems);
+       public static class LDKPaymentPurpose {
+               private LDKPaymentPurpose() {}
+               public final static class InvoicePayment extends LDKPaymentPurpose {
+                       public byte[] payment_preimage;
+                       public byte[] payment_secret;
+                       public long user_payment_id;
+                       InvoicePayment(byte[] payment_preimage, byte[] payment_secret, long user_payment_id) { this.payment_preimage = payment_preimage; this.payment_secret = payment_secret; this.user_payment_id = user_payment_id; }
+               }
+               public final static class SpontaneousPayment extends LDKPaymentPurpose {
+                       public byte[] spontaneous_payment;
+                       SpontaneousPayment(byte[] spontaneous_payment) { this.spontaneous_payment = spontaneous_payment; }
+               }
+               static native void init();
+       }
+       static { LDKPaymentPurpose.init(); }
+       public static native LDKPaymentPurpose LDKPaymentPurpose_ref_from_ptr(long ptr);
        public static class LDKEvent {
                private LDKEvent() {}
                public final static class FundingGenerationReady extends LDKEvent {
@@ -650,11 +729,9 @@ public class bindings {
                }
                public final static class PaymentReceived extends LDKEvent {
                        public byte[] payment_hash;
-                       public byte[] payment_preimage;
-                       public byte[] payment_secret;
                        public long amt;
-                       public long user_payment_id;
-                       PaymentReceived(byte[] payment_hash, byte[] payment_preimage, byte[] payment_secret, long amt, long user_payment_id) { this.payment_hash = payment_hash; this.payment_preimage = payment_preimage; this.payment_secret = payment_secret; this.amt = amt; this.user_payment_id = user_payment_id; }
+                       public long purpose;
+                       PaymentReceived(byte[] payment_hash, long amt, long purpose) { this.payment_hash = payment_hash; this.amt = amt; this.purpose = purpose; }
                }
                public final static class PaymentSent extends LDKEvent {
                        public byte[] payment_preimage;
@@ -673,6 +750,11 @@ public class bindings {
                        public long[] outputs;
                        SpendableOutputs(long[] outputs) { this.outputs = outputs; }
                }
+               public final static class PaymentForwarded extends LDKEvent {
+                       public long fee_earned_msat;
+                       public boolean claim_from_onchain_tx;
+                       PaymentForwarded(long fee_earned_msat, boolean claim_from_onchain_tx) { this.fee_earned_msat = fee_earned_msat; this.claim_from_onchain_tx = claim_from_onchain_tx; }
+               }
                static native void init();
        }
        static { LDKEvent.init(); }
@@ -754,6 +836,9 @@ public class bindings {
        public static native boolean LDKCResult_ClosingSignedDecodeErrorZ_result_ok(long arg);
        public static native long LDKCResult_ClosingSignedDecodeErrorZ_get_ok(long arg);
        public static native long LDKCResult_ClosingSignedDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_ClosingSignedFeeRangeDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_ClosingSignedFeeRangeDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(long arg);
        public static native boolean LDKCResult_CommitmentSignedDecodeErrorZ_result_ok(long arg);
        public static native long LDKCResult_CommitmentSignedDecodeErrorZ_get_ok(long arg);
        public static native long LDKCResult_CommitmentSignedDecodeErrorZ_get_err(long arg);
@@ -940,6 +1025,7 @@ public class bindings {
                 void handle_error(byte[] their_node_id, long msg);
        }
        public static native long LDKChannelMessageHandler_new(LDKChannelMessageHandler impl, LDKMessageSendEventsProvider MessageSendEventsProvider);
+       public static native long LDKChannelMessageHandler_get_MessageSendEventsProvider(long arg);
        // void ChannelMessageHandler_handle_open_channel LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKInitFeatures their_features, const struct LDKOpenChannel *NONNULL_PTR msg
        public static native void ChannelMessageHandler_handle_open_channel(long this_arg, byte[] their_node_id, long their_features, long msg);
        // void ChannelMessageHandler_handle_accept_channel LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKInitFeatures their_features, const struct LDKAcceptChannel *NONNULL_PTR msg
@@ -994,6 +1080,7 @@ public class bindings {
                 long handle_query_short_channel_ids(byte[] their_node_id, long msg);
        }
        public static native long LDKRoutingMessageHandler_new(LDKRoutingMessageHandler impl, LDKMessageSendEventsProvider MessageSendEventsProvider);
+       public static native long LDKRoutingMessageHandler_get_MessageSendEventsProvider(long arg);
        // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_node_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg
        public static native long RoutingMessageHandler_handle_node_announcement(long this_arg, long msg);
        // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg
@@ -1060,6 +1147,8 @@ public class bindings {
        public static native String _ldk_c_bindings_get_compiled_version();
        // void Transaction_free(struct LDKTransaction _res);
        public static native void Transaction_free(byte[] _res);
+       // struct LDKTxOut TxOut_new(struct LDKCVec_u8Z script_pubkey, uint64_t value);
+       public static native long TxOut_new(byte[] script_pubkey, long value);
        // void TxOut_free(struct LDKTxOut _res);
        public static native void TxOut_free(long _res);
        // struct LDKTxOut TxOut_clone(const struct LDKTxOut *NONNULL_PTR orig);
@@ -1176,6 +1265,20 @@ public class bindings {
        public static native void CResult_CVec_SignatureZNoneZ_free(long _res);
        // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_clone(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR orig);
        public static native long CResult_CVec_SignatureZNoneZ_clone(long orig);
+       // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_ok(struct LDKShutdownScript o);
+       public static native long CResult_ShutdownScriptDecodeErrorZ_ok(long o);
+       // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_ShutdownScriptDecodeErrorZ_err(long e);
+       // void CResult_ShutdownScriptDecodeErrorZ_free(struct LDKCResult_ShutdownScriptDecodeErrorZ _res);
+       public static native void CResult_ShutdownScriptDecodeErrorZ_free(long _res);
+       // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_clone(const struct LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_ShutdownScriptDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_ok(struct LDKShutdownScript o);
+       public static native long CResult_ShutdownScriptInvalidShutdownScriptZ_ok(long o);
+       // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_err(struct LDKInvalidShutdownScript e);
+       public static native long CResult_ShutdownScriptInvalidShutdownScriptZ_err(long e);
+       // void CResult_ShutdownScriptInvalidShutdownScriptZ_free(struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ _res);
+       public static native void CResult_ShutdownScriptInvalidShutdownScriptZ_free(long _res);
        // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_ok(void);
        public static native long CResult_NoneErrorZ_ok();
        // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_err(enum LDKIOError e);
@@ -1392,6 +1495,14 @@ public class bindings {
        public static native long CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(IOError e);
        // void CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ _res);
        public static native void CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(long _res);
+       // struct LDKCOption_u16Z COption_u16Z_some(uint16_t o);
+       public static native long COption_u16Z_some(short o);
+       // struct LDKCOption_u16Z COption_u16Z_none(void);
+       public static native long COption_u16Z_none();
+       // void COption_u16Z_free(struct LDKCOption_u16Z _res);
+       public static native void COption_u16Z_free(long _res);
+       // struct LDKCOption_u16Z COption_u16Z_clone(const struct LDKCOption_u16Z *NONNULL_PTR orig);
+       public static native long COption_u16Z_clone(long orig);
        // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
        public static native long CResult_NoneAPIErrorZ_ok();
        // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e);
@@ -1412,6 +1523,14 @@ public class bindings {
        public static native void CResult_NonePaymentSendFailureZ_free(long _res);
        // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_clone(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR orig);
        public static native long CResult_NonePaymentSendFailureZ_clone(long orig);
+       // struct LDKCResult_PaymentHashPaymentSendFailureZ CResult_PaymentHashPaymentSendFailureZ_ok(struct LDKThirtyTwoBytes o);
+       public static native long CResult_PaymentHashPaymentSendFailureZ_ok(byte[] o);
+       // struct LDKCResult_PaymentHashPaymentSendFailureZ CResult_PaymentHashPaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
+       public static native long CResult_PaymentHashPaymentSendFailureZ_err(long e);
+       // void CResult_PaymentHashPaymentSendFailureZ_free(struct LDKCResult_PaymentHashPaymentSendFailureZ _res);
+       public static native void CResult_PaymentHashPaymentSendFailureZ_free(long _res);
+       // struct LDKCResult_PaymentHashPaymentSendFailureZ CResult_PaymentHashPaymentSendFailureZ_clone(const struct LDKCResult_PaymentHashPaymentSendFailureZ *NONNULL_PTR orig);
+       public static native long CResult_PaymentHashPaymentSendFailureZ_clone(long orig);
        // void CVec_NetAddressZ_free(struct LDKCVec_NetAddressZ _res);
        public static native void CVec_NetAddressZ_free(long[] _res);
        // struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_clone(const struct LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR orig);
@@ -1788,6 +1907,14 @@ public class bindings {
        public static native void CResult_ClosingSignedDecodeErrorZ_free(long _res);
        // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR orig);
        public static native long CResult_ClosingSignedDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(struct LDKClosingSignedFeeRange o);
+       public static native long CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(long o);
+       // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_ClosingSignedFeeRangeDecodeErrorZ_err(long e);
+       // void CResult_ClosingSignedFeeRangeDecodeErrorZ_free(struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ _res);
+       public static native void CResult_ClosingSignedFeeRangeDecodeErrorZ_free(long _res);
+       // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(long orig);
        // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_ok(struct LDKCommitmentSigned o);
        public static native long CResult_CommitmentSignedDecodeErrorZ_ok(long o);
        // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_err(struct LDKDecodeError e);
@@ -2012,16 +2139,78 @@ public class bindings {
        public static native void CResult_InvoiceSignOrCreationErrorZ_free(long _res);
        // struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_clone(const struct LDKCResult_InvoiceSignOrCreationErrorZ *NONNULL_PTR orig);
        public static native long CResult_InvoiceSignOrCreationErrorZ_clone(long orig);
+       // void PaymentPurpose_free(struct LDKPaymentPurpose this_ptr);
+       public static native void PaymentPurpose_free(long this_ptr);
+       // struct LDKPaymentPurpose PaymentPurpose_clone(const struct LDKPaymentPurpose *NONNULL_PTR orig);
+       public static native long PaymentPurpose_clone(long orig);
+       // struct LDKPaymentPurpose PaymentPurpose_invoice_payment(struct LDKThirtyTwoBytes payment_preimage, struct LDKThirtyTwoBytes payment_secret, uint64_t user_payment_id);
+       public static native long PaymentPurpose_invoice_payment(byte[] payment_preimage, byte[] payment_secret, long user_payment_id);
+       // struct LDKPaymentPurpose PaymentPurpose_spontaneous_payment(struct LDKThirtyTwoBytes a);
+       public static native long PaymentPurpose_spontaneous_payment(byte[] a);
        // void Event_free(struct LDKEvent this_ptr);
        public static native void Event_free(long this_ptr);
        // struct LDKEvent Event_clone(const struct LDKEvent *NONNULL_PTR orig);
        public static native long Event_clone(long orig);
+       // struct LDKEvent Event_funding_generation_ready(struct LDKThirtyTwoBytes temporary_channel_id, uint64_t channel_value_satoshis, struct LDKCVec_u8Z output_script, uint64_t user_channel_id);
+       public static native long Event_funding_generation_ready(byte[] temporary_channel_id, long channel_value_satoshis, byte[] output_script, long user_channel_id);
+       // struct LDKEvent Event_payment_received(struct LDKThirtyTwoBytes payment_hash, uint64_t amt, struct LDKPaymentPurpose purpose);
+       public static native long Event_payment_received(byte[] payment_hash, long amt, long purpose);
+       // struct LDKEvent Event_payment_sent(struct LDKThirtyTwoBytes payment_preimage);
+       public static native long Event_payment_sent(byte[] payment_preimage);
+       // struct LDKEvent Event_payment_failed(struct LDKThirtyTwoBytes payment_hash, bool rejected_by_dest);
+       public static native long Event_payment_failed(byte[] payment_hash, boolean rejected_by_dest);
+       // struct LDKEvent Event_pending_htlcs_forwardable(uint64_t time_forwardable);
+       public static native long Event_pending_htlcs_forwardable(long time_forwardable);
+       // struct LDKEvent Event_spendable_outputs(struct LDKCVec_SpendableOutputDescriptorZ outputs);
+       public static native long Event_spendable_outputs(long[] outputs);
+       // struct LDKEvent Event_payment_forwarded(struct LDKCOption_u64Z fee_earned_msat, bool claim_from_onchain_tx);
+       public static native long Event_payment_forwarded(long fee_earned_msat, boolean claim_from_onchain_tx);
        // struct LDKCVec_u8Z Event_write(const struct LDKEvent *NONNULL_PTR obj);
        public static native byte[] Event_write(long obj);
        // void MessageSendEvent_free(struct LDKMessageSendEvent this_ptr);
        public static native void MessageSendEvent_free(long this_ptr);
        // struct LDKMessageSendEvent MessageSendEvent_clone(const struct LDKMessageSendEvent *NONNULL_PTR orig);
        public static native long MessageSendEvent_clone(long orig);
+       // struct LDKMessageSendEvent MessageSendEvent_send_accept_channel(struct LDKPublicKey node_id, struct LDKAcceptChannel msg);
+       public static native long MessageSendEvent_send_accept_channel(byte[] node_id, long msg);
+       // struct LDKMessageSendEvent MessageSendEvent_send_open_channel(struct LDKPublicKey node_id, struct LDKOpenChannel msg);
+       public static native long MessageSendEvent_send_open_channel(byte[] node_id, long msg);
+       // struct LDKMessageSendEvent MessageSendEvent_send_funding_created(struct LDKPublicKey node_id, struct LDKFundingCreated msg);
+       public static native long MessageSendEvent_send_funding_created(byte[] node_id, long msg);
+       // struct LDKMessageSendEvent MessageSendEvent_send_funding_signed(struct LDKPublicKey node_id, struct LDKFundingSigned msg);
+       public static native long MessageSendEvent_send_funding_signed(byte[] node_id, long msg);
+       // struct LDKMessageSendEvent MessageSendEvent_send_funding_locked(struct LDKPublicKey node_id, struct LDKFundingLocked msg);
+       public static native long MessageSendEvent_send_funding_locked(byte[] node_id, long msg);
+       // struct LDKMessageSendEvent MessageSendEvent_send_announcement_signatures(struct LDKPublicKey node_id, struct LDKAnnouncementSignatures msg);
+       public static native long MessageSendEvent_send_announcement_signatures(byte[] node_id, long msg);
+       // struct LDKMessageSendEvent MessageSendEvent_update_htlcs(struct LDKPublicKey node_id, struct LDKCommitmentUpdate updates);
+       public static native long MessageSendEvent_update_htlcs(byte[] node_id, long updates);
+       // struct LDKMessageSendEvent MessageSendEvent_send_revoke_and_ack(struct LDKPublicKey node_id, struct LDKRevokeAndACK msg);
+       public static native long MessageSendEvent_send_revoke_and_ack(byte[] node_id, long msg);
+       // struct LDKMessageSendEvent MessageSendEvent_send_closing_signed(struct LDKPublicKey node_id, struct LDKClosingSigned msg);
+       public static native long MessageSendEvent_send_closing_signed(byte[] node_id, long msg);
+       // struct LDKMessageSendEvent MessageSendEvent_send_shutdown(struct LDKPublicKey node_id, struct LDKShutdown msg);
+       public static native long MessageSendEvent_send_shutdown(byte[] node_id, long msg);
+       // struct LDKMessageSendEvent MessageSendEvent_send_channel_reestablish(struct LDKPublicKey node_id, struct LDKChannelReestablish msg);
+       public static native long MessageSendEvent_send_channel_reestablish(byte[] node_id, long msg);
+       // struct LDKMessageSendEvent MessageSendEvent_broadcast_channel_announcement(struct LDKChannelAnnouncement msg, struct LDKChannelUpdate update_msg);
+       public static native long MessageSendEvent_broadcast_channel_announcement(long msg, long update_msg);
+       // struct LDKMessageSendEvent MessageSendEvent_broadcast_node_announcement(struct LDKNodeAnnouncement msg);
+       public static native long MessageSendEvent_broadcast_node_announcement(long msg);
+       // struct LDKMessageSendEvent MessageSendEvent_broadcast_channel_update(struct LDKChannelUpdate msg);
+       public static native long MessageSendEvent_broadcast_channel_update(long msg);
+       // struct LDKMessageSendEvent MessageSendEvent_send_channel_update(struct LDKPublicKey node_id, struct LDKChannelUpdate msg);
+       public static native long MessageSendEvent_send_channel_update(byte[] node_id, long msg);
+       // struct LDKMessageSendEvent MessageSendEvent_handle_error(struct LDKPublicKey node_id, struct LDKErrorAction action);
+       public static native long MessageSendEvent_handle_error(byte[] node_id, long action);
+       // struct LDKMessageSendEvent MessageSendEvent_payment_failure_network_update(struct LDKHTLCFailChannelUpdate update);
+       public static native long MessageSendEvent_payment_failure_network_update(long update);
+       // struct LDKMessageSendEvent MessageSendEvent_send_channel_range_query(struct LDKPublicKey node_id, struct LDKQueryChannelRange msg);
+       public static native long MessageSendEvent_send_channel_range_query(byte[] node_id, long msg);
+       // struct LDKMessageSendEvent MessageSendEvent_send_short_ids_query(struct LDKPublicKey node_id, struct LDKQueryShortChannelIds msg);
+       public static native long MessageSendEvent_send_short_ids_query(byte[] node_id, long msg);
+       // struct LDKMessageSendEvent MessageSendEvent_send_reply_channel_range(struct LDKPublicKey node_id, struct LDKReplyChannelRange msg);
+       public static native long MessageSendEvent_send_reply_channel_range(byte[] node_id, long msg);
        // void MessageSendEventsProvider_free(struct LDKMessageSendEventsProvider this_ptr);
        public static native void MessageSendEventsProvider_free(long this_ptr);
        // void EventsProvider_free(struct LDKEventsProvider this_ptr);
@@ -2032,7 +2221,19 @@ public class bindings {
        public static native void APIError_free(long this_ptr);
        // struct LDKAPIError APIError_clone(const struct LDKAPIError *NONNULL_PTR orig);
        public static native long APIError_clone(long orig);
-       // struct LDKCResult_StringErrorZ sign(struct LDKu8slice msg, struct LDKSecretKey sk);
+       // struct LDKAPIError APIError_apimisuse_error(struct LDKStr err);
+       public static native long APIError_apimisuse_error(String err);
+       // struct LDKAPIError APIError_fee_rate_too_high(struct LDKStr err, uint32_t feerate);
+       public static native long APIError_fee_rate_too_high(String err, int feerate);
+       // struct LDKAPIError APIError_route_error(struct LDKStr err);
+       public static native long APIError_route_error(String err);
+       // struct LDKAPIError APIError_channel_unavailable(struct LDKStr err);
+       public static native long APIError_channel_unavailable(String err);
+       // struct LDKAPIError APIError_monitor_update_failed(void);
+       public static native long APIError_monitor_update_failed();
+       // struct LDKAPIError APIError_incompatible_shutdown_script(struct LDKShutdownScript script);
+       public static native long APIError_incompatible_shutdown_script(long script);
+       // struct LDKCResult_StringErrorZ sign(struct LDKu8slice msg, const uint8_t (*sk)[32]);
        public static native long sign(byte[] msg, byte[] sk);
        // struct LDKCResult_PublicKeyErrorZ recover_pk(struct LDKu8slice msg, struct LDKStr sig);
        public static native long recover_pk(byte[] msg, String sig);
@@ -2040,6 +2241,16 @@ public class bindings {
        public static native boolean verify(byte[] msg, String sig, byte[] pk);
        // enum LDKLevel Level_clone(const enum LDKLevel *NONNULL_PTR orig);
        public static native Level Level_clone(long orig);
+       // enum LDKLevel Level_trace(void);
+       public static native Level Level_trace();
+       // enum LDKLevel Level_debug(void);
+       public static native Level Level_debug();
+       // enum LDKLevel Level_info(void);
+       public static native Level Level_info();
+       // enum LDKLevel Level_warn(void);
+       public static native Level Level_warn();
+       // enum LDKLevel Level_error(void);
+       public static native Level Level_error();
        // bool Level_eq(const enum LDKLevel *NONNULL_PTR a, const enum LDKLevel *NONNULL_PTR b);
        public static native boolean Level_eq(long a, long b);
        // uint64_t Level_hash(const enum LDKLevel *NONNULL_PTR o);
@@ -2110,10 +2321,14 @@ public class bindings {
        public static native long ChannelHandshakeLimits_default();
        // void ChannelConfig_free(struct LDKChannelConfig this_obj);
        public static native void ChannelConfig_free(long this_obj);
-       // uint32_t ChannelConfig_get_fee_proportional_millionths(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
-       public static native int ChannelConfig_get_fee_proportional_millionths(long this_ptr);
-       // void ChannelConfig_set_fee_proportional_millionths(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
-       public static native void ChannelConfig_set_fee_proportional_millionths(long this_ptr, int val);
+       // uint32_t ChannelConfig_get_forwarding_fee_proportional_millionths(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
+       public static native int ChannelConfig_get_forwarding_fee_proportional_millionths(long this_ptr);
+       // void ChannelConfig_set_forwarding_fee_proportional_millionths(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
+       public static native void ChannelConfig_set_forwarding_fee_proportional_millionths(long this_ptr, int val);
+       // uint32_t ChannelConfig_get_forwarding_fee_base_msat(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
+       public static native int ChannelConfig_get_forwarding_fee_base_msat(long this_ptr);
+       // void ChannelConfig_set_forwarding_fee_base_msat(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
+       public static native void ChannelConfig_set_forwarding_fee_base_msat(long this_ptr, int val);
        // uint16_t ChannelConfig_get_cltv_expiry_delta(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
        public static native short ChannelConfig_get_cltv_expiry_delta(long this_ptr);
        // void ChannelConfig_set_cltv_expiry_delta(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint16_t val);
@@ -2126,8 +2341,16 @@ public class bindings {
        public static native boolean ChannelConfig_get_commit_upfront_shutdown_pubkey(long this_ptr);
        // void ChannelConfig_set_commit_upfront_shutdown_pubkey(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
        public static native void ChannelConfig_set_commit_upfront_shutdown_pubkey(long this_ptr, boolean val);
-       // MUST_USE_RES struct LDKChannelConfig ChannelConfig_new(uint32_t fee_proportional_millionths_arg, uint16_t cltv_expiry_delta_arg, bool announced_channel_arg, bool commit_upfront_shutdown_pubkey_arg);
-       public static native long ChannelConfig_new(int fee_proportional_millionths_arg, short cltv_expiry_delta_arg, boolean announced_channel_arg, boolean commit_upfront_shutdown_pubkey_arg);
+       // uint64_t ChannelConfig_get_max_dust_htlc_exposure_msat(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
+       public static native long ChannelConfig_get_max_dust_htlc_exposure_msat(long this_ptr);
+       // void ChannelConfig_set_max_dust_htlc_exposure_msat(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint64_t val);
+       public static native void ChannelConfig_set_max_dust_htlc_exposure_msat(long this_ptr, long val);
+       // uint64_t ChannelConfig_get_force_close_avoidance_max_fee_satoshis(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
+       public static native long ChannelConfig_get_force_close_avoidance_max_fee_satoshis(long this_ptr);
+       // void ChannelConfig_set_force_close_avoidance_max_fee_satoshis(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint64_t val);
+       public static native void ChannelConfig_set_force_close_avoidance_max_fee_satoshis(long this_ptr, long val);
+       // MUST_USE_RES struct LDKChannelConfig ChannelConfig_new(uint32_t forwarding_fee_proportional_millionths_arg, uint32_t forwarding_fee_base_msat_arg, uint16_t cltv_expiry_delta_arg, bool announced_channel_arg, bool commit_upfront_shutdown_pubkey_arg, uint64_t max_dust_htlc_exposure_msat_arg, uint64_t force_close_avoidance_max_fee_satoshis_arg);
+       public static native long ChannelConfig_new(int forwarding_fee_proportional_millionths_arg, int forwarding_fee_base_msat_arg, short cltv_expiry_delta_arg, boolean announced_channel_arg, boolean commit_upfront_shutdown_pubkey_arg, long max_dust_htlc_exposure_msat_arg, long force_close_avoidance_max_fee_satoshis_arg);
        // struct LDKChannelConfig ChannelConfig_clone(const struct LDKChannelConfig *NONNULL_PTR orig);
        public static native long ChannelConfig_clone(long orig);
        // MUST_USE_RES struct LDKChannelConfig ChannelConfig_default(void);
@@ -2150,14 +2373,34 @@ public class bindings {
        public static native long UserConfig_get_channel_options(long this_ptr);
        // void UserConfig_set_channel_options(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelConfig val);
        public static native void UserConfig_set_channel_options(long this_ptr, long val);
-       // MUST_USE_RES struct LDKUserConfig UserConfig_new(struct LDKChannelHandshakeConfig own_channel_config_arg, struct LDKChannelHandshakeLimits peer_channel_config_limits_arg, struct LDKChannelConfig channel_options_arg);
-       public static native long UserConfig_new(long own_channel_config_arg, long peer_channel_config_limits_arg, long channel_options_arg);
+       // bool UserConfig_get_accept_forwards_to_priv_channels(const struct LDKUserConfig *NONNULL_PTR this_ptr);
+       public static native boolean UserConfig_get_accept_forwards_to_priv_channels(long this_ptr);
+       // void UserConfig_set_accept_forwards_to_priv_channels(struct LDKUserConfig *NONNULL_PTR this_ptr, bool val);
+       public static native void UserConfig_set_accept_forwards_to_priv_channels(long this_ptr, boolean val);
+       // MUST_USE_RES struct LDKUserConfig UserConfig_new(struct LDKChannelHandshakeConfig own_channel_config_arg, struct LDKChannelHandshakeLimits peer_channel_config_limits_arg, struct LDKChannelConfig channel_options_arg, bool accept_forwards_to_priv_channels_arg);
+       public static native long UserConfig_new(long own_channel_config_arg, long peer_channel_config_limits_arg, long channel_options_arg, boolean accept_forwards_to_priv_channels_arg);
        // struct LDKUserConfig UserConfig_clone(const struct LDKUserConfig *NONNULL_PTR orig);
        public static native long UserConfig_clone(long orig);
        // MUST_USE_RES struct LDKUserConfig UserConfig_default(void);
        public static native long UserConfig_default();
+       // void BestBlock_free(struct LDKBestBlock this_obj);
+       public static native void BestBlock_free(long this_obj);
+       // struct LDKBestBlock BestBlock_clone(const struct LDKBestBlock *NONNULL_PTR orig);
+       public static native long BestBlock_clone(long orig);
+       // MUST_USE_RES struct LDKBestBlock BestBlock_from_genesis(enum LDKNetwork network);
+       public static native long BestBlock_from_genesis(Network network);
+       // MUST_USE_RES struct LDKBestBlock BestBlock_new(struct LDKThirtyTwoBytes block_hash, uint32_t height);
+       public static native long BestBlock_new(byte[] block_hash, int height);
+       // MUST_USE_RES struct LDKThirtyTwoBytes BestBlock_block_hash(const struct LDKBestBlock *NONNULL_PTR this_arg);
+       public static native byte[] BestBlock_block_hash(long this_arg);
+       // MUST_USE_RES uint32_t BestBlock_height(const struct LDKBestBlock *NONNULL_PTR this_arg);
+       public static native int BestBlock_height(long this_arg);
        // enum LDKAccessError AccessError_clone(const enum LDKAccessError *NONNULL_PTR orig);
        public static native AccessError AccessError_clone(long orig);
+       // enum LDKAccessError AccessError_unknown_chain(void);
+       public static native AccessError AccessError_unknown_chain();
+       // enum LDKAccessError AccessError_unknown_tx(void);
+       public static native AccessError AccessError_unknown_tx();
        // void Access_free(struct LDKAccess this_ptr);
        public static native void Access_free(long this_ptr);
        // void Listen_free(struct LDKListen this_ptr);
@@ -2192,6 +2435,14 @@ public class bindings {
        public static native void BroadcasterInterface_free(long this_ptr);
        // enum LDKConfirmationTarget ConfirmationTarget_clone(const enum LDKConfirmationTarget *NONNULL_PTR orig);
        public static native ConfirmationTarget ConfirmationTarget_clone(long orig);
+       // enum LDKConfirmationTarget ConfirmationTarget_background(void);
+       public static native ConfirmationTarget ConfirmationTarget_background();
+       // enum LDKConfirmationTarget ConfirmationTarget_normal(void);
+       public static native ConfirmationTarget ConfirmationTarget_normal();
+       // enum LDKConfirmationTarget ConfirmationTarget_high_priority(void);
+       public static native ConfirmationTarget ConfirmationTarget_high_priority();
+       // bool ConfirmationTarget_eq(const enum LDKConfirmationTarget *NONNULL_PTR a, const enum LDKConfirmationTarget *NONNULL_PTR b);
+       public static native boolean ConfirmationTarget_eq(long a, long b);
        // void FeeEstimator_free(struct LDKFeeEstimator this_ptr);
        public static native void FeeEstimator_free(long this_ptr);
        // void ChainMonitor_free(struct LDKChainMonitor this_obj);
@@ -2220,6 +2471,10 @@ public class bindings {
        public static native long ChannelMonitorUpdate_read(byte[] ser);
        // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_clone(const enum LDKChannelMonitorUpdateErr *NONNULL_PTR orig);
        public static native ChannelMonitorUpdateErr ChannelMonitorUpdateErr_clone(long orig);
+       // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_temporary_failure(void);
+       public static native ChannelMonitorUpdateErr ChannelMonitorUpdateErr_temporary_failure();
+       // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_permanent_failure(void);
+       public static native ChannelMonitorUpdateErr ChannelMonitorUpdateErr_permanent_failure();
        // void MonitorUpdateError_free(struct LDKMonitorUpdateError this_obj);
        public static native void MonitorUpdateError_free(long this_obj);
        // struct LDKMonitorUpdateError MonitorUpdateError_clone(const struct LDKMonitorUpdateError *NONNULL_PTR orig);
@@ -2228,6 +2483,10 @@ public class bindings {
        public static native void MonitorEvent_free(long this_ptr);
        // struct LDKMonitorEvent MonitorEvent_clone(const struct LDKMonitorEvent *NONNULL_PTR orig);
        public static native long MonitorEvent_clone(long orig);
+       // struct LDKMonitorEvent MonitorEvent_htlcevent(struct LDKHTLCUpdate a);
+       public static native long MonitorEvent_htlcevent(long a);
+       // struct LDKMonitorEvent MonitorEvent_commitment_tx_broadcasted(struct LDKOutPoint a);
+       public static native long MonitorEvent_commitment_tx_broadcasted(long a);
        // void HTLCUpdate_free(struct LDKHTLCUpdate this_obj);
        public static native void HTLCUpdate_free(long this_obj);
        // struct LDKHTLCUpdate HTLCUpdate_clone(const struct LDKHTLCUpdate *NONNULL_PTR orig);
@@ -2270,6 +2529,8 @@ public class bindings {
        public static native long[] ChannelMonitor_best_block_updated(long this_arg, byte[] header, int height, long broadcaster, long fee_estimator, long logger);
        // MUST_USE_RES struct LDKCVec_TxidZ ChannelMonitor_get_relevant_txids(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
        public static native byte[][] ChannelMonitor_get_relevant_txids(long this_arg);
+       // MUST_USE_RES struct LDKBestBlock ChannelMonitor_current_best_block(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
+       public static native long ChannelMonitor_current_best_block(long this_arg);
        // void Persist_free(struct LDKPersist this_ptr);
        public static native void Persist_free(long this_ptr);
        // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ C2Tuple_BlockHashChannelMonitorZ_read(struct LDKu8slice ser, const struct LDKKeysInterface *NONNULL_PTR arg);
@@ -2362,6 +2623,12 @@ public class bindings {
        public static native void SpendableOutputDescriptor_free(long this_ptr);
        // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_clone(const struct LDKSpendableOutputDescriptor *NONNULL_PTR orig);
        public static native long SpendableOutputDescriptor_clone(long orig);
+       // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_static_output(struct LDKOutPoint outpoint, struct LDKTxOut output);
+       public static native long SpendableOutputDescriptor_static_output(long outpoint, long output);
+       // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_delayed_payment_output(struct LDKDelayedPaymentOutputDescriptor a);
+       public static native long SpendableOutputDescriptor_delayed_payment_output(long a);
+       // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_static_payment_output(struct LDKStaticPaymentOutputDescriptor a);
+       public static native long SpendableOutputDescriptor_static_payment_output(long a);
        // struct LDKCVec_u8Z SpendableOutputDescriptor_write(const struct LDKSpendableOutputDescriptor *NONNULL_PTR obj);
        public static native byte[] SpendableOutputDescriptor_write(long obj);
        // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ SpendableOutputDescriptor_read(struct LDKu8slice ser);
@@ -2454,24 +2721,32 @@ public class bindings {
        public static native long ChainParameters_new(Network network_arg, long best_block_arg);
        // struct LDKChainParameters ChainParameters_clone(const struct LDKChainParameters *NONNULL_PTR orig);
        public static native long ChainParameters_clone(long orig);
-       // void BestBlock_free(struct LDKBestBlock this_obj);
-       public static native void BestBlock_free(long this_obj);
-       // struct LDKBestBlock BestBlock_clone(const struct LDKBestBlock *NONNULL_PTR orig);
-       public static native long BestBlock_clone(long orig);
-       // MUST_USE_RES struct LDKBestBlock BestBlock_from_genesis(enum LDKNetwork network);
-       public static native long BestBlock_from_genesis(Network network);
-       // MUST_USE_RES struct LDKBestBlock BestBlock_new(struct LDKThirtyTwoBytes block_hash, uint32_t height);
-       public static native long BestBlock_new(byte[] block_hash, int height);
-       // MUST_USE_RES struct LDKThirtyTwoBytes BestBlock_block_hash(const struct LDKBestBlock *NONNULL_PTR this_arg);
-       public static native byte[] BestBlock_block_hash(long this_arg);
-       // MUST_USE_RES uint32_t BestBlock_height(const struct LDKBestBlock *NONNULL_PTR this_arg);
-       public static native int BestBlock_height(long this_arg);
+       // void ChannelCounterparty_free(struct LDKChannelCounterparty this_obj);
+       public static native void ChannelCounterparty_free(long this_obj);
+       // struct LDKPublicKey ChannelCounterparty_get_node_id(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
+       public static native byte[] ChannelCounterparty_get_node_id(long this_ptr);
+       // void ChannelCounterparty_set_node_id(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+       public static native void ChannelCounterparty_set_node_id(long this_ptr, byte[] val);
+       // struct LDKInitFeatures ChannelCounterparty_get_features(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
+       public static native long ChannelCounterparty_get_features(long this_ptr);
+       // void ChannelCounterparty_set_features(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
+       public static native void ChannelCounterparty_set_features(long this_ptr, long val);
+       // uint64_t ChannelCounterparty_get_unspendable_punishment_reserve(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
+       public static native long ChannelCounterparty_get_unspendable_punishment_reserve(long this_ptr);
+       // void ChannelCounterparty_set_unspendable_punishment_reserve(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, uint64_t val);
+       public static native void ChannelCounterparty_set_unspendable_punishment_reserve(long this_ptr, long val);
+       // struct LDKChannelCounterparty ChannelCounterparty_clone(const struct LDKChannelCounterparty *NONNULL_PTR orig);
+       public static native long ChannelCounterparty_clone(long orig);
        // void ChannelDetails_free(struct LDKChannelDetails this_obj);
        public static native void ChannelDetails_free(long this_obj);
        // const uint8_t (*ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr))[32];
        public static native byte[] ChannelDetails_get_channel_id(long this_ptr);
        // void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
        public static native void ChannelDetails_set_channel_id(long this_ptr, byte[] val);
+       // struct LDKChannelCounterparty ChannelDetails_get_counterparty(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
+       public static native long ChannelDetails_get_counterparty(long this_ptr);
+       // void ChannelDetails_set_counterparty(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKChannelCounterparty val);
+       public static native void ChannelDetails_set_counterparty(long this_ptr, long val);
        // struct LDKOutPoint ChannelDetails_get_funding_txo(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
        public static native long ChannelDetails_get_funding_txo(long this_ptr);
        // void ChannelDetails_set_funding_txo(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKOutPoint val);
@@ -2480,18 +2755,14 @@ public class bindings {
        public static native long ChannelDetails_get_short_channel_id(long this_ptr);
        // void ChannelDetails_set_short_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
        public static native void ChannelDetails_set_short_channel_id(long this_ptr, long val);
-       // struct LDKPublicKey ChannelDetails_get_remote_network_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
-       public static native byte[] ChannelDetails_get_remote_network_id(long this_ptr);
-       // void ChannelDetails_set_remote_network_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKPublicKey val);
-       public static native void ChannelDetails_set_remote_network_id(long this_ptr, byte[] val);
-       // struct LDKInitFeatures ChannelDetails_get_counterparty_features(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
-       public static native long ChannelDetails_get_counterparty_features(long this_ptr);
-       // void ChannelDetails_set_counterparty_features(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
-       public static native void ChannelDetails_set_counterparty_features(long this_ptr, long val);
        // uint64_t ChannelDetails_get_channel_value_satoshis(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
        public static native long ChannelDetails_get_channel_value_satoshis(long this_ptr);
        // void ChannelDetails_set_channel_value_satoshis(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
        public static native void ChannelDetails_set_channel_value_satoshis(long this_ptr, long val);
+       // struct LDKCOption_u64Z ChannelDetails_get_unspendable_punishment_reserve(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
+       public static native long ChannelDetails_get_unspendable_punishment_reserve(long this_ptr);
+       // void ChannelDetails_set_unspendable_punishment_reserve(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+       public static native void ChannelDetails_set_unspendable_punishment_reserve(long this_ptr, long val);
        // uint64_t ChannelDetails_get_user_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
        public static native long ChannelDetails_get_user_id(long this_ptr);
        // void ChannelDetails_set_user_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
@@ -2504,6 +2775,14 @@ public class bindings {
        public static native long ChannelDetails_get_inbound_capacity_msat(long this_ptr);
        // void ChannelDetails_set_inbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
        public static native void ChannelDetails_set_inbound_capacity_msat(long this_ptr, long val);
+       // struct LDKCOption_u32Z ChannelDetails_get_confirmations_required(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
+       public static native long ChannelDetails_get_confirmations_required(long this_ptr);
+       // void ChannelDetails_set_confirmations_required(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
+       public static native void ChannelDetails_set_confirmations_required(long this_ptr, long val);
+       // struct LDKCOption_u16Z ChannelDetails_get_force_close_spend_delay(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
+       public static native long ChannelDetails_get_force_close_spend_delay(long this_ptr);
+       // void ChannelDetails_set_force_close_spend_delay(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u16Z val);
+       public static native void ChannelDetails_set_force_close_spend_delay(long this_ptr, long val);
        // bool ChannelDetails_get_is_outbound(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
        public static native boolean ChannelDetails_get_is_outbound(long this_ptr);
        // void ChannelDetails_set_is_outbound(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
@@ -2520,12 +2799,22 @@ public class bindings {
        public static native boolean ChannelDetails_get_is_public(long this_ptr);
        // void ChannelDetails_set_is_public(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
        public static native void ChannelDetails_set_is_public(long this_ptr, boolean val);
+       // MUST_USE_RES struct LDKChannelDetails ChannelDetails_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKChannelCounterparty counterparty_arg, struct LDKOutPoint funding_txo_arg, struct LDKCOption_u64Z short_channel_id_arg, uint64_t channel_value_satoshis_arg, struct LDKCOption_u64Z unspendable_punishment_reserve_arg, uint64_t user_id_arg, uint64_t outbound_capacity_msat_arg, uint64_t inbound_capacity_msat_arg, struct LDKCOption_u32Z confirmations_required_arg, struct LDKCOption_u16Z force_close_spend_delay_arg, bool is_outbound_arg, bool is_funding_locked_arg, bool is_usable_arg, bool is_public_arg);
+       public static native long ChannelDetails_new(byte[] channel_id_arg, long counterparty_arg, long funding_txo_arg, long short_channel_id_arg, long channel_value_satoshis_arg, long unspendable_punishment_reserve_arg, long user_id_arg, long outbound_capacity_msat_arg, long inbound_capacity_msat_arg, long confirmations_required_arg, long force_close_spend_delay_arg, boolean is_outbound_arg, boolean is_funding_locked_arg, boolean is_usable_arg, boolean is_public_arg);
        // struct LDKChannelDetails ChannelDetails_clone(const struct LDKChannelDetails *NONNULL_PTR orig);
        public static native long ChannelDetails_clone(long orig);
        // void PaymentSendFailure_free(struct LDKPaymentSendFailure this_ptr);
        public static native void PaymentSendFailure_free(long this_ptr);
        // struct LDKPaymentSendFailure PaymentSendFailure_clone(const struct LDKPaymentSendFailure *NONNULL_PTR orig);
        public static native long PaymentSendFailure_clone(long orig);
+       // struct LDKPaymentSendFailure PaymentSendFailure_parameter_error(struct LDKAPIError a);
+       public static native long PaymentSendFailure_parameter_error(long a);
+       // struct LDKPaymentSendFailure PaymentSendFailure_path_parameter_error(struct LDKCVec_CResult_NoneAPIErrorZZ a);
+       public static native long PaymentSendFailure_path_parameter_error(long[] a);
+       // struct LDKPaymentSendFailure PaymentSendFailure_all_failed_retry_safe(struct LDKCVec_APIErrorZ a);
+       public static native long PaymentSendFailure_all_failed_retry_safe(long[] a);
+       // struct LDKPaymentSendFailure PaymentSendFailure_partial_failure(struct LDKCVec_CResult_NoneAPIErrorZZ a);
+       public static native long PaymentSendFailure_partial_failure(long[] a);
        // MUST_USE_RES struct LDKChannelManager ChannelManager_new(struct LDKFeeEstimator fee_est, struct LDKWatch chain_monitor, struct LDKBroadcasterInterface tx_broadcaster, struct LDKLogger logger, struct LDKKeysInterface keys_manager, struct LDKUserConfig config, struct LDKChainParameters params);
        public static native long ChannelManager_new(long fee_est, long chain_monitor, long tx_broadcaster, long logger, long keys_manager, long config, long params);
        // MUST_USE_RES struct LDKUserConfig ChannelManager_get_current_default_configuration(const struct LDKChannelManager *NONNULL_PTR this_arg);
@@ -2538,12 +2827,16 @@ public class bindings {
        public static native long[] ChannelManager_list_usable_channels(long this_arg);
        // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
        public static native long ChannelManager_close_channel(long this_arg, byte[] channel_id);
+       // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel_with_target_feerate(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32], uint32_t target_feerate_sats_per_1000_weight);
+       public static native long ChannelManager_close_channel_with_target_feerate(long this_arg, byte[] channel_id, int target_feerate_sats_per_1000_weight);
        // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
        public static native long ChannelManager_force_close_channel(long this_arg, byte[] channel_id);
        // void ChannelManager_force_close_all_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
        public static native void ChannelManager_force_close_all_channels(long this_arg);
        // MUST_USE_RES struct LDKCResult_NonePaymentSendFailureZ ChannelManager_send_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_hash, struct LDKThirtyTwoBytes payment_secret);
        public static native long ChannelManager_send_payment(long this_arg, long route, byte[] payment_hash, byte[] payment_secret);
+       // MUST_USE_RES struct LDKCResult_PaymentHashPaymentSendFailureZ ChannelManager_send_spontaneous_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_preimage);
+       public static native long ChannelManager_send_spontaneous_payment(long this_arg, long route, byte[] payment_preimage);
        // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_funding_transaction_generated(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*temporary_channel_id)[32], struct LDKTransaction funding_transaction);
        public static native long ChannelManager_funding_transaction_generated(long this_arg, byte[] temporary_channel_id, byte[] funding_transaction);
        // void ChannelManager_broadcast_node_announcement(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThreeBytes rgb, struct LDKThirtyTwoBytes alias, struct LDKCVec_NetAddressZ addresses);
@@ -2576,6 +2869,8 @@ public class bindings {
        public static native boolean ChannelManager_await_persistable_update_timeout(long this_arg, long max_wait);
        // void ChannelManager_await_persistable_update(const struct LDKChannelManager *NONNULL_PTR this_arg);
        public static native void ChannelManager_await_persistable_update(long this_arg);
+       // MUST_USE_RES struct LDKBestBlock ChannelManager_current_best_block(const struct LDKChannelManager *NONNULL_PTR this_arg);
+       public static native long ChannelManager_current_best_block(long this_arg);
        // struct LDKChannelMessageHandler ChannelManager_as_ChannelMessageHandler(const struct LDKChannelManager *NONNULL_PTR this_arg);
        public static native long ChannelManager_as_ChannelMessageHandler(long this_arg);
        // struct LDKCVec_u8Z ChannelManager_write(const struct LDKChannelManager *NONNULL_PTR obj);
@@ -2862,6 +3157,20 @@ public class bindings {
        public static native long Shutdown_new(byte[] channel_id_arg, byte[] scriptpubkey_arg);
        // struct LDKShutdown Shutdown_clone(const struct LDKShutdown *NONNULL_PTR orig);
        public static native long Shutdown_clone(long orig);
+       // void ClosingSignedFeeRange_free(struct LDKClosingSignedFeeRange this_obj);
+       public static native void ClosingSignedFeeRange_free(long this_obj);
+       // uint64_t ClosingSignedFeeRange_get_min_fee_satoshis(const struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr);
+       public static native long ClosingSignedFeeRange_get_min_fee_satoshis(long this_ptr);
+       // void ClosingSignedFeeRange_set_min_fee_satoshis(struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr, uint64_t val);
+       public static native void ClosingSignedFeeRange_set_min_fee_satoshis(long this_ptr, long val);
+       // uint64_t ClosingSignedFeeRange_get_max_fee_satoshis(const struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr);
+       public static native long ClosingSignedFeeRange_get_max_fee_satoshis(long this_ptr);
+       // void ClosingSignedFeeRange_set_max_fee_satoshis(struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr, uint64_t val);
+       public static native void ClosingSignedFeeRange_set_max_fee_satoshis(long this_ptr, long val);
+       // MUST_USE_RES struct LDKClosingSignedFeeRange ClosingSignedFeeRange_new(uint64_t min_fee_satoshis_arg, uint64_t max_fee_satoshis_arg);
+       public static native long ClosingSignedFeeRange_new(long min_fee_satoshis_arg, long max_fee_satoshis_arg);
+       // struct LDKClosingSignedFeeRange ClosingSignedFeeRange_clone(const struct LDKClosingSignedFeeRange *NONNULL_PTR orig);
+       public static native long ClosingSignedFeeRange_clone(long orig);
        // void ClosingSigned_free(struct LDKClosingSigned this_obj);
        public static native void ClosingSigned_free(long this_obj);
        // const uint8_t (*ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr))[32];
@@ -2876,8 +3185,12 @@ public class bindings {
        public static native byte[] ClosingSigned_get_signature(long this_ptr);
        // void ClosingSigned_set_signature(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
        public static native void ClosingSigned_set_signature(long this_ptr, byte[] val);
-       // MUST_USE_RES struct LDKClosingSigned ClosingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t fee_satoshis_arg, struct LDKSignature signature_arg);
-       public static native long ClosingSigned_new(byte[] channel_id_arg, long fee_satoshis_arg, byte[] signature_arg);
+       // struct LDKClosingSignedFeeRange ClosingSigned_get_fee_range(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
+       public static native long ClosingSigned_get_fee_range(long this_ptr);
+       // void ClosingSigned_set_fee_range(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKClosingSignedFeeRange val);
+       public static native void ClosingSigned_set_fee_range(long this_ptr, long val);
+       // MUST_USE_RES struct LDKClosingSigned ClosingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t fee_satoshis_arg, struct LDKSignature signature_arg, struct LDKClosingSignedFeeRange fee_range_arg);
+       public static native long ClosingSigned_new(byte[] channel_id_arg, long fee_satoshis_arg, byte[] signature_arg, long fee_range_arg);
        // struct LDKClosingSigned ClosingSigned_clone(const struct LDKClosingSigned *NONNULL_PTR orig);
        public static native long ClosingSigned_clone(long orig);
        // void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_obj);
@@ -3054,6 +3367,14 @@ public class bindings {
        public static native void NetAddress_free(long this_ptr);
        // struct LDKNetAddress NetAddress_clone(const struct LDKNetAddress *NONNULL_PTR orig);
        public static native long NetAddress_clone(long orig);
+       // struct LDKNetAddress NetAddress_ipv4(struct LDKFourBytes addr, uint16_t port);
+       public static native long NetAddress_ipv4(byte[] addr, short port);
+       // struct LDKNetAddress NetAddress_ipv6(struct LDKSixteenBytes addr, uint16_t port);
+       public static native long NetAddress_ipv6(byte[] addr, short port);
+       // struct LDKNetAddress NetAddress_onion_v2(struct LDKTenBytes addr, uint16_t port);
+       public static native long NetAddress_onion_v2(byte[] addr, short port);
+       // struct LDKNetAddress NetAddress_onion_v3(struct LDKThirtyTwoBytes ed25519_pubkey, uint16_t checksum, uint8_t version, uint16_t port);
+       public static native long NetAddress_onion_v3(byte[] ed25519_pubkey, short checksum, byte version, short port);
        // struct LDKCVec_u8Z NetAddress_write(const struct LDKNetAddress *NONNULL_PTR obj);
        public static native byte[] NetAddress_write(long obj);
        // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ Result_read(struct LDKu8slice ser);
@@ -3298,6 +3619,14 @@ public class bindings {
        public static native void ErrorAction_free(long this_ptr);
        // struct LDKErrorAction ErrorAction_clone(const struct LDKErrorAction *NONNULL_PTR orig);
        public static native long ErrorAction_clone(long orig);
+       // struct LDKErrorAction ErrorAction_disconnect_peer(struct LDKErrorMessage msg);
+       public static native long ErrorAction_disconnect_peer(long msg);
+       // struct LDKErrorAction ErrorAction_ignore_error(void);
+       public static native long ErrorAction_ignore_error();
+       // struct LDKErrorAction ErrorAction_ignore_and_log(enum LDKLevel a);
+       public static native long ErrorAction_ignore_and_log(Level a);
+       // struct LDKErrorAction ErrorAction_send_error_message(struct LDKErrorMessage msg);
+       public static native long ErrorAction_send_error_message(long msg);
        // void LightningError_free(struct LDKLightningError this_obj);
        public static native void LightningError_free(long this_obj);
        // struct LDKStr LightningError_get_err(const struct LDKLightningError *NONNULL_PTR this_ptr);
@@ -3338,6 +3667,12 @@ public class bindings {
        public static native void HTLCFailChannelUpdate_free(long this_ptr);
        // struct LDKHTLCFailChannelUpdate HTLCFailChannelUpdate_clone(const struct LDKHTLCFailChannelUpdate *NONNULL_PTR orig);
        public static native long HTLCFailChannelUpdate_clone(long orig);
+       // struct LDKHTLCFailChannelUpdate HTLCFailChannelUpdate_channel_update_message(struct LDKChannelUpdate msg);
+       public static native long HTLCFailChannelUpdate_channel_update_message(long msg);
+       // struct LDKHTLCFailChannelUpdate HTLCFailChannelUpdate_channel_closed(uint64_t short_channel_id, bool is_permanent);
+       public static native long HTLCFailChannelUpdate_channel_closed(long short_channel_id, boolean is_permanent);
+       // struct LDKHTLCFailChannelUpdate HTLCFailChannelUpdate_node_failure(struct LDKPublicKey node_id, bool is_permanent);
+       public static native long HTLCFailChannelUpdate_node_failure(byte[] node_id, boolean is_permanent);
        // void ChannelMessageHandler_free(struct LDKChannelMessageHandler this_ptr);
        public static native void ChannelMessageHandler_free(long this_ptr);
        // void RoutingMessageHandler_free(struct LDKRoutingMessageHandler this_ptr);
@@ -3358,6 +3693,10 @@ public class bindings {
        public static native byte[] ClosingSigned_write(long obj);
        // struct LDKCResult_ClosingSignedDecodeErrorZ ClosingSigned_read(struct LDKu8slice ser);
        public static native long ClosingSigned_read(byte[] ser);
+       // struct LDKCVec_u8Z ClosingSignedFeeRange_write(const struct LDKClosingSignedFeeRange *NONNULL_PTR obj);
+       public static native byte[] ClosingSignedFeeRange_write(long obj);
+       // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ ClosingSignedFeeRange_read(struct LDKu8slice ser);
+       public static native long ClosingSignedFeeRange_read(byte[] ser);
        // struct LDKCVec_u8Z CommitmentSigned_write(const struct LDKCommitmentSigned *NONNULL_PTR obj);
        public static native byte[] CommitmentSigned_write(long obj);
        // struct LDKCResult_CommitmentSignedDecodeErrorZ CommitmentSigned_read(struct LDKu8slice ser);
@@ -3842,6 +4181,38 @@ public class bindings {
        public static native long ChannelFeatures_read(byte[] ser);
        // struct LDKCResult_InvoiceFeaturesDecodeErrorZ InvoiceFeatures_read(struct LDKu8slice ser);
        public static native long InvoiceFeatures_read(byte[] ser);
+       // void ShutdownScript_free(struct LDKShutdownScript this_obj);
+       public static native void ShutdownScript_free(long this_obj);
+       // struct LDKShutdownScript ShutdownScript_clone(const struct LDKShutdownScript *NONNULL_PTR orig);
+       public static native long ShutdownScript_clone(long orig);
+       // void InvalidShutdownScript_free(struct LDKInvalidShutdownScript this_obj);
+       public static native void InvalidShutdownScript_free(long this_obj);
+       // struct LDKu8slice InvalidShutdownScript_get_script(const struct LDKInvalidShutdownScript *NONNULL_PTR this_ptr);
+       public static native byte[] InvalidShutdownScript_get_script(long this_ptr);
+       // void InvalidShutdownScript_set_script(struct LDKInvalidShutdownScript *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
+       public static native void InvalidShutdownScript_set_script(long this_ptr, byte[] val);
+       // MUST_USE_RES struct LDKInvalidShutdownScript InvalidShutdownScript_new(struct LDKCVec_u8Z script_arg);
+       public static native long InvalidShutdownScript_new(byte[] script_arg);
+       // struct LDKCVec_u8Z ShutdownScript_write(const struct LDKShutdownScript *NONNULL_PTR obj);
+       public static native byte[] ShutdownScript_write(long obj);
+       // struct LDKCResult_ShutdownScriptDecodeErrorZ ShutdownScript_read(struct LDKu8slice ser);
+       public static native long ShutdownScript_read(byte[] ser);
+       // MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2pkh(const uint8_t (*pubkey_hash)[20]);
+       public static native long ShutdownScript_new_p2pkh(byte[] pubkey_hash);
+       // MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2sh(const uint8_t (*script_hash)[20]);
+       public static native long ShutdownScript_new_p2sh(byte[] script_hash);
+       // MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2wpkh(const uint8_t (*pubkey_hash)[20]);
+       public static native long ShutdownScript_new_p2wpkh(byte[] pubkey_hash);
+       // MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2wsh(const uint8_t (*script_hash)[32]);
+       public static native long ShutdownScript_new_p2wsh(byte[] script_hash);
+       // MUST_USE_RES struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ ShutdownScript_new_witness_program(uint8_t version, struct LDKu8slice program);
+       public static native long ShutdownScript_new_witness_program(byte version, byte[] program);
+       // MUST_USE_RES struct LDKCVec_u8Z ShutdownScript_into_inner(struct LDKShutdownScript this_arg);
+       public static native byte[] ShutdownScript_into_inner(long this_arg);
+       // MUST_USE_RES struct LDKPublicKey ShutdownScript_as_legacy_pubkey(const struct LDKShutdownScript *NONNULL_PTR this_arg);
+       public static native byte[] ShutdownScript_as_legacy_pubkey(long this_arg);
+       // MUST_USE_RES bool ShutdownScript_is_compatible(const struct LDKShutdownScript *NONNULL_PTR this_arg, const struct LDKInitFeatures *NONNULL_PTR features);
+       public static native boolean ShutdownScript_is_compatible(long this_arg, long features);
        // void RouteHop_free(struct LDKRouteHop this_obj);
        public static native void RouteHop_free(long this_obj);
        // struct LDKPublicKey RouteHop_get_pubkey(const struct LDKRouteHop *NONNULL_PTR this_ptr);
@@ -3926,6 +4297,8 @@ public class bindings {
        public static native boolean RouteHintHop_eq(long a, long b);
        // struct LDKRouteHintHop RouteHintHop_clone(const struct LDKRouteHintHop *NONNULL_PTR orig);
        public static native long RouteHintHop_clone(long orig);
+       // struct LDKCResult_RouteLightningErrorZ get_keysend_route(struct LDKPublicKey our_node_id, const struct LDKNetworkGraph *NONNULL_PTR network, struct LDKPublicKey payee, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKCVec_RouteHintZ last_hops, uint64_t final_value_msat, uint32_t final_cltv, struct LDKLogger logger);
+       public static native long get_keysend_route(byte[] our_node_id, long network, byte[] payee, long[] first_hops, long[] last_hops, long final_value_msat, int final_cltv, long logger);
        // struct LDKCResult_RouteLightningErrorZ get_route(struct LDKPublicKey our_node_id, const struct LDKNetworkGraph *NONNULL_PTR network, struct LDKPublicKey payee, struct LDKInvoiceFeatures payee_features, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKCVec_RouteHintZ last_hops, uint64_t final_value_msat, uint32_t final_cltv, struct LDKLogger logger);
        public static native long get_route(byte[] our_node_id, long network, byte[] payee, long payee_features, long[] first_hops, long[] last_hops, long final_value_msat, int final_cltv, long logger);
        // void NetworkGraph_free(struct LDKNetworkGraph this_obj);
@@ -4136,6 +4509,8 @@ public class bindings {
        public static native void ChannelManagerPersister_free(long this_ptr);
        // MUST_USE_RES struct LDKBackgroundProcessor BackgroundProcessor_start(struct LDKChannelManagerPersister persister, struct LDKEventHandler event_handler, const struct LDKChainMonitor *NONNULL_PTR chain_monitor, const struct LDKChannelManager *NONNULL_PTR channel_manager, const struct LDKPeerManager *NONNULL_PTR peer_manager, struct LDKLogger logger);
        public static native long BackgroundProcessor_start(long persister, long event_handler, long chain_monitor, long channel_manager, long peer_manager, long logger);
+       // MUST_USE_RES struct LDKCResult_NoneErrorZ BackgroundProcessor_join(struct LDKBackgroundProcessor this_arg);
+       public static native long BackgroundProcessor_join(long this_arg);
        // MUST_USE_RES struct LDKCResult_NoneErrorZ BackgroundProcessor_stop(struct LDKBackgroundProcessor this_arg);
        public static native long BackgroundProcessor_stop(long this_arg);
        // void check_platform(void);
@@ -4180,12 +4555,30 @@ public class bindings {
        public static native long PositiveTimestamp_clone(long orig);
        // enum LDKSiPrefix SiPrefix_clone(const enum LDKSiPrefix *NONNULL_PTR orig);
        public static native SiPrefix SiPrefix_clone(long orig);
+       // enum LDKSiPrefix SiPrefix_milli(void);
+       public static native SiPrefix SiPrefix_milli();
+       // enum LDKSiPrefix SiPrefix_micro(void);
+       public static native SiPrefix SiPrefix_micro();
+       // enum LDKSiPrefix SiPrefix_nano(void);
+       public static native SiPrefix SiPrefix_nano();
+       // enum LDKSiPrefix SiPrefix_pico(void);
+       public static native SiPrefix SiPrefix_pico();
        // bool SiPrefix_eq(const enum LDKSiPrefix *NONNULL_PTR a, const enum LDKSiPrefix *NONNULL_PTR b);
        public static native boolean SiPrefix_eq(long a, long b);
        // MUST_USE_RES uint64_t SiPrefix_multiplier(const enum LDKSiPrefix *NONNULL_PTR this_arg);
        public static native long SiPrefix_multiplier(long this_arg);
        // enum LDKCurrency Currency_clone(const enum LDKCurrency *NONNULL_PTR orig);
        public static native Currency Currency_clone(long orig);
+       // enum LDKCurrency Currency_bitcoin(void);
+       public static native Currency Currency_bitcoin();
+       // enum LDKCurrency Currency_bitcoin_testnet(void);
+       public static native Currency Currency_bitcoin_testnet();
+       // enum LDKCurrency Currency_regtest(void);
+       public static native Currency Currency_regtest();
+       // enum LDKCurrency Currency_simnet(void);
+       public static native Currency Currency_simnet();
+       // enum LDKCurrency Currency_signet(void);
+       public static native Currency Currency_signet();
        // bool Currency_eq(const enum LDKCurrency *NONNULL_PTR a, const enum LDKCurrency *NONNULL_PTR b);
        public static native boolean Currency_eq(long a, long b);
        // void Sha256_free(struct LDKSha256 this_obj);
@@ -4222,6 +4615,12 @@ public class bindings {
        public static native void Fallback_free(long this_ptr);
        // struct LDKFallback Fallback_clone(const struct LDKFallback *NONNULL_PTR orig);
        public static native long Fallback_clone(long orig);
+       // struct LDKFallback Fallback_seg_wit_program(struct LDKu5 version, struct LDKCVec_u8Z program);
+       public static native long Fallback_seg_wit_program(byte version, byte[] program);
+       // struct LDKFallback Fallback_pub_key_hash(struct LDKTwentyBytes a);
+       public static native long Fallback_pub_key_hash(byte[] a);
+       // struct LDKFallback Fallback_script_hash(struct LDKTwentyBytes a);
+       public static native long Fallback_script_hash(byte[] a);
        // bool Fallback_eq(const struct LDKFallback *NONNULL_PTR a, const struct LDKFallback *NONNULL_PTR b);
        public static native boolean Fallback_eq(long a, long b);
        // void InvoiceSignature_free(struct LDKInvoiceSignature this_obj);
@@ -4328,12 +4727,36 @@ public class bindings {
        public static native long PrivateRoute_into_inner(long this_arg);
        // enum LDKCreationError CreationError_clone(const enum LDKCreationError *NONNULL_PTR orig);
        public static native CreationError CreationError_clone(long orig);
+       // enum LDKCreationError CreationError_description_too_long(void);
+       public static native CreationError CreationError_description_too_long();
+       // enum LDKCreationError CreationError_route_too_long(void);
+       public static native CreationError CreationError_route_too_long();
+       // enum LDKCreationError CreationError_timestamp_out_of_bounds(void);
+       public static native CreationError CreationError_timestamp_out_of_bounds();
+       // enum LDKCreationError CreationError_expiry_time_out_of_bounds(void);
+       public static native CreationError CreationError_expiry_time_out_of_bounds();
        // bool CreationError_eq(const enum LDKCreationError *NONNULL_PTR a, const enum LDKCreationError *NONNULL_PTR b);
        public static native boolean CreationError_eq(long a, long b);
        // struct LDKStr CreationError_to_str(const enum LDKCreationError *NONNULL_PTR o);
        public static native String CreationError_to_str(long o);
        // enum LDKSemanticError SemanticError_clone(const enum LDKSemanticError *NONNULL_PTR orig);
        public static native SemanticError SemanticError_clone(long orig);
+       // enum LDKSemanticError SemanticError_no_payment_hash(void);
+       public static native SemanticError SemanticError_no_payment_hash();
+       // enum LDKSemanticError SemanticError_multiple_payment_hashes(void);
+       public static native SemanticError SemanticError_multiple_payment_hashes();
+       // enum LDKSemanticError SemanticError_no_description(void);
+       public static native SemanticError SemanticError_no_description();
+       // enum LDKSemanticError SemanticError_multiple_descriptions(void);
+       public static native SemanticError SemanticError_multiple_descriptions();
+       // enum LDKSemanticError SemanticError_multiple_payment_secrets(void);
+       public static native SemanticError SemanticError_multiple_payment_secrets();
+       // enum LDKSemanticError SemanticError_invalid_features(void);
+       public static native SemanticError SemanticError_invalid_features();
+       // enum LDKSemanticError SemanticError_invalid_recovery_id(void);
+       public static native SemanticError SemanticError_invalid_recovery_id();
+       // enum LDKSemanticError SemanticError_invalid_signature(void);
+       public static native SemanticError SemanticError_invalid_signature();
        // bool SemanticError_eq(const enum LDKSemanticError *NONNULL_PTR a, const enum LDKSemanticError *NONNULL_PTR b);
        public static native boolean SemanticError_eq(long a, long b);
        // struct LDKStr SemanticError_to_str(const enum LDKSemanticError *NONNULL_PTR o);
@@ -4342,6 +4765,10 @@ public class bindings {
        public static native void SignOrCreationError_free(long this_ptr);
        // struct LDKSignOrCreationError SignOrCreationError_clone(const struct LDKSignOrCreationError *NONNULL_PTR orig);
        public static native long SignOrCreationError_clone(long orig);
+       // struct LDKSignOrCreationError SignOrCreationError_sign_error(void);
+       public static native long SignOrCreationError_sign_error();
+       // struct LDKSignOrCreationError SignOrCreationError_creation_error(enum LDKCreationError a);
+       public static native long SignOrCreationError_creation_error(CreationError a);
        // bool SignOrCreationError_eq(const struct LDKSignOrCreationError *NONNULL_PTR a, const struct LDKSignOrCreationError *NONNULL_PTR b);
        public static native boolean SignOrCreationError_eq(long a, long b);
        // struct LDKStr SignOrCreationError_to_str(const struct LDKSignOrCreationError *NONNULL_PTR o);