Update auto-generated bindings to 0.0.103
[ldk-java] / src / main / java / org / ldk / impl / bindings.java
index 9a5c9f2d4f9781d177698e6089959dea11d736a4..99e579fb65f776153dd181cd830b91d4166330b6 100644 (file)
@@ -1,5 +1,6 @@
 package org.ldk.impl;
 import org.ldk.enums.*;
+import org.ldk.impl.version;
 import java.io.File;
 import java.io.InputStream;
 import java.io.IOException;
@@ -20,7 +21,7 @@ public class bindings {
                try {
                        // Try to load natively first, this works on Android and in testing.
                        System.loadLibrary("lightningjni");
-               } catch (UnsatisfiedLinkError _ignored) {
+               } catch (UnsatisfiedLinkError system_load_err) {
                        // 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
@@ -31,13 +32,16 @@ public class bindings {
                                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) {
+                       } catch (Exception e) {
+                               System.err.println("Failed to load LDK native library.");
+                               System.err.println("System LDK native library load failed with: " + system_load_err);
+                               System.err.println("Resource-based LDK native library load failed with: " + 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()))
+               if (!get_lib_version_string().equals(version.get_ldk_java_bindings_version()))
                        throw new IllegalArgumentException("Compiled LDK library and LDK class failes do not match");
                // Fetching the LDK versions from C also checks that the header and binaries match
                get_ldk_c_bindings_version();
@@ -47,9 +51,6 @@ public class bindings {
        static native void init_class_cache();
        static native String get_lib_version_string();
 
-       public static String get_ldk_java_bindings_version() {
-               return "v0.0.99.1";
-       }
        public static native String get_ldk_c_bindings_version();
        public static native String get_ldk_version();
 
@@ -77,6 +78,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);
@@ -120,6 +125,9 @@ public class bindings {
        public static native boolean LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_result_ok(long arg);
        public static native long LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_ok(long arg);
        public static native long LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_TrustedClosingTransactionNoneZ_result_ok(long arg);
+       public static native long LDKCResult_TrustedClosingTransactionNoneZ_get_ok(long arg);
+       public static native void LDKCResult_TrustedClosingTransactionNoneZ_get_err(long arg);
        public static native boolean LDKCResult_CommitmentTransactionDecodeErrorZ_result_ok(long arg);
        public static native long LDKCResult_CommitmentTransactionDecodeErrorZ_get_ok(long arg);
        public static native long LDKCResult_CommitmentTransactionDecodeErrorZ_get_err(long arg);
@@ -129,6 +137,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);
@@ -139,6 +153,10 @@ public class bindings {
        public static native boolean LDKCResult_RouteDecodeErrorZ_result_ok(long arg);
        public static native long LDKCResult_RouteDecodeErrorZ_get_ok(long arg);
        public static native long LDKCResult_RouteDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_RouteParametersDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_RouteParametersDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_RouteParametersDecodeErrorZ_get_err(long arg);
+       public static native long LDKCVec_RouteHintZ_new(long[] elems);
        public static class LDKCOption_u64Z {
                private LDKCOption_u64Z() {}
                public final static class Some extends LDKCOption_u64Z {
@@ -152,17 +170,27 @@ public class bindings {
        }
        static { LDKCOption_u64Z.init(); }
        public static native LDKCOption_u64Z LDKCOption_u64Z_ref_from_ptr(long ptr);
+       public static native boolean LDKCResult_PayeeDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_PayeeDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_PayeeDecodeErrorZ_get_err(long arg);
+       public static native long LDKCVec_RouteHintHopZ_new(long[] elems);
+       public static native boolean LDKCResult_RouteHintDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_RouteHintDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_RouteHintDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_RouteHintHopDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_RouteHintHopDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_RouteHintHopDecodeErrorZ_get_err(long arg);
        public static native long LDKCVec_ChannelDetailsZ_new(long[] elems);
-       public static native long LDKCVec_RouteHintZ_new(long[] elems);
        public static native boolean LDKCResult_RouteLightningErrorZ_result_ok(long arg);
        public static native long LDKCResult_RouteLightningErrorZ_get_ok(long arg);
        public static native long LDKCResult_RouteLightningErrorZ_get_err(long arg);
        public static native boolean LDKCResult_TxOutAccessErrorZ_result_ok(long arg);
        public static native long LDKCResult_TxOutAccessErrorZ_get_ok(long arg);
        public static native AccessError LDKCResult_TxOutAccessErrorZ_get_err(long arg);
-       public static native long LDKC2Tuple_usizeTransactionZ_new(long a, byte[] b);
-       public static native long LDKC2Tuple_usizeTransactionZ_get_a(long ptr);
-       public static native byte[] LDKC2Tuple_usizeTransactionZ_get_b(long ptr);
+       // uintptr_t C2Tuple_usizeTransactionZ_get_a(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR tuple);
+       public static native long C2Tuple_usizeTransactionZ_get_a(long tuple);
+       // struct LDKTransaction C2Tuple_usizeTransactionZ_get_b(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR tuple);
+       public static native byte[] C2Tuple_usizeTransactionZ_get_b(long tuple);
        public static native long LDKCVec_C2Tuple_usizeTransactionZZ_new(long[] elems);
        public static native boolean LDKCResult_NoneChannelMonitorUpdateErrZ_result_ok(long arg);
        public static native void LDKCResult_NoneChannelMonitorUpdateErrZ_get_ok(long arg);
@@ -173,9 +201,18 @@ public class bindings {
                        public long htlc_event;
                        HTLCEvent(long htlc_event) { this.htlc_event = htlc_event; }
                }
-               public final static class CommitmentTxBroadcasted extends LDKMonitorEvent {
-                       public long commitment_tx_broadcasted;
-                       CommitmentTxBroadcasted(long commitment_tx_broadcasted) { this.commitment_tx_broadcasted = commitment_tx_broadcasted; }
+               public final static class CommitmentTxConfirmed extends LDKMonitorEvent {
+                       public long commitment_tx_confirmed;
+                       CommitmentTxConfirmed(long commitment_tx_confirmed) { this.commitment_tx_confirmed = commitment_tx_confirmed; }
+               }
+               public final static class UpdateCompleted extends LDKMonitorEvent {
+                       public long funding_txo;
+                       public long monitor_update_id;
+                       UpdateCompleted(long funding_txo, long monitor_update_id) { this.funding_txo = funding_txo; this.monitor_update_id = monitor_update_id; }
+               }
+               public final static class UpdateFailed extends LDKMonitorEvent {
+                       public long update_failed;
+                       UpdateFailed(long update_failed) { this.update_failed = update_failed; }
                }
                static native void init();
        }
@@ -195,6 +232,39 @@ public class bindings {
        }
        static { LDKCOption_C2Tuple_usizeTransactionZZ.init(); }
        public static native LDKCOption_C2Tuple_usizeTransactionZZ LDKCOption_C2Tuple_usizeTransactionZZ_ref_from_ptr(long ptr);
+       public static class LDKNetworkUpdate {
+               private LDKNetworkUpdate() {}
+               public final static class ChannelUpdateMessage extends LDKNetworkUpdate {
+                       public long msg;
+                       ChannelUpdateMessage(long msg) { this.msg = msg; }
+               }
+               public final static class ChannelClosed extends LDKNetworkUpdate {
+                       public long short_channel_id;
+                       public boolean is_permanent;
+                       ChannelClosed(long short_channel_id, boolean is_permanent) { this.short_channel_id = short_channel_id; this.is_permanent = is_permanent; }
+               }
+               public final static class NodeFailure extends LDKNetworkUpdate {
+                       public byte[] node_id;
+                       public boolean is_permanent;
+                       NodeFailure(byte[] node_id, boolean is_permanent) { this.node_id = node_id; this.is_permanent = is_permanent; }
+               }
+               static native void init();
+       }
+       static { LDKNetworkUpdate.init(); }
+       public static native LDKNetworkUpdate LDKNetworkUpdate_ref_from_ptr(long ptr);
+       public static class LDKCOption_NetworkUpdateZ {
+               private LDKCOption_NetworkUpdateZ() {}
+               public final static class Some extends LDKCOption_NetworkUpdateZ {
+                       public long some;
+                       Some(long some) { this.some = some; }
+               }
+               public final static class None extends LDKCOption_NetworkUpdateZ {
+                       None() { }
+               }
+               static native void init();
+       }
+       static { LDKCOption_NetworkUpdateZ.init(); }
+       public static native LDKCOption_NetworkUpdateZ LDKCOption_NetworkUpdateZ_ref_from_ptr(long ptr);
        public static class LDKSpendableOutputDescriptor {
                private LDKSpendableOutputDescriptor() {}
                public final static class StaticOutput extends LDKSpendableOutputDescriptor {
@@ -236,26 +306,6 @@ public class bindings {
        }
        static { LDKErrorAction.init(); }
        public static native LDKErrorAction LDKErrorAction_ref_from_ptr(long ptr);
-       public static class LDKHTLCFailChannelUpdate {
-               private LDKHTLCFailChannelUpdate() {}
-               public final static class ChannelUpdateMessage extends LDKHTLCFailChannelUpdate {
-                       public long msg;
-                       ChannelUpdateMessage(long msg) { this.msg = msg; }
-               }
-               public final static class ChannelClosed extends LDKHTLCFailChannelUpdate {
-                       public long short_channel_id;
-                       public boolean is_permanent;
-                       ChannelClosed(long short_channel_id, boolean is_permanent) { this.short_channel_id = short_channel_id; this.is_permanent = is_permanent; }
-               }
-               public final static class NodeFailure extends LDKHTLCFailChannelUpdate {
-                       public byte[] node_id;
-                       public boolean is_permanent;
-                       NodeFailure(byte[] node_id, boolean is_permanent) { this.node_id = node_id; this.is_permanent = is_permanent; }
-               }
-               static native void init();
-       }
-       static { LDKHTLCFailChannelUpdate.init(); }
-       public static native LDKHTLCFailChannelUpdate LDKHTLCFailChannelUpdate_ref_from_ptr(long ptr);
        public static class LDKMessageSendEvent {
                private LDKMessageSendEvent() {}
                public final static class SendAcceptChannel extends LDKMessageSendEvent {
@@ -336,10 +386,6 @@ public class bindings {
                        public long action;
                        HandleError(byte[] node_id, long action) { this.node_id = node_id; this.action = action; }
                }
-               public final static class PaymentFailureNetworkUpdate extends LDKMessageSendEvent {
-                       public long update;
-                       PaymentFailureNetworkUpdate(long update) { this.update = update; }
-               }
                public final static class SendChannelRangeQuery extends LDKMessageSendEvent {
                        public byte[] node_id;
                        public long msg;
@@ -372,6 +418,12 @@ public class bindings {
        public static native boolean LDKCResult_InvoiceFeaturesDecodeErrorZ_result_ok(long arg);
        public static native long LDKCResult_InvoiceFeaturesDecodeErrorZ_get_ok(long arg);
        public static native long LDKCResult_InvoiceFeaturesDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_ScoringParametersDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_ScoringParametersDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_ScoringParametersDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_ScorerDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_ScorerDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_ScorerDecodeErrorZ_get_err(long arg);
        public static native boolean LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ_result_ok(long arg);
        public static native long LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_ok(long arg);
        public static native long LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(long arg);
@@ -381,9 +433,13 @@ public class bindings {
        public static native boolean LDKCResult_SpendableOutputDescriptorDecodeErrorZ_result_ok(long arg);
        public static native long LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(long arg);
        public static native long LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_err(long arg);
-       public static native long LDKC2Tuple_SignatureCVec_SignatureZZ_new(byte[] a, byte[][] b);
-       public static native byte[] LDKC2Tuple_SignatureCVec_SignatureZZ_get_a(long ptr);
-       public static native byte[][] LDKC2Tuple_SignatureCVec_SignatureZZ_get_b(long ptr);
+       public static native boolean LDKCResult_NoneNoneZ_result_ok(long arg);
+       public static native void LDKCResult_NoneNoneZ_get_ok(long arg);
+       public static native void LDKCResult_NoneNoneZ_get_err(long arg);
+       // struct LDKSignature C2Tuple_SignatureCVec_SignatureZZ_get_a(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR tuple);
+       public static native byte[] C2Tuple_SignatureCVec_SignatureZZ_get_a(long tuple);
+       // struct LDKCVec_SignatureZ C2Tuple_SignatureCVec_SignatureZZ_get_b(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR tuple);
+       public static native byte[][] C2Tuple_SignatureCVec_SignatureZZ_get_b(long tuple);
        public static native boolean LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_result_ok(long arg);
        public static native long LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(long arg);
        public static native void LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(long arg);
@@ -393,13 +449,15 @@ public class bindings {
        public interface LDKBaseSign {
                 byte[] get_per_commitment_point(long idx);
                 byte[] release_commitment_secret(long idx);
+                long validate_holder_commitment(long holder_tx);
                 byte[] channel_keys_id();
                 long sign_counterparty_commitment(long commitment_tx);
+                long validate_counterparty_revocation(long idx, byte[] secret);
                 long sign_holder_commitment_and_htlcs(long commitment_tx);
                 long sign_justice_revoked_output(byte[] justice_tx, long input, long amount, byte[] per_commitment_key);
                 long sign_justice_revoked_htlc(byte[] justice_tx, long input, long amount, byte[] per_commitment_key, long htlc);
                 long sign_counterparty_htlc_transaction(byte[] htlc_tx, long input, long amount, byte[] per_commitment_point, long htlc);
-                long sign_closing_transaction(byte[] closing_tx);
+                long sign_closing_transaction(long closing_tx);
                 long sign_channel_announcement(long msg);
                 void ready_channel(long channel_parameters);
        }
@@ -408,10 +466,14 @@ public class bindings {
        public static native byte[] BaseSign_get_per_commitment_point(long this_arg, long idx);
        // LDKThirtyTwoBytes BaseSign_release_commitment_secret LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx
        public static native byte[] BaseSign_release_commitment_secret(long this_arg, long idx);
+       // LDKCResult_NoneNoneZ BaseSign_validate_holder_commitment LDKBaseSign *NONNULL_PTR this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR holder_tx
+       public static native long BaseSign_validate_holder_commitment(long this_arg, long holder_tx);
        // LDKThirtyTwoBytes BaseSign_channel_keys_id LDKBaseSign *NONNULL_PTR this_arg
        public static native byte[] BaseSign_channel_keys_id(long this_arg);
        // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ BaseSign_sign_counterparty_commitment LDKBaseSign *NONNULL_PTR this_arg, const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx
        public static native long BaseSign_sign_counterparty_commitment(long this_arg, long commitment_tx);
+       // LDKCResult_NoneNoneZ BaseSign_validate_counterparty_revocation LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx, const uint8_t (*secret)[32]
+       public static native long BaseSign_validate_counterparty_revocation(long this_arg, long idx, byte[] secret);
        // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ BaseSign_sign_holder_commitment_and_htlcs LDKBaseSign *NONNULL_PTR this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx
        public static native long BaseSign_sign_holder_commitment_and_htlcs(long this_arg, long commitment_tx);
        // LDKCResult_SignatureNoneZ BaseSign_sign_justice_revoked_output LDKBaseSign *NONNULL_PTR this_arg, struct LDKTransaction justice_tx, uintptr_t input, uint64_t amount, const uint8_t (*per_commitment_key)[32]
@@ -420,8 +482,8 @@ public class bindings {
        public static native long BaseSign_sign_justice_revoked_htlc(long this_arg, byte[] justice_tx, long input, long amount, byte[] per_commitment_key, long htlc);
        // LDKCResult_SignatureNoneZ BaseSign_sign_counterparty_htlc_transaction LDKBaseSign *NONNULL_PTR this_arg, struct LDKTransaction htlc_tx, uintptr_t input, uint64_t amount, struct LDKPublicKey per_commitment_point, const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc
        public static native long BaseSign_sign_counterparty_htlc_transaction(long this_arg, byte[] htlc_tx, long input, long amount, byte[] per_commitment_point, long htlc);
-       // LDKCResult_SignatureNoneZ BaseSign_sign_closing_transaction LDKBaseSign *NONNULL_PTR this_arg, struct LDKTransaction closing_tx
-       public static native long BaseSign_sign_closing_transaction(long this_arg, byte[] closing_tx);
+       // LDKCResult_SignatureNoneZ BaseSign_sign_closing_transaction LDKBaseSign *NONNULL_PTR this_arg, const struct LDKClosingTransaction *NONNULL_PTR closing_tx
+       public static native long BaseSign_sign_closing_transaction(long this_arg, long closing_tx);
        // LDKCResult_SignatureNoneZ BaseSign_sign_channel_announcement LDKBaseSign *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg
        public static native long BaseSign_sign_channel_announcement(long this_arg, long msg);
        // void BaseSign_ready_channel LDKBaseSign *NONNULL_PTR this_arg, const struct LDKChannelTransactionParameters *NONNULL_PTR channel_parameters
@@ -432,6 +494,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);
@@ -450,9 +513,10 @@ public class bindings {
        public static native boolean LDKCResult_TransactionNoneZ_result_ok(long arg);
        public static native byte[] LDKCResult_TransactionNoneZ_get_ok(long arg);
        public static native void LDKCResult_TransactionNoneZ_get_err(long arg);
-       public static native long LDKC2Tuple_BlockHashChannelMonitorZ_new(byte[] a, long b);
-       public static native byte[] LDKC2Tuple_BlockHashChannelMonitorZ_get_a(long ptr);
-       public static native long LDKC2Tuple_BlockHashChannelMonitorZ_get_b(long ptr);
+       // struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelMonitorZ_get_a(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR tuple);
+       public static native byte[] C2Tuple_BlockHashChannelMonitorZ_get_a(long tuple);
+       // struct LDKChannelMonitor C2Tuple_BlockHashChannelMonitorZ_get_b(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR tuple);
+       public static native long C2Tuple_BlockHashChannelMonitorZ_get_b(long tuple);
        public static native long LDKCVec_C2Tuple_BlockHashChannelMonitorZZ_new(long[] elems);
        public static native boolean LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_result_ok(long arg);
        public static native long[] LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_ok(long arg);
@@ -492,6 +556,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(); }
@@ -501,6 +569,9 @@ public class bindings {
        public static native long LDKCResult_NoneAPIErrorZ_get_err(long arg);
        public static native long LDKCVec_CResult_NoneAPIErrorZZ_new(long[] elems);
        public static native long LDKCVec_APIErrorZ_new(long[] elems);
+       public static native boolean LDKCResult__u832APIErrorZ_result_ok(long arg);
+       public static native byte[] LDKCResult__u832APIErrorZ_get_ok(long arg);
+       public static native long LDKCResult__u832APIErrorZ_get_err(long arg);
        public static class LDKPaymentSendFailure {
                private LDKPaymentSendFailure() {}
                public final static class ParameterError extends LDKPaymentSendFailure {
@@ -516,16 +587,28 @@ public class bindings {
                        AllFailedRetrySafe(long[] all_failed_retry_safe) { this.all_failed_retry_safe = all_failed_retry_safe; }
                }
                public final static class PartialFailure extends LDKPaymentSendFailure {
-                       public long[] partial_failure;
-                       PartialFailure(long[] partial_failure) { this.partial_failure = partial_failure; }
+                       public long[] results;
+                       public long failed_paths_retry;
+                       public byte[] payment_id;
+                       PartialFailure(long[] results, long failed_paths_retry, byte[] payment_id) { this.results = results; this.failed_paths_retry = failed_paths_retry; this.payment_id = payment_id; }
                }
                static native void init();
        }
        static { LDKPaymentSendFailure.init(); }
        public static native LDKPaymentSendFailure LDKPaymentSendFailure_ref_from_ptr(long ptr);
+       public static native boolean LDKCResult_PaymentIdPaymentSendFailureZ_result_ok(long arg);
+       public static native byte[] LDKCResult_PaymentIdPaymentSendFailureZ_get_ok(long arg);
+       public static native long LDKCResult_PaymentIdPaymentSendFailureZ_get_err(long arg);
        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);
+       // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentIdZ_get_a(LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR tuple);
+       public static native byte[] C2Tuple_PaymentHashPaymentIdZ_get_a(long tuple);
+       // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentIdZ_get_b(LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR tuple);
+       public static native byte[] C2Tuple_PaymentHashPaymentIdZ_get_b(long tuple);
+       public static native boolean LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_result_ok(long arg);
+       public static native long LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_ok(long arg);
+       public static native long LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_err(long arg);
        public static class LDKNetAddress {
                private LDKNetAddress() {}
                public final static class IPv4 extends LDKNetAddress {
@@ -555,9 +638,10 @@ public class bindings {
        static { LDKNetAddress.init(); }
        public static native LDKNetAddress LDKNetAddress_ref_from_ptr(long ptr);
        public static native long LDKCVec_NetAddressZ_new(long[] elems);
-       public static native long LDKC2Tuple_PaymentHashPaymentSecretZ_new(byte[] a, byte[] b);
-       public static native byte[] LDKC2Tuple_PaymentHashPaymentSecretZ_get_a(long ptr);
-       public static native byte[] LDKC2Tuple_PaymentHashPaymentSecretZ_get_b(long ptr);
+       // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_a(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR tuple);
+       public static native byte[] C2Tuple_PaymentHashPaymentSecretZ_get_a(long tuple);
+       // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_b(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR tuple);
+       public static native byte[] C2Tuple_PaymentHashPaymentSecretZ_get_b(long tuple);
        public static native boolean LDKCResult_PaymentSecretAPIErrorZ_result_ok(long arg);
        public static native byte[] LDKCResult_PaymentSecretAPIErrorZ_get_ok(long arg);
        public static native long LDKCResult_PaymentSecretAPIErrorZ_get_err(long arg);
@@ -583,7 +667,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);
@@ -594,8 +678,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
@@ -614,9 +698,10 @@ public class bindings {
                 void log(String record);
        }
        public static native long LDKLogger_new(LDKLogger impl);
-       public static native long LDKC2Tuple_BlockHashChannelManagerZ_new(byte[] a, long b);
-       public static native byte[] LDKC2Tuple_BlockHashChannelManagerZ_get_a(long ptr);
-       public static native long LDKC2Tuple_BlockHashChannelManagerZ_get_b(long ptr);
+       // struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelManagerZ_get_a(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR tuple);
+       public static native byte[] C2Tuple_BlockHashChannelManagerZ_get_a(long tuple);
+       // struct LDKChannelManager *C2Tuple_BlockHashChannelManagerZ_get_b(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR tuple);
+       public static native long C2Tuple_BlockHashChannelManagerZ_get_b(long tuple);
        public static native boolean LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_result_ok(long arg);
        public static native long LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(long arg);
        public static native long LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(long arg);
@@ -626,6 +711,55 @@ public class bindings {
        public static native boolean LDKCResult_OutPointDecodeErrorZ_result_ok(long arg);
        public static native long LDKCResult_OutPointDecodeErrorZ_get_ok(long arg);
        public static native long LDKCResult_OutPointDecodeErrorZ_get_err(long arg);
+       public interface LDKType {
+                short type_id();
+                String debug_str();
+                byte[] write();
+       }
+       public static native long LDKType_new(LDKType impl);
+       // uint16_t Type_type_id LDKType *NONNULL_PTR this_arg
+       public static native short Type_type_id(long this_arg);
+       // LDKStr Type_debug_str LDKType *NONNULL_PTR this_arg
+       public static native String Type_debug_str(long this_arg);
+       // LDKCVec_u8Z Type_write LDKType *NONNULL_PTR this_arg
+       public static native byte[] Type_write(long this_arg);
+       public static class LDKCOption_TypeZ {
+               private LDKCOption_TypeZ() {}
+               public final static class Some extends LDKCOption_TypeZ {
+                       public long some;
+                       Some(long some) { this.some = some; }
+               }
+               public final static class None extends LDKCOption_TypeZ {
+                       None() { }
+               }
+               static native void init();
+       }
+       static { LDKCOption_TypeZ.init(); }
+       public static native LDKCOption_TypeZ LDKCOption_TypeZ_ref_from_ptr(long ptr);
+       public static native boolean LDKCResult_COption_TypeZDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_COption_TypeZDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_COption_TypeZDecodeErrorZ_get_err(long arg);
+       public static class LDKPaymentError {
+               private LDKPaymentError() {}
+               public final static class Invoice extends LDKPaymentError {
+                       public String invoice;
+                       Invoice(String invoice) { this.invoice = invoice; }
+               }
+               public final static class Routing extends LDKPaymentError {
+                       public long routing;
+                       Routing(long routing) { this.routing = routing; }
+               }
+               public final static class Sending extends LDKPaymentError {
+                       public long sending;
+                       Sending(long sending) { this.sending = sending; }
+               }
+               static native void init();
+       }
+       static { LDKPaymentError.init(); }
+       public static native LDKPaymentError LDKPaymentError_ref_from_ptr(long ptr);
+       public static native boolean LDKCResult_PaymentIdPaymentErrorZ_result_ok(long arg);
+       public static native byte[] LDKCResult_PaymentIdPaymentErrorZ_get_ok(long arg);
+       public static native long LDKCResult_PaymentIdPaymentErrorZ_get_err(long arg);
        public static native boolean LDKCResult_SiPrefixNoneZ_result_ok(long arg);
        public static native SiPrefix LDKCResult_SiPrefixNoneZ_get_ok(long arg);
        public static native void LDKCResult_SiPrefixNoneZ_get_err(long arg);
@@ -635,10 +769,12 @@ public class bindings {
        public static native boolean LDKCResult_SignedRawInvoiceNoneZ_result_ok(long arg);
        public static native long LDKCResult_SignedRawInvoiceNoneZ_get_ok(long arg);
        public static native void LDKCResult_SignedRawInvoiceNoneZ_get_err(long arg);
-       public static native long LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_new(long a, byte[] b, long c);
-       public static native long LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(long ptr);
-       public static native byte[] LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(long ptr);
-       public static native long LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(long ptr);
+       // struct LDKRawInvoice C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple);
+       public static native long C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(long tuple);
+       // struct LDKThirtyTwoBytes C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple);
+       public static native byte[] C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(long tuple);
+       // struct LDKInvoiceSignature C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple);
+       public static native long C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(long tuple);
        public static native boolean LDKCResult_PayeePubKeyErrorZ_result_ok(long arg);
        public static native long LDKCResult_PayeePubKeyErrorZ_get_ok(long arg);
        public static native Secp256k1Error LDKCResult_PayeePubKeyErrorZ_get_err(long arg);
@@ -673,17 +809,65 @@ public class bindings {
        public static native boolean LDKCResult_NoneMonitorUpdateErrorZ_result_ok(long arg);
        public static native void LDKCResult_NoneMonitorUpdateErrorZ_get_ok(long arg);
        public static native long LDKCResult_NoneMonitorUpdateErrorZ_get_err(long arg);
-       public static native long LDKC2Tuple_OutPointScriptZ_new(long a, byte[] b);
-       public static native long LDKC2Tuple_OutPointScriptZ_get_a(long ptr);
-       public static native byte[] LDKC2Tuple_OutPointScriptZ_get_b(long ptr);
-       public static native long LDKC2Tuple_u32ScriptZ_new(int a, byte[] b);
-       public static native int LDKC2Tuple_u32ScriptZ_get_a(long ptr);
-       public static native byte[] LDKC2Tuple_u32ScriptZ_get_b(long ptr);
+       // struct LDKOutPoint C2Tuple_OutPointScriptZ_get_a(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR tuple);
+       public static native long C2Tuple_OutPointScriptZ_get_a(long tuple);
+       // struct LDKCVec_u8Z C2Tuple_OutPointScriptZ_get_b(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR tuple);
+       public static native byte[] C2Tuple_OutPointScriptZ_get_b(long tuple);
+       // uint32_t C2Tuple_u32ScriptZ_get_a(LDKC2Tuple_u32ScriptZ *NONNULL_PTR tuple);
+       public static native int C2Tuple_u32ScriptZ_get_a(long tuple);
+       // struct LDKCVec_u8Z C2Tuple_u32ScriptZ_get_b(LDKC2Tuple_u32ScriptZ *NONNULL_PTR tuple);
+       public static native byte[] C2Tuple_u32ScriptZ_get_b(long tuple);
        public static native long LDKCVec_C2Tuple_u32ScriptZZ_new(long[] elems);
-       public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(byte[] a, long[] b);
-       public static native byte[] LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(long ptr);
-       public static native long[] LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(long ptr);
+       // struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR tuple);
+       public static native byte[] C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(long tuple);
+       // struct LDKCVec_C2Tuple_u32ScriptZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR tuple);
+       public static native long[] C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(long tuple);
        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 LDKClosureReason {
+               private LDKClosureReason() {}
+               public final static class CounterpartyForceClosed extends LDKClosureReason {
+                       public String peer_msg;
+                       CounterpartyForceClosed(String peer_msg) { this.peer_msg = peer_msg; }
+               }
+               public final static class HolderForceClosed extends LDKClosureReason {
+                       HolderForceClosed() { }
+               }
+               public final static class CooperativeClosure extends LDKClosureReason {
+                       CooperativeClosure() { }
+               }
+               public final static class CommitmentTxConfirmed extends LDKClosureReason {
+                       CommitmentTxConfirmed() { }
+               }
+               public final static class ProcessingError extends LDKClosureReason {
+                       public String err;
+                       ProcessingError(String err) { this.err = err; }
+               }
+               public final static class DisconnectedPeer extends LDKClosureReason {
+                       DisconnectedPeer() { }
+               }
+               public final static class OutdatedChannelManager extends LDKClosureReason {
+                       OutdatedChannelManager() { }
+               }
+               static native void init();
+       }
+       static { LDKClosureReason.init(); }
+       public static native LDKClosureReason LDKClosureReason_ref_from_ptr(long ptr);
        public static class LDKEvent {
                private LDKEvent() {}
                public final static class FundingGenerationReady extends LDKEvent {
@@ -695,20 +879,27 @@ 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_id;
                        public byte[] payment_preimage;
-                       PaymentSent(byte[] payment_preimage) { this.payment_preimage = payment_preimage; }
+                       public byte[] payment_hash;
+                       public long fee_paid_msat;
+                       PaymentSent(byte[] payment_id, byte[] payment_preimage, byte[] payment_hash, long fee_paid_msat) { this.payment_id = payment_id; this.payment_preimage = payment_preimage; this.payment_hash = payment_hash; this.fee_paid_msat = fee_paid_msat; }
                }
-               public final static class PaymentFailed extends LDKEvent {
+               public final static class PaymentPathFailed extends LDKEvent {
+                       public byte[] payment_id;
                        public byte[] payment_hash;
                        public boolean rejected_by_dest;
-                       PaymentFailed(byte[] payment_hash, boolean rejected_by_dest) { this.payment_hash = payment_hash; this.rejected_by_dest = rejected_by_dest; }
+                       public long network_update;
+                       public boolean all_paths_failed;
+                       public long[] path;
+                       public long short_channel_id;
+                       public long retry;
+                       PaymentPathFailed(byte[] payment_id, byte[] payment_hash, boolean rejected_by_dest, long network_update, boolean all_paths_failed, long[] path, long short_channel_id, long retry) { this.payment_id = payment_id; this.payment_hash = payment_hash; this.rejected_by_dest = rejected_by_dest; this.network_update = network_update; this.all_paths_failed = all_paths_failed; this.path = path; this.short_channel_id = short_channel_id; this.retry = retry; }
                }
                public final static class PendingHTLCsForwardable extends LDKEvent {
                        public long time_forwardable;
@@ -718,34 +909,85 @@ 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; }
+               }
+               public final static class ChannelClosed extends LDKEvent {
+                       public byte[] channel_id;
+                       public long user_channel_id;
+                       public long reason;
+                       ChannelClosed(byte[] channel_id, long user_channel_id, long reason) { this.channel_id = channel_id; this.user_channel_id = user_channel_id; this.reason = reason; }
+               }
+               public final static class DiscardFunding extends LDKEvent {
+                       public byte[] channel_id;
+                       public byte[] transaction;
+                       DiscardFunding(byte[] channel_id, byte[] transaction) { this.channel_id = channel_id; this.transaction = transaction; }
+               }
                static native void init();
        }
        static { LDKEvent.init(); }
        public static native LDKEvent LDKEvent_ref_from_ptr(long ptr);
        public static native long LDKCVec_EventZ_new(long[] elems);
-       public static native long LDKC2Tuple_u32TxOutZ_new(int a, long b);
-       public static native int LDKC2Tuple_u32TxOutZ_get_a(long ptr);
-       public static native long LDKC2Tuple_u32TxOutZ_get_b(long ptr);
+       // uint32_t C2Tuple_u32TxOutZ_get_a(LDKC2Tuple_u32TxOutZ *NONNULL_PTR tuple);
+       public static native int C2Tuple_u32TxOutZ_get_a(long tuple);
+       // struct LDKTxOut C2Tuple_u32TxOutZ_get_b(LDKC2Tuple_u32TxOutZ *NONNULL_PTR tuple);
+       public static native long C2Tuple_u32TxOutZ_get_b(long tuple);
        public static native long LDKCVec_C2Tuple_u32TxOutZZ_new(long[] elems);
-       public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(byte[] a, long[] b);
-       public static native byte[] LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(long ptr);
-       public static native long[] LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(long ptr);
+       // struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR tuple);
+       public static native byte[] C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(long tuple);
+       // struct LDKCVec_C2Tuple_u32TxOutZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR tuple);
+       public static native long[] C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(long tuple);
        public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_new(long[] elems);
+       public static class LDKBalance {
+               private LDKBalance() {}
+               public final static class ClaimableOnChannelClose extends LDKBalance {
+                       public long claimable_amount_satoshis;
+                       ClaimableOnChannelClose(long claimable_amount_satoshis) { this.claimable_amount_satoshis = claimable_amount_satoshis; }
+               }
+               public final static class ClaimableAwaitingConfirmations extends LDKBalance {
+                       public long claimable_amount_satoshis;
+                       public int confirmation_height;
+                       ClaimableAwaitingConfirmations(long claimable_amount_satoshis, int confirmation_height) { this.claimable_amount_satoshis = claimable_amount_satoshis; this.confirmation_height = confirmation_height; }
+               }
+               public final static class ContentiousClaimable extends LDKBalance {
+                       public long claimable_amount_satoshis;
+                       public int timeout_height;
+                       ContentiousClaimable(long claimable_amount_satoshis, int timeout_height) { this.claimable_amount_satoshis = claimable_amount_satoshis; this.timeout_height = timeout_height; }
+               }
+               public final static class MaybeClaimableHTLCAwaitingTimeout extends LDKBalance {
+                       public long claimable_amount_satoshis;
+                       public int claimable_height;
+                       MaybeClaimableHTLCAwaitingTimeout(long claimable_amount_satoshis, int claimable_height) { this.claimable_amount_satoshis = claimable_amount_satoshis; this.claimable_height = claimable_height; }
+               }
+               static native void init();
+       }
+       static { LDKBalance.init(); }
+       public static native LDKBalance LDKBalance_ref_from_ptr(long ptr);
+       public static native long LDKCVec_BalanceZ_new(long[] elems);
        public static native boolean LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_result_ok(long arg);
        public static native long LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(long arg);
        public static native long LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_NoneLightningErrorZ_result_ok(long arg);
+       public static native void LDKCResult_NoneLightningErrorZ_get_ok(long arg);
+       public static native long LDKCResult_NoneLightningErrorZ_get_err(long arg);
+       // struct LDKPublicKey C2Tuple_PublicKeyTypeZ_get_a(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR tuple);
+       public static native byte[] C2Tuple_PublicKeyTypeZ_get_a(long tuple);
+       // struct LDKType C2Tuple_PublicKeyTypeZ_get_b(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR tuple);
+       public static native long C2Tuple_PublicKeyTypeZ_get_b(long tuple);
+       public static native long LDKCVec_C2Tuple_PublicKeyTypeZZ_new(long[] elems);
        public static native boolean LDKCResult_boolLightningErrorZ_result_ok(long arg);
        public static native boolean LDKCResult_boolLightningErrorZ_get_ok(long arg);
        public static native long LDKCResult_boolLightningErrorZ_get_err(long arg);
-       public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(long a, long b, long c);
-       public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(long ptr);
-       public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(long ptr);
-       public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(long ptr);
+       // struct LDKChannelAnnouncement C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple);
+       public static native long C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(long tuple);
+       // struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple);
+       public static native long C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(long tuple);
+       // struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple);
+       public static native long C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(long tuple);
        public static native long LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new(long[] elems);
        public static native long LDKCVec_NodeAnnouncementZ_new(long[] elems);
-       public static native boolean LDKCResult_NoneLightningErrorZ_result_ok(long arg);
-       public static native void LDKCResult_NoneLightningErrorZ_get_ok(long arg);
-       public static native long LDKCResult_NoneLightningErrorZ_get_err(long arg);
        public static native boolean LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok(long arg);
        public static native byte[] LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok(long arg);
        public static native long LDKCResult_CVec_u8ZPeerHandleErrorZ_get_err(long arg);
@@ -755,6 +997,28 @@ public class bindings {
        public static native boolean LDKCResult_boolPeerHandleErrorZ_result_ok(long arg);
        public static native boolean LDKCResult_boolPeerHandleErrorZ_get_ok(long arg);
        public static native long LDKCResult_boolPeerHandleErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_NodeIdDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_NodeIdDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_NodeIdDecodeErrorZ_get_err(long arg);
+       public interface LDKAccess {
+                long get_utxo(byte[] genesis_hash, long short_channel_id);
+       }
+       public static native long LDKAccess_new(LDKAccess impl);
+       // LDKCResult_TxOutAccessErrorZ Access_get_utxo LDKAccess *NONNULL_PTR this_arg, const uint8_t (*genesis_hash)[32], uint64_t short_channel_id
+       public static native long Access_get_utxo(long this_arg, byte[] genesis_hash, long short_channel_id);
+       public static class LDKCOption_AccessZ {
+               private LDKCOption_AccessZ() {}
+               public final static class Some extends LDKCOption_AccessZ {
+                       public long some;
+                       Some(long some) { this.some = some; }
+               }
+               public final static class None extends LDKCOption_AccessZ {
+                       None() { }
+               }
+               static native void init();
+       }
+       static { LDKCOption_AccessZ.init(); }
+       public static native LDKCOption_AccessZ LDKCOption_AccessZ_ref_from_ptr(long ptr);
        public static native boolean LDKCResult_DirectionalChannelInfoDecodeErrorZ_result_ok(long arg);
        public static native long LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_ok(long arg);
        public static native long LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_err(long arg);
@@ -774,12 +1038,19 @@ public class bindings {
        public static native boolean LDKCResult_NetworkGraphDecodeErrorZ_result_ok(long arg);
        public static native long LDKCResult_NetworkGraphDecodeErrorZ_get_ok(long arg);
        public static native long LDKCResult_NetworkGraphDecodeErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_NetAddressu8Z_result_ok(long arg);
-       public static native long LDKCResult_NetAddressu8Z_get_ok(long arg);
-       public static native byte LDKCResult_NetAddressu8Z_get_err(long arg);
-       public static native boolean LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_result_ok(long arg);
-       public static native long LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_ok(long arg);
-       public static native long LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_err(long arg);
+       public static class LDKCOption_CVec_NetAddressZZ {
+               private LDKCOption_CVec_NetAddressZZ() {}
+               public final static class Some extends LDKCOption_CVec_NetAddressZZ {
+                       public long[] some;
+                       Some(long[] some) { this.some = some; }
+               }
+               public final static class None extends LDKCOption_CVec_NetAddressZZ {
+                       None() { }
+               }
+               static native void init();
+       }
+       static { LDKCOption_CVec_NetAddressZZ.init(); }
+       public static native LDKCOption_CVec_NetAddressZZ LDKCOption_CVec_NetAddressZZ_ref_from_ptr(long ptr);
        public static native boolean LDKCResult_NetAddressDecodeErrorZ_result_ok(long arg);
        public static native long LDKCResult_NetAddressDecodeErrorZ_get_ok(long arg);
        public static native long LDKCResult_NetAddressDecodeErrorZ_get_err(long arg);
@@ -799,6 +1070,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);
@@ -896,6 +1170,32 @@ public class bindings {
        public static native boolean LDKCResult_InvoiceSignOrCreationErrorZ_result_ok(long arg);
        public static native long LDKCResult_InvoiceSignOrCreationErrorZ_get_ok(long arg);
        public static native long LDKCResult_InvoiceSignOrCreationErrorZ_get_err(long arg);
+       public interface LDKFilter {
+                void register_tx(byte[] txid, byte[] script_pubkey);
+                long register_output(long output);
+       }
+       public static native long LDKFilter_new(LDKFilter impl);
+       // void Filter_register_tx LDKFilter *NONNULL_PTR this_arg, const uint8_t (*txid)[32], struct LDKu8slice script_pubkey
+       public static native void Filter_register_tx(long this_arg, byte[] txid, byte[] script_pubkey);
+       // LDKCOption_C2Tuple_usizeTransactionZZ Filter_register_output LDKFilter *NONNULL_PTR this_arg, struct LDKWatchedOutput output
+       public static native long Filter_register_output(long this_arg, long output);
+       public static class LDKCOption_FilterZ {
+               private LDKCOption_FilterZ() {}
+               public final static class Some extends LDKCOption_FilterZ {
+                       public long some;
+                       Some(long some) { this.some = some; }
+               }
+               public final static class None extends LDKCOption_FilterZ {
+                       None() { }
+               }
+               static native void init();
+       }
+       static { LDKCOption_FilterZ.init(); }
+       public static native LDKCOption_FilterZ LDKCOption_FilterZ_ref_from_ptr(long ptr);
+       public static native boolean LDKCResult_LockedChannelMonitorNoneZ_result_ok(long arg);
+       public static native long LDKCResult_LockedChannelMonitorNoneZ_get_ok(long arg);
+       public static native void LDKCResult_LockedChannelMonitorNoneZ_get_err(long arg);
+       public static native long LDKCVec_OutPointZ_new(long[] elems);
        public interface LDKMessageSendEventsProvider {
                 long[] get_and_clear_pending_msg_events();
        }
@@ -906,7 +1206,7 @@ public class bindings {
                 void handle_event(long event);
        }
        public static native long LDKEventHandler_new(LDKEventHandler impl);
-       // void EventHandler_handle_event LDKEventHandler *NONNULL_PTR this_arg, struct LDKEvent event
+       // void EventHandler_handle_event LDKEventHandler *NONNULL_PTR this_arg, const struct LDKEvent *NONNULL_PTR event
        public static native void EventHandler_handle_event(long this_arg, long event);
        public interface LDKEventsProvider {
                 void process_pending_events(long handler);
@@ -914,12 +1214,6 @@ public class bindings {
        public static native long LDKEventsProvider_new(LDKEventsProvider impl);
        // void EventsProvider_process_pending_events LDKEventsProvider *NONNULL_PTR this_arg, struct LDKEventHandler handler
        public static native void EventsProvider_process_pending_events(long this_arg, long handler);
-       public interface LDKAccess {
-                long get_utxo(byte[] genesis_hash, long short_channel_id);
-       }
-       public static native long LDKAccess_new(LDKAccess impl);
-       // LDKCResult_TxOutAccessErrorZ Access_get_utxo LDKAccess *NONNULL_PTR this_arg, const uint8_t (*genesis_hash)[32], uint64_t short_channel_id
-       public static native long Access_get_utxo(long this_arg, byte[] genesis_hash, long short_channel_id);
        public interface LDKListen {
                 void block_connected(byte[] block, int height);
                 void block_disconnected(byte[] header, int height);
@@ -944,24 +1238,15 @@ public class bindings {
        public static native void Confirm_best_block_updated(long this_arg, byte[] header, int height);
        // LDKCVec_TxidZ Confirm_get_relevant_txids LDKConfirm *NONNULL_PTR this_arg
        public static native byte[][] Confirm_get_relevant_txids(long this_arg);
-       public interface LDKFilter {
-                void register_tx(byte[] txid, byte[] script_pubkey);
-                long register_output(long output);
-       }
-       public static native long LDKFilter_new(LDKFilter impl);
-       // void Filter_register_tx LDKFilter *NONNULL_PTR this_arg, const uint8_t (*txid)[32], struct LDKu8slice script_pubkey
-       public static native void Filter_register_tx(long this_arg, byte[] txid, byte[] script_pubkey);
-       // LDKCOption_C2Tuple_usizeTransactionZZ Filter_register_output LDKFilter *NONNULL_PTR this_arg, struct LDKWatchedOutput output
-       public static native long Filter_register_output(long this_arg, long output);
        public interface LDKPersist {
-                long persist_new_channel(long id, long data);
-                long update_persisted_channel(long id, long update, long data);
+                long persist_new_channel(long channel_id, long data, long update_id);
+                long update_persisted_channel(long channel_id, long update, long data, long update_id);
        }
        public static native long LDKPersist_new(LDKPersist impl);
-       // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_persist_new_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint id, const struct LDKChannelMonitor *NONNULL_PTR data
-       public static native long Persist_persist_new_channel(long this_arg, long id, long data);
-       // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_update_persisted_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint id, const struct LDKChannelMonitorUpdate *NONNULL_PTR update, const struct LDKChannelMonitor *NONNULL_PTR data
-       public static native long Persist_update_persisted_channel(long this_arg, long id, long update, long data);
+       // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_persist_new_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_id, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id
+       public static native long Persist_persist_new_channel(long this_arg, long channel_id, long data, long update_id);
+       // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_update_persisted_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_id, const struct LDKChannelMonitorUpdate *NONNULL_PTR update, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id
+       public static native long Persist_update_persisted_channel(long this_arg, long channel_id, long update, long data, long update_id);
        public interface LDKChannelMessageHandler {
                 void handle_open_channel(byte[] their_node_id, long their_features, long msg);
                 void handle_accept_channel(byte[] their_node_id, long their_features, long msg);
@@ -985,6 +1270,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
@@ -1029,7 +1315,6 @@ public class bindings {
                 long handle_node_announcement(long msg);
                 long handle_channel_announcement(long msg);
                 long handle_channel_update(long msg);
-                void handle_htlc_fail_channel_update(long update);
                 long[] get_next_channel_announcements(long starting_point, byte batch_amount);
                 long[] get_next_node_announcements(byte[] starting_point, byte batch_amount);
                 void sync_routing_table(byte[] their_node_id, long init);
@@ -1039,14 +1324,13 @@ 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
        public static native long RoutingMessageHandler_handle_channel_announcement(long this_arg, long msg);
        // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg
        public static native long RoutingMessageHandler_handle_channel_update(long this_arg, long msg);
-       // void RoutingMessageHandler_handle_htlc_fail_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKHTLCFailChannelUpdate *NONNULL_PTR update
-       public static native void RoutingMessageHandler_handle_htlc_fail_channel_update(long this_arg, long update);
        // LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ RoutingMessageHandler_get_next_channel_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, uint64_t starting_point, uint8_t batch_amount
        public static native long[] RoutingMessageHandler_get_next_channel_announcements(long this_arg, long starting_point, byte batch_amount);
        // LDKCVec_NodeAnnouncementZ RoutingMessageHandler_get_next_node_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey starting_point, uint8_t batch_amount
@@ -1061,6 +1345,22 @@ public class bindings {
        public static native long RoutingMessageHandler_handle_query_channel_range(long this_arg, byte[] their_node_id, long msg);
        // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_short_channel_ids LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryShortChannelIds msg
        public static native long RoutingMessageHandler_handle_query_short_channel_ids(long this_arg, byte[] their_node_id, long msg);
+       public interface LDKCustomMessageReader {
+                long read(short message_type, byte[] buffer);
+       }
+       public static native long LDKCustomMessageReader_new(LDKCustomMessageReader impl);
+       // LDKCResult_COption_TypeZDecodeErrorZ CustomMessageReader_read LDKCustomMessageReader *NONNULL_PTR this_arg, uint16_t message_type, struct LDKu8slice buffer
+       public static native long CustomMessageReader_read(long this_arg, short message_type, byte[] buffer);
+       public interface LDKCustomMessageHandler {
+                long handle_custom_message(long msg, byte[] sender_node_id);
+                long[] get_and_clear_pending_msg();
+       }
+       public static native long LDKCustomMessageHandler_new(LDKCustomMessageHandler impl, LDKCustomMessageReader CustomMessageReader);
+       public static native long LDKCustomMessageHandler_get_CustomMessageReader(long arg);
+       // LDKCResult_NoneLightningErrorZ CustomMessageHandler_handle_custom_message LDKCustomMessageHandler *NONNULL_PTR this_arg, struct LDKType msg, struct LDKPublicKey sender_node_id
+       public static native long CustomMessageHandler_handle_custom_message(long this_arg, long msg, byte[] sender_node_id);
+       // LDKCVec_C2Tuple_PublicKeyTypeZZ CustomMessageHandler_get_and_clear_pending_msg LDKCustomMessageHandler *NONNULL_PTR this_arg
+       public static native long[] CustomMessageHandler_get_and_clear_pending_msg(long this_arg);
        public interface LDKSocketDescriptor {
                 long send_data(byte[] data, boolean resume_read);
                 void disconnect_socket();
@@ -1074,6 +1374,18 @@ public class bindings {
        public static native void SocketDescriptor_disconnect_socket(long this_arg);
        // uint64_t SocketDescriptor_hash LDKSocketDescriptor *NONNULL_PTR this_arg
        public static native long SocketDescriptor_hash(long this_arg);
+       public interface LDKScore {
+                long channel_penalty_msat(long short_channel_id, long source, long target);
+                void payment_path_failed(long[] path, long short_channel_id);
+                byte[] write();
+       }
+       public static native long LDKScore_new(LDKScore impl);
+       // uint64_t Score_channel_penalty_msat LDKScore *NONNULL_PTR this_arg, uint64_t short_channel_id, const struct LDKNodeId *NONNULL_PTR source, const struct LDKNodeId *NONNULL_PTR target
+       public static native long Score_channel_penalty_msat(long this_arg, long short_channel_id, long source, long target);
+       // void Score_payment_path_failed LDKScore *NONNULL_PTR this_arg, struct LDKCVec_RouteHopZ path, uint64_t short_channel_id
+       public static native void Score_payment_path_failed(long this_arg, long[] path, long short_channel_id);
+       // LDKCVec_u8Z Score_write LDKScore *NONNULL_PTR this_arg
+       public static native byte[] Score_write(long this_arg);
        public interface LDKChannelManagerPersister {
                 long persist_manager(long channel_manager);
        }
@@ -1099,12 +1411,35 @@ public class bindings {
        }
        static { LDKFallback.init(); }
        public static native LDKFallback LDKFallback_ref_from_ptr(long ptr);
+       public interface LDKPayer {
+                byte[] node_id();
+                long[] first_hops();
+                long send_payment(long route, byte[] payment_hash, byte[] payment_secret);
+                long retry_payment(long route, byte[] payment_id);
+       }
+       public static native long LDKPayer_new(LDKPayer impl);
+       // LDKPublicKey Payer_node_id LDKPayer *NONNULL_PTR this_arg
+       public static native byte[] Payer_node_id(long this_arg);
+       // LDKCVec_ChannelDetailsZ Payer_first_hops LDKPayer *NONNULL_PTR this_arg
+       public static native long[] Payer_first_hops(long this_arg);
+       // LDKCResult_PaymentIdPaymentSendFailureZ Payer_send_payment LDKPayer *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_hash, struct LDKThirtyTwoBytes payment_secret
+       public static native long Payer_send_payment(long this_arg, long route, byte[] payment_hash, byte[] payment_secret);
+       // LDKCResult_NonePaymentSendFailureZ Payer_retry_payment LDKPayer *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_id
+       public static native long Payer_retry_payment(long this_arg, long route, byte[] payment_id);
+       public interface LDKRouter {
+                long find_route(byte[] payer, long params, long[] first_hops, long scorer);
+       }
+       public static native long LDKRouter_new(LDKRouter impl);
+       // LDKCResult_RouteLightningErrorZ Router_find_route LDKRouter *NONNULL_PTR this_arg, struct LDKPublicKey payer, const struct LDKRouteParameters *NONNULL_PTR params, struct LDKCVec_ChannelDetailsZ *first_hops, const struct LDKScore *NONNULL_PTR scorer
+       public static native long Router_find_route(long this_arg, byte[] payer, long params, long[] first_hops, long scorer);
        // struct LDKStr _ldk_get_compiled_version(void);
        public static native String _ldk_get_compiled_version();
        // struct LDKStr _ldk_c_bindings_get_compiled_version(void);
        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);
@@ -1199,6 +1534,12 @@ public class bindings {
        public static native void CResult_BuiltCommitmentTransactionDecodeErrorZ_free(long _res);
        // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
        public static native long CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_TrustedClosingTransactionNoneZ CResult_TrustedClosingTransactionNoneZ_ok(struct LDKTrustedClosingTransaction o);
+       public static native long CResult_TrustedClosingTransactionNoneZ_ok(long o);
+       // struct LDKCResult_TrustedClosingTransactionNoneZ CResult_TrustedClosingTransactionNoneZ_err(void);
+       public static native long CResult_TrustedClosingTransactionNoneZ_err();
+       // void CResult_TrustedClosingTransactionNoneZ_free(struct LDKCResult_TrustedClosingTransactionNoneZ _res);
+       public static native void CResult_TrustedClosingTransactionNoneZ_free(long _res);
        // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_ok(struct LDKCommitmentTransaction o);
        public static native long CResult_CommitmentTransactionDecodeErrorZ_ok(long o);
        // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
@@ -1221,6 +1562,22 @@ 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_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_clone(const struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR orig);
+       public static native long CResult_ShutdownScriptInvalidShutdownScriptZ_clone(long orig);
        // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_ok(void);
        public static native long CResult_NoneErrorZ_ok();
        // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_err(enum LDKIOError e);
@@ -1249,6 +1606,16 @@ public class bindings {
        public static native void CResult_RouteDecodeErrorZ_free(long _res);
        // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_clone(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR orig);
        public static native long CResult_RouteDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_RouteParametersDecodeErrorZ CResult_RouteParametersDecodeErrorZ_ok(struct LDKRouteParameters o);
+       public static native long CResult_RouteParametersDecodeErrorZ_ok(long o);
+       // struct LDKCResult_RouteParametersDecodeErrorZ CResult_RouteParametersDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_RouteParametersDecodeErrorZ_err(long e);
+       // void CResult_RouteParametersDecodeErrorZ_free(struct LDKCResult_RouteParametersDecodeErrorZ _res);
+       public static native void CResult_RouteParametersDecodeErrorZ_free(long _res);
+       // struct LDKCResult_RouteParametersDecodeErrorZ CResult_RouteParametersDecodeErrorZ_clone(const struct LDKCResult_RouteParametersDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_RouteParametersDecodeErrorZ_clone(long orig);
+       // void CVec_RouteHintZ_free(struct LDKCVec_RouteHintZ _res);
+       public static native void CVec_RouteHintZ_free(long[] _res);
        // struct LDKCOption_u64Z COption_u64Z_some(uint64_t o);
        public static native long COption_u64Z_some(long o);
        // struct LDKCOption_u64Z COption_u64Z_none(void);
@@ -1257,10 +1624,34 @@ public class bindings {
        public static native void COption_u64Z_free(long _res);
        // struct LDKCOption_u64Z COption_u64Z_clone(const struct LDKCOption_u64Z *NONNULL_PTR orig);
        public static native long COption_u64Z_clone(long orig);
+       // struct LDKCResult_PayeeDecodeErrorZ CResult_PayeeDecodeErrorZ_ok(struct LDKPayee o);
+       public static native long CResult_PayeeDecodeErrorZ_ok(long o);
+       // struct LDKCResult_PayeeDecodeErrorZ CResult_PayeeDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_PayeeDecodeErrorZ_err(long e);
+       // void CResult_PayeeDecodeErrorZ_free(struct LDKCResult_PayeeDecodeErrorZ _res);
+       public static native void CResult_PayeeDecodeErrorZ_free(long _res);
+       // struct LDKCResult_PayeeDecodeErrorZ CResult_PayeeDecodeErrorZ_clone(const struct LDKCResult_PayeeDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_PayeeDecodeErrorZ_clone(long orig);
+       // void CVec_RouteHintHopZ_free(struct LDKCVec_RouteHintHopZ _res);
+       public static native void CVec_RouteHintHopZ_free(long[] _res);
+       // struct LDKCResult_RouteHintDecodeErrorZ CResult_RouteHintDecodeErrorZ_ok(struct LDKRouteHint o);
+       public static native long CResult_RouteHintDecodeErrorZ_ok(long o);
+       // struct LDKCResult_RouteHintDecodeErrorZ CResult_RouteHintDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_RouteHintDecodeErrorZ_err(long e);
+       // void CResult_RouteHintDecodeErrorZ_free(struct LDKCResult_RouteHintDecodeErrorZ _res);
+       public static native void CResult_RouteHintDecodeErrorZ_free(long _res);
+       // struct LDKCResult_RouteHintDecodeErrorZ CResult_RouteHintDecodeErrorZ_clone(const struct LDKCResult_RouteHintDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_RouteHintDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_RouteHintHopDecodeErrorZ CResult_RouteHintHopDecodeErrorZ_ok(struct LDKRouteHintHop o);
+       public static native long CResult_RouteHintHopDecodeErrorZ_ok(long o);
+       // struct LDKCResult_RouteHintHopDecodeErrorZ CResult_RouteHintHopDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_RouteHintHopDecodeErrorZ_err(long e);
+       // void CResult_RouteHintHopDecodeErrorZ_free(struct LDKCResult_RouteHintHopDecodeErrorZ _res);
+       public static native void CResult_RouteHintHopDecodeErrorZ_free(long _res);
+       // struct LDKCResult_RouteHintHopDecodeErrorZ CResult_RouteHintHopDecodeErrorZ_clone(const struct LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_RouteHintHopDecodeErrorZ_clone(long orig);
        // void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res);
        public static native void CVec_ChannelDetailsZ_free(long[] _res);
-       // void CVec_RouteHintZ_free(struct LDKCVec_RouteHintZ _res);
-       public static native void CVec_RouteHintZ_free(long[] _res);
        // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_ok(struct LDKRoute o);
        public static native long CResult_RouteLightningErrorZ_ok(long o);
        // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_err(struct LDKLightningError e);
@@ -1305,6 +1696,14 @@ public class bindings {
        public static native void COption_C2Tuple_usizeTransactionZZ_free(long _res);
        // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_clone(const struct LDKCOption_C2Tuple_usizeTransactionZZ *NONNULL_PTR orig);
        public static native long COption_C2Tuple_usizeTransactionZZ_clone(long orig);
+       // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_some(struct LDKNetworkUpdate o);
+       public static native long COption_NetworkUpdateZ_some(long o);
+       // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_none(void);
+       public static native long COption_NetworkUpdateZ_none();
+       // void COption_NetworkUpdateZ_free(struct LDKCOption_NetworkUpdateZ _res);
+       public static native void COption_NetworkUpdateZ_free(long _res);
+       // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_clone(const struct LDKCOption_NetworkUpdateZ *NONNULL_PTR orig);
+       public static native long COption_NetworkUpdateZ_clone(long orig);
        // void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res);
        public static native void CVec_SpendableOutputDescriptorZ_free(long[] _res);
        // void CVec_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res);
@@ -1333,6 +1732,18 @@ public class bindings {
        public static native long CResult_InvoiceFeaturesDecodeErrorZ_err(long e);
        // void CResult_InvoiceFeaturesDecodeErrorZ_free(struct LDKCResult_InvoiceFeaturesDecodeErrorZ _res);
        public static native void CResult_InvoiceFeaturesDecodeErrorZ_free(long _res);
+       // struct LDKCResult_ScoringParametersDecodeErrorZ CResult_ScoringParametersDecodeErrorZ_ok(struct LDKScoringParameters o);
+       public static native long CResult_ScoringParametersDecodeErrorZ_ok(long o);
+       // struct LDKCResult_ScoringParametersDecodeErrorZ CResult_ScoringParametersDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_ScoringParametersDecodeErrorZ_err(long e);
+       // void CResult_ScoringParametersDecodeErrorZ_free(struct LDKCResult_ScoringParametersDecodeErrorZ _res);
+       public static native void CResult_ScoringParametersDecodeErrorZ_free(long _res);
+       // struct LDKCResult_ScorerDecodeErrorZ CResult_ScorerDecodeErrorZ_ok(struct LDKScorer o);
+       public static native long CResult_ScorerDecodeErrorZ_ok(long o);
+       // struct LDKCResult_ScorerDecodeErrorZ CResult_ScorerDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_ScorerDecodeErrorZ_err(long e);
+       // void CResult_ScorerDecodeErrorZ_free(struct LDKCResult_ScorerDecodeErrorZ _res);
+       public static native void CResult_ScorerDecodeErrorZ_free(long _res);
        // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKDelayedPaymentOutputDescriptor o);
        public static native long CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(long o);
        // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
@@ -1357,6 +1768,14 @@ public class bindings {
        public static native void CResult_SpendableOutputDescriptorDecodeErrorZ_free(long _res);
        // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
        public static native long CResult_SpendableOutputDescriptorDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_ok(void);
+       public static native long CResult_NoneNoneZ_ok();
+       // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_err(void);
+       public static native long CResult_NoneNoneZ_err();
+       // void CResult_NoneNoneZ_free(struct LDKCResult_NoneNoneZ _res);
+       public static native void CResult_NoneNoneZ_free(long _res);
+       // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_clone(const struct LDKCResult_NoneNoneZ *NONNULL_PTR orig);
+       public static native long CResult_NoneNoneZ_clone(long orig);
        // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_clone(const struct LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR orig);
        public static native long C2Tuple_SignatureCVec_SignatureZZ_clone(long orig);
        // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b);
@@ -1425,6 +1844,8 @@ public class bindings {
        public static native void CResult_TransactionNoneZ_free(long _res);
        // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_clone(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR orig);
        public static native long CResult_TransactionNoneZ_clone(long orig);
+       // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_clone(const struct LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR orig);
+       public static native long C2Tuple_BlockHashChannelMonitorZ_clone(long orig);
        // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
        public static native long C2Tuple_BlockHashChannelMonitorZ_new(byte[] a, long b);
        // void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res);
@@ -1437,6 +1858,8 @@ 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 LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(const struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ *NONNULL_PTR orig);
+       public static native long CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(long orig);
        // 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);
@@ -1457,6 +1880,22 @@ public class bindings {
        public static native void CVec_CResult_NoneAPIErrorZZ_free(long[] _res);
        // void CVec_APIErrorZ_free(struct LDKCVec_APIErrorZ _res);
        public static native void CVec_APIErrorZ_free(long[] _res);
+       // struct LDKCResult__u832APIErrorZ CResult__u832APIErrorZ_ok(struct LDKThirtyTwoBytes o);
+       public static native long CResult__u832APIErrorZ_ok(byte[] o);
+       // struct LDKCResult__u832APIErrorZ CResult__u832APIErrorZ_err(struct LDKAPIError e);
+       public static native long CResult__u832APIErrorZ_err(long e);
+       // void CResult__u832APIErrorZ_free(struct LDKCResult__u832APIErrorZ _res);
+       public static native void CResult__u832APIErrorZ_free(long _res);
+       // struct LDKCResult__u832APIErrorZ CResult__u832APIErrorZ_clone(const struct LDKCResult__u832APIErrorZ *NONNULL_PTR orig);
+       public static native long CResult__u832APIErrorZ_clone(long orig);
+       // struct LDKCResult_PaymentIdPaymentSendFailureZ CResult_PaymentIdPaymentSendFailureZ_ok(struct LDKThirtyTwoBytes o);
+       public static native long CResult_PaymentIdPaymentSendFailureZ_ok(byte[] o);
+       // struct LDKCResult_PaymentIdPaymentSendFailureZ CResult_PaymentIdPaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
+       public static native long CResult_PaymentIdPaymentSendFailureZ_err(long e);
+       // void CResult_PaymentIdPaymentSendFailureZ_free(struct LDKCResult_PaymentIdPaymentSendFailureZ _res);
+       public static native void CResult_PaymentIdPaymentSendFailureZ_free(long _res);
+       // struct LDKCResult_PaymentIdPaymentSendFailureZ CResult_PaymentIdPaymentSendFailureZ_clone(const struct LDKCResult_PaymentIdPaymentSendFailureZ *NONNULL_PTR orig);
+       public static native long CResult_PaymentIdPaymentSendFailureZ_clone(long orig);
        // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void);
        public static native long CResult_NonePaymentSendFailureZ_ok();
        // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
@@ -1465,6 +1904,20 @@ 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 LDKC2Tuple_PaymentHashPaymentIdZ C2Tuple_PaymentHashPaymentIdZ_clone(const struct LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR orig);
+       public static native long C2Tuple_PaymentHashPaymentIdZ_clone(long orig);
+       // struct LDKC2Tuple_PaymentHashPaymentIdZ C2Tuple_PaymentHashPaymentIdZ_new(struct LDKThirtyTwoBytes a, struct LDKThirtyTwoBytes b);
+       public static native long C2Tuple_PaymentHashPaymentIdZ_new(byte[] a, byte[] b);
+       // void C2Tuple_PaymentHashPaymentIdZ_free(struct LDKC2Tuple_PaymentHashPaymentIdZ _res);
+       public static native void C2Tuple_PaymentHashPaymentIdZ_free(long _res);
+       // struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_ok(struct LDKC2Tuple_PaymentHashPaymentIdZ o);
+       public static native long CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_ok(long o);
+       // struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
+       public static native long CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_err(long e);
+       // void CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_free(struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ _res);
+       public static native void CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_free(long _res);
+       // struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone(const struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ *NONNULL_PTR orig);
+       public static native long CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_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);
@@ -1509,6 +1962,30 @@ public class bindings {
        public static native void CResult_OutPointDecodeErrorZ_free(long _res);
        // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_clone(const struct LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR orig);
        public static native long CResult_OutPointDecodeErrorZ_clone(long orig);
+       // struct LDKCOption_TypeZ COption_TypeZ_some(struct LDKType o);
+       public static native long COption_TypeZ_some(long o);
+       // struct LDKCOption_TypeZ COption_TypeZ_none(void);
+       public static native long COption_TypeZ_none();
+       // void COption_TypeZ_free(struct LDKCOption_TypeZ _res);
+       public static native void COption_TypeZ_free(long _res);
+       // struct LDKCOption_TypeZ COption_TypeZ_clone(const struct LDKCOption_TypeZ *NONNULL_PTR orig);
+       public static native long COption_TypeZ_clone(long orig);
+       // struct LDKCResult_COption_TypeZDecodeErrorZ CResult_COption_TypeZDecodeErrorZ_ok(struct LDKCOption_TypeZ o);
+       public static native long CResult_COption_TypeZDecodeErrorZ_ok(long o);
+       // struct LDKCResult_COption_TypeZDecodeErrorZ CResult_COption_TypeZDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_COption_TypeZDecodeErrorZ_err(long e);
+       // void CResult_COption_TypeZDecodeErrorZ_free(struct LDKCResult_COption_TypeZDecodeErrorZ _res);
+       public static native void CResult_COption_TypeZDecodeErrorZ_free(long _res);
+       // struct LDKCResult_COption_TypeZDecodeErrorZ CResult_COption_TypeZDecodeErrorZ_clone(const struct LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_COption_TypeZDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_PaymentIdPaymentErrorZ CResult_PaymentIdPaymentErrorZ_ok(struct LDKThirtyTwoBytes o);
+       public static native long CResult_PaymentIdPaymentErrorZ_ok(byte[] o);
+       // struct LDKCResult_PaymentIdPaymentErrorZ CResult_PaymentIdPaymentErrorZ_err(struct LDKPaymentError e);
+       public static native long CResult_PaymentIdPaymentErrorZ_err(long e);
+       // void CResult_PaymentIdPaymentErrorZ_free(struct LDKCResult_PaymentIdPaymentErrorZ _res);
+       public static native void CResult_PaymentIdPaymentErrorZ_free(long _res);
+       // struct LDKCResult_PaymentIdPaymentErrorZ CResult_PaymentIdPaymentErrorZ_clone(const struct LDKCResult_PaymentIdPaymentErrorZ *NONNULL_PTR orig);
+       public static native long CResult_PaymentIdPaymentErrorZ_clone(long orig);
        // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_ok(enum LDKSiPrefix o);
        public static native long CResult_SiPrefixNoneZ_ok(SiPrefix o);
        // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_err(void);
@@ -1669,12 +2146,32 @@ public class bindings {
        public static native void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(long _res);
        // void CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ _res);
        public static native void CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(long[] _res);
+       // void CVec_BalanceZ_free(struct LDKCVec_BalanceZ _res);
+       public static native void CVec_BalanceZ_free(long[] _res);
        // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelMonitorZ o);
        public static native long CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(long o);
        // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(struct LDKDecodeError e);
        public static native long CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(long e);
        // void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res);
        public static native void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(long _res);
+       // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(const struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void);
+       public static native long CResult_NoneLightningErrorZ_ok();
+       // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_err(struct LDKLightningError e);
+       public static native long CResult_NoneLightningErrorZ_err(long e);
+       // void CResult_NoneLightningErrorZ_free(struct LDKCResult_NoneLightningErrorZ _res);
+       public static native void CResult_NoneLightningErrorZ_free(long _res);
+       // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_clone(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR orig);
+       public static native long CResult_NoneLightningErrorZ_clone(long orig);
+       // struct LDKC2Tuple_PublicKeyTypeZ C2Tuple_PublicKeyTypeZ_clone(const struct LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR orig);
+       public static native long C2Tuple_PublicKeyTypeZ_clone(long orig);
+       // struct LDKC2Tuple_PublicKeyTypeZ C2Tuple_PublicKeyTypeZ_new(struct LDKPublicKey a, struct LDKType b);
+       public static native long C2Tuple_PublicKeyTypeZ_new(byte[] a, long b);
+       // void C2Tuple_PublicKeyTypeZ_free(struct LDKC2Tuple_PublicKeyTypeZ _res);
+       public static native void C2Tuple_PublicKeyTypeZ_free(long _res);
+       // void CVec_C2Tuple_PublicKeyTypeZZ_free(struct LDKCVec_C2Tuple_PublicKeyTypeZZ _res);
+       public static native void CVec_C2Tuple_PublicKeyTypeZZ_free(long[] _res);
        // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_ok(bool o);
        public static native long CResult_boolLightningErrorZ_ok(boolean o);
        // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_err(struct LDKLightningError e);
@@ -1693,14 +2190,6 @@ public class bindings {
        public static native void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(long[] _res);
        // void CVec_NodeAnnouncementZ_free(struct LDKCVec_NodeAnnouncementZ _res);
        public static native void CVec_NodeAnnouncementZ_free(long[] _res);
-       // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void);
-       public static native long CResult_NoneLightningErrorZ_ok();
-       // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_err(struct LDKLightningError e);
-       public static native long CResult_NoneLightningErrorZ_err(long e);
-       // void CResult_NoneLightningErrorZ_free(struct LDKCResult_NoneLightningErrorZ _res);
-       public static native void CResult_NoneLightningErrorZ_free(long _res);
-       // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_clone(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR orig);
-       public static native long CResult_NoneLightningErrorZ_clone(long orig);
        // void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res);
        public static native void CVec_PublicKeyZ_free(byte[][] _res);
        // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o);
@@ -1727,6 +2216,20 @@ public class bindings {
        public static native void CResult_boolPeerHandleErrorZ_free(long _res);
        // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_clone(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR orig);
        public static native long CResult_boolPeerHandleErrorZ_clone(long orig);
+       // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_ok(struct LDKNodeId o);
+       public static native long CResult_NodeIdDecodeErrorZ_ok(long o);
+       // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_NodeIdDecodeErrorZ_err(long e);
+       // void CResult_NodeIdDecodeErrorZ_free(struct LDKCResult_NodeIdDecodeErrorZ _res);
+       public static native void CResult_NodeIdDecodeErrorZ_free(long _res);
+       // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_clone(const struct LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_NodeIdDecodeErrorZ_clone(long orig);
+       // struct LDKCOption_AccessZ COption_AccessZ_some(struct LDKAccess o);
+       public static native long COption_AccessZ_some(long o);
+       // struct LDKCOption_AccessZ COption_AccessZ_none(void);
+       public static native long COption_AccessZ_none();
+       // void COption_AccessZ_free(struct LDKCOption_AccessZ _res);
+       public static native void COption_AccessZ_free(long _res);
        // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_ok(struct LDKDirectionalChannelInfo o);
        public static native long CResult_DirectionalChannelInfoDecodeErrorZ_ok(long o);
        // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
@@ -1777,22 +2280,14 @@ public class bindings {
        public static native void CResult_NetworkGraphDecodeErrorZ_free(long _res);
        // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_clone(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR orig);
        public static native long CResult_NetworkGraphDecodeErrorZ_clone(long orig);
-       // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_ok(struct LDKNetAddress o);
-       public static native long CResult_NetAddressu8Z_ok(long o);
-       // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_err(uint8_t e);
-       public static native long CResult_NetAddressu8Z_err(byte e);
-       // void CResult_NetAddressu8Z_free(struct LDKCResult_NetAddressu8Z _res);
-       public static native void CResult_NetAddressu8Z_free(long _res);
-       // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_clone(const struct LDKCResult_NetAddressu8Z *NONNULL_PTR orig);
-       public static native long CResult_NetAddressu8Z_clone(long orig);
-       // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(struct LDKCResult_NetAddressu8Z o);
-       public static native long CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(long o);
-       // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_err(struct LDKDecodeError e);
-       public static native long CResult_CResult_NetAddressu8ZDecodeErrorZ_err(long e);
-       // void CResult_CResult_NetAddressu8ZDecodeErrorZ_free(struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ _res);
-       public static native void CResult_CResult_NetAddressu8ZDecodeErrorZ_free(long _res);
-       // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(const struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ *NONNULL_PTR orig);
-       public static native long CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(long orig);
+       // struct LDKCOption_CVec_NetAddressZZ COption_CVec_NetAddressZZ_some(struct LDKCVec_NetAddressZ o);
+       public static native long COption_CVec_NetAddressZZ_some(long[] o);
+       // struct LDKCOption_CVec_NetAddressZZ COption_CVec_NetAddressZZ_none(void);
+       public static native long COption_CVec_NetAddressZZ_none();
+       // void COption_CVec_NetAddressZZ_free(struct LDKCOption_CVec_NetAddressZZ _res);
+       public static native void COption_CVec_NetAddressZZ_free(long _res);
+       // struct LDKCOption_CVec_NetAddressZZ COption_CVec_NetAddressZZ_clone(const struct LDKCOption_CVec_NetAddressZZ *NONNULL_PTR orig);
+       public static native long COption_CVec_NetAddressZZ_clone(long orig);
        // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_ok(struct LDKNetAddress o);
        public static native long CResult_NetAddressDecodeErrorZ_ok(long o);
        // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_err(struct LDKDecodeError e);
@@ -1841,6 +2336,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);
@@ -2065,16 +2568,114 @@ 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);
+       // struct LDKCOption_FilterZ COption_FilterZ_some(struct LDKFilter o);
+       public static native long COption_FilterZ_some(long o);
+       // struct LDKCOption_FilterZ COption_FilterZ_none(void);
+       public static native long COption_FilterZ_none();
+       // void COption_FilterZ_free(struct LDKCOption_FilterZ _res);
+       public static native void COption_FilterZ_free(long _res);
+       // struct LDKCResult_LockedChannelMonitorNoneZ CResult_LockedChannelMonitorNoneZ_ok(struct LDKLockedChannelMonitor o);
+       public static native long CResult_LockedChannelMonitorNoneZ_ok(long o);
+       // struct LDKCResult_LockedChannelMonitorNoneZ CResult_LockedChannelMonitorNoneZ_err(void);
+       public static native long CResult_LockedChannelMonitorNoneZ_err();
+       // void CResult_LockedChannelMonitorNoneZ_free(struct LDKCResult_LockedChannelMonitorNoneZ _res);
+       public static native void CResult_LockedChannelMonitorNoneZ_free(long _res);
+       // void CVec_OutPointZ_free(struct LDKCVec_OutPointZ _res);
+       public static native void CVec_OutPointZ_free(long[] _res);
+       // 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 ClosureReason_free(struct LDKClosureReason this_ptr);
+       public static native void ClosureReason_free(long this_ptr);
+       // struct LDKClosureReason ClosureReason_clone(const struct LDKClosureReason *NONNULL_PTR orig);
+       public static native long ClosureReason_clone(long orig);
+       // struct LDKClosureReason ClosureReason_counterparty_force_closed(struct LDKStr peer_msg);
+       public static native long ClosureReason_counterparty_force_closed(String peer_msg);
+       // struct LDKClosureReason ClosureReason_holder_force_closed(void);
+       public static native long ClosureReason_holder_force_closed();
+       // struct LDKClosureReason ClosureReason_cooperative_closure(void);
+       public static native long ClosureReason_cooperative_closure();
+       // struct LDKClosureReason ClosureReason_commitment_tx_confirmed(void);
+       public static native long ClosureReason_commitment_tx_confirmed();
+       // struct LDKClosureReason ClosureReason_processing_error(struct LDKStr err);
+       public static native long ClosureReason_processing_error(String err);
+       // struct LDKClosureReason ClosureReason_disconnected_peer(void);
+       public static native long ClosureReason_disconnected_peer();
+       // struct LDKClosureReason ClosureReason_outdated_channel_manager(void);
+       public static native long ClosureReason_outdated_channel_manager();
+       // struct LDKCVec_u8Z ClosureReason_write(const struct LDKClosureReason *NONNULL_PTR obj);
+       public static native byte[] ClosureReason_write(long obj);
        // 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_id, struct LDKThirtyTwoBytes payment_preimage, struct LDKThirtyTwoBytes payment_hash, struct LDKCOption_u64Z fee_paid_msat);
+       public static native long Event_payment_sent(byte[] payment_id, byte[] payment_preimage, byte[] payment_hash, long fee_paid_msat);
+       // struct LDKEvent Event_payment_path_failed(struct LDKThirtyTwoBytes payment_id, struct LDKThirtyTwoBytes payment_hash, bool rejected_by_dest, struct LDKCOption_NetworkUpdateZ network_update, bool all_paths_failed, struct LDKCVec_RouteHopZ path, struct LDKCOption_u64Z short_channel_id, struct LDKRouteParameters retry);
+       public static native long Event_payment_path_failed(byte[] payment_id, byte[] payment_hash, boolean rejected_by_dest, long network_update, boolean all_paths_failed, long[] path, long short_channel_id, long retry);
+       // 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 LDKEvent Event_channel_closed(struct LDKThirtyTwoBytes channel_id, uint64_t user_channel_id, struct LDKClosureReason reason);
+       public static native long Event_channel_closed(byte[] channel_id, long user_channel_id, long reason);
+       // struct LDKEvent Event_discard_funding(struct LDKThirtyTwoBytes channel_id, struct LDKTransaction transaction);
+       public static native long Event_discard_funding(byte[] channel_id, byte[] transaction);
        // 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_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);
@@ -2085,6 +2686,18 @@ 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 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);
@@ -2093,6 +2706,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);
@@ -2183,8 +2806,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 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);
-       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);
+       // 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);
@@ -2231,12 +2862,22 @@ public class bindings {
        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);
        public static native void Listen_free(long this_ptr);
        // void Confirm_free(struct LDKConfirm this_ptr);
        public static native void Confirm_free(long this_ptr);
+       // 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 Watch_free(struct LDKWatch this_ptr);
        public static native void Watch_free(long this_ptr);
        // void Filter_free(struct LDKFilter this_ptr);
@@ -2265,12 +2906,40 @@ 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 MonitorUpdateId_free(struct LDKMonitorUpdateId this_obj);
+       public static native void MonitorUpdateId_free(long this_obj);
+       // struct LDKMonitorUpdateId MonitorUpdateId_clone(const struct LDKMonitorUpdateId *NONNULL_PTR orig);
+       public static native long MonitorUpdateId_clone(long orig);
+       // uint64_t MonitorUpdateId_hash(const struct LDKMonitorUpdateId *NONNULL_PTR o);
+       public static native long MonitorUpdateId_hash(long o);
+       // bool MonitorUpdateId_eq(const struct LDKMonitorUpdateId *NONNULL_PTR a, const struct LDKMonitorUpdateId *NONNULL_PTR b);
+       public static native boolean MonitorUpdateId_eq(long a, long b);
+       // void Persist_free(struct LDKPersist this_ptr);
+       public static native void Persist_free(long this_ptr);
+       // void LockedChannelMonitor_free(struct LDKLockedChannelMonitor this_obj);
+       public static native void LockedChannelMonitor_free(long this_obj);
        // void ChainMonitor_free(struct LDKChainMonitor this_obj);
        public static native void ChainMonitor_free(long this_obj);
-       // MUST_USE_RES struct LDKChainMonitor ChainMonitor_new(struct LDKFilter *chain_source, struct LDKBroadcasterInterface broadcaster, struct LDKLogger logger, struct LDKFeeEstimator feeest, struct LDKPersist persister);
+       // MUST_USE_RES struct LDKChainMonitor ChainMonitor_new(struct LDKCOption_FilterZ chain_source, struct LDKBroadcasterInterface broadcaster, struct LDKLogger logger, struct LDKFeeEstimator feeest, struct LDKPersist persister);
        public static native long ChainMonitor_new(long chain_source, long broadcaster, long logger, long feeest, long persister);
+       // MUST_USE_RES struct LDKCVec_BalanceZ ChainMonitor_get_claimable_balances(const struct LDKChainMonitor *NONNULL_PTR this_arg, struct LDKCVec_ChannelDetailsZ ignored_channels);
+       public static native long[] ChainMonitor_get_claimable_balances(long this_arg, long[] ignored_channels);
+       // MUST_USE_RES struct LDKCResult_LockedChannelMonitorNoneZ ChainMonitor_get_monitor(const struct LDKChainMonitor *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo);
+       public static native long ChainMonitor_get_monitor(long this_arg, long funding_txo);
+       // MUST_USE_RES struct LDKCVec_OutPointZ ChainMonitor_list_monitors(const struct LDKChainMonitor *NONNULL_PTR this_arg);
+       public static native long[] ChainMonitor_list_monitors(long this_arg);
+       // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChainMonitor_channel_monitor_updated(const struct LDKChainMonitor *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKMonitorUpdateId completed_update_id);
+       public static native long ChainMonitor_channel_monitor_updated(long this_arg, long funding_txo, long completed_update_id);
        // struct LDKListen ChainMonitor_as_Listen(const struct LDKChainMonitor *NONNULL_PTR this_arg);
        public static native long ChainMonitor_as_Listen(long this_arg);
        // struct LDKConfirm ChainMonitor_as_Confirm(const struct LDKChainMonitor *NONNULL_PTR this_arg);
@@ -2291,16 +2960,30 @@ public class bindings {
        public static native byte[] ChannelMonitorUpdate_write(long obj);
        // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ ChannelMonitorUpdate_read(struct LDKu8slice ser);
        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);
        // void MonitorUpdateError_free(struct LDKMonitorUpdateError this_obj);
        public static native void MonitorUpdateError_free(long this_obj);
+       // struct LDKStr MonitorUpdateError_get_a(const struct LDKMonitorUpdateError *NONNULL_PTR this_ptr);
+       public static native String MonitorUpdateError_get_a(long this_ptr);
+       // void MonitorUpdateError_set_a(struct LDKMonitorUpdateError *NONNULL_PTR this_ptr, struct LDKStr val);
+       public static native void MonitorUpdateError_set_a(long this_ptr, String val);
+       // MUST_USE_RES struct LDKMonitorUpdateError MonitorUpdateError_new(struct LDKStr a_arg);
+       public static native long MonitorUpdateError_new(String a_arg);
        // struct LDKMonitorUpdateError MonitorUpdateError_clone(const struct LDKMonitorUpdateError *NONNULL_PTR orig);
        public static native long MonitorUpdateError_clone(long orig);
        // void MonitorEvent_free(struct LDKMonitorEvent this_ptr);
        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_confirmed(struct LDKOutPoint a);
+       public static native long MonitorEvent_commitment_tx_confirmed(long a);
+       // struct LDKMonitorEvent MonitorEvent_update_completed(struct LDKOutPoint funding_txo, uint64_t monitor_update_id);
+       public static native long MonitorEvent_update_completed(long funding_txo, long monitor_update_id);
+       // struct LDKMonitorEvent MonitorEvent_update_failed(struct LDKOutPoint a);
+       public static native long MonitorEvent_update_failed(long a);
+       // struct LDKCVec_u8Z MonitorEvent_write(const struct LDKMonitorEvent *NONNULL_PTR obj);
+       public static native byte[] MonitorEvent_write(long obj);
        // 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);
@@ -2309,6 +2992,20 @@ public class bindings {
        public static native byte[] HTLCUpdate_write(long obj);
        // struct LDKCResult_HTLCUpdateDecodeErrorZ HTLCUpdate_read(struct LDKu8slice ser);
        public static native long HTLCUpdate_read(byte[] ser);
+       // void Balance_free(struct LDKBalance this_ptr);
+       public static native void Balance_free(long this_ptr);
+       // struct LDKBalance Balance_clone(const struct LDKBalance *NONNULL_PTR orig);
+       public static native long Balance_clone(long orig);
+       // struct LDKBalance Balance_claimable_on_channel_close(uint64_t claimable_amount_satoshis);
+       public static native long Balance_claimable_on_channel_close(long claimable_amount_satoshis);
+       // struct LDKBalance Balance_claimable_awaiting_confirmations(uint64_t claimable_amount_satoshis, uint32_t confirmation_height);
+       public static native long Balance_claimable_awaiting_confirmations(long claimable_amount_satoshis, int confirmation_height);
+       // struct LDKBalance Balance_contentious_claimable(uint64_t claimable_amount_satoshis, uint32_t timeout_height);
+       public static native long Balance_contentious_claimable(long claimable_amount_satoshis, int timeout_height);
+       // struct LDKBalance Balance_maybe_claimable_htlcawaiting_timeout(uint64_t claimable_amount_satoshis, uint32_t claimable_height);
+       public static native long Balance_maybe_claimable_htlcawaiting_timeout(long claimable_amount_satoshis, int claimable_height);
+       // bool Balance_eq(const struct LDKBalance *NONNULL_PTR a, const struct LDKBalance *NONNULL_PTR b);
+       public static native boolean Balance_eq(long a, long b);
        // void ChannelMonitor_free(struct LDKChannelMonitor this_obj);
        public static native void ChannelMonitor_free(long this_obj);
        // struct LDKChannelMonitor ChannelMonitor_clone(const struct LDKChannelMonitor *NONNULL_PTR orig);
@@ -2345,8 +3042,8 @@ public class bindings {
        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);
+       // MUST_USE_RES struct LDKCVec_BalanceZ ChannelMonitor_get_claimable_balances(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
+       public static native long[] ChannelMonitor_get_claimable_balances(long this_arg);
        // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ C2Tuple_BlockHashChannelMonitorZ_read(struct LDKu8slice ser, const struct LDKKeysInterface *NONNULL_PTR arg);
        public static native long C2Tuple_BlockHashChannelMonitorZ_read(byte[] ser, long arg);
        // void OutPoint_free(struct LDKOutPoint this_obj);
@@ -2437,6 +3134,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);
@@ -2529,6 +3232,24 @@ 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 CounterpartyForwardingInfo_free(struct LDKCounterpartyForwardingInfo this_obj);
+       public static native void CounterpartyForwardingInfo_free(long this_obj);
+       // uint32_t CounterpartyForwardingInfo_get_fee_base_msat(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr);
+       public static native int CounterpartyForwardingInfo_get_fee_base_msat(long this_ptr);
+       // void CounterpartyForwardingInfo_set_fee_base_msat(struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr, uint32_t val);
+       public static native void CounterpartyForwardingInfo_set_fee_base_msat(long this_ptr, int val);
+       // uint32_t CounterpartyForwardingInfo_get_fee_proportional_millionths(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr);
+       public static native int CounterpartyForwardingInfo_get_fee_proportional_millionths(long this_ptr);
+       // void CounterpartyForwardingInfo_set_fee_proportional_millionths(struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr, uint32_t val);
+       public static native void CounterpartyForwardingInfo_set_fee_proportional_millionths(long this_ptr, int val);
+       // uint16_t CounterpartyForwardingInfo_get_cltv_expiry_delta(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr);
+       public static native short CounterpartyForwardingInfo_get_cltv_expiry_delta(long this_ptr);
+       // void CounterpartyForwardingInfo_set_cltv_expiry_delta(struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr, uint16_t val);
+       public static native void CounterpartyForwardingInfo_set_cltv_expiry_delta(long this_ptr, short val);
+       // MUST_USE_RES struct LDKCounterpartyForwardingInfo CounterpartyForwardingInfo_new(uint32_t fee_base_msat_arg, uint32_t fee_proportional_millionths_arg, uint16_t cltv_expiry_delta_arg);
+       public static native long CounterpartyForwardingInfo_new(int fee_base_msat_arg, int fee_proportional_millionths_arg, short cltv_expiry_delta_arg);
+       // struct LDKCounterpartyForwardingInfo CounterpartyForwardingInfo_clone(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR orig);
+       public static native long CounterpartyForwardingInfo_clone(long orig);
        // 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);
@@ -2543,6 +3264,12 @@ public class bindings {
        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 LDKCounterpartyForwardingInfo ChannelCounterparty_get_forwarding_info(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
+       public static native long ChannelCounterparty_get_forwarding_info(long this_ptr);
+       // void ChannelCounterparty_set_forwarding_info(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKCounterpartyForwardingInfo val);
+       public static native void ChannelCounterparty_set_forwarding_info(long this_ptr, long val);
+       // MUST_USE_RES struct LDKChannelCounterparty ChannelCounterparty_new(struct LDKPublicKey node_id_arg, struct LDKInitFeatures features_arg, uint64_t unspendable_punishment_reserve_arg, struct LDKCounterpartyForwardingInfo forwarding_info_arg);
+       public static native long ChannelCounterparty_new(byte[] node_id_arg, long features_arg, long unspendable_punishment_reserve_arg, long forwarding_info_arg);
        // 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);
@@ -2571,10 +3298,10 @@ public class bindings {
        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);
-       public static native void ChannelDetails_set_user_id(long this_ptr, long val);
+       // uint64_t ChannelDetails_get_user_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
+       public static native long ChannelDetails_get_user_channel_id(long this_ptr);
+       // void ChannelDetails_set_user_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
+       public static native void ChannelDetails_set_user_channel_id(long this_ptr, long val);
        // uint64_t ChannelDetails_get_outbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
        public static native long ChannelDetails_get_outbound_capacity_msat(long this_ptr);
        // void ChannelDetails_set_outbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
@@ -2607,32 +3334,46 @@ 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);
+       // 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_channel_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_channel_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 results, struct LDKRouteParameters failed_paths_retry, struct LDKThirtyTwoBytes payment_id);
+       public static native long PaymentSendFailure_partial_failure(long[] results, long failed_paths_retry, byte[] payment_id);
        // 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);
        public static native long ChannelManager_get_current_default_configuration(long this_arg);
-       // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_create_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey their_network_key, uint64_t channel_value_satoshis, uint64_t push_msat, uint64_t user_id, struct LDKUserConfig override_config);
-       public static native long ChannelManager_create_channel(long this_arg, byte[] their_network_key, long channel_value_satoshis, long push_msat, long user_id, long override_config);
+       // MUST_USE_RES struct LDKCResult__u832APIErrorZ ChannelManager_create_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey their_network_key, uint64_t channel_value_satoshis, uint64_t push_msat, uint64_t user_channel_id, struct LDKUserConfig override_config);
+       public static native long ChannelManager_create_channel(long this_arg, byte[] their_network_key, long channel_value_satoshis, long push_msat, long user_channel_id, long override_config);
        // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
        public static native long[] ChannelManager_list_channels(long this_arg);
        // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_usable_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
        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);
+       // MUST_USE_RES struct LDKCResult_PaymentIdPaymentSendFailureZ 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_NonePaymentSendFailureZ ChannelManager_retry_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_id);
+       public static native long ChannelManager_retry_payment(long this_arg, long route, byte[] payment_id);
+       // MUST_USE_RES struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ 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);
@@ -2647,8 +3388,6 @@ public class bindings {
        public static native boolean ChannelManager_claim_funds(long this_arg, byte[] payment_preimage);
        // MUST_USE_RES struct LDKPublicKey ChannelManager_get_our_node_id(const struct LDKChannelManager *NONNULL_PTR this_arg);
        public static native byte[] ChannelManager_get_our_node_id(long this_arg);
-       // void ChannelManager_channel_monitor_updated(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKOutPoint *NONNULL_PTR funding_txo, uint64_t highest_applied_update_id);
-       public static native void ChannelManager_channel_monitor_updated(long this_arg, long funding_txo, long highest_applied_update_id);
        // MUST_USE_RES struct LDKC2Tuple_PaymentHashPaymentSecretZ ChannelManager_create_inbound_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKCOption_u64Z min_value_msat, uint32_t invoice_expiry_delta_secs, uint64_t user_payment_id);
        public static native long ChannelManager_create_inbound_payment(long this_arg, long min_value_msat, int invoice_expiry_delta_secs, long user_payment_id);
        // MUST_USE_RES struct LDKCResult_PaymentSecretAPIErrorZ ChannelManager_create_inbound_payment_for_hash(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_hash, struct LDKCOption_u64Z min_value_msat, uint32_t invoice_expiry_delta_secs, uint64_t user_payment_id);
@@ -2953,6 +3692,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];
@@ -2967,8 +3720,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);
@@ -3145,10 +3902,16 @@ 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);
-       public static native long Result_read(byte[] ser);
        // struct LDKCResult_NetAddressDecodeErrorZ NetAddress_read(struct LDKu8slice ser);
        public static native long NetAddress_read(byte[] ser);
        // void UnsignedNodeAnnouncement_free(struct LDKUnsignedNodeAnnouncement this_obj);
@@ -3389,6 +4152,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);
@@ -3405,12 +4176,20 @@ public class bindings {
        public static native long LightningError_clone(long orig);
        // void CommitmentUpdate_free(struct LDKCommitmentUpdate this_obj);
        public static native void CommitmentUpdate_free(long this_obj);
+       // struct LDKCVec_UpdateAddHTLCZ CommitmentUpdate_get_update_add_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
+       public static native long[] CommitmentUpdate_get_update_add_htlcs(long this_ptr);
        // void CommitmentUpdate_set_update_add_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateAddHTLCZ val);
        public static native void CommitmentUpdate_set_update_add_htlcs(long this_ptr, long[] val);
+       // struct LDKCVec_UpdateFulfillHTLCZ CommitmentUpdate_get_update_fulfill_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
+       public static native long[] CommitmentUpdate_get_update_fulfill_htlcs(long this_ptr);
        // void CommitmentUpdate_set_update_fulfill_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFulfillHTLCZ val);
        public static native void CommitmentUpdate_set_update_fulfill_htlcs(long this_ptr, long[] val);
+       // struct LDKCVec_UpdateFailHTLCZ CommitmentUpdate_get_update_fail_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
+       public static native long[] CommitmentUpdate_get_update_fail_htlcs(long this_ptr);
        // void CommitmentUpdate_set_update_fail_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailHTLCZ val);
        public static native void CommitmentUpdate_set_update_fail_htlcs(long this_ptr, long[] val);
+       // struct LDKCVec_UpdateFailMalformedHTLCZ CommitmentUpdate_get_update_fail_malformed_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
+       public static native long[] CommitmentUpdate_get_update_fail_malformed_htlcs(long this_ptr);
        // void CommitmentUpdate_set_update_fail_malformed_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailMalformedHTLCZ val);
        public static native void CommitmentUpdate_set_update_fail_malformed_htlcs(long this_ptr, long[] val);
        // struct LDKUpdateFee CommitmentUpdate_get_update_fee(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
@@ -3425,10 +4204,6 @@ public class bindings {
        public static native long CommitmentUpdate_new(long[] update_add_htlcs_arg, long[] update_fulfill_htlcs_arg, long[] update_fail_htlcs_arg, long[] update_fail_malformed_htlcs_arg, long update_fee_arg, long commitment_signed_arg);
        // struct LDKCommitmentUpdate CommitmentUpdate_clone(const struct LDKCommitmentUpdate *NONNULL_PTR orig);
        public static native long CommitmentUpdate_clone(long orig);
-       // void HTLCFailChannelUpdate_free(struct LDKHTLCFailChannelUpdate this_ptr);
-       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);
        // void ChannelMessageHandler_free(struct LDKChannelMessageHandler this_ptr);
        public static native void ChannelMessageHandler_free(long this_ptr);
        // void RoutingMessageHandler_free(struct LDKRoutingMessageHandler this_ptr);
@@ -3449,6 +4224,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);
@@ -3541,24 +4320,26 @@ public class bindings {
        public static native long QueryShortChannelIds_read(byte[] ser);
        // struct LDKCVec_u8Z QueryShortChannelIds_write(const struct LDKQueryShortChannelIds *NONNULL_PTR obj);
        public static native byte[] QueryShortChannelIds_write(long obj);
-       // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ ReplyShortChannelIdsEnd_read(struct LDKu8slice ser);
-       public static native long ReplyShortChannelIdsEnd_read(byte[] ser);
        // struct LDKCVec_u8Z ReplyShortChannelIdsEnd_write(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR obj);
        public static native byte[] ReplyShortChannelIdsEnd_write(long obj);
+       // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ ReplyShortChannelIdsEnd_read(struct LDKu8slice ser);
+       public static native long ReplyShortChannelIdsEnd_read(byte[] ser);
        // MUST_USE_RES uint32_t QueryChannelRange_end_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_arg);
        public static native int QueryChannelRange_end_blocknum(long this_arg);
-       // struct LDKCResult_QueryChannelRangeDecodeErrorZ QueryChannelRange_read(struct LDKu8slice ser);
-       public static native long QueryChannelRange_read(byte[] ser);
        // struct LDKCVec_u8Z QueryChannelRange_write(const struct LDKQueryChannelRange *NONNULL_PTR obj);
        public static native byte[] QueryChannelRange_write(long obj);
+       // struct LDKCResult_QueryChannelRangeDecodeErrorZ QueryChannelRange_read(struct LDKu8slice ser);
+       public static native long QueryChannelRange_read(byte[] ser);
        // struct LDKCResult_ReplyChannelRangeDecodeErrorZ ReplyChannelRange_read(struct LDKu8slice ser);
        public static native long ReplyChannelRange_read(byte[] ser);
        // struct LDKCVec_u8Z ReplyChannelRange_write(const struct LDKReplyChannelRange *NONNULL_PTR obj);
        public static native byte[] ReplyChannelRange_write(long obj);
-       // struct LDKCResult_GossipTimestampFilterDecodeErrorZ GossipTimestampFilter_read(struct LDKu8slice ser);
-       public static native long GossipTimestampFilter_read(byte[] ser);
        // struct LDKCVec_u8Z GossipTimestampFilter_write(const struct LDKGossipTimestampFilter *NONNULL_PTR obj);
        public static native byte[] GossipTimestampFilter_write(long obj);
+       // struct LDKCResult_GossipTimestampFilterDecodeErrorZ GossipTimestampFilter_read(struct LDKu8slice ser);
+       public static native long GossipTimestampFilter_read(byte[] ser);
+       // void CustomMessageHandler_free(struct LDKCustomMessageHandler this_ptr);
+       public static native void CustomMessageHandler_free(long this_ptr);
        // void IgnoringMessageHandler_free(struct LDKIgnoringMessageHandler this_obj);
        public static native void IgnoringMessageHandler_free(long this_obj);
        // MUST_USE_RES struct LDKIgnoringMessageHandler IgnoringMessageHandler_new(void);
@@ -3567,6 +4348,10 @@ public class bindings {
        public static native long IgnoringMessageHandler_as_MessageSendEventsProvider(long this_arg);
        // struct LDKRoutingMessageHandler IgnoringMessageHandler_as_RoutingMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
        public static native long IgnoringMessageHandler_as_RoutingMessageHandler(long this_arg);
+       // struct LDKCustomMessageReader IgnoringMessageHandler_as_CustomMessageReader(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
+       public static native long IgnoringMessageHandler_as_CustomMessageReader(long this_arg);
+       // struct LDKCustomMessageHandler IgnoringMessageHandler_as_CustomMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
+       public static native long IgnoringMessageHandler_as_CustomMessageHandler(long this_arg);
        // void ErroringMessageHandler_free(struct LDKErroringMessageHandler this_obj);
        public static native void ErroringMessageHandler_free(long this_obj);
        // MUST_USE_RES struct LDKErroringMessageHandler ErroringMessageHandler_new(void);
@@ -3603,8 +4388,8 @@ public class bindings {
        public static native long PeerHandleError_clone(long orig);
        // void PeerManager_free(struct LDKPeerManager this_obj);
        public static native void PeerManager_free(long this_obj);
-       // MUST_USE_RES struct LDKPeerManager PeerManager_new(struct LDKMessageHandler message_handler, struct LDKSecretKey our_node_secret, const uint8_t (*ephemeral_random_data)[32], struct LDKLogger logger);
-       public static native long PeerManager_new(long message_handler, byte[] our_node_secret, byte[] ephemeral_random_data, long logger);
+       // MUST_USE_RES struct LDKPeerManager PeerManager_new(struct LDKMessageHandler message_handler, struct LDKSecretKey our_node_secret, const uint8_t (*ephemeral_random_data)[32], struct LDKLogger logger, struct LDKCustomMessageHandler custom_message_handler);
+       public static native long PeerManager_new(long message_handler, byte[] our_node_secret, byte[] ephemeral_random_data, long logger, long custom_message_handler);
        // MUST_USE_RES struct LDKCVec_PublicKeyZ PeerManager_get_peer_node_ids(const struct LDKPeerManager *NONNULL_PTR this_arg);
        public static native byte[][] PeerManager_get_peer_node_ids(long this_arg);
        // MUST_USE_RES struct LDKCResult_CVec_u8ZPeerHandleErrorZ PeerManager_new_outbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKSocketDescriptor descriptor);
@@ -3621,10 +4406,14 @@ public class bindings {
        public static native void PeerManager_socket_disconnected(long this_arg, long descriptor);
        // void PeerManager_disconnect_by_node_id(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey node_id, bool no_connection_possible);
        public static native void PeerManager_disconnect_by_node_id(long this_arg, byte[] node_id, boolean no_connection_possible);
+       // void PeerManager_disconnect_all_peers(const struct LDKPeerManager *NONNULL_PTR this_arg);
+       public static native void PeerManager_disconnect_all_peers(long this_arg);
        // void PeerManager_timer_tick_occurred(const struct LDKPeerManager *NONNULL_PTR this_arg);
        public static native void PeerManager_timer_tick_occurred(long this_arg);
        // struct LDKThirtyTwoBytes build_commitment_secret(const uint8_t (*commitment_seed)[32], uint64_t idx);
        public static native byte[] build_commitment_secret(byte[] commitment_seed, long idx);
+       // struct LDKTransaction build_closing_transaction(uint64_t to_holder_value_sat, uint64_t to_counterparty_value_sat, struct LDKCVec_u8Z to_holder_script, struct LDKCVec_u8Z to_counterparty_script, struct LDKOutPoint funding_outpoint);
+       public static native byte[] build_closing_transaction(long to_holder_value_sat, long to_counterparty_value_sat, byte[] to_holder_script, byte[] to_counterparty_script, long funding_outpoint);
        // struct LDKCResult_SecretKeyErrorZ derive_private_key(struct LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]);
        public static native long derive_private_key(byte[] per_commitment_point, byte[] base_secret);
        // struct LDKCResult_PublicKeyErrorZ derive_public_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey base_point);
@@ -3839,6 +4628,34 @@ public class bindings {
        public static native byte[] BuiltCommitmentTransaction_get_sighash_all(long this_arg, byte[] funding_redeemscript, long channel_value_satoshis);
        // MUST_USE_RES struct LDKSignature BuiltCommitmentTransaction_sign(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_arg, const uint8_t (*funding_key)[32], struct LDKu8slice funding_redeemscript, uint64_t channel_value_satoshis);
        public static native byte[] BuiltCommitmentTransaction_sign(long this_arg, byte[] funding_key, byte[] funding_redeemscript, long channel_value_satoshis);
+       // void ClosingTransaction_free(struct LDKClosingTransaction this_obj);
+       public static native void ClosingTransaction_free(long this_obj);
+       // struct LDKClosingTransaction ClosingTransaction_clone(const struct LDKClosingTransaction *NONNULL_PTR orig);
+       public static native long ClosingTransaction_clone(long orig);
+       // uint64_t ClosingTransaction_hash(const struct LDKClosingTransaction *NONNULL_PTR o);
+       public static native long ClosingTransaction_hash(long o);
+       // MUST_USE_RES struct LDKClosingTransaction ClosingTransaction_new(uint64_t to_holder_value_sat, uint64_t to_counterparty_value_sat, struct LDKCVec_u8Z to_holder_script, struct LDKCVec_u8Z to_counterparty_script, struct LDKOutPoint funding_outpoint);
+       public static native long ClosingTransaction_new(long to_holder_value_sat, long to_counterparty_value_sat, byte[] to_holder_script, byte[] to_counterparty_script, long funding_outpoint);
+       // MUST_USE_RES struct LDKTrustedClosingTransaction ClosingTransaction_trust(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
+       public static native long ClosingTransaction_trust(long this_arg);
+       // MUST_USE_RES struct LDKCResult_TrustedClosingTransactionNoneZ ClosingTransaction_verify(const struct LDKClosingTransaction *NONNULL_PTR this_arg, struct LDKOutPoint funding_outpoint);
+       public static native long ClosingTransaction_verify(long this_arg, long funding_outpoint);
+       // MUST_USE_RES uint64_t ClosingTransaction_to_holder_value_sat(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
+       public static native long ClosingTransaction_to_holder_value_sat(long this_arg);
+       // MUST_USE_RES uint64_t ClosingTransaction_to_counterparty_value_sat(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
+       public static native long ClosingTransaction_to_counterparty_value_sat(long this_arg);
+       // MUST_USE_RES struct LDKu8slice ClosingTransaction_to_holder_script(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
+       public static native byte[] ClosingTransaction_to_holder_script(long this_arg);
+       // MUST_USE_RES struct LDKu8slice ClosingTransaction_to_counterparty_script(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
+       public static native byte[] ClosingTransaction_to_counterparty_script(long this_arg);
+       // void TrustedClosingTransaction_free(struct LDKTrustedClosingTransaction this_obj);
+       public static native void TrustedClosingTransaction_free(long this_obj);
+       // MUST_USE_RES struct LDKTransaction TrustedClosingTransaction_built_transaction(const struct LDKTrustedClosingTransaction *NONNULL_PTR this_arg);
+       public static native byte[] TrustedClosingTransaction_built_transaction(long this_arg);
+       // MUST_USE_RES struct LDKThirtyTwoBytes TrustedClosingTransaction_get_sighash_all(const struct LDKTrustedClosingTransaction *NONNULL_PTR this_arg, struct LDKu8slice funding_redeemscript, uint64_t channel_value_satoshis);
+       public static native byte[] TrustedClosingTransaction_get_sighash_all(long this_arg, byte[] funding_redeemscript, long channel_value_satoshis);
+       // MUST_USE_RES struct LDKSignature TrustedClosingTransaction_sign(const struct LDKTrustedClosingTransaction *NONNULL_PTR this_arg, const uint8_t (*funding_key)[32], struct LDKu8slice funding_redeemscript, uint64_t channel_value_satoshis);
+       public static native byte[] TrustedClosingTransaction_sign(long this_arg, byte[] funding_key, byte[] funding_redeemscript, long channel_value_satoshis);
        // void CommitmentTransaction_free(struct LDKCommitmentTransaction this_obj);
        public static native void CommitmentTransaction_free(long this_obj);
        // struct LDKCommitmentTransaction CommitmentTransaction_clone(const struct LDKCommitmentTransaction *NONNULL_PTR orig);
@@ -3899,18 +4716,26 @@ public class bindings {
        public static native long InitFeatures_empty();
        // MUST_USE_RES struct LDKInitFeatures InitFeatures_known(void);
        public static native long InitFeatures_known();
+       // MUST_USE_RES bool InitFeatures_requires_unknown_bits(const struct LDKInitFeatures *NONNULL_PTR this_arg);
+       public static native boolean InitFeatures_requires_unknown_bits(long this_arg);
        // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_empty(void);
        public static native long NodeFeatures_empty();
        // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_known(void);
        public static native long NodeFeatures_known();
+       // MUST_USE_RES bool NodeFeatures_requires_unknown_bits(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
+       public static native boolean NodeFeatures_requires_unknown_bits(long this_arg);
        // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_empty(void);
        public static native long ChannelFeatures_empty();
        // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_known(void);
        public static native long ChannelFeatures_known();
+       // MUST_USE_RES bool ChannelFeatures_requires_unknown_bits(const struct LDKChannelFeatures *NONNULL_PTR this_arg);
+       public static native boolean ChannelFeatures_requires_unknown_bits(long this_arg);
        // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_empty(void);
        public static native long InvoiceFeatures_empty();
        // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_known(void);
        public static native long InvoiceFeatures_known();
+       // MUST_USE_RES bool InvoiceFeatures_requires_unknown_bits(const struct LDKInvoiceFeatures *NONNULL_PTR this_arg);
+       public static native boolean InvoiceFeatures_requires_unknown_bits(long this_arg);
        // MUST_USE_RES bool InitFeatures_supports_payment_secret(const struct LDKInitFeatures *NONNULL_PTR this_arg);
        public static native boolean InitFeatures_supports_payment_secret(long this_arg);
        // MUST_USE_RES bool NodeFeatures_supports_payment_secret(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
@@ -3933,110 +4758,90 @@ 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 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);
-       public static native byte[] RouteHop_get_pubkey(long this_ptr);
-       // void RouteHop_set_pubkey(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
-       public static native void RouteHop_set_pubkey(long this_ptr, byte[] val);
-       // struct LDKNodeFeatures RouteHop_get_node_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
-       public static native long RouteHop_get_node_features(long this_ptr);
-       // void RouteHop_set_node_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
-       public static native void RouteHop_set_node_features(long this_ptr, long val);
-       // uint64_t RouteHop_get_short_channel_id(const struct LDKRouteHop *NONNULL_PTR this_ptr);
-       public static native long RouteHop_get_short_channel_id(long this_ptr);
-       // void RouteHop_set_short_channel_id(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
-       public static native void RouteHop_set_short_channel_id(long this_ptr, long val);
-       // struct LDKChannelFeatures RouteHop_get_channel_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
-       public static native long RouteHop_get_channel_features(long this_ptr);
-       // void RouteHop_set_channel_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
-       public static native void RouteHop_set_channel_features(long this_ptr, long val);
-       // uint64_t RouteHop_get_fee_msat(const struct LDKRouteHop *NONNULL_PTR this_ptr);
-       public static native long RouteHop_get_fee_msat(long this_ptr);
-       // void RouteHop_set_fee_msat(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
-       public static native void RouteHop_set_fee_msat(long this_ptr, long val);
-       // uint32_t RouteHop_get_cltv_expiry_delta(const struct LDKRouteHop *NONNULL_PTR this_ptr);
-       public static native int RouteHop_get_cltv_expiry_delta(long this_ptr);
-       // void RouteHop_set_cltv_expiry_delta(struct LDKRouteHop *NONNULL_PTR this_ptr, uint32_t val);
-       public static native void RouteHop_set_cltv_expiry_delta(long this_ptr, int val);
-       // MUST_USE_RES struct LDKRouteHop RouteHop_new(struct LDKPublicKey pubkey_arg, struct LDKNodeFeatures node_features_arg, uint64_t short_channel_id_arg, struct LDKChannelFeatures channel_features_arg, uint64_t fee_msat_arg, uint32_t cltv_expiry_delta_arg);
-       public static native long RouteHop_new(byte[] pubkey_arg, long node_features_arg, long short_channel_id_arg, long channel_features_arg, long fee_msat_arg, int cltv_expiry_delta_arg);
-       // struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig);
-       public static native long RouteHop_clone(long orig);
-       // struct LDKCVec_u8Z RouteHop_write(const struct LDKRouteHop *NONNULL_PTR obj);
-       public static native byte[] RouteHop_write(long obj);
-       // struct LDKCResult_RouteHopDecodeErrorZ RouteHop_read(struct LDKu8slice ser);
-       public static native long RouteHop_read(byte[] ser);
-       // void Route_free(struct LDKRoute this_obj);
-       public static native void Route_free(long this_obj);
-       // void Route_set_paths(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKCVec_CVec_RouteHopZZ val);
-       public static native void Route_set_paths(long this_ptr, long[][] val);
-       // MUST_USE_RES struct LDKRoute Route_new(struct LDKCVec_CVec_RouteHopZZ paths_arg);
-       public static native long Route_new(long[][] paths_arg);
-       // struct LDKRoute Route_clone(const struct LDKRoute *NONNULL_PTR orig);
-       public static native long Route_clone(long orig);
-       // struct LDKCVec_u8Z Route_write(const struct LDKRoute *NONNULL_PTR obj);
-       public static native byte[] Route_write(long obj);
-       // struct LDKCResult_RouteDecodeErrorZ Route_read(struct LDKu8slice ser);
-       public static native long Route_read(byte[] ser);
-       // void RouteHint_free(struct LDKRouteHint this_obj);
-       public static native void RouteHint_free(long this_obj);
-       // bool RouteHint_eq(const struct LDKRouteHint *NONNULL_PTR a, const struct LDKRouteHint *NONNULL_PTR b);
-       public static native boolean RouteHint_eq(long a, long b);
-       // struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
-       public static native long RouteHint_clone(long orig);
-       // void RouteHintHop_free(struct LDKRouteHintHop this_obj);
-       public static native void RouteHintHop_free(long this_obj);
-       // struct LDKPublicKey RouteHintHop_get_src_node_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
-       public static native byte[] RouteHintHop_get_src_node_id(long this_ptr);
-       // void RouteHintHop_set_src_node_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
-       public static native void RouteHintHop_set_src_node_id(long this_ptr, byte[] val);
-       // uint64_t RouteHintHop_get_short_channel_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
-       public static native long RouteHintHop_get_short_channel_id(long this_ptr);
-       // void RouteHintHop_set_short_channel_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint64_t val);
-       public static native void RouteHintHop_set_short_channel_id(long this_ptr, long val);
-       // struct LDKRoutingFees RouteHintHop_get_fees(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
-       public static native long RouteHintHop_get_fees(long this_ptr);
-       // void RouteHintHop_set_fees(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
-       public static native void RouteHintHop_set_fees(long this_ptr, long val);
-       // uint16_t RouteHintHop_get_cltv_expiry_delta(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
-       public static native short RouteHintHop_get_cltv_expiry_delta(long this_ptr);
-       // void RouteHintHop_set_cltv_expiry_delta(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint16_t val);
-       public static native void RouteHintHop_set_cltv_expiry_delta(long this_ptr, short val);
-       // struct LDKCOption_u64Z RouteHintHop_get_htlc_minimum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
-       public static native long RouteHintHop_get_htlc_minimum_msat(long this_ptr);
-       // void RouteHintHop_set_htlc_minimum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
-       public static native void RouteHintHop_set_htlc_minimum_msat(long this_ptr, long val);
-       // struct LDKCOption_u64Z RouteHintHop_get_htlc_maximum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
-       public static native long RouteHintHop_get_htlc_maximum_msat(long this_ptr);
-       // void RouteHintHop_set_htlc_maximum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
-       public static native void RouteHintHop_set_htlc_maximum_msat(long this_ptr, long val);
-       // MUST_USE_RES struct LDKRouteHintHop RouteHintHop_new(struct LDKPublicKey src_node_id_arg, uint64_t short_channel_id_arg, struct LDKRoutingFees fees_arg, uint16_t cltv_expiry_delta_arg, struct LDKCOption_u64Z htlc_minimum_msat_arg, struct LDKCOption_u64Z htlc_maximum_msat_arg);
-       public static native long RouteHintHop_new(byte[] src_node_id_arg, long short_channel_id_arg, long fees_arg, short cltv_expiry_delta_arg, long htlc_minimum_msat_arg, long htlc_maximum_msat_arg);
-       // bool RouteHintHop_eq(const struct LDKRouteHintHop *NONNULL_PTR a, const struct LDKRouteHintHop *NONNULL_PTR b);
-       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_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 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 LDKInvalidShutdownScript InvalidShutdownScript_clone(const struct LDKInvalidShutdownScript *NONNULL_PTR orig);
+       public static native long InvalidShutdownScript_clone(long orig);
+       // 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_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 CustomMessageReader_free(struct LDKCustomMessageReader this_ptr);
+       public static native void CustomMessageReader_free(long this_ptr);
+       // struct LDKType Type_clone(const struct LDKType *NONNULL_PTR orig);
+       public static native long Type_clone(long orig);
+       // void Type_free(struct LDKType this_ptr);
+       public static native void Type_free(long this_ptr);
+       // void Score_free(struct LDKScore this_ptr);
+       public static native void Score_free(long this_ptr);
+       // void LockableScore_free(struct LDKLockableScore this_obj);
+       public static native void LockableScore_free(long this_obj);
+       // MUST_USE_RES struct LDKLockableScore LockableScore_new(struct LDKScore score);
+       public static native long LockableScore_new(long score);
+       // struct LDKCVec_u8Z LockableScore_write(const struct LDKLockableScore *NONNULL_PTR obj);
+       public static native byte[] LockableScore_write(long obj);
+       // void NodeId_free(struct LDKNodeId this_obj);
+       public static native void NodeId_free(long this_obj);
+       // struct LDKNodeId NodeId_clone(const struct LDKNodeId *NONNULL_PTR orig);
+       public static native long NodeId_clone(long orig);
+       // MUST_USE_RES struct LDKNodeId NodeId_from_pubkey(struct LDKPublicKey pubkey);
+       public static native long NodeId_from_pubkey(byte[] pubkey);
+       // MUST_USE_RES struct LDKu8slice NodeId_as_slice(const struct LDKNodeId *NONNULL_PTR this_arg);
+       public static native byte[] NodeId_as_slice(long this_arg);
+       // uint64_t NodeId_hash(const struct LDKNodeId *NONNULL_PTR o);
+       public static native long NodeId_hash(long o);
+       // struct LDKCVec_u8Z NodeId_write(const struct LDKNodeId *NONNULL_PTR obj);
+       public static native byte[] NodeId_write(long obj);
+       // struct LDKCResult_NodeIdDecodeErrorZ NodeId_read(struct LDKu8slice ser);
+       public static native long NodeId_read(byte[] ser);
        // void NetworkGraph_free(struct LDKNetworkGraph this_obj);
        public static native void NetworkGraph_free(long this_obj);
        // struct LDKNetworkGraph NetworkGraph_clone(const struct LDKNetworkGraph *NONNULL_PTR orig);
        public static native long NetworkGraph_clone(long orig);
-       // void LockedNetworkGraph_free(struct LDKLockedNetworkGraph this_obj);
-       public static native void LockedNetworkGraph_free(long this_obj);
+       // void ReadOnlyNetworkGraph_free(struct LDKReadOnlyNetworkGraph this_obj);
+       public static native void ReadOnlyNetworkGraph_free(long this_obj);
+       // void NetworkUpdate_free(struct LDKNetworkUpdate this_ptr);
+       public static native void NetworkUpdate_free(long this_ptr);
+       // struct LDKNetworkUpdate NetworkUpdate_clone(const struct LDKNetworkUpdate *NONNULL_PTR orig);
+       public static native long NetworkUpdate_clone(long orig);
+       // struct LDKNetworkUpdate NetworkUpdate_channel_update_message(struct LDKChannelUpdate msg);
+       public static native long NetworkUpdate_channel_update_message(long msg);
+       // struct LDKNetworkUpdate NetworkUpdate_channel_closed(uint64_t short_channel_id, bool is_permanent);
+       public static native long NetworkUpdate_channel_closed(long short_channel_id, boolean is_permanent);
+       // struct LDKNetworkUpdate NetworkUpdate_node_failure(struct LDKPublicKey node_id, bool is_permanent);
+       public static native long NetworkUpdate_node_failure(byte[] node_id, boolean is_permanent);
+       // struct LDKCVec_u8Z NetworkUpdate_write(const struct LDKNetworkUpdate *NONNULL_PTR obj);
+       public static native byte[] NetworkUpdate_write(long obj);
+       // struct LDKEventHandler NetGraphMsgHandler_as_EventHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
+       public static native long NetGraphMsgHandler_as_EventHandler(long this_arg);
        // void NetGraphMsgHandler_free(struct LDKNetGraphMsgHandler this_obj);
        public static native void NetGraphMsgHandler_free(long this_obj);
-       // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_new(struct LDKThirtyTwoBytes genesis_hash, struct LDKAccess *chain_access, struct LDKLogger logger);
-       public static native long NetGraphMsgHandler_new(byte[] genesis_hash, long chain_access, long logger);
-       // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_from_net_graph(struct LDKAccess *chain_access, struct LDKLogger logger, struct LDKNetworkGraph network_graph);
-       public static native long NetGraphMsgHandler_from_net_graph(long chain_access, long logger, long network_graph);
-       // void NetGraphMsgHandler_add_chain_access(struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg, struct LDKAccess *chain_access);
+       // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_new(const struct LDKNetworkGraph *NONNULL_PTR network_graph, struct LDKCOption_AccessZ chain_access, struct LDKLogger logger);
+       public static native long NetGraphMsgHandler_new(long network_graph, long chain_access, long logger);
+       // void NetGraphMsgHandler_add_chain_access(struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg, struct LDKCOption_AccessZ chain_access);
        public static native void NetGraphMsgHandler_add_chain_access(long this_arg, long chain_access);
-       // MUST_USE_RES struct LDKLockedNetworkGraph NetGraphMsgHandler_read_locked_graph(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
-       public static native long NetGraphMsgHandler_read_locked_graph(long this_arg);
-       // MUST_USE_RES struct LDKNetworkGraph LockedNetworkGraph_graph(const struct LDKLockedNetworkGraph *NONNULL_PTR this_arg);
-       public static native long LockedNetworkGraph_graph(long this_arg);
        // struct LDKRoutingMessageHandler NetGraphMsgHandler_as_RoutingMessageHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
        public static native long NetGraphMsgHandler_as_RoutingMessageHandler(long this_arg);
        // struct LDKMessageSendEventsProvider NetGraphMsgHandler_as_MessageSendEventsProvider(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
@@ -4085,18 +4890,18 @@ public class bindings {
        public static native long ChannelInfo_get_features(long this_ptr);
        // void ChannelInfo_set_features(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
        public static native void ChannelInfo_set_features(long this_ptr, long val);
-       // struct LDKPublicKey ChannelInfo_get_node_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
-       public static native byte[] ChannelInfo_get_node_one(long this_ptr);
-       // void ChannelInfo_set_node_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKPublicKey val);
-       public static native void ChannelInfo_set_node_one(long this_ptr, byte[] val);
+       // struct LDKNodeId ChannelInfo_get_node_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
+       public static native long ChannelInfo_get_node_one(long this_ptr);
+       // void ChannelInfo_set_node_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKNodeId val);
+       public static native void ChannelInfo_set_node_one(long this_ptr, long val);
        // struct LDKDirectionalChannelInfo ChannelInfo_get_one_to_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
        public static native long ChannelInfo_get_one_to_two(long this_ptr);
        // void ChannelInfo_set_one_to_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
        public static native void ChannelInfo_set_one_to_two(long this_ptr, long val);
-       // struct LDKPublicKey ChannelInfo_get_node_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
-       public static native byte[] ChannelInfo_get_node_two(long this_ptr);
-       // void ChannelInfo_set_node_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKPublicKey val);
-       public static native void ChannelInfo_set_node_two(long this_ptr, byte[] val);
+       // struct LDKNodeId ChannelInfo_get_node_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
+       public static native long ChannelInfo_get_node_two(long this_ptr);
+       // void ChannelInfo_set_node_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKNodeId val);
+       public static native void ChannelInfo_set_node_two(long this_ptr, long val);
        // struct LDKDirectionalChannelInfo ChannelInfo_get_two_to_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
        public static native long ChannelInfo_get_two_to_one(long this_ptr);
        // void ChannelInfo_set_two_to_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
@@ -4109,8 +4914,8 @@ public class bindings {
        public static native long ChannelInfo_get_announcement_message(long this_ptr);
        // void ChannelInfo_set_announcement_message(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelAnnouncement val);
        public static native void ChannelInfo_set_announcement_message(long this_ptr, long val);
-       // MUST_USE_RES struct LDKChannelInfo ChannelInfo_new(struct LDKChannelFeatures features_arg, struct LDKPublicKey node_one_arg, struct LDKDirectionalChannelInfo one_to_two_arg, struct LDKPublicKey node_two_arg, struct LDKDirectionalChannelInfo two_to_one_arg, struct LDKCOption_u64Z capacity_sats_arg, struct LDKChannelAnnouncement announcement_message_arg);
-       public static native long ChannelInfo_new(long features_arg, byte[] node_one_arg, long one_to_two_arg, byte[] node_two_arg, long two_to_one_arg, long capacity_sats_arg, long announcement_message_arg);
+       // MUST_USE_RES struct LDKChannelInfo ChannelInfo_new(struct LDKChannelFeatures features_arg, struct LDKNodeId node_one_arg, struct LDKDirectionalChannelInfo one_to_two_arg, struct LDKNodeId node_two_arg, struct LDKDirectionalChannelInfo two_to_one_arg, struct LDKCOption_u64Z capacity_sats_arg, struct LDKChannelAnnouncement announcement_message_arg);
+       public static native long ChannelInfo_new(long features_arg, long node_one_arg, long one_to_two_arg, long node_two_arg, long two_to_one_arg, long capacity_sats_arg, long announcement_message_arg);
        // struct LDKChannelInfo ChannelInfo_clone(const struct LDKChannelInfo *NONNULL_PTR orig);
        public static native long ChannelInfo_clone(long orig);
        // struct LDKCVec_u8Z ChannelInfo_write(const struct LDKChannelInfo *NONNULL_PTR obj);
@@ -4133,6 +4938,8 @@ public class bindings {
        public static native boolean RoutingFees_eq(long a, long b);
        // struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig);
        public static native long RoutingFees_clone(long orig);
+       // uint64_t RoutingFees_hash(const struct LDKRoutingFees *NONNULL_PTR o);
+       public static native long RoutingFees_hash(long o);
        // struct LDKCVec_u8Z RoutingFees_write(const struct LDKRoutingFees *NONNULL_PTR obj);
        public static native byte[] RoutingFees_write(long obj);
        // struct LDKCResult_RoutingFeesDecodeErrorZ RoutingFees_read(struct LDKu8slice ser);
@@ -4195,20 +5002,238 @@ public class bindings {
        public static native long NetworkGraph_read(byte[] ser);
        // MUST_USE_RES struct LDKNetworkGraph NetworkGraph_new(struct LDKThirtyTwoBytes genesis_hash);
        public static native long NetworkGraph_new(byte[] genesis_hash);
-       // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg);
+       // MUST_USE_RES struct LDKReadOnlyNetworkGraph NetworkGraph_read_only(const struct LDKNetworkGraph *NONNULL_PTR this_arg);
+       public static native long NetworkGraph_read_only(long this_arg);
+       // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg);
        public static native long NetworkGraph_update_node_from_announcement(long this_arg, long msg);
-       // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_unsigned_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR msg);
+       // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_unsigned_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR msg);
        public static native long NetworkGraph_update_node_from_unsigned_announcement(long this_arg, long msg);
-       // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_from_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg, struct LDKAccess *chain_access);
+       // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_from_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg, struct LDKCOption_AccessZ chain_access);
        public static native long NetworkGraph_update_channel_from_announcement(long this_arg, long msg, long chain_access);
-       // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_from_unsigned_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg, struct LDKAccess *chain_access);
+       // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_from_unsigned_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg, struct LDKCOption_AccessZ chain_access);
        public static native long NetworkGraph_update_channel_from_unsigned_announcement(long this_arg, long msg, long chain_access);
-       // void NetworkGraph_close_channel_from_update(struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id, bool is_permanent);
+       // void NetworkGraph_close_channel_from_update(const struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id, bool is_permanent);
        public static native void NetworkGraph_close_channel_from_update(long this_arg, long short_channel_id, boolean is_permanent);
-       // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg);
+       // void NetworkGraph_fail_node(const struct LDKNetworkGraph *NONNULL_PTR this_arg, struct LDKPublicKey _node_id, bool is_permanent);
+       public static native void NetworkGraph_fail_node(long this_arg, byte[] _node_id, boolean is_permanent);
+       // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg);
        public static native long NetworkGraph_update_channel(long this_arg, long msg);
-       // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_unsigned(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelUpdate *NONNULL_PTR msg);
+       // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_unsigned(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelUpdate *NONNULL_PTR msg);
        public static native long NetworkGraph_update_channel_unsigned(long this_arg, long msg);
+       // MUST_USE_RES struct LDKCOption_CVec_NetAddressZZ ReadOnlyNetworkGraph_get_addresses(const struct LDKReadOnlyNetworkGraph *NONNULL_PTR this_arg, struct LDKPublicKey pubkey);
+       public static native long ReadOnlyNetworkGraph_get_addresses(long this_arg, byte[] pubkey);
+       // 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);
+       public static native byte[] RouteHop_get_pubkey(long this_ptr);
+       // void RouteHop_set_pubkey(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+       public static native void RouteHop_set_pubkey(long this_ptr, byte[] val);
+       // struct LDKNodeFeatures RouteHop_get_node_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
+       public static native long RouteHop_get_node_features(long this_ptr);
+       // void RouteHop_set_node_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
+       public static native void RouteHop_set_node_features(long this_ptr, long val);
+       // uint64_t RouteHop_get_short_channel_id(const struct LDKRouteHop *NONNULL_PTR this_ptr);
+       public static native long RouteHop_get_short_channel_id(long this_ptr);
+       // void RouteHop_set_short_channel_id(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
+       public static native void RouteHop_set_short_channel_id(long this_ptr, long val);
+       // struct LDKChannelFeatures RouteHop_get_channel_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
+       public static native long RouteHop_get_channel_features(long this_ptr);
+       // void RouteHop_set_channel_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
+       public static native void RouteHop_set_channel_features(long this_ptr, long val);
+       // uint64_t RouteHop_get_fee_msat(const struct LDKRouteHop *NONNULL_PTR this_ptr);
+       public static native long RouteHop_get_fee_msat(long this_ptr);
+       // void RouteHop_set_fee_msat(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
+       public static native void RouteHop_set_fee_msat(long this_ptr, long val);
+       // uint32_t RouteHop_get_cltv_expiry_delta(const struct LDKRouteHop *NONNULL_PTR this_ptr);
+       public static native int RouteHop_get_cltv_expiry_delta(long this_ptr);
+       // void RouteHop_set_cltv_expiry_delta(struct LDKRouteHop *NONNULL_PTR this_ptr, uint32_t val);
+       public static native void RouteHop_set_cltv_expiry_delta(long this_ptr, int val);
+       // MUST_USE_RES struct LDKRouteHop RouteHop_new(struct LDKPublicKey pubkey_arg, struct LDKNodeFeatures node_features_arg, uint64_t short_channel_id_arg, struct LDKChannelFeatures channel_features_arg, uint64_t fee_msat_arg, uint32_t cltv_expiry_delta_arg);
+       public static native long RouteHop_new(byte[] pubkey_arg, long node_features_arg, long short_channel_id_arg, long channel_features_arg, long fee_msat_arg, int cltv_expiry_delta_arg);
+       // struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig);
+       public static native long RouteHop_clone(long orig);
+       // uint64_t RouteHop_hash(const struct LDKRouteHop *NONNULL_PTR o);
+       public static native long RouteHop_hash(long o);
+       // bool RouteHop_eq(const struct LDKRouteHop *NONNULL_PTR a, const struct LDKRouteHop *NONNULL_PTR b);
+       public static native boolean RouteHop_eq(long a, long b);
+       // struct LDKCVec_u8Z RouteHop_write(const struct LDKRouteHop *NONNULL_PTR obj);
+       public static native byte[] RouteHop_write(long obj);
+       // struct LDKCResult_RouteHopDecodeErrorZ RouteHop_read(struct LDKu8slice ser);
+       public static native long RouteHop_read(byte[] ser);
+       // void Route_free(struct LDKRoute this_obj);
+       public static native void Route_free(long this_obj);
+       // struct LDKCVec_CVec_RouteHopZZ Route_get_paths(const struct LDKRoute *NONNULL_PTR this_ptr);
+       public static native long[][] Route_get_paths(long this_ptr);
+       // void Route_set_paths(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKCVec_CVec_RouteHopZZ val);
+       public static native void Route_set_paths(long this_ptr, long[][] val);
+       // struct LDKPayee Route_get_payee(const struct LDKRoute *NONNULL_PTR this_ptr);
+       public static native long Route_get_payee(long this_ptr);
+       // void Route_set_payee(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKPayee val);
+       public static native void Route_set_payee(long this_ptr, long val);
+       // MUST_USE_RES struct LDKRoute Route_new(struct LDKCVec_CVec_RouteHopZZ paths_arg, struct LDKPayee payee_arg);
+       public static native long Route_new(long[][] paths_arg, long payee_arg);
+       // struct LDKRoute Route_clone(const struct LDKRoute *NONNULL_PTR orig);
+       public static native long Route_clone(long orig);
+       // uint64_t Route_hash(const struct LDKRoute *NONNULL_PTR o);
+       public static native long Route_hash(long o);
+       // bool Route_eq(const struct LDKRoute *NONNULL_PTR a, const struct LDKRoute *NONNULL_PTR b);
+       public static native boolean Route_eq(long a, long b);
+       // MUST_USE_RES uint64_t Route_get_total_fees(const struct LDKRoute *NONNULL_PTR this_arg);
+       public static native long Route_get_total_fees(long this_arg);
+       // MUST_USE_RES uint64_t Route_get_total_amount(const struct LDKRoute *NONNULL_PTR this_arg);
+       public static native long Route_get_total_amount(long this_arg);
+       // struct LDKCVec_u8Z Route_write(const struct LDKRoute *NONNULL_PTR obj);
+       public static native byte[] Route_write(long obj);
+       // struct LDKCResult_RouteDecodeErrorZ Route_read(struct LDKu8slice ser);
+       public static native long Route_read(byte[] ser);
+       // void RouteParameters_free(struct LDKRouteParameters this_obj);
+       public static native void RouteParameters_free(long this_obj);
+       // struct LDKPayee RouteParameters_get_payee(const struct LDKRouteParameters *NONNULL_PTR this_ptr);
+       public static native long RouteParameters_get_payee(long this_ptr);
+       // void RouteParameters_set_payee(struct LDKRouteParameters *NONNULL_PTR this_ptr, struct LDKPayee val);
+       public static native void RouteParameters_set_payee(long this_ptr, long val);
+       // uint64_t RouteParameters_get_final_value_msat(const struct LDKRouteParameters *NONNULL_PTR this_ptr);
+       public static native long RouteParameters_get_final_value_msat(long this_ptr);
+       // void RouteParameters_set_final_value_msat(struct LDKRouteParameters *NONNULL_PTR this_ptr, uint64_t val);
+       public static native void RouteParameters_set_final_value_msat(long this_ptr, long val);
+       // uint32_t RouteParameters_get_final_cltv_expiry_delta(const struct LDKRouteParameters *NONNULL_PTR this_ptr);
+       public static native int RouteParameters_get_final_cltv_expiry_delta(long this_ptr);
+       // void RouteParameters_set_final_cltv_expiry_delta(struct LDKRouteParameters *NONNULL_PTR this_ptr, uint32_t val);
+       public static native void RouteParameters_set_final_cltv_expiry_delta(long this_ptr, int val);
+       // MUST_USE_RES struct LDKRouteParameters RouteParameters_new(struct LDKPayee payee_arg, uint64_t final_value_msat_arg, uint32_t final_cltv_expiry_delta_arg);
+       public static native long RouteParameters_new(long payee_arg, long final_value_msat_arg, int final_cltv_expiry_delta_arg);
+       // struct LDKRouteParameters RouteParameters_clone(const struct LDKRouteParameters *NONNULL_PTR orig);
+       public static native long RouteParameters_clone(long orig);
+       // struct LDKCVec_u8Z RouteParameters_write(const struct LDKRouteParameters *NONNULL_PTR obj);
+       public static native byte[] RouteParameters_write(long obj);
+       // struct LDKCResult_RouteParametersDecodeErrorZ RouteParameters_read(struct LDKu8slice ser);
+       public static native long RouteParameters_read(byte[] ser);
+       // void Payee_free(struct LDKPayee this_obj);
+       public static native void Payee_free(long this_obj);
+       // struct LDKPublicKey Payee_get_pubkey(const struct LDKPayee *NONNULL_PTR this_ptr);
+       public static native byte[] Payee_get_pubkey(long this_ptr);
+       // void Payee_set_pubkey(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+       public static native void Payee_set_pubkey(long this_ptr, byte[] val);
+       // struct LDKInvoiceFeatures Payee_get_features(const struct LDKPayee *NONNULL_PTR this_ptr);
+       public static native long Payee_get_features(long this_ptr);
+       // void Payee_set_features(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKInvoiceFeatures val);
+       public static native void Payee_set_features(long this_ptr, long val);
+       // struct LDKCVec_RouteHintZ Payee_get_route_hints(const struct LDKPayee *NONNULL_PTR this_ptr);
+       public static native long[] Payee_get_route_hints(long this_ptr);
+       // void Payee_set_route_hints(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKCVec_RouteHintZ val);
+       public static native void Payee_set_route_hints(long this_ptr, long[] val);
+       // struct LDKCOption_u64Z Payee_get_expiry_time(const struct LDKPayee *NONNULL_PTR this_ptr);
+       public static native long Payee_get_expiry_time(long this_ptr);
+       // void Payee_set_expiry_time(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+       public static native void Payee_set_expiry_time(long this_ptr, long val);
+       // MUST_USE_RES struct LDKPayee Payee_new(struct LDKPublicKey pubkey_arg, struct LDKInvoiceFeatures features_arg, struct LDKCVec_RouteHintZ route_hints_arg, struct LDKCOption_u64Z expiry_time_arg);
+       public static native long Payee_new(byte[] pubkey_arg, long features_arg, long[] route_hints_arg, long expiry_time_arg);
+       // struct LDKPayee Payee_clone(const struct LDKPayee *NONNULL_PTR orig);
+       public static native long Payee_clone(long orig);
+       // uint64_t Payee_hash(const struct LDKPayee *NONNULL_PTR o);
+       public static native long Payee_hash(long o);
+       // bool Payee_eq(const struct LDKPayee *NONNULL_PTR a, const struct LDKPayee *NONNULL_PTR b);
+       public static native boolean Payee_eq(long a, long b);
+       // struct LDKCVec_u8Z Payee_write(const struct LDKPayee *NONNULL_PTR obj);
+       public static native byte[] Payee_write(long obj);
+       // struct LDKCResult_PayeeDecodeErrorZ Payee_read(struct LDKu8slice ser);
+       public static native long Payee_read(byte[] ser);
+       // MUST_USE_RES struct LDKPayee Payee_from_node_id(struct LDKPublicKey pubkey);
+       public static native long Payee_from_node_id(byte[] pubkey);
+       // MUST_USE_RES struct LDKPayee Payee_for_keysend(struct LDKPublicKey pubkey);
+       public static native long Payee_for_keysend(byte[] pubkey);
+       // void RouteHint_free(struct LDKRouteHint this_obj);
+       public static native void RouteHint_free(long this_obj);
+       // struct LDKCVec_RouteHintHopZ RouteHint_get_a(const struct LDKRouteHint *NONNULL_PTR this_ptr);
+       public static native long[] RouteHint_get_a(long this_ptr);
+       // void RouteHint_set_a(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKCVec_RouteHintHopZ val);
+       public static native void RouteHint_set_a(long this_ptr, long[] val);
+       // MUST_USE_RES struct LDKRouteHint RouteHint_new(struct LDKCVec_RouteHintHopZ a_arg);
+       public static native long RouteHint_new(long[] a_arg);
+       // struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
+       public static native long RouteHint_clone(long orig);
+       // uint64_t RouteHint_hash(const struct LDKRouteHint *NONNULL_PTR o);
+       public static native long RouteHint_hash(long o);
+       // bool RouteHint_eq(const struct LDKRouteHint *NONNULL_PTR a, const struct LDKRouteHint *NONNULL_PTR b);
+       public static native boolean RouteHint_eq(long a, long b);
+       // struct LDKCVec_u8Z RouteHint_write(const struct LDKRouteHint *NONNULL_PTR obj);
+       public static native byte[] RouteHint_write(long obj);
+       // struct LDKCResult_RouteHintDecodeErrorZ RouteHint_read(struct LDKu8slice ser);
+       public static native long RouteHint_read(byte[] ser);
+       // void RouteHintHop_free(struct LDKRouteHintHop this_obj);
+       public static native void RouteHintHop_free(long this_obj);
+       // struct LDKPublicKey RouteHintHop_get_src_node_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
+       public static native byte[] RouteHintHop_get_src_node_id(long this_ptr);
+       // void RouteHintHop_set_src_node_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+       public static native void RouteHintHop_set_src_node_id(long this_ptr, byte[] val);
+       // uint64_t RouteHintHop_get_short_channel_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
+       public static native long RouteHintHop_get_short_channel_id(long this_ptr);
+       // void RouteHintHop_set_short_channel_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint64_t val);
+       public static native void RouteHintHop_set_short_channel_id(long this_ptr, long val);
+       // struct LDKRoutingFees RouteHintHop_get_fees(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
+       public static native long RouteHintHop_get_fees(long this_ptr);
+       // void RouteHintHop_set_fees(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
+       public static native void RouteHintHop_set_fees(long this_ptr, long val);
+       // uint16_t RouteHintHop_get_cltv_expiry_delta(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
+       public static native short RouteHintHop_get_cltv_expiry_delta(long this_ptr);
+       // void RouteHintHop_set_cltv_expiry_delta(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint16_t val);
+       public static native void RouteHintHop_set_cltv_expiry_delta(long this_ptr, short val);
+       // struct LDKCOption_u64Z RouteHintHop_get_htlc_minimum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
+       public static native long RouteHintHop_get_htlc_minimum_msat(long this_ptr);
+       // void RouteHintHop_set_htlc_minimum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+       public static native void RouteHintHop_set_htlc_minimum_msat(long this_ptr, long val);
+       // struct LDKCOption_u64Z RouteHintHop_get_htlc_maximum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
+       public static native long RouteHintHop_get_htlc_maximum_msat(long this_ptr);
+       // void RouteHintHop_set_htlc_maximum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+       public static native void RouteHintHop_set_htlc_maximum_msat(long this_ptr, long val);
+       // MUST_USE_RES struct LDKRouteHintHop RouteHintHop_new(struct LDKPublicKey src_node_id_arg, uint64_t short_channel_id_arg, struct LDKRoutingFees fees_arg, uint16_t cltv_expiry_delta_arg, struct LDKCOption_u64Z htlc_minimum_msat_arg, struct LDKCOption_u64Z htlc_maximum_msat_arg);
+       public static native long RouteHintHop_new(byte[] src_node_id_arg, long short_channel_id_arg, long fees_arg, short cltv_expiry_delta_arg, long htlc_minimum_msat_arg, long htlc_maximum_msat_arg);
+       // struct LDKRouteHintHop RouteHintHop_clone(const struct LDKRouteHintHop *NONNULL_PTR orig);
+       public static native long RouteHintHop_clone(long orig);
+       // uint64_t RouteHintHop_hash(const struct LDKRouteHintHop *NONNULL_PTR o);
+       public static native long RouteHintHop_hash(long o);
+       // bool RouteHintHop_eq(const struct LDKRouteHintHop *NONNULL_PTR a, const struct LDKRouteHintHop *NONNULL_PTR b);
+       public static native boolean RouteHintHop_eq(long a, long b);
+       // struct LDKCVec_u8Z RouteHintHop_write(const struct LDKRouteHintHop *NONNULL_PTR obj);
+       public static native byte[] RouteHintHop_write(long obj);
+       // struct LDKCResult_RouteHintHopDecodeErrorZ RouteHintHop_read(struct LDKu8slice ser);
+       public static native long RouteHintHop_read(byte[] ser);
+       // struct LDKCResult_RouteLightningErrorZ find_route(struct LDKPublicKey our_node_pubkey, const struct LDKRouteParameters *NONNULL_PTR params, const struct LDKNetworkGraph *NONNULL_PTR network, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKLogger logger, const struct LDKScore *NONNULL_PTR scorer);
+       public static native long find_route(byte[] our_node_pubkey, long params, long network, long[] first_hops, long logger, long scorer);
+       // void Scorer_free(struct LDKScorer this_obj);
+       public static native void Scorer_free(long this_obj);
+       // void ScoringParameters_free(struct LDKScoringParameters this_obj);
+       public static native void ScoringParameters_free(long this_obj);
+       // uint64_t ScoringParameters_get_base_penalty_msat(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
+       public static native long ScoringParameters_get_base_penalty_msat(long this_ptr);
+       // void ScoringParameters_set_base_penalty_msat(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
+       public static native void ScoringParameters_set_base_penalty_msat(long this_ptr, long val);
+       // uint64_t ScoringParameters_get_failure_penalty_msat(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
+       public static native long ScoringParameters_get_failure_penalty_msat(long this_ptr);
+       // void ScoringParameters_set_failure_penalty_msat(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
+       public static native void ScoringParameters_set_failure_penalty_msat(long this_ptr, long val);
+       // uint64_t ScoringParameters_get_failure_penalty_half_life(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
+       public static native long ScoringParameters_get_failure_penalty_half_life(long this_ptr);
+       // void ScoringParameters_set_failure_penalty_half_life(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
+       public static native void ScoringParameters_set_failure_penalty_half_life(long this_ptr, long val);
+       // MUST_USE_RES struct LDKScoringParameters ScoringParameters_new(uint64_t base_penalty_msat_arg, uint64_t failure_penalty_msat_arg, uint64_t failure_penalty_half_life_arg);
+       public static native long ScoringParameters_new(long base_penalty_msat_arg, long failure_penalty_msat_arg, long failure_penalty_half_life_arg);
+       // struct LDKCVec_u8Z ScoringParameters_write(const struct LDKScoringParameters *NONNULL_PTR obj);
+       public static native byte[] ScoringParameters_write(long obj);
+       // struct LDKCResult_ScoringParametersDecodeErrorZ ScoringParameters_read(struct LDKu8slice ser);
+       public static native long ScoringParameters_read(byte[] ser);
+       // MUST_USE_RES struct LDKScorer Scorer_new(struct LDKScoringParameters params);
+       public static native long Scorer_new(long params);
+       // MUST_USE_RES struct LDKScorer Scorer_default(void);
+       public static native long Scorer_default();
+       // MUST_USE_RES struct LDKScoringParameters ScoringParameters_default(void);
+       public static native long ScoringParameters_default();
+       // struct LDKScore Scorer_as_Score(const struct LDKScorer *NONNULL_PTR this_arg);
+       public static native long Scorer_as_Score(long this_arg);
+       // struct LDKCVec_u8Z Scorer_write(const struct LDKScorer *NONNULL_PTR obj);
+       public static native byte[] Scorer_write(long obj);
+       // struct LDKCResult_ScorerDecodeErrorZ Scorer_read(struct LDKu8slice ser);
+       public static native long Scorer_read(byte[] ser);
        // void FilesystemPersister_free(struct LDKFilesystemPersister this_obj);
        public static native void FilesystemPersister_free(long this_obj);
        // MUST_USE_RES struct LDKFilesystemPersister FilesystemPersister_new(struct LDKStr path_to_channel_data);
@@ -4225,8 +5250,10 @@ public class bindings {
        public static native void BackgroundProcessor_free(long this_obj);
        // void ChannelManagerPersister_free(struct LDKChannelManagerPersister this_ptr);
        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 LDKBackgroundProcessor BackgroundProcessor_start(struct LDKChannelManagerPersister persister, struct LDKEventHandler event_handler, const struct LDKChainMonitor *NONNULL_PTR chain_monitor, const struct LDKChannelManager *NONNULL_PTR channel_manager, struct LDKNetGraphMsgHandler net_graph_msg_handler, 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 net_graph_msg_handler, 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);
@@ -4271,62 +5298,114 @@ 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();
+       // uint64_t Currency_hash(const enum LDKCurrency *NONNULL_PTR o);
+       public static native long Currency_hash(long o);
        // 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);
        public static native void Sha256_free(long this_obj);
-       // bool Sha256_eq(const struct LDKSha256 *NONNULL_PTR a, const struct LDKSha256 *NONNULL_PTR b);
-       public static native boolean Sha256_eq(long a, long b);
        // struct LDKSha256 Sha256_clone(const struct LDKSha256 *NONNULL_PTR orig);
        public static native long Sha256_clone(long orig);
+       // uint64_t Sha256_hash(const struct LDKSha256 *NONNULL_PTR o);
+       public static native long Sha256_hash(long o);
+       // bool Sha256_eq(const struct LDKSha256 *NONNULL_PTR a, const struct LDKSha256 *NONNULL_PTR b);
+       public static native boolean Sha256_eq(long a, long b);
        // void Description_free(struct LDKDescription this_obj);
        public static native void Description_free(long this_obj);
-       // bool Description_eq(const struct LDKDescription *NONNULL_PTR a, const struct LDKDescription *NONNULL_PTR b);
-       public static native boolean Description_eq(long a, long b);
        // struct LDKDescription Description_clone(const struct LDKDescription *NONNULL_PTR orig);
        public static native long Description_clone(long orig);
+       // uint64_t Description_hash(const struct LDKDescription *NONNULL_PTR o);
+       public static native long Description_hash(long o);
+       // bool Description_eq(const struct LDKDescription *NONNULL_PTR a, const struct LDKDescription *NONNULL_PTR b);
+       public static native boolean Description_eq(long a, long b);
        // void PayeePubKey_free(struct LDKPayeePubKey this_obj);
        public static native void PayeePubKey_free(long this_obj);
-       // bool PayeePubKey_eq(const struct LDKPayeePubKey *NONNULL_PTR a, const struct LDKPayeePubKey *NONNULL_PTR b);
-       public static native boolean PayeePubKey_eq(long a, long b);
+       // struct LDKPublicKey PayeePubKey_get_a(const struct LDKPayeePubKey *NONNULL_PTR this_ptr);
+       public static native byte[] PayeePubKey_get_a(long this_ptr);
+       // void PayeePubKey_set_a(struct LDKPayeePubKey *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+       public static native void PayeePubKey_set_a(long this_ptr, byte[] val);
+       // MUST_USE_RES struct LDKPayeePubKey PayeePubKey_new(struct LDKPublicKey a_arg);
+       public static native long PayeePubKey_new(byte[] a_arg);
        // struct LDKPayeePubKey PayeePubKey_clone(const struct LDKPayeePubKey *NONNULL_PTR orig);
        public static native long PayeePubKey_clone(long orig);
+       // uint64_t PayeePubKey_hash(const struct LDKPayeePubKey *NONNULL_PTR o);
+       public static native long PayeePubKey_hash(long o);
+       // bool PayeePubKey_eq(const struct LDKPayeePubKey *NONNULL_PTR a, const struct LDKPayeePubKey *NONNULL_PTR b);
+       public static native boolean PayeePubKey_eq(long a, long b);
        // void ExpiryTime_free(struct LDKExpiryTime this_obj);
        public static native void ExpiryTime_free(long this_obj);
-       // bool ExpiryTime_eq(const struct LDKExpiryTime *NONNULL_PTR a, const struct LDKExpiryTime *NONNULL_PTR b);
-       public static native boolean ExpiryTime_eq(long a, long b);
        // struct LDKExpiryTime ExpiryTime_clone(const struct LDKExpiryTime *NONNULL_PTR orig);
        public static native long ExpiryTime_clone(long orig);
+       // uint64_t ExpiryTime_hash(const struct LDKExpiryTime *NONNULL_PTR o);
+       public static native long ExpiryTime_hash(long o);
+       // bool ExpiryTime_eq(const struct LDKExpiryTime *NONNULL_PTR a, const struct LDKExpiryTime *NONNULL_PTR b);
+       public static native boolean ExpiryTime_eq(long a, long b);
        // void MinFinalCltvExpiry_free(struct LDKMinFinalCltvExpiry this_obj);
        public static native void MinFinalCltvExpiry_free(long this_obj);
-       // bool MinFinalCltvExpiry_eq(const struct LDKMinFinalCltvExpiry *NONNULL_PTR a, const struct LDKMinFinalCltvExpiry *NONNULL_PTR b);
-       public static native boolean MinFinalCltvExpiry_eq(long a, long b);
+       // uint64_t MinFinalCltvExpiry_get_a(const struct LDKMinFinalCltvExpiry *NONNULL_PTR this_ptr);
+       public static native long MinFinalCltvExpiry_get_a(long this_ptr);
+       // void MinFinalCltvExpiry_set_a(struct LDKMinFinalCltvExpiry *NONNULL_PTR this_ptr, uint64_t val);
+       public static native void MinFinalCltvExpiry_set_a(long this_ptr, long val);
+       // MUST_USE_RES struct LDKMinFinalCltvExpiry MinFinalCltvExpiry_new(uint64_t a_arg);
+       public static native long MinFinalCltvExpiry_new(long a_arg);
        // struct LDKMinFinalCltvExpiry MinFinalCltvExpiry_clone(const struct LDKMinFinalCltvExpiry *NONNULL_PTR orig);
        public static native long MinFinalCltvExpiry_clone(long orig);
+       // uint64_t MinFinalCltvExpiry_hash(const struct LDKMinFinalCltvExpiry *NONNULL_PTR o);
+       public static native long MinFinalCltvExpiry_hash(long o);
+       // bool MinFinalCltvExpiry_eq(const struct LDKMinFinalCltvExpiry *NONNULL_PTR a, const struct LDKMinFinalCltvExpiry *NONNULL_PTR b);
+       public static native boolean MinFinalCltvExpiry_eq(long a, long b);
        // void Fallback_free(struct LDKFallback this_ptr);
        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);
+       // uint64_t Fallback_hash(const struct LDKFallback *NONNULL_PTR o);
+       public static native long Fallback_hash(long o);
        // 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);
        public static native void InvoiceSignature_free(long this_obj);
-       // bool InvoiceSignature_eq(const struct LDKInvoiceSignature *NONNULL_PTR a, const struct LDKInvoiceSignature *NONNULL_PTR b);
-       public static native boolean InvoiceSignature_eq(long a, long b);
        // struct LDKInvoiceSignature InvoiceSignature_clone(const struct LDKInvoiceSignature *NONNULL_PTR orig);
        public static native long InvoiceSignature_clone(long orig);
+       // bool InvoiceSignature_eq(const struct LDKInvoiceSignature *NONNULL_PTR a, const struct LDKInvoiceSignature *NONNULL_PTR b);
+       public static native boolean InvoiceSignature_eq(long a, long b);
        // void PrivateRoute_free(struct LDKPrivateRoute this_obj);
        public static native void PrivateRoute_free(long this_obj);
-       // bool PrivateRoute_eq(const struct LDKPrivateRoute *NONNULL_PTR a, const struct LDKPrivateRoute *NONNULL_PTR b);
-       public static native boolean PrivateRoute_eq(long a, long b);
        // struct LDKPrivateRoute PrivateRoute_clone(const struct LDKPrivateRoute *NONNULL_PTR orig);
        public static native long PrivateRoute_clone(long orig);
+       // uint64_t PrivateRoute_hash(const struct LDKPrivateRoute *NONNULL_PTR o);
+       public static native long PrivateRoute_hash(long o);
+       // bool PrivateRoute_eq(const struct LDKPrivateRoute *NONNULL_PTR a, const struct LDKPrivateRoute *NONNULL_PTR b);
+       public static native boolean PrivateRoute_eq(long a, long b);
        // MUST_USE_RES struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ SignedRawInvoice_into_parts(struct LDKSignedRawInvoice this_arg);
        public static native long SignedRawInvoice_into_parts(long this_arg);
        // MUST_USE_RES struct LDKRawInvoice SignedRawInvoice_raw_invoice(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
@@ -4383,7 +5462,7 @@ public class bindings {
        public static native byte[] Invoice_payment_hash(long this_arg);
        // MUST_USE_RES struct LDKPublicKey Invoice_payee_pub_key(const struct LDKInvoice *NONNULL_PTR this_arg);
        public static native byte[] Invoice_payee_pub_key(long this_arg);
-       // MUST_USE_RES struct LDKThirtyTwoBytes Invoice_payment_secret(const struct LDKInvoice *NONNULL_PTR this_arg);
+       // MUST_USE_RES const uint8_t (*Invoice_payment_secret(const struct LDKInvoice *NONNULL_PTR this_arg))[32];
        public static native byte[] Invoice_payment_secret(long this_arg);
        // MUST_USE_RES struct LDKInvoiceFeatures Invoice_features(const struct LDKInvoice *NONNULL_PTR this_arg);
        public static native long Invoice_features(long this_arg);
@@ -4391,6 +5470,8 @@ public class bindings {
        public static native byte[] Invoice_recover_payee_pub_key(long this_arg);
        // MUST_USE_RES uint64_t Invoice_expiry_time(const struct LDKInvoice *NONNULL_PTR this_arg);
        public static native long Invoice_expiry_time(long this_arg);
+       // MUST_USE_RES bool Invoice_is_expired(const struct LDKInvoice *NONNULL_PTR this_arg);
+       public static native boolean Invoice_is_expired(long this_arg);
        // MUST_USE_RES uint64_t Invoice_min_final_cltv_expiry(const struct LDKInvoice *NONNULL_PTR this_arg);
        public static native long Invoice_min_final_cltv_expiry(long this_arg);
        // MUST_USE_RES struct LDKCVec_PrivateRouteZ Invoice_private_routes(const struct LDKInvoice *NONNULL_PTR this_arg);
@@ -4399,8 +5480,8 @@ public class bindings {
        public static native long[] Invoice_route_hints(long this_arg);
        // MUST_USE_RES enum LDKCurrency Invoice_currency(const struct LDKInvoice *NONNULL_PTR this_arg);
        public static native Currency Invoice_currency(long this_arg);
-       // MUST_USE_RES struct LDKCOption_u64Z Invoice_amount_pico_btc(const struct LDKInvoice *NONNULL_PTR this_arg);
-       public static native long Invoice_amount_pico_btc(long this_arg);
+       // MUST_USE_RES struct LDKCOption_u64Z Invoice_amount_milli_satoshis(const struct LDKInvoice *NONNULL_PTR this_arg);
+       public static native long Invoice_amount_milli_satoshis(long this_arg);
        // MUST_USE_RES struct LDKCResult_DescriptionCreationErrorZ Description_new(struct LDKStr description);
        public static native long Description_new(String description);
        // MUST_USE_RES struct LDKStr Description_into_inner(struct LDKDescription this_arg);
@@ -4419,12 +5500,40 @@ 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_no_payment_secret(void);
+       public static native SemanticError SemanticError_no_payment_secret();
+       // 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();
+       // enum LDKSemanticError SemanticError_imprecise_amount(void);
+       public static native SemanticError SemanticError_imprecise_amount();
        // 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);
@@ -4433,12 +5542,64 @@ 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);
        public static native String SignOrCreationError_to_str(long o);
+       // void InvoicePayer_free(struct LDKInvoicePayer this_obj);
+       public static native void InvoicePayer_free(long this_obj);
+       // void Payer_free(struct LDKPayer this_ptr);
+       public static native void Payer_free(long this_ptr);
+       // void Router_free(struct LDKRouter this_ptr);
+       public static native void Router_free(long this_ptr);
+       // void RetryAttempts_free(struct LDKRetryAttempts this_obj);
+       public static native void RetryAttempts_free(long this_obj);
+       // uintptr_t RetryAttempts_get_a(const struct LDKRetryAttempts *NONNULL_PTR this_ptr);
+       public static native long RetryAttempts_get_a(long this_ptr);
+       // void RetryAttempts_set_a(struct LDKRetryAttempts *NONNULL_PTR this_ptr, uintptr_t val);
+       public static native void RetryAttempts_set_a(long this_ptr, long val);
+       // MUST_USE_RES struct LDKRetryAttempts RetryAttempts_new(uintptr_t a_arg);
+       public static native long RetryAttempts_new(long a_arg);
+       // struct LDKRetryAttempts RetryAttempts_clone(const struct LDKRetryAttempts *NONNULL_PTR orig);
+       public static native long RetryAttempts_clone(long orig);
+       // bool RetryAttempts_eq(const struct LDKRetryAttempts *NONNULL_PTR a, const struct LDKRetryAttempts *NONNULL_PTR b);
+       public static native boolean RetryAttempts_eq(long a, long b);
+       // uint64_t RetryAttempts_hash(const struct LDKRetryAttempts *NONNULL_PTR o);
+       public static native long RetryAttempts_hash(long o);
+       // void PaymentError_free(struct LDKPaymentError this_ptr);
+       public static native void PaymentError_free(long this_ptr);
+       // struct LDKPaymentError PaymentError_clone(const struct LDKPaymentError *NONNULL_PTR orig);
+       public static native long PaymentError_clone(long orig);
+       // struct LDKPaymentError PaymentError_invoice(struct LDKStr a);
+       public static native long PaymentError_invoice(String a);
+       // struct LDKPaymentError PaymentError_routing(struct LDKLightningError a);
+       public static native long PaymentError_routing(long a);
+       // struct LDKPaymentError PaymentError_sending(struct LDKPaymentSendFailure a);
+       public static native long PaymentError_sending(long a);
+       // MUST_USE_RES struct LDKInvoicePayer InvoicePayer_new(struct LDKPayer payer, struct LDKRouter router, const struct LDKLockableScore *NONNULL_PTR scorer, struct LDKLogger logger, struct LDKEventHandler event_handler, struct LDKRetryAttempts retry_attempts);
+       public static native long InvoicePayer_new(long payer, long router, long scorer, long logger, long event_handler, long retry_attempts);
+       // MUST_USE_RES struct LDKCResult_PaymentIdPaymentErrorZ InvoicePayer_pay_invoice(const struct LDKInvoicePayer *NONNULL_PTR this_arg, const struct LDKInvoice *NONNULL_PTR invoice);
+       public static native long InvoicePayer_pay_invoice(long this_arg, long invoice);
+       // MUST_USE_RES struct LDKCResult_PaymentIdPaymentErrorZ InvoicePayer_pay_zero_value_invoice(const struct LDKInvoicePayer *NONNULL_PTR this_arg, const struct LDKInvoice *NONNULL_PTR invoice, uint64_t amount_msats);
+       public static native long InvoicePayer_pay_zero_value_invoice(long this_arg, long invoice, long amount_msats);
+       // void InvoicePayer_remove_cached_payment(const struct LDKInvoicePayer *NONNULL_PTR this_arg, const uint8_t (*payment_hash)[32]);
+       public static native void InvoicePayer_remove_cached_payment(long this_arg, byte[] payment_hash);
+       // struct LDKEventHandler InvoicePayer_as_EventHandler(const struct LDKInvoicePayer *NONNULL_PTR this_arg);
+       public static native long InvoicePayer_as_EventHandler(long this_arg);
        // struct LDKCResult_InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager(const struct LDKChannelManager *NONNULL_PTR channelmanager, struct LDKKeysInterface keys_manager, enum LDKCurrency network, struct LDKCOption_u64Z amt_msat, struct LDKStr description);
        public static native long create_invoice_from_channelmanager(long channelmanager, long keys_manager, Currency network, long amt_msat, String description);
+       // void DefaultRouter_free(struct LDKDefaultRouter this_obj);
+       public static native void DefaultRouter_free(long this_obj);
+       // MUST_USE_RES struct LDKDefaultRouter DefaultRouter_new(const struct LDKNetworkGraph *NONNULL_PTR network_graph, struct LDKLogger logger);
+       public static native long DefaultRouter_new(long network_graph, long logger);
+       // struct LDKRouter DefaultRouter_as_Router(const struct LDKDefaultRouter *NONNULL_PTR this_arg);
+       public static native long DefaultRouter_as_Router(long this_arg);
+       // struct LDKPayer ChannelManager_as_Payer(const struct LDKChannelManager *NONNULL_PTR this_arg);
+       public static native long ChannelManager_as_Payer(long this_arg);
        // struct LDKCResult_SiPrefixNoneZ SiPrefix_from_str(struct LDKStr s);
        public static native long SiPrefix_from_str(String s);
        // struct LDKCResult_InvoiceNoneZ Invoice_from_str(struct LDKStr s);