Update auto-generated bindings with new upstream.
authorMatt Corallo <git@bluematt.me>
Fri, 12 Feb 2021 02:05:34 +0000 (21:05 -0500)
committerMatt Corallo <git@bluematt.me>
Fri, 5 Mar 2021 19:40:22 +0000 (14:40 -0500)
151 files changed:
liblightningjni.so
src/main/java/org/ldk/impl/bindings.java
src/main/java/org/ldk/structs/AcceptChannel.java
src/main/java/org/ldk/structs/AnnouncementSignatures.java
src/main/java/org/ldk/structs/BuiltCommitmentTransaction.java
src/main/java/org/ldk/structs/ChannelAnnouncement.java
src/main/java/org/ldk/structs/ChannelConfig.java
src/main/java/org/ldk/structs/ChannelDetails.java
src/main/java/org/ldk/structs/ChannelFeatures.java
src/main/java/org/ldk/structs/ChannelHandshakeConfig.java
src/main/java/org/ldk/structs/ChannelHandshakeLimits.java
src/main/java/org/ldk/structs/ChannelInfo.java
src/main/java/org/ldk/structs/ChannelMessageHandler.java
src/main/java/org/ldk/structs/ChannelMonitorUpdate.java
src/main/java/org/ldk/structs/ChannelPublicKeys.java
src/main/java/org/ldk/structs/ChannelReestablish.java
src/main/java/org/ldk/structs/ChannelTransactionParameters.java
src/main/java/org/ldk/structs/ChannelUpdate.java
src/main/java/org/ldk/structs/ClosingSigned.java
src/main/java/org/ldk/structs/CommitmentSigned.java
src/main/java/org/ldk/structs/CommitmentTransaction.java
src/main/java/org/ldk/structs/CommitmentUpdate.java
src/main/java/org/ldk/structs/CounterpartyChannelTransactionParameters.java
src/main/java/org/ldk/structs/DataLossProtect.java
src/main/java/org/ldk/structs/DirectionalChannelInfo.java
src/main/java/org/ldk/structs/ErrorMessage.java
src/main/java/org/ldk/structs/FundingCreated.java
src/main/java/org/ldk/structs/FundingLocked.java
src/main/java/org/ldk/structs/FundingSigned.java
src/main/java/org/ldk/structs/GossipTimestampFilter.java
src/main/java/org/ldk/structs/HTLCOutputInCommitment.java
src/main/java/org/ldk/structs/HTLCUpdate.java
src/main/java/org/ldk/structs/HolderCommitmentTransaction.java
src/main/java/org/ldk/structs/InMemoryChannelKeys.java
src/main/java/org/ldk/structs/InitFeatures.java
src/main/java/org/ldk/structs/KeysInterface.java
src/main/java/org/ldk/structs/LightningError.java
src/main/java/org/ldk/structs/NodeAnnouncement.java
src/main/java/org/ldk/structs/NodeAnnouncementInfo.java
src/main/java/org/ldk/structs/NodeFeatures.java
src/main/java/org/ldk/structs/NodeInfo.java
src/main/java/org/ldk/structs/OpenChannel.java
src/main/java/org/ldk/structs/OutPoint.java
src/main/java/org/ldk/structs/PeerHandleError.java
src/main/java/org/ldk/structs/Ping.java
src/main/java/org/ldk/structs/Pong.java
src/main/java/org/ldk/structs/QueryChannelRange.java
src/main/java/org/ldk/structs/QueryShortChannelIds.java
src/main/java/org/ldk/structs/ReplyChannelRange.java
src/main/java/org/ldk/structs/ReplyShortChannelIdsEnd.java
src/main/java/org/ldk/structs/Result_ChanKeySignerDecodeErrorZ.java [deleted file]
src/main/java/org/ldk/structs/Result_PublicKeySecpErrorZ.java [deleted file]
src/main/java/org/ldk/structs/Result_SecretKeySecpErrorZ.java [deleted file]
src/main/java/org/ldk/structs/Result_TxCreationKeysSecpErrorZ.java [deleted file]
src/main/java/org/ldk/structs/RevokeAndACK.java
src/main/java/org/ldk/structs/Route.java
src/main/java/org/ldk/structs/RouteHint.java
src/main/java/org/ldk/structs/RouteHop.java
src/main/java/org/ldk/structs/RoutingFees.java
src/main/java/org/ldk/structs/Shutdown.java
src/main/java/org/ldk/structs/TxCreationKeys.java
src/main/java/org/ldk/structs/UnsignedChannelAnnouncement.java
src/main/java/org/ldk/structs/UnsignedChannelUpdate.java
src/main/java/org/ldk/structs/UnsignedNodeAnnouncement.java
src/main/java/org/ldk/structs/UpdateAddHTLC.java
src/main/java/org/ldk/structs/UpdateFailHTLC.java
src/main/java/org/ldk/structs/UpdateFailMalformedHTLC.java
src/main/java/org/ldk/structs/UpdateFee.java
src/main/java/org/ldk/structs/UpdateFulfillHTLC.java
src/main/java/org/ldk/structs/UserConfig.java
src/main/jni/bindings.c
src/main/jni/org_ldk_impl_bindings.h
ts/bindings.c
ts/bindings.ts
ts/structs/AcceptChannel.ts
ts/structs/AnnouncementSignatures.ts
ts/structs/BuiltCommitmentTransaction.ts
ts/structs/ChainMonitor.ts
ts/structs/ChannelAnnouncement.ts
ts/structs/ChannelConfig.ts
ts/structs/ChannelDetails.ts
ts/structs/ChannelFeatures.ts
ts/structs/ChannelHandshakeConfig.ts
ts/structs/ChannelHandshakeLimits.ts
ts/structs/ChannelInfo.ts
ts/structs/ChannelManager.ts
ts/structs/ChannelManagerReadArgs.ts
ts/structs/ChannelMessageHandler.ts
ts/structs/ChannelMonitor.ts
ts/structs/ChannelMonitorUpdate.ts
ts/structs/ChannelPublicKeys.ts
ts/structs/ChannelReestablish.ts
ts/structs/ChannelTransactionParameters.ts
ts/structs/ChannelUpdate.ts
ts/structs/ClosingSigned.ts
ts/structs/CommitmentSigned.ts
ts/structs/CommitmentTransaction.ts
ts/structs/CommitmentUpdate.ts
ts/structs/CounterpartyChannelTransactionParameters.ts
ts/structs/DataLossProtect.ts
ts/structs/DirectionalChannelInfo.ts
ts/structs/ErrorMessage.ts
ts/structs/EventsProvider.ts
ts/structs/FundingCreated.ts
ts/structs/FundingLocked.ts
ts/structs/FundingSigned.ts
ts/structs/GossipTimestampFilter.ts
ts/structs/HTLCOutputInCommitment.ts
ts/structs/HTLCUpdate.ts
ts/structs/HolderCommitmentTransaction.ts
ts/structs/InMemoryChannelKeys.ts
ts/structs/InitFeatures.ts
ts/structs/KeysInterface.ts
ts/structs/LightningError.ts
ts/structs/MessageSendEventsProvider.ts
ts/structs/NodeAnnouncement.ts
ts/structs/NodeAnnouncementInfo.ts
ts/structs/NodeFeatures.ts
ts/structs/NodeInfo.ts
ts/structs/OpenChannel.ts
ts/structs/OutPoint.ts
ts/structs/PeerHandleError.ts
ts/structs/Ping.ts
ts/structs/Pong.ts
ts/structs/QueryChannelRange.ts
ts/structs/QueryShortChannelIds.ts
ts/structs/ReplyChannelRange.ts
ts/structs/ReplyShortChannelIdsEnd.ts
ts/structs/Result_ChanKeySignerDecodeErrorZ.ts [deleted file]
ts/structs/Result_PublicKeySecpErrorZ.ts [deleted file]
ts/structs/Result_SecretKeySecpErrorZ.ts [deleted file]
ts/structs/Result_TxCreationKeysSecpErrorZ.ts [deleted file]
ts/structs/RevokeAndACK.ts
ts/structs/Route.ts
ts/structs/RouteHint.ts
ts/structs/RouteHop.ts
ts/structs/RoutingFees.ts
ts/structs/RoutingMessageHandler.ts
ts/structs/Shutdown.ts
ts/structs/TxCreationKeys.ts
ts/structs/UnsignedChannelAnnouncement.ts
ts/structs/UnsignedChannelUpdate.ts
ts/structs/UnsignedNodeAnnouncement.ts
ts/structs/UpdateAddHTLC.ts
ts/structs/UpdateFailHTLC.ts
ts/structs/UpdateFailMalformedHTLC.ts
ts/structs/UpdateFee.ts
ts/structs/UpdateFulfillHTLC.ts
ts/structs/UserConfig.ts
ts/structs/UtilMethods.ts
ts/structs/Watch.ts

index 48816fd15ea05c3d2f77c01de0e3b7611a2941b8..b151f89d4523fa4bbb18f6ff055301230a248c23 100755 (executable)
Binary files a/liblightningjni.so and b/liblightningjni.so differ
index 6f9bd8d5f73b83b50227e8aa777b02221d06b1f7..498b353a64d6587736ed372742982f8895a48637 100644 (file)
@@ -37,36 +37,78 @@ public class bindings {
        static { LDKNetwork.values(); /* Force enum statics to run */ }
        static { LDKSecp256k1Error.values(); /* Force enum statics to run */ }
        public static native long LDKCVec_u8Z_new(byte[] elems);
-       public static native long LDKC2Tuple_u64u64Z_new(long a, long b);
-       public static native long LDKC2Tuple_u64u64Z_get_a(long ptr);
-       public static native long LDKC2Tuple_u64u64Z_get_b(long ptr);
-       public static class LDKSpendableOutputDescriptor {
-               private LDKSpendableOutputDescriptor() {}
-               public final static class StaticOutput extends LDKSpendableOutputDescriptor {
-                       public long outpoint;
-                       public long output;
-                       StaticOutput(long outpoint, long output) { this.outpoint = outpoint; this.output = output; }
-               }
-               public final static class DynamicOutputP2WSH extends LDKSpendableOutputDescriptor {
-                       public long outpoint;
-                       public byte[] per_commitment_point;
-                       public short to_self_delay;
-                       public long output;
-                       public long key_derivation_params;
-                       public byte[] revocation_pubkey;
-                       DynamicOutputP2WSH(long outpoint, byte[] per_commitment_point, short to_self_delay, long output, long key_derivation_params, byte[] revocation_pubkey) { this.outpoint = outpoint; this.per_commitment_point = per_commitment_point; this.to_self_delay = to_self_delay; this.output = output; this.key_derivation_params = key_derivation_params; this.revocation_pubkey = revocation_pubkey; }
-               }
-               public final static class StaticOutputCounterpartyPayment extends LDKSpendableOutputDescriptor {
-                       public long outpoint;
-                       public long output;
-                       public long key_derivation_params;
-                       StaticOutputCounterpartyPayment(long outpoint, long output, long key_derivation_params) { this.outpoint = outpoint; this.output = output; this.key_derivation_params = key_derivation_params; }
-               }
-               static native void init();
-       }
-       static { LDKSpendableOutputDescriptor.init(); }
-       public static native LDKSpendableOutputDescriptor LDKSpendableOutputDescriptor_ref_from_ptr(long ptr);
-       public static native long LDKCVec_SpendableOutputDescriptorZ_new(long[] elems);
+       public static native boolean LDKCResult_SecretKeyErrorZ_result_ok(long arg);
+       public static native byte[] LDKCResult_SecretKeyErrorZ_get_ok(long arg);
+       public static native LDKSecp256k1Error LDKCResult_SecretKeyErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_PublicKeyErrorZ_result_ok(long arg);
+       public static native byte[] LDKCResult_PublicKeyErrorZ_get_ok(long arg);
+       public static native LDKSecp256k1Error LDKCResult_PublicKeyErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_TxCreationKeysDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_TxCreationKeysDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_TxCreationKeysDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_ChannelPublicKeysDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_ChannelPublicKeysDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_ChannelPublicKeysDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_TxCreationKeysErrorZ_result_ok(long arg);
+       public static native long LDKCResult_TxCreationKeysErrorZ_get_ok(long arg);
+       public static native LDKSecp256k1Error LDKCResult_TxCreationKeysErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_ChannelTransactionParametersDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_HolderCommitmentTransactionDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_err(long arg);
+       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_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);
+       public static native boolean LDKCResult_TrustedCommitmentTransactionNoneZ_result_ok(long arg);
+       public static native long LDKCResult_TrustedCommitmentTransactionNoneZ_get_ok(long arg);
+       public static native void LDKCResult_TrustedCommitmentTransactionNoneZ_get_err(long arg);
+       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_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);
+       public static native boolean LDKCResult_NonePeerHandleErrorZ_result_ok(long arg);
+       public static native void LDKCResult_NonePeerHandleErrorZ_get_ok(long arg);
+       public static native long LDKCResult_NonePeerHandleErrorZ_get_err(long arg);
+       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_InitFeaturesDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_InitFeaturesDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_InitFeaturesDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_NodeFeaturesDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_NodeFeaturesDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_NodeFeaturesDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_ChannelFeaturesDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_ChannelFeaturesDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_ChannelFeaturesDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_ChannelConfigDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_ChannelConfigDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_ChannelConfigDecodeErrorZ_get_err(long arg);
+       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);
+       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 class LDKErrorAction {
                private LDKErrorAction() {}
                public final static class DisconnectPeer extends LDKErrorAction {
@@ -198,6 +240,92 @@ public class bindings {
        static { LDKMessageSendEvent.init(); }
        public static native LDKMessageSendEvent LDKMessageSendEvent_ref_from_ptr(long ptr);
        public static native long LDKCVec_MessageSendEventZ_new(long[] elems);
+       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);
+       public static native boolean LDKCResult_ChannelInfoDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_ChannelInfoDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_ChannelInfoDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_RoutingFeesDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_RoutingFeesDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_RoutingFeesDecodeErrorZ_get_err(long arg);
+       public static class LDKNetAddress {
+               private LDKNetAddress() {}
+               public final static class IPv4 extends LDKNetAddress {
+                       public byte[] addr;
+                       public short port;
+                       IPv4(byte[] addr, short port) { this.addr = addr; this.port = port; }
+               }
+               public final static class IPv6 extends LDKNetAddress {
+                       public byte[] addr;
+                       public short port;
+                       IPv6(byte[] addr, short port) { this.addr = addr; this.port = port; }
+               }
+               public final static class OnionV2 extends LDKNetAddress {
+                       public byte[] addr;
+                       public short port;
+                       OnionV2(byte[] addr, short port) { this.addr = addr; this.port = port; }
+               }
+               public final static class OnionV3 extends LDKNetAddress {
+                       public byte[] ed25519_pubkey;
+                       public short checksum;
+                       public byte version;
+                       public short port;
+                       OnionV3(byte[] ed25519_pubkey, short checksum, byte version, short port) { this.ed25519_pubkey = ed25519_pubkey; this.checksum = checksum; this.version = version; this.port = port; }
+               }
+               static native void init();
+       }
+       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 boolean LDKCResult_NodeAnnouncementInfoDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_err(long arg);
+       public static native long LDKCVec_u64Z_new(long[] elems);
+       public static native boolean LDKCResult_NodeInfoDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_NodeInfoDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_NodeInfoDecodeErrorZ_get_err(long arg);
+       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 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);
+       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);
+       public static native LDKChannelMonitorUpdateErr LDKCResult_NoneChannelMonitorUpdateErrZ_get_err(long arg);
+       public static native long LDKCVec_MonitorEventZ_new(long[] elems);
+       public static native long LDKC2Tuple_u64u64Z_new(long a, long b);
+       public static native long LDKC2Tuple_u64u64Z_get_a(long ptr);
+       public static native long LDKC2Tuple_u64u64Z_get_b(long ptr);
+       public static class LDKSpendableOutputDescriptor {
+               private LDKSpendableOutputDescriptor() {}
+               public final static class StaticOutput extends LDKSpendableOutputDescriptor {
+                       public long outpoint;
+                       public long output;
+                       StaticOutput(long outpoint, long output) { this.outpoint = outpoint; this.output = output; }
+               }
+               public final static class DynamicOutputP2WSH extends LDKSpendableOutputDescriptor {
+                       public long outpoint;
+                       public byte[] per_commitment_point;
+                       public short to_self_delay;
+                       public long output;
+                       public long key_derivation_params;
+                       public byte[] revocation_pubkey;
+                       DynamicOutputP2WSH(long outpoint, byte[] per_commitment_point, short to_self_delay, long output, long key_derivation_params, byte[] revocation_pubkey) { this.outpoint = outpoint; this.per_commitment_point = per_commitment_point; this.to_self_delay = to_self_delay; this.output = output; this.key_derivation_params = key_derivation_params; this.revocation_pubkey = revocation_pubkey; }
+               }
+               public final static class StaticOutputCounterpartyPayment extends LDKSpendableOutputDescriptor {
+                       public long outpoint;
+                       public long output;
+                       public long key_derivation_params;
+                       StaticOutputCounterpartyPayment(long outpoint, long output, long key_derivation_params) { this.outpoint = outpoint; this.output = output; this.key_derivation_params = key_derivation_params; }
+               }
+               static native void init();
+       }
+       static { LDKSpendableOutputDescriptor.init(); }
+       public static native LDKSpendableOutputDescriptor LDKSpendableOutputDescriptor_ref_from_ptr(long ptr);
+       public static native long LDKCVec_SpendableOutputDescriptorZ_new(long[] elems);
        public static class LDKEvent {
                private LDKEvent() {}
                public final static class FundingGenerationReady extends LDKEvent {
@@ -240,17 +368,15 @@ public class bindings {
        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_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);
-       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);
-       public static native LDKChannelMonitorUpdateErr LDKCResult_NoneChannelMonitorUpdateErrZ_get_err(long arg);
-       public static native long LDKCVec_MonitorEventZ_new(long[] elems);
+       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 static native boolean LDKCResult_ChannelMonitorUpdateDecodeErrorZ_result_ok(long arg);
        public static native long LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(long arg);
        public static native long LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_HTLCUpdateDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_HTLCUpdateDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_HTLCUpdateDecodeErrorZ_get_err(long arg);
        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);
@@ -318,15 +444,6 @@ public class bindings {
        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_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 boolean LDKCResult_ChanKeySignerDecodeErrorZ_result_ok(long arg);
-       public static native long LDKCResult_ChanKeySignerDecodeErrorZ_get_ok(long arg);
-       public static native long LDKCResult_ChanKeySignerDecodeErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_InMemoryChannelKeysDecodeErrorZ_result_ok(long arg);
-       public static native long LDKCResult_InMemoryChannelKeysDecodeErrorZ_get_ok(long arg);
-       public static native long LDKCResult_InMemoryChannelKeysDecodeErrorZ_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 LDKAccessError LDKCResult_TxOutAccessErrorZ_get_err(long arg);
@@ -363,35 +480,6 @@ public class bindings {
        public static native boolean LDKCResult_NonePaymentSendFailureZ_result_ok(long arg);
        public static native void LDKCResult_NonePaymentSendFailureZ_get_ok(long arg);
        public static native long LDKCResult_NonePaymentSendFailureZ_get_err(long arg);
-       public static class LDKNetAddress {
-               private LDKNetAddress() {}
-               public final static class IPv4 extends LDKNetAddress {
-                       public byte[] addr;
-                       public short port;
-                       IPv4(byte[] addr, short port) { this.addr = addr; this.port = port; }
-               }
-               public final static class IPv6 extends LDKNetAddress {
-                       public byte[] addr;
-                       public short port;
-                       IPv6(byte[] addr, short port) { this.addr = addr; this.port = port; }
-               }
-               public final static class OnionV2 extends LDKNetAddress {
-                       public byte[] addr;
-                       public short port;
-                       OnionV2(byte[] addr, short port) { this.addr = addr; this.port = port; }
-               }
-               public final static class OnionV3 extends LDKNetAddress {
-                       public byte[] ed25519_pubkey;
-                       public short checksum;
-                       public byte version;
-                       public short port;
-                       OnionV3(byte[] ed25519_pubkey, short checksum, byte version, short port) { this.ed25519_pubkey = ed25519_pubkey; this.checksum = checksum; this.version = version; this.port = port; }
-               }
-               static native void init();
-       }
-       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 LDKCVec_ChannelMonitorZ_new(long[] elems);
        public interface LDKWatch {
                 long watch_channel(long funding_txo, long monitor);
@@ -411,6 +499,9 @@ public class bindings {
        public static native long LDKBroadcasterInterface_new(LDKBroadcasterInterface impl);
        // void BroadcasterInterface_broadcast_transaction LDKBroadcasterInterface* this_arg, struct LDKTransaction tx
        public static native void BroadcasterInterface_broadcast_transaction(long this_arg, byte[] tx);
+       public static native boolean LDKCResult_ChannelKeysDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_ChannelKeysDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_ChannelKeysDecodeErrorZ_get_err(long arg);
        public interface LDKKeysInterface {
                 byte[] get_node_secret();
                 byte[] get_destination_script();
@@ -430,7 +521,7 @@ public class bindings {
        public static native long KeysInterface_get_channel_keys(long this_arg, boolean inbound, long channel_value_satoshis);
        // LDKThirtyTwoBytes KeysInterface_get_secure_random_bytes LDKKeysInterface* this_arg
        public static native byte[] KeysInterface_get_secure_random_bytes(long this_arg);
-       // LDKCResult_ChanKeySignerDecodeErrorZ KeysInterface_read_chan_signer LDKKeysInterface* this_arg, struct LDKu8slice reader
+       // LDKCResult_ChannelKeysDecodeErrorZ KeysInterface_read_chan_signer LDKKeysInterface* this_arg, struct LDKu8slice reader
        public static native long KeysInterface_read_chan_signer(long this_arg, byte[] reader);
        public interface LDKFeeEstimator {
                 int get_est_sat_per_1000_weight(LDKConfirmationTarget confirmation_target);
@@ -448,35 +539,81 @@ public class bindings {
        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);
+       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 boolean LDKCResult_InMemoryChannelKeysDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_InMemoryChannelKeysDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_InMemoryChannelKeysDecodeErrorZ_get_err(long arg);
+       public static native long LDKCVec_RouteHopZ_new(long[] elems);
+       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 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_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 native long LDKCVec_u64Z_new(long[] elems);
        public static native long LDKCVec_UpdateAddHTLCZ_new(long[] elems);
        public static native long LDKCVec_UpdateFulfillHTLCZ_new(long[] elems);
        public static native long LDKCVec_UpdateFailHTLCZ_new(long[] elems);
        public static native long LDKCVec_UpdateFailMalformedHTLCZ_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);
-       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_AcceptChannelDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_AcceptChannelDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_AcceptChannelDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_AnnouncementSignaturesDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_err(long arg);
        public static native boolean LDKCResult_ChannelReestablishDecodeErrorZ_result_ok(long arg);
        public static native long LDKCResult_ChannelReestablishDecodeErrorZ_get_ok(long arg);
        public static native long LDKCResult_ChannelReestablishDecodeErrorZ_get_err(long arg);
+       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_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);
+       public static native boolean LDKCResult_FundingCreatedDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_FundingCreatedDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_FundingCreatedDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_FundingSignedDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_FundingSignedDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_FundingSignedDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_FundingLockedDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_FundingLockedDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_FundingLockedDecodeErrorZ_get_err(long arg);
        public static native boolean LDKCResult_InitDecodeErrorZ_result_ok(long arg);
        public static native long LDKCResult_InitDecodeErrorZ_get_ok(long arg);
        public static native long LDKCResult_InitDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_OpenChannelDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_OpenChannelDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_OpenChannelDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_RevokeAndACKDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_RevokeAndACKDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_RevokeAndACKDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_ShutdownDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_ShutdownDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_ShutdownDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_UpdateFailHTLCDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_UpdateFailHTLCDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_UpdateFailHTLCDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_UpdateFeeDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_UpdateFeeDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_UpdateFeeDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_UpdateFulfillHTLCDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_UpdateAddHTLCDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_UpdateAddHTLCDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_UpdateAddHTLCDecodeErrorZ_get_err(long arg);
        public static native boolean LDKCResult_PingDecodeErrorZ_result_ok(long arg);
        public static native long LDKCResult_PingDecodeErrorZ_get_ok(long arg);
        public static native long LDKCResult_PingDecodeErrorZ_get_err(long arg);
@@ -486,15 +623,24 @@ public class bindings {
        public static native boolean LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_result_ok(long arg);
        public static native long LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(long arg);
        public static native long LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_ChannelAnnouncementDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_ChannelAnnouncementDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_ChannelAnnouncementDecodeErrorZ_get_err(long arg);
        public static native boolean LDKCResult_UnsignedChannelUpdateDecodeErrorZ_result_ok(long arg);
        public static native long LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(long arg);
        public static native long LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_ChannelUpdateDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_ChannelUpdateDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_ChannelUpdateDecodeErrorZ_get_err(long arg);
        public static native boolean LDKCResult_ErrorMessageDecodeErrorZ_result_ok(long arg);
        public static native long LDKCResult_ErrorMessageDecodeErrorZ_get_ok(long arg);
        public static native long LDKCResult_ErrorMessageDecodeErrorZ_get_err(long arg);
        public static native boolean LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_result_ok(long arg);
        public static native long LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(long arg);
        public static native long LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_NodeAnnouncementDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_NodeAnnouncementDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_NodeAnnouncementDecodeErrorZ_get_err(long arg);
        public static native boolean LDKCResult_QueryShortChannelIdsDecodeErrorZ_result_ok(long arg);
        public static native long LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_ok(long arg);
        public static native long LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_err(long arg);
@@ -510,50 +656,6 @@ public class bindings {
        public static native boolean LDKCResult_GossipTimestampFilterDecodeErrorZ_result_ok(long arg);
        public static native long LDKCResult_GossipTimestampFilterDecodeErrorZ_get_ok(long arg);
        public static native long LDKCResult_GossipTimestampFilterDecodeErrorZ_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);
-       public static native boolean LDKCResult_NonePeerHandleErrorZ_result_ok(long arg);
-       public static native void LDKCResult_NonePeerHandleErrorZ_get_ok(long arg);
-       public static native long LDKCResult_NonePeerHandleErrorZ_get_err(long arg);
-       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_SecretKeySecpErrorZ_result_ok(long arg);
-       public static native byte[] LDKCResult_SecretKeySecpErrorZ_get_ok(long arg);
-       public static native LDKSecp256k1Error LDKCResult_SecretKeySecpErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_PublicKeySecpErrorZ_result_ok(long arg);
-       public static native byte[] LDKCResult_PublicKeySecpErrorZ_get_ok(long arg);
-       public static native LDKSecp256k1Error LDKCResult_PublicKeySecpErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_TxCreationKeysSecpErrorZ_result_ok(long arg);
-       public static native long LDKCResult_TxCreationKeysSecpErrorZ_get_ok(long arg);
-       public static native LDKSecp256k1Error LDKCResult_TxCreationKeysSecpErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_TrustedCommitmentTransactionNoneZ_result_ok(long arg);
-       public static native long LDKCResult_TrustedCommitmentTransactionNoneZ_get_ok(long arg);
-       public static native void LDKCResult_TrustedCommitmentTransactionNoneZ_get_err(long arg);
-       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 long LDKCVec_RouteHopZ_new(long[] elems);
-       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 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_RoutingFeesDecodeErrorZ_result_ok(long arg);
-       public static native long LDKCResult_RoutingFeesDecodeErrorZ_get_ok(long arg);
-       public static native long LDKCResult_RoutingFeesDecodeErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_NodeAnnouncementInfoDecodeErrorZ_result_ok(long arg);
-       public static native long LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(long arg);
-       public static native long LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_NodeInfoDecodeErrorZ_result_ok(long arg);
-       public static native long LDKCResult_NodeInfoDecodeErrorZ_get_ok(long arg);
-       public static native long LDKCResult_NodeInfoDecodeErrorZ_get_err(long arg);
-       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 interface LDKMessageSendEventsProvider {
                 long[] get_and_clear_pending_msg_events();
        }
@@ -705,20 +807,242 @@ public class bindings {
        public static native void TxOut_free(long _res);
        // struct LDKTxOut TxOut_clone(const struct LDKTxOut *NONNULL_PTR orig);
        public static native long TxOut_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);
-       public static native void CVec_MessageSendEventZ_free(long[] _res);
-       // void CVec_EventZ_free(struct LDKCVec_EventZ _res);
-       public static native void CVec_EventZ_free(long[] _res);
-       // void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res);
-       public static native void C2Tuple_usizeTransactionZ_free(long _res);
-       // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b);
-       public static native long C2Tuple_usizeTransactionZ_new(long a, byte[] b);
-       // void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res);
-       public static native void CVec_C2Tuple_usizeTransactionZZ_free(long[] _res);
-       // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void);
-       public static native long CResult_NoneChannelMonitorUpdateErrZ_ok();
+       // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_ok(struct LDKSecretKey o);
+       public static native long CResult_SecretKeyErrorZ_ok(byte[] o);
+       // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_err(enum LDKSecp256k1Error e);
+       public static native long CResult_SecretKeyErrorZ_err(LDKSecp256k1Error e);
+       // void CResult_SecretKeyErrorZ_free(struct LDKCResult_SecretKeyErrorZ _res);
+       public static native void CResult_SecretKeyErrorZ_free(long _res);
+       // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_ok(struct LDKPublicKey o);
+       public static native long CResult_PublicKeyErrorZ_ok(byte[] o);
+       // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_err(enum LDKSecp256k1Error e);
+       public static native long CResult_PublicKeyErrorZ_err(LDKSecp256k1Error e);
+       // void CResult_PublicKeyErrorZ_free(struct LDKCResult_PublicKeyErrorZ _res);
+       public static native void CResult_PublicKeyErrorZ_free(long _res);
+       // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_ok(struct LDKTxCreationKeys o);
+       public static native long CResult_TxCreationKeysDecodeErrorZ_ok(long o);
+       // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_TxCreationKeysDecodeErrorZ_err(long e);
+       // void CResult_TxCreationKeysDecodeErrorZ_free(struct LDKCResult_TxCreationKeysDecodeErrorZ _res);
+       public static native void CResult_TxCreationKeysDecodeErrorZ_free(long _res);
+       // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_clone(const struct LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_TxCreationKeysDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_ok(struct LDKChannelPublicKeys o);
+       public static native long CResult_ChannelPublicKeysDecodeErrorZ_ok(long o);
+       // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_ChannelPublicKeysDecodeErrorZ_err(long e);
+       // void CResult_ChannelPublicKeysDecodeErrorZ_free(struct LDKCResult_ChannelPublicKeysDecodeErrorZ _res);
+       public static native void CResult_ChannelPublicKeysDecodeErrorZ_free(long _res);
+       // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_clone(const struct LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_ChannelPublicKeysDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_ok(struct LDKTxCreationKeys o);
+       public static native long CResult_TxCreationKeysErrorZ_ok(long o);
+       // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_err(enum LDKSecp256k1Error e);
+       public static native long CResult_TxCreationKeysErrorZ_err(LDKSecp256k1Error e);
+       // void CResult_TxCreationKeysErrorZ_free(struct LDKCResult_TxCreationKeysErrorZ _res);
+       public static native void CResult_TxCreationKeysErrorZ_free(long _res);
+       // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(struct LDKHTLCOutputInCommitment o);
+       public static native long CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(long o);
+       // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_HTLCOutputInCommitmentDecodeErrorZ_err(long e);
+       // void CResult_HTLCOutputInCommitmentDecodeErrorZ_free(struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ _res);
+       public static native void CResult_HTLCOutputInCommitmentDecodeErrorZ_free(long _res);
+       // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(const struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(struct LDKCounterpartyChannelTransactionParameters o);
+       public static native long CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(long o);
+       // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(long e);
+       // void CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ _res);
+       public static native void CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(long _res);
+       // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_ok(struct LDKChannelTransactionParameters o);
+       public static native long CResult_ChannelTransactionParametersDecodeErrorZ_ok(long o);
+       // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_ChannelTransactionParametersDecodeErrorZ_err(long e);
+       // void CResult_ChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_ChannelTransactionParametersDecodeErrorZ _res);
+       public static native void CResult_ChannelTransactionParametersDecodeErrorZ_free(long _res);
+       // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_ChannelTransactionParametersDecodeErrorZ_clone(long orig);
+       // void CVec_SignatureZ_free(struct LDKCVec_SignatureZ _res);
+       public static native void CVec_SignatureZ_free(byte[][] _res);
+       // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_ok(struct LDKHolderCommitmentTransaction o);
+       public static native long CResult_HolderCommitmentTransactionDecodeErrorZ_ok(long o);
+       // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_HolderCommitmentTransactionDecodeErrorZ_err(long e);
+       // void CResult_HolderCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ _res);
+       public static native void CResult_HolderCommitmentTransactionDecodeErrorZ_free(long _res);
+       // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_HolderCommitmentTransactionDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(struct LDKBuiltCommitmentTransaction o);
+       public static native long CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(long o);
+       // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_BuiltCommitmentTransactionDecodeErrorZ_err(long e);
+       // void CResult_BuiltCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ _res);
+       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_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);
+       public static native long CResult_CommitmentTransactionDecodeErrorZ_err(long e);
+       // void CResult_CommitmentTransactionDecodeErrorZ_free(struct LDKCResult_CommitmentTransactionDecodeErrorZ _res);
+       public static native void CResult_CommitmentTransactionDecodeErrorZ_free(long _res);
+       // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_CommitmentTransactionDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_ok(struct LDKTrustedCommitmentTransaction o);
+       public static native long CResult_TrustedCommitmentTransactionNoneZ_ok(long o);
+       // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_err(void);
+       public static native long CResult_TrustedCommitmentTransactionNoneZ_err();
+       // void CResult_TrustedCommitmentTransactionNoneZ_free(struct LDKCResult_TrustedCommitmentTransactionNoneZ _res);
+       public static native void CResult_TrustedCommitmentTransactionNoneZ_free(long _res);
+       // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_ok(struct LDKCVec_SignatureZ o);
+       public static native long CResult_CVec_SignatureZNoneZ_ok(byte[][] o);
+       // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_err(void);
+       public static native long CResult_CVec_SignatureZNoneZ_err();
+       // void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res);
+       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);
+       // void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res);
+       public static native void CVec_PublicKeyZ_free(byte[][] _res);
+       // void CVec_u8Z_free(struct LDKCVec_u8Z _res);
+       public static native void CVec_u8Z_free(byte[] _res);
+       // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o);
+       public static native long CResult_CVec_u8ZPeerHandleErrorZ_ok(byte[] o);
+       // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_err(struct LDKPeerHandleError e);
+       public static native long CResult_CVec_u8ZPeerHandleErrorZ_err(long e);
+       // void CResult_CVec_u8ZPeerHandleErrorZ_free(struct LDKCResult_CVec_u8ZPeerHandleErrorZ _res);
+       public static native void CResult_CVec_u8ZPeerHandleErrorZ_free(long _res);
+       // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_clone(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR orig);
+       public static native long CResult_CVec_u8ZPeerHandleErrorZ_clone(long orig);
+       // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_ok(void);
+       public static native long CResult_NonePeerHandleErrorZ_ok();
+       // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_err(struct LDKPeerHandleError e);
+       public static native long CResult_NonePeerHandleErrorZ_err(long e);
+       // void CResult_NonePeerHandleErrorZ_free(struct LDKCResult_NonePeerHandleErrorZ _res);
+       public static native void CResult_NonePeerHandleErrorZ_free(long _res);
+       // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_clone(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR orig);
+       public static native long CResult_NonePeerHandleErrorZ_clone(long orig);
+       // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_ok(bool o);
+       public static native long CResult_boolPeerHandleErrorZ_ok(boolean o);
+       // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_err(struct LDKPeerHandleError e);
+       public static native long CResult_boolPeerHandleErrorZ_err(long e);
+       // void CResult_boolPeerHandleErrorZ_free(struct LDKCResult_boolPeerHandleErrorZ _res);
+       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_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o);
+       public static native long CResult_InitFeaturesDecodeErrorZ_ok(long o);
+       // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_InitFeaturesDecodeErrorZ_err(long e);
+       // void CResult_InitFeaturesDecodeErrorZ_free(struct LDKCResult_InitFeaturesDecodeErrorZ _res);
+       public static native void CResult_InitFeaturesDecodeErrorZ_free(long _res);
+       // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_ok(struct LDKNodeFeatures o);
+       public static native long CResult_NodeFeaturesDecodeErrorZ_ok(long o);
+       // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_NodeFeaturesDecodeErrorZ_err(long e);
+       // void CResult_NodeFeaturesDecodeErrorZ_free(struct LDKCResult_NodeFeaturesDecodeErrorZ _res);
+       public static native void CResult_NodeFeaturesDecodeErrorZ_free(long _res);
+       // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_ok(struct LDKChannelFeatures o);
+       public static native long CResult_ChannelFeaturesDecodeErrorZ_ok(long o);
+       // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_ChannelFeaturesDecodeErrorZ_err(long e);
+       // void CResult_ChannelFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelFeaturesDecodeErrorZ _res);
+       public static native void CResult_ChannelFeaturesDecodeErrorZ_free(long _res);
+       // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_ok(struct LDKChannelConfig o);
+       public static native long CResult_ChannelConfigDecodeErrorZ_ok(long o);
+       // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_ChannelConfigDecodeErrorZ_err(long e);
+       // void CResult_ChannelConfigDecodeErrorZ_free(struct LDKCResult_ChannelConfigDecodeErrorZ _res);
+       public static native void CResult_ChannelConfigDecodeErrorZ_free(long _res);
+       // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_clone(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_ChannelConfigDecodeErrorZ_clone(long orig);
+       // 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);
+       public static native long CResult_boolLightningErrorZ_err(long e);
+       // void CResult_boolLightningErrorZ_free(struct LDKCResult_boolLightningErrorZ _res);
+       public static native void CResult_boolLightningErrorZ_free(long _res);
+       // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_clone(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR orig);
+       public static native long CResult_boolLightningErrorZ_clone(long orig);
+       // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(const struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR orig);
+       public static native long C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(long orig);
+       // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(struct LDKChannelAnnouncement a, struct LDKChannelUpdate b, struct LDKChannelUpdate c);
+       public static native long C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(long a, long b, long c);
+       // void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res);
+       public static native void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(long _res);
+       // void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res);
+       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_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res);
+       public static native void CVec_MessageSendEventZ_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);
+       public static native long CResult_DirectionalChannelInfoDecodeErrorZ_err(long e);
+       // void CResult_DirectionalChannelInfoDecodeErrorZ_free(struct LDKCResult_DirectionalChannelInfoDecodeErrorZ _res);
+       public static native void CResult_DirectionalChannelInfoDecodeErrorZ_free(long _res);
+       // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_clone(const struct LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_DirectionalChannelInfoDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_ok(struct LDKChannelInfo o);
+       public static native long CResult_ChannelInfoDecodeErrorZ_ok(long o);
+       // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_ChannelInfoDecodeErrorZ_err(long e);
+       // void CResult_ChannelInfoDecodeErrorZ_free(struct LDKCResult_ChannelInfoDecodeErrorZ _res);
+       public static native void CResult_ChannelInfoDecodeErrorZ_free(long _res);
+       // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_ok(struct LDKRoutingFees o);
+       public static native long CResult_RoutingFeesDecodeErrorZ_ok(long o);
+       // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_RoutingFeesDecodeErrorZ_err(long e);
+       // void CResult_RoutingFeesDecodeErrorZ_free(struct LDKCResult_RoutingFeesDecodeErrorZ _res);
+       public static native void CResult_RoutingFeesDecodeErrorZ_free(long _res);
+       // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_clone(const struct LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_RoutingFeesDecodeErrorZ_clone(long orig);
+       // void CVec_NetAddressZ_free(struct LDKCVec_NetAddressZ _res);
+       public static native void CVec_NetAddressZ_free(long[] _res);
+       // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_ok(struct LDKNodeAnnouncementInfo o);
+       public static native long CResult_NodeAnnouncementInfoDecodeErrorZ_ok(long o);
+       // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_NodeAnnouncementInfoDecodeErrorZ_err(long e);
+       // void CResult_NodeAnnouncementInfoDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res);
+       public static native void CResult_NodeAnnouncementInfoDecodeErrorZ_free(long _res);
+       // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_NodeAnnouncementInfoDecodeErrorZ_clone(long orig);
+       // void CVec_u64Z_free(struct LDKCVec_u64Z _res);
+       public static native void CVec_u64Z_free(long[] _res);
+       // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_ok(struct LDKNodeInfo o);
+       public static native long CResult_NodeInfoDecodeErrorZ_ok(long o);
+       // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_NodeInfoDecodeErrorZ_err(long e);
+       // void CResult_NodeInfoDecodeErrorZ_free(struct LDKCResult_NodeInfoDecodeErrorZ _res);
+       public static native void CResult_NodeInfoDecodeErrorZ_free(long _res);
+       // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_clone(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_NodeInfoDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_ok(struct LDKNetworkGraph o);
+       public static native long CResult_NetworkGraphDecodeErrorZ_ok(long o);
+       // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_NetworkGraphDecodeErrorZ_err(long e);
+       // void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res);
+       public static native void CResult_NetworkGraphDecodeErrorZ_free(long _res);
+       // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b);
+       public static native long C2Tuple_usizeTransactionZ_new(long a, byte[] b);
+       // void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res);
+       public static native void C2Tuple_usizeTransactionZ_free(long _res);
+       // void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res);
+       public static native void CVec_C2Tuple_usizeTransactionZZ_free(long[] _res);
+       // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void);
+       public static native long CResult_NoneChannelMonitorUpdateErrZ_ok();
        // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e);
        public static native long CResult_NoneChannelMonitorUpdateErrZ_err(LDKChannelMonitorUpdateErr e);
        // void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res);
@@ -727,12 +1051,32 @@ public class bindings {
        public static native long CResult_NoneChannelMonitorUpdateErrZ_clone(long orig);
        // void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
        public static native void CVec_MonitorEventZ_free(long[] _res);
+       // void CVec_EventZ_free(struct LDKCVec_EventZ _res);
+       public static native void CVec_EventZ_free(long[] _res);
+       // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_ok(struct LDKOutPoint o);
+       public static native long CResult_OutPointDecodeErrorZ_ok(long o);
+       // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_OutPointDecodeErrorZ_err(long e);
+       // void CResult_OutPointDecodeErrorZ_free(struct LDKCResult_OutPointDecodeErrorZ _res);
+       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 LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_ok(struct LDKChannelMonitorUpdate o);
        public static native long CResult_ChannelMonitorUpdateDecodeErrorZ_ok(long o);
        // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_err(struct LDKDecodeError e);
        public static native long CResult_ChannelMonitorUpdateDecodeErrorZ_err(long e);
        // void CResult_ChannelMonitorUpdateDecodeErrorZ_free(struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res);
        public static native void CResult_ChannelMonitorUpdateDecodeErrorZ_free(long _res);
+       // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_ChannelMonitorUpdateDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_ok(struct LDKHTLCUpdate o);
+       public static native long CResult_HTLCUpdateDecodeErrorZ_ok(long o);
+       // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_HTLCUpdateDecodeErrorZ_err(long e);
+       // void CResult_HTLCUpdateDecodeErrorZ_free(struct LDKCResult_HTLCUpdateDecodeErrorZ _res);
+       public static native void CResult_HTLCUpdateDecodeErrorZ_free(long _res);
+       // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_clone(const struct LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_HTLCUpdateDecodeErrorZ_clone(long orig);
        // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_ok(void);
        public static native long CResult_NoneMonitorUpdateErrorZ_ok();
        // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_err(struct LDKMonitorUpdateError e);
@@ -741,42 +1085,84 @@ public class bindings {
        public static native void CResult_NoneMonitorUpdateErrorZ_free(long _res);
        // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_clone(const struct LDKCResult_NoneMonitorUpdateErrorZ *NONNULL_PTR orig);
        public static native long CResult_NoneMonitorUpdateErrorZ_clone(long orig);
-       // void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res);
-       public static native void C2Tuple_OutPointScriptZ_free(long _res);
+       // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_clone(const struct LDKC2Tuple_OutPointScriptZ *NONNULL_PTR orig);
+       public static native long C2Tuple_OutPointScriptZ_clone(long orig);
        // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b);
        public static native long C2Tuple_OutPointScriptZ_new(long a, byte[] b);
+       // void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res);
+       public static native void C2Tuple_OutPointScriptZ_free(long _res);
        // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res);
        public static native void CVec_TransactionZ_free(byte[][] _res);
        // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_clone(const struct LDKC2Tuple_u32TxOutZ *NONNULL_PTR orig);
        public static native long C2Tuple_u32TxOutZ_clone(long orig);
-       // void C2Tuple_u32TxOutZ_free(struct LDKC2Tuple_u32TxOutZ _res);
-       public static native void C2Tuple_u32TxOutZ_free(long _res);
        // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_new(uint32_t a, struct LDKTxOut b);
        public static native long C2Tuple_u32TxOutZ_new(int a, long b);
+       // void C2Tuple_u32TxOutZ_free(struct LDKC2Tuple_u32TxOutZ _res);
+       public static native void C2Tuple_u32TxOutZ_free(long _res);
        // void CVec_C2Tuple_u32TxOutZZ_free(struct LDKCVec_C2Tuple_u32TxOutZZ _res);
        public static native void CVec_C2Tuple_u32TxOutZZ_free(long[] _res);
-       // void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res);
-       public static native void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(long _res);
        // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b);
        public static native long C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(byte[] a, long[] b);
+       // void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res);
+       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 C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res);
-       public static native void C2Tuple_BlockHashChannelMonitorZ_free(long _res);
        // 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);
+       public static native void C2Tuple_BlockHashChannelMonitorZ_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);
+       // void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res);
+       public static native void CVec_SpendableOutputDescriptorZ_free(long[] _res);
+       // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_ok(struct LDKTxOut o);
+       public static native long CResult_TxOutAccessErrorZ_ok(long o);
+       // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_err(enum LDKAccessError e);
+       public static native long CResult_TxOutAccessErrorZ_err(LDKAccessError e);
+       // void CResult_TxOutAccessErrorZ_free(struct LDKCResult_TxOutAccessErrorZ _res);
+       public static native void CResult_TxOutAccessErrorZ_free(long _res);
+       // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_clone(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR orig);
+       public static native long CResult_TxOutAccessErrorZ_clone(long orig);
+       // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
+       public static native long CResult_NoneAPIErrorZ_ok();
+       // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e);
+       public static native long CResult_NoneAPIErrorZ_err(long e);
+       // void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res);
+       public static native void CResult_NoneAPIErrorZ_free(long _res);
+       // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_clone(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR orig);
+       public static native long CResult_NoneAPIErrorZ_clone(long orig);
+       // void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res);
+       public static native void CVec_ChannelDetailsZ_free(long[] _res);
+       // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void);
+       public static native long CResult_NonePaymentSendFailureZ_ok();
+       // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
+       public static native long CResult_NonePaymentSendFailureZ_err(long e);
+       // void CResult_NonePaymentSendFailureZ_free(struct LDKCResult_NonePaymentSendFailureZ _res);
+       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);
+       // void CVec_ChannelMonitorZ_free(struct LDKCVec_ChannelMonitorZ _res);
+       public static native void CVec_ChannelMonitorZ_free(long[] _res);
+       // struct LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b);
+       public static native long C2Tuple_BlockHashChannelManagerZ_new(byte[] a, long b);
+       // void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res);
+       public static native void C2Tuple_BlockHashChannelManagerZ_free(long _res);
+       // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelManagerZ o);
+       public static native long CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(long o);
+       // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(long e);
+       // void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res);
+       public static native void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(long _res);
        // struct LDKC2Tuple_u64u64Z C2Tuple_u64u64Z_clone(const struct LDKC2Tuple_u64u64Z *NONNULL_PTR orig);
        public static native long C2Tuple_u64u64Z_clone(long orig);
-       // void C2Tuple_u64u64Z_free(struct LDKC2Tuple_u64u64Z _res);
-       public static native void C2Tuple_u64u64Z_free(long _res);
        // struct LDKC2Tuple_u64u64Z C2Tuple_u64u64Z_new(uint64_t a, uint64_t b);
        public static native long C2Tuple_u64u64Z_new(long a, long b);
+       // void C2Tuple_u64u64Z_free(struct LDKC2Tuple_u64u64Z _res);
+       public static native void C2Tuple_u64u64Z_free(long _res);
        // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o);
        public static native long CResult_SpendableOutputDescriptorDecodeErrorZ_ok(long o);
        // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
@@ -785,14 +1171,12 @@ 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);
-       // void CVec_SignatureZ_free(struct LDKCVec_SignatureZ _res);
-       public static native void CVec_SignatureZ_free(byte[][] _res);
        // 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);
-       // void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res);
-       public static native void C2Tuple_SignatureCVec_SignatureZZ_free(long _res);
        // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b);
        public static native long C2Tuple_SignatureCVec_SignatureZZ_new(byte[] a, byte[][] b);
+       // void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res);
+       public static native void C2Tuple_SignatureCVec_SignatureZZ_free(long _res);
        // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o);
        public static native long CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(long o);
        // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void);
@@ -809,58 +1193,44 @@ public class bindings {
        public static native void CResult_SignatureNoneZ_free(long _res);
        // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_clone(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR orig);
        public static native long CResult_SignatureNoneZ_clone(long orig);
-       // struct LDKCResult_ChanKeySignerDecodeErrorZ CResult_ChanKeySignerDecodeErrorZ_ok(struct LDKChannelKeys o);
-       public static native long CResult_ChanKeySignerDecodeErrorZ_ok(long o);
-       // struct LDKCResult_ChanKeySignerDecodeErrorZ CResult_ChanKeySignerDecodeErrorZ_err(struct LDKDecodeError e);
-       public static native long CResult_ChanKeySignerDecodeErrorZ_err(long e);
-       // void CResult_ChanKeySignerDecodeErrorZ_free(struct LDKCResult_ChanKeySignerDecodeErrorZ _res);
-       public static native void CResult_ChanKeySignerDecodeErrorZ_free(long _res);
-       // struct LDKCResult_ChanKeySignerDecodeErrorZ CResult_ChanKeySignerDecodeErrorZ_clone(const struct LDKCResult_ChanKeySignerDecodeErrorZ *NONNULL_PTR orig);
-       public static native long CResult_ChanKeySignerDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_ChannelKeysDecodeErrorZ CResult_ChannelKeysDecodeErrorZ_ok(struct LDKChannelKeys o);
+       public static native long CResult_ChannelKeysDecodeErrorZ_ok(long o);
+       // struct LDKCResult_ChannelKeysDecodeErrorZ CResult_ChannelKeysDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_ChannelKeysDecodeErrorZ_err(long e);
+       // void CResult_ChannelKeysDecodeErrorZ_free(struct LDKCResult_ChannelKeysDecodeErrorZ _res);
+       public static native void CResult_ChannelKeysDecodeErrorZ_free(long _res);
+       // struct LDKCResult_ChannelKeysDecodeErrorZ CResult_ChannelKeysDecodeErrorZ_clone(const struct LDKCResult_ChannelKeysDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_ChannelKeysDecodeErrorZ_clone(long orig);
        // struct LDKCResult_InMemoryChannelKeysDecodeErrorZ CResult_InMemoryChannelKeysDecodeErrorZ_ok(struct LDKInMemoryChannelKeys o);
        public static native long CResult_InMemoryChannelKeysDecodeErrorZ_ok(long o);
        // struct LDKCResult_InMemoryChannelKeysDecodeErrorZ CResult_InMemoryChannelKeysDecodeErrorZ_err(struct LDKDecodeError e);
        public static native long CResult_InMemoryChannelKeysDecodeErrorZ_err(long e);
        // void CResult_InMemoryChannelKeysDecodeErrorZ_free(struct LDKCResult_InMemoryChannelKeysDecodeErrorZ _res);
        public static native void CResult_InMemoryChannelKeysDecodeErrorZ_free(long _res);
-       // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_ok(struct LDKTxOut o);
-       public static native long CResult_TxOutAccessErrorZ_ok(long o);
-       // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_err(enum LDKAccessError e);
-       public static native long CResult_TxOutAccessErrorZ_err(LDKAccessError e);
-       // void CResult_TxOutAccessErrorZ_free(struct LDKCResult_TxOutAccessErrorZ _res);
-       public static native void CResult_TxOutAccessErrorZ_free(long _res);
-       // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_clone(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR orig);
-       public static native long CResult_TxOutAccessErrorZ_clone(long orig);
-       // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
-       public static native long CResult_NoneAPIErrorZ_ok();
-       // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e);
-       public static native long CResult_NoneAPIErrorZ_err(long e);
-       // void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res);
-       public static native void CResult_NoneAPIErrorZ_free(long _res);
-       // void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res);
-       public static native void CVec_ChannelDetailsZ_free(long[] _res);
-       // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void);
-       public static native long CResult_NonePaymentSendFailureZ_ok();
-       // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
-       public static native long CResult_NonePaymentSendFailureZ_err(long e);
-       // void CResult_NonePaymentSendFailureZ_free(struct LDKCResult_NonePaymentSendFailureZ _res);
-       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);
-       // void CVec_NetAddressZ_free(struct LDKCVec_NetAddressZ _res);
-       public static native void CVec_NetAddressZ_free(long[] _res);
-       // void CVec_ChannelMonitorZ_free(struct LDKCVec_ChannelMonitorZ _res);
-       public static native void CVec_ChannelMonitorZ_free(long[] _res);
-       // void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res);
-       public static native void C2Tuple_BlockHashChannelManagerZ_free(long _res);
-       // struct LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b);
-       public static native long C2Tuple_BlockHashChannelManagerZ_new(byte[] a, long b);
-       // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelManagerZ o);
-       public static native long CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(long o);
-       // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e);
-       public static native long CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(long e);
-       // void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res);
-       public static native void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(long _res);
+       // struct LDKCResult_InMemoryChannelKeysDecodeErrorZ CResult_InMemoryChannelKeysDecodeErrorZ_clone(const struct LDKCResult_InMemoryChannelKeysDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_InMemoryChannelKeysDecodeErrorZ_clone(long orig);
+       // void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res);
+       public static native void CVec_RouteHopZ_free(long[] _res);
+       // void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res);
+       public static native void CVec_CVec_RouteHopZZ_free(long[][] _res);
+       // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_ok(struct LDKRoute o);
+       public static native long CResult_RouteDecodeErrorZ_ok(long o);
+       // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_RouteDecodeErrorZ_err(long e);
+       // void CResult_RouteDecodeErrorZ_free(struct LDKCResult_RouteDecodeErrorZ _res);
+       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);
+       // 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);
+       public static native long CResult_RouteLightningErrorZ_err(long e);
+       // void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _res);
+       public static native void CResult_RouteLightningErrorZ_free(long _res);
+       // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_clone(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR orig);
+       public static native long CResult_RouteLightningErrorZ_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);
@@ -875,8 +1245,8 @@ public class bindings {
        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);
-       // void CVec_u64Z_free(struct LDKCVec_u64Z _res);
-       public static native void CVec_u64Z_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);
        // void CVec_UpdateAddHTLCZ_free(struct LDKCVec_UpdateAddHTLCZ _res);
        public static native void CVec_UpdateAddHTLCZ_free(long[] _res);
        // void CVec_UpdateFulfillHTLCZ_free(struct LDKCVec_UpdateFulfillHTLCZ _res);
@@ -885,214 +1255,254 @@ public class bindings {
        public static native void CVec_UpdateFailHTLCZ_free(long[] _res);
        // void CVec_UpdateFailMalformedHTLCZ_free(struct LDKCVec_UpdateFailMalformedHTLCZ _res);
        public static native void CVec_UpdateFailMalformedHTLCZ_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);
-       public static native long CResult_boolLightningErrorZ_err(long e);
-       // void CResult_boolLightningErrorZ_free(struct LDKCResult_boolLightningErrorZ _res);
-       public static native void CResult_boolLightningErrorZ_free(long _res);
-       // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_clone(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR orig);
-       public static native long CResult_boolLightningErrorZ_clone(long orig);
-       // void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res);
-       public static native void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(long _res);
-       // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(struct LDKChannelAnnouncement a, struct LDKChannelUpdate b, struct LDKChannelUpdate c);
-       public static native long C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(long a, long b, long c);
-       // void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res);
-       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);
+       // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_ok(struct LDKAcceptChannel o);
+       public static native long CResult_AcceptChannelDecodeErrorZ_ok(long o);
+       // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_AcceptChannelDecodeErrorZ_err(long e);
+       // void CResult_AcceptChannelDecodeErrorZ_free(struct LDKCResult_AcceptChannelDecodeErrorZ _res);
+       public static native void CResult_AcceptChannelDecodeErrorZ_free(long _res);
+       // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_clone(const struct LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_AcceptChannelDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_ok(struct LDKAnnouncementSignatures o);
+       public static native long CResult_AnnouncementSignaturesDecodeErrorZ_ok(long o);
+       // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_AnnouncementSignaturesDecodeErrorZ_err(long e);
+       // void CResult_AnnouncementSignaturesDecodeErrorZ_free(struct LDKCResult_AnnouncementSignaturesDecodeErrorZ _res);
+       public static native void CResult_AnnouncementSignaturesDecodeErrorZ_free(long _res);
+       // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_clone(const struct LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_AnnouncementSignaturesDecodeErrorZ_clone(long orig);
        // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_ok(struct LDKChannelReestablish o);
        public static native long CResult_ChannelReestablishDecodeErrorZ_ok(long o);
        // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_err(struct LDKDecodeError e);
        public static native long CResult_ChannelReestablishDecodeErrorZ_err(long e);
        // void CResult_ChannelReestablishDecodeErrorZ_free(struct LDKCResult_ChannelReestablishDecodeErrorZ _res);
        public static native void CResult_ChannelReestablishDecodeErrorZ_free(long _res);
+       // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_clone(const struct LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_ChannelReestablishDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_ok(struct LDKClosingSigned o);
+       public static native long CResult_ClosingSignedDecodeErrorZ_ok(long o);
+       // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_ClosingSignedDecodeErrorZ_err(long e);
+       // void CResult_ClosingSignedDecodeErrorZ_free(struct LDKCResult_ClosingSignedDecodeErrorZ _res);
+       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_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);
+       public static native long CResult_CommitmentSignedDecodeErrorZ_err(long e);
+       // void CResult_CommitmentSignedDecodeErrorZ_free(struct LDKCResult_CommitmentSignedDecodeErrorZ _res);
+       public static native void CResult_CommitmentSignedDecodeErrorZ_free(long _res);
+       // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_clone(const struct LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_CommitmentSignedDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_ok(struct LDKFundingCreated o);
+       public static native long CResult_FundingCreatedDecodeErrorZ_ok(long o);
+       // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_FundingCreatedDecodeErrorZ_err(long e);
+       // void CResult_FundingCreatedDecodeErrorZ_free(struct LDKCResult_FundingCreatedDecodeErrorZ _res);
+       public static native void CResult_FundingCreatedDecodeErrorZ_free(long _res);
+       // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_clone(const struct LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_FundingCreatedDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_ok(struct LDKFundingSigned o);
+       public static native long CResult_FundingSignedDecodeErrorZ_ok(long o);
+       // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_FundingSignedDecodeErrorZ_err(long e);
+       // void CResult_FundingSignedDecodeErrorZ_free(struct LDKCResult_FundingSignedDecodeErrorZ _res);
+       public static native void CResult_FundingSignedDecodeErrorZ_free(long _res);
+       // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_clone(const struct LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_FundingSignedDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_ok(struct LDKFundingLocked o);
+       public static native long CResult_FundingLockedDecodeErrorZ_ok(long o);
+       // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_FundingLockedDecodeErrorZ_err(long e);
+       // void CResult_FundingLockedDecodeErrorZ_free(struct LDKCResult_FundingLockedDecodeErrorZ _res);
+       public static native void CResult_FundingLockedDecodeErrorZ_free(long _res);
+       // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_clone(const struct LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_FundingLockedDecodeErrorZ_clone(long orig);
        // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_ok(struct LDKInit o);
        public static native long CResult_InitDecodeErrorZ_ok(long o);
        // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_err(struct LDKDecodeError e);
        public static native long CResult_InitDecodeErrorZ_err(long e);
        // void CResult_InitDecodeErrorZ_free(struct LDKCResult_InitDecodeErrorZ _res);
        public static native void CResult_InitDecodeErrorZ_free(long _res);
+       // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_clone(const struct LDKCResult_InitDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_InitDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_ok(struct LDKOpenChannel o);
+       public static native long CResult_OpenChannelDecodeErrorZ_ok(long o);
+       // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_OpenChannelDecodeErrorZ_err(long e);
+       // void CResult_OpenChannelDecodeErrorZ_free(struct LDKCResult_OpenChannelDecodeErrorZ _res);
+       public static native void CResult_OpenChannelDecodeErrorZ_free(long _res);
+       // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_clone(const struct LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_OpenChannelDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_ok(struct LDKRevokeAndACK o);
+       public static native long CResult_RevokeAndACKDecodeErrorZ_ok(long o);
+       // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_RevokeAndACKDecodeErrorZ_err(long e);
+       // void CResult_RevokeAndACKDecodeErrorZ_free(struct LDKCResult_RevokeAndACKDecodeErrorZ _res);
+       public static native void CResult_RevokeAndACKDecodeErrorZ_free(long _res);
+       // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_clone(const struct LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_RevokeAndACKDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_ok(struct LDKShutdown o);
+       public static native long CResult_ShutdownDecodeErrorZ_ok(long o);
+       // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_ShutdownDecodeErrorZ_err(long e);
+       // void CResult_ShutdownDecodeErrorZ_free(struct LDKCResult_ShutdownDecodeErrorZ _res);
+       public static native void CResult_ShutdownDecodeErrorZ_free(long _res);
+       // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_clone(const struct LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_ShutdownDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_ok(struct LDKUpdateFailHTLC o);
+       public static native long CResult_UpdateFailHTLCDecodeErrorZ_ok(long o);
+       // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_UpdateFailHTLCDecodeErrorZ_err(long e);
+       // void CResult_UpdateFailHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailHTLCDecodeErrorZ _res);
+       public static native void CResult_UpdateFailHTLCDecodeErrorZ_free(long _res);
+       // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_UpdateFailHTLCDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(struct LDKUpdateFailMalformedHTLC o);
+       public static native long CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(long o);
+       // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(long e);
+       // void CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ _res);
+       public static native void CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(long _res);
+       // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_ok(struct LDKUpdateFee o);
+       public static native long CResult_UpdateFeeDecodeErrorZ_ok(long o);
+       // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_UpdateFeeDecodeErrorZ_err(long e);
+       // void CResult_UpdateFeeDecodeErrorZ_free(struct LDKCResult_UpdateFeeDecodeErrorZ _res);
+       public static native void CResult_UpdateFeeDecodeErrorZ_free(long _res);
+       // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_clone(const struct LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_UpdateFeeDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_ok(struct LDKUpdateFulfillHTLC o);
+       public static native long CResult_UpdateFulfillHTLCDecodeErrorZ_ok(long o);
+       // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_UpdateFulfillHTLCDecodeErrorZ_err(long e);
+       // void CResult_UpdateFulfillHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ _res);
+       public static native void CResult_UpdateFulfillHTLCDecodeErrorZ_free(long _res);
+       // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_UpdateFulfillHTLCDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_ok(struct LDKUpdateAddHTLC o);
+       public static native long CResult_UpdateAddHTLCDecodeErrorZ_ok(long o);
+       // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_UpdateAddHTLCDecodeErrorZ_err(long e);
+       // void CResult_UpdateAddHTLCDecodeErrorZ_free(struct LDKCResult_UpdateAddHTLCDecodeErrorZ _res);
+       public static native void CResult_UpdateAddHTLCDecodeErrorZ_free(long _res);
+       // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_UpdateAddHTLCDecodeErrorZ_clone(long orig);
        // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_ok(struct LDKPing o);
        public static native long CResult_PingDecodeErrorZ_ok(long o);
        // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_err(struct LDKDecodeError e);
        public static native long CResult_PingDecodeErrorZ_err(long e);
        // void CResult_PingDecodeErrorZ_free(struct LDKCResult_PingDecodeErrorZ _res);
        public static native void CResult_PingDecodeErrorZ_free(long _res);
+       // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_clone(const struct LDKCResult_PingDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_PingDecodeErrorZ_clone(long orig);
        // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_ok(struct LDKPong o);
        public static native long CResult_PongDecodeErrorZ_ok(long o);
        // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_err(struct LDKDecodeError e);
        public static native long CResult_PongDecodeErrorZ_err(long e);
        // void CResult_PongDecodeErrorZ_free(struct LDKCResult_PongDecodeErrorZ _res);
        public static native void CResult_PongDecodeErrorZ_free(long _res);
+       // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_clone(const struct LDKCResult_PongDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_PongDecodeErrorZ_clone(long orig);
        // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(struct LDKUnsignedChannelAnnouncement o);
        public static native long CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(long o);
        // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
        public static native long CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(long e);
        // void CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res);
        public static native void CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(long _res);
+       // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_ok(struct LDKChannelAnnouncement o);
+       public static native long CResult_ChannelAnnouncementDecodeErrorZ_ok(long o);
+       // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_ChannelAnnouncementDecodeErrorZ_err(long e);
+       // void CResult_ChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_ChannelAnnouncementDecodeErrorZ _res);
+       public static native void CResult_ChannelAnnouncementDecodeErrorZ_free(long _res);
+       // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_ChannelAnnouncementDecodeErrorZ_clone(long orig);
        // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_ok(struct LDKUnsignedChannelUpdate o);
        public static native long CResult_UnsignedChannelUpdateDecodeErrorZ_ok(long o);
        // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
        public static native long CResult_UnsignedChannelUpdateDecodeErrorZ_err(long e);
        // void CResult_UnsignedChannelUpdateDecodeErrorZ_free(struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res);
        public static native void CResult_UnsignedChannelUpdateDecodeErrorZ_free(long _res);
+       // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_UnsignedChannelUpdateDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_ok(struct LDKChannelUpdate o);
+       public static native long CResult_ChannelUpdateDecodeErrorZ_ok(long o);
+       // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_ChannelUpdateDecodeErrorZ_err(long e);
+       // void CResult_ChannelUpdateDecodeErrorZ_free(struct LDKCResult_ChannelUpdateDecodeErrorZ _res);
+       public static native void CResult_ChannelUpdateDecodeErrorZ_free(long _res);
+       // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_ChannelUpdateDecodeErrorZ_clone(long orig);
        // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_ok(struct LDKErrorMessage o);
        public static native long CResult_ErrorMessageDecodeErrorZ_ok(long o);
        // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_err(struct LDKDecodeError e);
        public static native long CResult_ErrorMessageDecodeErrorZ_err(long e);
        // void CResult_ErrorMessageDecodeErrorZ_free(struct LDKCResult_ErrorMessageDecodeErrorZ _res);
        public static native void CResult_ErrorMessageDecodeErrorZ_free(long _res);
+       // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_clone(const struct LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_ErrorMessageDecodeErrorZ_clone(long orig);
        // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(struct LDKUnsignedNodeAnnouncement o);
        public static native long CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(long o);
        // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
        public static native long CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(long e);
-       // void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res);
-       public static native void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(long _res);
-       // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_ok(struct LDKQueryShortChannelIds o);
-       public static native long CResult_QueryShortChannelIdsDecodeErrorZ_ok(long o);
-       // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_err(struct LDKDecodeError e);
-       public static native long CResult_QueryShortChannelIdsDecodeErrorZ_err(long e);
-       // void CResult_QueryShortChannelIdsDecodeErrorZ_free(struct LDKCResult_QueryShortChannelIdsDecodeErrorZ _res);
-       public static native void CResult_QueryShortChannelIdsDecodeErrorZ_free(long _res);
-       // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(struct LDKReplyShortChannelIdsEnd o);
-       public static native long CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(long o);
-       // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(struct LDKDecodeError e);
-       public static native long CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(long e);
-       // void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res);
-       public static native void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(long _res);
-       // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_ok(struct LDKQueryChannelRange o);
-       public static native long CResult_QueryChannelRangeDecodeErrorZ_ok(long o);
-       // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
-       public static native long CResult_QueryChannelRangeDecodeErrorZ_err(long e);
-       // void CResult_QueryChannelRangeDecodeErrorZ_free(struct LDKCResult_QueryChannelRangeDecodeErrorZ _res);
-       public static native void CResult_QueryChannelRangeDecodeErrorZ_free(long _res);
-       // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_ok(struct LDKReplyChannelRange o);
-       public static native long CResult_ReplyChannelRangeDecodeErrorZ_ok(long o);
-       // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
-       public static native long CResult_ReplyChannelRangeDecodeErrorZ_err(long e);
-       // void CResult_ReplyChannelRangeDecodeErrorZ_free(struct LDKCResult_ReplyChannelRangeDecodeErrorZ _res);
-       public static native void CResult_ReplyChannelRangeDecodeErrorZ_free(long _res);
-       // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_ok(struct LDKGossipTimestampFilter o);
-       public static native long CResult_GossipTimestampFilterDecodeErrorZ_ok(long o);
-       // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_err(struct LDKDecodeError e);
-       public static native long CResult_GossipTimestampFilterDecodeErrorZ_err(long e);
-       // void CResult_GossipTimestampFilterDecodeErrorZ_free(struct LDKCResult_GossipTimestampFilterDecodeErrorZ _res);
-       public static native void CResult_GossipTimestampFilterDecodeErrorZ_free(long _res);
-       // void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res);
-       public static native void CVec_PublicKeyZ_free(byte[][] _res);
-       // void CVec_u8Z_free(struct LDKCVec_u8Z _res);
-       public static native void CVec_u8Z_free(byte[] _res);
-       // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o);
-       public static native long CResult_CVec_u8ZPeerHandleErrorZ_ok(byte[] o);
-       // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_err(struct LDKPeerHandleError e);
-       public static native long CResult_CVec_u8ZPeerHandleErrorZ_err(long e);
-       // void CResult_CVec_u8ZPeerHandleErrorZ_free(struct LDKCResult_CVec_u8ZPeerHandleErrorZ _res);
-       public static native void CResult_CVec_u8ZPeerHandleErrorZ_free(long _res);
-       // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_clone(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR orig);
-       public static native long CResult_CVec_u8ZPeerHandleErrorZ_clone(long orig);
-       // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_ok(void);
-       public static native long CResult_NonePeerHandleErrorZ_ok();
-       // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_err(struct LDKPeerHandleError e);
-       public static native long CResult_NonePeerHandleErrorZ_err(long e);
-       // void CResult_NonePeerHandleErrorZ_free(struct LDKCResult_NonePeerHandleErrorZ _res);
-       public static native void CResult_NonePeerHandleErrorZ_free(long _res);
-       // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_clone(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR orig);
-       public static native long CResult_NonePeerHandleErrorZ_clone(long orig);
-       // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_ok(bool o);
-       public static native long CResult_boolPeerHandleErrorZ_ok(boolean o);
-       // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_err(struct LDKPeerHandleError e);
-       public static native long CResult_boolPeerHandleErrorZ_err(long e);
-       // void CResult_boolPeerHandleErrorZ_free(struct LDKCResult_boolPeerHandleErrorZ _res);
-       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_SecretKeySecpErrorZ CResult_SecretKeySecpErrorZ_ok(struct LDKSecretKey o);
-       public static native long CResult_SecretKeySecpErrorZ_ok(byte[] o);
-       // struct LDKCResult_SecretKeySecpErrorZ CResult_SecretKeySecpErrorZ_err(enum LDKSecp256k1Error e);
-       public static native long CResult_SecretKeySecpErrorZ_err(LDKSecp256k1Error e);
-       // void CResult_SecretKeySecpErrorZ_free(struct LDKCResult_SecretKeySecpErrorZ _res);
-       public static native void CResult_SecretKeySecpErrorZ_free(long _res);
-       // struct LDKCResult_PublicKeySecpErrorZ CResult_PublicKeySecpErrorZ_ok(struct LDKPublicKey o);
-       public static native long CResult_PublicKeySecpErrorZ_ok(byte[] o);
-       // struct LDKCResult_PublicKeySecpErrorZ CResult_PublicKeySecpErrorZ_err(enum LDKSecp256k1Error e);
-       public static native long CResult_PublicKeySecpErrorZ_err(LDKSecp256k1Error e);
-       // void CResult_PublicKeySecpErrorZ_free(struct LDKCResult_PublicKeySecpErrorZ _res);
-       public static native void CResult_PublicKeySecpErrorZ_free(long _res);
-       // struct LDKCResult_TxCreationKeysSecpErrorZ CResult_TxCreationKeysSecpErrorZ_ok(struct LDKTxCreationKeys o);
-       public static native long CResult_TxCreationKeysSecpErrorZ_ok(long o);
-       // struct LDKCResult_TxCreationKeysSecpErrorZ CResult_TxCreationKeysSecpErrorZ_err(enum LDKSecp256k1Error e);
-       public static native long CResult_TxCreationKeysSecpErrorZ_err(LDKSecp256k1Error e);
-       // void CResult_TxCreationKeysSecpErrorZ_free(struct LDKCResult_TxCreationKeysSecpErrorZ _res);
-       public static native void CResult_TxCreationKeysSecpErrorZ_free(long _res);
-       // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_ok(struct LDKTrustedCommitmentTransaction o);
-       public static native long CResult_TrustedCommitmentTransactionNoneZ_ok(long o);
-       // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_err(void);
-       public static native long CResult_TrustedCommitmentTransactionNoneZ_err();
-       // void CResult_TrustedCommitmentTransactionNoneZ_free(struct LDKCResult_TrustedCommitmentTransactionNoneZ _res);
-       public static native void CResult_TrustedCommitmentTransactionNoneZ_free(long _res);
-       // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_ok(struct LDKCVec_SignatureZ o);
-       public static native long CResult_CVec_SignatureZNoneZ_ok(byte[][] o);
-       // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_err(void);
-       public static native long CResult_CVec_SignatureZNoneZ_err();
-       // void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res);
-       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);
-       // void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res);
-       public static native void CVec_RouteHopZ_free(long[] _res);
-       // void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res);
-       public static native void CVec_CVec_RouteHopZZ_free(long[][] _res);
-       // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_ok(struct LDKRoute o);
-       public static native long CResult_RouteDecodeErrorZ_ok(long o);
-       // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_err(struct LDKDecodeError e);
-       public static native long CResult_RouteDecodeErrorZ_err(long e);
-       // void CResult_RouteDecodeErrorZ_free(struct LDKCResult_RouteDecodeErrorZ _res);
-       public static native void CResult_RouteDecodeErrorZ_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);
-       public static native long CResult_RouteLightningErrorZ_err(long e);
-       // void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _res);
-       public static native void CResult_RouteLightningErrorZ_free(long _res);
-       // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_ok(struct LDKRoutingFees o);
-       public static native long CResult_RoutingFeesDecodeErrorZ_ok(long o);
-       // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_err(struct LDKDecodeError e);
-       public static native long CResult_RoutingFeesDecodeErrorZ_err(long e);
-       // void CResult_RoutingFeesDecodeErrorZ_free(struct LDKCResult_RoutingFeesDecodeErrorZ _res);
-       public static native void CResult_RoutingFeesDecodeErrorZ_free(long _res);
-       // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_ok(struct LDKNodeAnnouncementInfo o);
-       public static native long CResult_NodeAnnouncementInfoDecodeErrorZ_ok(long o);
-       // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_err(struct LDKDecodeError e);
-       public static native long CResult_NodeAnnouncementInfoDecodeErrorZ_err(long e);
-       // void CResult_NodeAnnouncementInfoDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res);
-       public static native void CResult_NodeAnnouncementInfoDecodeErrorZ_free(long _res);
-       // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR orig);
-       public static native long CResult_NodeAnnouncementInfoDecodeErrorZ_clone(long orig);
-       // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_ok(struct LDKNodeInfo o);
-       public static native long CResult_NodeInfoDecodeErrorZ_ok(long o);
-       // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_err(struct LDKDecodeError e);
-       public static native long CResult_NodeInfoDecodeErrorZ_err(long e);
-       // void CResult_NodeInfoDecodeErrorZ_free(struct LDKCResult_NodeInfoDecodeErrorZ _res);
-       public static native void CResult_NodeInfoDecodeErrorZ_free(long _res);
-       // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_clone(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR orig);
-       public static native long CResult_NodeInfoDecodeErrorZ_clone(long orig);
-       // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_ok(struct LDKNetworkGraph o);
-       public static native long CResult_NetworkGraphDecodeErrorZ_ok(long o);
-       // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_err(struct LDKDecodeError e);
-       public static native long CResult_NetworkGraphDecodeErrorZ_err(long e);
-       // void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res);
-       public static native void CResult_NetworkGraphDecodeErrorZ_free(long _res);
+       // void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res);
+       public static native void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(long _res);
+       // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_ok(struct LDKNodeAnnouncement o);
+       public static native long CResult_NodeAnnouncementDecodeErrorZ_ok(long o);
+       // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_NodeAnnouncementDecodeErrorZ_err(long e);
+       // void CResult_NodeAnnouncementDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementDecodeErrorZ _res);
+       public static native void CResult_NodeAnnouncementDecodeErrorZ_free(long _res);
+       // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_NodeAnnouncementDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_ok(struct LDKQueryShortChannelIds o);
+       public static native long CResult_QueryShortChannelIdsDecodeErrorZ_ok(long o);
+       // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_QueryShortChannelIdsDecodeErrorZ_err(long e);
+       // void CResult_QueryShortChannelIdsDecodeErrorZ_free(struct LDKCResult_QueryShortChannelIdsDecodeErrorZ _res);
+       public static native void CResult_QueryShortChannelIdsDecodeErrorZ_free(long _res);
+       // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_clone(const struct LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_QueryShortChannelIdsDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(struct LDKReplyShortChannelIdsEnd o);
+       public static native long CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(long o);
+       // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(long e);
+       // void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res);
+       public static native void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(long _res);
+       // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(const struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_ok(struct LDKQueryChannelRange o);
+       public static native long CResult_QueryChannelRangeDecodeErrorZ_ok(long o);
+       // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_QueryChannelRangeDecodeErrorZ_err(long e);
+       // void CResult_QueryChannelRangeDecodeErrorZ_free(struct LDKCResult_QueryChannelRangeDecodeErrorZ _res);
+       public static native void CResult_QueryChannelRangeDecodeErrorZ_free(long _res);
+       // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_clone(const struct LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_QueryChannelRangeDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_ok(struct LDKReplyChannelRange o);
+       public static native long CResult_ReplyChannelRangeDecodeErrorZ_ok(long o);
+       // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_ReplyChannelRangeDecodeErrorZ_err(long e);
+       // void CResult_ReplyChannelRangeDecodeErrorZ_free(struct LDKCResult_ReplyChannelRangeDecodeErrorZ _res);
+       public static native void CResult_ReplyChannelRangeDecodeErrorZ_free(long _res);
+       // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_clone(const struct LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_ReplyChannelRangeDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_ok(struct LDKGossipTimestampFilter o);
+       public static native long CResult_GossipTimestampFilterDecodeErrorZ_ok(long o);
+       // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_GossipTimestampFilterDecodeErrorZ_err(long e);
+       // void CResult_GossipTimestampFilterDecodeErrorZ_free(struct LDKCResult_GossipTimestampFilterDecodeErrorZ _res);
+       public static native void CResult_GossipTimestampFilterDecodeErrorZ_free(long _res);
+       // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_clone(const struct LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_GossipTimestampFilterDecodeErrorZ_clone(long orig);
        // 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);
@@ -1119,8 +1529,6 @@ public class bindings {
        public static native void Logger_free(long this_ptr);
        // void ChannelHandshakeConfig_free(struct LDKChannelHandshakeConfig this_ptr);
        public static native void ChannelHandshakeConfig_free(long this_ptr);
-       // struct LDKChannelHandshakeConfig ChannelHandshakeConfig_clone(const struct LDKChannelHandshakeConfig *NONNULL_PTR orig);
-       public static native long ChannelHandshakeConfig_clone(long orig);
        // uint32_t ChannelHandshakeConfig_get_minimum_depth(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
        public static native int ChannelHandshakeConfig_get_minimum_depth(long this_ptr);
        // void ChannelHandshakeConfig_set_minimum_depth(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint32_t val);
@@ -1135,12 +1543,12 @@ public class bindings {
        public static native void ChannelHandshakeConfig_set_our_htlc_minimum_msat(long this_ptr, long val);
        // MUST_USE_RES struct LDKChannelHandshakeConfig ChannelHandshakeConfig_new(uint32_t minimum_depth_arg, uint16_t our_to_self_delay_arg, uint64_t our_htlc_minimum_msat_arg);
        public static native long ChannelHandshakeConfig_new(int minimum_depth_arg, short our_to_self_delay_arg, long our_htlc_minimum_msat_arg);
+       // struct LDKChannelHandshakeConfig ChannelHandshakeConfig_clone(const struct LDKChannelHandshakeConfig *NONNULL_PTR orig);
+       public static native long ChannelHandshakeConfig_clone(long orig);
        // MUST_USE_RES struct LDKChannelHandshakeConfig ChannelHandshakeConfig_default(void);
        public static native long ChannelHandshakeConfig_default();
        // void ChannelHandshakeLimits_free(struct LDKChannelHandshakeLimits this_ptr);
        public static native void ChannelHandshakeLimits_free(long this_ptr);
-       // struct LDKChannelHandshakeLimits ChannelHandshakeLimits_clone(const struct LDKChannelHandshakeLimits *NONNULL_PTR orig);
-       public static native long ChannelHandshakeLimits_clone(long orig);
        // uint64_t ChannelHandshakeLimits_get_min_funding_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
        public static native long ChannelHandshakeLimits_get_min_funding_satoshis(long this_ptr);
        // void ChannelHandshakeLimits_set_min_funding_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
@@ -1183,12 +1591,12 @@ public class bindings {
        public static native void ChannelHandshakeLimits_set_their_to_self_delay(long this_ptr, short val);
        // MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_new(uint64_t min_funding_satoshis_arg, uint64_t max_htlc_minimum_msat_arg, uint64_t min_max_htlc_value_in_flight_msat_arg, uint64_t max_channel_reserve_satoshis_arg, uint16_t min_max_accepted_htlcs_arg, uint64_t min_dust_limit_satoshis_arg, uint64_t max_dust_limit_satoshis_arg, uint32_t max_minimum_depth_arg, bool force_announced_channel_preference_arg, uint16_t their_to_self_delay_arg);
        public static native long ChannelHandshakeLimits_new(long min_funding_satoshis_arg, long max_htlc_minimum_msat_arg, long min_max_htlc_value_in_flight_msat_arg, long max_channel_reserve_satoshis_arg, short min_max_accepted_htlcs_arg, long min_dust_limit_satoshis_arg, long max_dust_limit_satoshis_arg, int max_minimum_depth_arg, boolean force_announced_channel_preference_arg, short their_to_self_delay_arg);
+       // struct LDKChannelHandshakeLimits ChannelHandshakeLimits_clone(const struct LDKChannelHandshakeLimits *NONNULL_PTR orig);
+       public static native long ChannelHandshakeLimits_clone(long orig);
        // MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_default(void);
        public static native long ChannelHandshakeLimits_default();
        // void ChannelConfig_free(struct LDKChannelConfig this_ptr);
        public static native void ChannelConfig_free(long this_ptr);
-       // struct LDKChannelConfig ChannelConfig_clone(const struct LDKChannelConfig *NONNULL_PTR orig);
-       public static native long ChannelConfig_clone(long orig);
        // uint32_t ChannelConfig_get_fee_proportional_millionths(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
        public static native int ChannelConfig_get_fee_proportional_millionths(long this_ptr);
        // void ChannelConfig_set_fee_proportional_millionths(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
@@ -1203,16 +1611,16 @@ public class bindings {
        public static native void ChannelConfig_set_commit_upfront_shutdown_pubkey(long this_ptr, boolean val);
        // MUST_USE_RES struct LDKChannelConfig ChannelConfig_new(uint32_t fee_proportional_millionths_arg, bool announced_channel_arg, bool commit_upfront_shutdown_pubkey_arg);
        public static native long ChannelConfig_new(int fee_proportional_millionths_arg, boolean announced_channel_arg, boolean commit_upfront_shutdown_pubkey_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);
        public static native long ChannelConfig_default();
        // struct LDKCVec_u8Z ChannelConfig_write(const struct LDKChannelConfig *NONNULL_PTR obj);
        public static native byte[] ChannelConfig_write(long obj);
-       // struct LDKChannelConfig ChannelConfig_read(struct LDKu8slice ser);
+       // struct LDKCResult_ChannelConfigDecodeErrorZ ChannelConfig_read(struct LDKu8slice ser);
        public static native long ChannelConfig_read(byte[] ser);
        // void UserConfig_free(struct LDKUserConfig this_ptr);
        public static native void UserConfig_free(long this_ptr);
-       // struct LDKUserConfig UserConfig_clone(const struct LDKUserConfig *NONNULL_PTR orig);
-       public static native long UserConfig_clone(long orig);
        // struct LDKChannelHandshakeConfig UserConfig_get_own_channel_config(const struct LDKUserConfig *NONNULL_PTR this_ptr);
        public static native long UserConfig_get_own_channel_config(long this_ptr);
        // void UserConfig_set_own_channel_config(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeConfig val);
@@ -1227,6 +1635,8 @@ public class bindings {
        public static native void UserConfig_set_channel_options(long this_ptr, long val);
        // MUST_USE_RES struct LDKUserConfig UserConfig_new(struct LDKChannelHandshakeConfig own_channel_config_arg, struct LDKChannelHandshakeLimits peer_channel_config_limits_arg, struct LDKChannelConfig channel_options_arg);
        public static native long UserConfig_new(long own_channel_config_arg, long peer_channel_config_limits_arg, long channel_options_arg);
+       // struct LDKUserConfig UserConfig_clone(const struct LDKUserConfig *NONNULL_PTR orig);
+       public static native long UserConfig_clone(long orig);
        // MUST_USE_RES struct LDKUserConfig UserConfig_default(void);
        public static native long UserConfig_default();
        // enum LDKAccessError AccessError_clone(const enum LDKAccessError *NONNULL_PTR orig);
@@ -1257,12 +1667,12 @@ public class bindings {
        public static native long ChainMonitor_as_EventsProvider(long this_arg);
        // void ChannelMonitorUpdate_free(struct LDKChannelMonitorUpdate this_ptr);
        public static native void ChannelMonitorUpdate_free(long this_ptr);
-       // struct LDKChannelMonitorUpdate ChannelMonitorUpdate_clone(const struct LDKChannelMonitorUpdate *NONNULL_PTR orig);
-       public static native long ChannelMonitorUpdate_clone(long orig);
        // uint64_t ChannelMonitorUpdate_get_update_id(const struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr);
        public static native long ChannelMonitorUpdate_get_update_id(long this_ptr);
        // void ChannelMonitorUpdate_set_update_id(struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr, uint64_t val);
        public static native void ChannelMonitorUpdate_set_update_id(long this_ptr, long val);
+       // struct LDKChannelMonitorUpdate ChannelMonitorUpdate_clone(const struct LDKChannelMonitorUpdate *NONNULL_PTR orig);
+       public static native long ChannelMonitorUpdate_clone(long orig);
        // struct LDKCVec_u8Z ChannelMonitorUpdate_write(const struct LDKChannelMonitorUpdate *NONNULL_PTR obj);
        public static native byte[] ChannelMonitorUpdate_write(long obj);
        // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ ChannelMonitorUpdate_read(struct LDKu8slice ser);
@@ -1283,7 +1693,7 @@ public class bindings {
        public static native long HTLCUpdate_clone(long orig);
        // struct LDKCVec_u8Z HTLCUpdate_write(const struct LDKHTLCUpdate *NONNULL_PTR obj);
        public static native byte[] HTLCUpdate_write(long obj);
-       // struct LDKHTLCUpdate HTLCUpdate_read(struct LDKu8slice ser);
+       // struct LDKCResult_HTLCUpdateDecodeErrorZ HTLCUpdate_read(struct LDKu8slice ser);
        public static native long HTLCUpdate_read(byte[] ser);
        // void ChannelMonitor_free(struct LDKChannelMonitor this_ptr);
        public static native void ChannelMonitor_free(long this_ptr);
@@ -1313,8 +1723,6 @@ public class bindings {
        public static native long C2Tuple_BlockHashChannelMonitorZ_read(byte[] ser, long arg);
        // void OutPoint_free(struct LDKOutPoint this_ptr);
        public static native void OutPoint_free(long this_ptr);
-       // struct LDKOutPoint OutPoint_clone(const struct LDKOutPoint *NONNULL_PTR orig);
-       public static native long OutPoint_clone(long orig);
        // const uint8_t (*OutPoint_get_txid(const struct LDKOutPoint *NONNULL_PTR this_ptr))[32];
        public static native byte[] OutPoint_get_txid(long this_ptr);
        // void OutPoint_set_txid(struct LDKOutPoint *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
@@ -1325,11 +1733,13 @@ public class bindings {
        public static native void OutPoint_set_index(long this_ptr, short val);
        // MUST_USE_RES struct LDKOutPoint OutPoint_new(struct LDKThirtyTwoBytes txid_arg, uint16_t index_arg);
        public static native long OutPoint_new(byte[] txid_arg, short index_arg);
+       // struct LDKOutPoint OutPoint_clone(const struct LDKOutPoint *NONNULL_PTR orig);
+       public static native long OutPoint_clone(long orig);
        // MUST_USE_RES struct LDKThirtyTwoBytes OutPoint_to_channel_id(const struct LDKOutPoint *NONNULL_PTR this_arg);
        public static native byte[] OutPoint_to_channel_id(long this_arg);
        // struct LDKCVec_u8Z OutPoint_write(const struct LDKOutPoint *NONNULL_PTR obj);
        public static native byte[] OutPoint_write(long obj);
-       // struct LDKOutPoint OutPoint_read(struct LDKu8slice ser);
+       // struct LDKCResult_OutPointDecodeErrorZ OutPoint_read(struct LDKu8slice ser);
        public static native long OutPoint_read(byte[] ser);
        // void SpendableOutputDescriptor_free(struct LDKSpendableOutputDescriptor this_ptr);
        public static native void SpendableOutputDescriptor_free(long this_ptr);
@@ -1347,8 +1757,6 @@ public class bindings {
        public static native void KeysInterface_free(long this_ptr);
        // void InMemoryChannelKeys_free(struct LDKInMemoryChannelKeys this_ptr);
        public static native void InMemoryChannelKeys_free(long this_ptr);
-       // struct LDKInMemoryChannelKeys InMemoryChannelKeys_clone(const struct LDKInMemoryChannelKeys *NONNULL_PTR orig);
-       public static native long InMemoryChannelKeys_clone(long orig);
        // const uint8_t (*InMemoryChannelKeys_get_funding_key(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr))[32];
        public static native byte[] InMemoryChannelKeys_get_funding_key(long this_ptr);
        // void InMemoryChannelKeys_set_funding_key(struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr, struct LDKSecretKey val);
@@ -1373,6 +1781,8 @@ public class bindings {
        public static native byte[] InMemoryChannelKeys_get_commitment_seed(long this_ptr);
        // void InMemoryChannelKeys_set_commitment_seed(struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
        public static native void InMemoryChannelKeys_set_commitment_seed(long this_ptr, byte[] val);
+       // struct LDKInMemoryChannelKeys InMemoryChannelKeys_clone(const struct LDKInMemoryChannelKeys *NONNULL_PTR orig);
+       public static native long InMemoryChannelKeys_clone(long orig);
        // MUST_USE_RES struct LDKInMemoryChannelKeys InMemoryChannelKeys_new(struct LDKSecretKey funding_key, struct LDKSecretKey revocation_base_key, struct LDKSecretKey payment_key, struct LDKSecretKey delayed_payment_base_key, struct LDKSecretKey htlc_base_key, struct LDKThirtyTwoBytes commitment_seed, uint64_t channel_value_satoshis, struct LDKC2Tuple_u64u64Z key_derivation_params);
        public static native long InMemoryChannelKeys_new(byte[] funding_key, byte[] revocation_base_key, byte[] payment_key, byte[] delayed_payment_base_key, byte[] htlc_base_key, byte[] commitment_seed, long channel_value_satoshis, long key_derivation_params);
        // MUST_USE_RES struct LDKChannelPublicKeys InMemoryChannelKeys_counterparty_pubkeys(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_arg);
@@ -1405,8 +1815,6 @@ public class bindings {
        public static native void ChannelManager_free(long this_ptr);
        // void ChannelDetails_free(struct LDKChannelDetails this_ptr);
        public static native void ChannelDetails_free(long this_ptr);
-       // struct LDKChannelDetails ChannelDetails_clone(const struct LDKChannelDetails *NONNULL_PTR orig);
-       public static native long ChannelDetails_clone(long orig);
        // const uint8_t (*ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr))[32];
        public static native byte[] ChannelDetails_get_channel_id(long this_ptr);
        // void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
@@ -1439,6 +1847,8 @@ public class bindings {
        public static native boolean ChannelDetails_get_is_live(long this_ptr);
        // void ChannelDetails_set_is_live(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
        public static native void ChannelDetails_set_is_live(long this_ptr, boolean val);
+       // 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);
@@ -1527,8 +1937,6 @@ public class bindings {
        public static native long Init_clone(long orig);
        // void ErrorMessage_free(struct LDKErrorMessage this_ptr);
        public static native void ErrorMessage_free(long this_ptr);
-       // struct LDKErrorMessage ErrorMessage_clone(const struct LDKErrorMessage *NONNULL_PTR orig);
-       public static native long ErrorMessage_clone(long orig);
        // const uint8_t (*ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr))[32];
        public static native byte[] ErrorMessage_get_channel_id(long this_ptr);
        // void ErrorMessage_set_channel_id(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
@@ -1539,10 +1947,10 @@ public class bindings {
        public static native void ErrorMessage_set_data(long this_ptr, byte[] val);
        // MUST_USE_RES struct LDKErrorMessage ErrorMessage_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z data_arg);
        public static native long ErrorMessage_new(byte[] channel_id_arg, byte[] data_arg);
+       // struct LDKErrorMessage ErrorMessage_clone(const struct LDKErrorMessage *NONNULL_PTR orig);
+       public static native long ErrorMessage_clone(long orig);
        // void Ping_free(struct LDKPing this_ptr);
        public static native void Ping_free(long this_ptr);
-       // struct LDKPing Ping_clone(const struct LDKPing *NONNULL_PTR orig);
-       public static native long Ping_clone(long orig);
        // uint16_t Ping_get_ponglen(const struct LDKPing *NONNULL_PTR this_ptr);
        public static native short Ping_get_ponglen(long this_ptr);
        // void Ping_set_ponglen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
@@ -1553,20 +1961,20 @@ public class bindings {
        public static native void Ping_set_byteslen(long this_ptr, short val);
        // MUST_USE_RES struct LDKPing Ping_new(uint16_t ponglen_arg, uint16_t byteslen_arg);
        public static native long Ping_new(short ponglen_arg, short byteslen_arg);
+       // struct LDKPing Ping_clone(const struct LDKPing *NONNULL_PTR orig);
+       public static native long Ping_clone(long orig);
        // void Pong_free(struct LDKPong this_ptr);
        public static native void Pong_free(long this_ptr);
-       // struct LDKPong Pong_clone(const struct LDKPong *NONNULL_PTR orig);
-       public static native long Pong_clone(long orig);
        // uint16_t Pong_get_byteslen(const struct LDKPong *NONNULL_PTR this_ptr);
        public static native short Pong_get_byteslen(long this_ptr);
        // void Pong_set_byteslen(struct LDKPong *NONNULL_PTR this_ptr, uint16_t val);
        public static native void Pong_set_byteslen(long this_ptr, short val);
        // MUST_USE_RES struct LDKPong Pong_new(uint16_t byteslen_arg);
        public static native long Pong_new(short byteslen_arg);
+       // struct LDKPong Pong_clone(const struct LDKPong *NONNULL_PTR orig);
+       public static native long Pong_clone(long orig);
        // void OpenChannel_free(struct LDKOpenChannel this_ptr);
        public static native void OpenChannel_free(long this_ptr);
-       // struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig);
-       public static native long OpenChannel_clone(long orig);
        // const uint8_t (*OpenChannel_get_chain_hash(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
        public static native byte[] OpenChannel_get_chain_hash(long this_ptr);
        // void OpenChannel_set_chain_hash(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
@@ -1639,10 +2047,10 @@ public class bindings {
        public static native byte OpenChannel_get_channel_flags(long this_ptr);
        // void OpenChannel_set_channel_flags(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint8_t val);
        public static native void OpenChannel_set_channel_flags(long this_ptr, byte val);
+       // struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig);
+       public static native long OpenChannel_clone(long orig);
        // void AcceptChannel_free(struct LDKAcceptChannel this_ptr);
        public static native void AcceptChannel_free(long this_ptr);
-       // struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig);
-       public static native long AcceptChannel_clone(long orig);
        // const uint8_t (*AcceptChannel_get_temporary_channel_id(const struct LDKAcceptChannel *NONNULL_PTR this_ptr))[32];
        public static native byte[] AcceptChannel_get_temporary_channel_id(long this_ptr);
        // void AcceptChannel_set_temporary_channel_id(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
@@ -1699,10 +2107,10 @@ public class bindings {
        public static native byte[] AcceptChannel_get_first_per_commitment_point(long this_ptr);
        // void AcceptChannel_set_first_per_commitment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
        public static native void AcceptChannel_set_first_per_commitment_point(long this_ptr, byte[] val);
+       // struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig);
+       public static native long AcceptChannel_clone(long orig);
        // void FundingCreated_free(struct LDKFundingCreated this_ptr);
        public static native void FundingCreated_free(long this_ptr);
-       // struct LDKFundingCreated FundingCreated_clone(const struct LDKFundingCreated *NONNULL_PTR orig);
-       public static native long FundingCreated_clone(long orig);
        // const uint8_t (*FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
        public static native byte[] FundingCreated_get_temporary_channel_id(long this_ptr);
        // void FundingCreated_set_temporary_channel_id(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
@@ -1721,10 +2129,10 @@ public class bindings {
        public static native void FundingCreated_set_signature(long this_ptr, byte[] val);
        // MUST_USE_RES struct LDKFundingCreated FundingCreated_new(struct LDKThirtyTwoBytes temporary_channel_id_arg, struct LDKThirtyTwoBytes funding_txid_arg, uint16_t funding_output_index_arg, struct LDKSignature signature_arg);
        public static native long FundingCreated_new(byte[] temporary_channel_id_arg, byte[] funding_txid_arg, short funding_output_index_arg, byte[] signature_arg);
+       // struct LDKFundingCreated FundingCreated_clone(const struct LDKFundingCreated *NONNULL_PTR orig);
+       public static native long FundingCreated_clone(long orig);
        // void FundingSigned_free(struct LDKFundingSigned this_ptr);
        public static native void FundingSigned_free(long this_ptr);
-       // struct LDKFundingSigned FundingSigned_clone(const struct LDKFundingSigned *NONNULL_PTR orig);
-       public static native long FundingSigned_clone(long orig);
        // const uint8_t (*FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr))[32];
        public static native byte[] FundingSigned_get_channel_id(long this_ptr);
        // void FundingSigned_set_channel_id(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
@@ -1735,10 +2143,10 @@ public class bindings {
        public static native void FundingSigned_set_signature(long this_ptr, byte[] val);
        // MUST_USE_RES struct LDKFundingSigned FundingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg);
        public static native long FundingSigned_new(byte[] channel_id_arg, byte[] signature_arg);
+       // struct LDKFundingSigned FundingSigned_clone(const struct LDKFundingSigned *NONNULL_PTR orig);
+       public static native long FundingSigned_clone(long orig);
        // void FundingLocked_free(struct LDKFundingLocked this_ptr);
        public static native void FundingLocked_free(long this_ptr);
-       // struct LDKFundingLocked FundingLocked_clone(const struct LDKFundingLocked *NONNULL_PTR orig);
-       public static native long FundingLocked_clone(long orig);
        // const uint8_t (*FundingLocked_get_channel_id(const struct LDKFundingLocked *NONNULL_PTR this_ptr))[32];
        public static native byte[] FundingLocked_get_channel_id(long this_ptr);
        // void FundingLocked_set_channel_id(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
@@ -1749,10 +2157,10 @@ public class bindings {
        public static native void FundingLocked_set_next_per_commitment_point(long this_ptr, byte[] val);
        // MUST_USE_RES struct LDKFundingLocked FundingLocked_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKPublicKey next_per_commitment_point_arg);
        public static native long FundingLocked_new(byte[] channel_id_arg, byte[] next_per_commitment_point_arg);
+       // struct LDKFundingLocked FundingLocked_clone(const struct LDKFundingLocked *NONNULL_PTR orig);
+       public static native long FundingLocked_clone(long orig);
        // void Shutdown_free(struct LDKShutdown this_ptr);
        public static native void Shutdown_free(long this_ptr);
-       // struct LDKShutdown Shutdown_clone(const struct LDKShutdown *NONNULL_PTR orig);
-       public static native long Shutdown_clone(long orig);
        // const uint8_t (*Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr))[32];
        public static native byte[] Shutdown_get_channel_id(long this_ptr);
        // void Shutdown_set_channel_id(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
@@ -1763,10 +2171,10 @@ public class bindings {
        public static native void Shutdown_set_scriptpubkey(long this_ptr, byte[] val);
        // MUST_USE_RES struct LDKShutdown Shutdown_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z scriptpubkey_arg);
        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 ClosingSigned_free(struct LDKClosingSigned this_ptr);
        public static native void ClosingSigned_free(long this_ptr);
-       // struct LDKClosingSigned ClosingSigned_clone(const struct LDKClosingSigned *NONNULL_PTR orig);
-       public static native long ClosingSigned_clone(long orig);
        // const uint8_t (*ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr))[32];
        public static native byte[] ClosingSigned_get_channel_id(long this_ptr);
        // void ClosingSigned_set_channel_id(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
@@ -1781,10 +2189,10 @@ public class bindings {
        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 LDKClosingSigned ClosingSigned_clone(const struct LDKClosingSigned *NONNULL_PTR orig);
+       public static native long ClosingSigned_clone(long orig);
        // void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_ptr);
        public static native void UpdateAddHTLC_free(long this_ptr);
-       // struct LDKUpdateAddHTLC UpdateAddHTLC_clone(const struct LDKUpdateAddHTLC *NONNULL_PTR orig);
-       public static native long UpdateAddHTLC_clone(long orig);
        // const uint8_t (*UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
        public static native byte[] UpdateAddHTLC_get_channel_id(long this_ptr);
        // void UpdateAddHTLC_set_channel_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
@@ -1805,10 +2213,10 @@ public class bindings {
        public static native int UpdateAddHTLC_get_cltv_expiry(long this_ptr);
        // void UpdateAddHTLC_set_cltv_expiry(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint32_t val);
        public static native void UpdateAddHTLC_set_cltv_expiry(long this_ptr, int val);
+       // struct LDKUpdateAddHTLC UpdateAddHTLC_clone(const struct LDKUpdateAddHTLC *NONNULL_PTR orig);
+       public static native long UpdateAddHTLC_clone(long orig);
        // void UpdateFulfillHTLC_free(struct LDKUpdateFulfillHTLC this_ptr);
        public static native void UpdateFulfillHTLC_free(long this_ptr);
-       // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const struct LDKUpdateFulfillHTLC *NONNULL_PTR orig);
-       public static native long UpdateFulfillHTLC_clone(long orig);
        // const uint8_t (*UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
        public static native byte[] UpdateFulfillHTLC_get_channel_id(long this_ptr);
        // void UpdateFulfillHTLC_set_channel_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
@@ -1823,10 +2231,10 @@ public class bindings {
        public static native void UpdateFulfillHTLC_set_payment_preimage(long this_ptr, byte[] val);
        // MUST_USE_RES struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t htlc_id_arg, struct LDKThirtyTwoBytes payment_preimage_arg);
        public static native long UpdateFulfillHTLC_new(byte[] channel_id_arg, long htlc_id_arg, byte[] payment_preimage_arg);
+       // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const struct LDKUpdateFulfillHTLC *NONNULL_PTR orig);
+       public static native long UpdateFulfillHTLC_clone(long orig);
        // void UpdateFailHTLC_free(struct LDKUpdateFailHTLC this_ptr);
        public static native void UpdateFailHTLC_free(long this_ptr);
-       // struct LDKUpdateFailHTLC UpdateFailHTLC_clone(const struct LDKUpdateFailHTLC *NONNULL_PTR orig);
-       public static native long UpdateFailHTLC_clone(long orig);
        // const uint8_t (*UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr))[32];
        public static native byte[] UpdateFailHTLC_get_channel_id(long this_ptr);
        // void UpdateFailHTLC_set_channel_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
@@ -1835,10 +2243,10 @@ public class bindings {
        public static native long UpdateFailHTLC_get_htlc_id(long this_ptr);
        // void UpdateFailHTLC_set_htlc_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, uint64_t val);
        public static native void UpdateFailHTLC_set_htlc_id(long this_ptr, long val);
+       // struct LDKUpdateFailHTLC UpdateFailHTLC_clone(const struct LDKUpdateFailHTLC *NONNULL_PTR orig);
+       public static native long UpdateFailHTLC_clone(long orig);
        // void UpdateFailMalformedHTLC_free(struct LDKUpdateFailMalformedHTLC this_ptr);
        public static native void UpdateFailMalformedHTLC_free(long this_ptr);
-       // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_clone(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR orig);
-       public static native long UpdateFailMalformedHTLC_clone(long orig);
        // const uint8_t (*UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr))[32];
        public static native byte[] UpdateFailMalformedHTLC_get_channel_id(long this_ptr);
        // void UpdateFailMalformedHTLC_set_channel_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
@@ -1851,10 +2259,10 @@ public class bindings {
        public static native short UpdateFailMalformedHTLC_get_failure_code(long this_ptr);
        // void UpdateFailMalformedHTLC_set_failure_code(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint16_t val);
        public static native void UpdateFailMalformedHTLC_set_failure_code(long this_ptr, short val);
+       // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_clone(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR orig);
+       public static native long UpdateFailMalformedHTLC_clone(long orig);
        // void CommitmentSigned_free(struct LDKCommitmentSigned this_ptr);
        public static native void CommitmentSigned_free(long this_ptr);
-       // struct LDKCommitmentSigned CommitmentSigned_clone(const struct LDKCommitmentSigned *NONNULL_PTR orig);
-       public static native long CommitmentSigned_clone(long orig);
        // const uint8_t (*CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr))[32];
        public static native byte[] CommitmentSigned_get_channel_id(long this_ptr);
        // void CommitmentSigned_set_channel_id(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
@@ -1867,10 +2275,10 @@ public class bindings {
        public static native void CommitmentSigned_set_htlc_signatures(long this_ptr, byte[][] val);
        // MUST_USE_RES struct LDKCommitmentSigned CommitmentSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg, struct LDKCVec_SignatureZ htlc_signatures_arg);
        public static native long CommitmentSigned_new(byte[] channel_id_arg, byte[] signature_arg, byte[][] htlc_signatures_arg);
+       // struct LDKCommitmentSigned CommitmentSigned_clone(const struct LDKCommitmentSigned *NONNULL_PTR orig);
+       public static native long CommitmentSigned_clone(long orig);
        // void RevokeAndACK_free(struct LDKRevokeAndACK this_ptr);
        public static native void RevokeAndACK_free(long this_ptr);
-       // struct LDKRevokeAndACK RevokeAndACK_clone(const struct LDKRevokeAndACK *NONNULL_PTR orig);
-       public static native long RevokeAndACK_clone(long orig);
        // const uint8_t (*RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
        public static native byte[] RevokeAndACK_get_channel_id(long this_ptr);
        // void RevokeAndACK_set_channel_id(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
@@ -1885,10 +2293,10 @@ public class bindings {
        public static native void RevokeAndACK_set_next_per_commitment_point(long this_ptr, byte[] val);
        // MUST_USE_RES struct LDKRevokeAndACK RevokeAndACK_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKThirtyTwoBytes per_commitment_secret_arg, struct LDKPublicKey next_per_commitment_point_arg);
        public static native long RevokeAndACK_new(byte[] channel_id_arg, byte[] per_commitment_secret_arg, byte[] next_per_commitment_point_arg);
+       // struct LDKRevokeAndACK RevokeAndACK_clone(const struct LDKRevokeAndACK *NONNULL_PTR orig);
+       public static native long RevokeAndACK_clone(long orig);
        // void UpdateFee_free(struct LDKUpdateFee this_ptr);
        public static native void UpdateFee_free(long this_ptr);
-       // struct LDKUpdateFee UpdateFee_clone(const struct LDKUpdateFee *NONNULL_PTR orig);
-       public static native long UpdateFee_clone(long orig);
        // const uint8_t (*UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr))[32];
        public static native byte[] UpdateFee_get_channel_id(long this_ptr);
        // void UpdateFee_set_channel_id(struct LDKUpdateFee *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
@@ -1899,10 +2307,10 @@ public class bindings {
        public static native void UpdateFee_set_feerate_per_kw(long this_ptr, int val);
        // MUST_USE_RES struct LDKUpdateFee UpdateFee_new(struct LDKThirtyTwoBytes channel_id_arg, uint32_t feerate_per_kw_arg);
        public static native long UpdateFee_new(byte[] channel_id_arg, int feerate_per_kw_arg);
+       // struct LDKUpdateFee UpdateFee_clone(const struct LDKUpdateFee *NONNULL_PTR orig);
+       public static native long UpdateFee_clone(long orig);
        // void DataLossProtect_free(struct LDKDataLossProtect this_ptr);
        public static native void DataLossProtect_free(long this_ptr);
-       // struct LDKDataLossProtect DataLossProtect_clone(const struct LDKDataLossProtect *NONNULL_PTR orig);
-       public static native long DataLossProtect_clone(long orig);
        // const uint8_t (*DataLossProtect_get_your_last_per_commitment_secret(const struct LDKDataLossProtect *NONNULL_PTR this_ptr))[32];
        public static native byte[] DataLossProtect_get_your_last_per_commitment_secret(long this_ptr);
        // void DataLossProtect_set_your_last_per_commitment_secret(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
@@ -1913,10 +2321,10 @@ public class bindings {
        public static native void DataLossProtect_set_my_current_per_commitment_point(long this_ptr, byte[] val);
        // MUST_USE_RES struct LDKDataLossProtect DataLossProtect_new(struct LDKThirtyTwoBytes your_last_per_commitment_secret_arg, struct LDKPublicKey my_current_per_commitment_point_arg);
        public static native long DataLossProtect_new(byte[] your_last_per_commitment_secret_arg, byte[] my_current_per_commitment_point_arg);
+       // struct LDKDataLossProtect DataLossProtect_clone(const struct LDKDataLossProtect *NONNULL_PTR orig);
+       public static native long DataLossProtect_clone(long orig);
        // void ChannelReestablish_free(struct LDKChannelReestablish this_ptr);
        public static native void ChannelReestablish_free(long this_ptr);
-       // struct LDKChannelReestablish ChannelReestablish_clone(const struct LDKChannelReestablish *NONNULL_PTR orig);
-       public static native long ChannelReestablish_clone(long orig);
        // const uint8_t (*ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr))[32];
        public static native byte[] ChannelReestablish_get_channel_id(long this_ptr);
        // void ChannelReestablish_set_channel_id(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
@@ -1929,10 +2337,10 @@ public class bindings {
        public static native long ChannelReestablish_get_next_remote_commitment_number(long this_ptr);
        // void ChannelReestablish_set_next_remote_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
        public static native void ChannelReestablish_set_next_remote_commitment_number(long this_ptr, long val);
+       // struct LDKChannelReestablish ChannelReestablish_clone(const struct LDKChannelReestablish *NONNULL_PTR orig);
+       public static native long ChannelReestablish_clone(long orig);
        // void AnnouncementSignatures_free(struct LDKAnnouncementSignatures this_ptr);
        public static native void AnnouncementSignatures_free(long this_ptr);
-       // struct LDKAnnouncementSignatures AnnouncementSignatures_clone(const struct LDKAnnouncementSignatures *NONNULL_PTR orig);
-       public static native long AnnouncementSignatures_clone(long orig);
        // const uint8_t (*AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr))[32];
        public static native byte[] AnnouncementSignatures_get_channel_id(long this_ptr);
        // void AnnouncementSignatures_set_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
@@ -1951,6 +2359,8 @@ public class bindings {
        public static native void AnnouncementSignatures_set_bitcoin_signature(long this_ptr, byte[] val);
        // MUST_USE_RES struct LDKAnnouncementSignatures AnnouncementSignatures_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t short_channel_id_arg, struct LDKSignature node_signature_arg, struct LDKSignature bitcoin_signature_arg);
        public static native long AnnouncementSignatures_new(byte[] channel_id_arg, long short_channel_id_arg, byte[] node_signature_arg, byte[] bitcoin_signature_arg);
+       // struct LDKAnnouncementSignatures AnnouncementSignatures_clone(const struct LDKAnnouncementSignatures *NONNULL_PTR orig);
+       public static native long AnnouncementSignatures_clone(long orig);
        // void NetAddress_free(struct LDKNetAddress this_ptr);
        public static native void NetAddress_free(long this_ptr);
        // struct LDKNetAddress NetAddress_clone(const struct LDKNetAddress *NONNULL_PTR orig);
@@ -1961,8 +2371,6 @@ public class bindings {
        public static native long Result_read(byte[] ser);
        // void UnsignedNodeAnnouncement_free(struct LDKUnsignedNodeAnnouncement this_ptr);
        public static native void UnsignedNodeAnnouncement_free(long this_ptr);
-       // struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR orig);
-       public static native long UnsignedNodeAnnouncement_clone(long orig);
        // struct LDKNodeFeatures UnsignedNodeAnnouncement_get_features(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
        public static native long UnsignedNodeAnnouncement_get_features(long this_ptr);
        // void UnsignedNodeAnnouncement_set_features(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
@@ -1985,10 +2393,10 @@ public class bindings {
        public static native void UnsignedNodeAnnouncement_set_alias(long this_ptr, byte[] val);
        // void UnsignedNodeAnnouncement_set_addresses(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
        public static native void UnsignedNodeAnnouncement_set_addresses(long this_ptr, long[] val);
+       // struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR orig);
+       public static native long UnsignedNodeAnnouncement_clone(long orig);
        // void NodeAnnouncement_free(struct LDKNodeAnnouncement this_ptr);
        public static native void NodeAnnouncement_free(long this_ptr);
-       // struct LDKNodeAnnouncement NodeAnnouncement_clone(const struct LDKNodeAnnouncement *NONNULL_PTR orig);
-       public static native long NodeAnnouncement_clone(long orig);
        // struct LDKSignature NodeAnnouncement_get_signature(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
        public static native byte[] NodeAnnouncement_get_signature(long this_ptr);
        // void NodeAnnouncement_set_signature(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
@@ -1999,10 +2407,10 @@ public class bindings {
        public static native void NodeAnnouncement_set_contents(long this_ptr, long val);
        // MUST_USE_RES struct LDKNodeAnnouncement NodeAnnouncement_new(struct LDKSignature signature_arg, struct LDKUnsignedNodeAnnouncement contents_arg);
        public static native long NodeAnnouncement_new(byte[] signature_arg, long contents_arg);
+       // struct LDKNodeAnnouncement NodeAnnouncement_clone(const struct LDKNodeAnnouncement *NONNULL_PTR orig);
+       public static native long NodeAnnouncement_clone(long orig);
        // void UnsignedChannelAnnouncement_free(struct LDKUnsignedChannelAnnouncement this_ptr);
        public static native void UnsignedChannelAnnouncement_free(long this_ptr);
-       // struct LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_clone(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR orig);
-       public static native long UnsignedChannelAnnouncement_clone(long orig);
        // struct LDKChannelFeatures UnsignedChannelAnnouncement_get_features(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
        public static native long UnsignedChannelAnnouncement_get_features(long this_ptr);
        // void UnsignedChannelAnnouncement_set_features(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
@@ -2031,10 +2439,10 @@ public class bindings {
        public static native byte[] UnsignedChannelAnnouncement_get_bitcoin_key_2(long this_ptr);
        // void UnsignedChannelAnnouncement_set_bitcoin_key_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
        public static native void UnsignedChannelAnnouncement_set_bitcoin_key_2(long this_ptr, byte[] val);
+       // struct LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_clone(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR orig);
+       public static native long UnsignedChannelAnnouncement_clone(long orig);
        // void ChannelAnnouncement_free(struct LDKChannelAnnouncement this_ptr);
        public static native void ChannelAnnouncement_free(long this_ptr);
-       // struct LDKChannelAnnouncement ChannelAnnouncement_clone(const struct LDKChannelAnnouncement *NONNULL_PTR orig);
-       public static native long ChannelAnnouncement_clone(long orig);
        // struct LDKSignature ChannelAnnouncement_get_node_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
        public static native byte[] ChannelAnnouncement_get_node_signature_1(long this_ptr);
        // void ChannelAnnouncement_set_node_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
@@ -2057,10 +2465,10 @@ public class bindings {
        public static native void ChannelAnnouncement_set_contents(long this_ptr, long val);
        // MUST_USE_RES struct LDKChannelAnnouncement ChannelAnnouncement_new(struct LDKSignature node_signature_1_arg, struct LDKSignature node_signature_2_arg, struct LDKSignature bitcoin_signature_1_arg, struct LDKSignature bitcoin_signature_2_arg, struct LDKUnsignedChannelAnnouncement contents_arg);
        public static native long ChannelAnnouncement_new(byte[] node_signature_1_arg, byte[] node_signature_2_arg, byte[] bitcoin_signature_1_arg, byte[] bitcoin_signature_2_arg, long contents_arg);
+       // struct LDKChannelAnnouncement ChannelAnnouncement_clone(const struct LDKChannelAnnouncement *NONNULL_PTR orig);
+       public static native long ChannelAnnouncement_clone(long orig);
        // void UnsignedChannelUpdate_free(struct LDKUnsignedChannelUpdate this_ptr);
        public static native void UnsignedChannelUpdate_free(long this_ptr);
-       // struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_clone(const struct LDKUnsignedChannelUpdate *NONNULL_PTR orig);
-       public static native long UnsignedChannelUpdate_clone(long orig);
        // const uint8_t (*UnsignedChannelUpdate_get_chain_hash(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr))[32];
        public static native byte[] UnsignedChannelUpdate_get_chain_hash(long this_ptr);
        // void UnsignedChannelUpdate_set_chain_hash(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
@@ -2093,10 +2501,10 @@ public class bindings {
        public static native int UnsignedChannelUpdate_get_fee_proportional_millionths(long this_ptr);
        // void UnsignedChannelUpdate_set_fee_proportional_millionths(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
        public static native void UnsignedChannelUpdate_set_fee_proportional_millionths(long this_ptr, int val);
+       // struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_clone(const struct LDKUnsignedChannelUpdate *NONNULL_PTR orig);
+       public static native long UnsignedChannelUpdate_clone(long orig);
        // void ChannelUpdate_free(struct LDKChannelUpdate this_ptr);
        public static native void ChannelUpdate_free(long this_ptr);
-       // struct LDKChannelUpdate ChannelUpdate_clone(const struct LDKChannelUpdate *NONNULL_PTR orig);
-       public static native long ChannelUpdate_clone(long orig);
        // struct LDKSignature ChannelUpdate_get_signature(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
        public static native byte[] ChannelUpdate_get_signature(long this_ptr);
        // void ChannelUpdate_set_signature(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKSignature val);
@@ -2107,10 +2515,10 @@ public class bindings {
        public static native void ChannelUpdate_set_contents(long this_ptr, long val);
        // MUST_USE_RES struct LDKChannelUpdate ChannelUpdate_new(struct LDKSignature signature_arg, struct LDKUnsignedChannelUpdate contents_arg);
        public static native long ChannelUpdate_new(byte[] signature_arg, long contents_arg);
+       // struct LDKChannelUpdate ChannelUpdate_clone(const struct LDKChannelUpdate *NONNULL_PTR orig);
+       public static native long ChannelUpdate_clone(long orig);
        // void QueryChannelRange_free(struct LDKQueryChannelRange this_ptr);
        public static native void QueryChannelRange_free(long this_ptr);
-       // struct LDKQueryChannelRange QueryChannelRange_clone(const struct LDKQueryChannelRange *NONNULL_PTR orig);
-       public static native long QueryChannelRange_clone(long orig);
        // const uint8_t (*QueryChannelRange_get_chain_hash(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr))[32];
        public static native byte[] QueryChannelRange_get_chain_hash(long this_ptr);
        // void QueryChannelRange_set_chain_hash(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
@@ -2125,10 +2533,10 @@ public class bindings {
        public static native void QueryChannelRange_set_number_of_blocks(long this_ptr, int val);
        // MUST_USE_RES struct LDKQueryChannelRange QueryChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg);
        public static native long QueryChannelRange_new(byte[] chain_hash_arg, int first_blocknum_arg, int number_of_blocks_arg);
+       // struct LDKQueryChannelRange QueryChannelRange_clone(const struct LDKQueryChannelRange *NONNULL_PTR orig);
+       public static native long QueryChannelRange_clone(long orig);
        // void ReplyChannelRange_free(struct LDKReplyChannelRange this_ptr);
        public static native void ReplyChannelRange_free(long this_ptr);
-       // struct LDKReplyChannelRange ReplyChannelRange_clone(const struct LDKReplyChannelRange *NONNULL_PTR orig);
-       public static native long ReplyChannelRange_clone(long orig);
        // const uint8_t (*ReplyChannelRange_get_chain_hash(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr))[32];
        public static native byte[] ReplyChannelRange_get_chain_hash(long this_ptr);
        // void ReplyChannelRange_set_chain_hash(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
@@ -2141,18 +2549,18 @@ public class bindings {
        public static native int ReplyChannelRange_get_number_of_blocks(long this_ptr);
        // void ReplyChannelRange_set_number_of_blocks(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
        public static native void ReplyChannelRange_set_number_of_blocks(long this_ptr, int val);
-       // bool ReplyChannelRange_get_full_information(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
-       public static native boolean ReplyChannelRange_get_full_information(long this_ptr);
-       // void ReplyChannelRange_set_full_information(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, bool val);
-       public static native void ReplyChannelRange_set_full_information(long this_ptr, boolean val);
+       // bool ReplyChannelRange_get_sync_complete(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
+       public static native boolean ReplyChannelRange_get_sync_complete(long this_ptr);
+       // void ReplyChannelRange_set_sync_complete(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, bool val);
+       public static native void ReplyChannelRange_set_sync_complete(long this_ptr, boolean val);
        // void ReplyChannelRange_set_short_channel_ids(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
        public static native void ReplyChannelRange_set_short_channel_ids(long this_ptr, long[] val);
-       // MUST_USE_RES struct LDKReplyChannelRange ReplyChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg, bool full_information_arg, struct LDKCVec_u64Z short_channel_ids_arg);
-       public static native long ReplyChannelRange_new(byte[] chain_hash_arg, int first_blocknum_arg, int number_of_blocks_arg, boolean full_information_arg, long[] short_channel_ids_arg);
+       // MUST_USE_RES struct LDKReplyChannelRange ReplyChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg, bool sync_complete_arg, struct LDKCVec_u64Z short_channel_ids_arg);
+       public static native long ReplyChannelRange_new(byte[] chain_hash_arg, int first_blocknum_arg, int number_of_blocks_arg, boolean sync_complete_arg, long[] short_channel_ids_arg);
+       // struct LDKReplyChannelRange ReplyChannelRange_clone(const struct LDKReplyChannelRange *NONNULL_PTR orig);
+       public static native long ReplyChannelRange_clone(long orig);
        // void QueryShortChannelIds_free(struct LDKQueryShortChannelIds this_ptr);
        public static native void QueryShortChannelIds_free(long this_ptr);
-       // struct LDKQueryShortChannelIds QueryShortChannelIds_clone(const struct LDKQueryShortChannelIds *NONNULL_PTR orig);
-       public static native long QueryShortChannelIds_clone(long orig);
        // const uint8_t (*QueryShortChannelIds_get_chain_hash(const struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr))[32];
        public static native byte[] QueryShortChannelIds_get_chain_hash(long this_ptr);
        // void QueryShortChannelIds_set_chain_hash(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
@@ -2161,10 +2569,10 @@ public class bindings {
        public static native void QueryShortChannelIds_set_short_channel_ids(long this_ptr, long[] val);
        // MUST_USE_RES struct LDKQueryShortChannelIds QueryShortChannelIds_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKCVec_u64Z short_channel_ids_arg);
        public static native long QueryShortChannelIds_new(byte[] chain_hash_arg, long[] short_channel_ids_arg);
+       // struct LDKQueryShortChannelIds QueryShortChannelIds_clone(const struct LDKQueryShortChannelIds *NONNULL_PTR orig);
+       public static native long QueryShortChannelIds_clone(long orig);
        // void ReplyShortChannelIdsEnd_free(struct LDKReplyShortChannelIdsEnd this_ptr);
        public static native void ReplyShortChannelIdsEnd_free(long this_ptr);
-       // struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_clone(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR orig);
-       public static native long ReplyShortChannelIdsEnd_clone(long orig);
        // const uint8_t (*ReplyShortChannelIdsEnd_get_chain_hash(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr))[32];
        public static native byte[] ReplyShortChannelIdsEnd_get_chain_hash(long this_ptr);
        // void ReplyShortChannelIdsEnd_set_chain_hash(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
@@ -2175,10 +2583,10 @@ public class bindings {
        public static native void ReplyShortChannelIdsEnd_set_full_information(long this_ptr, boolean val);
        // MUST_USE_RES struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_new(struct LDKThirtyTwoBytes chain_hash_arg, bool full_information_arg);
        public static native long ReplyShortChannelIdsEnd_new(byte[] chain_hash_arg, boolean full_information_arg);
+       // struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_clone(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR orig);
+       public static native long ReplyShortChannelIdsEnd_clone(long orig);
        // void GossipTimestampFilter_free(struct LDKGossipTimestampFilter this_ptr);
        public static native void GossipTimestampFilter_free(long this_ptr);
-       // struct LDKGossipTimestampFilter GossipTimestampFilter_clone(const struct LDKGossipTimestampFilter *NONNULL_PTR orig);
-       public static native long GossipTimestampFilter_clone(long orig);
        // const uint8_t (*GossipTimestampFilter_get_chain_hash(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr))[32];
        public static native byte[] GossipTimestampFilter_get_chain_hash(long this_ptr);
        // void GossipTimestampFilter_set_chain_hash(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
@@ -2193,14 +2601,14 @@ public class bindings {
        public static native void GossipTimestampFilter_set_timestamp_range(long this_ptr, int val);
        // MUST_USE_RES struct LDKGossipTimestampFilter GossipTimestampFilter_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_timestamp_arg, uint32_t timestamp_range_arg);
        public static native long GossipTimestampFilter_new(byte[] chain_hash_arg, int first_timestamp_arg, int timestamp_range_arg);
+       // struct LDKGossipTimestampFilter GossipTimestampFilter_clone(const struct LDKGossipTimestampFilter *NONNULL_PTR orig);
+       public static native long GossipTimestampFilter_clone(long orig);
        // void ErrorAction_free(struct LDKErrorAction this_ptr);
        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);
        // void LightningError_free(struct LDKLightningError this_ptr);
        public static native void LightningError_free(long this_ptr);
-       // struct LDKLightningError LightningError_clone(const struct LDKLightningError *NONNULL_PTR orig);
-       public static native long LightningError_clone(long orig);
        // struct LDKStr LightningError_get_err(const struct LDKLightningError *NONNULL_PTR this_ptr);
        public static native String LightningError_get_err(long this_ptr);
        // void LightningError_set_err(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
@@ -2211,10 +2619,10 @@ public class bindings {
        public static native void LightningError_set_action(long this_ptr, long val);
        // MUST_USE_RES struct LDKLightningError LightningError_new(struct LDKCVec_u8Z err_arg, struct LDKErrorAction action_arg);
        public static native long LightningError_new(byte[] err_arg, long action_arg);
+       // struct LDKLightningError LightningError_clone(const struct LDKLightningError *NONNULL_PTR orig);
+       public static native long LightningError_clone(long orig);
        // void CommitmentUpdate_free(struct LDKCommitmentUpdate this_ptr);
        public static native void CommitmentUpdate_free(long this_ptr);
-       // struct LDKCommitmentUpdate CommitmentUpdate_clone(const struct LDKCommitmentUpdate *NONNULL_PTR orig);
-       public static native long CommitmentUpdate_clone(long orig);
        // 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);
        // void CommitmentUpdate_set_update_fulfill_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFulfillHTLCZ val);
@@ -2233,6 +2641,8 @@ public class bindings {
        public static native void CommitmentUpdate_set_commitment_signed(long this_ptr, long val);
        // MUST_USE_RES struct LDKCommitmentUpdate CommitmentUpdate_new(struct LDKCVec_UpdateAddHTLCZ update_add_htlcs_arg, struct LDKCVec_UpdateFulfillHTLCZ update_fulfill_htlcs_arg, struct LDKCVec_UpdateFailHTLCZ update_fail_htlcs_arg, struct LDKCVec_UpdateFailMalformedHTLCZ update_fail_malformed_htlcs_arg, struct LDKUpdateFee update_fee_arg, struct LDKCommitmentSigned commitment_signed_arg);
        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);
@@ -2243,11 +2653,11 @@ public class bindings {
        public static native void RoutingMessageHandler_free(long this_ptr);
        // struct LDKCVec_u8Z AcceptChannel_write(const struct LDKAcceptChannel *NONNULL_PTR obj);
        public static native byte[] AcceptChannel_write(long obj);
-       // struct LDKAcceptChannel AcceptChannel_read(struct LDKu8slice ser);
+       // struct LDKCResult_AcceptChannelDecodeErrorZ AcceptChannel_read(struct LDKu8slice ser);
        public static native long AcceptChannel_read(byte[] ser);
        // struct LDKCVec_u8Z AnnouncementSignatures_write(const struct LDKAnnouncementSignatures *NONNULL_PTR obj);
        public static native byte[] AnnouncementSignatures_write(long obj);
-       // struct LDKAnnouncementSignatures AnnouncementSignatures_read(struct LDKu8slice ser);
+       // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ AnnouncementSignatures_read(struct LDKu8slice ser);
        public static native long AnnouncementSignatures_read(byte[] ser);
        // struct LDKCVec_u8Z ChannelReestablish_write(const struct LDKChannelReestablish *NONNULL_PTR obj);
        public static native byte[] ChannelReestablish_write(long obj);
@@ -2255,23 +2665,23 @@ public class bindings {
        public static native long ChannelReestablish_read(byte[] ser);
        // struct LDKCVec_u8Z ClosingSigned_write(const struct LDKClosingSigned *NONNULL_PTR obj);
        public static native byte[] ClosingSigned_write(long obj);
-       // struct LDKClosingSigned ClosingSigned_read(struct LDKu8slice ser);
+       // struct LDKCResult_ClosingSignedDecodeErrorZ ClosingSigned_read(struct LDKu8slice ser);
        public static native long ClosingSigned_read(byte[] ser);
        // struct LDKCVec_u8Z CommitmentSigned_write(const struct LDKCommitmentSigned *NONNULL_PTR obj);
        public static native byte[] CommitmentSigned_write(long obj);
-       // struct LDKCommitmentSigned CommitmentSigned_read(struct LDKu8slice ser);
+       // struct LDKCResult_CommitmentSignedDecodeErrorZ CommitmentSigned_read(struct LDKu8slice ser);
        public static native long CommitmentSigned_read(byte[] ser);
        // struct LDKCVec_u8Z FundingCreated_write(const struct LDKFundingCreated *NONNULL_PTR obj);
        public static native byte[] FundingCreated_write(long obj);
-       // struct LDKFundingCreated FundingCreated_read(struct LDKu8slice ser);
+       // struct LDKCResult_FundingCreatedDecodeErrorZ FundingCreated_read(struct LDKu8slice ser);
        public static native long FundingCreated_read(byte[] ser);
        // struct LDKCVec_u8Z FundingSigned_write(const struct LDKFundingSigned *NONNULL_PTR obj);
        public static native byte[] FundingSigned_write(long obj);
-       // struct LDKFundingSigned FundingSigned_read(struct LDKu8slice ser);
+       // struct LDKCResult_FundingSignedDecodeErrorZ FundingSigned_read(struct LDKu8slice ser);
        public static native long FundingSigned_read(byte[] ser);
        // struct LDKCVec_u8Z FundingLocked_write(const struct LDKFundingLocked *NONNULL_PTR obj);
        public static native byte[] FundingLocked_write(long obj);
-       // struct LDKFundingLocked FundingLocked_read(struct LDKu8slice ser);
+       // struct LDKCResult_FundingLockedDecodeErrorZ FundingLocked_read(struct LDKu8slice ser);
        public static native long FundingLocked_read(byte[] ser);
        // struct LDKCVec_u8Z Init_write(const struct LDKInit *NONNULL_PTR obj);
        public static native byte[] Init_write(long obj);
@@ -2279,35 +2689,35 @@ public class bindings {
        public static native long Init_read(byte[] ser);
        // struct LDKCVec_u8Z OpenChannel_write(const struct LDKOpenChannel *NONNULL_PTR obj);
        public static native byte[] OpenChannel_write(long obj);
-       // struct LDKOpenChannel OpenChannel_read(struct LDKu8slice ser);
+       // struct LDKCResult_OpenChannelDecodeErrorZ OpenChannel_read(struct LDKu8slice ser);
        public static native long OpenChannel_read(byte[] ser);
        // struct LDKCVec_u8Z RevokeAndACK_write(const struct LDKRevokeAndACK *NONNULL_PTR obj);
        public static native byte[] RevokeAndACK_write(long obj);
-       // struct LDKRevokeAndACK RevokeAndACK_read(struct LDKu8slice ser);
+       // struct LDKCResult_RevokeAndACKDecodeErrorZ RevokeAndACK_read(struct LDKu8slice ser);
        public static native long RevokeAndACK_read(byte[] ser);
        // struct LDKCVec_u8Z Shutdown_write(const struct LDKShutdown *NONNULL_PTR obj);
        public static native byte[] Shutdown_write(long obj);
-       // struct LDKShutdown Shutdown_read(struct LDKu8slice ser);
+       // struct LDKCResult_ShutdownDecodeErrorZ Shutdown_read(struct LDKu8slice ser);
        public static native long Shutdown_read(byte[] ser);
        // struct LDKCVec_u8Z UpdateFailHTLC_write(const struct LDKUpdateFailHTLC *NONNULL_PTR obj);
        public static native byte[] UpdateFailHTLC_write(long obj);
-       // struct LDKUpdateFailHTLC UpdateFailHTLC_read(struct LDKu8slice ser);
+       // struct LDKCResult_UpdateFailHTLCDecodeErrorZ UpdateFailHTLC_read(struct LDKu8slice ser);
        public static native long UpdateFailHTLC_read(byte[] ser);
        // struct LDKCVec_u8Z UpdateFailMalformedHTLC_write(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR obj);
        public static native byte[] UpdateFailMalformedHTLC_write(long obj);
-       // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_read(struct LDKu8slice ser);
+       // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ UpdateFailMalformedHTLC_read(struct LDKu8slice ser);
        public static native long UpdateFailMalformedHTLC_read(byte[] ser);
        // struct LDKCVec_u8Z UpdateFee_write(const struct LDKUpdateFee *NONNULL_PTR obj);
        public static native byte[] UpdateFee_write(long obj);
-       // struct LDKUpdateFee UpdateFee_read(struct LDKu8slice ser);
+       // struct LDKCResult_UpdateFeeDecodeErrorZ UpdateFee_read(struct LDKu8slice ser);
        public static native long UpdateFee_read(byte[] ser);
        // struct LDKCVec_u8Z UpdateFulfillHTLC_write(const struct LDKUpdateFulfillHTLC *NONNULL_PTR obj);
        public static native byte[] UpdateFulfillHTLC_write(long obj);
-       // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_read(struct LDKu8slice ser);
+       // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ UpdateFulfillHTLC_read(struct LDKu8slice ser);
        public static native long UpdateFulfillHTLC_read(byte[] ser);
        // struct LDKCVec_u8Z UpdateAddHTLC_write(const struct LDKUpdateAddHTLC *NONNULL_PTR obj);
        public static native byte[] UpdateAddHTLC_write(long obj);
-       // struct LDKUpdateAddHTLC UpdateAddHTLC_read(struct LDKu8slice ser);
+       // struct LDKCResult_UpdateAddHTLCDecodeErrorZ UpdateAddHTLC_read(struct LDKu8slice ser);
        public static native long UpdateAddHTLC_read(byte[] ser);
        // struct LDKCVec_u8Z Ping_write(const struct LDKPing *NONNULL_PTR obj);
        public static native byte[] Ping_write(long obj);
@@ -2323,7 +2733,7 @@ public class bindings {
        public static native long UnsignedChannelAnnouncement_read(byte[] ser);
        // struct LDKCVec_u8Z ChannelAnnouncement_write(const struct LDKChannelAnnouncement *NONNULL_PTR obj);
        public static native byte[] ChannelAnnouncement_write(long obj);
-       // struct LDKChannelAnnouncement ChannelAnnouncement_read(struct LDKu8slice ser);
+       // struct LDKCResult_ChannelAnnouncementDecodeErrorZ ChannelAnnouncement_read(struct LDKu8slice ser);
        public static native long ChannelAnnouncement_read(byte[] ser);
        // struct LDKCVec_u8Z UnsignedChannelUpdate_write(const struct LDKUnsignedChannelUpdate *NONNULL_PTR obj);
        public static native byte[] UnsignedChannelUpdate_write(long obj);
@@ -2331,7 +2741,7 @@ public class bindings {
        public static native long UnsignedChannelUpdate_read(byte[] ser);
        // struct LDKCVec_u8Z ChannelUpdate_write(const struct LDKChannelUpdate *NONNULL_PTR obj);
        public static native byte[] ChannelUpdate_write(long obj);
-       // struct LDKChannelUpdate ChannelUpdate_read(struct LDKu8slice ser);
+       // struct LDKCResult_ChannelUpdateDecodeErrorZ ChannelUpdate_read(struct LDKu8slice ser);
        public static native long ChannelUpdate_read(byte[] ser);
        // struct LDKCVec_u8Z ErrorMessage_write(const struct LDKErrorMessage *NONNULL_PTR obj);
        public static native byte[] ErrorMessage_write(long obj);
@@ -2343,7 +2753,7 @@ public class bindings {
        public static native long UnsignedNodeAnnouncement_read(byte[] ser);
        // struct LDKCVec_u8Z NodeAnnouncement_write(const struct LDKNodeAnnouncement *NONNULL_PTR obj);
        public static native byte[] NodeAnnouncement_write(long obj);
-       // struct LDKNodeAnnouncement NodeAnnouncement_read(struct LDKu8slice ser);
+       // struct LDKCResult_NodeAnnouncementDecodeErrorZ NodeAnnouncement_read(struct LDKu8slice ser);
        public static native long NodeAnnouncement_read(byte[] ser);
        // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ QueryShortChannelIds_read(struct LDKu8slice ser);
        public static native long QueryShortChannelIds_read(byte[] ser);
@@ -2383,14 +2793,14 @@ public class bindings {
        public static native void SocketDescriptor_free(long this_ptr);
        // void PeerHandleError_free(struct LDKPeerHandleError this_ptr);
        public static native void PeerHandleError_free(long this_ptr);
-       // struct LDKPeerHandleError PeerHandleError_clone(const struct LDKPeerHandleError *NONNULL_PTR orig);
-       public static native long PeerHandleError_clone(long orig);
        // bool PeerHandleError_get_no_connection_possible(const struct LDKPeerHandleError *NONNULL_PTR this_ptr);
        public static native boolean PeerHandleError_get_no_connection_possible(long this_ptr);
        // void PeerHandleError_set_no_connection_possible(struct LDKPeerHandleError *NONNULL_PTR this_ptr, bool val);
        public static native void PeerHandleError_set_no_connection_possible(long this_ptr, boolean val);
        // MUST_USE_RES struct LDKPeerHandleError PeerHandleError_new(bool no_connection_possible_arg);
        public static native long PeerHandleError_new(boolean no_connection_possible_arg);
+       // struct LDKPeerHandleError PeerHandleError_clone(const struct LDKPeerHandleError *NONNULL_PTR orig);
+       public static native long PeerHandleError_clone(long orig);
        // void PeerManager_free(struct LDKPeerManager this_ptr);
        public static native void PeerManager_free(long this_ptr);
        // 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);
@@ -2415,18 +2825,16 @@ public class bindings {
        public static native void PeerManager_timer_tick_occured(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 LDKCResult_SecretKeySecpErrorZ derive_private_key(struct LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]);
+       // 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_PublicKeySecpErrorZ derive_public_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey base_point);
+       // struct LDKCResult_PublicKeyErrorZ derive_public_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey base_point);
        public static native long derive_public_key(byte[] per_commitment_point, byte[] base_point);
-       // struct LDKCResult_SecretKeySecpErrorZ derive_private_revocation_key(const uint8_t (*per_commitment_secret)[32], const uint8_t (*countersignatory_revocation_base_secret)[32]);
+       // struct LDKCResult_SecretKeyErrorZ derive_private_revocation_key(const uint8_t (*per_commitment_secret)[32], const uint8_t (*countersignatory_revocation_base_secret)[32]);
        public static native long derive_private_revocation_key(byte[] per_commitment_secret, byte[] countersignatory_revocation_base_secret);
-       // struct LDKCResult_PublicKeySecpErrorZ derive_public_revocation_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey countersignatory_revocation_base_point);
+       // struct LDKCResult_PublicKeyErrorZ derive_public_revocation_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey countersignatory_revocation_base_point);
        public static native long derive_public_revocation_key(byte[] per_commitment_point, byte[] countersignatory_revocation_base_point);
        // void TxCreationKeys_free(struct LDKTxCreationKeys this_ptr);
        public static native void TxCreationKeys_free(long this_ptr);
-       // struct LDKTxCreationKeys TxCreationKeys_clone(const struct LDKTxCreationKeys *NONNULL_PTR orig);
-       public static native long TxCreationKeys_clone(long orig);
        // struct LDKPublicKey TxCreationKeys_get_per_commitment_point(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
        public static native byte[] TxCreationKeys_get_per_commitment_point(long this_ptr);
        // void TxCreationKeys_set_per_commitment_point(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
@@ -2449,14 +2857,14 @@ public class bindings {
        public static native void TxCreationKeys_set_broadcaster_delayed_payment_key(long this_ptr, byte[] val);
        // MUST_USE_RES struct LDKTxCreationKeys TxCreationKeys_new(struct LDKPublicKey per_commitment_point_arg, struct LDKPublicKey revocation_key_arg, struct LDKPublicKey broadcaster_htlc_key_arg, struct LDKPublicKey countersignatory_htlc_key_arg, struct LDKPublicKey broadcaster_delayed_payment_key_arg);
        public static native long TxCreationKeys_new(byte[] per_commitment_point_arg, byte[] revocation_key_arg, byte[] broadcaster_htlc_key_arg, byte[] countersignatory_htlc_key_arg, byte[] broadcaster_delayed_payment_key_arg);
+       // struct LDKTxCreationKeys TxCreationKeys_clone(const struct LDKTxCreationKeys *NONNULL_PTR orig);
+       public static native long TxCreationKeys_clone(long orig);
        // struct LDKCVec_u8Z TxCreationKeys_write(const struct LDKTxCreationKeys *NONNULL_PTR obj);
        public static native byte[] TxCreationKeys_write(long obj);
-       // struct LDKTxCreationKeys TxCreationKeys_read(struct LDKu8slice ser);
+       // struct LDKCResult_TxCreationKeysDecodeErrorZ TxCreationKeys_read(struct LDKu8slice ser);
        public static native long TxCreationKeys_read(byte[] ser);
        // void ChannelPublicKeys_free(struct LDKChannelPublicKeys this_ptr);
        public static native void ChannelPublicKeys_free(long this_ptr);
-       // struct LDKChannelPublicKeys ChannelPublicKeys_clone(const struct LDKChannelPublicKeys *NONNULL_PTR orig);
-       public static native long ChannelPublicKeys_clone(long orig);
        // struct LDKPublicKey ChannelPublicKeys_get_funding_pubkey(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
        public static native byte[] ChannelPublicKeys_get_funding_pubkey(long this_ptr);
        // void ChannelPublicKeys_set_funding_pubkey(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
@@ -2479,20 +2887,20 @@ public class bindings {
        public static native void ChannelPublicKeys_set_htlc_basepoint(long this_ptr, byte[] val);
        // MUST_USE_RES struct LDKChannelPublicKeys ChannelPublicKeys_new(struct LDKPublicKey funding_pubkey_arg, struct LDKPublicKey revocation_basepoint_arg, struct LDKPublicKey payment_point_arg, struct LDKPublicKey delayed_payment_basepoint_arg, struct LDKPublicKey htlc_basepoint_arg);
        public static native long ChannelPublicKeys_new(byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_point_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg);
+       // struct LDKChannelPublicKeys ChannelPublicKeys_clone(const struct LDKChannelPublicKeys *NONNULL_PTR orig);
+       public static native long ChannelPublicKeys_clone(long orig);
        // struct LDKCVec_u8Z ChannelPublicKeys_write(const struct LDKChannelPublicKeys *NONNULL_PTR obj);
        public static native byte[] ChannelPublicKeys_write(long obj);
-       // struct LDKChannelPublicKeys ChannelPublicKeys_read(struct LDKu8slice ser);
+       // struct LDKCResult_ChannelPublicKeysDecodeErrorZ ChannelPublicKeys_read(struct LDKu8slice ser);
        public static native long ChannelPublicKeys_read(byte[] ser);
-       // MUST_USE_RES struct LDKCResult_TxCreationKeysSecpErrorZ TxCreationKeys_derive_new(struct LDKPublicKey per_commitment_point, struct LDKPublicKey broadcaster_delayed_payment_base, struct LDKPublicKey broadcaster_htlc_base, struct LDKPublicKey countersignatory_revocation_base, struct LDKPublicKey countersignatory_htlc_base);
+       // MUST_USE_RES struct LDKCResult_TxCreationKeysErrorZ TxCreationKeys_derive_new(struct LDKPublicKey per_commitment_point, struct LDKPublicKey broadcaster_delayed_payment_base, struct LDKPublicKey broadcaster_htlc_base, struct LDKPublicKey countersignatory_revocation_base, struct LDKPublicKey countersignatory_htlc_base);
        public static native long TxCreationKeys_derive_new(byte[] per_commitment_point, byte[] broadcaster_delayed_payment_base, byte[] broadcaster_htlc_base, byte[] countersignatory_revocation_base, byte[] countersignatory_htlc_base);
-       // MUST_USE_RES struct LDKCResult_TxCreationKeysSecpErrorZ TxCreationKeys_from_channel_static_keys(struct LDKPublicKey per_commitment_point, const struct LDKChannelPublicKeys *NONNULL_PTR broadcaster_keys, const struct LDKChannelPublicKeys *NONNULL_PTR countersignatory_keys);
+       // MUST_USE_RES struct LDKCResult_TxCreationKeysErrorZ TxCreationKeys_from_channel_static_keys(struct LDKPublicKey per_commitment_point, const struct LDKChannelPublicKeys *NONNULL_PTR broadcaster_keys, const struct LDKChannelPublicKeys *NONNULL_PTR countersignatory_keys);
        public static native long TxCreationKeys_from_channel_static_keys(byte[] per_commitment_point, long broadcaster_keys, long countersignatory_keys);
        // struct LDKCVec_u8Z get_revokeable_redeemscript(struct LDKPublicKey revocation_key, uint16_t contest_delay, struct LDKPublicKey broadcaster_delayed_payment_key);
        public static native byte[] get_revokeable_redeemscript(byte[] revocation_key, short contest_delay, byte[] broadcaster_delayed_payment_key);
        // void HTLCOutputInCommitment_free(struct LDKHTLCOutputInCommitment this_ptr);
        public static native void HTLCOutputInCommitment_free(long this_ptr);
-       // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const struct LDKHTLCOutputInCommitment *NONNULL_PTR orig);
-       public static native long HTLCOutputInCommitment_clone(long orig);
        // bool HTLCOutputInCommitment_get_offered(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
        public static native boolean HTLCOutputInCommitment_get_offered(long this_ptr);
        // void HTLCOutputInCommitment_set_offered(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, bool val);
@@ -2509,9 +2917,11 @@ public class bindings {
        public static native byte[] HTLCOutputInCommitment_get_payment_hash(long this_ptr);
        // void HTLCOutputInCommitment_set_payment_hash(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
        public static native void HTLCOutputInCommitment_set_payment_hash(long this_ptr, byte[] val);
+       // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const struct LDKHTLCOutputInCommitment *NONNULL_PTR orig);
+       public static native long HTLCOutputInCommitment_clone(long orig);
        // struct LDKCVec_u8Z HTLCOutputInCommitment_write(const struct LDKHTLCOutputInCommitment *NONNULL_PTR obj);
        public static native byte[] HTLCOutputInCommitment_write(long obj);
-       // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_read(struct LDKu8slice ser);
+       // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ HTLCOutputInCommitment_read(struct LDKu8slice ser);
        public static native long HTLCOutputInCommitment_read(byte[] ser);
        // struct LDKCVec_u8Z get_htlc_redeemscript(const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc, const struct LDKTxCreationKeys *NONNULL_PTR keys);
        public static native byte[] get_htlc_redeemscript(long htlc, long keys);
@@ -2521,8 +2931,6 @@ public class bindings {
        public static native byte[] build_htlc_transaction(byte[] prev_hash, int feerate_per_kw, short contest_delay, long htlc, byte[] broadcaster_delayed_payment_key, byte[] revocation_key);
        // void ChannelTransactionParameters_free(struct LDKChannelTransactionParameters this_ptr);
        public static native void ChannelTransactionParameters_free(long this_ptr);
-       // struct LDKChannelTransactionParameters ChannelTransactionParameters_clone(const struct LDKChannelTransactionParameters *NONNULL_PTR orig);
-       public static native long ChannelTransactionParameters_clone(long orig);
        // struct LDKChannelPublicKeys ChannelTransactionParameters_get_holder_pubkeys(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
        public static native long ChannelTransactionParameters_get_holder_pubkeys(long this_ptr);
        // void ChannelTransactionParameters_set_holder_pubkeys(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
@@ -2545,10 +2953,10 @@ public class bindings {
        public static native void ChannelTransactionParameters_set_funding_outpoint(long this_ptr, long val);
        // MUST_USE_RES struct LDKChannelTransactionParameters ChannelTransactionParameters_new(struct LDKChannelPublicKeys holder_pubkeys_arg, uint16_t holder_selected_contest_delay_arg, bool is_outbound_from_holder_arg, struct LDKCounterpartyChannelTransactionParameters counterparty_parameters_arg, struct LDKOutPoint funding_outpoint_arg);
        public static native long ChannelTransactionParameters_new(long holder_pubkeys_arg, short holder_selected_contest_delay_arg, boolean is_outbound_from_holder_arg, long counterparty_parameters_arg, long funding_outpoint_arg);
+       // struct LDKChannelTransactionParameters ChannelTransactionParameters_clone(const struct LDKChannelTransactionParameters *NONNULL_PTR orig);
+       public static native long ChannelTransactionParameters_clone(long orig);
        // void CounterpartyChannelTransactionParameters_free(struct LDKCounterpartyChannelTransactionParameters this_ptr);
        public static native void CounterpartyChannelTransactionParameters_free(long this_ptr);
-       // struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_clone(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR orig);
-       public static native long CounterpartyChannelTransactionParameters_clone(long orig);
        // struct LDKChannelPublicKeys CounterpartyChannelTransactionParameters_get_pubkeys(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
        public static native long CounterpartyChannelTransactionParameters_get_pubkeys(long this_ptr);
        // void CounterpartyChannelTransactionParameters_set_pubkeys(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
@@ -2559,6 +2967,8 @@ public class bindings {
        public static native void CounterpartyChannelTransactionParameters_set_selected_contest_delay(long this_ptr, short val);
        // MUST_USE_RES struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_new(struct LDKChannelPublicKeys pubkeys_arg, uint16_t selected_contest_delay_arg);
        public static native long CounterpartyChannelTransactionParameters_new(long pubkeys_arg, short selected_contest_delay_arg);
+       // struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_clone(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR orig);
+       public static native long CounterpartyChannelTransactionParameters_clone(long orig);
        // MUST_USE_RES bool ChannelTransactionParameters_is_populated(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
        public static native boolean ChannelTransactionParameters_is_populated(long this_arg);
        // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_holder_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
@@ -2567,11 +2977,11 @@ public class bindings {
        public static native long ChannelTransactionParameters_as_counterparty_broadcastable(long this_arg);
        // struct LDKCVec_u8Z CounterpartyChannelTransactionParameters_write(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR obj);
        public static native byte[] CounterpartyChannelTransactionParameters_write(long obj);
-       // struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_read(struct LDKu8slice ser);
+       // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CounterpartyChannelTransactionParameters_read(struct LDKu8slice ser);
        public static native long CounterpartyChannelTransactionParameters_read(byte[] ser);
        // struct LDKCVec_u8Z ChannelTransactionParameters_write(const struct LDKChannelTransactionParameters *NONNULL_PTR obj);
        public static native byte[] ChannelTransactionParameters_write(long obj);
-       // struct LDKChannelTransactionParameters ChannelTransactionParameters_read(struct LDKu8slice ser);
+       // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ ChannelTransactionParameters_read(struct LDKu8slice ser);
        public static native long ChannelTransactionParameters_read(byte[] ser);
        // void DirectedChannelTransactionParameters_free(struct LDKDirectedChannelTransactionParameters this_ptr);
        public static native void DirectedChannelTransactionParameters_free(long this_ptr);
@@ -2587,24 +2997,22 @@ public class bindings {
        public static native long DirectedChannelTransactionParameters_funding_outpoint(long this_arg);
        // void HolderCommitmentTransaction_free(struct LDKHolderCommitmentTransaction this_ptr);
        public static native void HolderCommitmentTransaction_free(long this_ptr);
-       // struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_clone(const struct LDKHolderCommitmentTransaction *NONNULL_PTR orig);
-       public static native long HolderCommitmentTransaction_clone(long orig);
        // struct LDKSignature HolderCommitmentTransaction_get_counterparty_sig(const struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr);
        public static native byte[] HolderCommitmentTransaction_get_counterparty_sig(long this_ptr);
        // void HolderCommitmentTransaction_set_counterparty_sig(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKSignature val);
        public static native void HolderCommitmentTransaction_set_counterparty_sig(long this_ptr, byte[] val);
        // void HolderCommitmentTransaction_set_counterparty_htlc_sigs(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
        public static native void HolderCommitmentTransaction_set_counterparty_htlc_sigs(long this_ptr, byte[][] val);
+       // struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_clone(const struct LDKHolderCommitmentTransaction *NONNULL_PTR orig);
+       public static native long HolderCommitmentTransaction_clone(long orig);
        // struct LDKCVec_u8Z HolderCommitmentTransaction_write(const struct LDKHolderCommitmentTransaction *NONNULL_PTR obj);
        public static native byte[] HolderCommitmentTransaction_write(long obj);
-       // struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_read(struct LDKu8slice ser);
+       // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ HolderCommitmentTransaction_read(struct LDKu8slice ser);
        public static native long HolderCommitmentTransaction_read(byte[] ser);
        // MUST_USE_RES struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_new(struct LDKCommitmentTransaction commitment_tx, struct LDKSignature counterparty_sig, struct LDKCVec_SignatureZ counterparty_htlc_sigs, struct LDKPublicKey holder_funding_key, struct LDKPublicKey counterparty_funding_key);
        public static native long HolderCommitmentTransaction_new(long commitment_tx, byte[] counterparty_sig, byte[][] counterparty_htlc_sigs, byte[] holder_funding_key, byte[] counterparty_funding_key);
        // void BuiltCommitmentTransaction_free(struct LDKBuiltCommitmentTransaction this_ptr);
        public static native void BuiltCommitmentTransaction_free(long this_ptr);
-       // struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_clone(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR orig);
-       public static native long BuiltCommitmentTransaction_clone(long orig);
        // struct LDKTransaction BuiltCommitmentTransaction_get_transaction(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr);
        public static native byte[] BuiltCommitmentTransaction_get_transaction(long this_ptr);
        // void BuiltCommitmentTransaction_set_transaction(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKTransaction val);
@@ -2615,9 +3023,11 @@ public class bindings {
        public static native void BuiltCommitmentTransaction_set_txid(long this_ptr, byte[] val);
        // MUST_USE_RES struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_new(struct LDKTransaction transaction_arg, struct LDKThirtyTwoBytes txid_arg);
        public static native long BuiltCommitmentTransaction_new(byte[] transaction_arg, byte[] txid_arg);
+       // struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_clone(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR orig);
+       public static native long BuiltCommitmentTransaction_clone(long orig);
        // struct LDKCVec_u8Z BuiltCommitmentTransaction_write(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR obj);
        public static native byte[] BuiltCommitmentTransaction_write(long obj);
-       // struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_read(struct LDKu8slice ser);
+       // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ BuiltCommitmentTransaction_read(struct LDKu8slice ser);
        public static native long BuiltCommitmentTransaction_read(byte[] ser);
        // MUST_USE_RES struct LDKThirtyTwoBytes BuiltCommitmentTransaction_get_sighash_all(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_arg, struct LDKu8slice funding_redeemscript, uint64_t channel_value_satoshis);
        public static native byte[] BuiltCommitmentTransaction_get_sighash_all(long this_arg, byte[] funding_redeemscript, long channel_value_satoshis);
@@ -2629,7 +3039,7 @@ public class bindings {
        public static native long CommitmentTransaction_clone(long orig);
        // struct LDKCVec_u8Z CommitmentTransaction_write(const struct LDKCommitmentTransaction *NONNULL_PTR obj);
        public static native byte[] CommitmentTransaction_write(long obj);
-       // struct LDKCommitmentTransaction CommitmentTransaction_read(struct LDKu8slice ser);
+       // struct LDKCResult_CommitmentTransactionDecodeErrorZ CommitmentTransaction_read(struct LDKu8slice ser);
        public static native long CommitmentTransaction_read(byte[] ser);
        // MUST_USE_RES uint64_t CommitmentTransaction_commitment_number(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
        public static native long CommitmentTransaction_commitment_number(long this_arg);
@@ -2655,16 +3065,44 @@ public class bindings {
        public static native long TrustedCommitmentTransaction_get_htlc_sigs(long this_arg, byte[] htlc_base_key, long channel_parameters);
        // uint64_t get_commitment_transaction_number_obscure_factor(struct LDKPublicKey broadcaster_payment_basepoint, struct LDKPublicKey countersignatory_payment_basepoint, bool outbound_from_broadcaster);
        public static native long get_commitment_transaction_number_obscure_factor(byte[] broadcaster_payment_basepoint, byte[] countersignatory_payment_basepoint, boolean outbound_from_broadcaster);
+       // struct LDKInitFeatures InitFeatures_clone(const struct LDKInitFeatures *NONNULL_PTR orig);
+       public static native long InitFeatures_clone(long orig);
+       // struct LDKNodeFeatures NodeFeatures_clone(const struct LDKNodeFeatures *NONNULL_PTR orig);
+       public static native long NodeFeatures_clone(long orig);
+       // struct LDKChannelFeatures ChannelFeatures_clone(const struct LDKChannelFeatures *NONNULL_PTR orig);
+       public static native long ChannelFeatures_clone(long orig);
        // void InitFeatures_free(struct LDKInitFeatures this_ptr);
        public static native void InitFeatures_free(long this_ptr);
        // void NodeFeatures_free(struct LDKNodeFeatures this_ptr);
        public static native void NodeFeatures_free(long this_ptr);
        // void ChannelFeatures_free(struct LDKChannelFeatures this_ptr);
        public static native void ChannelFeatures_free(long this_ptr);
+       // MUST_USE_RES struct LDKInitFeatures InitFeatures_empty(void);
+       public static native long InitFeatures_empty();
+       // MUST_USE_RES struct LDKInitFeatures InitFeatures_known(void);
+       public static native long InitFeatures_known();
+       // 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 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();
+       // struct LDKCVec_u8Z InitFeatures_write(const struct LDKInitFeatures *NONNULL_PTR obj);
+       public static native byte[] InitFeatures_write(long obj);
+       // struct LDKCVec_u8Z NodeFeatures_write(const struct LDKNodeFeatures *NONNULL_PTR obj);
+       public static native byte[] NodeFeatures_write(long obj);
+       // struct LDKCVec_u8Z ChannelFeatures_write(const struct LDKChannelFeatures *NONNULL_PTR obj);
+       public static native byte[] ChannelFeatures_write(long obj);
+       // struct LDKCResult_InitFeaturesDecodeErrorZ InitFeatures_read(struct LDKu8slice ser);
+       public static native long InitFeatures_read(byte[] ser);
+       // struct LDKCResult_NodeFeaturesDecodeErrorZ NodeFeatures_read(struct LDKu8slice ser);
+       public static native long NodeFeatures_read(byte[] ser);
+       // struct LDKCResult_ChannelFeaturesDecodeErrorZ ChannelFeatures_read(struct LDKu8slice ser);
+       public static native long ChannelFeatures_read(byte[] ser);
        // void RouteHop_free(struct LDKRouteHop this_ptr);
        public static native void RouteHop_free(long this_ptr);
-       // struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig);
-       public static native long RouteHop_clone(long orig);
        // 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);
@@ -2691,22 +3129,22 @@ public class bindings {
        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);
        // void Route_free(struct LDKRoute this_ptr);
        public static native void Route_free(long this_ptr);
-       // struct LDKRoute Route_clone(const struct LDKRoute *NONNULL_PTR orig);
-       public static native long Route_clone(long orig);
        // 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_ptr);
        public static native void RouteHint_free(long this_ptr);
-       // struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
-       public static native long RouteHint_clone(long orig);
        // struct LDKPublicKey RouteHint_get_src_node_id(const struct LDKRouteHint *NONNULL_PTR this_ptr);
        public static native byte[] RouteHint_get_src_node_id(long this_ptr);
        // void RouteHint_set_src_node_id(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKPublicKey val);
@@ -2729,6 +3167,8 @@ public class bindings {
        public static native void RouteHint_set_htlc_minimum_msat(long this_ptr, long val);
        // MUST_USE_RES struct LDKRouteHint RouteHint_new(struct LDKPublicKey src_node_id_arg, uint64_t short_channel_id_arg, struct LDKRoutingFees fees_arg, uint16_t cltv_expiry_delta_arg, uint64_t htlc_minimum_msat_arg);
        public static native long RouteHint_new(byte[] src_node_id_arg, long short_channel_id_arg, long fees_arg, short cltv_expiry_delta_arg, long htlc_minimum_msat_arg);
+       // struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
+       public static native long RouteHint_clone(long orig);
        // struct LDKCResult_RouteLightningErrorZ get_route(struct LDKPublicKey our_node_id, const struct LDKNetworkGraph *NONNULL_PTR network, struct LDKPublicKey target, 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[] target, long[] first_hops, long[] last_hops, long final_value_msat, int final_cltv, long logger);
        // void NetworkGraph_free(struct LDKNetworkGraph this_ptr);
@@ -2751,8 +3191,6 @@ public class bindings {
        public static native long NetGraphMsgHandler_as_MessageSendEventsProvider(long this_arg);
        // void DirectionalChannelInfo_free(struct LDKDirectionalChannelInfo this_ptr);
        public static native void DirectionalChannelInfo_free(long this_ptr);
-       // struct LDKDirectionalChannelInfo DirectionalChannelInfo_clone(const struct LDKDirectionalChannelInfo *NONNULL_PTR orig);
-       public static native long DirectionalChannelInfo_clone(long orig);
        // uint32_t DirectionalChannelInfo_get_last_update(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
        public static native int DirectionalChannelInfo_get_last_update(long this_ptr);
        // void DirectionalChannelInfo_set_last_update(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint32_t val);
@@ -2777,9 +3215,11 @@ public class bindings {
        public static native long DirectionalChannelInfo_get_last_update_message(long this_ptr);
        // void DirectionalChannelInfo_set_last_update_message(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelUpdate val);
        public static native void DirectionalChannelInfo_set_last_update_message(long this_ptr, long val);
+       // struct LDKDirectionalChannelInfo DirectionalChannelInfo_clone(const struct LDKDirectionalChannelInfo *NONNULL_PTR orig);
+       public static native long DirectionalChannelInfo_clone(long orig);
        // struct LDKCVec_u8Z DirectionalChannelInfo_write(const struct LDKDirectionalChannelInfo *NONNULL_PTR obj);
        public static native byte[] DirectionalChannelInfo_write(long obj);
-       // struct LDKDirectionalChannelInfo DirectionalChannelInfo_read(struct LDKu8slice ser);
+       // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ DirectionalChannelInfo_read(struct LDKu8slice ser);
        public static native long DirectionalChannelInfo_read(byte[] ser);
        // void ChannelInfo_free(struct LDKChannelInfo this_ptr);
        public static native void ChannelInfo_free(long this_ptr);
@@ -2809,12 +3249,10 @@ public class bindings {
        public static native void ChannelInfo_set_announcement_message(long this_ptr, long val);
        // struct LDKCVec_u8Z ChannelInfo_write(const struct LDKChannelInfo *NONNULL_PTR obj);
        public static native byte[] ChannelInfo_write(long obj);
-       // struct LDKChannelInfo ChannelInfo_read(struct LDKu8slice ser);
+       // struct LDKCResult_ChannelInfoDecodeErrorZ ChannelInfo_read(struct LDKu8slice ser);
        public static native long ChannelInfo_read(byte[] ser);
        // void RoutingFees_free(struct LDKRoutingFees this_ptr);
        public static native void RoutingFees_free(long this_ptr);
-       // struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig);
-       public static native long RoutingFees_clone(long orig);
        // uint32_t RoutingFees_get_base_msat(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
        public static native int RoutingFees_get_base_msat(long this_ptr);
        // void RoutingFees_set_base_msat(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
@@ -2825,14 +3263,14 @@ public class bindings {
        public static native void RoutingFees_set_proportional_millionths(long this_ptr, int val);
        // MUST_USE_RES struct LDKRoutingFees RoutingFees_new(uint32_t base_msat_arg, uint32_t proportional_millionths_arg);
        public static native long RoutingFees_new(int base_msat_arg, int proportional_millionths_arg);
+       // struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig);
+       public static native long RoutingFees_clone(long orig);
        // struct LDKCResult_RoutingFeesDecodeErrorZ RoutingFees_read(struct LDKu8slice ser);
        public static native long RoutingFees_read(byte[] ser);
        // struct LDKCVec_u8Z RoutingFees_write(const struct LDKRoutingFees *NONNULL_PTR obj);
        public static native byte[] RoutingFees_write(long obj);
        // void NodeAnnouncementInfo_free(struct LDKNodeAnnouncementInfo this_ptr);
        public static native void NodeAnnouncementInfo_free(long this_ptr);
-       // struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_clone(const struct LDKNodeAnnouncementInfo *NONNULL_PTR orig);
-       public static native long NodeAnnouncementInfo_clone(long orig);
        // struct LDKNodeFeatures NodeAnnouncementInfo_get_features(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
        public static native long NodeAnnouncementInfo_get_features(long this_ptr);
        // void NodeAnnouncementInfo_set_features(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
@@ -2857,14 +3295,14 @@ public class bindings {
        public static native void NodeAnnouncementInfo_set_announcement_message(long this_ptr, long val);
        // MUST_USE_RES struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_new(struct LDKNodeFeatures features_arg, uint32_t last_update_arg, struct LDKThreeBytes rgb_arg, struct LDKThirtyTwoBytes alias_arg, struct LDKCVec_NetAddressZ addresses_arg, struct LDKNodeAnnouncement announcement_message_arg);
        public static native long NodeAnnouncementInfo_new(long features_arg, int last_update_arg, byte[] rgb_arg, byte[] alias_arg, long[] addresses_arg, long announcement_message_arg);
+       // struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_clone(const struct LDKNodeAnnouncementInfo *NONNULL_PTR orig);
+       public static native long NodeAnnouncementInfo_clone(long orig);
        // struct LDKCVec_u8Z NodeAnnouncementInfo_write(const struct LDKNodeAnnouncementInfo *NONNULL_PTR obj);
        public static native byte[] NodeAnnouncementInfo_write(long obj);
        // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ NodeAnnouncementInfo_read(struct LDKu8slice ser);
        public static native long NodeAnnouncementInfo_read(byte[] ser);
        // void NodeInfo_free(struct LDKNodeInfo this_ptr);
        public static native void NodeInfo_free(long this_ptr);
-       // struct LDKNodeInfo NodeInfo_clone(const struct LDKNodeInfo *NONNULL_PTR orig);
-       public static native long NodeInfo_clone(long orig);
        // void NodeInfo_set_channels(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
        public static native void NodeInfo_set_channels(long this_ptr, long[] val);
        // struct LDKRoutingFees NodeInfo_get_lowest_inbound_channel_fees(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
@@ -2877,6 +3315,8 @@ public class bindings {
        public static native void NodeInfo_set_announcement_info(long this_ptr, long val);
        // MUST_USE_RES struct LDKNodeInfo NodeInfo_new(struct LDKCVec_u64Z channels_arg, struct LDKRoutingFees lowest_inbound_channel_fees_arg, struct LDKNodeAnnouncementInfo announcement_info_arg);
        public static native long NodeInfo_new(long[] channels_arg, long lowest_inbound_channel_fees_arg, long announcement_info_arg);
+       // struct LDKNodeInfo NodeInfo_clone(const struct LDKNodeInfo *NONNULL_PTR orig);
+       public static native long NodeInfo_clone(long orig);
        // struct LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *NONNULL_PTR obj);
        public static native byte[] NodeInfo_write(long obj);
        // struct LDKCResult_NodeInfoDecodeErrorZ NodeInfo_read(struct LDKu8slice ser);
index f6ba8ed457b83893af5ae4cc558417c428433f47..2771149f08f5f06c7a514d608f773ef5fbc28471 100644 (file)
@@ -14,13 +14,6 @@ public class AcceptChannel extends CommonBase {
                if (ptr != 0) { bindings.AcceptChannel_free(ptr); }
        }
 
-       public AcceptChannel clone() {
-               long ret = bindings.AcceptChannel_clone(this.ptr);
-               AcceptChannel ret_hu_conv = new AcceptChannel(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_temporary_channel_id() {
                byte[] ret = bindings.AcceptChannel_get_temporary_channel_id(this.ptr);
                return ret;
@@ -147,15 +140,21 @@ public class AcceptChannel extends CommonBase {
                bindings.AcceptChannel_set_first_per_commitment_point(this.ptr, val);
        }
 
+       public AcceptChannel clone() {
+               long ret = bindings.AcceptChannel_clone(this.ptr);
+               AcceptChannel ret_hu_conv = new AcceptChannel(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.AcceptChannel_write(this.ptr);
                return ret;
        }
 
-       public static AcceptChannel constructor_read(byte[] ser) {
+       public static Result_AcceptChannelDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.AcceptChannel_read(ser);
-               AcceptChannel ret_hu_conv = new AcceptChannel(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_AcceptChannelDecodeErrorZ ret_hu_conv = Result_AcceptChannelDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 23de5a0fd25c6f05f7a5485c638a95cfb9cc5a5e..14aba58829362a22a3a5a41531b7aa7c661cad1b 100644 (file)
@@ -14,13 +14,6 @@ public class AnnouncementSignatures extends CommonBase {
                if (ptr != 0) { bindings.AnnouncementSignatures_free(ptr); }
        }
 
-       public AnnouncementSignatures clone() {
-               long ret = bindings.AnnouncementSignatures_clone(this.ptr);
-               AnnouncementSignatures ret_hu_conv = new AnnouncementSignatures(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_channel_id() {
                byte[] ret = bindings.AnnouncementSignatures_get_channel_id(this.ptr);
                return ret;
@@ -64,15 +57,21 @@ public class AnnouncementSignatures extends CommonBase {
                return ret_hu_conv;
        }
 
+       public AnnouncementSignatures clone() {
+               long ret = bindings.AnnouncementSignatures_clone(this.ptr);
+               AnnouncementSignatures ret_hu_conv = new AnnouncementSignatures(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.AnnouncementSignatures_write(this.ptr);
                return ret;
        }
 
-       public static AnnouncementSignatures constructor_read(byte[] ser) {
+       public static Result_AnnouncementSignaturesDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.AnnouncementSignatures_read(ser);
-               AnnouncementSignatures ret_hu_conv = new AnnouncementSignatures(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_AnnouncementSignaturesDecodeErrorZ ret_hu_conv = Result_AnnouncementSignaturesDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 5626c66d8bc185b01d1d52f1aadbfdd6d0b0de15..337469f3ff4d287644f05d08273d17ee703eaa46 100644 (file)
@@ -14,13 +14,6 @@ public class BuiltCommitmentTransaction extends CommonBase {
                if (ptr != 0) { bindings.BuiltCommitmentTransaction_free(ptr); }
        }
 
-       public BuiltCommitmentTransaction clone() {
-               long ret = bindings.BuiltCommitmentTransaction_clone(this.ptr);
-               BuiltCommitmentTransaction ret_hu_conv = new BuiltCommitmentTransaction(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_transaction() {
                byte[] ret = bindings.BuiltCommitmentTransaction_get_transaction(this.ptr);
                return ret;
@@ -46,15 +39,21 @@ public class BuiltCommitmentTransaction extends CommonBase {
                return ret_hu_conv;
        }
 
+       public BuiltCommitmentTransaction clone() {
+               long ret = bindings.BuiltCommitmentTransaction_clone(this.ptr);
+               BuiltCommitmentTransaction ret_hu_conv = new BuiltCommitmentTransaction(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.BuiltCommitmentTransaction_write(this.ptr);
                return ret;
        }
 
-       public static BuiltCommitmentTransaction constructor_read(byte[] ser) {
+       public static Result_BuiltCommitmentTransactionDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.BuiltCommitmentTransaction_read(ser);
-               BuiltCommitmentTransaction ret_hu_conv = new BuiltCommitmentTransaction(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_BuiltCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_BuiltCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index a49a163b771d3c9438d9cdc10577b72a671af637..52c88eacf3ff00b53544db6c94f61a0377b7e348 100644 (file)
@@ -14,13 +14,6 @@ public class ChannelAnnouncement extends CommonBase {
                if (ptr != 0) { bindings.ChannelAnnouncement_free(ptr); }
        }
 
-       public ChannelAnnouncement clone() {
-               long ret = bindings.ChannelAnnouncement_clone(this.ptr);
-               ChannelAnnouncement ret_hu_conv = new ChannelAnnouncement(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_node_signature_1() {
                byte[] ret = bindings.ChannelAnnouncement_get_node_signature_1(this.ptr);
                return ret;
@@ -77,15 +70,21 @@ public class ChannelAnnouncement extends CommonBase {
                return ret_hu_conv;
        }
 
+       public ChannelAnnouncement clone() {
+               long ret = bindings.ChannelAnnouncement_clone(this.ptr);
+               ChannelAnnouncement ret_hu_conv = new ChannelAnnouncement(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.ChannelAnnouncement_write(this.ptr);
                return ret;
        }
 
-       public static ChannelAnnouncement constructor_read(byte[] ser) {
+       public static Result_ChannelAnnouncementDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.ChannelAnnouncement_read(ser);
-               ChannelAnnouncement ret_hu_conv = new ChannelAnnouncement(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_ChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_ChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 869ca5729206060e56fd713f8e8c066375d9492e..5af68d383c2fefab17e063aa3d816a4202eacb99 100644 (file)
@@ -14,13 +14,6 @@ public class ChannelConfig extends CommonBase {
                if (ptr != 0) { bindings.ChannelConfig_free(ptr); }
        }
 
-       public ChannelConfig clone() {
-               long ret = bindings.ChannelConfig_clone(this.ptr);
-               ChannelConfig ret_hu_conv = new ChannelConfig(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public int get_fee_proportional_millionths() {
                int ret = bindings.ChannelConfig_get_fee_proportional_millionths(this.ptr);
                return ret;
@@ -55,6 +48,13 @@ public class ChannelConfig extends CommonBase {
                return ret_hu_conv;
        }
 
+       public ChannelConfig clone() {
+               long ret = bindings.ChannelConfig_clone(this.ptr);
+               ChannelConfig ret_hu_conv = new ChannelConfig(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public static ChannelConfig constructor_default() {
                long ret = bindings.ChannelConfig_default();
                ChannelConfig ret_hu_conv = new ChannelConfig(null, ret);
@@ -67,10 +67,9 @@ public class ChannelConfig extends CommonBase {
                return ret;
        }
 
-       public static ChannelConfig constructor_read(byte[] ser) {
+       public static Result_ChannelConfigDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.ChannelConfig_read(ser);
-               ChannelConfig ret_hu_conv = new ChannelConfig(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_ChannelConfigDecodeErrorZ ret_hu_conv = Result_ChannelConfigDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 4c690d2d67f876adfcb4af2dc113a5c3932fe343..216c017bdb1b602df4b3378ff372f643452b94db 100644 (file)
@@ -14,13 +14,6 @@ public class ChannelDetails extends CommonBase {
                if (ptr != 0) { bindings.ChannelDetails_free(ptr); }
        }
 
-       public ChannelDetails clone() {
-               long ret = bindings.ChannelDetails_clone(this.ptr);
-               ChannelDetails ret_hu_conv = new ChannelDetails(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_channel_id() {
                byte[] ret = bindings.ChannelDetails_get_channel_id(this.ptr);
                return ret;
@@ -49,14 +42,6 @@ public class ChannelDetails extends CommonBase {
        public void set_counterparty_features(InitFeatures val) {
                bindings.ChannelDetails_set_counterparty_features(this.ptr, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(val);
-               // Due to rust's strict-ownership memory model, in some cases we need to "move"
-               // an object to pass exclusive ownership to the function being called.
-               // In most cases, we avoid this being visible in GC'd languages by cloning the object
-               // at the FFI layer, creating a new object which Rust can claim ownership of
-               // However, in some cases (eg here), there is no way to clone an object, and thus
-               // we actually have to pass full ownership to Rust.
-               // Thus, after this call, val is reset to null and is now a dummy object.
-               val.ptr = 0;
        }
 
        public long get_channel_value_satoshis() {
@@ -104,4 +89,11 @@ public class ChannelDetails extends CommonBase {
                bindings.ChannelDetails_set_is_live(this.ptr, val);
        }
 
+       public ChannelDetails clone() {
+               long ret = bindings.ChannelDetails_clone(this.ptr);
+               ChannelDetails ret_hu_conv = new ChannelDetails(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
 }
index 428ed8b7d8733fb30107a1aba6bb402255da3669..7b10e51bf73b03276b062101feda6a0961b21841 100644 (file)
@@ -14,4 +14,36 @@ public class ChannelFeatures extends CommonBase {
                if (ptr != 0) { bindings.ChannelFeatures_free(ptr); }
        }
 
+       public ChannelFeatures clone() {
+               long ret = bindings.ChannelFeatures_clone(this.ptr);
+               ChannelFeatures ret_hu_conv = new ChannelFeatures(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public static ChannelFeatures constructor_empty() {
+               long ret = bindings.ChannelFeatures_empty();
+               ChannelFeatures ret_hu_conv = new ChannelFeatures(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       public static ChannelFeatures constructor_known() {
+               long ret = bindings.ChannelFeatures_known();
+               ChannelFeatures ret_hu_conv = new ChannelFeatures(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       public byte[] write() {
+               byte[] ret = bindings.ChannelFeatures_write(this.ptr);
+               return ret;
+       }
+
+       public static Result_ChannelFeaturesDecodeErrorZ constructor_read(byte[] ser) {
+               long ret = bindings.ChannelFeatures_read(ser);
+               Result_ChannelFeaturesDecodeErrorZ ret_hu_conv = Result_ChannelFeaturesDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index a07f2e2afb86bc0b03c45905f1bd22c5800e1db8..730d50adb2618cd4932ad8ab51c166fa574003d1 100644 (file)
@@ -14,13 +14,6 @@ public class ChannelHandshakeConfig extends CommonBase {
                if (ptr != 0) { bindings.ChannelHandshakeConfig_free(ptr); }
        }
 
-       public ChannelHandshakeConfig clone() {
-               long ret = bindings.ChannelHandshakeConfig_clone(this.ptr);
-               ChannelHandshakeConfig ret_hu_conv = new ChannelHandshakeConfig(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public int get_minimum_depth() {
                int ret = bindings.ChannelHandshakeConfig_get_minimum_depth(this.ptr);
                return ret;
@@ -55,6 +48,13 @@ public class ChannelHandshakeConfig extends CommonBase {
                return ret_hu_conv;
        }
 
+       public ChannelHandshakeConfig clone() {
+               long ret = bindings.ChannelHandshakeConfig_clone(this.ptr);
+               ChannelHandshakeConfig ret_hu_conv = new ChannelHandshakeConfig(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public static ChannelHandshakeConfig constructor_default() {
                long ret = bindings.ChannelHandshakeConfig_default();
                ChannelHandshakeConfig ret_hu_conv = new ChannelHandshakeConfig(null, ret);
index e108446ee1f65d1a21dd944eccbd76ecff617398..33eec3053dfbd03871304c071cab459fe50dd6ae 100644 (file)
@@ -14,13 +14,6 @@ public class ChannelHandshakeLimits extends CommonBase {
                if (ptr != 0) { bindings.ChannelHandshakeLimits_free(ptr); }
        }
 
-       public ChannelHandshakeLimits clone() {
-               long ret = bindings.ChannelHandshakeLimits_clone(this.ptr);
-               ChannelHandshakeLimits ret_hu_conv = new ChannelHandshakeLimits(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public long get_min_funding_satoshis() {
                long ret = bindings.ChannelHandshakeLimits_get_min_funding_satoshis(this.ptr);
                return ret;
@@ -118,6 +111,13 @@ public class ChannelHandshakeLimits extends CommonBase {
                return ret_hu_conv;
        }
 
+       public ChannelHandshakeLimits clone() {
+               long ret = bindings.ChannelHandshakeLimits_clone(this.ptr);
+               ChannelHandshakeLimits ret_hu_conv = new ChannelHandshakeLimits(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public static ChannelHandshakeLimits constructor_default() {
                long ret = bindings.ChannelHandshakeLimits_default();
                ChannelHandshakeLimits ret_hu_conv = new ChannelHandshakeLimits(null, ret);
index 8c9e5727d8c2ad96cd5f4460cee79dd8f6831c9b..5850917adb78226fa73747c277bc02abe2d57d4a 100644 (file)
@@ -24,14 +24,6 @@ public class ChannelInfo extends CommonBase {
        public void set_features(ChannelFeatures val) {
                bindings.ChannelInfo_set_features(this.ptr, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(val);
-               // Due to rust's strict-ownership memory model, in some cases we need to "move"
-               // an object to pass exclusive ownership to the function being called.
-               // In most cases, we avoid this being visible in GC'd languages by cloning the object
-               // at the FFI layer, creating a new object which Rust can claim ownership of
-               // However, in some cases (eg here), there is no way to clone an object, and thus
-               // we actually have to pass full ownership to Rust.
-               // Thus, after this call, val is reset to null and is now a dummy object.
-               val.ptr = 0;
        }
 
        public byte[] get_node_one() {
@@ -93,10 +85,9 @@ public class ChannelInfo extends CommonBase {
                return ret;
        }
 
-       public static ChannelInfo constructor_read(byte[] ser) {
+       public static Result_ChannelInfoDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.ChannelInfo_read(ser);
-               ChannelInfo ret_hu_conv = new ChannelInfo(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_ChannelInfoDecodeErrorZ ret_hu_conv = Result_ChannelInfoDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 060133855ae1117c56add57e5cf0a659e0bf9cdf..6c39567044fd6b997037b4fc763d2b5559792e93 100644 (file)
@@ -130,28 +130,12 @@ public class ChannelMessageHandler extends CommonBase {
        public void handle_open_channel(byte[] their_node_id, InitFeatures their_features, OpenChannel msg) {
                bindings.ChannelMessageHandler_handle_open_channel(this.ptr, their_node_id, their_features == null ? 0 : their_features.ptr & ~1, msg == null ? 0 : msg.ptr & ~1);
                this.ptrs_to.add(their_features);
-               // Due to rust's strict-ownership memory model, in some cases we need to "move"
-               // an object to pass exclusive ownership to the function being called.
-               // In most cases, we avoid this being visible in GC'd languages by cloning the object
-               // at the FFI layer, creating a new object which Rust can claim ownership of
-               // However, in some cases (eg here), there is no way to clone an object, and thus
-               // we actually have to pass full ownership to Rust.
-               // Thus, after this call, their_features is reset to null and is now a dummy object.
-               their_features.ptr = 0;
                this.ptrs_to.add(msg);
        }
 
        public void handle_accept_channel(byte[] their_node_id, InitFeatures their_features, AcceptChannel msg) {
                bindings.ChannelMessageHandler_handle_accept_channel(this.ptr, their_node_id, their_features == null ? 0 : their_features.ptr & ~1, msg == null ? 0 : msg.ptr & ~1);
                this.ptrs_to.add(their_features);
-               // Due to rust's strict-ownership memory model, in some cases we need to "move"
-               // an object to pass exclusive ownership to the function being called.
-               // In most cases, we avoid this being visible in GC'd languages by cloning the object
-               // at the FFI layer, creating a new object which Rust can claim ownership of
-               // However, in some cases (eg here), there is no way to clone an object, and thus
-               // we actually have to pass full ownership to Rust.
-               // Thus, after this call, their_features is reset to null and is now a dummy object.
-               their_features.ptr = 0;
                this.ptrs_to.add(msg);
        }
 
index 739965b177dca5cac3c32d3545e167f36d1ac9d4..179a200d9824857ac849d8120f246426c65e29ca 100644 (file)
@@ -14,13 +14,6 @@ public class ChannelMonitorUpdate extends CommonBase {
                if (ptr != 0) { bindings.ChannelMonitorUpdate_free(ptr); }
        }
 
-       public ChannelMonitorUpdate clone() {
-               long ret = bindings.ChannelMonitorUpdate_clone(this.ptr);
-               ChannelMonitorUpdate ret_hu_conv = new ChannelMonitorUpdate(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public long get_update_id() {
                long ret = bindings.ChannelMonitorUpdate_get_update_id(this.ptr);
                return ret;
@@ -30,6 +23,13 @@ public class ChannelMonitorUpdate extends CommonBase {
                bindings.ChannelMonitorUpdate_set_update_id(this.ptr, val);
        }
 
+       public ChannelMonitorUpdate clone() {
+               long ret = bindings.ChannelMonitorUpdate_clone(this.ptr);
+               ChannelMonitorUpdate ret_hu_conv = new ChannelMonitorUpdate(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.ChannelMonitorUpdate_write(this.ptr);
                return ret;
index 91102b530ff675b21015619526fad8b5b4af462b..0d2664a6d46f16bcd4d201b082b3cdc0583da16f 100644 (file)
@@ -14,13 +14,6 @@ public class ChannelPublicKeys extends CommonBase {
                if (ptr != 0) { bindings.ChannelPublicKeys_free(ptr); }
        }
 
-       public ChannelPublicKeys clone() {
-               long ret = bindings.ChannelPublicKeys_clone(this.ptr);
-               ChannelPublicKeys ret_hu_conv = new ChannelPublicKeys(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_funding_pubkey() {
                byte[] ret = bindings.ChannelPublicKeys_get_funding_pubkey(this.ptr);
                return ret;
@@ -73,15 +66,21 @@ public class ChannelPublicKeys extends CommonBase {
                return ret_hu_conv;
        }
 
+       public ChannelPublicKeys clone() {
+               long ret = bindings.ChannelPublicKeys_clone(this.ptr);
+               ChannelPublicKeys ret_hu_conv = new ChannelPublicKeys(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.ChannelPublicKeys_write(this.ptr);
                return ret;
        }
 
-       public static ChannelPublicKeys constructor_read(byte[] ser) {
+       public static Result_ChannelPublicKeysDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.ChannelPublicKeys_read(ser);
-               ChannelPublicKeys ret_hu_conv = new ChannelPublicKeys(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_ChannelPublicKeysDecodeErrorZ ret_hu_conv = Result_ChannelPublicKeysDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 9df4872905c1fa8da029b53524f79e22149b8948..be92848979f01fec03e5fdc823ed89346133279b 100644 (file)
@@ -14,13 +14,6 @@ public class ChannelReestablish extends CommonBase {
                if (ptr != 0) { bindings.ChannelReestablish_free(ptr); }
        }
 
-       public ChannelReestablish clone() {
-               long ret = bindings.ChannelReestablish_clone(this.ptr);
-               ChannelReestablish ret_hu_conv = new ChannelReestablish(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_channel_id() {
                byte[] ret = bindings.ChannelReestablish_get_channel_id(this.ptr);
                return ret;
@@ -48,6 +41,13 @@ public class ChannelReestablish extends CommonBase {
                bindings.ChannelReestablish_set_next_remote_commitment_number(this.ptr, val);
        }
 
+       public ChannelReestablish clone() {
+               long ret = bindings.ChannelReestablish_clone(this.ptr);
+               ChannelReestablish ret_hu_conv = new ChannelReestablish(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.ChannelReestablish_write(this.ptr);
                return ret;
index 1740e54c3b8107bbc3e8684f5a2350e0ff86259d..a64af1735bba87cdeb038d5612cf647bb3130c93 100644 (file)
@@ -14,13 +14,6 @@ public class ChannelTransactionParameters extends CommonBase {
                if (ptr != 0) { bindings.ChannelTransactionParameters_free(ptr); }
        }
 
-       public ChannelTransactionParameters clone() {
-               long ret = bindings.ChannelTransactionParameters_clone(this.ptr);
-               ChannelTransactionParameters ret_hu_conv = new ChannelTransactionParameters(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public ChannelPublicKeys get_holder_pubkeys() {
                long ret = bindings.ChannelTransactionParameters_get_holder_pubkeys(this.ptr);
                ChannelPublicKeys ret_hu_conv = new ChannelPublicKeys(null, ret);
@@ -85,6 +78,13 @@ public class ChannelTransactionParameters extends CommonBase {
                return ret_hu_conv;
        }
 
+       public ChannelTransactionParameters clone() {
+               long ret = bindings.ChannelTransactionParameters_clone(this.ptr);
+               ChannelTransactionParameters ret_hu_conv = new ChannelTransactionParameters(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public boolean is_populated() {
                boolean ret = bindings.ChannelTransactionParameters_is_populated(this.ptr);
                return ret;
@@ -109,10 +109,9 @@ public class ChannelTransactionParameters extends CommonBase {
                return ret;
        }
 
-       public static ChannelTransactionParameters constructor_read(byte[] ser) {
+       public static Result_ChannelTransactionParametersDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.ChannelTransactionParameters_read(ser);
-               ChannelTransactionParameters ret_hu_conv = new ChannelTransactionParameters(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_ChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_ChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index cb055f37c92018fa3283968b387c825753672d70..805b4511cbbbc7fdfa3475bb2f6323c08395d8a0 100644 (file)
@@ -14,13 +14,6 @@ public class ChannelUpdate extends CommonBase {
                if (ptr != 0) { bindings.ChannelUpdate_free(ptr); }
        }
 
-       public ChannelUpdate clone() {
-               long ret = bindings.ChannelUpdate_clone(this.ptr);
-               ChannelUpdate ret_hu_conv = new ChannelUpdate(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_signature() {
                byte[] ret = bindings.ChannelUpdate_get_signature(this.ptr);
                return ret;
@@ -50,15 +43,21 @@ public class ChannelUpdate extends CommonBase {
                return ret_hu_conv;
        }
 
+       public ChannelUpdate clone() {
+               long ret = bindings.ChannelUpdate_clone(this.ptr);
+               ChannelUpdate ret_hu_conv = new ChannelUpdate(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.ChannelUpdate_write(this.ptr);
                return ret;
        }
 
-       public static ChannelUpdate constructor_read(byte[] ser) {
+       public static Result_ChannelUpdateDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.ChannelUpdate_read(ser);
-               ChannelUpdate ret_hu_conv = new ChannelUpdate(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_ChannelUpdateDecodeErrorZ ret_hu_conv = Result_ChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index fbd0f3305b89641e5d924e8751447739427fff36..a42c3e506fc0e64f1052ef88559b0aab01aba51d 100644 (file)
@@ -14,13 +14,6 @@ public class ClosingSigned extends CommonBase {
                if (ptr != 0) { bindings.ClosingSigned_free(ptr); }
        }
 
-       public ClosingSigned clone() {
-               long ret = bindings.ClosingSigned_clone(this.ptr);
-               ClosingSigned ret_hu_conv = new ClosingSigned(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_channel_id() {
                byte[] ret = bindings.ClosingSigned_get_channel_id(this.ptr);
                return ret;
@@ -55,15 +48,21 @@ public class ClosingSigned extends CommonBase {
                return ret_hu_conv;
        }
 
+       public ClosingSigned clone() {
+               long ret = bindings.ClosingSigned_clone(this.ptr);
+               ClosingSigned ret_hu_conv = new ClosingSigned(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.ClosingSigned_write(this.ptr);
                return ret;
        }
 
-       public static ClosingSigned constructor_read(byte[] ser) {
+       public static Result_ClosingSignedDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.ClosingSigned_read(ser);
-               ClosingSigned ret_hu_conv = new ClosingSigned(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_ClosingSignedDecodeErrorZ ret_hu_conv = Result_ClosingSignedDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index e6a76bcf4f779fb732e07f2dad2ca96337153aba..b14e1ca416d28204e5dfd9ba858120bc07850ff0 100644 (file)
@@ -14,13 +14,6 @@ public class CommitmentSigned extends CommonBase {
                if (ptr != 0) { bindings.CommitmentSigned_free(ptr); }
        }
 
-       public CommitmentSigned clone() {
-               long ret = bindings.CommitmentSigned_clone(this.ptr);
-               CommitmentSigned ret_hu_conv = new CommitmentSigned(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_channel_id() {
                byte[] ret = bindings.CommitmentSigned_get_channel_id(this.ptr);
                return ret;
@@ -50,15 +43,21 @@ public class CommitmentSigned extends CommonBase {
                return ret_hu_conv;
        }
 
+       public CommitmentSigned clone() {
+               long ret = bindings.CommitmentSigned_clone(this.ptr);
+               CommitmentSigned ret_hu_conv = new CommitmentSigned(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.CommitmentSigned_write(this.ptr);
                return ret;
        }
 
-       public static CommitmentSigned constructor_read(byte[] ser) {
+       public static Result_CommitmentSignedDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.CommitmentSigned_read(ser);
-               CommitmentSigned ret_hu_conv = new CommitmentSigned(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_CommitmentSignedDecodeErrorZ ret_hu_conv = Result_CommitmentSignedDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index bb38be53660229ac2a186bf5a361c5e0a57a0ccb..a4f1698cf063a79d7693c20baf7fe30d4ef4cc68 100644 (file)
@@ -26,10 +26,9 @@ public class CommitmentTransaction extends CommonBase {
                return ret;
        }
 
-       public static CommitmentTransaction constructor_read(byte[] ser) {
+       public static Result_CommitmentTransactionDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.CommitmentTransaction_read(ser);
-               CommitmentTransaction ret_hu_conv = new CommitmentTransaction(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_CommitmentTransactionDecodeErrorZ ret_hu_conv = Result_CommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index c53eb4ebf3dcd2c29cf02de588287fded7058dd1..d6fdfa201655cd14e0ab1786b9c3d7f80ab3da16 100644 (file)
@@ -14,13 +14,6 @@ public class CommitmentUpdate extends CommonBase {
                if (ptr != 0) { bindings.CommitmentUpdate_free(ptr); }
        }
 
-       public CommitmentUpdate clone() {
-               long ret = bindings.CommitmentUpdate_clone(this.ptr);
-               CommitmentUpdate ret_hu_conv = new CommitmentUpdate(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public void set_update_add_htlcs(UpdateAddHTLC[] val) {
                bindings.CommitmentUpdate_set_update_add_htlcs(this.ptr, Arrays.stream(val).mapToLong(arr_conv_15 -> arr_conv_15 == null ? 0 : arr_conv_15.ptr & ~1).toArray());
                /* TODO 2 UpdateAddHTLC  */;
@@ -78,4 +71,11 @@ public class CommitmentUpdate extends CommonBase {
                return ret_hu_conv;
        }
 
+       public CommitmentUpdate clone() {
+               long ret = bindings.CommitmentUpdate_clone(this.ptr);
+               CommitmentUpdate ret_hu_conv = new CommitmentUpdate(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
 }
index 5cabe932481a4cfcdd1fc535d66e243bf8bdd055..ae2d77cc9d95332ae1c23050eca5fc473d6ff1e6 100644 (file)
@@ -14,13 +14,6 @@ public class CounterpartyChannelTransactionParameters extends CommonBase {
                if (ptr != 0) { bindings.CounterpartyChannelTransactionParameters_free(ptr); }
        }
 
-       public CounterpartyChannelTransactionParameters clone() {
-               long ret = bindings.CounterpartyChannelTransactionParameters_clone(this.ptr);
-               CounterpartyChannelTransactionParameters ret_hu_conv = new CounterpartyChannelTransactionParameters(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public ChannelPublicKeys get_pubkeys() {
                long ret = bindings.CounterpartyChannelTransactionParameters_get_pubkeys(this.ptr);
                ChannelPublicKeys ret_hu_conv = new ChannelPublicKeys(null, ret);
@@ -50,15 +43,21 @@ public class CounterpartyChannelTransactionParameters extends CommonBase {
                return ret_hu_conv;
        }
 
+       public CounterpartyChannelTransactionParameters clone() {
+               long ret = bindings.CounterpartyChannelTransactionParameters_clone(this.ptr);
+               CounterpartyChannelTransactionParameters ret_hu_conv = new CounterpartyChannelTransactionParameters(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.CounterpartyChannelTransactionParameters_write(this.ptr);
                return ret;
        }
 
-       public static CounterpartyChannelTransactionParameters constructor_read(byte[] ser) {
+       public static Result_CounterpartyChannelTransactionParametersDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.CounterpartyChannelTransactionParameters_read(ser);
-               CounterpartyChannelTransactionParameters ret_hu_conv = new CounterpartyChannelTransactionParameters(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_CounterpartyChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_CounterpartyChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 63db5eef41e4c627b6438f7d2efca0dfecd1ba6e..4d0e79d4921dfa4bc9e495186cf4fa6132633046 100644 (file)
@@ -14,13 +14,6 @@ public class DataLossProtect extends CommonBase {
                if (ptr != 0) { bindings.DataLossProtect_free(ptr); }
        }
 
-       public DataLossProtect clone() {
-               long ret = bindings.DataLossProtect_clone(this.ptr);
-               DataLossProtect ret_hu_conv = new DataLossProtect(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_your_last_per_commitment_secret() {
                byte[] ret = bindings.DataLossProtect_get_your_last_per_commitment_secret(this.ptr);
                return ret;
@@ -46,4 +39,11 @@ public class DataLossProtect extends CommonBase {
                return ret_hu_conv;
        }
 
+       public DataLossProtect clone() {
+               long ret = bindings.DataLossProtect_clone(this.ptr);
+               DataLossProtect ret_hu_conv = new DataLossProtect(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
 }
index 82ec50918f8eda135cfc04f5237de4d8dfdb11b1..8e51c3f245195a973a8d1d60d2f98397ff238eff 100644 (file)
@@ -14,13 +14,6 @@ public class DirectionalChannelInfo extends CommonBase {
                if (ptr != 0) { bindings.DirectionalChannelInfo_free(ptr); }
        }
 
-       public DirectionalChannelInfo clone() {
-               long ret = bindings.DirectionalChannelInfo_clone(this.ptr);
-               DirectionalChannelInfo ret_hu_conv = new DirectionalChannelInfo(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public int get_last_update() {
                int ret = bindings.DirectionalChannelInfo_get_last_update(this.ptr);
                return ret;
@@ -81,15 +74,21 @@ public class DirectionalChannelInfo extends CommonBase {
                this.ptrs_to.add(val);
        }
 
+       public DirectionalChannelInfo clone() {
+               long ret = bindings.DirectionalChannelInfo_clone(this.ptr);
+               DirectionalChannelInfo ret_hu_conv = new DirectionalChannelInfo(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.DirectionalChannelInfo_write(this.ptr);
                return ret;
        }
 
-       public static DirectionalChannelInfo constructor_read(byte[] ser) {
+       public static Result_DirectionalChannelInfoDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.DirectionalChannelInfo_read(ser);
-               DirectionalChannelInfo ret_hu_conv = new DirectionalChannelInfo(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_DirectionalChannelInfoDecodeErrorZ ret_hu_conv = Result_DirectionalChannelInfoDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index a90b207bd5ec08597d6b85b9cca7e1fe14d8111b..8e1f30ddcb36824b2c8ebb90bcddc8b1baa3eac7 100644 (file)
@@ -14,13 +14,6 @@ public class ErrorMessage extends CommonBase {
                if (ptr != 0) { bindings.ErrorMessage_free(ptr); }
        }
 
-       public ErrorMessage clone() {
-               long ret = bindings.ErrorMessage_clone(this.ptr);
-               ErrorMessage ret_hu_conv = new ErrorMessage(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_channel_id() {
                byte[] ret = bindings.ErrorMessage_get_channel_id(this.ptr);
                return ret;
@@ -46,6 +39,13 @@ public class ErrorMessage extends CommonBase {
                return ret_hu_conv;
        }
 
+       public ErrorMessage clone() {
+               long ret = bindings.ErrorMessage_clone(this.ptr);
+               ErrorMessage ret_hu_conv = new ErrorMessage(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.ErrorMessage_write(this.ptr);
                return ret;
index 7687561d5f65f9520e1ed54d4505783825e4ef8e..c6388db582bee41800f7eb73180e4e82e037e45d 100644 (file)
@@ -14,13 +14,6 @@ public class FundingCreated extends CommonBase {
                if (ptr != 0) { bindings.FundingCreated_free(ptr); }
        }
 
-       public FundingCreated clone() {
-               long ret = bindings.FundingCreated_clone(this.ptr);
-               FundingCreated ret_hu_conv = new FundingCreated(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_temporary_channel_id() {
                byte[] ret = bindings.FundingCreated_get_temporary_channel_id(this.ptr);
                return ret;
@@ -64,15 +57,21 @@ public class FundingCreated extends CommonBase {
                return ret_hu_conv;
        }
 
+       public FundingCreated clone() {
+               long ret = bindings.FundingCreated_clone(this.ptr);
+               FundingCreated ret_hu_conv = new FundingCreated(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.FundingCreated_write(this.ptr);
                return ret;
        }
 
-       public static FundingCreated constructor_read(byte[] ser) {
+       public static Result_FundingCreatedDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.FundingCreated_read(ser);
-               FundingCreated ret_hu_conv = new FundingCreated(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_FundingCreatedDecodeErrorZ ret_hu_conv = Result_FundingCreatedDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 4439697f84b16da44478418bea75ed77a341dc09..0462f1a07c8326c9fee3e0823999bac936256687 100644 (file)
@@ -14,13 +14,6 @@ public class FundingLocked extends CommonBase {
                if (ptr != 0) { bindings.FundingLocked_free(ptr); }
        }
 
-       public FundingLocked clone() {
-               long ret = bindings.FundingLocked_clone(this.ptr);
-               FundingLocked ret_hu_conv = new FundingLocked(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_channel_id() {
                byte[] ret = bindings.FundingLocked_get_channel_id(this.ptr);
                return ret;
@@ -46,15 +39,21 @@ public class FundingLocked extends CommonBase {
                return ret_hu_conv;
        }
 
+       public FundingLocked clone() {
+               long ret = bindings.FundingLocked_clone(this.ptr);
+               FundingLocked ret_hu_conv = new FundingLocked(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.FundingLocked_write(this.ptr);
                return ret;
        }
 
-       public static FundingLocked constructor_read(byte[] ser) {
+       public static Result_FundingLockedDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.FundingLocked_read(ser);
-               FundingLocked ret_hu_conv = new FundingLocked(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_FundingLockedDecodeErrorZ ret_hu_conv = Result_FundingLockedDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index d8566044d45d6c8815e0591456a2766802f5476a..e4241d920873e73b19028899d4d054c40e8d22f0 100644 (file)
@@ -14,13 +14,6 @@ public class FundingSigned extends CommonBase {
                if (ptr != 0) { bindings.FundingSigned_free(ptr); }
        }
 
-       public FundingSigned clone() {
-               long ret = bindings.FundingSigned_clone(this.ptr);
-               FundingSigned ret_hu_conv = new FundingSigned(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_channel_id() {
                byte[] ret = bindings.FundingSigned_get_channel_id(this.ptr);
                return ret;
@@ -46,15 +39,21 @@ public class FundingSigned extends CommonBase {
                return ret_hu_conv;
        }
 
+       public FundingSigned clone() {
+               long ret = bindings.FundingSigned_clone(this.ptr);
+               FundingSigned ret_hu_conv = new FundingSigned(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.FundingSigned_write(this.ptr);
                return ret;
        }
 
-       public static FundingSigned constructor_read(byte[] ser) {
+       public static Result_FundingSignedDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.FundingSigned_read(ser);
-               FundingSigned ret_hu_conv = new FundingSigned(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_FundingSignedDecodeErrorZ ret_hu_conv = Result_FundingSignedDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 55458e73140263db4c879fe9852f42bb4a3977f0..7f935692e5437f1a4665c21d21d5c3bb8b0cdc25 100644 (file)
@@ -14,13 +14,6 @@ public class GossipTimestampFilter extends CommonBase {
                if (ptr != 0) { bindings.GossipTimestampFilter_free(ptr); }
        }
 
-       public GossipTimestampFilter clone() {
-               long ret = bindings.GossipTimestampFilter_clone(this.ptr);
-               GossipTimestampFilter ret_hu_conv = new GossipTimestampFilter(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_chain_hash() {
                byte[] ret = bindings.GossipTimestampFilter_get_chain_hash(this.ptr);
                return ret;
@@ -55,6 +48,13 @@ public class GossipTimestampFilter extends CommonBase {
                return ret_hu_conv;
        }
 
+       public GossipTimestampFilter clone() {
+               long ret = bindings.GossipTimestampFilter_clone(this.ptr);
+               GossipTimestampFilter ret_hu_conv = new GossipTimestampFilter(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public static Result_GossipTimestampFilterDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.GossipTimestampFilter_read(ser);
                Result_GossipTimestampFilterDecodeErrorZ ret_hu_conv = Result_GossipTimestampFilterDecodeErrorZ.constr_from_ptr(ret);
index daa1c42d5d0499044cdda92f5db7d0c6cafebcb2..ea8dd2cbe09fcecb04d84c01ab832bcbe7bb57fa 100644 (file)
@@ -14,13 +14,6 @@ public class HTLCOutputInCommitment extends CommonBase {
                if (ptr != 0) { bindings.HTLCOutputInCommitment_free(ptr); }
        }
 
-       public HTLCOutputInCommitment clone() {
-               long ret = bindings.HTLCOutputInCommitment_clone(this.ptr);
-               HTLCOutputInCommitment ret_hu_conv = new HTLCOutputInCommitment(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public boolean get_offered() {
                boolean ret = bindings.HTLCOutputInCommitment_get_offered(this.ptr);
                return ret;
@@ -57,15 +50,21 @@ public class HTLCOutputInCommitment extends CommonBase {
                bindings.HTLCOutputInCommitment_set_payment_hash(this.ptr, val);
        }
 
+       public HTLCOutputInCommitment clone() {
+               long ret = bindings.HTLCOutputInCommitment_clone(this.ptr);
+               HTLCOutputInCommitment ret_hu_conv = new HTLCOutputInCommitment(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.HTLCOutputInCommitment_write(this.ptr);
                return ret;
        }
 
-       public static HTLCOutputInCommitment constructor_read(byte[] ser) {
+       public static Result_HTLCOutputInCommitmentDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.HTLCOutputInCommitment_read(ser);
-               HTLCOutputInCommitment ret_hu_conv = new HTLCOutputInCommitment(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_HTLCOutputInCommitmentDecodeErrorZ ret_hu_conv = Result_HTLCOutputInCommitmentDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index f860f5dd8d464efbb8c23af4ee182f3a0d4d12ae..57f94ec2202165b714d91a7712ce81070e476f1c 100644 (file)
@@ -26,10 +26,9 @@ public class HTLCUpdate extends CommonBase {
                return ret;
        }
 
-       public static HTLCUpdate constructor_read(byte[] ser) {
+       public static Result_HTLCUpdateDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.HTLCUpdate_read(ser);
-               HTLCUpdate ret_hu_conv = new HTLCUpdate(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_HTLCUpdateDecodeErrorZ ret_hu_conv = Result_HTLCUpdateDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 584c9b7612e6e032f813180bb47be0fec77545db..2ca98f51c8b9f0020ae6ea439d1cd0f81b8f191b 100644 (file)
@@ -14,13 +14,6 @@ public class HolderCommitmentTransaction extends CommonBase {
                if (ptr != 0) { bindings.HolderCommitmentTransaction_free(ptr); }
        }
 
-       public HolderCommitmentTransaction clone() {
-               long ret = bindings.HolderCommitmentTransaction_clone(this.ptr);
-               HolderCommitmentTransaction ret_hu_conv = new HolderCommitmentTransaction(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_counterparty_sig() {
                byte[] ret = bindings.HolderCommitmentTransaction_get_counterparty_sig(this.ptr);
                return ret;
@@ -34,15 +27,21 @@ public class HolderCommitmentTransaction extends CommonBase {
                bindings.HolderCommitmentTransaction_set_counterparty_htlc_sigs(this.ptr, val);
        }
 
+       public HolderCommitmentTransaction clone() {
+               long ret = bindings.HolderCommitmentTransaction_clone(this.ptr);
+               HolderCommitmentTransaction ret_hu_conv = new HolderCommitmentTransaction(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.HolderCommitmentTransaction_write(this.ptr);
                return ret;
        }
 
-       public static HolderCommitmentTransaction constructor_read(byte[] ser) {
+       public static Result_HolderCommitmentTransactionDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.HolderCommitmentTransaction_read(ser);
-               HolderCommitmentTransaction ret_hu_conv = new HolderCommitmentTransaction(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_HolderCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_HolderCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 45345a40844b69f91d05d896af1c88e6de696cc9..fa9ad9d5de46b0c3db28cb1c36cbe580d8895f16 100644 (file)
@@ -14,13 +14,6 @@ public class InMemoryChannelKeys extends CommonBase {
                if (ptr != 0) { bindings.InMemoryChannelKeys_free(ptr); }
        }
 
-       public InMemoryChannelKeys clone() {
-               long ret = bindings.InMemoryChannelKeys_clone(this.ptr);
-               InMemoryChannelKeys ret_hu_conv = new InMemoryChannelKeys(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_funding_key() {
                byte[] ret = bindings.InMemoryChannelKeys_get_funding_key(this.ptr);
                return ret;
@@ -75,6 +68,13 @@ public class InMemoryChannelKeys extends CommonBase {
                bindings.InMemoryChannelKeys_set_commitment_seed(this.ptr, val);
        }
 
+       public InMemoryChannelKeys clone() {
+               long ret = bindings.InMemoryChannelKeys_clone(this.ptr);
+               InMemoryChannelKeys ret_hu_conv = new InMemoryChannelKeys(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public static InMemoryChannelKeys constructor_new(byte[] funding_key, byte[] revocation_base_key, byte[] payment_key, byte[] delayed_payment_base_key, byte[] htlc_base_key, byte[] commitment_seed, long channel_value_satoshis, TwoTuple<Long, Long> key_derivation_params) {
                long ret = bindings.InMemoryChannelKeys_new(funding_key, revocation_base_key, payment_key, delayed_payment_base_key, htlc_base_key, commitment_seed, channel_value_satoshis, bindings.C2Tuple_u64u64Z_new(key_derivation_params.a, key_derivation_params.b));
                InMemoryChannelKeys ret_hu_conv = new InMemoryChannelKeys(null, ret);
index f4d8a7e8bf70838e0d69b1fe6e68db37df66139f..2ab513ac31e753c20f26a8780156bd69a377b88c 100644 (file)
@@ -14,4 +14,36 @@ public class InitFeatures extends CommonBase {
                if (ptr != 0) { bindings.InitFeatures_free(ptr); }
        }
 
+       public InitFeatures clone() {
+               long ret = bindings.InitFeatures_clone(this.ptr);
+               InitFeatures ret_hu_conv = new InitFeatures(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public static InitFeatures constructor_empty() {
+               long ret = bindings.InitFeatures_empty();
+               InitFeatures ret_hu_conv = new InitFeatures(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       public static InitFeatures constructor_known() {
+               long ret = bindings.InitFeatures_known();
+               InitFeatures ret_hu_conv = new InitFeatures(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       public byte[] write() {
+               byte[] ret = bindings.InitFeatures_write(this.ptr);
+               return ret;
+       }
+
+       public static Result_InitFeaturesDecodeErrorZ constructor_read(byte[] ser) {
+               long ret = bindings.InitFeatures_read(ser);
+               Result_InitFeaturesDecodeErrorZ ret_hu_conv = Result_InitFeaturesDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 46148adf1835cfaad837a61fbf740dfcab858a59..84a2762347e31262dd20aad3042b620e4a46b6b9 100644 (file)
@@ -25,7 +25,7 @@ public class KeysInterface extends CommonBase {
                byte[] get_shutdown_pubkey();
                ChannelKeys get_channel_keys(boolean inbound, long channel_value_satoshis);
                byte[] get_secure_random_bytes();
-               Result_ChanKeySignerDecodeErrorZ read_chan_signer(byte[] reader);
+               Result_ChannelKeysDecodeErrorZ read_chan_signer(byte[] reader);
        }
        private static class LDKKeysInterfaceHolder { KeysInterface held; }
        public static KeysInterface new_impl(KeysInterfaceInterface arg) {
@@ -54,7 +54,7 @@ public class KeysInterface extends CommonBase {
                                return ret;
                        }
                        @Override public long read_chan_signer(byte[] reader) {
-                               Result_ChanKeySignerDecodeErrorZ ret = arg.read_chan_signer(reader);
+                               Result_ChannelKeysDecodeErrorZ ret = arg.read_chan_signer(reader);
                                long result = ret != null ? ret.ptr : 0;
                                return result;
                        }
@@ -88,9 +88,9 @@ public class KeysInterface extends CommonBase {
                return ret;
        }
 
-       public Result_ChanKeySignerDecodeErrorZ read_chan_signer(byte[] reader) {
+       public Result_ChannelKeysDecodeErrorZ read_chan_signer(byte[] reader) {
                long ret = bindings.KeysInterface_read_chan_signer(this.ptr, reader);
-               Result_ChanKeySignerDecodeErrorZ ret_hu_conv = Result_ChanKeySignerDecodeErrorZ.constr_from_ptr(ret);
+               Result_ChannelKeysDecodeErrorZ ret_hu_conv = Result_ChannelKeysDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index b1793b3202bbfe1743ee6bfdd1245612a255de4f..d4138bf4fa4d3ae5921f7194dc2e9ed714ac19f2 100644 (file)
@@ -14,13 +14,6 @@ public class LightningError extends CommonBase {
                if (ptr != 0) { bindings.LightningError_free(ptr); }
        }
 
-       public LightningError clone() {
-               long ret = bindings.LightningError_clone(this.ptr);
-               LightningError ret_hu_conv = new LightningError(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public String get_err() {
                String ret = bindings.LightningError_get_err(this.ptr);
                return ret;
@@ -48,4 +41,11 @@ public class LightningError extends CommonBase {
                return ret_hu_conv;
        }
 
+       public LightningError clone() {
+               long ret = bindings.LightningError_clone(this.ptr);
+               LightningError ret_hu_conv = new LightningError(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
 }
index 26cdd5821d8df4ea04ad86dec33b226d21919154..2b83385cd1f5d1b9840c94644ba9c1cc26c652f0 100644 (file)
@@ -14,13 +14,6 @@ public class NodeAnnouncement extends CommonBase {
                if (ptr != 0) { bindings.NodeAnnouncement_free(ptr); }
        }
 
-       public NodeAnnouncement clone() {
-               long ret = bindings.NodeAnnouncement_clone(this.ptr);
-               NodeAnnouncement ret_hu_conv = new NodeAnnouncement(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_signature() {
                byte[] ret = bindings.NodeAnnouncement_get_signature(this.ptr);
                return ret;
@@ -50,15 +43,21 @@ public class NodeAnnouncement extends CommonBase {
                return ret_hu_conv;
        }
 
+       public NodeAnnouncement clone() {
+               long ret = bindings.NodeAnnouncement_clone(this.ptr);
+               NodeAnnouncement ret_hu_conv = new NodeAnnouncement(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.NodeAnnouncement_write(this.ptr);
                return ret;
        }
 
-       public static NodeAnnouncement constructor_read(byte[] ser) {
+       public static Result_NodeAnnouncementDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.NodeAnnouncement_read(ser);
-               NodeAnnouncement ret_hu_conv = new NodeAnnouncement(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_NodeAnnouncementDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index f59c055ef35d2b6a8382a148fec2a0f6f96c727b..3c633bbf40858e730b5b07bec7151b73e4af9043 100644 (file)
@@ -14,13 +14,6 @@ public class NodeAnnouncementInfo extends CommonBase {
                if (ptr != 0) { bindings.NodeAnnouncementInfo_free(ptr); }
        }
 
-       public NodeAnnouncementInfo clone() {
-               long ret = bindings.NodeAnnouncementInfo_clone(this.ptr);
-               NodeAnnouncementInfo ret_hu_conv = new NodeAnnouncementInfo(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public NodeFeatures get_features() {
                long ret = bindings.NodeAnnouncementInfo_get_features(this.ptr);
                NodeFeatures ret_hu_conv = new NodeFeatures(null, ret);
@@ -31,14 +24,6 @@ public class NodeAnnouncementInfo extends CommonBase {
        public void set_features(NodeFeatures val) {
                bindings.NodeAnnouncementInfo_set_features(this.ptr, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(val);
-               // Due to rust's strict-ownership memory model, in some cases we need to "move"
-               // an object to pass exclusive ownership to the function being called.
-               // In most cases, we avoid this being visible in GC'd languages by cloning the object
-               // at the FFI layer, creating a new object which Rust can claim ownership of
-               // However, in some cases (eg here), there is no way to clone an object, and thus
-               // we actually have to pass full ownership to Rust.
-               // Thus, after this call, val is reset to null and is now a dummy object.
-               val.ptr = 0;
        }
 
        public int get_last_update() {
@@ -90,19 +75,18 @@ public class NodeAnnouncementInfo extends CommonBase {
                NodeAnnouncementInfo ret_hu_conv = new NodeAnnouncementInfo(null, ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                ret_hu_conv.ptrs_to.add(features_arg);
-               // Due to rust's strict-ownership memory model, in some cases we need to "move"
-               // an object to pass exclusive ownership to the function being called.
-               // In most cases, we avoid ret_hu_conv being visible in GC'd languages by cloning the object
-               // at the FFI layer, creating a new object which Rust can claim ownership of
-               // However, in some cases (eg here), there is no way to clone an object, and thus
-               // we actually have to pass full ownership to Rust.
-               // Thus, after ret_hu_conv call, features_arg is reset to null and is now a dummy object.
-               features_arg.ptr = 0;
                /* TODO 2 NetAddress  */;
                ret_hu_conv.ptrs_to.add(announcement_message_arg);
                return ret_hu_conv;
        }
 
+       public NodeAnnouncementInfo clone() {
+               long ret = bindings.NodeAnnouncementInfo_clone(this.ptr);
+               NodeAnnouncementInfo ret_hu_conv = new NodeAnnouncementInfo(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.NodeAnnouncementInfo_write(this.ptr);
                return ret;
index d1dfb5b4640b7f9c189bd18e2b42463c0b596054..a32f9680c0fdb4dd970c27fefc335321df1c19de 100644 (file)
@@ -14,4 +14,36 @@ public class NodeFeatures extends CommonBase {
                if (ptr != 0) { bindings.NodeFeatures_free(ptr); }
        }
 
+       public NodeFeatures clone() {
+               long ret = bindings.NodeFeatures_clone(this.ptr);
+               NodeFeatures ret_hu_conv = new NodeFeatures(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public static NodeFeatures constructor_empty() {
+               long ret = bindings.NodeFeatures_empty();
+               NodeFeatures ret_hu_conv = new NodeFeatures(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       public static NodeFeatures constructor_known() {
+               long ret = bindings.NodeFeatures_known();
+               NodeFeatures ret_hu_conv = new NodeFeatures(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       public byte[] write() {
+               byte[] ret = bindings.NodeFeatures_write(this.ptr);
+               return ret;
+       }
+
+       public static Result_NodeFeaturesDecodeErrorZ constructor_read(byte[] ser) {
+               long ret = bindings.NodeFeatures_read(ser);
+               Result_NodeFeaturesDecodeErrorZ ret_hu_conv = Result_NodeFeaturesDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index ba19c79b125763024e397d969758049d143fe4af..8b9837398d36a2f49bbfb685bf011357ebe09321 100644 (file)
@@ -14,13 +14,6 @@ public class NodeInfo extends CommonBase {
                if (ptr != 0) { bindings.NodeInfo_free(ptr); }
        }
 
-       public NodeInfo clone() {
-               long ret = bindings.NodeInfo_clone(this.ptr);
-               NodeInfo ret_hu_conv = new NodeInfo(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public void set_channels(long[] val) {
                bindings.NodeInfo_set_channels(this.ptr, val);
        }
@@ -58,6 +51,13 @@ public class NodeInfo extends CommonBase {
                return ret_hu_conv;
        }
 
+       public NodeInfo clone() {
+               long ret = bindings.NodeInfo_clone(this.ptr);
+               NodeInfo ret_hu_conv = new NodeInfo(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.NodeInfo_write(this.ptr);
                return ret;
index 2de4e031a009fd996e3eb089be29ca21337609f2..3f2c419071576cb730349f05d4f6d4c0b8c875af 100644 (file)
@@ -14,13 +14,6 @@ public class OpenChannel extends CommonBase {
                if (ptr != 0) { bindings.OpenChannel_free(ptr); }
        }
 
-       public OpenChannel clone() {
-               long ret = bindings.OpenChannel_clone(this.ptr);
-               OpenChannel ret_hu_conv = new OpenChannel(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_chain_hash() {
                byte[] ret = bindings.OpenChannel_get_chain_hash(this.ptr);
                return ret;
@@ -183,15 +176,21 @@ public class OpenChannel extends CommonBase {
                bindings.OpenChannel_set_channel_flags(this.ptr, val);
        }
 
+       public OpenChannel clone() {
+               long ret = bindings.OpenChannel_clone(this.ptr);
+               OpenChannel ret_hu_conv = new OpenChannel(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.OpenChannel_write(this.ptr);
                return ret;
        }
 
-       public static OpenChannel constructor_read(byte[] ser) {
+       public static Result_OpenChannelDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.OpenChannel_read(ser);
-               OpenChannel ret_hu_conv = new OpenChannel(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_OpenChannelDecodeErrorZ ret_hu_conv = Result_OpenChannelDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index edc0a7f3c0a99a12e23d58a2e0ad5feec713ec06..d0c7edba75ad06e959af96172d93291a5b5140c8 100644 (file)
@@ -14,13 +14,6 @@ public class OutPoint extends CommonBase {
                if (ptr != 0) { bindings.OutPoint_free(ptr); }
        }
 
-       public OutPoint clone() {
-               long ret = bindings.OutPoint_clone(this.ptr);
-               OutPoint ret_hu_conv = new OutPoint(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_txid() {
                byte[] ret = bindings.OutPoint_get_txid(this.ptr);
                return ret;
@@ -46,6 +39,13 @@ public class OutPoint extends CommonBase {
                return ret_hu_conv;
        }
 
+       public OutPoint clone() {
+               long ret = bindings.OutPoint_clone(this.ptr);
+               OutPoint ret_hu_conv = new OutPoint(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] to_channel_id() {
                byte[] ret = bindings.OutPoint_to_channel_id(this.ptr);
                return ret;
@@ -56,10 +56,9 @@ public class OutPoint extends CommonBase {
                return ret;
        }
 
-       public static OutPoint constructor_read(byte[] ser) {
+       public static Result_OutPointDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.OutPoint_read(ser);
-               OutPoint ret_hu_conv = new OutPoint(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_OutPointDecodeErrorZ ret_hu_conv = Result_OutPointDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index b24730289942c82b409ec7f46ff61236e2c612fa..0bd7604dc37cb2bca6ffa0c241aa2fbb1b7991be 100644 (file)
@@ -14,13 +14,6 @@ public class PeerHandleError extends CommonBase {
                if (ptr != 0) { bindings.PeerHandleError_free(ptr); }
        }
 
-       public PeerHandleError clone() {
-               long ret = bindings.PeerHandleError_clone(this.ptr);
-               PeerHandleError ret_hu_conv = new PeerHandleError(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public boolean get_no_connection_possible() {
                boolean ret = bindings.PeerHandleError_get_no_connection_possible(this.ptr);
                return ret;
@@ -37,4 +30,11 @@ public class PeerHandleError extends CommonBase {
                return ret_hu_conv;
        }
 
+       public PeerHandleError clone() {
+               long ret = bindings.PeerHandleError_clone(this.ptr);
+               PeerHandleError ret_hu_conv = new PeerHandleError(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
 }
index 72815630a7af57f4964d7033f6b47077fc3c6c2e..0f466fa9e2ea6af3b0e2704e6fb9fddb4afdcad1 100644 (file)
@@ -14,13 +14,6 @@ public class Ping extends CommonBase {
                if (ptr != 0) { bindings.Ping_free(ptr); }
        }
 
-       public Ping clone() {
-               long ret = bindings.Ping_clone(this.ptr);
-               Ping ret_hu_conv = new Ping(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public short get_ponglen() {
                short ret = bindings.Ping_get_ponglen(this.ptr);
                return ret;
@@ -46,6 +39,13 @@ public class Ping extends CommonBase {
                return ret_hu_conv;
        }
 
+       public Ping clone() {
+               long ret = bindings.Ping_clone(this.ptr);
+               Ping ret_hu_conv = new Ping(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.Ping_write(this.ptr);
                return ret;
index ef636e284961a5c9b7684ddc069c2661061b615e..80530aa7d5342ffc9bd25e2c4b499d588ab17acd 100644 (file)
@@ -14,13 +14,6 @@ public class Pong extends CommonBase {
                if (ptr != 0) { bindings.Pong_free(ptr); }
        }
 
-       public Pong clone() {
-               long ret = bindings.Pong_clone(this.ptr);
-               Pong ret_hu_conv = new Pong(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public short get_byteslen() {
                short ret = bindings.Pong_get_byteslen(this.ptr);
                return ret;
@@ -37,6 +30,13 @@ public class Pong extends CommonBase {
                return ret_hu_conv;
        }
 
+       public Pong clone() {
+               long ret = bindings.Pong_clone(this.ptr);
+               Pong ret_hu_conv = new Pong(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.Pong_write(this.ptr);
                return ret;
index acacd0537b4ce2980ae47fb86d682d80c93b07ed..2f6f3a12c72b2edcfeee3ad7385dd9bf4d5fcf16 100644 (file)
@@ -14,13 +14,6 @@ public class QueryChannelRange extends CommonBase {
                if (ptr != 0) { bindings.QueryChannelRange_free(ptr); }
        }
 
-       public QueryChannelRange clone() {
-               long ret = bindings.QueryChannelRange_clone(this.ptr);
-               QueryChannelRange ret_hu_conv = new QueryChannelRange(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_chain_hash() {
                byte[] ret = bindings.QueryChannelRange_get_chain_hash(this.ptr);
                return ret;
@@ -55,6 +48,13 @@ public class QueryChannelRange extends CommonBase {
                return ret_hu_conv;
        }
 
+       public QueryChannelRange clone() {
+               long ret = bindings.QueryChannelRange_clone(this.ptr);
+               QueryChannelRange ret_hu_conv = new QueryChannelRange(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public static Result_QueryChannelRangeDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.QueryChannelRange_read(ser);
                Result_QueryChannelRangeDecodeErrorZ ret_hu_conv = Result_QueryChannelRangeDecodeErrorZ.constr_from_ptr(ret);
index 2c9f57d7569d271ec4587ab7f32fc72484a16ad4..069bc72d43fb6c54ae21ece1ba6e3f9c9910e774 100644 (file)
@@ -14,13 +14,6 @@ public class QueryShortChannelIds extends CommonBase {
                if (ptr != 0) { bindings.QueryShortChannelIds_free(ptr); }
        }
 
-       public QueryShortChannelIds clone() {
-               long ret = bindings.QueryShortChannelIds_clone(this.ptr);
-               QueryShortChannelIds ret_hu_conv = new QueryShortChannelIds(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_chain_hash() {
                byte[] ret = bindings.QueryShortChannelIds_get_chain_hash(this.ptr);
                return ret;
@@ -41,6 +34,13 @@ public class QueryShortChannelIds extends CommonBase {
                return ret_hu_conv;
        }
 
+       public QueryShortChannelIds clone() {
+               long ret = bindings.QueryShortChannelIds_clone(this.ptr);
+               QueryShortChannelIds ret_hu_conv = new QueryShortChannelIds(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public static Result_QueryShortChannelIdsDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.QueryShortChannelIds_read(ser);
                Result_QueryShortChannelIdsDecodeErrorZ ret_hu_conv = Result_QueryShortChannelIdsDecodeErrorZ.constr_from_ptr(ret);
index ca7243da6d12c8dc9b79060a09563fbcc1d9cabd..21934785eff96df486b0eb406b41f4fe5a1466d6 100644 (file)
@@ -14,13 +14,6 @@ public class ReplyChannelRange extends CommonBase {
                if (ptr != 0) { bindings.ReplyChannelRange_free(ptr); }
        }
 
-       public ReplyChannelRange clone() {
-               long ret = bindings.ReplyChannelRange_clone(this.ptr);
-               ReplyChannelRange ret_hu_conv = new ReplyChannelRange(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_chain_hash() {
                byte[] ret = bindings.ReplyChannelRange_get_chain_hash(this.ptr);
                return ret;
@@ -48,26 +41,33 @@ public class ReplyChannelRange extends CommonBase {
                bindings.ReplyChannelRange_set_number_of_blocks(this.ptr, val);
        }
 
-       public boolean get_full_information() {
-               boolean ret = bindings.ReplyChannelRange_get_full_information(this.ptr);
+       public boolean get_sync_complete() {
+               boolean ret = bindings.ReplyChannelRange_get_sync_complete(this.ptr);
                return ret;
        }
 
-       public void set_full_information(boolean val) {
-               bindings.ReplyChannelRange_set_full_information(this.ptr, val);
+       public void set_sync_complete(boolean val) {
+               bindings.ReplyChannelRange_set_sync_complete(this.ptr, val);
        }
 
        public void set_short_channel_ids(long[] val) {
                bindings.ReplyChannelRange_set_short_channel_ids(this.ptr, val);
        }
 
-       public static ReplyChannelRange constructor_new(byte[] chain_hash_arg, int first_blocknum_arg, int number_of_blocks_arg, boolean full_information_arg, long[] short_channel_ids_arg) {
-               long ret = bindings.ReplyChannelRange_new(chain_hash_arg, first_blocknum_arg, number_of_blocks_arg, full_information_arg, short_channel_ids_arg);
+       public static ReplyChannelRange constructor_new(byte[] chain_hash_arg, int first_blocknum_arg, int number_of_blocks_arg, boolean sync_complete_arg, long[] short_channel_ids_arg) {
+               long ret = bindings.ReplyChannelRange_new(chain_hash_arg, first_blocknum_arg, number_of_blocks_arg, sync_complete_arg, short_channel_ids_arg);
                ReplyChannelRange ret_hu_conv = new ReplyChannelRange(null, ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                return ret_hu_conv;
        }
 
+       public ReplyChannelRange clone() {
+               long ret = bindings.ReplyChannelRange_clone(this.ptr);
+               ReplyChannelRange ret_hu_conv = new ReplyChannelRange(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public static Result_ReplyChannelRangeDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.ReplyChannelRange_read(ser);
                Result_ReplyChannelRangeDecodeErrorZ ret_hu_conv = Result_ReplyChannelRangeDecodeErrorZ.constr_from_ptr(ret);
index a558d5c90a042a6083149ce3ca4888d69d10aa61..26098810881c2db4b5d1058aca84eed71da1d12a 100644 (file)
@@ -14,13 +14,6 @@ public class ReplyShortChannelIdsEnd extends CommonBase {
                if (ptr != 0) { bindings.ReplyShortChannelIdsEnd_free(ptr); }
        }
 
-       public ReplyShortChannelIdsEnd clone() {
-               long ret = bindings.ReplyShortChannelIdsEnd_clone(this.ptr);
-               ReplyShortChannelIdsEnd ret_hu_conv = new ReplyShortChannelIdsEnd(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_chain_hash() {
                byte[] ret = bindings.ReplyShortChannelIdsEnd_get_chain_hash(this.ptr);
                return ret;
@@ -46,6 +39,13 @@ public class ReplyShortChannelIdsEnd extends CommonBase {
                return ret_hu_conv;
        }
 
+       public ReplyShortChannelIdsEnd clone() {
+               long ret = bindings.ReplyShortChannelIdsEnd_clone(this.ptr);
+               ReplyShortChannelIdsEnd ret_hu_conv = new ReplyShortChannelIdsEnd(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public static Result_ReplyShortChannelIdsEndDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.ReplyShortChannelIdsEnd_read(ser);
                Result_ReplyShortChannelIdsEndDecodeErrorZ ret_hu_conv = Result_ReplyShortChannelIdsEndDecodeErrorZ.constr_from_ptr(ret);
diff --git a/src/main/java/org/ldk/structs/Result_ChanKeySignerDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ChanKeySignerDecodeErrorZ.java
deleted file mode 100644 (file)
index 6b401df..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-package org.ldk.structs;
-
-import org.ldk.impl.bindings;
-import org.ldk.enums.*;
-import org.ldk.util.*;
-import java.util.Arrays;
-
-@SuppressWarnings("unchecked") // We correctly assign various generic arrays
-public class Result_ChanKeySignerDecodeErrorZ extends CommonBase {
-       private Result_ChanKeySignerDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
-       protected void finalize() throws Throwable {
-               if (ptr != 0) { bindings.CResult_ChanKeySignerDecodeErrorZ_free(ptr); } super.finalize();
-       }
-
-       static Result_ChanKeySignerDecodeErrorZ constr_from_ptr(long ptr) {
-               if (bindings.LDKCResult_ChanKeySignerDecodeErrorZ_result_ok(ptr)) {
-                       return new Result_ChanKeySignerDecodeErrorZ_OK(null, ptr);
-               } else {
-                       return new Result_ChanKeySignerDecodeErrorZ_Err(null, ptr);
-               }
-       }
-       public static final class Result_ChanKeySignerDecodeErrorZ_OK extends Result_ChanKeySignerDecodeErrorZ {
-               public final ChannelKeys res;
-               private Result_ChanKeySignerDecodeErrorZ_OK(Object _dummy, long ptr) {
-                       super(_dummy, ptr);
-                       long res = bindings.LDKCResult_ChanKeySignerDecodeErrorZ_get_ok(ptr);
-                       ChannelKeys ret_hu_conv = new ChannelKeys(null, res);
-                       ret_hu_conv.ptrs_to.add(this);
-                       this.res = ret_hu_conv;
-               }
-               public Result_ChanKeySignerDecodeErrorZ_OK(ChannelKeys res) {
-                       this(null, bindings.CResult_ChanKeySignerDecodeErrorZ_ok(res == null ? 0 : res.ptr));
-                       this.ptrs_to.add(res);
-               }
-       }
-
-       public static final class Result_ChanKeySignerDecodeErrorZ_Err extends Result_ChanKeySignerDecodeErrorZ {
-               public final DecodeError err;
-               private Result_ChanKeySignerDecodeErrorZ_Err(Object _dummy, long ptr) {
-                       super(_dummy, ptr);
-                       long err = bindings.LDKCResult_ChanKeySignerDecodeErrorZ_get_err(ptr);
-                       DecodeError err_hu_conv = new DecodeError(null, err);
-                       err_hu_conv.ptrs_to.add(this);
-                       this.err = err_hu_conv;
-               }
-               public Result_ChanKeySignerDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_ChanKeySignerDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
-       }
-}
diff --git a/src/main/java/org/ldk/structs/Result_PublicKeySecpErrorZ.java b/src/main/java/org/ldk/structs/Result_PublicKeySecpErrorZ.java
deleted file mode 100644 (file)
index 15c27f4..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-package org.ldk.structs;
-
-import org.ldk.impl.bindings;
-import org.ldk.enums.*;
-import org.ldk.util.*;
-import java.util.Arrays;
-
-@SuppressWarnings("unchecked") // We correctly assign various generic arrays
-public class Result_PublicKeySecpErrorZ extends CommonBase {
-       private Result_PublicKeySecpErrorZ(Object _dummy, long ptr) { super(ptr); }
-       protected void finalize() throws Throwable {
-               if (ptr != 0) { bindings.CResult_PublicKeySecpErrorZ_free(ptr); } super.finalize();
-       }
-
-       static Result_PublicKeySecpErrorZ constr_from_ptr(long ptr) {
-               if (bindings.LDKCResult_PublicKeySecpErrorZ_result_ok(ptr)) {
-                       return new Result_PublicKeySecpErrorZ_OK(null, ptr);
-               } else {
-                       return new Result_PublicKeySecpErrorZ_Err(null, ptr);
-               }
-       }
-       public static final class Result_PublicKeySecpErrorZ_OK extends Result_PublicKeySecpErrorZ {
-               public final byte[] res;
-               private Result_PublicKeySecpErrorZ_OK(Object _dummy, long ptr) {
-                       super(_dummy, ptr);
-                       this.res = bindings.LDKCResult_PublicKeySecpErrorZ_get_ok(ptr);
-               }
-               public Result_PublicKeySecpErrorZ_OK(byte[] res) {
-                       this(null, bindings.CResult_PublicKeySecpErrorZ_ok(res));
-               }
-       }
-
-       public static final class Result_PublicKeySecpErrorZ_Err extends Result_PublicKeySecpErrorZ {
-               public final LDKSecp256k1Error err;
-               private Result_PublicKeySecpErrorZ_Err(Object _dummy, long ptr) {
-                       super(_dummy, ptr);
-                       this.err = bindings.LDKCResult_PublicKeySecpErrorZ_get_err(ptr);
-               }
-               public Result_PublicKeySecpErrorZ_Err(LDKSecp256k1Error err) {
-                       this(null, bindings.CResult_PublicKeySecpErrorZ_err(err));
-               }
-       }
-}
diff --git a/src/main/java/org/ldk/structs/Result_SecretKeySecpErrorZ.java b/src/main/java/org/ldk/structs/Result_SecretKeySecpErrorZ.java
deleted file mode 100644 (file)
index 01744be..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-package org.ldk.structs;
-
-import org.ldk.impl.bindings;
-import org.ldk.enums.*;
-import org.ldk.util.*;
-import java.util.Arrays;
-
-@SuppressWarnings("unchecked") // We correctly assign various generic arrays
-public class Result_SecretKeySecpErrorZ extends CommonBase {
-       private Result_SecretKeySecpErrorZ(Object _dummy, long ptr) { super(ptr); }
-       protected void finalize() throws Throwable {
-               if (ptr != 0) { bindings.CResult_SecretKeySecpErrorZ_free(ptr); } super.finalize();
-       }
-
-       static Result_SecretKeySecpErrorZ constr_from_ptr(long ptr) {
-               if (bindings.LDKCResult_SecretKeySecpErrorZ_result_ok(ptr)) {
-                       return new Result_SecretKeySecpErrorZ_OK(null, ptr);
-               } else {
-                       return new Result_SecretKeySecpErrorZ_Err(null, ptr);
-               }
-       }
-       public static final class Result_SecretKeySecpErrorZ_OK extends Result_SecretKeySecpErrorZ {
-               public final byte[] res;
-               private Result_SecretKeySecpErrorZ_OK(Object _dummy, long ptr) {
-                       super(_dummy, ptr);
-                       this.res = bindings.LDKCResult_SecretKeySecpErrorZ_get_ok(ptr);
-               }
-               public Result_SecretKeySecpErrorZ_OK(byte[] res) {
-                       this(null, bindings.CResult_SecretKeySecpErrorZ_ok(res));
-               }
-       }
-
-       public static final class Result_SecretKeySecpErrorZ_Err extends Result_SecretKeySecpErrorZ {
-               public final LDKSecp256k1Error err;
-               private Result_SecretKeySecpErrorZ_Err(Object _dummy, long ptr) {
-                       super(_dummy, ptr);
-                       this.err = bindings.LDKCResult_SecretKeySecpErrorZ_get_err(ptr);
-               }
-               public Result_SecretKeySecpErrorZ_Err(LDKSecp256k1Error err) {
-                       this(null, bindings.CResult_SecretKeySecpErrorZ_err(err));
-               }
-       }
-}
diff --git a/src/main/java/org/ldk/structs/Result_TxCreationKeysSecpErrorZ.java b/src/main/java/org/ldk/structs/Result_TxCreationKeysSecpErrorZ.java
deleted file mode 100644 (file)
index 3ee052d..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-package org.ldk.structs;
-
-import org.ldk.impl.bindings;
-import org.ldk.enums.*;
-import org.ldk.util.*;
-import java.util.Arrays;
-
-@SuppressWarnings("unchecked") // We correctly assign various generic arrays
-public class Result_TxCreationKeysSecpErrorZ extends CommonBase {
-       private Result_TxCreationKeysSecpErrorZ(Object _dummy, long ptr) { super(ptr); }
-       protected void finalize() throws Throwable {
-               if (ptr != 0) { bindings.CResult_TxCreationKeysSecpErrorZ_free(ptr); } super.finalize();
-       }
-
-       static Result_TxCreationKeysSecpErrorZ constr_from_ptr(long ptr) {
-               if (bindings.LDKCResult_TxCreationKeysSecpErrorZ_result_ok(ptr)) {
-                       return new Result_TxCreationKeysSecpErrorZ_OK(null, ptr);
-               } else {
-                       return new Result_TxCreationKeysSecpErrorZ_Err(null, ptr);
-               }
-       }
-       public static final class Result_TxCreationKeysSecpErrorZ_OK extends Result_TxCreationKeysSecpErrorZ {
-               public final TxCreationKeys res;
-               private Result_TxCreationKeysSecpErrorZ_OK(Object _dummy, long ptr) {
-                       super(_dummy, ptr);
-                       long res = bindings.LDKCResult_TxCreationKeysSecpErrorZ_get_ok(ptr);
-                       TxCreationKeys res_hu_conv = new TxCreationKeys(null, res);
-                       res_hu_conv.ptrs_to.add(this);
-                       this.res = res_hu_conv;
-               }
-               public Result_TxCreationKeysSecpErrorZ_OK(TxCreationKeys res) {
-                       this(null, bindings.CResult_TxCreationKeysSecpErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
-       }
-
-       public static final class Result_TxCreationKeysSecpErrorZ_Err extends Result_TxCreationKeysSecpErrorZ {
-               public final LDKSecp256k1Error err;
-               private Result_TxCreationKeysSecpErrorZ_Err(Object _dummy, long ptr) {
-                       super(_dummy, ptr);
-                       this.err = bindings.LDKCResult_TxCreationKeysSecpErrorZ_get_err(ptr);
-               }
-               public Result_TxCreationKeysSecpErrorZ_Err(LDKSecp256k1Error err) {
-                       this(null, bindings.CResult_TxCreationKeysSecpErrorZ_err(err));
-               }
-       }
-}
index dcf6ddd95167123ddbda58973301ce6f79b584d3..80fe9b59495921cbbb18a20a565347f193af75e9 100644 (file)
@@ -14,13 +14,6 @@ public class RevokeAndACK extends CommonBase {
                if (ptr != 0) { bindings.RevokeAndACK_free(ptr); }
        }
 
-       public RevokeAndACK clone() {
-               long ret = bindings.RevokeAndACK_clone(this.ptr);
-               RevokeAndACK ret_hu_conv = new RevokeAndACK(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_channel_id() {
                byte[] ret = bindings.RevokeAndACK_get_channel_id(this.ptr);
                return ret;
@@ -55,15 +48,21 @@ public class RevokeAndACK extends CommonBase {
                return ret_hu_conv;
        }
 
+       public RevokeAndACK clone() {
+               long ret = bindings.RevokeAndACK_clone(this.ptr);
+               RevokeAndACK ret_hu_conv = new RevokeAndACK(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.RevokeAndACK_write(this.ptr);
                return ret;
        }
 
-       public static RevokeAndACK constructor_read(byte[] ser) {
+       public static Result_RevokeAndACKDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.RevokeAndACK_read(ser);
-               RevokeAndACK ret_hu_conv = new RevokeAndACK(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_RevokeAndACKDecodeErrorZ ret_hu_conv = Result_RevokeAndACKDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index cb0f6a2b290f56d944a1f4054892e6cdf731abd8..a5b6a421cc060b06aa387c3122d04a1254a0282b 100644 (file)
@@ -14,26 +14,26 @@ public class Route extends CommonBase {
                if (ptr != 0) { bindings.Route_free(ptr); }
        }
 
-       public Route clone() {
-               long ret = bindings.Route_clone(this.ptr);
-               Route ret_hu_conv = new Route(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public void set_paths(RouteHop[][] val) {
-               bindings.Route_set_paths(this.ptr, (long[][])Arrays.stream(val).map(arr_conv_12 -> Arrays.stream(arr_conv_12).mapToLong(arr_conv_10 -> arr_conv_10 == null ? 0 : arr_conv_10.ptr & ~1).toArray()).toArray());
+               bindings.Route_set_paths(this.ptr, Arrays.stream(val).map(arr_conv_12 -> Arrays.stream(arr_conv_12).mapToLong(arr_conv_10 -> arr_conv_10 == null ? 0 : arr_conv_10.ptr & ~1).toArray()).toArray(long[][]::new));
                /* TODO 2 RouteHop[]  */;
        }
 
        public static Route constructor_new(RouteHop[][] paths_arg) {
-               long ret = bindings.Route_new((long[][])Arrays.stream(paths_arg).map(arr_conv_12 -> Arrays.stream(arr_conv_12).mapToLong(arr_conv_10 -> arr_conv_10 == null ? 0 : arr_conv_10.ptr & ~1).toArray()).toArray());
+               long ret = bindings.Route_new(Arrays.stream(paths_arg).map(arr_conv_12 -> Arrays.stream(arr_conv_12).mapToLong(arr_conv_10 -> arr_conv_10 == null ? 0 : arr_conv_10.ptr & ~1).toArray()).toArray(long[][]::new));
                Route ret_hu_conv = new Route(null, ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                /* TODO 2 RouteHop[]  */;
                return ret_hu_conv;
        }
 
+       public Route clone() {
+               long ret = bindings.Route_clone(this.ptr);
+               Route ret_hu_conv = new Route(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.Route_write(this.ptr);
                return ret;
index f543b75aac07d3ccad1e3a63e1dcbd29a5b7acfd..3b15b767dcc99263f8772a551e9b744ebc8eab51 100644 (file)
@@ -14,13 +14,6 @@ public class RouteHint extends CommonBase {
                if (ptr != 0) { bindings.RouteHint_free(ptr); }
        }
 
-       public RouteHint clone() {
-               long ret = bindings.RouteHint_clone(this.ptr);
-               RouteHint ret_hu_conv = new RouteHint(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_src_node_id() {
                byte[] ret = bindings.RouteHint_get_src_node_id(this.ptr);
                return ret;
@@ -77,4 +70,11 @@ public class RouteHint extends CommonBase {
                return ret_hu_conv;
        }
 
+       public RouteHint clone() {
+               long ret = bindings.RouteHint_clone(this.ptr);
+               RouteHint ret_hu_conv = new RouteHint(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
 }
index ace10a9b2eea39fe6705324d07f856de303ca55f..1e36ed5935fe2de7e76995d5bff4d88d01a64896 100644 (file)
@@ -14,13 +14,6 @@ public class RouteHop extends CommonBase {
                if (ptr != 0) { bindings.RouteHop_free(ptr); }
        }
 
-       public RouteHop clone() {
-               long ret = bindings.RouteHop_clone(this.ptr);
-               RouteHop ret_hu_conv = new RouteHop(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_pubkey() {
                byte[] ret = bindings.RouteHop_get_pubkey(this.ptr);
                return ret;
@@ -40,14 +33,6 @@ public class RouteHop extends CommonBase {
        public void set_node_features(NodeFeatures val) {
                bindings.RouteHop_set_node_features(this.ptr, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(val);
-               // Due to rust's strict-ownership memory model, in some cases we need to "move"
-               // an object to pass exclusive ownership to the function being called.
-               // In most cases, we avoid this being visible in GC'd languages by cloning the object
-               // at the FFI layer, creating a new object which Rust can claim ownership of
-               // However, in some cases (eg here), there is no way to clone an object, and thus
-               // we actually have to pass full ownership to Rust.
-               // Thus, after this call, val is reset to null and is now a dummy object.
-               val.ptr = 0;
        }
 
        public long get_short_channel_id() {
@@ -69,14 +54,6 @@ public class RouteHop extends CommonBase {
        public void set_channel_features(ChannelFeatures val) {
                bindings.RouteHop_set_channel_features(this.ptr, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(val);
-               // Due to rust's strict-ownership memory model, in some cases we need to "move"
-               // an object to pass exclusive ownership to the function being called.
-               // In most cases, we avoid this being visible in GC'd languages by cloning the object
-               // at the FFI layer, creating a new object which Rust can claim ownership of
-               // However, in some cases (eg here), there is no way to clone an object, and thus
-               // we actually have to pass full ownership to Rust.
-               // Thus, after this call, val is reset to null and is now a dummy object.
-               val.ptr = 0;
        }
 
        public long get_fee_msat() {
@@ -102,23 +79,14 @@ public class RouteHop extends CommonBase {
                RouteHop ret_hu_conv = new RouteHop(null, ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                ret_hu_conv.ptrs_to.add(node_features_arg);
-               // Due to rust's strict-ownership memory model, in some cases we need to "move"
-               // an object to pass exclusive ownership to the function being called.
-               // In most cases, we avoid ret_hu_conv being visible in GC'd languages by cloning the object
-               // at the FFI layer, creating a new object which Rust can claim ownership of
-               // However, in some cases (eg here), there is no way to clone an object, and thus
-               // we actually have to pass full ownership to Rust.
-               // Thus, after ret_hu_conv call, node_features_arg is reset to null and is now a dummy object.
-               node_features_arg.ptr = 0;
                ret_hu_conv.ptrs_to.add(channel_features_arg);
-               // Due to rust's strict-ownership memory model, in some cases we need to "move"
-               // an object to pass exclusive ownership to the function being called.
-               // In most cases, we avoid ret_hu_conv being visible in GC'd languages by cloning the object
-               // at the FFI layer, creating a new object which Rust can claim ownership of
-               // However, in some cases (eg here), there is no way to clone an object, and thus
-               // we actually have to pass full ownership to Rust.
-               // Thus, after ret_hu_conv call, channel_features_arg is reset to null and is now a dummy object.
-               channel_features_arg.ptr = 0;
+               return ret_hu_conv;
+       }
+
+       public RouteHop clone() {
+               long ret = bindings.RouteHop_clone(this.ptr);
+               RouteHop ret_hu_conv = new RouteHop(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
 
index c11990a3a3bb6e776ea7531995fc634d6d55a7df..da1c5c48000790507505b2d2dc6599c037313df4 100644 (file)
@@ -14,13 +14,6 @@ public class RoutingFees extends CommonBase {
                if (ptr != 0) { bindings.RoutingFees_free(ptr); }
        }
 
-       public RoutingFees clone() {
-               long ret = bindings.RoutingFees_clone(this.ptr);
-               RoutingFees ret_hu_conv = new RoutingFees(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public int get_base_msat() {
                int ret = bindings.RoutingFees_get_base_msat(this.ptr);
                return ret;
@@ -46,6 +39,13 @@ public class RoutingFees extends CommonBase {
                return ret_hu_conv;
        }
 
+       public RoutingFees clone() {
+               long ret = bindings.RoutingFees_clone(this.ptr);
+               RoutingFees ret_hu_conv = new RoutingFees(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public static Result_RoutingFeesDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.RoutingFees_read(ser);
                Result_RoutingFeesDecodeErrorZ ret_hu_conv = Result_RoutingFeesDecodeErrorZ.constr_from_ptr(ret);
index 491939cd70e2db356a66f17f7454d7803d6d9e05..ec11fcc00363c6f48f1a798dcd4b75377f025392 100644 (file)
@@ -14,13 +14,6 @@ public class Shutdown extends CommonBase {
                if (ptr != 0) { bindings.Shutdown_free(ptr); }
        }
 
-       public Shutdown clone() {
-               long ret = bindings.Shutdown_clone(this.ptr);
-               Shutdown ret_hu_conv = new Shutdown(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_channel_id() {
                byte[] ret = bindings.Shutdown_get_channel_id(this.ptr);
                return ret;
@@ -46,15 +39,21 @@ public class Shutdown extends CommonBase {
                return ret_hu_conv;
        }
 
+       public Shutdown clone() {
+               long ret = bindings.Shutdown_clone(this.ptr);
+               Shutdown ret_hu_conv = new Shutdown(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.Shutdown_write(this.ptr);
                return ret;
        }
 
-       public static Shutdown constructor_read(byte[] ser) {
+       public static Result_ShutdownDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.Shutdown_read(ser);
-               Shutdown ret_hu_conv = new Shutdown(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_ShutdownDecodeErrorZ ret_hu_conv = Result_ShutdownDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 05e70350dec9d34f4fe88a2ffd076b3e0d8cab7b..f063faadfe20ca78851c89c29f5f56027cb7fc33 100644 (file)
@@ -14,13 +14,6 @@ public class TxCreationKeys extends CommonBase {
                if (ptr != 0) { bindings.TxCreationKeys_free(ptr); }
        }
 
-       public TxCreationKeys clone() {
-               long ret = bindings.TxCreationKeys_clone(this.ptr);
-               TxCreationKeys ret_hu_conv = new TxCreationKeys(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_per_commitment_point() {
                byte[] ret = bindings.TxCreationKeys_get_per_commitment_point(this.ptr);
                return ret;
@@ -73,27 +66,33 @@ public class TxCreationKeys extends CommonBase {
                return ret_hu_conv;
        }
 
+       public TxCreationKeys clone() {
+               long ret = bindings.TxCreationKeys_clone(this.ptr);
+               TxCreationKeys ret_hu_conv = new TxCreationKeys(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.TxCreationKeys_write(this.ptr);
                return ret;
        }
 
-       public static TxCreationKeys constructor_read(byte[] ser) {
+       public static Result_TxCreationKeysDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.TxCreationKeys_read(ser);
-               TxCreationKeys ret_hu_conv = new TxCreationKeys(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_TxCreationKeysDecodeErrorZ ret_hu_conv = Result_TxCreationKeysDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static Result_TxCreationKeysSecpErrorZ constructor_derive_new(byte[] per_commitment_point, byte[] broadcaster_delayed_payment_base, byte[] broadcaster_htlc_base, byte[] countersignatory_revocation_base, byte[] countersignatory_htlc_base) {
+       public static Result_TxCreationKeysErrorZ constructor_derive_new(byte[] per_commitment_point, byte[] broadcaster_delayed_payment_base, byte[] broadcaster_htlc_base, byte[] countersignatory_revocation_base, byte[] countersignatory_htlc_base) {
                long ret = bindings.TxCreationKeys_derive_new(per_commitment_point, broadcaster_delayed_payment_base, broadcaster_htlc_base, countersignatory_revocation_base, countersignatory_htlc_base);
-               Result_TxCreationKeysSecpErrorZ ret_hu_conv = Result_TxCreationKeysSecpErrorZ.constr_from_ptr(ret);
+               Result_TxCreationKeysErrorZ ret_hu_conv = Result_TxCreationKeysErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static Result_TxCreationKeysSecpErrorZ constructor_from_channel_static_keys(byte[] per_commitment_point, ChannelPublicKeys broadcaster_keys, ChannelPublicKeys countersignatory_keys) {
+       public static Result_TxCreationKeysErrorZ constructor_from_channel_static_keys(byte[] per_commitment_point, ChannelPublicKeys broadcaster_keys, ChannelPublicKeys countersignatory_keys) {
                long ret = bindings.TxCreationKeys_from_channel_static_keys(per_commitment_point, broadcaster_keys == null ? 0 : broadcaster_keys.ptr & ~1, countersignatory_keys == null ? 0 : countersignatory_keys.ptr & ~1);
-               Result_TxCreationKeysSecpErrorZ ret_hu_conv = Result_TxCreationKeysSecpErrorZ.constr_from_ptr(ret);
+               Result_TxCreationKeysErrorZ ret_hu_conv = Result_TxCreationKeysErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(broadcaster_keys);
                ret_hu_conv.ptrs_to.add(countersignatory_keys);
                return ret_hu_conv;
index d4fa2aed2663a831ad5d2ff8cd30962d04f3732f..3404e76f7d8790a5598320c4d127dcc9e747ae3b 100644 (file)
@@ -14,13 +14,6 @@ public class UnsignedChannelAnnouncement extends CommonBase {
                if (ptr != 0) { bindings.UnsignedChannelAnnouncement_free(ptr); }
        }
 
-       public UnsignedChannelAnnouncement clone() {
-               long ret = bindings.UnsignedChannelAnnouncement_clone(this.ptr);
-               UnsignedChannelAnnouncement ret_hu_conv = new UnsignedChannelAnnouncement(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public ChannelFeatures get_features() {
                long ret = bindings.UnsignedChannelAnnouncement_get_features(this.ptr);
                ChannelFeatures ret_hu_conv = new ChannelFeatures(null, ret);
@@ -31,14 +24,6 @@ public class UnsignedChannelAnnouncement extends CommonBase {
        public void set_features(ChannelFeatures val) {
                bindings.UnsignedChannelAnnouncement_set_features(this.ptr, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(val);
-               // Due to rust's strict-ownership memory model, in some cases we need to "move"
-               // an object to pass exclusive ownership to the function being called.
-               // In most cases, we avoid this being visible in GC'd languages by cloning the object
-               // at the FFI layer, creating a new object which Rust can claim ownership of
-               // However, in some cases (eg here), there is no way to clone an object, and thus
-               // we actually have to pass full ownership to Rust.
-               // Thus, after this call, val is reset to null and is now a dummy object.
-               val.ptr = 0;
        }
 
        public byte[] get_chain_hash() {
@@ -95,6 +80,13 @@ public class UnsignedChannelAnnouncement extends CommonBase {
                bindings.UnsignedChannelAnnouncement_set_bitcoin_key_2(this.ptr, val);
        }
 
+       public UnsignedChannelAnnouncement clone() {
+               long ret = bindings.UnsignedChannelAnnouncement_clone(this.ptr);
+               UnsignedChannelAnnouncement ret_hu_conv = new UnsignedChannelAnnouncement(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.UnsignedChannelAnnouncement_write(this.ptr);
                return ret;
index 86ad7499d2640004fff7e265466335981d419bb8..47a7687f5246afb77ccbd4f58279d3281b6f8f48 100644 (file)
@@ -14,13 +14,6 @@ public class UnsignedChannelUpdate extends CommonBase {
                if (ptr != 0) { bindings.UnsignedChannelUpdate_free(ptr); }
        }
 
-       public UnsignedChannelUpdate clone() {
-               long ret = bindings.UnsignedChannelUpdate_clone(this.ptr);
-               UnsignedChannelUpdate ret_hu_conv = new UnsignedChannelUpdate(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_chain_hash() {
                byte[] ret = bindings.UnsignedChannelUpdate_get_chain_hash(this.ptr);
                return ret;
@@ -93,6 +86,13 @@ public class UnsignedChannelUpdate extends CommonBase {
                bindings.UnsignedChannelUpdate_set_fee_proportional_millionths(this.ptr, val);
        }
 
+       public UnsignedChannelUpdate clone() {
+               long ret = bindings.UnsignedChannelUpdate_clone(this.ptr);
+               UnsignedChannelUpdate ret_hu_conv = new UnsignedChannelUpdate(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.UnsignedChannelUpdate_write(this.ptr);
                return ret;
index 964315caa910abdd91f9aaa0a2b210226604d7c3..94016eb92d79116b647659d5154cbaadde329c87 100644 (file)
@@ -14,13 +14,6 @@ public class UnsignedNodeAnnouncement extends CommonBase {
                if (ptr != 0) { bindings.UnsignedNodeAnnouncement_free(ptr); }
        }
 
-       public UnsignedNodeAnnouncement clone() {
-               long ret = bindings.UnsignedNodeAnnouncement_clone(this.ptr);
-               UnsignedNodeAnnouncement ret_hu_conv = new UnsignedNodeAnnouncement(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public NodeFeatures get_features() {
                long ret = bindings.UnsignedNodeAnnouncement_get_features(this.ptr);
                NodeFeatures ret_hu_conv = new NodeFeatures(null, ret);
@@ -31,14 +24,6 @@ public class UnsignedNodeAnnouncement extends CommonBase {
        public void set_features(NodeFeatures val) {
                bindings.UnsignedNodeAnnouncement_set_features(this.ptr, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(val);
-               // Due to rust's strict-ownership memory model, in some cases we need to "move"
-               // an object to pass exclusive ownership to the function being called.
-               // In most cases, we avoid this being visible in GC'd languages by cloning the object
-               // at the FFI layer, creating a new object which Rust can claim ownership of
-               // However, in some cases (eg here), there is no way to clone an object, and thus
-               // we actually have to pass full ownership to Rust.
-               // Thus, after this call, val is reset to null and is now a dummy object.
-               val.ptr = 0;
        }
 
        public int get_timestamp() {
@@ -82,6 +67,13 @@ public class UnsignedNodeAnnouncement extends CommonBase {
                /* TODO 2 NetAddress  */;
        }
 
+       public UnsignedNodeAnnouncement clone() {
+               long ret = bindings.UnsignedNodeAnnouncement_clone(this.ptr);
+               UnsignedNodeAnnouncement ret_hu_conv = new UnsignedNodeAnnouncement(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.UnsignedNodeAnnouncement_write(this.ptr);
                return ret;
index 3f6643ce839b413362c4c0094b3ab5bb552b40f2..6e4afd246d46e7f3b7ac5b11900ea19b1ab486d4 100644 (file)
@@ -14,13 +14,6 @@ public class UpdateAddHTLC extends CommonBase {
                if (ptr != 0) { bindings.UpdateAddHTLC_free(ptr); }
        }
 
-       public UpdateAddHTLC clone() {
-               long ret = bindings.UpdateAddHTLC_clone(this.ptr);
-               UpdateAddHTLC ret_hu_conv = new UpdateAddHTLC(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_channel_id() {
                byte[] ret = bindings.UpdateAddHTLC_get_channel_id(this.ptr);
                return ret;
@@ -66,15 +59,21 @@ public class UpdateAddHTLC extends CommonBase {
                bindings.UpdateAddHTLC_set_cltv_expiry(this.ptr, val);
        }
 
+       public UpdateAddHTLC clone() {
+               long ret = bindings.UpdateAddHTLC_clone(this.ptr);
+               UpdateAddHTLC ret_hu_conv = new UpdateAddHTLC(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.UpdateAddHTLC_write(this.ptr);
                return ret;
        }
 
-       public static UpdateAddHTLC constructor_read(byte[] ser) {
+       public static Result_UpdateAddHTLCDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.UpdateAddHTLC_read(ser);
-               UpdateAddHTLC ret_hu_conv = new UpdateAddHTLC(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_UpdateAddHTLCDecodeErrorZ ret_hu_conv = Result_UpdateAddHTLCDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index b341d282b9c09db10e77d387ecc42760aa1e2fb8..355666153af51069af896d861a99b575db74b016 100644 (file)
@@ -14,13 +14,6 @@ public class UpdateFailHTLC extends CommonBase {
                if (ptr != 0) { bindings.UpdateFailHTLC_free(ptr); }
        }
 
-       public UpdateFailHTLC clone() {
-               long ret = bindings.UpdateFailHTLC_clone(this.ptr);
-               UpdateFailHTLC ret_hu_conv = new UpdateFailHTLC(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_channel_id() {
                byte[] ret = bindings.UpdateFailHTLC_get_channel_id(this.ptr);
                return ret;
@@ -39,15 +32,21 @@ public class UpdateFailHTLC extends CommonBase {
                bindings.UpdateFailHTLC_set_htlc_id(this.ptr, val);
        }
 
+       public UpdateFailHTLC clone() {
+               long ret = bindings.UpdateFailHTLC_clone(this.ptr);
+               UpdateFailHTLC ret_hu_conv = new UpdateFailHTLC(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.UpdateFailHTLC_write(this.ptr);
                return ret;
        }
 
-       public static UpdateFailHTLC constructor_read(byte[] ser) {
+       public static Result_UpdateFailHTLCDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.UpdateFailHTLC_read(ser);
-               UpdateFailHTLC ret_hu_conv = new UpdateFailHTLC(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_UpdateFailHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailHTLCDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 69e17531b94f87bae3951d7cbc1688d7dec0810b..0b28fc68a61b663f0b05ed0309b8288575d2f15b 100644 (file)
@@ -14,13 +14,6 @@ public class UpdateFailMalformedHTLC extends CommonBase {
                if (ptr != 0) { bindings.UpdateFailMalformedHTLC_free(ptr); }
        }
 
-       public UpdateFailMalformedHTLC clone() {
-               long ret = bindings.UpdateFailMalformedHTLC_clone(this.ptr);
-               UpdateFailMalformedHTLC ret_hu_conv = new UpdateFailMalformedHTLC(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_channel_id() {
                byte[] ret = bindings.UpdateFailMalformedHTLC_get_channel_id(this.ptr);
                return ret;
@@ -48,15 +41,21 @@ public class UpdateFailMalformedHTLC extends CommonBase {
                bindings.UpdateFailMalformedHTLC_set_failure_code(this.ptr, val);
        }
 
+       public UpdateFailMalformedHTLC clone() {
+               long ret = bindings.UpdateFailMalformedHTLC_clone(this.ptr);
+               UpdateFailMalformedHTLC ret_hu_conv = new UpdateFailMalformedHTLC(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.UpdateFailMalformedHTLC_write(this.ptr);
                return ret;
        }
 
-       public static UpdateFailMalformedHTLC constructor_read(byte[] ser) {
+       public static Result_UpdateFailMalformedHTLCDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.UpdateFailMalformedHTLC_read(ser);
-               UpdateFailMalformedHTLC ret_hu_conv = new UpdateFailMalformedHTLC(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_UpdateFailMalformedHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailMalformedHTLCDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index a939f3f18021f9971a109503dbb0b67f3c861c03..fa186fb4fdb4bc2a46bf2cac2660e0ea493f7e9f 100644 (file)
@@ -14,13 +14,6 @@ public class UpdateFee extends CommonBase {
                if (ptr != 0) { bindings.UpdateFee_free(ptr); }
        }
 
-       public UpdateFee clone() {
-               long ret = bindings.UpdateFee_clone(this.ptr);
-               UpdateFee ret_hu_conv = new UpdateFee(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_channel_id() {
                byte[] ret = bindings.UpdateFee_get_channel_id(this.ptr);
                return ret;
@@ -46,15 +39,21 @@ public class UpdateFee extends CommonBase {
                return ret_hu_conv;
        }
 
+       public UpdateFee clone() {
+               long ret = bindings.UpdateFee_clone(this.ptr);
+               UpdateFee ret_hu_conv = new UpdateFee(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.UpdateFee_write(this.ptr);
                return ret;
        }
 
-       public static UpdateFee constructor_read(byte[] ser) {
+       public static Result_UpdateFeeDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.UpdateFee_read(ser);
-               UpdateFee ret_hu_conv = new UpdateFee(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_UpdateFeeDecodeErrorZ ret_hu_conv = Result_UpdateFeeDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index e31af1b6a309c37ce9382aba45f6506da668e24b..966392bdc871f263ef1815938dcaba7b0b91ae8c 100644 (file)
@@ -14,13 +14,6 @@ public class UpdateFulfillHTLC extends CommonBase {
                if (ptr != 0) { bindings.UpdateFulfillHTLC_free(ptr); }
        }
 
-       public UpdateFulfillHTLC clone() {
-               long ret = bindings.UpdateFulfillHTLC_clone(this.ptr);
-               UpdateFulfillHTLC ret_hu_conv = new UpdateFulfillHTLC(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_channel_id() {
                byte[] ret = bindings.UpdateFulfillHTLC_get_channel_id(this.ptr);
                return ret;
@@ -55,15 +48,21 @@ public class UpdateFulfillHTLC extends CommonBase {
                return ret_hu_conv;
        }
 
+       public UpdateFulfillHTLC clone() {
+               long ret = bindings.UpdateFulfillHTLC_clone(this.ptr);
+               UpdateFulfillHTLC ret_hu_conv = new UpdateFulfillHTLC(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.UpdateFulfillHTLC_write(this.ptr);
                return ret;
        }
 
-       public static UpdateFulfillHTLC constructor_read(byte[] ser) {
+       public static Result_UpdateFulfillHTLCDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.UpdateFulfillHTLC_read(ser);
-               UpdateFulfillHTLC ret_hu_conv = new UpdateFulfillHTLC(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_UpdateFulfillHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFulfillHTLCDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index ccf01fef1de68719763acd4a191ab9b5ffc1461a..5629008e6347e324992ccc90696c7fdc03e78ec8 100644 (file)
@@ -14,13 +14,6 @@ public class UserConfig extends CommonBase {
                if (ptr != 0) { bindings.UserConfig_free(ptr); }
        }
 
-       public UserConfig clone() {
-               long ret = bindings.UserConfig_clone(this.ptr);
-               UserConfig ret_hu_conv = new UserConfig(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public ChannelHandshakeConfig get_own_channel_config() {
                long ret = bindings.UserConfig_get_own_channel_config(this.ptr);
                ChannelHandshakeConfig ret_hu_conv = new ChannelHandshakeConfig(null, ret);
@@ -67,6 +60,13 @@ public class UserConfig extends CommonBase {
                return ret_hu_conv;
        }
 
+       public UserConfig clone() {
+               long ret = bindings.UserConfig_clone(this.ptr);
+               UserConfig ret_hu_conv = new UserConfig(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public static UserConfig constructor_default() {
                long ret = bindings.UserConfig_default();
                UserConfig ret_hu_conv = new UserConfig(null, ret);
index 4de0f334832a2424e82b5c293cfa3c1c8b121113..9cfa668ac4986ae2f4bb127231e5e08dc111b982 100644 (file)
@@ -112,15 +112,15 @@ static inline jstring str_ref_to_java(JNIEnv *env, const char* chars, size_t len
        FREE(err_buf);
        return err_conv;
 }
-static jclass arr_of_B_clz = NULL;
 static jclass arr_of_J_clz = NULL;
+static jclass arr_of_B_clz = NULL;
 JNIEXPORT void Java_org_ldk_impl_bindings_init_1class_1cache(JNIEnv * env, jclass clz) {
-       arr_of_B_clz = (*env)->FindClass(env, "[B");
-       CHECK(arr_of_B_clz != NULL);
-       arr_of_B_clz = (*env)->NewGlobalRef(env, arr_of_B_clz);
        arr_of_J_clz = (*env)->FindClass(env, "[J");
        CHECK(arr_of_J_clz != NULL);
        arr_of_J_clz = (*env)->NewGlobalRef(env, arr_of_J_clz);
+       arr_of_B_clz = (*env)->FindClass(env, "[B");
+       CHECK(arr_of_B_clz != NULL);
+       arr_of_B_clz = (*env)->NewGlobalRef(env, arr_of_B_clz);
 }
 static inline struct LDKThirtyTwoBytes ThirtyTwoBytes_clone(const struct LDKThirtyTwoBytes *orig) { struct LDKThirtyTwoBytes ret; memcpy(ret.data, orig->data, 32); return ret; }
 static inline LDKAccessError LDKAccessError_from_java(JNIEnv *env, jclass clz) {
@@ -389,234 +389,659 @@ static inline LDKCVec_u8Z CVec_u8Z_clone(const LDKCVec_u8Z *orig) {
        memcpy(ret.data, orig->data, sizeof(int8_t) * ret.datalen);
        return ret;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u64u64Z_1new(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
-       LDKC2Tuple_u64u64Z* ret = MALLOC(sizeof(LDKC2Tuple_u64u64Z), "LDKC2Tuple_u64u64Z");
-       ret->a = a;
-       ret->b = b;
-       return (long)ret;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SecretKeyErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_SecretKeyErrorZ*)arg)->result_ok;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u64u64Z_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_u64u64Z *tuple = (LDKC2Tuple_u64u64Z*)(ptr & ~1);
-       return tuple->a;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SecretKeyErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_SecretKeyErrorZ *val = (LDKCResult_SecretKeyErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       int8_tArray res_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, res_arr, 0, 32, (*val->contents.result).bytes);
+       return res_arr;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u64u64Z_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_u64u64Z *tuple = (LDKC2Tuple_u64u64Z*)(ptr & ~1);
-       return tuple->b;
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SecretKeyErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_SecretKeyErrorZ *val = (LDKCResult_SecretKeyErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       jclass err_conv = LDKSecp256k1Error_to_java(env, (*val->contents.err));
+       return err_conv;
 }
-static jclass LDKSpendableOutputDescriptor_StaticOutput_class = NULL;
-static jmethodID LDKSpendableOutputDescriptor_StaticOutput_meth = NULL;
-static jclass LDKSpendableOutputDescriptor_DynamicOutputP2WSH_class = NULL;
-static jmethodID LDKSpendableOutputDescriptor_DynamicOutputP2WSH_meth = NULL;
-static jclass LDKSpendableOutputDescriptor_StaticOutputCounterpartyPayment_class = NULL;
-static jmethodID LDKSpendableOutputDescriptor_StaticOutputCounterpartyPayment_meth = NULL;
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKSpendableOutputDescriptor_init (JNIEnv *env, jclass clz) {
-       LDKSpendableOutputDescriptor_StaticOutput_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKSpendableOutputDescriptor$StaticOutput;"));
-       CHECK(LDKSpendableOutputDescriptor_StaticOutput_class != NULL);
-       LDKSpendableOutputDescriptor_StaticOutput_meth = (*env)->GetMethodID(env, LDKSpendableOutputDescriptor_StaticOutput_class, "<init>", "(JJ)V");
-       CHECK(LDKSpendableOutputDescriptor_StaticOutput_meth != NULL);
-       LDKSpendableOutputDescriptor_DynamicOutputP2WSH_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKSpendableOutputDescriptor$DynamicOutputP2WSH;"));
-       CHECK(LDKSpendableOutputDescriptor_DynamicOutputP2WSH_class != NULL);
-       LDKSpendableOutputDescriptor_DynamicOutputP2WSH_meth = (*env)->GetMethodID(env, LDKSpendableOutputDescriptor_DynamicOutputP2WSH_class, "<init>", "(J[BSJJ[B)V");
-       CHECK(LDKSpendableOutputDescriptor_DynamicOutputP2WSH_meth != NULL);
-       LDKSpendableOutputDescriptor_StaticOutputCounterpartyPayment_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKSpendableOutputDescriptor$StaticOutputCounterpartyPayment;"));
-       CHECK(LDKSpendableOutputDescriptor_StaticOutputCounterpartyPayment_class != NULL);
-       LDKSpendableOutputDescriptor_StaticOutputCounterpartyPayment_meth = (*env)->GetMethodID(env, LDKSpendableOutputDescriptor_StaticOutputCounterpartyPayment_class, "<init>", "(JJJ)V");
-       CHECK(LDKSpendableOutputDescriptor_StaticOutputCounterpartyPayment_meth != NULL);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PublicKeyErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_PublicKeyErrorZ*)arg)->result_ok;
 }
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKSpendableOutputDescriptor_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKSpendableOutputDescriptor *obj = (LDKSpendableOutputDescriptor*)ptr;
-       switch(obj->tag) {
-               case LDKSpendableOutputDescriptor_StaticOutput: {
-                       LDKOutPoint outpoint_var = obj->static_output.outpoint;
-                       CHECK((((long)outpoint_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-                       CHECK((((long)&outpoint_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-                       long outpoint_ref = (long)outpoint_var.inner & ~1;
-                       long output_ref = ((long)&obj->static_output.output) | 1;
-                       return (*env)->NewObject(env, LDKSpendableOutputDescriptor_StaticOutput_class, LDKSpendableOutputDescriptor_StaticOutput_meth, outpoint_ref, (long)output_ref);
-               }
-               case LDKSpendableOutputDescriptor_DynamicOutputP2WSH: {
-                       LDKOutPoint outpoint_var = obj->dynamic_output_p2wsh.outpoint;
-                       CHECK((((long)outpoint_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-                       CHECK((((long)&outpoint_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-                       long outpoint_ref = (long)outpoint_var.inner & ~1;
-                       int8_tArray per_commitment_point_arr = (*env)->NewByteArray(env, 33);
-                       (*env)->SetByteArrayRegion(env, per_commitment_point_arr, 0, 33, obj->dynamic_output_p2wsh.per_commitment_point.compressed_form);
-                       long output_ref = ((long)&obj->dynamic_output_p2wsh.output) | 1;
-                       long key_derivation_params_ref = (long)(&obj->dynamic_output_p2wsh.key_derivation_params) | 1;
-                       int8_tArray revocation_pubkey_arr = (*env)->NewByteArray(env, 33);
-                       (*env)->SetByteArrayRegion(env, revocation_pubkey_arr, 0, 33, obj->dynamic_output_p2wsh.revocation_pubkey.compressed_form);
-                       return (*env)->NewObject(env, LDKSpendableOutputDescriptor_DynamicOutputP2WSH_class, LDKSpendableOutputDescriptor_DynamicOutputP2WSH_meth, outpoint_ref, per_commitment_point_arr, obj->dynamic_output_p2wsh.to_self_delay, (long)output_ref, key_derivation_params_ref, revocation_pubkey_arr);
-               }
-               case LDKSpendableOutputDescriptor_StaticOutputCounterpartyPayment: {
-                       LDKOutPoint outpoint_var = obj->static_output_counterparty_payment.outpoint;
-                       CHECK((((long)outpoint_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-                       CHECK((((long)&outpoint_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-                       long outpoint_ref = (long)outpoint_var.inner & ~1;
-                       long output_ref = ((long)&obj->static_output_counterparty_payment.output) | 1;
-                       long key_derivation_params_ref = (long)(&obj->static_output_counterparty_payment.key_derivation_params) | 1;
-                       return (*env)->NewObject(env, LDKSpendableOutputDescriptor_StaticOutputCounterpartyPayment_class, LDKSpendableOutputDescriptor_StaticOutputCounterpartyPayment_meth, outpoint_ref, (long)output_ref, key_derivation_params_ref);
-               }
-               default: abort();
-       }
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PublicKeyErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_PublicKeyErrorZ *val = (LDKCResult_PublicKeyErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       int8_tArray res_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, res_arr, 0, 33, (*val->contents.result).compressed_form);
+       return res_arr;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1SpendableOutputDescriptorZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
-       LDKCVec_SpendableOutputDescriptorZ *ret = MALLOC(sizeof(LDKCVec_SpendableOutputDescriptorZ), "LDKCVec_SpendableOutputDescriptorZ");
-       ret->datalen = (*env)->GetArrayLength(env, elems);
-       if (ret->datalen == 0) {
-               ret->data = NULL;
-       } else {
-               ret->data = MALLOC(sizeof(LDKSpendableOutputDescriptor) * ret->datalen, "LDKCVec_SpendableOutputDescriptorZ Data");
-               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
-               for (size_t i = 0; i < ret->datalen; i++) {
-                       int64_t arr_elem = java_elems[i];
-                       LDKSpendableOutputDescriptor arr_elem_conv = *(LDKSpendableOutputDescriptor*)(((uint64_t)arr_elem) & ~1);
-                       FREE((void*)arr_elem);
-                       ret->data[i] = arr_elem_conv;
-               }
-               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
-       }
-       return (long)ret;
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PublicKeyErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_PublicKeyErrorZ *val = (LDKCResult_PublicKeyErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       jclass err_conv = LDKSecp256k1Error_to_java(env, (*val->contents.err));
+       return err_conv;
 }
-static inline LDKCVec_SpendableOutputDescriptorZ CVec_SpendableOutputDescriptorZ_clone(const LDKCVec_SpendableOutputDescriptorZ *orig) {
-       LDKCVec_SpendableOutputDescriptorZ ret = { .data = MALLOC(sizeof(LDKSpendableOutputDescriptor) * orig->datalen, "LDKCVec_SpendableOutputDescriptorZ clone bytes"), .datalen = orig->datalen };
-       for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = SpendableOutputDescriptor_clone(&orig->data[i]);
-       }
-       return ret;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxCreationKeysDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_TxCreationKeysDecodeErrorZ*)arg)->result_ok;
 }
-static jclass LDKErrorAction_DisconnectPeer_class = NULL;
-static jmethodID LDKErrorAction_DisconnectPeer_meth = NULL;
-static jclass LDKErrorAction_IgnoreError_class = NULL;
-static jmethodID LDKErrorAction_IgnoreError_meth = NULL;
-static jclass LDKErrorAction_SendErrorMessage_class = NULL;
-static jmethodID LDKErrorAction_SendErrorMessage_meth = NULL;
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKErrorAction_init (JNIEnv *env, jclass clz) {
-       LDKErrorAction_DisconnectPeer_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKErrorAction$DisconnectPeer;"));
-       CHECK(LDKErrorAction_DisconnectPeer_class != NULL);
-       LDKErrorAction_DisconnectPeer_meth = (*env)->GetMethodID(env, LDKErrorAction_DisconnectPeer_class, "<init>", "(J)V");
-       CHECK(LDKErrorAction_DisconnectPeer_meth != NULL);
-       LDKErrorAction_IgnoreError_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKErrorAction$IgnoreError;"));
-       CHECK(LDKErrorAction_IgnoreError_class != NULL);
-       LDKErrorAction_IgnoreError_meth = (*env)->GetMethodID(env, LDKErrorAction_IgnoreError_class, "<init>", "()V");
-       CHECK(LDKErrorAction_IgnoreError_meth != NULL);
-       LDKErrorAction_SendErrorMessage_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKErrorAction$SendErrorMessage;"));
-       CHECK(LDKErrorAction_SendErrorMessage_class != NULL);
-       LDKErrorAction_SendErrorMessage_meth = (*env)->GetMethodID(env, LDKErrorAction_SendErrorMessage_class, "<init>", "(J)V");
-       CHECK(LDKErrorAction_SendErrorMessage_meth != NULL);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxCreationKeysDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_TxCreationKeysDecodeErrorZ *val = (LDKCResult_TxCreationKeysDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKTxCreationKeys res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKErrorAction_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKErrorAction *obj = (LDKErrorAction*)ptr;
-       switch(obj->tag) {
-               case LDKErrorAction_DisconnectPeer: {
-                       LDKErrorMessage msg_var = obj->disconnect_peer.msg;
-                       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-                       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-                       long msg_ref = (long)msg_var.inner & ~1;
-                       return (*env)->NewObject(env, LDKErrorAction_DisconnectPeer_class, LDKErrorAction_DisconnectPeer_meth, msg_ref);
-               }
-               case LDKErrorAction_IgnoreError: {
-                       return (*env)->NewObject(env, LDKErrorAction_IgnoreError_class, LDKErrorAction_IgnoreError_meth);
-               }
-               case LDKErrorAction_SendErrorMessage: {
-                       LDKErrorMessage msg_var = obj->send_error_message.msg;
-                       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-                       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-                       long msg_ref = (long)msg_var.inner & ~1;
-                       return (*env)->NewObject(env, LDKErrorAction_SendErrorMessage_class, LDKErrorAction_SendErrorMessage_meth, msg_ref);
-               }
-               default: abort();
-       }
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxCreationKeysDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_TxCreationKeysDecodeErrorZ *val = (LDKCResult_TxCreationKeysDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-static jclass LDKHTLCFailChannelUpdate_ChannelUpdateMessage_class = NULL;
-static jmethodID LDKHTLCFailChannelUpdate_ChannelUpdateMessage_meth = NULL;
-static jclass LDKHTLCFailChannelUpdate_ChannelClosed_class = NULL;
-static jmethodID LDKHTLCFailChannelUpdate_ChannelClosed_meth = NULL;
-static jclass LDKHTLCFailChannelUpdate_NodeFailure_class = NULL;
-static jmethodID LDKHTLCFailChannelUpdate_NodeFailure_meth = NULL;
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKHTLCFailChannelUpdate_init (JNIEnv *env, jclass clz) {
-       LDKHTLCFailChannelUpdate_ChannelUpdateMessage_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKHTLCFailChannelUpdate$ChannelUpdateMessage;"));
-       CHECK(LDKHTLCFailChannelUpdate_ChannelUpdateMessage_class != NULL);
-       LDKHTLCFailChannelUpdate_ChannelUpdateMessage_meth = (*env)->GetMethodID(env, LDKHTLCFailChannelUpdate_ChannelUpdateMessage_class, "<init>", "(J)V");
-       CHECK(LDKHTLCFailChannelUpdate_ChannelUpdateMessage_meth != NULL);
-       LDKHTLCFailChannelUpdate_ChannelClosed_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKHTLCFailChannelUpdate$ChannelClosed;"));
-       CHECK(LDKHTLCFailChannelUpdate_ChannelClosed_class != NULL);
-       LDKHTLCFailChannelUpdate_ChannelClosed_meth = (*env)->GetMethodID(env, LDKHTLCFailChannelUpdate_ChannelClosed_class, "<init>", "(JZ)V");
-       CHECK(LDKHTLCFailChannelUpdate_ChannelClosed_meth != NULL);
-       LDKHTLCFailChannelUpdate_NodeFailure_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKHTLCFailChannelUpdate$NodeFailure;"));
-       CHECK(LDKHTLCFailChannelUpdate_NodeFailure_class != NULL);
-       LDKHTLCFailChannelUpdate_NodeFailure_meth = (*env)->GetMethodID(env, LDKHTLCFailChannelUpdate_NodeFailure_class, "<init>", "([BZ)V");
-       CHECK(LDKHTLCFailChannelUpdate_NodeFailure_meth != NULL);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelPublicKeysDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_ChannelPublicKeysDecodeErrorZ*)arg)->result_ok;
 }
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKHTLCFailChannelUpdate_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKHTLCFailChannelUpdate *obj = (LDKHTLCFailChannelUpdate*)ptr;
-       switch(obj->tag) {
-               case LDKHTLCFailChannelUpdate_ChannelUpdateMessage: {
-                       LDKChannelUpdate msg_var = obj->channel_update_message.msg;
-                       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-                       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-                       long msg_ref = (long)msg_var.inner & ~1;
-                       return (*env)->NewObject(env, LDKHTLCFailChannelUpdate_ChannelUpdateMessage_class, LDKHTLCFailChannelUpdate_ChannelUpdateMessage_meth, msg_ref);
-               }
-               case LDKHTLCFailChannelUpdate_ChannelClosed: {
-                       return (*env)->NewObject(env, LDKHTLCFailChannelUpdate_ChannelClosed_class, LDKHTLCFailChannelUpdate_ChannelClosed_meth, obj->channel_closed.short_channel_id, obj->channel_closed.is_permanent);
-               }
-               case LDKHTLCFailChannelUpdate_NodeFailure: {
-                       int8_tArray node_id_arr = (*env)->NewByteArray(env, 33);
-                       (*env)->SetByteArrayRegion(env, node_id_arr, 0, 33, obj->node_failure.node_id.compressed_form);
-                       return (*env)->NewObject(env, LDKHTLCFailChannelUpdate_NodeFailure_class, LDKHTLCFailChannelUpdate_NodeFailure_meth, node_id_arr, obj->node_failure.is_permanent);
-               }
-               default: abort();
-       }
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelPublicKeysDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ChannelPublicKeysDecodeErrorZ *val = (LDKCResult_ChannelPublicKeysDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKChannelPublicKeys res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-static jclass LDKMessageSendEvent_SendAcceptChannel_class = NULL;
-static jmethodID LDKMessageSendEvent_SendAcceptChannel_meth = NULL;
-static jclass LDKMessageSendEvent_SendOpenChannel_class = NULL;
-static jmethodID LDKMessageSendEvent_SendOpenChannel_meth = NULL;
-static jclass LDKMessageSendEvent_SendFundingCreated_class = NULL;
-static jmethodID LDKMessageSendEvent_SendFundingCreated_meth = NULL;
-static jclass LDKMessageSendEvent_SendFundingSigned_class = NULL;
-static jmethodID LDKMessageSendEvent_SendFundingSigned_meth = NULL;
-static jclass LDKMessageSendEvent_SendFundingLocked_class = NULL;
-static jmethodID LDKMessageSendEvent_SendFundingLocked_meth = NULL;
-static jclass LDKMessageSendEvent_SendAnnouncementSignatures_class = NULL;
-static jmethodID LDKMessageSendEvent_SendAnnouncementSignatures_meth = NULL;
-static jclass LDKMessageSendEvent_UpdateHTLCs_class = NULL;
-static jmethodID LDKMessageSendEvent_UpdateHTLCs_meth = NULL;
-static jclass LDKMessageSendEvent_SendRevokeAndACK_class = NULL;
-static jmethodID LDKMessageSendEvent_SendRevokeAndACK_meth = NULL;
-static jclass LDKMessageSendEvent_SendClosingSigned_class = NULL;
-static jmethodID LDKMessageSendEvent_SendClosingSigned_meth = NULL;
-static jclass LDKMessageSendEvent_SendShutdown_class = NULL;
-static jmethodID LDKMessageSendEvent_SendShutdown_meth = NULL;
-static jclass LDKMessageSendEvent_SendChannelReestablish_class = NULL;
-static jmethodID LDKMessageSendEvent_SendChannelReestablish_meth = NULL;
-static jclass LDKMessageSendEvent_BroadcastChannelAnnouncement_class = NULL;
-static jmethodID LDKMessageSendEvent_BroadcastChannelAnnouncement_meth = NULL;
-static jclass LDKMessageSendEvent_BroadcastNodeAnnouncement_class = NULL;
-static jmethodID LDKMessageSendEvent_BroadcastNodeAnnouncement_meth = NULL;
-static jclass LDKMessageSendEvent_BroadcastChannelUpdate_class = NULL;
-static jmethodID LDKMessageSendEvent_BroadcastChannelUpdate_meth = NULL;
-static jclass LDKMessageSendEvent_HandleError_class = NULL;
-static jmethodID LDKMessageSendEvent_HandleError_meth = NULL;
-static jclass LDKMessageSendEvent_PaymentFailureNetworkUpdate_class = NULL;
-static jmethodID LDKMessageSendEvent_PaymentFailureNetworkUpdate_meth = NULL;
-static jclass LDKMessageSendEvent_SendChannelRangeQuery_class = NULL;
-static jmethodID LDKMessageSendEvent_SendChannelRangeQuery_meth = NULL;
-static jclass LDKMessageSendEvent_SendShortIdsQuery_class = NULL;
-static jmethodID LDKMessageSendEvent_SendShortIdsQuery_meth = NULL;
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKMessageSendEvent_init (JNIEnv *env, jclass clz) {
-       LDKMessageSendEvent_SendAcceptChannel_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKMessageSendEvent$SendAcceptChannel;"));
-       CHECK(LDKMessageSendEvent_SendAcceptChannel_class != NULL);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelPublicKeysDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ChannelPublicKeysDecodeErrorZ *val = (LDKCResult_ChannelPublicKeysDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxCreationKeysErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_TxCreationKeysErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxCreationKeysErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_TxCreationKeysErrorZ *val = (LDKCResult_TxCreationKeysErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKTxCreationKeys res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxCreationKeysErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_TxCreationKeysErrorZ *val = (LDKCResult_TxCreationKeysErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       jclass err_conv = LDKSecp256k1Error_to_java(env, (*val->contents.err));
+       return err_conv;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1HTLCOutputInCommitmentDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_HTLCOutputInCommitmentDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1HTLCOutputInCommitmentDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *val = (LDKCResult_HTLCOutputInCommitmentDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKHTLCOutputInCommitment res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1HTLCOutputInCommitmentDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *val = (LDKCResult_HTLCOutputInCommitmentDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CounterpartyChannelTransactionParametersDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CounterpartyChannelTransactionParametersDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *val = (LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKCounterpartyChannelTransactionParameters res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CounterpartyChannelTransactionParametersDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *val = (LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelTransactionParametersDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_ChannelTransactionParametersDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelTransactionParametersDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ChannelTransactionParametersDecodeErrorZ *val = (LDKCResult_ChannelTransactionParametersDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKChannelTransactionParameters res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelTransactionParametersDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ChannelTransactionParametersDecodeErrorZ *val = (LDKCResult_ChannelTransactionParametersDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1HolderCommitmentTransactionDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_HolderCommitmentTransactionDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1HolderCommitmentTransactionDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_HolderCommitmentTransactionDecodeErrorZ *val = (LDKCResult_HolderCommitmentTransactionDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKHolderCommitmentTransaction res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1HolderCommitmentTransactionDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_HolderCommitmentTransactionDecodeErrorZ *val = (LDKCResult_HolderCommitmentTransactionDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1BuiltCommitmentTransactionDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_BuiltCommitmentTransactionDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1BuiltCommitmentTransactionDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *val = (LDKCResult_BuiltCommitmentTransactionDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKBuiltCommitmentTransaction res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1BuiltCommitmentTransactionDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *val = (LDKCResult_BuiltCommitmentTransactionDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CommitmentTransactionDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_CommitmentTransactionDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CommitmentTransactionDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_CommitmentTransactionDecodeErrorZ *val = (LDKCResult_CommitmentTransactionDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKCommitmentTransaction res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CommitmentTransactionDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_CommitmentTransactionDecodeErrorZ *val = (LDKCResult_CommitmentTransactionDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TrustedCommitmentTransactionNoneZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_TrustedCommitmentTransactionNoneZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TrustedCommitmentTransactionNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_TrustedCommitmentTransactionNoneZ *val = (LDKCResult_TrustedCommitmentTransactionNoneZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKTrustedCommitmentTransaction res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TrustedCommitmentTransactionNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_TrustedCommitmentTransactionNoneZ *val = (LDKCResult_TrustedCommitmentTransactionNoneZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       return *val->contents.err;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1SignatureZNoneZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_CVec_SignatureZNoneZ*)arg)->result_ok;
+}
+JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1SignatureZNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_CVec_SignatureZNoneZ *val = (LDKCResult_CVec_SignatureZNoneZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKCVec_SignatureZ res_var = (*val->contents.result);
+       jobjectArray res_arr = (*env)->NewObjectArray(env, res_var.datalen, arr_of_B_clz, NULL);
+       ;
+       for (size_t i = 0; i < res_var.datalen; i++) {
+               int8_tArray arr_conv_8_arr = (*env)->NewByteArray(env, 64);
+               (*env)->SetByteArrayRegion(env, arr_conv_8_arr, 0, 64, res_var.data[i].compact_form);
+               (*env)->SetObjectArrayElement(env, res_arr, i, arr_conv_8_arr);
+       }
+       return res_arr;
+}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1SignatureZNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_CVec_SignatureZNoneZ *val = (LDKCResult_CVec_SignatureZNoneZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       return *val->contents.err;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1u8ZPeerHandleErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_CVec_u8ZPeerHandleErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1u8ZPeerHandleErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_CVec_u8ZPeerHandleErrorZ *val = (LDKCResult_CVec_u8ZPeerHandleErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKCVec_u8Z res_var = (*val->contents.result);
+       int8_tArray res_arr = (*env)->NewByteArray(env, res_var.datalen);
+       (*env)->SetByteArrayRegion(env, res_arr, 0, res_var.datalen, res_var.data);
+       return res_arr;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1u8ZPeerHandleErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_CVec_u8ZPeerHandleErrorZ *val = (LDKCResult_CVec_u8ZPeerHandleErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKPeerHandleError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NonePeerHandleErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_NonePeerHandleErrorZ*)arg)->result_ok;
+}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NonePeerHandleErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_NonePeerHandleErrorZ *val = (LDKCResult_NonePeerHandleErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       return *val->contents.result;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NonePeerHandleErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_NonePeerHandleErrorZ *val = (LDKCResult_NonePeerHandleErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKPeerHandleError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolPeerHandleErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_boolPeerHandleErrorZ*)arg)->result_ok;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolPeerHandleErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_boolPeerHandleErrorZ *val = (LDKCResult_boolPeerHandleErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       return *val->contents.result;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolPeerHandleErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_boolPeerHandleErrorZ *val = (LDKCResult_boolPeerHandleErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKPeerHandleError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InitFeaturesDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_InitFeaturesDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InitFeaturesDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_InitFeaturesDecodeErrorZ *val = (LDKCResult_InitFeaturesDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKInitFeatures res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InitFeaturesDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_InitFeaturesDecodeErrorZ *val = (LDKCResult_InitFeaturesDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeFeaturesDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_NodeFeaturesDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeFeaturesDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_NodeFeaturesDecodeErrorZ *val = (LDKCResult_NodeFeaturesDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKNodeFeatures res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeFeaturesDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_NodeFeaturesDecodeErrorZ *val = (LDKCResult_NodeFeaturesDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelFeaturesDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_ChannelFeaturesDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelFeaturesDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ChannelFeaturesDecodeErrorZ *val = (LDKCResult_ChannelFeaturesDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKChannelFeatures res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelFeaturesDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ChannelFeaturesDecodeErrorZ *val = (LDKCResult_ChannelFeaturesDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelConfigDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_ChannelConfigDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelConfigDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ChannelConfigDecodeErrorZ *val = (LDKCResult_ChannelConfigDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKChannelConfig res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelConfigDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ChannelConfigDecodeErrorZ *val = (LDKCResult_ChannelConfigDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolLightningErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_boolLightningErrorZ*)arg)->result_ok;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolLightningErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_boolLightningErrorZ *val = (LDKCResult_boolLightningErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       return *val->contents.result;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolLightningErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_boolLightningErrorZ *val = (LDKCResult_boolLightningErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKLightningError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1new(JNIEnv *env, jclass clz, int64_t a, int64_t b, int64_t c) {
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
+       LDKChannelAnnouncement a_conv;
+       a_conv.inner = (void*)(a & (~1));
+       a_conv.is_owned = (a & 1) || (a == 0);
+       a_conv = ChannelAnnouncement_clone(&a_conv);
+       ret->a = a_conv;
+       LDKChannelUpdate b_conv;
+       b_conv.inner = (void*)(b & (~1));
+       b_conv.is_owned = (b & 1) || (b == 0);
+       b_conv = ChannelUpdate_clone(&b_conv);
+       ret->b = b_conv;
+       LDKChannelUpdate c_conv;
+       c_conv.inner = (void*)(c & (~1));
+       c_conv.is_owned = (c & 1) || (c == 0);
+       c_conv = ChannelUpdate_clone(&c_conv);
+       ret->c = c_conv;
+       return (long)ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *tuple = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(ptr & ~1);
+       LDKChannelAnnouncement a_var = tuple->a;
+       CHECK((((long)a_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&a_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long a_ref = (long)a_var.inner & ~1;
+       return a_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *tuple = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(ptr & ~1);
+       LDKChannelUpdate b_var = tuple->b;
+       CHECK((((long)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long b_ref = (long)b_var.inner & ~1;
+       return b_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1c(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *tuple = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(ptr & ~1);
+       LDKChannelUpdate c_var = tuple->c;
+       CHECK((((long)c_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&c_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long c_ref = (long)c_var.inner & ~1;
+       return c_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
+       LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ *ret = MALLOC(sizeof(LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ), "LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ");
+       ret->datalen = (*env)->GetArrayLength(env, elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ) * ret->datalen, "LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ Data");
+               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       int64_t arr_elem = java_elems[i];
+                       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ arr_elem_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)arr_elem) & ~1);
+                       FREE((void*)arr_elem);
+                       ret->data[i] = arr_elem_conv;
+               }
+               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
+       }
+       return (long)ret;
+}
+static inline LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_clone(const LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ *orig) {
+       LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ ret = { .data = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ) * orig->datalen, "LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(&orig->data[i]);
+       }
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1NodeAnnouncementZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
+       LDKCVec_NodeAnnouncementZ *ret = MALLOC(sizeof(LDKCVec_NodeAnnouncementZ), "LDKCVec_NodeAnnouncementZ");
+       ret->datalen = (*env)->GetArrayLength(env, elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(LDKNodeAnnouncement) * ret->datalen, "LDKCVec_NodeAnnouncementZ Data");
+               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       int64_t arr_elem = java_elems[i];
+                       LDKNodeAnnouncement arr_elem_conv;
+                       arr_elem_conv.inner = (void*)(arr_elem & (~1));
+                       arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
+                       arr_elem_conv = NodeAnnouncement_clone(&arr_elem_conv);
+                       ret->data[i] = arr_elem_conv;
+               }
+               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
+       }
+       return (long)ret;
+}
+static inline LDKCVec_NodeAnnouncementZ CVec_NodeAnnouncementZ_clone(const LDKCVec_NodeAnnouncementZ *orig) {
+       LDKCVec_NodeAnnouncementZ ret = { .data = MALLOC(sizeof(LDKNodeAnnouncement) * orig->datalen, "LDKCVec_NodeAnnouncementZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = NodeAnnouncement_clone(&orig->data[i]);
+       }
+       return ret;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneLightningErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_NoneLightningErrorZ*)arg)->result_ok;
+}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneLightningErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_NoneLightningErrorZ *val = (LDKCResult_NoneLightningErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       return *val->contents.result;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneLightningErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_NoneLightningErrorZ *val = (LDKCResult_NoneLightningErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKLightningError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+static jclass LDKErrorAction_DisconnectPeer_class = NULL;
+static jmethodID LDKErrorAction_DisconnectPeer_meth = NULL;
+static jclass LDKErrorAction_IgnoreError_class = NULL;
+static jmethodID LDKErrorAction_IgnoreError_meth = NULL;
+static jclass LDKErrorAction_SendErrorMessage_class = NULL;
+static jmethodID LDKErrorAction_SendErrorMessage_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKErrorAction_init (JNIEnv *env, jclass clz) {
+       LDKErrorAction_DisconnectPeer_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKErrorAction$DisconnectPeer;"));
+       CHECK(LDKErrorAction_DisconnectPeer_class != NULL);
+       LDKErrorAction_DisconnectPeer_meth = (*env)->GetMethodID(env, LDKErrorAction_DisconnectPeer_class, "<init>", "(J)V");
+       CHECK(LDKErrorAction_DisconnectPeer_meth != NULL);
+       LDKErrorAction_IgnoreError_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKErrorAction$IgnoreError;"));
+       CHECK(LDKErrorAction_IgnoreError_class != NULL);
+       LDKErrorAction_IgnoreError_meth = (*env)->GetMethodID(env, LDKErrorAction_IgnoreError_class, "<init>", "()V");
+       CHECK(LDKErrorAction_IgnoreError_meth != NULL);
+       LDKErrorAction_SendErrorMessage_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKErrorAction$SendErrorMessage;"));
+       CHECK(LDKErrorAction_SendErrorMessage_class != NULL);
+       LDKErrorAction_SendErrorMessage_meth = (*env)->GetMethodID(env, LDKErrorAction_SendErrorMessage_class, "<init>", "(J)V");
+       CHECK(LDKErrorAction_SendErrorMessage_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKErrorAction_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKErrorAction *obj = (LDKErrorAction*)ptr;
+       switch(obj->tag) {
+               case LDKErrorAction_DisconnectPeer: {
+                       LDKErrorMessage msg_var = obj->disconnect_peer.msg;
+                       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+                       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+                       long msg_ref = (long)msg_var.inner & ~1;
+                       return (*env)->NewObject(env, LDKErrorAction_DisconnectPeer_class, LDKErrorAction_DisconnectPeer_meth, msg_ref);
+               }
+               case LDKErrorAction_IgnoreError: {
+                       return (*env)->NewObject(env, LDKErrorAction_IgnoreError_class, LDKErrorAction_IgnoreError_meth);
+               }
+               case LDKErrorAction_SendErrorMessage: {
+                       LDKErrorMessage msg_var = obj->send_error_message.msg;
+                       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+                       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+                       long msg_ref = (long)msg_var.inner & ~1;
+                       return (*env)->NewObject(env, LDKErrorAction_SendErrorMessage_class, LDKErrorAction_SendErrorMessage_meth, msg_ref);
+               }
+               default: abort();
+       }
+}
+static jclass LDKHTLCFailChannelUpdate_ChannelUpdateMessage_class = NULL;
+static jmethodID LDKHTLCFailChannelUpdate_ChannelUpdateMessage_meth = NULL;
+static jclass LDKHTLCFailChannelUpdate_ChannelClosed_class = NULL;
+static jmethodID LDKHTLCFailChannelUpdate_ChannelClosed_meth = NULL;
+static jclass LDKHTLCFailChannelUpdate_NodeFailure_class = NULL;
+static jmethodID LDKHTLCFailChannelUpdate_NodeFailure_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKHTLCFailChannelUpdate_init (JNIEnv *env, jclass clz) {
+       LDKHTLCFailChannelUpdate_ChannelUpdateMessage_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKHTLCFailChannelUpdate$ChannelUpdateMessage;"));
+       CHECK(LDKHTLCFailChannelUpdate_ChannelUpdateMessage_class != NULL);
+       LDKHTLCFailChannelUpdate_ChannelUpdateMessage_meth = (*env)->GetMethodID(env, LDKHTLCFailChannelUpdate_ChannelUpdateMessage_class, "<init>", "(J)V");
+       CHECK(LDKHTLCFailChannelUpdate_ChannelUpdateMessage_meth != NULL);
+       LDKHTLCFailChannelUpdate_ChannelClosed_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKHTLCFailChannelUpdate$ChannelClosed;"));
+       CHECK(LDKHTLCFailChannelUpdate_ChannelClosed_class != NULL);
+       LDKHTLCFailChannelUpdate_ChannelClosed_meth = (*env)->GetMethodID(env, LDKHTLCFailChannelUpdate_ChannelClosed_class, "<init>", "(JZ)V");
+       CHECK(LDKHTLCFailChannelUpdate_ChannelClosed_meth != NULL);
+       LDKHTLCFailChannelUpdate_NodeFailure_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKHTLCFailChannelUpdate$NodeFailure;"));
+       CHECK(LDKHTLCFailChannelUpdate_NodeFailure_class != NULL);
+       LDKHTLCFailChannelUpdate_NodeFailure_meth = (*env)->GetMethodID(env, LDKHTLCFailChannelUpdate_NodeFailure_class, "<init>", "([BZ)V");
+       CHECK(LDKHTLCFailChannelUpdate_NodeFailure_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKHTLCFailChannelUpdate_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKHTLCFailChannelUpdate *obj = (LDKHTLCFailChannelUpdate*)ptr;
+       switch(obj->tag) {
+               case LDKHTLCFailChannelUpdate_ChannelUpdateMessage: {
+                       LDKChannelUpdate msg_var = obj->channel_update_message.msg;
+                       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+                       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+                       long msg_ref = (long)msg_var.inner & ~1;
+                       return (*env)->NewObject(env, LDKHTLCFailChannelUpdate_ChannelUpdateMessage_class, LDKHTLCFailChannelUpdate_ChannelUpdateMessage_meth, msg_ref);
+               }
+               case LDKHTLCFailChannelUpdate_ChannelClosed: {
+                       return (*env)->NewObject(env, LDKHTLCFailChannelUpdate_ChannelClosed_class, LDKHTLCFailChannelUpdate_ChannelClosed_meth, obj->channel_closed.short_channel_id, obj->channel_closed.is_permanent);
+               }
+               case LDKHTLCFailChannelUpdate_NodeFailure: {
+                       int8_tArray node_id_arr = (*env)->NewByteArray(env, 33);
+                       (*env)->SetByteArrayRegion(env, node_id_arr, 0, 33, obj->node_failure.node_id.compressed_form);
+                       return (*env)->NewObject(env, LDKHTLCFailChannelUpdate_NodeFailure_class, LDKHTLCFailChannelUpdate_NodeFailure_meth, node_id_arr, obj->node_failure.is_permanent);
+               }
+               default: abort();
+       }
+}
+static jclass LDKMessageSendEvent_SendAcceptChannel_class = NULL;
+static jmethodID LDKMessageSendEvent_SendAcceptChannel_meth = NULL;
+static jclass LDKMessageSendEvent_SendOpenChannel_class = NULL;
+static jmethodID LDKMessageSendEvent_SendOpenChannel_meth = NULL;
+static jclass LDKMessageSendEvent_SendFundingCreated_class = NULL;
+static jmethodID LDKMessageSendEvent_SendFundingCreated_meth = NULL;
+static jclass LDKMessageSendEvent_SendFundingSigned_class = NULL;
+static jmethodID LDKMessageSendEvent_SendFundingSigned_meth = NULL;
+static jclass LDKMessageSendEvent_SendFundingLocked_class = NULL;
+static jmethodID LDKMessageSendEvent_SendFundingLocked_meth = NULL;
+static jclass LDKMessageSendEvent_SendAnnouncementSignatures_class = NULL;
+static jmethodID LDKMessageSendEvent_SendAnnouncementSignatures_meth = NULL;
+static jclass LDKMessageSendEvent_UpdateHTLCs_class = NULL;
+static jmethodID LDKMessageSendEvent_UpdateHTLCs_meth = NULL;
+static jclass LDKMessageSendEvent_SendRevokeAndACK_class = NULL;
+static jmethodID LDKMessageSendEvent_SendRevokeAndACK_meth = NULL;
+static jclass LDKMessageSendEvent_SendClosingSigned_class = NULL;
+static jmethodID LDKMessageSendEvent_SendClosingSigned_meth = NULL;
+static jclass LDKMessageSendEvent_SendShutdown_class = NULL;
+static jmethodID LDKMessageSendEvent_SendShutdown_meth = NULL;
+static jclass LDKMessageSendEvent_SendChannelReestablish_class = NULL;
+static jmethodID LDKMessageSendEvent_SendChannelReestablish_meth = NULL;
+static jclass LDKMessageSendEvent_BroadcastChannelAnnouncement_class = NULL;
+static jmethodID LDKMessageSendEvent_BroadcastChannelAnnouncement_meth = NULL;
+static jclass LDKMessageSendEvent_BroadcastNodeAnnouncement_class = NULL;
+static jmethodID LDKMessageSendEvent_BroadcastNodeAnnouncement_meth = NULL;
+static jclass LDKMessageSendEvent_BroadcastChannelUpdate_class = NULL;
+static jmethodID LDKMessageSendEvent_BroadcastChannelUpdate_meth = NULL;
+static jclass LDKMessageSendEvent_HandleError_class = NULL;
+static jmethodID LDKMessageSendEvent_HandleError_meth = NULL;
+static jclass LDKMessageSendEvent_PaymentFailureNetworkUpdate_class = NULL;
+static jmethodID LDKMessageSendEvent_PaymentFailureNetworkUpdate_meth = NULL;
+static jclass LDKMessageSendEvent_SendChannelRangeQuery_class = NULL;
+static jmethodID LDKMessageSendEvent_SendChannelRangeQuery_meth = NULL;
+static jclass LDKMessageSendEvent_SendShortIdsQuery_class = NULL;
+static jmethodID LDKMessageSendEvent_SendShortIdsQuery_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKMessageSendEvent_init (JNIEnv *env, jclass clz) {
+       LDKMessageSendEvent_SendAcceptChannel_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKMessageSendEvent$SendAcceptChannel;"));
+       CHECK(LDKMessageSendEvent_SendAcceptChannel_class != NULL);
        LDKMessageSendEvent_SendAcceptChannel_meth = (*env)->GetMethodID(env, LDKMessageSendEvent_SendAcceptChannel_class, "<init>", "([BJ)V");
        CHECK(LDKMessageSendEvent_SendAcceptChannel_meth != NULL);
        LDKMessageSendEvent_SendOpenChannel_class =
@@ -780,100 +1205,506 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKMessageSendEvent_1ref_1f
                        long msg_ref = (long)msg_var.inner & ~1;
                        return (*env)->NewObject(env, LDKMessageSendEvent_SendRevokeAndACK_class, LDKMessageSendEvent_SendRevokeAndACK_meth, node_id_arr, msg_ref);
                }
-               case LDKMessageSendEvent_SendClosingSigned: {
-                       int8_tArray node_id_arr = (*env)->NewByteArray(env, 33);
-                       (*env)->SetByteArrayRegion(env, node_id_arr, 0, 33, obj->send_closing_signed.node_id.compressed_form);
-                       LDKClosingSigned msg_var = obj->send_closing_signed.msg;
-                       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-                       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-                       long msg_ref = (long)msg_var.inner & ~1;
-                       return (*env)->NewObject(env, LDKMessageSendEvent_SendClosingSigned_class, LDKMessageSendEvent_SendClosingSigned_meth, node_id_arr, msg_ref);
+               case LDKMessageSendEvent_SendClosingSigned: {
+                       int8_tArray node_id_arr = (*env)->NewByteArray(env, 33);
+                       (*env)->SetByteArrayRegion(env, node_id_arr, 0, 33, obj->send_closing_signed.node_id.compressed_form);
+                       LDKClosingSigned msg_var = obj->send_closing_signed.msg;
+                       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+                       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+                       long msg_ref = (long)msg_var.inner & ~1;
+                       return (*env)->NewObject(env, LDKMessageSendEvent_SendClosingSigned_class, LDKMessageSendEvent_SendClosingSigned_meth, node_id_arr, msg_ref);
+               }
+               case LDKMessageSendEvent_SendShutdown: {
+                       int8_tArray node_id_arr = (*env)->NewByteArray(env, 33);
+                       (*env)->SetByteArrayRegion(env, node_id_arr, 0, 33, obj->send_shutdown.node_id.compressed_form);
+                       LDKShutdown msg_var = obj->send_shutdown.msg;
+                       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+                       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+                       long msg_ref = (long)msg_var.inner & ~1;
+                       return (*env)->NewObject(env, LDKMessageSendEvent_SendShutdown_class, LDKMessageSendEvent_SendShutdown_meth, node_id_arr, msg_ref);
+               }
+               case LDKMessageSendEvent_SendChannelReestablish: {
+                       int8_tArray node_id_arr = (*env)->NewByteArray(env, 33);
+                       (*env)->SetByteArrayRegion(env, node_id_arr, 0, 33, obj->send_channel_reestablish.node_id.compressed_form);
+                       LDKChannelReestablish msg_var = obj->send_channel_reestablish.msg;
+                       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+                       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+                       long msg_ref = (long)msg_var.inner & ~1;
+                       return (*env)->NewObject(env, LDKMessageSendEvent_SendChannelReestablish_class, LDKMessageSendEvent_SendChannelReestablish_meth, node_id_arr, msg_ref);
+               }
+               case LDKMessageSendEvent_BroadcastChannelAnnouncement: {
+                       LDKChannelAnnouncement msg_var = obj->broadcast_channel_announcement.msg;
+                       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+                       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+                       long msg_ref = (long)msg_var.inner & ~1;
+                       LDKChannelUpdate update_msg_var = obj->broadcast_channel_announcement.update_msg;
+                       CHECK((((long)update_msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+                       CHECK((((long)&update_msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+                       long update_msg_ref = (long)update_msg_var.inner & ~1;
+                       return (*env)->NewObject(env, LDKMessageSendEvent_BroadcastChannelAnnouncement_class, LDKMessageSendEvent_BroadcastChannelAnnouncement_meth, msg_ref, update_msg_ref);
+               }
+               case LDKMessageSendEvent_BroadcastNodeAnnouncement: {
+                       LDKNodeAnnouncement msg_var = obj->broadcast_node_announcement.msg;
+                       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+                       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+                       long msg_ref = (long)msg_var.inner & ~1;
+                       return (*env)->NewObject(env, LDKMessageSendEvent_BroadcastNodeAnnouncement_class, LDKMessageSendEvent_BroadcastNodeAnnouncement_meth, msg_ref);
+               }
+               case LDKMessageSendEvent_BroadcastChannelUpdate: {
+                       LDKChannelUpdate msg_var = obj->broadcast_channel_update.msg;
+                       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+                       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+                       long msg_ref = (long)msg_var.inner & ~1;
+                       return (*env)->NewObject(env, LDKMessageSendEvent_BroadcastChannelUpdate_class, LDKMessageSendEvent_BroadcastChannelUpdate_meth, msg_ref);
+               }
+               case LDKMessageSendEvent_HandleError: {
+                       int8_tArray node_id_arr = (*env)->NewByteArray(env, 33);
+                       (*env)->SetByteArrayRegion(env, node_id_arr, 0, 33, obj->handle_error.node_id.compressed_form);
+                       long action_ref = ((long)&obj->handle_error.action) | 1;
+                       return (*env)->NewObject(env, LDKMessageSendEvent_HandleError_class, LDKMessageSendEvent_HandleError_meth, node_id_arr, action_ref);
+               }
+               case LDKMessageSendEvent_PaymentFailureNetworkUpdate: {
+                       long update_ref = ((long)&obj->payment_failure_network_update.update) | 1;
+                       return (*env)->NewObject(env, LDKMessageSendEvent_PaymentFailureNetworkUpdate_class, LDKMessageSendEvent_PaymentFailureNetworkUpdate_meth, update_ref);
+               }
+               case LDKMessageSendEvent_SendChannelRangeQuery: {
+                       int8_tArray node_id_arr = (*env)->NewByteArray(env, 33);
+                       (*env)->SetByteArrayRegion(env, node_id_arr, 0, 33, obj->send_channel_range_query.node_id.compressed_form);
+                       LDKQueryChannelRange msg_var = obj->send_channel_range_query.msg;
+                       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+                       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+                       long msg_ref = (long)msg_var.inner & ~1;
+                       return (*env)->NewObject(env, LDKMessageSendEvent_SendChannelRangeQuery_class, LDKMessageSendEvent_SendChannelRangeQuery_meth, node_id_arr, msg_ref);
+               }
+               case LDKMessageSendEvent_SendShortIdsQuery: {
+                       int8_tArray node_id_arr = (*env)->NewByteArray(env, 33);
+                       (*env)->SetByteArrayRegion(env, node_id_arr, 0, 33, obj->send_short_ids_query.node_id.compressed_form);
+                       LDKQueryShortChannelIds msg_var = obj->send_short_ids_query.msg;
+                       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+                       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+                       long msg_ref = (long)msg_var.inner & ~1;
+                       return (*env)->NewObject(env, LDKMessageSendEvent_SendShortIdsQuery_class, LDKMessageSendEvent_SendShortIdsQuery_meth, node_id_arr, msg_ref);
+               }
+               default: abort();
+       }
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1MessageSendEventZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
+       LDKCVec_MessageSendEventZ *ret = MALLOC(sizeof(LDKCVec_MessageSendEventZ), "LDKCVec_MessageSendEventZ");
+       ret->datalen = (*env)->GetArrayLength(env, elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(LDKMessageSendEvent) * ret->datalen, "LDKCVec_MessageSendEventZ Data");
+               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       int64_t arr_elem = java_elems[i];
+                       LDKMessageSendEvent arr_elem_conv = *(LDKMessageSendEvent*)(((uint64_t)arr_elem) & ~1);
+                       FREE((void*)arr_elem);
+                       ret->data[i] = arr_elem_conv;
+               }
+               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
+       }
+       return (long)ret;
+}
+static inline LDKCVec_MessageSendEventZ CVec_MessageSendEventZ_clone(const LDKCVec_MessageSendEventZ *orig) {
+       LDKCVec_MessageSendEventZ ret = { .data = MALLOC(sizeof(LDKMessageSendEvent) * orig->datalen, "LDKCVec_MessageSendEventZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = MessageSendEvent_clone(&orig->data[i]);
+       }
+       return ret;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1DirectionalChannelInfoDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_DirectionalChannelInfoDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1DirectionalChannelInfoDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_DirectionalChannelInfoDecodeErrorZ *val = (LDKCResult_DirectionalChannelInfoDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKDirectionalChannelInfo res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1DirectionalChannelInfoDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_DirectionalChannelInfoDecodeErrorZ *val = (LDKCResult_DirectionalChannelInfoDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelInfoDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_ChannelInfoDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelInfoDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ChannelInfoDecodeErrorZ *val = (LDKCResult_ChannelInfoDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKChannelInfo res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelInfoDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ChannelInfoDecodeErrorZ *val = (LDKCResult_ChannelInfoDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RoutingFeesDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_RoutingFeesDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RoutingFeesDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_RoutingFeesDecodeErrorZ *val = (LDKCResult_RoutingFeesDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKRoutingFees res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RoutingFeesDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_RoutingFeesDecodeErrorZ *val = (LDKCResult_RoutingFeesDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+static jclass LDKNetAddress_IPv4_class = NULL;
+static jmethodID LDKNetAddress_IPv4_meth = NULL;
+static jclass LDKNetAddress_IPv6_class = NULL;
+static jmethodID LDKNetAddress_IPv6_meth = NULL;
+static jclass LDKNetAddress_OnionV2_class = NULL;
+static jmethodID LDKNetAddress_OnionV2_meth = NULL;
+static jclass LDKNetAddress_OnionV3_class = NULL;
+static jmethodID LDKNetAddress_OnionV3_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKNetAddress_init (JNIEnv *env, jclass clz) {
+       LDKNetAddress_IPv4_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKNetAddress$IPv4;"));
+       CHECK(LDKNetAddress_IPv4_class != NULL);
+       LDKNetAddress_IPv4_meth = (*env)->GetMethodID(env, LDKNetAddress_IPv4_class, "<init>", "([BS)V");
+       CHECK(LDKNetAddress_IPv4_meth != NULL);
+       LDKNetAddress_IPv6_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKNetAddress$IPv6;"));
+       CHECK(LDKNetAddress_IPv6_class != NULL);
+       LDKNetAddress_IPv6_meth = (*env)->GetMethodID(env, LDKNetAddress_IPv6_class, "<init>", "([BS)V");
+       CHECK(LDKNetAddress_IPv6_meth != NULL);
+       LDKNetAddress_OnionV2_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKNetAddress$OnionV2;"));
+       CHECK(LDKNetAddress_OnionV2_class != NULL);
+       LDKNetAddress_OnionV2_meth = (*env)->GetMethodID(env, LDKNetAddress_OnionV2_class, "<init>", "([BS)V");
+       CHECK(LDKNetAddress_OnionV2_meth != NULL);
+       LDKNetAddress_OnionV3_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKNetAddress$OnionV3;"));
+       CHECK(LDKNetAddress_OnionV3_class != NULL);
+       LDKNetAddress_OnionV3_meth = (*env)->GetMethodID(env, LDKNetAddress_OnionV3_class, "<init>", "([BSBS)V");
+       CHECK(LDKNetAddress_OnionV3_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKNetAddress_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKNetAddress *obj = (LDKNetAddress*)ptr;
+       switch(obj->tag) {
+               case LDKNetAddress_IPv4: {
+                       int8_tArray addr_arr = (*env)->NewByteArray(env, 4);
+                       (*env)->SetByteArrayRegion(env, addr_arr, 0, 4, obj->i_pv4.addr.data);
+                       return (*env)->NewObject(env, LDKNetAddress_IPv4_class, LDKNetAddress_IPv4_meth, addr_arr, obj->i_pv4.port);
+               }
+               case LDKNetAddress_IPv6: {
+                       int8_tArray addr_arr = (*env)->NewByteArray(env, 16);
+                       (*env)->SetByteArrayRegion(env, addr_arr, 0, 16, obj->i_pv6.addr.data);
+                       return (*env)->NewObject(env, LDKNetAddress_IPv6_class, LDKNetAddress_IPv6_meth, addr_arr, obj->i_pv6.port);
                }
-               case LDKMessageSendEvent_SendShutdown: {
-                       int8_tArray node_id_arr = (*env)->NewByteArray(env, 33);
-                       (*env)->SetByteArrayRegion(env, node_id_arr, 0, 33, obj->send_shutdown.node_id.compressed_form);
-                       LDKShutdown msg_var = obj->send_shutdown.msg;
-                       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-                       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-                       long msg_ref = (long)msg_var.inner & ~1;
-                       return (*env)->NewObject(env, LDKMessageSendEvent_SendShutdown_class, LDKMessageSendEvent_SendShutdown_meth, node_id_arr, msg_ref);
+               case LDKNetAddress_OnionV2: {
+                       int8_tArray addr_arr = (*env)->NewByteArray(env, 10);
+                       (*env)->SetByteArrayRegion(env, addr_arr, 0, 10, obj->onion_v2.addr.data);
+                       return (*env)->NewObject(env, LDKNetAddress_OnionV2_class, LDKNetAddress_OnionV2_meth, addr_arr, obj->onion_v2.port);
                }
-               case LDKMessageSendEvent_SendChannelReestablish: {
-                       int8_tArray node_id_arr = (*env)->NewByteArray(env, 33);
-                       (*env)->SetByteArrayRegion(env, node_id_arr, 0, 33, obj->send_channel_reestablish.node_id.compressed_form);
-                       LDKChannelReestablish msg_var = obj->send_channel_reestablish.msg;
-                       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-                       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-                       long msg_ref = (long)msg_var.inner & ~1;
-                       return (*env)->NewObject(env, LDKMessageSendEvent_SendChannelReestablish_class, LDKMessageSendEvent_SendChannelReestablish_meth, node_id_arr, msg_ref);
+               case LDKNetAddress_OnionV3: {
+                       int8_tArray ed25519_pubkey_arr = (*env)->NewByteArray(env, 32);
+                       (*env)->SetByteArrayRegion(env, ed25519_pubkey_arr, 0, 32, obj->onion_v3.ed25519_pubkey.data);
+                       return (*env)->NewObject(env, LDKNetAddress_OnionV3_class, LDKNetAddress_OnionV3_meth, ed25519_pubkey_arr, obj->onion_v3.checksum, obj->onion_v3.version, obj->onion_v3.port);
                }
-               case LDKMessageSendEvent_BroadcastChannelAnnouncement: {
-                       LDKChannelAnnouncement msg_var = obj->broadcast_channel_announcement.msg;
-                       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-                       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-                       long msg_ref = (long)msg_var.inner & ~1;
-                       LDKChannelUpdate update_msg_var = obj->broadcast_channel_announcement.update_msg;
-                       CHECK((((long)update_msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-                       CHECK((((long)&update_msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-                       long update_msg_ref = (long)update_msg_var.inner & ~1;
-                       return (*env)->NewObject(env, LDKMessageSendEvent_BroadcastChannelAnnouncement_class, LDKMessageSendEvent_BroadcastChannelAnnouncement_meth, msg_ref, update_msg_ref);
+               default: abort();
+       }
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1NetAddressZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
+       LDKCVec_NetAddressZ *ret = MALLOC(sizeof(LDKCVec_NetAddressZ), "LDKCVec_NetAddressZ");
+       ret->datalen = (*env)->GetArrayLength(env, elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(LDKNetAddress) * ret->datalen, "LDKCVec_NetAddressZ Data");
+               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       int64_t arr_elem = java_elems[i];
+                       LDKNetAddress arr_elem_conv = *(LDKNetAddress*)(((uint64_t)arr_elem) & ~1);
+                       FREE((void*)arr_elem);
+                       ret->data[i] = arr_elem_conv;
                }
-               case LDKMessageSendEvent_BroadcastNodeAnnouncement: {
-                       LDKNodeAnnouncement msg_var = obj->broadcast_node_announcement.msg;
-                       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-                       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-                       long msg_ref = (long)msg_var.inner & ~1;
-                       return (*env)->NewObject(env, LDKMessageSendEvent_BroadcastNodeAnnouncement_class, LDKMessageSendEvent_BroadcastNodeAnnouncement_meth, msg_ref);
+               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
+       }
+       return (long)ret;
+}
+static inline LDKCVec_NetAddressZ CVec_NetAddressZ_clone(const LDKCVec_NetAddressZ *orig) {
+       LDKCVec_NetAddressZ ret = { .data = MALLOC(sizeof(LDKNetAddress) * orig->datalen, "LDKCVec_NetAddressZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = NetAddress_clone(&orig->data[i]);
+       }
+       return ret;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeAnnouncementInfoDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeAnnouncementInfoDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_NodeAnnouncementInfoDecodeErrorZ *val = (LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKNodeAnnouncementInfo res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeAnnouncementInfoDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_NodeAnnouncementInfoDecodeErrorZ *val = (LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1u64Z_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
+       LDKCVec_u64Z *ret = MALLOC(sizeof(LDKCVec_u64Z), "LDKCVec_u64Z");
+       ret->datalen = (*env)->GetArrayLength(env, elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(uint64_t) * ret->datalen, "LDKCVec_u64Z Data");
+               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       ret->data[i] = java_elems[i];
                }
-               case LDKMessageSendEvent_BroadcastChannelUpdate: {
-                       LDKChannelUpdate msg_var = obj->broadcast_channel_update.msg;
-                       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-                       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-                       long msg_ref = (long)msg_var.inner & ~1;
-                       return (*env)->NewObject(env, LDKMessageSendEvent_BroadcastChannelUpdate_class, LDKMessageSendEvent_BroadcastChannelUpdate_meth, msg_ref);
+               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
+       }
+       return (long)ret;
+}
+static inline LDKCVec_u64Z CVec_u64Z_clone(const LDKCVec_u64Z *orig) {
+       LDKCVec_u64Z ret = { .data = MALLOC(sizeof(int64_t) * orig->datalen, "LDKCVec_u64Z clone bytes"), .datalen = orig->datalen };
+       memcpy(ret.data, orig->data, sizeof(int64_t) * ret.datalen);
+       return ret;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeInfoDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_NodeInfoDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeInfoDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_NodeInfoDecodeErrorZ *val = (LDKCResult_NodeInfoDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKNodeInfo res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeInfoDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_NodeInfoDecodeErrorZ *val = (LDKCResult_NodeInfoDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NetworkGraphDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_NetworkGraphDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NetworkGraphDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_NetworkGraphDecodeErrorZ *val = (LDKCResult_NetworkGraphDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKNetworkGraph res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NetworkGraphDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_NetworkGraphDecodeErrorZ *val = (LDKCResult_NetworkGraphDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1usizeTransactionZ_1new(JNIEnv *env, jclass clz, int64_t a, int8_tArray b) {
+       LDKC2Tuple_usizeTransactionZ* ret = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
+       ret->a = a;
+       LDKTransaction b_ref;
+       b_ref.datalen = (*env)->GetArrayLength(env, b);
+       b_ref.data = MALLOC(b_ref.datalen, "LDKTransaction Bytes");
+       (*env)->GetByteArrayRegion(env, b, 0, b_ref.datalen, b_ref.data);
+       b_ref.data_is_owned = false;
+       ret->b = b_ref;
+       return (long)ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1usizeTransactionZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKC2Tuple_usizeTransactionZ *tuple = (LDKC2Tuple_usizeTransactionZ*)(ptr & ~1);
+       return tuple->a;
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1usizeTransactionZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKC2Tuple_usizeTransactionZ *tuple = (LDKC2Tuple_usizeTransactionZ*)(ptr & ~1);
+       LDKTransaction b_var = tuple->b;
+       int8_tArray b_arr = (*env)->NewByteArray(env, b_var.datalen);
+       (*env)->SetByteArrayRegion(env, b_arr, 0, b_var.datalen, b_var.data);
+       return b_arr;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1usizeTransactionZZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
+       LDKCVec_C2Tuple_usizeTransactionZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_usizeTransactionZZ), "LDKCVec_C2Tuple_usizeTransactionZZ");
+       ret->datalen = (*env)->GetArrayLength(env, elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ) * ret->datalen, "LDKCVec_C2Tuple_usizeTransactionZZ Data");
+               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       int64_t arr_elem = java_elems[i];
+                       LDKC2Tuple_usizeTransactionZ arr_elem_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)arr_elem) & ~1);
+                       FREE((void*)arr_elem);
+                       ret->data[i] = arr_elem_conv;
                }
-               case LDKMessageSendEvent_HandleError: {
-                       int8_tArray node_id_arr = (*env)->NewByteArray(env, 33);
-                       (*env)->SetByteArrayRegion(env, node_id_arr, 0, 33, obj->handle_error.node_id.compressed_form);
-                       long action_ref = ((long)&obj->handle_error.action) | 1;
-                       return (*env)->NewObject(env, LDKMessageSendEvent_HandleError_class, LDKMessageSendEvent_HandleError_meth, node_id_arr, action_ref);
+               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
+       }
+       return (long)ret;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneChannelMonitorUpdateErrZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_NoneChannelMonitorUpdateErrZ*)arg)->result_ok;
+}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneChannelMonitorUpdateErrZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_NoneChannelMonitorUpdateErrZ *val = (LDKCResult_NoneChannelMonitorUpdateErrZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       return *val->contents.result;
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneChannelMonitorUpdateErrZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_NoneChannelMonitorUpdateErrZ *val = (LDKCResult_NoneChannelMonitorUpdateErrZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       jclass err_conv = LDKChannelMonitorUpdateErr_to_java(env, (*val->contents.err));
+       return err_conv;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1MonitorEventZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
+       LDKCVec_MonitorEventZ *ret = MALLOC(sizeof(LDKCVec_MonitorEventZ), "LDKCVec_MonitorEventZ");
+       ret->datalen = (*env)->GetArrayLength(env, elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(LDKMonitorEvent) * ret->datalen, "LDKCVec_MonitorEventZ Data");
+               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       int64_t arr_elem = java_elems[i];
+                       LDKMonitorEvent arr_elem_conv;
+                       arr_elem_conv.inner = (void*)(arr_elem & (~1));
+                       arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
+                       arr_elem_conv = MonitorEvent_clone(&arr_elem_conv);
+                       ret->data[i] = arr_elem_conv;
                }
-               case LDKMessageSendEvent_PaymentFailureNetworkUpdate: {
-                       long update_ref = ((long)&obj->payment_failure_network_update.update) | 1;
-                       return (*env)->NewObject(env, LDKMessageSendEvent_PaymentFailureNetworkUpdate_class, LDKMessageSendEvent_PaymentFailureNetworkUpdate_meth, update_ref);
+               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
+       }
+       return (long)ret;
+}
+static inline LDKCVec_MonitorEventZ CVec_MonitorEventZ_clone(const LDKCVec_MonitorEventZ *orig) {
+       LDKCVec_MonitorEventZ ret = { .data = MALLOC(sizeof(LDKMonitorEvent) * orig->datalen, "LDKCVec_MonitorEventZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = MonitorEvent_clone(&orig->data[i]);
+       }
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u64u64Z_1new(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKC2Tuple_u64u64Z* ret = MALLOC(sizeof(LDKC2Tuple_u64u64Z), "LDKC2Tuple_u64u64Z");
+       ret->a = a;
+       ret->b = b;
+       return (long)ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u64u64Z_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKC2Tuple_u64u64Z *tuple = (LDKC2Tuple_u64u64Z*)(ptr & ~1);
+       return tuple->a;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u64u64Z_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKC2Tuple_u64u64Z *tuple = (LDKC2Tuple_u64u64Z*)(ptr & ~1);
+       return tuple->b;
+}
+static jclass LDKSpendableOutputDescriptor_StaticOutput_class = NULL;
+static jmethodID LDKSpendableOutputDescriptor_StaticOutput_meth = NULL;
+static jclass LDKSpendableOutputDescriptor_DynamicOutputP2WSH_class = NULL;
+static jmethodID LDKSpendableOutputDescriptor_DynamicOutputP2WSH_meth = NULL;
+static jclass LDKSpendableOutputDescriptor_StaticOutputCounterpartyPayment_class = NULL;
+static jmethodID LDKSpendableOutputDescriptor_StaticOutputCounterpartyPayment_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKSpendableOutputDescriptor_init (JNIEnv *env, jclass clz) {
+       LDKSpendableOutputDescriptor_StaticOutput_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKSpendableOutputDescriptor$StaticOutput;"));
+       CHECK(LDKSpendableOutputDescriptor_StaticOutput_class != NULL);
+       LDKSpendableOutputDescriptor_StaticOutput_meth = (*env)->GetMethodID(env, LDKSpendableOutputDescriptor_StaticOutput_class, "<init>", "(JJ)V");
+       CHECK(LDKSpendableOutputDescriptor_StaticOutput_meth != NULL);
+       LDKSpendableOutputDescriptor_DynamicOutputP2WSH_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKSpendableOutputDescriptor$DynamicOutputP2WSH;"));
+       CHECK(LDKSpendableOutputDescriptor_DynamicOutputP2WSH_class != NULL);
+       LDKSpendableOutputDescriptor_DynamicOutputP2WSH_meth = (*env)->GetMethodID(env, LDKSpendableOutputDescriptor_DynamicOutputP2WSH_class, "<init>", "(J[BSJJ[B)V");
+       CHECK(LDKSpendableOutputDescriptor_DynamicOutputP2WSH_meth != NULL);
+       LDKSpendableOutputDescriptor_StaticOutputCounterpartyPayment_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKSpendableOutputDescriptor$StaticOutputCounterpartyPayment;"));
+       CHECK(LDKSpendableOutputDescriptor_StaticOutputCounterpartyPayment_class != NULL);
+       LDKSpendableOutputDescriptor_StaticOutputCounterpartyPayment_meth = (*env)->GetMethodID(env, LDKSpendableOutputDescriptor_StaticOutputCounterpartyPayment_class, "<init>", "(JJJ)V");
+       CHECK(LDKSpendableOutputDescriptor_StaticOutputCounterpartyPayment_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKSpendableOutputDescriptor_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKSpendableOutputDescriptor *obj = (LDKSpendableOutputDescriptor*)ptr;
+       switch(obj->tag) {
+               case LDKSpendableOutputDescriptor_StaticOutput: {
+                       LDKOutPoint outpoint_var = obj->static_output.outpoint;
+                       CHECK((((long)outpoint_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+                       CHECK((((long)&outpoint_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+                       long outpoint_ref = (long)outpoint_var.inner & ~1;
+                       long output_ref = ((long)&obj->static_output.output) | 1;
+                       return (*env)->NewObject(env, LDKSpendableOutputDescriptor_StaticOutput_class, LDKSpendableOutputDescriptor_StaticOutput_meth, outpoint_ref, (long)output_ref);
                }
-               case LDKMessageSendEvent_SendChannelRangeQuery: {
-                       int8_tArray node_id_arr = (*env)->NewByteArray(env, 33);
-                       (*env)->SetByteArrayRegion(env, node_id_arr, 0, 33, obj->send_channel_range_query.node_id.compressed_form);
-                       LDKQueryChannelRange msg_var = obj->send_channel_range_query.msg;
-                       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-                       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-                       long msg_ref = (long)msg_var.inner & ~1;
-                       return (*env)->NewObject(env, LDKMessageSendEvent_SendChannelRangeQuery_class, LDKMessageSendEvent_SendChannelRangeQuery_meth, node_id_arr, msg_ref);
+               case LDKSpendableOutputDescriptor_DynamicOutputP2WSH: {
+                       LDKOutPoint outpoint_var = obj->dynamic_output_p2wsh.outpoint;
+                       CHECK((((long)outpoint_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+                       CHECK((((long)&outpoint_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+                       long outpoint_ref = (long)outpoint_var.inner & ~1;
+                       int8_tArray per_commitment_point_arr = (*env)->NewByteArray(env, 33);
+                       (*env)->SetByteArrayRegion(env, per_commitment_point_arr, 0, 33, obj->dynamic_output_p2wsh.per_commitment_point.compressed_form);
+                       long output_ref = ((long)&obj->dynamic_output_p2wsh.output) | 1;
+                       long key_derivation_params_ref = (long)(&obj->dynamic_output_p2wsh.key_derivation_params) | 1;
+                       int8_tArray revocation_pubkey_arr = (*env)->NewByteArray(env, 33);
+                       (*env)->SetByteArrayRegion(env, revocation_pubkey_arr, 0, 33, obj->dynamic_output_p2wsh.revocation_pubkey.compressed_form);
+                       return (*env)->NewObject(env, LDKSpendableOutputDescriptor_DynamicOutputP2WSH_class, LDKSpendableOutputDescriptor_DynamicOutputP2WSH_meth, outpoint_ref, per_commitment_point_arr, obj->dynamic_output_p2wsh.to_self_delay, (long)output_ref, key_derivation_params_ref, revocation_pubkey_arr);
                }
-               case LDKMessageSendEvent_SendShortIdsQuery: {
-                       int8_tArray node_id_arr = (*env)->NewByteArray(env, 33);
-                       (*env)->SetByteArrayRegion(env, node_id_arr, 0, 33, obj->send_short_ids_query.node_id.compressed_form);
-                       LDKQueryShortChannelIds msg_var = obj->send_short_ids_query.msg;
-                       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-                       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-                       long msg_ref = (long)msg_var.inner & ~1;
-                       return (*env)->NewObject(env, LDKMessageSendEvent_SendShortIdsQuery_class, LDKMessageSendEvent_SendShortIdsQuery_meth, node_id_arr, msg_ref);
+               case LDKSpendableOutputDescriptor_StaticOutputCounterpartyPayment: {
+                       LDKOutPoint outpoint_var = obj->static_output_counterparty_payment.outpoint;
+                       CHECK((((long)outpoint_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+                       CHECK((((long)&outpoint_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+                       long outpoint_ref = (long)outpoint_var.inner & ~1;
+                       long output_ref = ((long)&obj->static_output_counterparty_payment.output) | 1;
+                       long key_derivation_params_ref = (long)(&obj->static_output_counterparty_payment.key_derivation_params) | 1;
+                       return (*env)->NewObject(env, LDKSpendableOutputDescriptor_StaticOutputCounterpartyPayment_class, LDKSpendableOutputDescriptor_StaticOutputCounterpartyPayment_meth, outpoint_ref, (long)output_ref, key_derivation_params_ref);
                }
                default: abort();
        }
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1MessageSendEventZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
-       LDKCVec_MessageSendEventZ *ret = MALLOC(sizeof(LDKCVec_MessageSendEventZ), "LDKCVec_MessageSendEventZ");
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1SpendableOutputDescriptorZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
+       LDKCVec_SpendableOutputDescriptorZ *ret = MALLOC(sizeof(LDKCVec_SpendableOutputDescriptorZ), "LDKCVec_SpendableOutputDescriptorZ");
        ret->datalen = (*env)->GetArrayLength(env, elems);
        if (ret->datalen == 0) {
                ret->data = NULL;
        } else {
-               ret->data = MALLOC(sizeof(LDKMessageSendEvent) * ret->datalen, "LDKCVec_MessageSendEventZ Data");
+               ret->data = MALLOC(sizeof(LDKSpendableOutputDescriptor) * ret->datalen, "LDKCVec_SpendableOutputDescriptorZ Data");
                int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
                for (size_t i = 0; i < ret->datalen; i++) {
                        int64_t arr_elem = java_elems[i];
-                       LDKMessageSendEvent arr_elem_conv = *(LDKMessageSendEvent*)(((uint64_t)arr_elem) & ~1);
+                       LDKSpendableOutputDescriptor arr_elem_conv = *(LDKSpendableOutputDescriptor*)(((uint64_t)arr_elem) & ~1);
                        FREE((void*)arr_elem);
                        ret->data[i] = arr_elem_conv;
                }
@@ -881,10 +1712,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1MessageSendEventZ_
        }
        return (long)ret;
 }
-static inline LDKCVec_MessageSendEventZ CVec_MessageSendEventZ_clone(const LDKCVec_MessageSendEventZ *orig) {
-       LDKCVec_MessageSendEventZ ret = { .data = MALLOC(sizeof(LDKMessageSendEvent) * orig->datalen, "LDKCVec_MessageSendEventZ clone bytes"), .datalen = orig->datalen };
+static inline LDKCVec_SpendableOutputDescriptorZ CVec_SpendableOutputDescriptorZ_clone(const LDKCVec_SpendableOutputDescriptorZ *orig) {
+       LDKCVec_SpendableOutputDescriptorZ ret = { .data = MALLOC(sizeof(LDKSpendableOutputDescriptor) * orig->datalen, "LDKCVec_SpendableOutputDescriptorZ clone bytes"), .datalen = orig->datalen };
        for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = MessageSendEvent_clone(&orig->data[i]);
+               ret.data[i] = SpendableOutputDescriptor_clone(&orig->data[i]);
        }
        return ret;
 }
@@ -1016,86 +1847,26 @@ static inline LDKCVec_EventZ CVec_EventZ_clone(const LDKCVec_EventZ *orig) {
        }
        return ret;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1usizeTransactionZ_1new(JNIEnv *env, jclass clz, int64_t a, int8_tArray b) {
-       LDKC2Tuple_usizeTransactionZ* ret = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
-       ret->a = a;
-       LDKTransaction b_ref;
-       b_ref.datalen = (*env)->GetArrayLength(env, b);
-       b_ref.data = MALLOC(b_ref.datalen, "LDKTransaction Bytes");
-       (*env)->GetByteArrayRegion(env, b, 0, b_ref.datalen, b_ref.data);
-       b_ref.data_is_owned = false;
-       ret->b = b_ref;
-       return (long)ret;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1usizeTransactionZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_usizeTransactionZ *tuple = (LDKC2Tuple_usizeTransactionZ*)(ptr & ~1);
-       return tuple->a;
-}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1usizeTransactionZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_usizeTransactionZ *tuple = (LDKC2Tuple_usizeTransactionZ*)(ptr & ~1);
-       LDKTransaction b_var = tuple->b;
-       int8_tArray b_arr = (*env)->NewByteArray(env, b_var.datalen);
-       (*env)->SetByteArrayRegion(env, b_arr, 0, b_var.datalen, b_var.data);
-       return b_arr;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1usizeTransactionZZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
-       LDKCVec_C2Tuple_usizeTransactionZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_usizeTransactionZZ), "LDKCVec_C2Tuple_usizeTransactionZZ");
-       ret->datalen = (*env)->GetArrayLength(env, elems);
-       if (ret->datalen == 0) {
-               ret->data = NULL;
-       } else {
-               ret->data = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ) * ret->datalen, "LDKCVec_C2Tuple_usizeTransactionZZ Data");
-               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
-               for (size_t i = 0; i < ret->datalen; i++) {
-                       int64_t arr_elem = java_elems[i];
-                       LDKC2Tuple_usizeTransactionZ arr_elem_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)arr_elem) & ~1);
-                       FREE((void*)arr_elem);
-                       ret->data[i] = arr_elem_conv;
-               }
-               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
-       }
-       return (long)ret;
-}
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneChannelMonitorUpdateErrZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_NoneChannelMonitorUpdateErrZ*)arg)->result_ok;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1OutPointDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_OutPointDecodeErrorZ*)arg)->result_ok;
 }
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneChannelMonitorUpdateErrZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_NoneChannelMonitorUpdateErrZ *val = (LDKCResult_NoneChannelMonitorUpdateErrZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1OutPointDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_OutPointDecodeErrorZ *val = (LDKCResult_OutPointDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       return *val->contents.result;
+       LDKOutPoint res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneChannelMonitorUpdateErrZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_NoneChannelMonitorUpdateErrZ *val = (LDKCResult_NoneChannelMonitorUpdateErrZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1OutPointDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_OutPointDecodeErrorZ *val = (LDKCResult_OutPointDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
-       jclass err_conv = LDKChannelMonitorUpdateErr_to_java(env, (*val->contents.err));
-       return err_conv;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1MonitorEventZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
-       LDKCVec_MonitorEventZ *ret = MALLOC(sizeof(LDKCVec_MonitorEventZ), "LDKCVec_MonitorEventZ");
-       ret->datalen = (*env)->GetArrayLength(env, elems);
-       if (ret->datalen == 0) {
-               ret->data = NULL;
-       } else {
-               ret->data = MALLOC(sizeof(LDKMonitorEvent) * ret->datalen, "LDKCVec_MonitorEventZ Data");
-               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
-               for (size_t i = 0; i < ret->datalen; i++) {
-                       int64_t arr_elem = java_elems[i];
-                       LDKMonitorEvent arr_elem_conv;
-                       arr_elem_conv.inner = (void*)(arr_elem & (~1));
-                       arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
-                       arr_elem_conv = MonitorEvent_clone(&arr_elem_conv);
-                       ret->data[i] = arr_elem_conv;
-               }
-               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
-       }
-       return (long)ret;
-}
-static inline LDKCVec_MonitorEventZ CVec_MonitorEventZ_clone(const LDKCVec_MonitorEventZ *orig) {
-       LDKCVec_MonitorEventZ ret = { .data = MALLOC(sizeof(LDKMonitorEvent) * orig->datalen, "LDKCVec_MonitorEventZ clone bytes"), .datalen = orig->datalen };
-       for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = MonitorEvent_clone(&orig->data[i]);
-       }
-       return ret;
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelMonitorUpdateDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
        return ((LDKCResult_ChannelMonitorUpdateDecodeErrorZ*)arg)->result_ok;
@@ -1118,6 +1889,27 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelMonitorU
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1HTLCUpdateDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_HTLCUpdateDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1HTLCUpdateDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_HTLCUpdateDecodeErrorZ *val = (LDKCResult_HTLCUpdateDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKHTLCUpdate res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1HTLCUpdateDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_HTLCUpdateDecodeErrorZ *val = (LDKCResult_HTLCUpdateDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneMonitorUpdateErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
        return ((LDKCResult_NoneMonitorUpdateErrorZ*)arg)->result_ok;
 }
@@ -1759,87 +2551,29 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChanne
 }
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelMonitorZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
        LDKC2Tuple_BlockHashChannelMonitorZ *tuple = (LDKC2Tuple_BlockHashChannelMonitorZ*)(ptr & ~1);
-       int8_tArray a_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, a_arr, 0, 32, tuple->a.data);
-       return a_arr;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelMonitorZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_BlockHashChannelMonitorZ *tuple = (LDKC2Tuple_BlockHashChannelMonitorZ*)(ptr & ~1);
-       LDKChannelMonitor b_var = tuple->b;
-       CHECK((((long)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long b_ref = (long)b_var.inner & ~1;
-       return b_ref;
-}
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)arg)->result_ok;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       long res_ref = (long)(&(*val->contents.result)) | 1;
-       return res_ref;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
-}
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SpendableOutputDescriptorDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_SpendableOutputDescriptorDecodeErrorZ*)arg)->result_ok;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SpendableOutputDescriptorDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_SpendableOutputDescriptorDecodeErrorZ *val = (LDKCResult_SpendableOutputDescriptorDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       long res_ref = ((long)&(*val->contents.result)) | 1;
-       return res_ref;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SpendableOutputDescriptorDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_SpendableOutputDescriptorDecodeErrorZ *val = (LDKCResult_SpendableOutputDescriptorDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
-}
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChanKeySignerDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_ChanKeySignerDecodeErrorZ*)arg)->result_ok;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChanKeySignerDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_ChanKeySignerDecodeErrorZ *val = (LDKCResult_ChanKeySignerDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKChannelKeys* ret = MALLOC(sizeof(LDKChannelKeys), "LDKChannelKeys");
-       *ret = ChannelKeys_clone(&(*val->contents.result));
-       return (long)ret;
+       int8_tArray a_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, a_arr, 0, 32, tuple->a.data);
+       return a_arr;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChanKeySignerDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_ChanKeySignerDecodeErrorZ *val = (LDKCResult_ChanKeySignerDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelMonitorZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKC2Tuple_BlockHashChannelMonitorZ *tuple = (LDKC2Tuple_BlockHashChannelMonitorZ*)(ptr & ~1);
+       LDKChannelMonitor b_var = tuple->b;
+       CHECK((((long)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long b_ref = (long)b_var.inner & ~1;
+       return b_ref;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InMemoryChannelKeysDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_InMemoryChannelKeysDecodeErrorZ*)arg)->result_ok;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)arg)->result_ok;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InMemoryChannelKeysDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_InMemoryChannelKeysDecodeErrorZ *val = (LDKCResult_InMemoryChannelKeysDecodeErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       LDKInMemoryChannelKeys res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
+       long res_ref = (long)(&(*val->contents.result)) | 1;
        return res_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InMemoryChannelKeysDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_InMemoryChannelKeysDecodeErrorZ *val = (LDKCResult_InMemoryChannelKeysDecodeErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
        LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -1989,87 +2723,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NonePaymentSend
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-static jclass LDKNetAddress_IPv4_class = NULL;
-static jmethodID LDKNetAddress_IPv4_meth = NULL;
-static jclass LDKNetAddress_IPv6_class = NULL;
-static jmethodID LDKNetAddress_IPv6_meth = NULL;
-static jclass LDKNetAddress_OnionV2_class = NULL;
-static jmethodID LDKNetAddress_OnionV2_meth = NULL;
-static jclass LDKNetAddress_OnionV3_class = NULL;
-static jmethodID LDKNetAddress_OnionV3_meth = NULL;
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKNetAddress_init (JNIEnv *env, jclass clz) {
-       LDKNetAddress_IPv4_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKNetAddress$IPv4;"));
-       CHECK(LDKNetAddress_IPv4_class != NULL);
-       LDKNetAddress_IPv4_meth = (*env)->GetMethodID(env, LDKNetAddress_IPv4_class, "<init>", "([BS)V");
-       CHECK(LDKNetAddress_IPv4_meth != NULL);
-       LDKNetAddress_IPv6_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKNetAddress$IPv6;"));
-       CHECK(LDKNetAddress_IPv6_class != NULL);
-       LDKNetAddress_IPv6_meth = (*env)->GetMethodID(env, LDKNetAddress_IPv6_class, "<init>", "([BS)V");
-       CHECK(LDKNetAddress_IPv6_meth != NULL);
-       LDKNetAddress_OnionV2_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKNetAddress$OnionV2;"));
-       CHECK(LDKNetAddress_OnionV2_class != NULL);
-       LDKNetAddress_OnionV2_meth = (*env)->GetMethodID(env, LDKNetAddress_OnionV2_class, "<init>", "([BS)V");
-       CHECK(LDKNetAddress_OnionV2_meth != NULL);
-       LDKNetAddress_OnionV3_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKNetAddress$OnionV3;"));
-       CHECK(LDKNetAddress_OnionV3_class != NULL);
-       LDKNetAddress_OnionV3_meth = (*env)->GetMethodID(env, LDKNetAddress_OnionV3_class, "<init>", "([BSBS)V");
-       CHECK(LDKNetAddress_OnionV3_meth != NULL);
-}
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKNetAddress_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKNetAddress *obj = (LDKNetAddress*)ptr;
-       switch(obj->tag) {
-               case LDKNetAddress_IPv4: {
-                       int8_tArray addr_arr = (*env)->NewByteArray(env, 4);
-                       (*env)->SetByteArrayRegion(env, addr_arr, 0, 4, obj->i_pv4.addr.data);
-                       return (*env)->NewObject(env, LDKNetAddress_IPv4_class, LDKNetAddress_IPv4_meth, addr_arr, obj->i_pv4.port);
-               }
-               case LDKNetAddress_IPv6: {
-                       int8_tArray addr_arr = (*env)->NewByteArray(env, 16);
-                       (*env)->SetByteArrayRegion(env, addr_arr, 0, 16, obj->i_pv6.addr.data);
-                       return (*env)->NewObject(env, LDKNetAddress_IPv6_class, LDKNetAddress_IPv6_meth, addr_arr, obj->i_pv6.port);
-               }
-               case LDKNetAddress_OnionV2: {
-                       int8_tArray addr_arr = (*env)->NewByteArray(env, 10);
-                       (*env)->SetByteArrayRegion(env, addr_arr, 0, 10, obj->onion_v2.addr.data);
-                       return (*env)->NewObject(env, LDKNetAddress_OnionV2_class, LDKNetAddress_OnionV2_meth, addr_arr, obj->onion_v2.port);
-               }
-               case LDKNetAddress_OnionV3: {
-                       int8_tArray ed25519_pubkey_arr = (*env)->NewByteArray(env, 32);
-                       (*env)->SetByteArrayRegion(env, ed25519_pubkey_arr, 0, 32, obj->onion_v3.ed25519_pubkey.data);
-                       return (*env)->NewObject(env, LDKNetAddress_OnionV3_class, LDKNetAddress_OnionV3_meth, ed25519_pubkey_arr, obj->onion_v3.checksum, obj->onion_v3.version, obj->onion_v3.port);
-               }
-               default: abort();
-       }
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1NetAddressZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
-       LDKCVec_NetAddressZ *ret = MALLOC(sizeof(LDKCVec_NetAddressZ), "LDKCVec_NetAddressZ");
-       ret->datalen = (*env)->GetArrayLength(env, elems);
-       if (ret->datalen == 0) {
-               ret->data = NULL;
-       } else {
-               ret->data = MALLOC(sizeof(LDKNetAddress) * ret->datalen, "LDKCVec_NetAddressZ Data");
-               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
-               for (size_t i = 0; i < ret->datalen; i++) {
-                       int64_t arr_elem = java_elems[i];
-                       LDKNetAddress arr_elem_conv = *(LDKNetAddress*)(((uint64_t)arr_elem) & ~1);
-                       FREE((void*)arr_elem);
-                       ret->data[i] = arr_elem_conv;
-               }
-               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
-       }
-       return (long)ret;
-}
-static inline LDKCVec_NetAddressZ CVec_NetAddressZ_clone(const LDKCVec_NetAddressZ *orig) {
-       LDKCVec_NetAddressZ ret = { .data = MALLOC(sizeof(LDKNetAddress) * orig->datalen, "LDKCVec_NetAddressZ clone bytes"), .datalen = orig->datalen };
-       for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = NetAddress_clone(&orig->data[i]);
-       }
-       return ret;
-}
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1ChannelMonitorZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
        LDKCVec_ChannelMonitorZ *ret = MALLOC(sizeof(LDKCVec_ChannelMonitorZ), "LDKCVec_ChannelMonitorZ");
        ret->datalen = (*env)->GetArrayLength(env, elems);
@@ -2336,6 +2989,25 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BroadcasterInterface_1broadcas
        (this_arg_conv->broadcast_transaction)(this_arg_conv->this_arg, tx_ref);
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelKeysDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_ChannelKeysDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelKeysDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ChannelKeysDecodeErrorZ *val = (LDKCResult_ChannelKeysDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKChannelKeys* ret = MALLOC(sizeof(LDKChannelKeys), "LDKChannelKeys");
+       *ret = ChannelKeys_clone(&(*val->contents.result));
+       return (long)ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelKeysDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ChannelKeysDecodeErrorZ *val = (LDKCResult_ChannelKeysDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
 typedef struct LDKKeysInterface_JCalls {
        atomic_size_t refcnt;
        JavaVM *vm;
@@ -2416,7 +3088,7 @@ LDKThirtyTwoBytes get_secure_random_bytes_jcall(const void* this_arg) {
        (*env)->GetByteArrayRegion(env, arg, 0, 32, arg_ref.data);
        return arg_ref;
 }
-LDKCResult_ChanKeySignerDecodeErrorZ read_chan_signer_jcall(const void* this_arg, LDKu8slice reader) {
+LDKCResult_ChannelKeysDecodeErrorZ read_chan_signer_jcall(const void* this_arg, LDKu8slice reader) {
        LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
        JNIEnv *env;
        DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
@@ -2425,9 +3097,9 @@ LDKCResult_ChanKeySignerDecodeErrorZ read_chan_signer_jcall(const void* this_arg
        (*env)->SetByteArrayRegion(env, reader_arr, 0, reader_var.datalen, reader_var.data);
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       LDKCResult_ChanKeySignerDecodeErrorZ* ret = (LDKCResult_ChanKeySignerDecodeErrorZ*)(*env)->CallLongMethod(env, obj, j_calls->read_chan_signer_meth, reader_arr);
-       LDKCResult_ChanKeySignerDecodeErrorZ ret_conv = *(LDKCResult_ChanKeySignerDecodeErrorZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_ChanKeySignerDecodeErrorZ_clone((LDKCResult_ChanKeySignerDecodeErrorZ*)ret);
+       LDKCResult_ChannelKeysDecodeErrorZ* ret = (LDKCResult_ChannelKeysDecodeErrorZ*)(*env)->CallLongMethod(env, obj, j_calls->read_chan_signer_meth, reader_arr);
+       LDKCResult_ChannelKeysDecodeErrorZ ret_conv = *(LDKCResult_ChannelKeysDecodeErrorZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_ChannelKeysDecodeErrorZ_clone((LDKCResult_ChannelKeysDecodeErrorZ*)ret);
        return ret_conv;
 }
 static void* LDKKeysInterface_JCalls_clone(const void* this_arg) {
@@ -2514,7 +3186,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysInterface_1read_1chan_1
        LDKu8slice reader_ref;
        reader_ref.datalen = (*env)->GetArrayLength(env, reader);
        reader_ref.data = (*env)->GetByteArrayElements (env, reader, NULL);
-       LDKCResult_ChanKeySignerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChanKeySignerDecodeErrorZ), "LDKCResult_ChanKeySignerDecodeErrorZ");
+       LDKCResult_ChannelKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelKeysDecodeErrorZ), "LDKCResult_ChannelKeysDecodeErrorZ");
        *ret_conv = (this_arg_conv->read_chan_signer)(this_arg_conv->this_arg, reader_ref);
        (*env)->ReleaseByteArrayElements(env, reader, (int8_t*)reader_ref.data, 0);
        return (long)ret_conv;
@@ -2625,51 +3297,193 @@ static inline LDKLogger LDKLogger_init (JNIEnv *env, jclass clz, jobject o) {
        };
        return ret;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKLogger_1new(JNIEnv *env, jclass clz, jobject o) {
-       LDKLogger *res_ptr = MALLOC(sizeof(LDKLogger), "LDKLogger");
-       *res_ptr = LDKLogger_init(env, clz, o);
-       return (long)res_ptr;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKLogger_1new(JNIEnv *env, jclass clz, jobject o) {
+       LDKLogger *res_ptr = MALLOC(sizeof(LDKLogger), "LDKLogger");
+       *res_ptr = LDKLogger_init(env, clz, o);
+       return (long)res_ptr;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelManagerZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int64_t b) {
+       LDKC2Tuple_BlockHashChannelManagerZ* ret = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelManagerZ), "LDKC2Tuple_BlockHashChannelManagerZ");
+       LDKThirtyTwoBytes a_ref;
+       CHECK((*env)->GetArrayLength(env, a) == 32);
+       (*env)->GetByteArrayRegion(env, a, 0, 32, a_ref.data);
+       ret->a = a_ref;
+       LDKChannelManager b_conv;
+       b_conv.inner = (void*)(b & (~1));
+       b_conv.is_owned = (b & 1) || (b == 0);
+       // Warning: we need a move here but no clone is available for LDKChannelManager
+       ret->b = b_conv;
+       return (long)ret;
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelManagerZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKC2Tuple_BlockHashChannelManagerZ *tuple = (LDKC2Tuple_BlockHashChannelManagerZ*)(ptr & ~1);
+       int8_tArray a_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, a_arr, 0, 32, tuple->a.data);
+       return a_arr;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelManagerZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKC2Tuple_BlockHashChannelManagerZ *tuple = (LDKC2Tuple_BlockHashChannelManagerZ*)(ptr & ~1);
+       LDKChannelManager b_var = tuple->b;
+       CHECK((((long)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long b_ref = (long)b_var.inner & ~1;
+       return b_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       long res_ref = (long)(&(*val->contents.result)) | 1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SpendableOutputDescriptorDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_SpendableOutputDescriptorDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SpendableOutputDescriptorDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_SpendableOutputDescriptorDecodeErrorZ *val = (LDKCResult_SpendableOutputDescriptorDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       long res_ref = ((long)&(*val->contents.result)) | 1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SpendableOutputDescriptorDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_SpendableOutputDescriptorDecodeErrorZ *val = (LDKCResult_SpendableOutputDescriptorDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InMemoryChannelKeysDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_InMemoryChannelKeysDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InMemoryChannelKeysDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_InMemoryChannelKeysDecodeErrorZ *val = (LDKCResult_InMemoryChannelKeysDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKInMemoryChannelKeys res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InMemoryChannelKeysDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_InMemoryChannelKeysDecodeErrorZ *val = (LDKCResult_InMemoryChannelKeysDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1RouteHopZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
+       LDKCVec_RouteHopZ *ret = MALLOC(sizeof(LDKCVec_RouteHopZ), "LDKCVec_RouteHopZ");
+       ret->datalen = (*env)->GetArrayLength(env, elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(LDKRouteHop) * ret->datalen, "LDKCVec_RouteHopZ Data");
+               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       int64_t arr_elem = java_elems[i];
+                       LDKRouteHop arr_elem_conv;
+                       arr_elem_conv.inner = (void*)(arr_elem & (~1));
+                       arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
+                       arr_elem_conv = RouteHop_clone(&arr_elem_conv);
+                       ret->data[i] = arr_elem_conv;
+               }
+               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
+       }
+       return (long)ret;
+}
+static inline LDKCVec_RouteHopZ CVec_RouteHopZ_clone(const LDKCVec_RouteHopZ *orig) {
+       LDKCVec_RouteHopZ ret = { .data = MALLOC(sizeof(LDKRouteHop) * orig->datalen, "LDKCVec_RouteHopZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = RouteHop_clone(&orig->data[i]);
+       }
+       return ret;
+}
+static inline LDKCVec_CVec_RouteHopZZ CVec_CVec_RouteHopZZ_clone(const LDKCVec_CVec_RouteHopZZ *orig) {
+       LDKCVec_CVec_RouteHopZZ ret = { .data = MALLOC(sizeof(LDKCVec_RouteHopZ) * orig->datalen, "LDKCVec_CVec_RouteHopZZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = CVec_RouteHopZ_clone(&orig->data[i]);
+       }
+       return ret;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RouteDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_RouteDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RouteDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_RouteDecodeErrorZ *val = (LDKCResult_RouteDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKRoute res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RouteDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_RouteDecodeErrorZ *val = (LDKCResult_RouteDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelManagerZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int64_t b) {
-       LDKC2Tuple_BlockHashChannelManagerZ* ret = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelManagerZ), "LDKC2Tuple_BlockHashChannelManagerZ");
-       LDKThirtyTwoBytes a_ref;
-       CHECK((*env)->GetArrayLength(env, a) == 32);
-       (*env)->GetByteArrayRegion(env, a, 0, 32, a_ref.data);
-       ret->a = a_ref;
-       LDKChannelManager b_conv;
-       b_conv.inner = (void*)(b & (~1));
-       b_conv.is_owned = (b & 1) || (b == 0);
-       // Warning: we need a move here but no clone is available for LDKChannelManager
-       ret->b = b_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1RouteHintZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
+       LDKCVec_RouteHintZ *ret = MALLOC(sizeof(LDKCVec_RouteHintZ), "LDKCVec_RouteHintZ");
+       ret->datalen = (*env)->GetArrayLength(env, elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(LDKRouteHint) * ret->datalen, "LDKCVec_RouteHintZ Data");
+               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       int64_t arr_elem = java_elems[i];
+                       LDKRouteHint arr_elem_conv;
+                       arr_elem_conv.inner = (void*)(arr_elem & (~1));
+                       arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
+                       arr_elem_conv = RouteHint_clone(&arr_elem_conv);
+                       ret->data[i] = arr_elem_conv;
+               }
+               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
+       }
        return (long)ret;
 }
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelManagerZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_BlockHashChannelManagerZ *tuple = (LDKC2Tuple_BlockHashChannelManagerZ*)(ptr & ~1);
-       int8_tArray a_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, a_arr, 0, 32, tuple->a.data);
-       return a_arr;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelManagerZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_BlockHashChannelManagerZ *tuple = (LDKC2Tuple_BlockHashChannelManagerZ*)(ptr & ~1);
-       LDKChannelManager b_var = tuple->b;
-       CHECK((((long)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long b_ref = (long)b_var.inner & ~1;
-       return b_ref;
+static inline LDKCVec_RouteHintZ CVec_RouteHintZ_clone(const LDKCVec_RouteHintZ *orig) {
+       LDKCVec_RouteHintZ ret = { .data = MALLOC(sizeof(LDKRouteHint) * orig->datalen, "LDKCVec_RouteHintZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = RouteHint_clone(&orig->data[i]);
+       }
+       return ret;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)arg)->result_ok;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RouteLightningErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_RouteLightningErrorZ*)arg)->result_ok;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RouteLightningErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_RouteLightningErrorZ *val = (LDKCResult_RouteLightningErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       long res_ref = (long)(&(*val->contents.result)) | 1;
+       LDKRoute res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
        return res_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RouteLightningErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_RouteLightningErrorZ *val = (LDKCResult_RouteLightningErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
+       LDKLightningError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long err_ref = (long)err_var.inner & ~1;
@@ -2709,26 +3523,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CResult_1NetAdd
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1u64Z_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
-       LDKCVec_u64Z *ret = MALLOC(sizeof(LDKCVec_u64Z), "LDKCVec_u64Z");
-       ret->datalen = (*env)->GetArrayLength(env, elems);
-       if (ret->datalen == 0) {
-               ret->data = NULL;
-       } else {
-               ret->data = MALLOC(sizeof(uint64_t) * ret->datalen, "LDKCVec_u64Z Data");
-               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
-               for (size_t i = 0; i < ret->datalen; i++) {
-                       ret->data[i] = java_elems[i];
-               }
-               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
-       }
-       return (long)ret;
-}
-static inline LDKCVec_u64Z CVec_u64Z_clone(const LDKCVec_u64Z *orig) {
-       LDKCVec_u64Z ret = { .data = MALLOC(sizeof(int64_t) * orig->datalen, "LDKCVec_u64Z clone bytes"), .datalen = orig->datalen };
-       memcpy(ret.data, orig->data, sizeof(int64_t) * ret.datalen);
-       return ret;
-}
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1UpdateAddHTLCZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
        LDKCVec_UpdateAddHTLCZ *ret = MALLOC(sizeof(LDKCVec_UpdateAddHTLCZ), "LDKCVec_UpdateAddHTLCZ");
        ret->datalen = (*env)->GetArrayLength(env, elems);
@@ -2837,142 +3631,167 @@ static inline LDKCVec_UpdateFailMalformedHTLCZ CVec_UpdateFailMalformedHTLCZ_clo
        }
        return ret;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolLightningErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_boolLightningErrorZ*)arg)->result_ok;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1AcceptChannelDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_AcceptChannelDecodeErrorZ*)arg)->result_ok;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolLightningErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_boolLightningErrorZ *val = (LDKCResult_boolLightningErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1AcceptChannelDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_AcceptChannelDecodeErrorZ *val = (LDKCResult_AcceptChannelDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       return *val->contents.result;
+       LDKAcceptChannel res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolLightningErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_boolLightningErrorZ *val = (LDKCResult_boolLightningErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1AcceptChannelDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_AcceptChannelDecodeErrorZ *val = (LDKCResult_AcceptChannelDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
-       LDKLightningError err_var = (*val->contents.err);
+       LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1new(JNIEnv *env, jclass clz, int64_t a, int64_t b, int64_t c) {
-       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
-       LDKChannelAnnouncement a_conv;
-       a_conv.inner = (void*)(a & (~1));
-       a_conv.is_owned = (a & 1) || (a == 0);
-       a_conv = ChannelAnnouncement_clone(&a_conv);
-       ret->a = a_conv;
-       LDKChannelUpdate b_conv;
-       b_conv.inner = (void*)(b & (~1));
-       b_conv.is_owned = (b & 1) || (b == 0);
-       b_conv = ChannelUpdate_clone(&b_conv);
-       ret->b = b_conv;
-       LDKChannelUpdate c_conv;
-       c_conv.inner = (void*)(c & (~1));
-       c_conv.is_owned = (c & 1) || (c == 0);
-       c_conv = ChannelUpdate_clone(&c_conv);
-       ret->c = c_conv;
-       return (long)ret;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1AnnouncementSignaturesDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_AnnouncementSignaturesDecodeErrorZ*)arg)->result_ok;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *tuple = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(ptr & ~1);
-       LDKChannelAnnouncement a_var = tuple->a;
-       CHECK((((long)a_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&a_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long a_ref = (long)a_var.inner & ~1;
-       return a_ref;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1AnnouncementSignaturesDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_AnnouncementSignaturesDecodeErrorZ *val = (LDKCResult_AnnouncementSignaturesDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKAnnouncementSignatures res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *tuple = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(ptr & ~1);
-       LDKChannelUpdate b_var = tuple->b;
-       CHECK((((long)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long b_ref = (long)b_var.inner & ~1;
-       return b_ref;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1AnnouncementSignaturesDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_AnnouncementSignaturesDecodeErrorZ *val = (LDKCResult_AnnouncementSignaturesDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1c(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *tuple = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(ptr & ~1);
-       LDKChannelUpdate c_var = tuple->c;
-       CHECK((((long)c_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&c_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long c_ref = (long)c_var.inner & ~1;
-       return c_ref;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelReestablishDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_ChannelReestablishDecodeErrorZ*)arg)->result_ok;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
-       LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ *ret = MALLOC(sizeof(LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ), "LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ");
-       ret->datalen = (*env)->GetArrayLength(env, elems);
-       if (ret->datalen == 0) {
-               ret->data = NULL;
-       } else {
-               ret->data = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ) * ret->datalen, "LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ Data");
-               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
-               for (size_t i = 0; i < ret->datalen; i++) {
-                       int64_t arr_elem = java_elems[i];
-                       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ arr_elem_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)arr_elem) & ~1);
-                       FREE((void*)arr_elem);
-                       ret->data[i] = arr_elem_conv;
-               }
-               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
-       }
-       return (long)ret;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelReestablishDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ChannelReestablishDecodeErrorZ *val = (LDKCResult_ChannelReestablishDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKChannelReestablish res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1NodeAnnouncementZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
-       LDKCVec_NodeAnnouncementZ *ret = MALLOC(sizeof(LDKCVec_NodeAnnouncementZ), "LDKCVec_NodeAnnouncementZ");
-       ret->datalen = (*env)->GetArrayLength(env, elems);
-       if (ret->datalen == 0) {
-               ret->data = NULL;
-       } else {
-               ret->data = MALLOC(sizeof(LDKNodeAnnouncement) * ret->datalen, "LDKCVec_NodeAnnouncementZ Data");
-               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
-               for (size_t i = 0; i < ret->datalen; i++) {
-                       int64_t arr_elem = java_elems[i];
-                       LDKNodeAnnouncement arr_elem_conv;
-                       arr_elem_conv.inner = (void*)(arr_elem & (~1));
-                       arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
-                       arr_elem_conv = NodeAnnouncement_clone(&arr_elem_conv);
-                       ret->data[i] = arr_elem_conv;
-               }
-               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
-       }
-       return (long)ret;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelReestablishDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ChannelReestablishDecodeErrorZ *val = (LDKCResult_ChannelReestablishDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ClosingSignedDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_ClosingSignedDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ClosingSignedDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ClosingSignedDecodeErrorZ *val = (LDKCResult_ClosingSignedDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKClosingSigned res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ClosingSignedDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ClosingSignedDecodeErrorZ *val = (LDKCResult_ClosingSignedDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CommitmentSignedDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_CommitmentSignedDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CommitmentSignedDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_CommitmentSignedDecodeErrorZ *val = (LDKCResult_CommitmentSignedDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKCommitmentSigned res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CommitmentSignedDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_CommitmentSignedDecodeErrorZ *val = (LDKCResult_CommitmentSignedDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1FundingCreatedDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_FundingCreatedDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1FundingCreatedDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_FundingCreatedDecodeErrorZ *val = (LDKCResult_FundingCreatedDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKFundingCreated res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-static inline LDKCVec_NodeAnnouncementZ CVec_NodeAnnouncementZ_clone(const LDKCVec_NodeAnnouncementZ *orig) {
-       LDKCVec_NodeAnnouncementZ ret = { .data = MALLOC(sizeof(LDKNodeAnnouncement) * orig->datalen, "LDKCVec_NodeAnnouncementZ clone bytes"), .datalen = orig->datalen };
-       for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = NodeAnnouncement_clone(&orig->data[i]);
-       }
-       return ret;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1FundingCreatedDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_FundingCreatedDecodeErrorZ *val = (LDKCResult_FundingCreatedDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneLightningErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_NoneLightningErrorZ*)arg)->result_ok;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1FundingSignedDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_FundingSignedDecodeErrorZ*)arg)->result_ok;
 }
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneLightningErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_NoneLightningErrorZ *val = (LDKCResult_NoneLightningErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1FundingSignedDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_FundingSignedDecodeErrorZ *val = (LDKCResult_FundingSignedDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       return *val->contents.result;
+       LDKFundingSigned res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneLightningErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_NoneLightningErrorZ *val = (LDKCResult_NoneLightningErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1FundingSignedDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_FundingSignedDecodeErrorZ *val = (LDKCResult_FundingSignedDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
-       LDKLightningError err_var = (*val->contents.err);
+       LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelReestablishDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_ChannelReestablishDecodeErrorZ*)arg)->result_ok;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1FundingLockedDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_FundingLockedDecodeErrorZ*)arg)->result_ok;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelReestablishDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_ChannelReestablishDecodeErrorZ *val = (LDKCResult_ChannelReestablishDecodeErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1FundingLockedDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_FundingLockedDecodeErrorZ *val = (LDKCResult_FundingLockedDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       LDKChannelReestablish res_var = (*val->contents.result);
+       LDKFundingLocked res_var = (*val->contents.result);
        CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long res_ref = (long)res_var.inner & ~1;
        return res_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelReestablishDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_ChannelReestablishDecodeErrorZ *val = (LDKCResult_ChannelReestablishDecodeErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1FundingLockedDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_FundingLockedDecodeErrorZ *val = (LDKCResult_FundingLockedDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
        LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -3001,20 +3820,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InitDecodeError
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PingDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_PingDecodeErrorZ*)arg)->result_ok;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1OpenChannelDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_OpenChannelDecodeErrorZ*)arg)->result_ok;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PingDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_PingDecodeErrorZ *val = (LDKCResult_PingDecodeErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1OpenChannelDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_OpenChannelDecodeErrorZ *val = (LDKCResult_OpenChannelDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       LDKPing res_var = (*val->contents.result);
+       LDKOpenChannel res_var = (*val->contents.result);
        CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long res_ref = (long)res_var.inner & ~1;
        return res_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PingDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_PingDecodeErrorZ *val = (LDKCResult_PingDecodeErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1OpenChannelDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_OpenChannelDecodeErrorZ *val = (LDKCResult_OpenChannelDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
        LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -3022,20 +3841,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PingDecodeError
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PongDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_PongDecodeErrorZ*)arg)->result_ok;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RevokeAndACKDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_RevokeAndACKDecodeErrorZ*)arg)->result_ok;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PongDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_PongDecodeErrorZ *val = (LDKCResult_PongDecodeErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RevokeAndACKDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_RevokeAndACKDecodeErrorZ *val = (LDKCResult_RevokeAndACKDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       LDKPong res_var = (*val->contents.result);
+       LDKRevokeAndACK res_var = (*val->contents.result);
        CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long res_ref = (long)res_var.inner & ~1;
        return res_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PongDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_PongDecodeErrorZ *val = (LDKCResult_PongDecodeErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RevokeAndACKDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_RevokeAndACKDecodeErrorZ *val = (LDKCResult_RevokeAndACKDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
        LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -3043,20 +3862,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PongDecodeError
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelAnnouncementDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ*)arg)->result_ok;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ShutdownDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_ShutdownDecodeErrorZ*)arg)->result_ok;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelAnnouncementDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *val = (LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ShutdownDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ShutdownDecodeErrorZ *val = (LDKCResult_ShutdownDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       LDKUnsignedChannelAnnouncement res_var = (*val->contents.result);
+       LDKShutdown res_var = (*val->contents.result);
        CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long res_ref = (long)res_var.inner & ~1;
        return res_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelAnnouncementDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *val = (LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ShutdownDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ShutdownDecodeErrorZ *val = (LDKCResult_ShutdownDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
        LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -3064,20 +3883,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannel
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelUpdateDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_UnsignedChannelUpdateDecodeErrorZ*)arg)->result_ok;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFailHTLCDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_UpdateFailHTLCDecodeErrorZ*)arg)->result_ok;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelUpdateDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_UnsignedChannelUpdateDecodeErrorZ *val = (LDKCResult_UnsignedChannelUpdateDecodeErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFailHTLCDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_UpdateFailHTLCDecodeErrorZ *val = (LDKCResult_UpdateFailHTLCDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       LDKUnsignedChannelUpdate res_var = (*val->contents.result);
+       LDKUpdateFailHTLC res_var = (*val->contents.result);
        CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long res_ref = (long)res_var.inner & ~1;
        return res_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelUpdateDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_UnsignedChannelUpdateDecodeErrorZ *val = (LDKCResult_UnsignedChannelUpdateDecodeErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFailHTLCDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_UpdateFailHTLCDecodeErrorZ *val = (LDKCResult_UpdateFailHTLCDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
        LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -3085,20 +3904,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannel
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ErrorMessageDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_ErrorMessageDecodeErrorZ*)arg)->result_ok;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFailMalformedHTLCDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ*)arg)->result_ok;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ErrorMessageDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_ErrorMessageDecodeErrorZ *val = (LDKCResult_ErrorMessageDecodeErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFailMalformedHTLCDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *val = (LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       LDKErrorMessage res_var = (*val->contents.result);
+       LDKUpdateFailMalformedHTLC res_var = (*val->contents.result);
        CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long res_ref = (long)res_var.inner & ~1;
        return res_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ErrorMessageDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_ErrorMessageDecodeErrorZ *val = (LDKCResult_ErrorMessageDecodeErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFailMalformedHTLCDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *val = (LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
        LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -3106,20 +3925,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ErrorMessageDec
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedNodeAnnouncementDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ*)arg)->result_ok;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFeeDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_UpdateFeeDecodeErrorZ*)arg)->result_ok;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedNodeAnnouncementDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *val = (LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFeeDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_UpdateFeeDecodeErrorZ *val = (LDKCResult_UpdateFeeDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       LDKUnsignedNodeAnnouncement res_var = (*val->contents.result);
+       LDKUpdateFee res_var = (*val->contents.result);
        CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long res_ref = (long)res_var.inner & ~1;
        return res_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedNodeAnnouncementDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *val = (LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFeeDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_UpdateFeeDecodeErrorZ *val = (LDKCResult_UpdateFeeDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
        LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -3127,20 +3946,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedNodeAnn
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryShortChannelIdsDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_QueryShortChannelIdsDecodeErrorZ*)arg)->result_ok;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFulfillHTLCDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_UpdateFulfillHTLCDecodeErrorZ*)arg)->result_ok;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryShortChannelIdsDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_QueryShortChannelIdsDecodeErrorZ *val = (LDKCResult_QueryShortChannelIdsDecodeErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFulfillHTLCDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_UpdateFulfillHTLCDecodeErrorZ *val = (LDKCResult_UpdateFulfillHTLCDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       LDKQueryShortChannelIds res_var = (*val->contents.result);
+       LDKUpdateFulfillHTLC res_var = (*val->contents.result);
        CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long res_ref = (long)res_var.inner & ~1;
        return res_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryShortChannelIdsDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_QueryShortChannelIdsDecodeErrorZ *val = (LDKCResult_QueryShortChannelIdsDecodeErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFulfillHTLCDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_UpdateFulfillHTLCDecodeErrorZ *val = (LDKCResult_UpdateFulfillHTLCDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
        LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -3148,20 +3967,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryShortChann
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyShortChannelIdsEndDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ*)arg)->result_ok;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateAddHTLCDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_UpdateAddHTLCDecodeErrorZ*)arg)->result_ok;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyShortChannelIdsEndDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *val = (LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateAddHTLCDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_UpdateAddHTLCDecodeErrorZ *val = (LDKCResult_UpdateAddHTLCDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       LDKReplyShortChannelIdsEnd res_var = (*val->contents.result);
+       LDKUpdateAddHTLC res_var = (*val->contents.result);
        CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long res_ref = (long)res_var.inner & ~1;
        return res_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyShortChannelIdsEndDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *val = (LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateAddHTLCDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_UpdateAddHTLCDecodeErrorZ *val = (LDKCResult_UpdateAddHTLCDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
        LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -3169,20 +3988,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyShortChann
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryChannelRangeDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_QueryChannelRangeDecodeErrorZ*)arg)->result_ok;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PingDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_PingDecodeErrorZ*)arg)->result_ok;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryChannelRangeDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_QueryChannelRangeDecodeErrorZ *val = (LDKCResult_QueryChannelRangeDecodeErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PingDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_PingDecodeErrorZ *val = (LDKCResult_PingDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       LDKQueryChannelRange res_var = (*val->contents.result);
+       LDKPing res_var = (*val->contents.result);
        CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long res_ref = (long)res_var.inner & ~1;
        return res_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryChannelRangeDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_QueryChannelRangeDecodeErrorZ *val = (LDKCResult_QueryChannelRangeDecodeErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PingDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_PingDecodeErrorZ *val = (LDKCResult_PingDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
        LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -3190,20 +4009,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryChannelRan
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyChannelRangeDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_ReplyChannelRangeDecodeErrorZ*)arg)->result_ok;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PongDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_PongDecodeErrorZ*)arg)->result_ok;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyChannelRangeDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_ReplyChannelRangeDecodeErrorZ *val = (LDKCResult_ReplyChannelRangeDecodeErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PongDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_PongDecodeErrorZ *val = (LDKCResult_PongDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       LDKReplyChannelRange res_var = (*val->contents.result);
+       LDKPong res_var = (*val->contents.result);
        CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long res_ref = (long)res_var.inner & ~1;
        return res_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyChannelRangeDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_ReplyChannelRangeDecodeErrorZ *val = (LDKCResult_ReplyChannelRangeDecodeErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PongDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_PongDecodeErrorZ *val = (LDKCResult_PongDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
        LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -3211,20 +4030,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyChannelRan
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1GossipTimestampFilterDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_GossipTimestampFilterDecodeErrorZ*)arg)->result_ok;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelAnnouncementDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ*)arg)->result_ok;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1GossipTimestampFilterDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_GossipTimestampFilterDecodeErrorZ *val = (LDKCResult_GossipTimestampFilterDecodeErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelAnnouncementDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *val = (LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       LDKGossipTimestampFilter res_var = (*val->contents.result);
+       LDKUnsignedChannelAnnouncement res_var = (*val->contents.result);
        CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long res_ref = (long)res_var.inner & ~1;
        return res_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1GossipTimestampFilterDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_GossipTimestampFilterDecodeErrorZ *val = (LDKCResult_GossipTimestampFilterDecodeErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelAnnouncementDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *val = (LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
        LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -3232,196 +4051,230 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1GossipTimestamp
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1u8ZPeerHandleErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_CVec_u8ZPeerHandleErrorZ*)arg)->result_ok;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelAnnouncementDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_ChannelAnnouncementDecodeErrorZ*)arg)->result_ok;
 }
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1u8ZPeerHandleErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_CVec_u8ZPeerHandleErrorZ *val = (LDKCResult_CVec_u8ZPeerHandleErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelAnnouncementDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ChannelAnnouncementDecodeErrorZ *val = (LDKCResult_ChannelAnnouncementDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       LDKCVec_u8Z res_var = (*val->contents.result);
-       int8_tArray res_arr = (*env)->NewByteArray(env, res_var.datalen);
-       (*env)->SetByteArrayRegion(env, res_arr, 0, res_var.datalen, res_var.data);
-       return res_arr;
+       LDKChannelAnnouncement res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1u8ZPeerHandleErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_CVec_u8ZPeerHandleErrorZ *val = (LDKCResult_CVec_u8ZPeerHandleErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelAnnouncementDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ChannelAnnouncementDecodeErrorZ *val = (LDKCResult_ChannelAnnouncementDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
-       LDKPeerHandleError err_var = (*val->contents.err);
+       LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NonePeerHandleErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_NonePeerHandleErrorZ*)arg)->result_ok;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelUpdateDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_UnsignedChannelUpdateDecodeErrorZ*)arg)->result_ok;
 }
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NonePeerHandleErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_NonePeerHandleErrorZ *val = (LDKCResult_NonePeerHandleErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelUpdateDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_UnsignedChannelUpdateDecodeErrorZ *val = (LDKCResult_UnsignedChannelUpdateDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       return *val->contents.result;
+       LDKUnsignedChannelUpdate res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NonePeerHandleErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_NonePeerHandleErrorZ *val = (LDKCResult_NonePeerHandleErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelUpdateDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_UnsignedChannelUpdateDecodeErrorZ *val = (LDKCResult_UnsignedChannelUpdateDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
-       LDKPeerHandleError err_var = (*val->contents.err);
+       LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolPeerHandleErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_boolPeerHandleErrorZ*)arg)->result_ok;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelUpdateDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_ChannelUpdateDecodeErrorZ*)arg)->result_ok;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolPeerHandleErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_boolPeerHandleErrorZ *val = (LDKCResult_boolPeerHandleErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelUpdateDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ChannelUpdateDecodeErrorZ *val = (LDKCResult_ChannelUpdateDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       return *val->contents.result;
+       LDKChannelUpdate res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolPeerHandleErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_boolPeerHandleErrorZ *val = (LDKCResult_boolPeerHandleErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelUpdateDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ChannelUpdateDecodeErrorZ *val = (LDKCResult_ChannelUpdateDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
-       LDKPeerHandleError err_var = (*val->contents.err);
+       LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SecretKeySecpErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_SecretKeySecpErrorZ*)arg)->result_ok;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ErrorMessageDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_ErrorMessageDecodeErrorZ*)arg)->result_ok;
 }
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SecretKeySecpErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_SecretKeySecpErrorZ *val = (LDKCResult_SecretKeySecpErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ErrorMessageDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ErrorMessageDecodeErrorZ *val = (LDKCResult_ErrorMessageDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       int8_tArray res_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, res_arr, 0, 32, (*val->contents.result).bytes);
-       return res_arr;
+       LDKErrorMessage res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SecretKeySecpErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_SecretKeySecpErrorZ *val = (LDKCResult_SecretKeySecpErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ErrorMessageDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ErrorMessageDecodeErrorZ *val = (LDKCResult_ErrorMessageDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
-       jclass err_conv = LDKSecp256k1Error_to_java(env, (*val->contents.err));
-       return err_conv;
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PublicKeySecpErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_PublicKeySecpErrorZ*)arg)->result_ok;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedNodeAnnouncementDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ*)arg)->result_ok;
 }
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PublicKeySecpErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_PublicKeySecpErrorZ *val = (LDKCResult_PublicKeySecpErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedNodeAnnouncementDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *val = (LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       int8_tArray res_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, res_arr, 0, 33, (*val->contents.result).compressed_form);
-       return res_arr;
+       LDKUnsignedNodeAnnouncement res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PublicKeySecpErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_PublicKeySecpErrorZ *val = (LDKCResult_PublicKeySecpErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedNodeAnnouncementDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *val = (LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
-       jclass err_conv = LDKSecp256k1Error_to_java(env, (*val->contents.err));
-       return err_conv;
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeAnnouncementDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_NodeAnnouncementDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeAnnouncementDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_NodeAnnouncementDecodeErrorZ *val = (LDKCResult_NodeAnnouncementDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKNodeAnnouncement res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeAnnouncementDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_NodeAnnouncementDecodeErrorZ *val = (LDKCResult_NodeAnnouncementDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryShortChannelIdsDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_QueryShortChannelIdsDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryShortChannelIdsDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_QueryShortChannelIdsDecodeErrorZ *val = (LDKCResult_QueryShortChannelIdsDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKQueryShortChannelIds res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryShortChannelIdsDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_QueryShortChannelIdsDecodeErrorZ *val = (LDKCResult_QueryShortChannelIdsDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxCreationKeysSecpErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_TxCreationKeysSecpErrorZ*)arg)->result_ok;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyShortChannelIdsEndDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ*)arg)->result_ok;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxCreationKeysSecpErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_TxCreationKeysSecpErrorZ *val = (LDKCResult_TxCreationKeysSecpErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyShortChannelIdsEndDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *val = (LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       LDKTxCreationKeys res_var = (*val->contents.result);
+       LDKReplyShortChannelIdsEnd res_var = (*val->contents.result);
        CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long res_ref = (long)res_var.inner & ~1;
        return res_ref;
 }
-JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxCreationKeysSecpErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_TxCreationKeysSecpErrorZ *val = (LDKCResult_TxCreationKeysSecpErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyShortChannelIdsEndDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *val = (LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
-       jclass err_conv = LDKSecp256k1Error_to_java(env, (*val->contents.err));
-       return err_conv;
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TrustedCommitmentTransactionNoneZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_TrustedCommitmentTransactionNoneZ*)arg)->result_ok;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryChannelRangeDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_QueryChannelRangeDecodeErrorZ*)arg)->result_ok;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TrustedCommitmentTransactionNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_TrustedCommitmentTransactionNoneZ *val = (LDKCResult_TrustedCommitmentTransactionNoneZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryChannelRangeDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_QueryChannelRangeDecodeErrorZ *val = (LDKCResult_QueryChannelRangeDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       LDKTrustedCommitmentTransaction res_var = (*val->contents.result);
+       LDKQueryChannelRange res_var = (*val->contents.result);
        CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long res_ref = (long)res_var.inner & ~1;
        return res_ref;
 }
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TrustedCommitmentTransactionNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_TrustedCommitmentTransactionNoneZ *val = (LDKCResult_TrustedCommitmentTransactionNoneZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryChannelRangeDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_QueryChannelRangeDecodeErrorZ *val = (LDKCResult_QueryChannelRangeDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
-       return *val->contents.err;
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1SignatureZNoneZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_CVec_SignatureZNoneZ*)arg)->result_ok;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyChannelRangeDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_ReplyChannelRangeDecodeErrorZ*)arg)->result_ok;
 }
-JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1SignatureZNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_CVec_SignatureZNoneZ *val = (LDKCResult_CVec_SignatureZNoneZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyChannelRangeDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ReplyChannelRangeDecodeErrorZ *val = (LDKCResult_ReplyChannelRangeDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       LDKCVec_SignatureZ res_var = (*val->contents.result);
-       jobjectArray res_arr = (*env)->NewObjectArray(env, res_var.datalen, arr_of_B_clz, NULL);
-       ;
-       for (size_t i = 0; i < res_var.datalen; i++) {
-               int8_tArray arr_conv_8_arr = (*env)->NewByteArray(env, 64);
-               (*env)->SetByteArrayRegion(env, arr_conv_8_arr, 0, 64, res_var.data[i].compact_form);
-               (*env)->SetObjectArrayElement(env, res_arr, i, arr_conv_8_arr);
-       }
-       return res_arr;
+       LDKReplyChannelRange res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1SignatureZNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_CVec_SignatureZNoneZ *val = (LDKCResult_CVec_SignatureZNoneZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyChannelRangeDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ReplyChannelRangeDecodeErrorZ *val = (LDKCResult_ReplyChannelRangeDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
-       return *val->contents.err;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1RouteHopZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
-       LDKCVec_RouteHopZ *ret = MALLOC(sizeof(LDKCVec_RouteHopZ), "LDKCVec_RouteHopZ");
-       ret->datalen = (*env)->GetArrayLength(env, elems);
-       if (ret->datalen == 0) {
-               ret->data = NULL;
-       } else {
-               ret->data = MALLOC(sizeof(LDKRouteHop) * ret->datalen, "LDKCVec_RouteHopZ Data");
-               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
-               for (size_t i = 0; i < ret->datalen; i++) {
-                       int64_t arr_elem = java_elems[i];
-                       LDKRouteHop arr_elem_conv;
-                       arr_elem_conv.inner = (void*)(arr_elem & (~1));
-                       arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
-                       arr_elem_conv = RouteHop_clone(&arr_elem_conv);
-                       ret->data[i] = arr_elem_conv;
-               }
-               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
-       }
-       return (long)ret;
-}
-static inline LDKCVec_RouteHopZ CVec_RouteHopZ_clone(const LDKCVec_RouteHopZ *orig) {
-       LDKCVec_RouteHopZ ret = { .data = MALLOC(sizeof(LDKRouteHop) * orig->datalen, "LDKCVec_RouteHopZ clone bytes"), .datalen = orig->datalen };
-       for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = RouteHop_clone(&orig->data[i]);
-       }
-       return ret;
-}
-static inline LDKCVec_CVec_RouteHopZZ CVec_CVec_RouteHopZZ_clone(const LDKCVec_CVec_RouteHopZZ *orig) {
-       LDKCVec_CVec_RouteHopZZ ret = { .data = MALLOC(sizeof(LDKCVec_RouteHopZ) * orig->datalen, "LDKCVec_CVec_RouteHopZZ clone bytes"), .datalen = orig->datalen };
-       for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = CVec_RouteHopZ_clone(&orig->data[i]);
-       }
-       return ret;
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RouteDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_RouteDecodeErrorZ*)arg)->result_ok;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1GossipTimestampFilterDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_GossipTimestampFilterDecodeErrorZ*)arg)->result_ok;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RouteDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_RouteDecodeErrorZ *val = (LDKCResult_RouteDecodeErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1GossipTimestampFilterDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_GossipTimestampFilterDecodeErrorZ *val = (LDKCResult_GossipTimestampFilterDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       LDKRoute res_var = (*val->contents.result);
+       LDKGossipTimestampFilter res_var = (*val->contents.result);
        CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long res_ref = (long)res_var.inner & ~1;
        return res_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RouteDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_RouteDecodeErrorZ *val = (LDKCResult_RouteDecodeErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1GossipTimestampFilterDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_GossipTimestampFilterDecodeErrorZ *val = (LDKCResult_GossipTimestampFilterDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
        LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -3429,146 +4282,346 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RouteDecodeErro
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1RouteHintZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
-       LDKCVec_RouteHintZ *ret = MALLOC(sizeof(LDKCVec_RouteHintZ), "LDKCVec_RouteHintZ");
-       ret->datalen = (*env)->GetArrayLength(env, elems);
-       if (ret->datalen == 0) {
-               ret->data = NULL;
-       } else {
-               ret->data = MALLOC(sizeof(LDKRouteHint) * ret->datalen, "LDKCVec_RouteHintZ Data");
-               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
-               for (size_t i = 0; i < ret->datalen; i++) {
-                       int64_t arr_elem = java_elems[i];
-                       LDKRouteHint arr_elem_conv;
-                       arr_elem_conv.inner = (void*)(arr_elem & (~1));
-                       arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
-                       arr_elem_conv = RouteHint_clone(&arr_elem_conv);
-                       ret->data[i] = arr_elem_conv;
-               }
-               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
+typedef struct LDKMessageSendEventsProvider_JCalls {
+       atomic_size_t refcnt;
+       JavaVM *vm;
+       jweak o;
+       jmethodID get_and_clear_pending_msg_events_meth;
+} LDKMessageSendEventsProvider_JCalls;
+static void LDKMessageSendEventsProvider_JCalls_free(void* this_arg) {
+       LDKMessageSendEventsProvider_JCalls *j_calls = (LDKMessageSendEventsProvider_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               JNIEnv *env;
+               DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
+               FREE(j_calls);
        }
-       return (long)ret;
 }
-static inline LDKCVec_RouteHintZ CVec_RouteHintZ_clone(const LDKCVec_RouteHintZ *orig) {
-       LDKCVec_RouteHintZ ret = { .data = MALLOC(sizeof(LDKRouteHint) * orig->datalen, "LDKCVec_RouteHintZ clone bytes"), .datalen = orig->datalen };
-       for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = RouteHint_clone(&orig->data[i]);
-       }
+LDKCVec_MessageSendEventZ get_and_clear_pending_msg_events_jcall(const void* this_arg) {
+       LDKMessageSendEventsProvider_JCalls *j_calls = (LDKMessageSendEventsProvider_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       int64_tArray arg = (*env)->CallObjectMethod(env, obj, j_calls->get_and_clear_pending_msg_events_meth);
+       LDKCVec_MessageSendEventZ arg_constr;
+       arg_constr.datalen = (*env)->GetArrayLength(env, arg);
+       if (arg_constr.datalen > 0)
+               arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKMessageSendEvent), "LDKCVec_MessageSendEventZ Elements");
+       else
+               arg_constr.data = NULL;
+       int64_t* arg_vals = (*env)->GetLongArrayElements (env, arg, NULL);
+       for (size_t s = 0; s < arg_constr.datalen; s++) {
+               int64_t arr_conv_18 = arg_vals[s];
+               LDKMessageSendEvent arr_conv_18_conv = *(LDKMessageSendEvent*)(((uint64_t)arr_conv_18) & ~1);
+               FREE((void*)arr_conv_18);
+               arg_constr.data[s] = arr_conv_18_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, arg, arg_vals, 0);
+       return arg_constr;
+}
+static void* LDKMessageSendEventsProvider_JCalls_clone(const void* this_arg) {
+       LDKMessageSendEventsProvider_JCalls *j_calls = (LDKMessageSendEventsProvider_JCalls*) this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+       return (void*) this_arg;
+}
+static inline LDKMessageSendEventsProvider LDKMessageSendEventsProvider_init (JNIEnv *env, jclass clz, jobject o) {
+       jclass c = (*env)->GetObjectClass(env, o);
+       CHECK(c != NULL);
+       LDKMessageSendEventsProvider_JCalls *calls = MALLOC(sizeof(LDKMessageSendEventsProvider_JCalls), "LDKMessageSendEventsProvider_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+       calls->o = (*env)->NewWeakGlobalRef(env, o);
+       calls->get_and_clear_pending_msg_events_meth = (*env)->GetMethodID(env, c, "get_and_clear_pending_msg_events", "()[J");
+       CHECK(calls->get_and_clear_pending_msg_events_meth != NULL);
+
+       LDKMessageSendEventsProvider ret = {
+               .this_arg = (void*) calls,
+               .get_and_clear_pending_msg_events = get_and_clear_pending_msg_events_jcall,
+               .free = LDKMessageSendEventsProvider_JCalls_free,
+       };
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKMessageSendEventsProvider_1new(JNIEnv *env, jclass clz, jobject o) {
+       LDKMessageSendEventsProvider *res_ptr = MALLOC(sizeof(LDKMessageSendEventsProvider), "LDKMessageSendEventsProvider");
+       *res_ptr = LDKMessageSendEventsProvider_init(env, clz, o);
+       return (long)res_ptr;
+}
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_MessageSendEventsProvider_1get_1and_1clear_1pending_1msg_1events(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKMessageSendEventsProvider* this_arg_conv = (LDKMessageSendEventsProvider*)this_arg;
+       LDKCVec_MessageSendEventZ ret_var = (this_arg_conv->get_and_clear_pending_msg_events)(this_arg_conv->this_arg);
+       int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
+       int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
+       for (size_t s = 0; s < ret_var.datalen; s++) {
+               LDKMessageSendEvent *arr_conv_18_copy = MALLOC(sizeof(LDKMessageSendEvent), "LDKMessageSendEvent");
+               *arr_conv_18_copy = MessageSendEvent_clone(&ret_var.data[s]);
+               long arr_conv_18_ref = (long)arr_conv_18_copy;
+               ret_arr_ptr[s] = arr_conv_18_ref;
+       }
+       (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
+       FREE(ret_var.data);
+       return ret_arr;
+}
+
+typedef struct LDKEventsProvider_JCalls {
+       atomic_size_t refcnt;
+       JavaVM *vm;
+       jweak o;
+       jmethodID get_and_clear_pending_events_meth;
+} LDKEventsProvider_JCalls;
+static void LDKEventsProvider_JCalls_free(void* this_arg) {
+       LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               JNIEnv *env;
+               DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
+               FREE(j_calls);
+       }
+}
+LDKCVec_EventZ get_and_clear_pending_events_jcall(const void* this_arg) {
+       LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       int64_tArray arg = (*env)->CallObjectMethod(env, obj, j_calls->get_and_clear_pending_events_meth);
+       LDKCVec_EventZ arg_constr;
+       arg_constr.datalen = (*env)->GetArrayLength(env, arg);
+       if (arg_constr.datalen > 0)
+               arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKEvent), "LDKCVec_EventZ Elements");
+       else
+               arg_constr.data = NULL;
+       int64_t* arg_vals = (*env)->GetLongArrayElements (env, arg, NULL);
+       for (size_t h = 0; h < arg_constr.datalen; h++) {
+               int64_t arr_conv_7 = arg_vals[h];
+               LDKEvent arr_conv_7_conv = *(LDKEvent*)(((uint64_t)arr_conv_7) & ~1);
+               FREE((void*)arr_conv_7);
+               arg_constr.data[h] = arr_conv_7_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, arg, arg_vals, 0);
+       return arg_constr;
+}
+static void* LDKEventsProvider_JCalls_clone(const void* this_arg) {
+       LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+       return (void*) this_arg;
+}
+static inline LDKEventsProvider LDKEventsProvider_init (JNIEnv *env, jclass clz, jobject o) {
+       jclass c = (*env)->GetObjectClass(env, o);
+       CHECK(c != NULL);
+       LDKEventsProvider_JCalls *calls = MALLOC(sizeof(LDKEventsProvider_JCalls), "LDKEventsProvider_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+       calls->o = (*env)->NewWeakGlobalRef(env, o);
+       calls->get_and_clear_pending_events_meth = (*env)->GetMethodID(env, c, "get_and_clear_pending_events", "()[J");
+       CHECK(calls->get_and_clear_pending_events_meth != NULL);
+
+       LDKEventsProvider ret = {
+               .this_arg = (void*) calls,
+               .get_and_clear_pending_events = get_and_clear_pending_events_jcall,
+               .free = LDKEventsProvider_JCalls_free,
+       };
        return ret;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RouteLightningErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_RouteLightningErrorZ*)arg)->result_ok;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKEventsProvider_1new(JNIEnv *env, jclass clz, jobject o) {
+       LDKEventsProvider *res_ptr = MALLOC(sizeof(LDKEventsProvider), "LDKEventsProvider");
+       *res_ptr = LDKEventsProvider_init(env, clz, o);
+       return (long)res_ptr;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RouteLightningErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_RouteLightningErrorZ *val = (LDKCResult_RouteLightningErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKRoute res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_EventsProvider_1get_1and_1clear_1pending_1events(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKEventsProvider* this_arg_conv = (LDKEventsProvider*)this_arg;
+       LDKCVec_EventZ ret_var = (this_arg_conv->get_and_clear_pending_events)(this_arg_conv->this_arg);
+       int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
+       int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
+       for (size_t h = 0; h < ret_var.datalen; h++) {
+               LDKEvent *arr_conv_7_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
+               *arr_conv_7_copy = Event_clone(&ret_var.data[h]);
+               long arr_conv_7_ref = (long)arr_conv_7_copy;
+               ret_arr_ptr[h] = arr_conv_7_ref;
+       }
+       (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
+       FREE(ret_var.data);
+       return ret_arr;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RouteLightningErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_RouteLightningErrorZ *val = (LDKCResult_RouteLightningErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKLightningError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+
+typedef struct LDKAccess_JCalls {
+       atomic_size_t refcnt;
+       JavaVM *vm;
+       jweak o;
+       jmethodID get_utxo_meth;
+} LDKAccess_JCalls;
+static void LDKAccess_JCalls_free(void* this_arg) {
+       LDKAccess_JCalls *j_calls = (LDKAccess_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               JNIEnv *env;
+               DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
+               FREE(j_calls);
+       }
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RoutingFeesDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_RoutingFeesDecodeErrorZ*)arg)->result_ok;
+LDKCResult_TxOutAccessErrorZ get_utxo_jcall(const void* this_arg, const uint8_t (* genesis_hash)[32], uint64_t short_channel_id) {
+       LDKAccess_JCalls *j_calls = (LDKAccess_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       int8_tArray genesis_hash_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, genesis_hash_arr, 0, 32, *genesis_hash);
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       LDKCResult_TxOutAccessErrorZ* ret = (LDKCResult_TxOutAccessErrorZ*)(*env)->CallLongMethod(env, obj, j_calls->get_utxo_meth, genesis_hash_arr, short_channel_id);
+       LDKCResult_TxOutAccessErrorZ ret_conv = *(LDKCResult_TxOutAccessErrorZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_TxOutAccessErrorZ_clone((LDKCResult_TxOutAccessErrorZ*)ret);
+       return ret_conv;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RoutingFeesDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_RoutingFeesDecodeErrorZ *val = (LDKCResult_RoutingFeesDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKRoutingFees res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+static void* LDKAccess_JCalls_clone(const void* this_arg) {
+       LDKAccess_JCalls *j_calls = (LDKAccess_JCalls*) this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+       return (void*) this_arg;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RoutingFeesDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_RoutingFeesDecodeErrorZ *val = (LDKCResult_RoutingFeesDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+static inline LDKAccess LDKAccess_init (JNIEnv *env, jclass clz, jobject o) {
+       jclass c = (*env)->GetObjectClass(env, o);
+       CHECK(c != NULL);
+       LDKAccess_JCalls *calls = MALLOC(sizeof(LDKAccess_JCalls), "LDKAccess_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+       calls->o = (*env)->NewWeakGlobalRef(env, o);
+       calls->get_utxo_meth = (*env)->GetMethodID(env, c, "get_utxo", "([BJ)J");
+       CHECK(calls->get_utxo_meth != NULL);
+
+       LDKAccess ret = {
+               .this_arg = (void*) calls,
+               .get_utxo = get_utxo_jcall,
+               .free = LDKAccess_JCalls_free,
+       };
+       return ret;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeAnnouncementInfoDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)arg)->result_ok;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKAccess_1new(JNIEnv *env, jclass clz, jobject o) {
+       LDKAccess *res_ptr = MALLOC(sizeof(LDKAccess), "LDKAccess");
+       *res_ptr = LDKAccess_init(env, clz, o);
+       return (long)res_ptr;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeAnnouncementInfoDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_NodeAnnouncementInfoDecodeErrorZ *val = (LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKNodeAnnouncementInfo res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Access_1get_1utxo(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray genesis_hash, int64_t short_channel_id) {
+       LDKAccess* this_arg_conv = (LDKAccess*)this_arg;
+       unsigned char genesis_hash_arr[32];
+       CHECK((*env)->GetArrayLength(env, genesis_hash) == 32);
+       (*env)->GetByteArrayRegion(env, genesis_hash, 0, 32, genesis_hash_arr);
+       unsigned char (*genesis_hash_ref)[32] = &genesis_hash_arr;
+       LDKCResult_TxOutAccessErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxOutAccessErrorZ), "LDKCResult_TxOutAccessErrorZ");
+       *ret_conv = (this_arg_conv->get_utxo)(this_arg_conv->this_arg, genesis_hash_ref, short_channel_id);
+       return (long)ret_conv;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeAnnouncementInfoDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_NodeAnnouncementInfoDecodeErrorZ *val = (LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+
+typedef struct LDKFilter_JCalls {
+       atomic_size_t refcnt;
+       JavaVM *vm;
+       jweak o;
+       jmethodID register_tx_meth;
+       jmethodID register_output_meth;
+} LDKFilter_JCalls;
+static void LDKFilter_JCalls_free(void* this_arg) {
+       LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               JNIEnv *env;
+               DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
+               FREE(j_calls);
+       }
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeInfoDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_NodeInfoDecodeErrorZ*)arg)->result_ok;
+void register_tx_jcall(const void* this_arg, const uint8_t (* txid)[32], LDKu8slice script_pubkey) {
+       LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       int8_tArray txid_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, txid_arr, 0, 32, *txid);
+       LDKu8slice script_pubkey_var = script_pubkey;
+       int8_tArray script_pubkey_arr = (*env)->NewByteArray(env, script_pubkey_var.datalen);
+       (*env)->SetByteArrayRegion(env, script_pubkey_arr, 0, script_pubkey_var.datalen, script_pubkey_var.data);
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallVoidMethod(env, obj, j_calls->register_tx_meth, txid_arr, script_pubkey_arr);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeInfoDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_NodeInfoDecodeErrorZ *val = (LDKCResult_NodeInfoDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKNodeInfo res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+void register_output_jcall(const void* this_arg, const LDKOutPoint * outpoint, LDKu8slice script_pubkey) {
+       LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       LDKOutPoint outpoint_var = *outpoint;
+       outpoint_var = OutPoint_clone(outpoint);
+       CHECK((((long)outpoint_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&outpoint_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long outpoint_ref = (long)outpoint_var.inner;
+       if (outpoint_var.is_owned) {
+               outpoint_ref |= 1;
+       }
+       LDKu8slice script_pubkey_var = script_pubkey;
+       int8_tArray script_pubkey_arr = (*env)->NewByteArray(env, script_pubkey_var.datalen);
+       (*env)->SetByteArrayRegion(env, script_pubkey_arr, 0, script_pubkey_var.datalen, script_pubkey_var.data);
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallVoidMethod(env, obj, j_calls->register_output_meth, outpoint_ref, script_pubkey_arr);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeInfoDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_NodeInfoDecodeErrorZ *val = (LDKCResult_NodeInfoDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+static void* LDKFilter_JCalls_clone(const void* this_arg) {
+       LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+       return (void*) this_arg;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NetworkGraphDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_NetworkGraphDecodeErrorZ*)arg)->result_ok;
+static inline LDKFilter LDKFilter_init (JNIEnv *env, jclass clz, jobject o) {
+       jclass c = (*env)->GetObjectClass(env, o);
+       CHECK(c != NULL);
+       LDKFilter_JCalls *calls = MALLOC(sizeof(LDKFilter_JCalls), "LDKFilter_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+       calls->o = (*env)->NewWeakGlobalRef(env, o);
+       calls->register_tx_meth = (*env)->GetMethodID(env, c, "register_tx", "([B[B)V");
+       CHECK(calls->register_tx_meth != NULL);
+       calls->register_output_meth = (*env)->GetMethodID(env, c, "register_output", "(J[B)V");
+       CHECK(calls->register_output_meth != NULL);
+
+       LDKFilter ret = {
+               .this_arg = (void*) calls,
+               .register_tx = register_tx_jcall,
+               .register_output = register_output_jcall,
+               .free = LDKFilter_JCalls_free,
+       };
+       return ret;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NetworkGraphDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_NetworkGraphDecodeErrorZ *val = (LDKCResult_NetworkGraphDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKNetworkGraph res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKFilter_1new(JNIEnv *env, jclass clz, jobject o) {
+       LDKFilter *res_ptr = MALLOC(sizeof(LDKFilter), "LDKFilter");
+       *res_ptr = LDKFilter_init(env, clz, o);
+       return (long)res_ptr;
+}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Filter_1register_1tx(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray txid, int8_tArray script_pubkey) {
+       LDKFilter* this_arg_conv = (LDKFilter*)this_arg;
+       unsigned char txid_arr[32];
+       CHECK((*env)->GetArrayLength(env, txid) == 32);
+       (*env)->GetByteArrayRegion(env, txid, 0, 32, txid_arr);
+       unsigned char (*txid_ref)[32] = &txid_arr;
+       LDKu8slice script_pubkey_ref;
+       script_pubkey_ref.datalen = (*env)->GetArrayLength(env, script_pubkey);
+       script_pubkey_ref.data = (*env)->GetByteArrayElements (env, script_pubkey, NULL);
+       (this_arg_conv->register_tx)(this_arg_conv->this_arg, txid_ref, script_pubkey_ref);
+       (*env)->ReleaseByteArrayElements(env, script_pubkey, (int8_t*)script_pubkey_ref.data, 0);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NetworkGraphDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_NetworkGraphDecodeErrorZ *val = (LDKCResult_NetworkGraphDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Filter_1register_1output(JNIEnv *env, jclass clz, int64_t this_arg, int64_t outpoint, int8_tArray script_pubkey) {
+       LDKFilter* this_arg_conv = (LDKFilter*)this_arg;
+       LDKOutPoint outpoint_conv;
+       outpoint_conv.inner = (void*)(outpoint & (~1));
+       outpoint_conv.is_owned = false;
+       LDKu8slice script_pubkey_ref;
+       script_pubkey_ref.datalen = (*env)->GetArrayLength(env, script_pubkey);
+       script_pubkey_ref.data = (*env)->GetByteArrayElements (env, script_pubkey, NULL);
+       (this_arg_conv->register_output)(this_arg_conv->this_arg, &outpoint_conv, script_pubkey_ref);
+       (*env)->ReleaseByteArrayElements(env, script_pubkey, (int8_t*)script_pubkey_ref.data, 0);
 }
-typedef struct LDKMessageSendEventsProvider_JCalls {
+
+typedef struct LDKPersist_JCalls {
        atomic_size_t refcnt;
        JavaVM *vm;
        jweak o;
-       jmethodID get_and_clear_pending_msg_events_meth;
-} LDKMessageSendEventsProvider_JCalls;
-static void LDKMessageSendEventsProvider_JCalls_free(void* this_arg) {
-       LDKMessageSendEventsProvider_JCalls *j_calls = (LDKMessageSendEventsProvider_JCalls*) this_arg;
+       jmethodID persist_new_channel_meth;
+       jmethodID update_persisted_channel_meth;
+} LDKPersist_JCalls;
+static void LDKPersist_JCalls_free(void* this_arg) {
+       LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
        if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
                JNIEnv *env;
                DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
@@ -3576,80 +4629,154 @@ static void LDKMessageSendEventsProvider_JCalls_free(void* this_arg) {
                FREE(j_calls);
        }
 }
-LDKCVec_MessageSendEventZ get_and_clear_pending_msg_events_jcall(const void* this_arg) {
-       LDKMessageSendEventsProvider_JCalls *j_calls = (LDKMessageSendEventsProvider_JCalls*) this_arg;
+LDKCResult_NoneChannelMonitorUpdateErrZ persist_new_channel_jcall(const void* this_arg, LDKOutPoint id, const LDKChannelMonitor * data) {
+       LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
        JNIEnv *env;
        DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       LDKOutPoint id_var = id;
+       CHECK((((long)id_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&id_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long id_ref = (long)id_var.inner;
+       if (id_var.is_owned) {
+               id_ref |= 1;
+       }
+       LDKChannelMonitor data_var = *data;
+       data_var = ChannelMonitor_clone(data);
+       CHECK((((long)data_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&data_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long data_ref = (long)data_var.inner;
+       if (data_var.is_owned) {
+               data_ref |= 1;
+       }
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       int64_tArray arg = (*env)->CallObjectMethod(env, obj, j_calls->get_and_clear_pending_msg_events_meth);
-       LDKCVec_MessageSendEventZ arg_constr;
-       arg_constr.datalen = (*env)->GetArrayLength(env, arg);
-       if (arg_constr.datalen > 0)
-               arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKMessageSendEvent), "LDKCVec_MessageSendEventZ Elements");
-       else
-               arg_constr.data = NULL;
-       int64_t* arg_vals = (*env)->GetLongArrayElements (env, arg, NULL);
-       for (size_t s = 0; s < arg_constr.datalen; s++) {
-               int64_t arr_conv_18 = arg_vals[s];
-               LDKMessageSendEvent arr_conv_18_conv = *(LDKMessageSendEvent*)(((uint64_t)arr_conv_18) & ~1);
-               FREE((void*)arr_conv_18);
-               arg_constr.data[s] = arr_conv_18_conv;
+       LDKCResult_NoneChannelMonitorUpdateErrZ* ret = (LDKCResult_NoneChannelMonitorUpdateErrZ*)(*env)->CallLongMethod(env, obj, j_calls->persist_new_channel_meth, id_ref, data_ref);
+       LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone((LDKCResult_NoneChannelMonitorUpdateErrZ*)ret);
+       return ret_conv;
+}
+LDKCResult_NoneChannelMonitorUpdateErrZ update_persisted_channel_jcall(const void* this_arg, LDKOutPoint id, const LDKChannelMonitorUpdate * update, const LDKChannelMonitor * data) {
+       LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       LDKOutPoint id_var = id;
+       CHECK((((long)id_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&id_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long id_ref = (long)id_var.inner;
+       if (id_var.is_owned) {
+               id_ref |= 1;
        }
-       (*env)->ReleaseLongArrayElements(env, arg, arg_vals, 0);
-       return arg_constr;
+       LDKChannelMonitorUpdate update_var = *update;
+       update_var = ChannelMonitorUpdate_clone(update);
+       CHECK((((long)update_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&update_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long update_ref = (long)update_var.inner;
+       if (update_var.is_owned) {
+               update_ref |= 1;
+       }
+       LDKChannelMonitor data_var = *data;
+       data_var = ChannelMonitor_clone(data);
+       CHECK((((long)data_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&data_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long data_ref = (long)data_var.inner;
+       if (data_var.is_owned) {
+               data_ref |= 1;
+       }
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       LDKCResult_NoneChannelMonitorUpdateErrZ* ret = (LDKCResult_NoneChannelMonitorUpdateErrZ*)(*env)->CallLongMethod(env, obj, j_calls->update_persisted_channel_meth, id_ref, update_ref, data_ref);
+       LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone((LDKCResult_NoneChannelMonitorUpdateErrZ*)ret);
+       return ret_conv;
 }
-static void* LDKMessageSendEventsProvider_JCalls_clone(const void* this_arg) {
-       LDKMessageSendEventsProvider_JCalls *j_calls = (LDKMessageSendEventsProvider_JCalls*) this_arg;
+static void* LDKPersist_JCalls_clone(const void* this_arg) {
+       LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
        atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
        return (void*) this_arg;
 }
-static inline LDKMessageSendEventsProvider LDKMessageSendEventsProvider_init (JNIEnv *env, jclass clz, jobject o) {
+static inline LDKPersist LDKPersist_init (JNIEnv *env, jclass clz, jobject o) {
        jclass c = (*env)->GetObjectClass(env, o);
        CHECK(c != NULL);
-       LDKMessageSendEventsProvider_JCalls *calls = MALLOC(sizeof(LDKMessageSendEventsProvider_JCalls), "LDKMessageSendEventsProvider_JCalls");
+       LDKPersist_JCalls *calls = MALLOC(sizeof(LDKPersist_JCalls), "LDKPersist_JCalls");
        atomic_init(&calls->refcnt, 1);
        DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
        calls->o = (*env)->NewWeakGlobalRef(env, o);
-       calls->get_and_clear_pending_msg_events_meth = (*env)->GetMethodID(env, c, "get_and_clear_pending_msg_events", "()[J");
-       CHECK(calls->get_and_clear_pending_msg_events_meth != NULL);
+       calls->persist_new_channel_meth = (*env)->GetMethodID(env, c, "persist_new_channel", "(JJ)J");
+       CHECK(calls->persist_new_channel_meth != NULL);
+       calls->update_persisted_channel_meth = (*env)->GetMethodID(env, c, "update_persisted_channel", "(JJJ)J");
+       CHECK(calls->update_persisted_channel_meth != NULL);
 
-       LDKMessageSendEventsProvider ret = {
+       LDKPersist ret = {
                .this_arg = (void*) calls,
-               .get_and_clear_pending_msg_events = get_and_clear_pending_msg_events_jcall,
-               .free = LDKMessageSendEventsProvider_JCalls_free,
+               .persist_new_channel = persist_new_channel_jcall,
+               .update_persisted_channel = update_persisted_channel_jcall,
+               .free = LDKPersist_JCalls_free,
        };
        return ret;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKMessageSendEventsProvider_1new(JNIEnv *env, jclass clz, jobject o) {
-       LDKMessageSendEventsProvider *res_ptr = MALLOC(sizeof(LDKMessageSendEventsProvider), "LDKMessageSendEventsProvider");
-       *res_ptr = LDKMessageSendEventsProvider_init(env, clz, o);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKPersist_1new(JNIEnv *env, jclass clz, jobject o) {
+       LDKPersist *res_ptr = MALLOC(sizeof(LDKPersist), "LDKPersist");
+       *res_ptr = LDKPersist_init(env, clz, o);
        return (long)res_ptr;
 }
-JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_MessageSendEventsProvider_1get_1and_1clear_1pending_1msg_1events(JNIEnv *env, jclass clz, int64_t this_arg) {
-       LDKMessageSendEventsProvider* this_arg_conv = (LDKMessageSendEventsProvider*)this_arg;
-       LDKCVec_MessageSendEventZ ret_var = (this_arg_conv->get_and_clear_pending_msg_events)(this_arg_conv->this_arg);
-       int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
-       int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
-       for (size_t s = 0; s < ret_var.datalen; s++) {
-               LDKMessageSendEvent *arr_conv_18_copy = MALLOC(sizeof(LDKMessageSendEvent), "LDKMessageSendEvent");
-               *arr_conv_18_copy = MessageSendEvent_clone(&ret_var.data[s]);
-               long arr_conv_18_ref = (long)arr_conv_18_copy;
-               ret_arr_ptr[s] = arr_conv_18_ref;
-       }
-       (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
-       FREE(ret_var.data);
-       return ret_arr;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Persist_1persist_1new_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t id, int64_t data) {
+       LDKPersist* this_arg_conv = (LDKPersist*)this_arg;
+       LDKOutPoint id_conv;
+       id_conv.inner = (void*)(id & (~1));
+       id_conv.is_owned = (id & 1) || (id == 0);
+       id_conv = OutPoint_clone(&id_conv);
+       LDKChannelMonitor data_conv;
+       data_conv.inner = (void*)(data & (~1));
+       data_conv.is_owned = false;
+       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
+       *ret_conv = (this_arg_conv->persist_new_channel)(this_arg_conv->this_arg, id_conv, &data_conv);
+       return (long)ret_conv;
 }
 
-typedef struct LDKEventsProvider_JCalls {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Persist_1update_1persisted_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t id, int64_t update, int64_t data) {
+       LDKPersist* this_arg_conv = (LDKPersist*)this_arg;
+       LDKOutPoint id_conv;
+       id_conv.inner = (void*)(id & (~1));
+       id_conv.is_owned = (id & 1) || (id == 0);
+       id_conv = OutPoint_clone(&id_conv);
+       LDKChannelMonitorUpdate update_conv;
+       update_conv.inner = (void*)(update & (~1));
+       update_conv.is_owned = false;
+       LDKChannelMonitor data_conv;
+       data_conv.inner = (void*)(data & (~1));
+       data_conv.is_owned = false;
+       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
+       *ret_conv = (this_arg_conv->update_persisted_channel)(this_arg_conv->this_arg, id_conv, &update_conv, &data_conv);
+       return (long)ret_conv;
+}
+
+typedef struct LDKChannelMessageHandler_JCalls {
        atomic_size_t refcnt;
        JavaVM *vm;
        jweak o;
-       jmethodID get_and_clear_pending_events_meth;
-} LDKEventsProvider_JCalls;
-static void LDKEventsProvider_JCalls_free(void* this_arg) {
-       LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) this_arg;
+       LDKMessageSendEventsProvider_JCalls* MessageSendEventsProvider;
+       jmethodID handle_open_channel_meth;
+       jmethodID handle_accept_channel_meth;
+       jmethodID handle_funding_created_meth;
+       jmethodID handle_funding_signed_meth;
+       jmethodID handle_funding_locked_meth;
+       jmethodID handle_shutdown_meth;
+       jmethodID handle_closing_signed_meth;
+       jmethodID handle_update_add_htlc_meth;
+       jmethodID handle_update_fulfill_htlc_meth;
+       jmethodID handle_update_fail_htlc_meth;
+       jmethodID handle_update_fail_malformed_htlc_meth;
+       jmethodID handle_commitment_signed_meth;
+       jmethodID handle_revoke_and_ack_meth;
+       jmethodID handle_update_fee_meth;
+       jmethodID handle_announcement_signatures_meth;
+       jmethodID peer_disconnected_meth;
+       jmethodID peer_connected_meth;
+       jmethodID handle_channel_reestablish_meth;
+       jmethodID handle_error_meth;
+} LDKChannelMessageHandler_JCalls;
+static void LDKChannelMessageHandler_JCalls_free(void* this_arg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
        if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
                JNIEnv *env;
                DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
@@ -3657,405 +4784,671 @@ static void LDKEventsProvider_JCalls_free(void* this_arg) {
                FREE(j_calls);
        }
 }
-LDKCVec_EventZ get_and_clear_pending_events_jcall(const void* this_arg) {
-       LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) this_arg;
+void handle_open_channel_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKInitFeatures their_features, const LDKOpenChannel * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
+       LDKInitFeatures their_features_var = their_features;
+       CHECK((((long)their_features_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&their_features_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long their_features_ref = (long)their_features_var.inner;
+       if (their_features_var.is_owned) {
+               their_features_ref |= 1;
+       }
+       LDKOpenChannel msg_var = *msg;
+       msg_var = OpenChannel_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallVoidMethod(env, obj, j_calls->handle_open_channel_meth, their_node_id_arr, their_features_ref, msg_ref);
+}
+void handle_accept_channel_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKInitFeatures their_features, const LDKAcceptChannel * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
+       LDKInitFeatures their_features_var = their_features;
+       CHECK((((long)their_features_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&their_features_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long their_features_ref = (long)their_features_var.inner;
+       if (their_features_var.is_owned) {
+               their_features_ref |= 1;
+       }
+       LDKAcceptChannel msg_var = *msg;
+       msg_var = AcceptChannel_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallVoidMethod(env, obj, j_calls->handle_accept_channel_meth, their_node_id_arr, their_features_ref, msg_ref);
+}
+void handle_funding_created_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingCreated * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
        JNIEnv *env;
        DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
+       LDKFundingCreated msg_var = *msg;
+       msg_var = FundingCreated_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       int64_tArray arg = (*env)->CallObjectMethod(env, obj, j_calls->get_and_clear_pending_events_meth);
-       LDKCVec_EventZ arg_constr;
-       arg_constr.datalen = (*env)->GetArrayLength(env, arg);
-       if (arg_constr.datalen > 0)
-               arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKEvent), "LDKCVec_EventZ Elements");
-       else
-               arg_constr.data = NULL;
-       int64_t* arg_vals = (*env)->GetLongArrayElements (env, arg, NULL);
-       for (size_t h = 0; h < arg_constr.datalen; h++) {
-               int64_t arr_conv_7 = arg_vals[h];
-               LDKEvent arr_conv_7_conv = *(LDKEvent*)(((uint64_t)arr_conv_7) & ~1);
-               FREE((void*)arr_conv_7);
-               arg_constr.data[h] = arr_conv_7_conv;
-       }
-       (*env)->ReleaseLongArrayElements(env, arg, arg_vals, 0);
-       return arg_constr;
-}
-static void* LDKEventsProvider_JCalls_clone(const void* this_arg) {
-       LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) this_arg;
-       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
-       return (void*) this_arg;
-}
-static inline LDKEventsProvider LDKEventsProvider_init (JNIEnv *env, jclass clz, jobject o) {
-       jclass c = (*env)->GetObjectClass(env, o);
-       CHECK(c != NULL);
-       LDKEventsProvider_JCalls *calls = MALLOC(sizeof(LDKEventsProvider_JCalls), "LDKEventsProvider_JCalls");
-       atomic_init(&calls->refcnt, 1);
-       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
-       calls->o = (*env)->NewWeakGlobalRef(env, o);
-       calls->get_and_clear_pending_events_meth = (*env)->GetMethodID(env, c, "get_and_clear_pending_events", "()[J");
-       CHECK(calls->get_and_clear_pending_events_meth != NULL);
-
-       LDKEventsProvider ret = {
-               .this_arg = (void*) calls,
-               .get_and_clear_pending_events = get_and_clear_pending_events_jcall,
-               .free = LDKEventsProvider_JCalls_free,
-       };
-       return ret;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKEventsProvider_1new(JNIEnv *env, jclass clz, jobject o) {
-       LDKEventsProvider *res_ptr = MALLOC(sizeof(LDKEventsProvider), "LDKEventsProvider");
-       *res_ptr = LDKEventsProvider_init(env, clz, o);
-       return (long)res_ptr;
+       return (*env)->CallVoidMethod(env, obj, j_calls->handle_funding_created_meth, their_node_id_arr, msg_ref);
 }
-JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_EventsProvider_1get_1and_1clear_1pending_1events(JNIEnv *env, jclass clz, int64_t this_arg) {
-       LDKEventsProvider* this_arg_conv = (LDKEventsProvider*)this_arg;
-       LDKCVec_EventZ ret_var = (this_arg_conv->get_and_clear_pending_events)(this_arg_conv->this_arg);
-       int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
-       int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
-       for (size_t h = 0; h < ret_var.datalen; h++) {
-               LDKEvent *arr_conv_7_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
-               *arr_conv_7_copy = Event_clone(&ret_var.data[h]);
-               long arr_conv_7_ref = (long)arr_conv_7_copy;
-               ret_arr_ptr[h] = arr_conv_7_ref;
+void handle_funding_signed_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingSigned * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
+       LDKFundingSigned msg_var = *msg;
+       msg_var = FundingSigned_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
        }
-       (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
-       FREE(ret_var.data);
-       return ret_arr;
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallVoidMethod(env, obj, j_calls->handle_funding_signed_meth, their_node_id_arr, msg_ref);
 }
-
-typedef struct LDKAccess_JCalls {
-       atomic_size_t refcnt;
-       JavaVM *vm;
-       jweak o;
-       jmethodID get_utxo_meth;
-} LDKAccess_JCalls;
-static void LDKAccess_JCalls_free(void* this_arg) {
-       LDKAccess_JCalls *j_calls = (LDKAccess_JCalls*) this_arg;
-       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
-               JNIEnv *env;
-               DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
-               FREE(j_calls);
+void handle_funding_locked_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingLocked * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
+       LDKFundingLocked msg_var = *msg;
+       msg_var = FundingLocked_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
        }
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallVoidMethod(env, obj, j_calls->handle_funding_locked_meth, their_node_id_arr, msg_ref);
 }
-LDKCResult_TxOutAccessErrorZ get_utxo_jcall(const void* this_arg, const uint8_t (* genesis_hash)[32], uint64_t short_channel_id) {
-       LDKAccess_JCalls *j_calls = (LDKAccess_JCalls*) this_arg;
+void handle_shutdown_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKShutdown * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
        JNIEnv *env;
        DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       int8_tArray genesis_hash_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, genesis_hash_arr, 0, 32, *genesis_hash);
+       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
+       LDKShutdown msg_var = *msg;
+       msg_var = Shutdown_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       LDKCResult_TxOutAccessErrorZ* ret = (LDKCResult_TxOutAccessErrorZ*)(*env)->CallLongMethod(env, obj, j_calls->get_utxo_meth, genesis_hash_arr, short_channel_id);
-       LDKCResult_TxOutAccessErrorZ ret_conv = *(LDKCResult_TxOutAccessErrorZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_TxOutAccessErrorZ_clone((LDKCResult_TxOutAccessErrorZ*)ret);
-       return ret_conv;
-}
-static void* LDKAccess_JCalls_clone(const void* this_arg) {
-       LDKAccess_JCalls *j_calls = (LDKAccess_JCalls*) this_arg;
-       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
-       return (void*) this_arg;
+       return (*env)->CallVoidMethod(env, obj, j_calls->handle_shutdown_meth, their_node_id_arr, msg_ref);
 }
-static inline LDKAccess LDKAccess_init (JNIEnv *env, jclass clz, jobject o) {
-       jclass c = (*env)->GetObjectClass(env, o);
-       CHECK(c != NULL);
-       LDKAccess_JCalls *calls = MALLOC(sizeof(LDKAccess_JCalls), "LDKAccess_JCalls");
-       atomic_init(&calls->refcnt, 1);
-       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
-       calls->o = (*env)->NewWeakGlobalRef(env, o);
-       calls->get_utxo_meth = (*env)->GetMethodID(env, c, "get_utxo", "([BJ)J");
-       CHECK(calls->get_utxo_meth != NULL);
-
-       LDKAccess ret = {
-               .this_arg = (void*) calls,
-               .get_utxo = get_utxo_jcall,
-               .free = LDKAccess_JCalls_free,
-       };
-       return ret;
+void handle_closing_signed_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKClosingSigned * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
+       LDKClosingSigned msg_var = *msg;
+       msg_var = ClosingSigned_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallVoidMethod(env, obj, j_calls->handle_closing_signed_meth, their_node_id_arr, msg_ref);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKAccess_1new(JNIEnv *env, jclass clz, jobject o) {
-       LDKAccess *res_ptr = MALLOC(sizeof(LDKAccess), "LDKAccess");
-       *res_ptr = LDKAccess_init(env, clz, o);
-       return (long)res_ptr;
+void handle_update_add_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateAddHTLC * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
+       LDKUpdateAddHTLC msg_var = *msg;
+       msg_var = UpdateAddHTLC_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallVoidMethod(env, obj, j_calls->handle_update_add_htlc_meth, their_node_id_arr, msg_ref);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Access_1get_1utxo(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray genesis_hash, int64_t short_channel_id) {
-       LDKAccess* this_arg_conv = (LDKAccess*)this_arg;
-       unsigned char genesis_hash_arr[32];
-       CHECK((*env)->GetArrayLength(env, genesis_hash) == 32);
-       (*env)->GetByteArrayRegion(env, genesis_hash, 0, 32, genesis_hash_arr);
-       unsigned char (*genesis_hash_ref)[32] = &genesis_hash_arr;
-       LDKCResult_TxOutAccessErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxOutAccessErrorZ), "LDKCResult_TxOutAccessErrorZ");
-       *ret_conv = (this_arg_conv->get_utxo)(this_arg_conv->this_arg, genesis_hash_ref, short_channel_id);
-       return (long)ret_conv;
+void handle_update_fulfill_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFulfillHTLC * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
+       LDKUpdateFulfillHTLC msg_var = *msg;
+       msg_var = UpdateFulfillHTLC_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallVoidMethod(env, obj, j_calls->handle_update_fulfill_htlc_meth, their_node_id_arr, msg_ref);
 }
-
-typedef struct LDKFilter_JCalls {
-       atomic_size_t refcnt;
-       JavaVM *vm;
-       jweak o;
-       jmethodID register_tx_meth;
-       jmethodID register_output_meth;
-} LDKFilter_JCalls;
-static void LDKFilter_JCalls_free(void* this_arg) {
-       LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
-       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
-               JNIEnv *env;
-               DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
-               FREE(j_calls);
+void handle_update_fail_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFailHTLC * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
+       LDKUpdateFailHTLC msg_var = *msg;
+       msg_var = UpdateFailHTLC_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
        }
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallVoidMethod(env, obj, j_calls->handle_update_fail_htlc_meth, their_node_id_arr, msg_ref);
 }
-void register_tx_jcall(const void* this_arg, const uint8_t (* txid)[32], LDKu8slice script_pubkey) {
-       LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
+void handle_update_fail_malformed_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFailMalformedHTLC * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
        JNIEnv *env;
        DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       int8_tArray txid_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, txid_arr, 0, 32, *txid);
-       LDKu8slice script_pubkey_var = script_pubkey;
-       int8_tArray script_pubkey_arr = (*env)->NewByteArray(env, script_pubkey_var.datalen);
-       (*env)->SetByteArrayRegion(env, script_pubkey_arr, 0, script_pubkey_var.datalen, script_pubkey_var.data);
+       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
+       LDKUpdateFailMalformedHTLC msg_var = *msg;
+       msg_var = UpdateFailMalformedHTLC_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->register_tx_meth, txid_arr, script_pubkey_arr);
+       return (*env)->CallVoidMethod(env, obj, j_calls->handle_update_fail_malformed_htlc_meth, their_node_id_arr, msg_ref);
 }
-void register_output_jcall(const void* this_arg, const LDKOutPoint * outpoint, LDKu8slice script_pubkey) {
-       LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
+void handle_commitment_signed_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKCommitmentSigned * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
        JNIEnv *env;
        DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       LDKOutPoint outpoint_var = *outpoint;
-       outpoint_var = OutPoint_clone(outpoint);
-       CHECK((((long)outpoint_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&outpoint_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long outpoint_ref = (long)outpoint_var.inner;
-       if (outpoint_var.is_owned) {
-               outpoint_ref |= 1;
+       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
+       LDKCommitmentSigned msg_var = *msg;
+       msg_var = CommitmentSigned_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
        }
-       LDKu8slice script_pubkey_var = script_pubkey;
-       int8_tArray script_pubkey_arr = (*env)->NewByteArray(env, script_pubkey_var.datalen);
-       (*env)->SetByteArrayRegion(env, script_pubkey_arr, 0, script_pubkey_var.datalen, script_pubkey_var.data);
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->register_output_meth, outpoint_ref, script_pubkey_arr);
-}
-static void* LDKFilter_JCalls_clone(const void* this_arg) {
-       LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
-       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
-       return (void*) this_arg;
+       return (*env)->CallVoidMethod(env, obj, j_calls->handle_commitment_signed_meth, their_node_id_arr, msg_ref);
 }
-static inline LDKFilter LDKFilter_init (JNIEnv *env, jclass clz, jobject o) {
-       jclass c = (*env)->GetObjectClass(env, o);
-       CHECK(c != NULL);
-       LDKFilter_JCalls *calls = MALLOC(sizeof(LDKFilter_JCalls), "LDKFilter_JCalls");
-       atomic_init(&calls->refcnt, 1);
-       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
-       calls->o = (*env)->NewWeakGlobalRef(env, o);
-       calls->register_tx_meth = (*env)->GetMethodID(env, c, "register_tx", "([B[B)V");
-       CHECK(calls->register_tx_meth != NULL);
-       calls->register_output_meth = (*env)->GetMethodID(env, c, "register_output", "(J[B)V");
-       CHECK(calls->register_output_meth != NULL);
-
-       LDKFilter ret = {
-               .this_arg = (void*) calls,
-               .register_tx = register_tx_jcall,
-               .register_output = register_output_jcall,
-               .free = LDKFilter_JCalls_free,
-       };
-       return ret;
+void handle_revoke_and_ack_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKRevokeAndACK * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
+       LDKRevokeAndACK msg_var = *msg;
+       msg_var = RevokeAndACK_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallVoidMethod(env, obj, j_calls->handle_revoke_and_ack_meth, their_node_id_arr, msg_ref);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKFilter_1new(JNIEnv *env, jclass clz, jobject o) {
-       LDKFilter *res_ptr = MALLOC(sizeof(LDKFilter), "LDKFilter");
-       *res_ptr = LDKFilter_init(env, clz, o);
-       return (long)res_ptr;
+void handle_update_fee_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFee * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
+       LDKUpdateFee msg_var = *msg;
+       msg_var = UpdateFee_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallVoidMethod(env, obj, j_calls->handle_update_fee_meth, their_node_id_arr, msg_ref);
 }
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Filter_1register_1tx(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray txid, int8_tArray script_pubkey) {
-       LDKFilter* this_arg_conv = (LDKFilter*)this_arg;
-       unsigned char txid_arr[32];
-       CHECK((*env)->GetArrayLength(env, txid) == 32);
-       (*env)->GetByteArrayRegion(env, txid, 0, 32, txid_arr);
-       unsigned char (*txid_ref)[32] = &txid_arr;
-       LDKu8slice script_pubkey_ref;
-       script_pubkey_ref.datalen = (*env)->GetArrayLength(env, script_pubkey);
-       script_pubkey_ref.data = (*env)->GetByteArrayElements (env, script_pubkey, NULL);
-       (this_arg_conv->register_tx)(this_arg_conv->this_arg, txid_ref, script_pubkey_ref);
-       (*env)->ReleaseByteArrayElements(env, script_pubkey, (int8_t*)script_pubkey_ref.data, 0);
+void handle_announcement_signatures_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKAnnouncementSignatures * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
+       LDKAnnouncementSignatures msg_var = *msg;
+       msg_var = AnnouncementSignatures_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallVoidMethod(env, obj, j_calls->handle_announcement_signatures_meth, their_node_id_arr, msg_ref);
 }
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Filter_1register_1output(JNIEnv *env, jclass clz, int64_t this_arg, int64_t outpoint, int8_tArray script_pubkey) {
-       LDKFilter* this_arg_conv = (LDKFilter*)this_arg;
-       LDKOutPoint outpoint_conv;
-       outpoint_conv.inner = (void*)(outpoint & (~1));
-       outpoint_conv.is_owned = false;
-       LDKu8slice script_pubkey_ref;
-       script_pubkey_ref.datalen = (*env)->GetArrayLength(env, script_pubkey);
-       script_pubkey_ref.data = (*env)->GetByteArrayElements (env, script_pubkey, NULL);
-       (this_arg_conv->register_output)(this_arg_conv->this_arg, &outpoint_conv, script_pubkey_ref);
-       (*env)->ReleaseByteArrayElements(env, script_pubkey, (int8_t*)script_pubkey_ref.data, 0);
+void peer_disconnected_jcall(const void* this_arg, LDKPublicKey their_node_id, bool no_connection_possible) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallVoidMethod(env, obj, j_calls->peer_disconnected_meth, their_node_id_arr, no_connection_possible);
 }
-
-typedef struct LDKPersist_JCalls {
-       atomic_size_t refcnt;
-       JavaVM *vm;
-       jweak o;
-       jmethodID persist_new_channel_meth;
-       jmethodID update_persisted_channel_meth;
-} LDKPersist_JCalls;
-static void LDKPersist_JCalls_free(void* this_arg) {
-       LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
-       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
-               JNIEnv *env;
-               DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
-               FREE(j_calls);
+void peer_connected_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
+       LDKInit msg_var = *msg;
+       msg_var = Init_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
        }
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallVoidMethod(env, obj, j_calls->peer_connected_meth, their_node_id_arr, msg_ref);
 }
-LDKCResult_NoneChannelMonitorUpdateErrZ persist_new_channel_jcall(const void* this_arg, LDKOutPoint id, const LDKChannelMonitor * data) {
-       LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
+void handle_channel_reestablish_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelReestablish * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
        JNIEnv *env;
        DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       LDKOutPoint id_var = id;
-       CHECK((((long)id_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&id_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long id_ref = (long)id_var.inner;
-       if (id_var.is_owned) {
-               id_ref |= 1;
-       }
-       LDKChannelMonitor data_var = *data;
-       data_var = ChannelMonitor_clone(data);
-       CHECK((((long)data_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&data_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long data_ref = (long)data_var.inner;
-       if (data_var.is_owned) {
-               data_ref |= 1;
+       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
+       LDKChannelReestablish msg_var = *msg;
+       msg_var = ChannelReestablish_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
        }
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret = (LDKCResult_NoneChannelMonitorUpdateErrZ*)(*env)->CallLongMethod(env, obj, j_calls->persist_new_channel_meth, id_ref, data_ref);
-       LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone((LDKCResult_NoneChannelMonitorUpdateErrZ*)ret);
-       return ret_conv;
+       return (*env)->CallVoidMethod(env, obj, j_calls->handle_channel_reestablish_meth, their_node_id_arr, msg_ref);
 }
-LDKCResult_NoneChannelMonitorUpdateErrZ update_persisted_channel_jcall(const void* this_arg, LDKOutPoint id, const LDKChannelMonitorUpdate * update, const LDKChannelMonitor * data) {
-       LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
+void handle_error_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKErrorMessage * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
        JNIEnv *env;
        DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       LDKOutPoint id_var = id;
-       CHECK((((long)id_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&id_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long id_ref = (long)id_var.inner;
-       if (id_var.is_owned) {
-               id_ref |= 1;
-       }
-       LDKChannelMonitorUpdate update_var = *update;
-       update_var = ChannelMonitorUpdate_clone(update);
-       CHECK((((long)update_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&update_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long update_ref = (long)update_var.inner;
-       if (update_var.is_owned) {
-               update_ref |= 1;
-       }
-       LDKChannelMonitor data_var = *data;
-       data_var = ChannelMonitor_clone(data);
-       CHECK((((long)data_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&data_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long data_ref = (long)data_var.inner;
-       if (data_var.is_owned) {
-               data_ref |= 1;
+       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
+       LDKErrorMessage msg_var = *msg;
+       msg_var = ErrorMessage_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
        }
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret = (LDKCResult_NoneChannelMonitorUpdateErrZ*)(*env)->CallLongMethod(env, obj, j_calls->update_persisted_channel_meth, id_ref, update_ref, data_ref);
-       LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone((LDKCResult_NoneChannelMonitorUpdateErrZ*)ret);
-       return ret_conv;
+       return (*env)->CallVoidMethod(env, obj, j_calls->handle_error_meth, their_node_id_arr, msg_ref);
 }
-static void* LDKPersist_JCalls_clone(const void* this_arg) {
-       LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
+static void* LDKChannelMessageHandler_JCalls_clone(const void* this_arg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
        atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+       atomic_fetch_add_explicit(&j_calls->MessageSendEventsProvider->refcnt, 1, memory_order_release);
        return (void*) this_arg;
 }
-static inline LDKPersist LDKPersist_init (JNIEnv *env, jclass clz, jobject o) {
+static inline LDKChannelMessageHandler LDKChannelMessageHandler_init (JNIEnv *env, jclass clz, jobject o, jobject MessageSendEventsProvider) {
        jclass c = (*env)->GetObjectClass(env, o);
        CHECK(c != NULL);
-       LDKPersist_JCalls *calls = MALLOC(sizeof(LDKPersist_JCalls), "LDKPersist_JCalls");
+       LDKChannelMessageHandler_JCalls *calls = MALLOC(sizeof(LDKChannelMessageHandler_JCalls), "LDKChannelMessageHandler_JCalls");
        atomic_init(&calls->refcnt, 1);
        DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
        calls->o = (*env)->NewWeakGlobalRef(env, o);
-       calls->persist_new_channel_meth = (*env)->GetMethodID(env, c, "persist_new_channel", "(JJ)J");
-       CHECK(calls->persist_new_channel_meth != NULL);
-       calls->update_persisted_channel_meth = (*env)->GetMethodID(env, c, "update_persisted_channel", "(JJJ)J");
-       CHECK(calls->update_persisted_channel_meth != NULL);
+       calls->handle_open_channel_meth = (*env)->GetMethodID(env, c, "handle_open_channel", "([BJJ)V");
+       CHECK(calls->handle_open_channel_meth != NULL);
+       calls->handle_accept_channel_meth = (*env)->GetMethodID(env, c, "handle_accept_channel", "([BJJ)V");
+       CHECK(calls->handle_accept_channel_meth != NULL);
+       calls->handle_funding_created_meth = (*env)->GetMethodID(env, c, "handle_funding_created", "([BJ)V");
+       CHECK(calls->handle_funding_created_meth != NULL);
+       calls->handle_funding_signed_meth = (*env)->GetMethodID(env, c, "handle_funding_signed", "([BJ)V");
+       CHECK(calls->handle_funding_signed_meth != NULL);
+       calls->handle_funding_locked_meth = (*env)->GetMethodID(env, c, "handle_funding_locked", "([BJ)V");
+       CHECK(calls->handle_funding_locked_meth != NULL);
+       calls->handle_shutdown_meth = (*env)->GetMethodID(env, c, "handle_shutdown", "([BJ)V");
+       CHECK(calls->handle_shutdown_meth != NULL);
+       calls->handle_closing_signed_meth = (*env)->GetMethodID(env, c, "handle_closing_signed", "([BJ)V");
+       CHECK(calls->handle_closing_signed_meth != NULL);
+       calls->handle_update_add_htlc_meth = (*env)->GetMethodID(env, c, "handle_update_add_htlc", "([BJ)V");
+       CHECK(calls->handle_update_add_htlc_meth != NULL);
+       calls->handle_update_fulfill_htlc_meth = (*env)->GetMethodID(env, c, "handle_update_fulfill_htlc", "([BJ)V");
+       CHECK(calls->handle_update_fulfill_htlc_meth != NULL);
+       calls->handle_update_fail_htlc_meth = (*env)->GetMethodID(env, c, "handle_update_fail_htlc", "([BJ)V");
+       CHECK(calls->handle_update_fail_htlc_meth != NULL);
+       calls->handle_update_fail_malformed_htlc_meth = (*env)->GetMethodID(env, c, "handle_update_fail_malformed_htlc", "([BJ)V");
+       CHECK(calls->handle_update_fail_malformed_htlc_meth != NULL);
+       calls->handle_commitment_signed_meth = (*env)->GetMethodID(env, c, "handle_commitment_signed", "([BJ)V");
+       CHECK(calls->handle_commitment_signed_meth != NULL);
+       calls->handle_revoke_and_ack_meth = (*env)->GetMethodID(env, c, "handle_revoke_and_ack", "([BJ)V");
+       CHECK(calls->handle_revoke_and_ack_meth != NULL);
+       calls->handle_update_fee_meth = (*env)->GetMethodID(env, c, "handle_update_fee", "([BJ)V");
+       CHECK(calls->handle_update_fee_meth != NULL);
+       calls->handle_announcement_signatures_meth = (*env)->GetMethodID(env, c, "handle_announcement_signatures", "([BJ)V");
+       CHECK(calls->handle_announcement_signatures_meth != NULL);
+       calls->peer_disconnected_meth = (*env)->GetMethodID(env, c, "peer_disconnected", "([BZ)V");
+       CHECK(calls->peer_disconnected_meth != NULL);
+       calls->peer_connected_meth = (*env)->GetMethodID(env, c, "peer_connected", "([BJ)V");
+       CHECK(calls->peer_connected_meth != NULL);
+       calls->handle_channel_reestablish_meth = (*env)->GetMethodID(env, c, "handle_channel_reestablish", "([BJ)V");
+       CHECK(calls->handle_channel_reestablish_meth != NULL);
+       calls->handle_error_meth = (*env)->GetMethodID(env, c, "handle_error", "([BJ)V");
+       CHECK(calls->handle_error_meth != NULL);
 
-       LDKPersist ret = {
+       LDKChannelMessageHandler ret = {
                .this_arg = (void*) calls,
-               .persist_new_channel = persist_new_channel_jcall,
-               .update_persisted_channel = update_persisted_channel_jcall,
-               .free = LDKPersist_JCalls_free,
+               .handle_open_channel = handle_open_channel_jcall,
+               .handle_accept_channel = handle_accept_channel_jcall,
+               .handle_funding_created = handle_funding_created_jcall,
+               .handle_funding_signed = handle_funding_signed_jcall,
+               .handle_funding_locked = handle_funding_locked_jcall,
+               .handle_shutdown = handle_shutdown_jcall,
+               .handle_closing_signed = handle_closing_signed_jcall,
+               .handle_update_add_htlc = handle_update_add_htlc_jcall,
+               .handle_update_fulfill_htlc = handle_update_fulfill_htlc_jcall,
+               .handle_update_fail_htlc = handle_update_fail_htlc_jcall,
+               .handle_update_fail_malformed_htlc = handle_update_fail_malformed_htlc_jcall,
+               .handle_commitment_signed = handle_commitment_signed_jcall,
+               .handle_revoke_and_ack = handle_revoke_and_ack_jcall,
+               .handle_update_fee = handle_update_fee_jcall,
+               .handle_announcement_signatures = handle_announcement_signatures_jcall,
+               .peer_disconnected = peer_disconnected_jcall,
+               .peer_connected = peer_connected_jcall,
+               .handle_channel_reestablish = handle_channel_reestablish_jcall,
+               .handle_error = handle_error_jcall,
+               .free = LDKChannelMessageHandler_JCalls_free,
+               .MessageSendEventsProvider = LDKMessageSendEventsProvider_init(env, clz, MessageSendEventsProvider),
        };
+       calls->MessageSendEventsProvider = ret.MessageSendEventsProvider.this_arg;
        return ret;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKPersist_1new(JNIEnv *env, jclass clz, jobject o) {
-       LDKPersist *res_ptr = MALLOC(sizeof(LDKPersist), "LDKPersist");
-       *res_ptr = LDKPersist_init(env, clz, o);
-       return (long)res_ptr;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKChannelMessageHandler_1new(JNIEnv *env, jclass clz, jobject o, jobject MessageSendEventsProvider) {
+       LDKChannelMessageHandler *res_ptr = MALLOC(sizeof(LDKChannelMessageHandler), "LDKChannelMessageHandler");
+       *res_ptr = LDKChannelMessageHandler_init(env, clz, o, MessageSendEventsProvider);
+       return (long)res_ptr;
+}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1open_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t their_features, int64_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
+       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
+       LDKInitFeatures their_features_conv;
+       their_features_conv.inner = (void*)(their_features & (~1));
+       their_features_conv.is_owned = (their_features & 1) || (their_features == 0);
+       their_features_conv = InitFeatures_clone(&their_features_conv);
+       LDKOpenChannel msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_open_channel)(this_arg_conv->this_arg, their_node_id_ref, their_features_conv, &msg_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1accept_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t their_features, int64_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
+       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
+       LDKInitFeatures their_features_conv;
+       their_features_conv.inner = (void*)(their_features & (~1));
+       their_features_conv.is_owned = (their_features & 1) || (their_features == 0);
+       their_features_conv = InitFeatures_clone(&their_features_conv);
+       LDKAcceptChannel msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_accept_channel)(this_arg_conv->this_arg, their_node_id_ref, their_features_conv, &msg_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1funding_1created(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
+       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
+       LDKFundingCreated msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_funding_created)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1funding_1signed(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
+       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
+       LDKFundingSigned msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_funding_signed)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1funding_1locked(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
+       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
+       LDKFundingLocked msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_funding_locked)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1shutdown(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
+       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
+       LDKShutdown msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_shutdown)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1closing_1signed(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
+       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
+       LDKClosingSigned msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_closing_signed)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1update_1add_1htlc(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
+       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
+       LDKUpdateAddHTLC msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_update_add_htlc)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1update_1fulfill_1htlc(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
+       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
+       LDKUpdateFulfillHTLC msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_update_fulfill_htlc)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1update_1fail_1htlc(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
+       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
+       LDKUpdateFailHTLC msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_update_fail_htlc)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1update_1fail_1malformed_1htlc(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
+       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
+       LDKUpdateFailMalformedHTLC msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_update_fail_malformed_htlc)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1commitment_1signed(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
+       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
+       LDKCommitmentSigned msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_commitment_signed)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1revoke_1and_1ack(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
+       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
+       LDKRevokeAndACK msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_revoke_and_ack)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1update_1fee(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
+       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
+       LDKUpdateFee msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_update_fee)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1announcement_1signatures(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
+       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
+       LDKAnnouncementSignatures msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_announcement_signatures)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1peer_1disconnected(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, jboolean no_connection_possible) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
+       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
+       (this_arg_conv->peer_disconnected)(this_arg_conv->this_arg, their_node_id_ref, no_connection_possible);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Persist_1persist_1new_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t id, int64_t data) {
-       LDKPersist* this_arg_conv = (LDKPersist*)this_arg;
-       LDKOutPoint id_conv;
-       id_conv.inner = (void*)(id & (~1));
-       id_conv.is_owned = (id & 1) || (id == 0);
-       id_conv = OutPoint_clone(&id_conv);
-       LDKChannelMonitor data_conv;
-       data_conv.inner = (void*)(data & (~1));
-       data_conv.is_owned = false;
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
-       *ret_conv = (this_arg_conv->persist_new_channel)(this_arg_conv->this_arg, id_conv, &data_conv);
-       return (long)ret_conv;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1peer_1connected(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
+       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
+       LDKInit msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Persist_1update_1persisted_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t id, int64_t update, int64_t data) {
-       LDKPersist* this_arg_conv = (LDKPersist*)this_arg;
-       LDKOutPoint id_conv;
-       id_conv.inner = (void*)(id & (~1));
-       id_conv.is_owned = (id & 1) || (id == 0);
-       id_conv = OutPoint_clone(&id_conv);
-       LDKChannelMonitorUpdate update_conv;
-       update_conv.inner = (void*)(update & (~1));
-       update_conv.is_owned = false;
-       LDKChannelMonitor data_conv;
-       data_conv.inner = (void*)(data & (~1));
-       data_conv.is_owned = false;
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
-       *ret_conv = (this_arg_conv->update_persisted_channel)(this_arg_conv->this_arg, id_conv, &update_conv, &data_conv);
-       return (long)ret_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1channel_1reestablish(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
+       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
+       LDKChannelReestablish msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_channel_reestablish)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
 }
 
-typedef struct LDKChannelMessageHandler_JCalls {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1error(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
+       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
+       LDKErrorMessage msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_error)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+}
+
+typedef struct LDKRoutingMessageHandler_JCalls {
        atomic_size_t refcnt;
        JavaVM *vm;
        jweak o;
        LDKMessageSendEventsProvider_JCalls* MessageSendEventsProvider;
-       jmethodID handle_open_channel_meth;
-       jmethodID handle_accept_channel_meth;
-       jmethodID handle_funding_created_meth;
-       jmethodID handle_funding_signed_meth;
-       jmethodID handle_funding_locked_meth;
-       jmethodID handle_shutdown_meth;
-       jmethodID handle_closing_signed_meth;
-       jmethodID handle_update_add_htlc_meth;
-       jmethodID handle_update_fulfill_htlc_meth;
-       jmethodID handle_update_fail_htlc_meth;
-       jmethodID handle_update_fail_malformed_htlc_meth;
-       jmethodID handle_commitment_signed_meth;
-       jmethodID handle_revoke_and_ack_meth;
-       jmethodID handle_update_fee_meth;
-       jmethodID handle_announcement_signatures_meth;
-       jmethodID peer_disconnected_meth;
-       jmethodID peer_connected_meth;
-       jmethodID handle_channel_reestablish_meth;
-       jmethodID handle_error_meth;
-} LDKChannelMessageHandler_JCalls;
-static void LDKChannelMessageHandler_JCalls_free(void* this_arg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       jmethodID handle_node_announcement_meth;
+       jmethodID handle_channel_announcement_meth;
+       jmethodID handle_channel_update_meth;
+       jmethodID handle_htlc_fail_channel_update_meth;
+       jmethodID get_next_channel_announcements_meth;
+       jmethodID get_next_node_announcements_meth;
+       jmethodID sync_routing_table_meth;
+       jmethodID handle_reply_channel_range_meth;
+       jmethodID handle_reply_short_channel_ids_end_meth;
+       jmethodID handle_query_channel_range_meth;
+       jmethodID handle_query_short_channel_ids_meth;
+} LDKRoutingMessageHandler_JCalls;
+static void LDKRoutingMessageHandler_JCalls_free(void* this_arg) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
        if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
                JNIEnv *env;
                DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
@@ -4063,21 +5456,12 @@ static void LDKChannelMessageHandler_JCalls_free(void* this_arg) {
                FREE(j_calls);
        }
 }
-void handle_open_channel_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKInitFeatures their_features, const LDKOpenChannel * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+LDKCResult_boolLightningErrorZ handle_node_announcement_jcall(const void* this_arg, const LDKNodeAnnouncement * msg) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
        JNIEnv *env;
        DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
-       LDKInitFeatures their_features_var = their_features;
-       CHECK((((long)their_features_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&their_features_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long their_features_ref = (long)their_features_var.inner;
-       if (their_features_var.is_owned) {
-               their_features_ref |= 1;
-       }
-       LDKOpenChannel msg_var = *msg;
-       msg_var = OpenChannel_clone(msg);
+       LDKNodeAnnouncement msg_var = *msg;
+       msg_var = NodeAnnouncement_clone(msg);
        CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long msg_ref = (long)msg_var.inner;
@@ -4086,23 +5470,17 @@ void handle_open_channel_jcall(const void* this_arg, LDKPublicKey their_node_id,
        }
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->handle_open_channel_meth, their_node_id_arr, their_features_ref, msg_ref);
+       LDKCResult_boolLightningErrorZ* ret = (LDKCResult_boolLightningErrorZ*)(*env)->CallLongMethod(env, obj, j_calls->handle_node_announcement_meth, msg_ref);
+       LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_boolLightningErrorZ_clone((LDKCResult_boolLightningErrorZ*)ret);
+       return ret_conv;
 }
-void handle_accept_channel_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKInitFeatures their_features, const LDKAcceptChannel * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+LDKCResult_boolLightningErrorZ handle_channel_announcement_jcall(const void* this_arg, const LDKChannelAnnouncement * msg) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
        JNIEnv *env;
        DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
-       LDKInitFeatures their_features_var = their_features;
-       CHECK((((long)their_features_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&their_features_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long their_features_ref = (long)their_features_var.inner;
-       if (their_features_var.is_owned) {
-               their_features_ref |= 1;
-       }
-       LDKAcceptChannel msg_var = *msg;
-       msg_var = AcceptChannel_clone(msg);
+       LDKChannelAnnouncement msg_var = *msg;
+       msg_var = ChannelAnnouncement_clone(msg);
        CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long msg_ref = (long)msg_var.inner;
@@ -4111,16 +5489,17 @@ void handle_accept_channel_jcall(const void* this_arg, LDKPublicKey their_node_i
        }
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->handle_accept_channel_meth, their_node_id_arr, their_features_ref, msg_ref);
+       LDKCResult_boolLightningErrorZ* ret = (LDKCResult_boolLightningErrorZ*)(*env)->CallLongMethod(env, obj, j_calls->handle_channel_announcement_meth, msg_ref);
+       LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_boolLightningErrorZ_clone((LDKCResult_boolLightningErrorZ*)ret);
+       return ret_conv;
 }
-void handle_funding_created_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingCreated * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+LDKCResult_boolLightningErrorZ handle_channel_update_jcall(const void* this_arg, const LDKChannelUpdate * msg) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
        JNIEnv *env;
        DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
-       LDKFundingCreated msg_var = *msg;
-       msg_var = FundingCreated_clone(msg);
+       LDKChannelUpdate msg_var = *msg;
+       msg_var = ChannelUpdate_clone(msg);
        CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long msg_ref = (long)msg_var.inner;
@@ -4129,34 +5508,95 @@ void handle_funding_created_jcall(const void* this_arg, LDKPublicKey their_node_
        }
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->handle_funding_created_meth, their_node_id_arr, msg_ref);
+       LDKCResult_boolLightningErrorZ* ret = (LDKCResult_boolLightningErrorZ*)(*env)->CallLongMethod(env, obj, j_calls->handle_channel_update_meth, msg_ref);
+       LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_boolLightningErrorZ_clone((LDKCResult_boolLightningErrorZ*)ret);
+       return ret_conv;
 }
-void handle_funding_signed_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingSigned * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+void handle_htlc_fail_channel_update_jcall(const void* this_arg, const LDKHTLCFailChannelUpdate * update) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       long ret_update = (long)update;
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallVoidMethod(env, obj, j_calls->handle_htlc_fail_channel_update_meth, ret_update);
+}
+LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ get_next_channel_announcements_jcall(const void* this_arg, uint64_t starting_point, uint8_t batch_amount) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       int64_tArray arg = (*env)->CallObjectMethod(env, obj, j_calls->get_next_channel_announcements_meth, starting_point, batch_amount);
+       LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ arg_constr;
+       arg_constr.datalen = (*env)->GetArrayLength(env, arg);
+       if (arg_constr.datalen > 0)
+               arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ Elements");
+       else
+               arg_constr.data = NULL;
+       int64_t* arg_vals = (*env)->GetLongArrayElements (env, arg, NULL);
+       for (size_t l = 0; l < arg_constr.datalen; l++) {
+               int64_t arr_conv_63 = arg_vals[l];
+               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ arr_conv_63_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)arr_conv_63) & ~1);
+               FREE((void*)arr_conv_63);
+               arg_constr.data[l] = arr_conv_63_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, arg, arg_vals, 0);
+       return arg_constr;
+}
+LDKCVec_NodeAnnouncementZ get_next_node_announcements_jcall(const void* this_arg, LDKPublicKey starting_point, uint8_t batch_amount) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       int8_tArray starting_point_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, starting_point_arr, 0, 33, starting_point.compressed_form);
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       int64_tArray arg = (*env)->CallObjectMethod(env, obj, j_calls->get_next_node_announcements_meth, starting_point_arr, batch_amount);
+       LDKCVec_NodeAnnouncementZ arg_constr;
+       arg_constr.datalen = (*env)->GetArrayLength(env, arg);
+       if (arg_constr.datalen > 0)
+               arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKNodeAnnouncement), "LDKCVec_NodeAnnouncementZ Elements");
+       else
+               arg_constr.data = NULL;
+       int64_t* arg_vals = (*env)->GetLongArrayElements (env, arg, NULL);
+       for (size_t s = 0; s < arg_constr.datalen; s++) {
+               int64_t arr_conv_18 = arg_vals[s];
+               LDKNodeAnnouncement arr_conv_18_conv;
+               arr_conv_18_conv.inner = (void*)(arr_conv_18 & (~1));
+               arr_conv_18_conv.is_owned = (arr_conv_18 & 1) || (arr_conv_18 == 0);
+               arr_conv_18_conv = NodeAnnouncement_clone(&arr_conv_18_conv);
+               arg_constr.data[s] = arr_conv_18_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, arg, arg_vals, 0);
+       return arg_constr;
+}
+void sync_routing_table_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * init) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
        JNIEnv *env;
        DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
        int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
        (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
-       LDKFundingSigned msg_var = *msg;
-       msg_var = FundingSigned_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
+       LDKInit init_var = *init;
+       init_var = Init_clone(init);
+       CHECK((((long)init_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&init_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long init_ref = (long)init_var.inner;
+       if (init_var.is_owned) {
+               init_ref |= 1;
        }
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->handle_funding_signed_meth, their_node_id_arr, msg_ref);
+       return (*env)->CallVoidMethod(env, obj, j_calls->sync_routing_table_meth, their_node_id_arr, init_ref);
 }
-void handle_funding_locked_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingLocked * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+LDKCResult_NoneLightningErrorZ handle_reply_channel_range_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKReplyChannelRange msg) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
        JNIEnv *env;
        DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
        int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
        (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
-       LDKFundingLocked msg_var = *msg;
-       msg_var = FundingLocked_clone(msg);
+       LDKReplyChannelRange msg_var = msg;
        CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long msg_ref = (long)msg_var.inner;
@@ -4165,16 +5605,18 @@ void handle_funding_locked_jcall(const void* this_arg, LDKPublicKey their_node_i
        }
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->handle_funding_locked_meth, their_node_id_arr, msg_ref);
+       LDKCResult_NoneLightningErrorZ* ret = (LDKCResult_NoneLightningErrorZ*)(*env)->CallLongMethod(env, obj, j_calls->handle_reply_channel_range_meth, their_node_id_arr, msg_ref);
+       LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_NoneLightningErrorZ_clone((LDKCResult_NoneLightningErrorZ*)ret);
+       return ret_conv;
 }
-void handle_shutdown_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKShutdown * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+LDKCResult_NoneLightningErrorZ handle_reply_short_channel_ids_end_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKReplyShortChannelIdsEnd msg) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
        JNIEnv *env;
        DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
        int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
        (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
-       LDKShutdown msg_var = *msg;
-       msg_var = Shutdown_clone(msg);
+       LDKReplyShortChannelIdsEnd msg_var = msg;
        CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long msg_ref = (long)msg_var.inner;
@@ -4183,16 +5625,18 @@ void handle_shutdown_jcall(const void* this_arg, LDKPublicKey their_node_id, con
        }
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->handle_shutdown_meth, their_node_id_arr, msg_ref);
+       LDKCResult_NoneLightningErrorZ* ret = (LDKCResult_NoneLightningErrorZ*)(*env)->CallLongMethod(env, obj, j_calls->handle_reply_short_channel_ids_end_meth, their_node_id_arr, msg_ref);
+       LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_NoneLightningErrorZ_clone((LDKCResult_NoneLightningErrorZ*)ret);
+       return ret_conv;
 }
-void handle_closing_signed_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKClosingSigned * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+LDKCResult_NoneLightningErrorZ handle_query_channel_range_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKQueryChannelRange msg) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
        JNIEnv *env;
        DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
        int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
        (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
-       LDKClosingSigned msg_var = *msg;
-       msg_var = ClosingSigned_clone(msg);
+       LDKQueryChannelRange msg_var = msg;
        CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long msg_ref = (long)msg_var.inner;
@@ -4201,16 +5645,18 @@ void handle_closing_signed_jcall(const void* this_arg, LDKPublicKey their_node_i
        }
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->handle_closing_signed_meth, their_node_id_arr, msg_ref);
+       LDKCResult_NoneLightningErrorZ* ret = (LDKCResult_NoneLightningErrorZ*)(*env)->CallLongMethod(env, obj, j_calls->handle_query_channel_range_meth, their_node_id_arr, msg_ref);
+       LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_NoneLightningErrorZ_clone((LDKCResult_NoneLightningErrorZ*)ret);
+       return ret_conv;
 }
-void handle_update_add_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateAddHTLC * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+LDKCResult_NoneLightningErrorZ handle_query_short_channel_ids_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKQueryShortChannelIds msg) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
        JNIEnv *env;
        DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
        int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
        (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
-       LDKUpdateAddHTLC msg_var = *msg;
-       msg_var = UpdateAddHTLC_clone(msg);
+       LDKQueryShortChannelIds msg_var = msg;
        CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long msg_ref = (long)msg_var.inner;
@@ -4219,1132 +5665,1372 @@ void handle_update_add_htlc_jcall(const void* this_arg, LDKPublicKey their_node_
        }
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->handle_update_add_htlc_meth, their_node_id_arr, msg_ref);
+       LDKCResult_NoneLightningErrorZ* ret = (LDKCResult_NoneLightningErrorZ*)(*env)->CallLongMethod(env, obj, j_calls->handle_query_short_channel_ids_meth, their_node_id_arr, msg_ref);
+       LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_NoneLightningErrorZ_clone((LDKCResult_NoneLightningErrorZ*)ret);
+       return ret_conv;
+}
+static void* LDKRoutingMessageHandler_JCalls_clone(const void* this_arg) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+       atomic_fetch_add_explicit(&j_calls->MessageSendEventsProvider->refcnt, 1, memory_order_release);
+       return (void*) this_arg;
+}
+static inline LDKRoutingMessageHandler LDKRoutingMessageHandler_init (JNIEnv *env, jclass clz, jobject o, jobject MessageSendEventsProvider) {
+       jclass c = (*env)->GetObjectClass(env, o);
+       CHECK(c != NULL);
+       LDKRoutingMessageHandler_JCalls *calls = MALLOC(sizeof(LDKRoutingMessageHandler_JCalls), "LDKRoutingMessageHandler_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+       calls->o = (*env)->NewWeakGlobalRef(env, o);
+       calls->handle_node_announcement_meth = (*env)->GetMethodID(env, c, "handle_node_announcement", "(J)J");
+       CHECK(calls->handle_node_announcement_meth != NULL);
+       calls->handle_channel_announcement_meth = (*env)->GetMethodID(env, c, "handle_channel_announcement", "(J)J");
+       CHECK(calls->handle_channel_announcement_meth != NULL);
+       calls->handle_channel_update_meth = (*env)->GetMethodID(env, c, "handle_channel_update", "(J)J");
+       CHECK(calls->handle_channel_update_meth != NULL);
+       calls->handle_htlc_fail_channel_update_meth = (*env)->GetMethodID(env, c, "handle_htlc_fail_channel_update", "(J)V");
+       CHECK(calls->handle_htlc_fail_channel_update_meth != NULL);
+       calls->get_next_channel_announcements_meth = (*env)->GetMethodID(env, c, "get_next_channel_announcements", "(JB)[J");
+       CHECK(calls->get_next_channel_announcements_meth != NULL);
+       calls->get_next_node_announcements_meth = (*env)->GetMethodID(env, c, "get_next_node_announcements", "([BB)[J");
+       CHECK(calls->get_next_node_announcements_meth != NULL);
+       calls->sync_routing_table_meth = (*env)->GetMethodID(env, c, "sync_routing_table", "([BJ)V");
+       CHECK(calls->sync_routing_table_meth != NULL);
+       calls->handle_reply_channel_range_meth = (*env)->GetMethodID(env, c, "handle_reply_channel_range", "([BJ)J");
+       CHECK(calls->handle_reply_channel_range_meth != NULL);
+       calls->handle_reply_short_channel_ids_end_meth = (*env)->GetMethodID(env, c, "handle_reply_short_channel_ids_end", "([BJ)J");
+       CHECK(calls->handle_reply_short_channel_ids_end_meth != NULL);
+       calls->handle_query_channel_range_meth = (*env)->GetMethodID(env, c, "handle_query_channel_range", "([BJ)J");
+       CHECK(calls->handle_query_channel_range_meth != NULL);
+       calls->handle_query_short_channel_ids_meth = (*env)->GetMethodID(env, c, "handle_query_short_channel_ids", "([BJ)J");
+       CHECK(calls->handle_query_short_channel_ids_meth != NULL);
+
+       LDKRoutingMessageHandler ret = {
+               .this_arg = (void*) calls,
+               .handle_node_announcement = handle_node_announcement_jcall,
+               .handle_channel_announcement = handle_channel_announcement_jcall,
+               .handle_channel_update = handle_channel_update_jcall,
+               .handle_htlc_fail_channel_update = handle_htlc_fail_channel_update_jcall,
+               .get_next_channel_announcements = get_next_channel_announcements_jcall,
+               .get_next_node_announcements = get_next_node_announcements_jcall,
+               .sync_routing_table = sync_routing_table_jcall,
+               .handle_reply_channel_range = handle_reply_channel_range_jcall,
+               .handle_reply_short_channel_ids_end = handle_reply_short_channel_ids_end_jcall,
+               .handle_query_channel_range = handle_query_channel_range_jcall,
+               .handle_query_short_channel_ids = handle_query_short_channel_ids_jcall,
+               .free = LDKRoutingMessageHandler_JCalls_free,
+               .MessageSendEventsProvider = LDKMessageSendEventsProvider_init(env, clz, MessageSendEventsProvider),
+       };
+       calls->MessageSendEventsProvider = ret.MessageSendEventsProvider.this_arg;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKRoutingMessageHandler_1new(JNIEnv *env, jclass clz, jobject o, jobject MessageSendEventsProvider) {
+       LDKRoutingMessageHandler *res_ptr = MALLOC(sizeof(LDKRoutingMessageHandler), "LDKRoutingMessageHandler");
+       *res_ptr = LDKRoutingMessageHandler_init(env, clz, o, MessageSendEventsProvider);
+       return (long)res_ptr;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1node_1announcement(JNIEnv *env, jclass clz, int64_t this_arg, int64_t msg) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       LDKNodeAnnouncement msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
+       *ret_conv = (this_arg_conv->handle_node_announcement)(this_arg_conv->this_arg, &msg_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1channel_1announcement(JNIEnv *env, jclass clz, int64_t this_arg, int64_t msg) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       LDKChannelAnnouncement msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
+       *ret_conv = (this_arg_conv->handle_channel_announcement)(this_arg_conv->this_arg, &msg_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1channel_1update(JNIEnv *env, jclass clz, int64_t this_arg, int64_t msg) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       LDKChannelUpdate msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
+       *ret_conv = (this_arg_conv->handle_channel_update)(this_arg_conv->this_arg, &msg_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1htlc_1fail_1channel_1update(JNIEnv *env, jclass clz, int64_t this_arg, int64_t update) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       LDKHTLCFailChannelUpdate* update_conv = (LDKHTLCFailChannelUpdate*)update;
+       (this_arg_conv->handle_htlc_fail_channel_update)(this_arg_conv->this_arg, update_conv);
+}
+
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1get_1next_1channel_1announcements(JNIEnv *env, jclass clz, int64_t this_arg, int64_t starting_point, int8_t batch_amount) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ ret_var = (this_arg_conv->get_next_channel_announcements)(this_arg_conv->this_arg, starting_point, batch_amount);
+       int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
+       int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
+       for (size_t l = 0; l < ret_var.datalen; l++) {
+               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* arr_conv_63_ref = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
+               *arr_conv_63_ref = ret_var.data[l];
+               ret_arr_ptr[l] = (long)arr_conv_63_ref;
+       }
+       (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
+       FREE(ret_var.data);
+       return ret_arr;
+}
+
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1get_1next_1node_1announcements(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray starting_point, int8_t batch_amount) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       LDKPublicKey starting_point_ref;
+       CHECK((*env)->GetArrayLength(env, starting_point) == 33);
+       (*env)->GetByteArrayRegion(env, starting_point, 0, 33, starting_point_ref.compressed_form);
+       LDKCVec_NodeAnnouncementZ ret_var = (this_arg_conv->get_next_node_announcements)(this_arg_conv->this_arg, starting_point_ref, batch_amount);
+       int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
+       int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
+       for (size_t s = 0; s < ret_var.datalen; s++) {
+               LDKNodeAnnouncement arr_conv_18_var = ret_var.data[s];
+               CHECK((((long)arr_conv_18_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+               CHECK((((long)&arr_conv_18_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+               long arr_conv_18_ref = (long)arr_conv_18_var.inner;
+               if (arr_conv_18_var.is_owned) {
+                       arr_conv_18_ref |= 1;
+               }
+               ret_arr_ptr[s] = arr_conv_18_ref;
+       }
+       (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
+       FREE(ret_var.data);
+       return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1sync_1routing_1table(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t init) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
+       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
+       LDKInit init_conv;
+       init_conv.inner = (void*)(init & (~1));
+       init_conv.is_owned = false;
+       (this_arg_conv->sync_routing_table)(this_arg_conv->this_arg, their_node_id_ref, &init_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1reply_1channel_1range(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
+       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
+       LDKReplyChannelRange msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = (msg & 1) || (msg == 0);
+       msg_conv = ReplyChannelRange_clone(&msg_conv);
+       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
+       *ret_conv = (this_arg_conv->handle_reply_channel_range)(this_arg_conv->this_arg, their_node_id_ref, msg_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1reply_1short_1channel_1ids_1end(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
+       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
+       LDKReplyShortChannelIdsEnd msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = (msg & 1) || (msg == 0);
+       msg_conv = ReplyShortChannelIdsEnd_clone(&msg_conv);
+       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
+       *ret_conv = (this_arg_conv->handle_reply_short_channel_ids_end)(this_arg_conv->this_arg, their_node_id_ref, msg_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1query_1channel_1range(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
+       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
+       LDKQueryChannelRange msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = (msg & 1) || (msg == 0);
+       msg_conv = QueryChannelRange_clone(&msg_conv);
+       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
+       *ret_conv = (this_arg_conv->handle_query_channel_range)(this_arg_conv->this_arg, their_node_id_ref, msg_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1query_1short_1channel_1ids(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
+       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
+       LDKQueryShortChannelIds msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = (msg & 1) || (msg == 0);
+       msg_conv = QueryShortChannelIds_clone(&msg_conv);
+       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
+       *ret_conv = (this_arg_conv->handle_query_short_channel_ids)(this_arg_conv->this_arg, their_node_id_ref, msg_conv);
+       return (long)ret_conv;
+}
+
+typedef struct LDKSocketDescriptor_JCalls {
+       atomic_size_t refcnt;
+       JavaVM *vm;
+       jweak o;
+       jmethodID send_data_meth;
+       jmethodID disconnect_socket_meth;
+       jmethodID eq_meth;
+       jmethodID hash_meth;
+} LDKSocketDescriptor_JCalls;
+static void LDKSocketDescriptor_JCalls_free(void* this_arg) {
+       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               JNIEnv *env;
+               DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
+               FREE(j_calls);
+       }
+}
+uintptr_t send_data_jcall(void* this_arg, LDKu8slice data, bool resume_read) {
+       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       LDKu8slice data_var = data;
+       int8_tArray data_arr = (*env)->NewByteArray(env, data_var.datalen);
+       (*env)->SetByteArrayRegion(env, data_arr, 0, data_var.datalen, data_var.data);
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallLongMethod(env, obj, j_calls->send_data_meth, data_arr, resume_read);
 }
-void handle_update_fulfill_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFulfillHTLC * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+void disconnect_socket_jcall(void* this_arg) {
+       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
        JNIEnv *env;
        DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
-       LDKUpdateFulfillHTLC msg_var = *msg;
-       msg_var = UpdateFulfillHTLC_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->handle_update_fulfill_htlc_meth, their_node_id_arr, msg_ref);
+       return (*env)->CallVoidMethod(env, obj, j_calls->disconnect_socket_meth);
 }
-void handle_update_fail_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFailHTLC * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+bool eq_jcall(const void* this_arg, const LDKSocketDescriptor * other_arg) {
+       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
        JNIEnv *env;
        DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
-       LDKUpdateFailHTLC msg_var = *msg;
-       msg_var = UpdateFailHTLC_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
+       LDKSocketDescriptor *other_arg_clone = MALLOC(sizeof(LDKSocketDescriptor), "LDKSocketDescriptor");
+       *other_arg_clone = SocketDescriptor_clone(other_arg);
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->handle_update_fail_htlc_meth, their_node_id_arr, msg_ref);
+       return (*env)->CallBooleanMethod(env, obj, j_calls->eq_meth, (long)other_arg_clone);
 }
-void handle_update_fail_malformed_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFailMalformedHTLC * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+uint64_t hash_jcall(const void* this_arg) {
+       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
        JNIEnv *env;
        DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
-       LDKUpdateFailMalformedHTLC msg_var = *msg;
-       msg_var = UpdateFailMalformedHTLC_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->handle_update_fail_malformed_htlc_meth, their_node_id_arr, msg_ref);
+       return (*env)->CallLongMethod(env, obj, j_calls->hash_meth);
+}
+static void* LDKSocketDescriptor_JCalls_clone(const void* this_arg) {
+       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+       return (void*) this_arg;
+}
+static inline LDKSocketDescriptor LDKSocketDescriptor_init (JNIEnv *env, jclass clz, jobject o) {
+       jclass c = (*env)->GetObjectClass(env, o);
+       CHECK(c != NULL);
+       LDKSocketDescriptor_JCalls *calls = MALLOC(sizeof(LDKSocketDescriptor_JCalls), "LDKSocketDescriptor_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+       calls->o = (*env)->NewWeakGlobalRef(env, o);
+       calls->send_data_meth = (*env)->GetMethodID(env, c, "send_data", "([BZ)J");
+       CHECK(calls->send_data_meth != NULL);
+       calls->disconnect_socket_meth = (*env)->GetMethodID(env, c, "disconnect_socket", "()V");
+       CHECK(calls->disconnect_socket_meth != NULL);
+       calls->eq_meth = (*env)->GetMethodID(env, c, "eq", "(J)Z");
+       CHECK(calls->eq_meth != NULL);
+       calls->hash_meth = (*env)->GetMethodID(env, c, "hash", "()J");
+       CHECK(calls->hash_meth != NULL);
+
+       LDKSocketDescriptor ret = {
+               .this_arg = (void*) calls,
+               .send_data = send_data_jcall,
+               .disconnect_socket = disconnect_socket_jcall,
+               .eq = eq_jcall,
+               .hash = hash_jcall,
+               .clone = LDKSocketDescriptor_JCalls_clone,
+               .free = LDKSocketDescriptor_JCalls_free,
+       };
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKSocketDescriptor_1new(JNIEnv *env, jclass clz, jobject o) {
+       LDKSocketDescriptor *res_ptr = MALLOC(sizeof(LDKSocketDescriptor), "LDKSocketDescriptor");
+       *res_ptr = LDKSocketDescriptor_init(env, clz, o);
+       return (long)res_ptr;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1send_1data(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray data, jboolean resume_read) {
+       LDKSocketDescriptor* this_arg_conv = (LDKSocketDescriptor*)this_arg;
+       LDKu8slice data_ref;
+       data_ref.datalen = (*env)->GetArrayLength(env, data);
+       data_ref.data = (*env)->GetByteArrayElements (env, data, NULL);
+       int64_t ret_val = (this_arg_conv->send_data)(this_arg_conv->this_arg, data_ref, resume_read);
+       (*env)->ReleaseByteArrayElements(env, data, (int8_t*)data_ref.data, 0);
+       return ret_val;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1disconnect_1socket(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKSocketDescriptor* this_arg_conv = (LDKSocketDescriptor*)this_arg;
+       (this_arg_conv->disconnect_socket)(this_arg_conv->this_arg);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1hash(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKSocketDescriptor* this_arg_conv = (LDKSocketDescriptor*)this_arg;
+       int64_t ret_val = (this_arg_conv->hash)(this_arg_conv->this_arg);
+       return ret_val;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Transaction_1free(JNIEnv *env, jclass clz, int8_tArray _res) {
+       LDKTransaction _res_ref;
+       _res_ref.datalen = (*env)->GetArrayLength(env, _res);
+       _res_ref.data = MALLOC(_res_ref.datalen, "LDKTransaction Bytes");
+       (*env)->GetByteArrayRegion(env, _res, 0, _res_ref.datalen, _res_ref.data);
+       _res_ref.data_is_owned = true;
+       Transaction_free(_res_ref);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxOut_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKTxOut _res_conv = *(LDKTxOut*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       TxOut_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxOut_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKTxOut* orig_conv = (LDKTxOut*)(orig & ~1);
+       LDKTxOut* ret_ref = MALLOC(sizeof(LDKTxOut), "LDKTxOut");
+       *ret_ref = TxOut_clone(orig_conv);
+       return (long)ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SecretKeyErrorZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
+       LDKSecretKey o_ref;
+       CHECK((*env)->GetArrayLength(env, o) == 32);
+       (*env)->GetByteArrayRegion(env, o, 0, 32, o_ref.bytes);
+       LDKCResult_SecretKeyErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SecretKeyErrorZ), "LDKCResult_SecretKeyErrorZ");
+       *ret_conv = CResult_SecretKeyErrorZ_ok(o_ref);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SecretKeyErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+       LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_java(env, e);
+       LDKCResult_SecretKeyErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SecretKeyErrorZ), "LDKCResult_SecretKeyErrorZ");
+       *ret_conv = CResult_SecretKeyErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SecretKeyErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_SecretKeyErrorZ _res_conv = *(LDKCResult_SecretKeyErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_SecretKeyErrorZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeyErrorZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
+       LDKPublicKey o_ref;
+       CHECK((*env)->GetArrayLength(env, o) == 33);
+       (*env)->GetByteArrayRegion(env, o, 0, 33, o_ref.compressed_form);
+       LDKCResult_PublicKeyErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyErrorZ), "LDKCResult_PublicKeyErrorZ");
+       *ret_conv = CResult_PublicKeyErrorZ_ok(o_ref);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeyErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+       LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_java(env, e);
+       LDKCResult_PublicKeyErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyErrorZ), "LDKCResult_PublicKeyErrorZ");
+       *ret_conv = CResult_PublicKeyErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeyErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_PublicKeyErrorZ _res_conv = *(LDKCResult_PublicKeyErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_PublicKeyErrorZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKTxCreationKeys o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = TxCreationKeys_clone(&o_conv);
+       LDKCResult_TxCreationKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysDecodeErrorZ), "LDKCResult_TxCreationKeysDecodeErrorZ");
+       *ret_conv = CResult_TxCreationKeysDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_TxCreationKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysDecodeErrorZ), "LDKCResult_TxCreationKeysDecodeErrorZ");
+       *ret_conv = CResult_TxCreationKeysDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_TxCreationKeysDecodeErrorZ _res_conv = *(LDKCResult_TxCreationKeysDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_TxCreationKeysDecodeErrorZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_TxCreationKeysDecodeErrorZ* orig_conv = (LDKCResult_TxCreationKeysDecodeErrorZ*)(orig & ~1);
+       LDKCResult_TxCreationKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysDecodeErrorZ), "LDKCResult_TxCreationKeysDecodeErrorZ");
+       *ret_conv = CResult_TxCreationKeysDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelPublicKeysDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKChannelPublicKeys o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = ChannelPublicKeys_clone(&o_conv);
+       LDKCResult_ChannelPublicKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelPublicKeysDecodeErrorZ), "LDKCResult_ChannelPublicKeysDecodeErrorZ");
+       *ret_conv = CResult_ChannelPublicKeysDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelPublicKeysDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_ChannelPublicKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelPublicKeysDecodeErrorZ), "LDKCResult_ChannelPublicKeysDecodeErrorZ");
+       *ret_conv = CResult_ChannelPublicKeysDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelPublicKeysDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_ChannelPublicKeysDecodeErrorZ _res_conv = *(LDKCResult_ChannelPublicKeysDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_ChannelPublicKeysDecodeErrorZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelPublicKeysDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_ChannelPublicKeysDecodeErrorZ* orig_conv = (LDKCResult_ChannelPublicKeysDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ChannelPublicKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelPublicKeysDecodeErrorZ), "LDKCResult_ChannelPublicKeysDecodeErrorZ");
+       *ret_conv = CResult_ChannelPublicKeysDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKTxCreationKeys o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = TxCreationKeys_clone(&o_conv);
+       LDKCResult_TxCreationKeysErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysErrorZ), "LDKCResult_TxCreationKeysErrorZ");
+       *ret_conv = CResult_TxCreationKeysErrorZ_ok(o_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+       LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_java(env, e);
+       LDKCResult_TxCreationKeysErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysErrorZ), "LDKCResult_TxCreationKeysErrorZ");
+       *ret_conv = CResult_TxCreationKeysErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_TxCreationKeysErrorZ _res_conv = *(LDKCResult_TxCreationKeysErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_TxCreationKeysErrorZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCOutputInCommitmentDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKHTLCOutputInCommitment o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = HTLCOutputInCommitment_clone(&o_conv);
+       LDKCResult_HTLCOutputInCommitmentDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ), "LDKCResult_HTLCOutputInCommitmentDecodeErrorZ");
+       *ret_conv = CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCOutputInCommitmentDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_HTLCOutputInCommitmentDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ), "LDKCResult_HTLCOutputInCommitmentDecodeErrorZ");
+       *ret_conv = CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCOutputInCommitmentDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_HTLCOutputInCommitmentDecodeErrorZ _res_conv = *(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCOutputInCommitmentDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_HTLCOutputInCommitmentDecodeErrorZ* orig_conv = (LDKCResult_HTLCOutputInCommitmentDecodeErrorZ*)(orig & ~1);
+       LDKCResult_HTLCOutputInCommitmentDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ), "LDKCResult_HTLCOutputInCommitmentDecodeErrorZ");
+       *ret_conv = CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CounterpartyChannelTransactionParametersDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCounterpartyChannelTransactionParameters o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = CounterpartyChannelTransactionParameters_clone(&o_conv);
+       LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ), "LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ");
+       *ret_conv = CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CounterpartyChannelTransactionParametersDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ), "LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ");
+       *ret_conv = CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-void handle_commitment_signed_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKCommitmentSigned * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
-       LDKCommitmentSigned msg_var = *msg;
-       msg_var = CommitmentSigned_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->handle_commitment_signed_meth, their_node_id_arr, msg_ref);
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CounterpartyChannelTransactionParametersDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ _res_conv = *(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res_conv);
 }
-void handle_revoke_and_ack_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKRevokeAndACK * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
-       LDKRevokeAndACK msg_var = *msg;
-       msg_var = RevokeAndACK_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->handle_revoke_and_ack_meth, their_node_id_arr, msg_ref);
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CounterpartyChannelTransactionParametersDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ* orig_conv = (LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ*)(orig & ~1);
+       LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ), "LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ");
+       *ret_conv = CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
-void handle_update_fee_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFee * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
-       LDKUpdateFee msg_var = *msg;
-       msg_var = UpdateFee_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->handle_update_fee_meth, their_node_id_arr, msg_ref);
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTransactionParametersDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKChannelTransactionParameters o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = ChannelTransactionParameters_clone(&o_conv);
+       LDKCResult_ChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTransactionParametersDecodeErrorZ), "LDKCResult_ChannelTransactionParametersDecodeErrorZ");
+       *ret_conv = CResult_ChannelTransactionParametersDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
-void handle_announcement_signatures_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKAnnouncementSignatures * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
-       LDKAnnouncementSignatures msg_var = *msg;
-       msg_var = AnnouncementSignatures_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->handle_announcement_signatures_meth, their_node_id_arr, msg_ref);
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTransactionParametersDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_ChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTransactionParametersDecodeErrorZ), "LDKCResult_ChannelTransactionParametersDecodeErrorZ");
+       *ret_conv = CResult_ChannelTransactionParametersDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-void peer_disconnected_jcall(const void* this_arg, LDKPublicKey their_node_id, bool no_connection_possible) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->peer_disconnected_meth, their_node_id_arr, no_connection_possible);
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTransactionParametersDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_ChannelTransactionParametersDecodeErrorZ _res_conv = *(LDKCResult_ChannelTransactionParametersDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_ChannelTransactionParametersDecodeErrorZ_free(_res_conv);
 }
-void peer_connected_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
-       LDKInit msg_var = *msg;
-       msg_var = Init_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->peer_connected_meth, their_node_id_arr, msg_ref);
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTransactionParametersDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_ChannelTransactionParametersDecodeErrorZ* orig_conv = (LDKCResult_ChannelTransactionParametersDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTransactionParametersDecodeErrorZ), "LDKCResult_ChannelTransactionParametersDecodeErrorZ");
+       *ret_conv = CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
-void handle_channel_reestablish_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelReestablish * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
-       LDKChannelReestablish msg_var = *msg;
-       msg_var = ChannelReestablish_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1SignatureZ_1free(JNIEnv *env, jclass clz, jobjectArray _res) {
+       LDKCVec_SignatureZ _res_constr;
+       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKSignature), "LDKCVec_SignatureZ Elements");
+       else
+               _res_constr.data = NULL;
+       for (size_t i = 0; i < _res_constr.datalen; i++) {
+               int8_tArray arr_conv_8 = (*env)->GetObjectArrayElement(env, _res, i);
+               LDKSignature arr_conv_8_ref;
+               CHECK((*env)->GetArrayLength(env, arr_conv_8) == 64);
+               (*env)->GetByteArrayRegion(env, arr_conv_8, 0, 64, arr_conv_8_ref.compact_form);
+               _res_constr.data[i] = arr_conv_8_ref;
        }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->handle_channel_reestablish_meth, their_node_id_arr, msg_ref);
+       CVec_SignatureZ_free(_res_constr);
 }
-void handle_error_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKErrorMessage * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
-       LDKErrorMessage msg_var = *msg;
-       msg_var = ErrorMessage_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->handle_error_meth, their_node_id_arr, msg_ref);
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HolderCommitmentTransactionDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKHolderCommitmentTransaction o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = HolderCommitmentTransaction_clone(&o_conv);
+       LDKCResult_HolderCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HolderCommitmentTransactionDecodeErrorZ), "LDKCResult_HolderCommitmentTransactionDecodeErrorZ");
+       *ret_conv = CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
-static void* LDKChannelMessageHandler_JCalls_clone(const void* this_arg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
-       atomic_fetch_add_explicit(&j_calls->MessageSendEventsProvider->refcnt, 1, memory_order_release);
-       return (void*) this_arg;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HolderCommitmentTransactionDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_HolderCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HolderCommitmentTransactionDecodeErrorZ), "LDKCResult_HolderCommitmentTransactionDecodeErrorZ");
+       *ret_conv = CResult_HolderCommitmentTransactionDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-static inline LDKChannelMessageHandler LDKChannelMessageHandler_init (JNIEnv *env, jclass clz, jobject o, jobject MessageSendEventsProvider) {
-       jclass c = (*env)->GetObjectClass(env, o);
-       CHECK(c != NULL);
-       LDKChannelMessageHandler_JCalls *calls = MALLOC(sizeof(LDKChannelMessageHandler_JCalls), "LDKChannelMessageHandler_JCalls");
-       atomic_init(&calls->refcnt, 1);
-       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
-       calls->o = (*env)->NewWeakGlobalRef(env, o);
-       calls->handle_open_channel_meth = (*env)->GetMethodID(env, c, "handle_open_channel", "([BJJ)V");
-       CHECK(calls->handle_open_channel_meth != NULL);
-       calls->handle_accept_channel_meth = (*env)->GetMethodID(env, c, "handle_accept_channel", "([BJJ)V");
-       CHECK(calls->handle_accept_channel_meth != NULL);
-       calls->handle_funding_created_meth = (*env)->GetMethodID(env, c, "handle_funding_created", "([BJ)V");
-       CHECK(calls->handle_funding_created_meth != NULL);
-       calls->handle_funding_signed_meth = (*env)->GetMethodID(env, c, "handle_funding_signed", "([BJ)V");
-       CHECK(calls->handle_funding_signed_meth != NULL);
-       calls->handle_funding_locked_meth = (*env)->GetMethodID(env, c, "handle_funding_locked", "([BJ)V");
-       CHECK(calls->handle_funding_locked_meth != NULL);
-       calls->handle_shutdown_meth = (*env)->GetMethodID(env, c, "handle_shutdown", "([BJ)V");
-       CHECK(calls->handle_shutdown_meth != NULL);
-       calls->handle_closing_signed_meth = (*env)->GetMethodID(env, c, "handle_closing_signed", "([BJ)V");
-       CHECK(calls->handle_closing_signed_meth != NULL);
-       calls->handle_update_add_htlc_meth = (*env)->GetMethodID(env, c, "handle_update_add_htlc", "([BJ)V");
-       CHECK(calls->handle_update_add_htlc_meth != NULL);
-       calls->handle_update_fulfill_htlc_meth = (*env)->GetMethodID(env, c, "handle_update_fulfill_htlc", "([BJ)V");
-       CHECK(calls->handle_update_fulfill_htlc_meth != NULL);
-       calls->handle_update_fail_htlc_meth = (*env)->GetMethodID(env, c, "handle_update_fail_htlc", "([BJ)V");
-       CHECK(calls->handle_update_fail_htlc_meth != NULL);
-       calls->handle_update_fail_malformed_htlc_meth = (*env)->GetMethodID(env, c, "handle_update_fail_malformed_htlc", "([BJ)V");
-       CHECK(calls->handle_update_fail_malformed_htlc_meth != NULL);
-       calls->handle_commitment_signed_meth = (*env)->GetMethodID(env, c, "handle_commitment_signed", "([BJ)V");
-       CHECK(calls->handle_commitment_signed_meth != NULL);
-       calls->handle_revoke_and_ack_meth = (*env)->GetMethodID(env, c, "handle_revoke_and_ack", "([BJ)V");
-       CHECK(calls->handle_revoke_and_ack_meth != NULL);
-       calls->handle_update_fee_meth = (*env)->GetMethodID(env, c, "handle_update_fee", "([BJ)V");
-       CHECK(calls->handle_update_fee_meth != NULL);
-       calls->handle_announcement_signatures_meth = (*env)->GetMethodID(env, c, "handle_announcement_signatures", "([BJ)V");
-       CHECK(calls->handle_announcement_signatures_meth != NULL);
-       calls->peer_disconnected_meth = (*env)->GetMethodID(env, c, "peer_disconnected", "([BZ)V");
-       CHECK(calls->peer_disconnected_meth != NULL);
-       calls->peer_connected_meth = (*env)->GetMethodID(env, c, "peer_connected", "([BJ)V");
-       CHECK(calls->peer_connected_meth != NULL);
-       calls->handle_channel_reestablish_meth = (*env)->GetMethodID(env, c, "handle_channel_reestablish", "([BJ)V");
-       CHECK(calls->handle_channel_reestablish_meth != NULL);
-       calls->handle_error_meth = (*env)->GetMethodID(env, c, "handle_error", "([BJ)V");
-       CHECK(calls->handle_error_meth != NULL);
 
-       LDKChannelMessageHandler ret = {
-               .this_arg = (void*) calls,
-               .handle_open_channel = handle_open_channel_jcall,
-               .handle_accept_channel = handle_accept_channel_jcall,
-               .handle_funding_created = handle_funding_created_jcall,
-               .handle_funding_signed = handle_funding_signed_jcall,
-               .handle_funding_locked = handle_funding_locked_jcall,
-               .handle_shutdown = handle_shutdown_jcall,
-               .handle_closing_signed = handle_closing_signed_jcall,
-               .handle_update_add_htlc = handle_update_add_htlc_jcall,
-               .handle_update_fulfill_htlc = handle_update_fulfill_htlc_jcall,
-               .handle_update_fail_htlc = handle_update_fail_htlc_jcall,
-               .handle_update_fail_malformed_htlc = handle_update_fail_malformed_htlc_jcall,
-               .handle_commitment_signed = handle_commitment_signed_jcall,
-               .handle_revoke_and_ack = handle_revoke_and_ack_jcall,
-               .handle_update_fee = handle_update_fee_jcall,
-               .handle_announcement_signatures = handle_announcement_signatures_jcall,
-               .peer_disconnected = peer_disconnected_jcall,
-               .peer_connected = peer_connected_jcall,
-               .handle_channel_reestablish = handle_channel_reestablish_jcall,
-               .handle_error = handle_error_jcall,
-               .free = LDKChannelMessageHandler_JCalls_free,
-               .MessageSendEventsProvider = LDKMessageSendEventsProvider_init(env, clz, MessageSendEventsProvider),
-       };
-       calls->MessageSendEventsProvider = ret.MessageSendEventsProvider.this_arg;
-       return ret;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1HolderCommitmentTransactionDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_HolderCommitmentTransactionDecodeErrorZ _res_conv = *(LDKCResult_HolderCommitmentTransactionDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HolderCommitmentTransactionDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_HolderCommitmentTransactionDecodeErrorZ* orig_conv = (LDKCResult_HolderCommitmentTransactionDecodeErrorZ*)(orig & ~1);
+       LDKCResult_HolderCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HolderCommitmentTransactionDecodeErrorZ), "LDKCResult_HolderCommitmentTransactionDecodeErrorZ");
+       *ret_conv = CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BuiltCommitmentTransactionDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKBuiltCommitmentTransaction o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = BuiltCommitmentTransaction_clone(&o_conv);
+       LDKCResult_BuiltCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ), "LDKCResult_BuiltCommitmentTransactionDecodeErrorZ");
+       *ret_conv = CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKChannelMessageHandler_1new(JNIEnv *env, jclass clz, jobject o, jobject MessageSendEventsProvider) {
-       LDKChannelMessageHandler *res_ptr = MALLOC(sizeof(LDKChannelMessageHandler), "LDKChannelMessageHandler");
-       *res_ptr = LDKChannelMessageHandler_init(env, clz, o, MessageSendEventsProvider);
-       return (long)res_ptr;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BuiltCommitmentTransactionDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_BuiltCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ), "LDKCResult_BuiltCommitmentTransactionDecodeErrorZ");
+       *ret_conv = CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1open_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t their_features, int64_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
-       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
-       LDKInitFeatures their_features_conv;
-       their_features_conv.inner = (void*)(their_features & (~1));
-       their_features_conv.is_owned = (their_features & 1) || (their_features == 0);
-       // Warning: we need a move here but no clone is available for LDKInitFeatures
-       LDKOpenChannel msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_open_channel)(this_arg_conv->this_arg, their_node_id_ref, their_features_conv, &msg_conv);
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1BuiltCommitmentTransactionDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_BuiltCommitmentTransactionDecodeErrorZ _res_conv = *(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1accept_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t their_features, int64_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
-       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
-       LDKInitFeatures their_features_conv;
-       their_features_conv.inner = (void*)(their_features & (~1));
-       their_features_conv.is_owned = (their_features & 1) || (their_features == 0);
-       // Warning: we need a move here but no clone is available for LDKInitFeatures
-       LDKAcceptChannel msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_accept_channel)(this_arg_conv->this_arg, their_node_id_ref, their_features_conv, &msg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BuiltCommitmentTransactionDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_BuiltCommitmentTransactionDecodeErrorZ* orig_conv = (LDKCResult_BuiltCommitmentTransactionDecodeErrorZ*)(orig & ~1);
+       LDKCResult_BuiltCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ), "LDKCResult_BuiltCommitmentTransactionDecodeErrorZ");
+       *ret_conv = CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1funding_1created(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
-       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
-       LDKFundingCreated msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_funding_created)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentTransactionDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCommitmentTransaction o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = CommitmentTransaction_clone(&o_conv);
+       LDKCResult_CommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentTransactionDecodeErrorZ), "LDKCResult_CommitmentTransactionDecodeErrorZ");
+       *ret_conv = CResult_CommitmentTransactionDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1funding_1signed(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
-       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
-       LDKFundingSigned msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_funding_signed)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentTransactionDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_CommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentTransactionDecodeErrorZ), "LDKCResult_CommitmentTransactionDecodeErrorZ");
+       *ret_conv = CResult_CommitmentTransactionDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1funding_1locked(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
-       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
-       LDKFundingLocked msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_funding_locked)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentTransactionDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_CommitmentTransactionDecodeErrorZ _res_conv = *(LDKCResult_CommitmentTransactionDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_CommitmentTransactionDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1shutdown(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
-       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
-       LDKShutdown msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_shutdown)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentTransactionDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_CommitmentTransactionDecodeErrorZ* orig_conv = (LDKCResult_CommitmentTransactionDecodeErrorZ*)(orig & ~1);
+       LDKCResult_CommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentTransactionDecodeErrorZ), "LDKCResult_CommitmentTransactionDecodeErrorZ");
+       *ret_conv = CResult_CommitmentTransactionDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1closing_1signed(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
-       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
-       LDKClosingSigned msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_closing_signed)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrustedCommitmentTransactionNoneZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKTrustedCommitmentTransaction o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       // Warning: we need a move here but no clone is available for LDKTrustedCommitmentTransaction
+       LDKCResult_TrustedCommitmentTransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TrustedCommitmentTransactionNoneZ), "LDKCResult_TrustedCommitmentTransactionNoneZ");
+       *ret_conv = CResult_TrustedCommitmentTransactionNoneZ_ok(o_conv);
+       return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1update_1add_1htlc(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
-       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
-       LDKUpdateAddHTLC msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_update_add_htlc)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrustedCommitmentTransactionNoneZ_1err(JNIEnv *env, jclass clz) {
+       LDKCResult_TrustedCommitmentTransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TrustedCommitmentTransactionNoneZ), "LDKCResult_TrustedCommitmentTransactionNoneZ");
+       *ret_conv = CResult_TrustedCommitmentTransactionNoneZ_err();
+       return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1update_1fulfill_1htlc(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
-       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
-       LDKUpdateFulfillHTLC msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_update_fulfill_htlc)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TrustedCommitmentTransactionNoneZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_TrustedCommitmentTransactionNoneZ _res_conv = *(LDKCResult_TrustedCommitmentTransactionNoneZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_TrustedCommitmentTransactionNoneZ_free(_res_conv);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1update_1fail_1htlc(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
-       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
-       LDKUpdateFailHTLC msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_update_fail_htlc)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1ok(JNIEnv *env, jclass clz, jobjectArray o) {
+       LDKCVec_SignatureZ o_constr;
+       o_constr.datalen = (*env)->GetArrayLength(env, o);
+       if (o_constr.datalen > 0)
+               o_constr.data = MALLOC(o_constr.datalen * sizeof(LDKSignature), "LDKCVec_SignatureZ Elements");
+       else
+               o_constr.data = NULL;
+       for (size_t i = 0; i < o_constr.datalen; i++) {
+               int8_tArray arr_conv_8 = (*env)->GetObjectArrayElement(env, o, i);
+               LDKSignature arr_conv_8_ref;
+               CHECK((*env)->GetArrayLength(env, arr_conv_8) == 64);
+               (*env)->GetByteArrayRegion(env, arr_conv_8, 0, 64, arr_conv_8_ref.compact_form);
+               o_constr.data[i] = arr_conv_8_ref;
+       }
+       LDKCResult_CVec_SignatureZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_SignatureZNoneZ), "LDKCResult_CVec_SignatureZNoneZ");
+       *ret_conv = CResult_CVec_SignatureZNoneZ_ok(o_constr);
+       return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1update_1fail_1malformed_1htlc(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
-       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
-       LDKUpdateFailMalformedHTLC msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_update_fail_malformed_htlc)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1err(JNIEnv *env, jclass clz) {
+       LDKCResult_CVec_SignatureZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_SignatureZNoneZ), "LDKCResult_CVec_SignatureZNoneZ");
+       *ret_conv = CResult_CVec_SignatureZNoneZ_err();
+       return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1commitment_1signed(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
-       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
-       LDKCommitmentSigned msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_commitment_signed)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_CVec_SignatureZNoneZ _res_conv = *(LDKCResult_CVec_SignatureZNoneZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_CVec_SignatureZNoneZ_free(_res_conv);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1revoke_1and_1ack(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
-       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
-       LDKRevokeAndACK msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_revoke_and_ack)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_CVec_SignatureZNoneZ* orig_conv = (LDKCResult_CVec_SignatureZNoneZ*)(orig & ~1);
+       LDKCResult_CVec_SignatureZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_SignatureZNoneZ), "LDKCResult_CVec_SignatureZNoneZ");
+       *ret_conv = CResult_CVec_SignatureZNoneZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1update_1fee(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
-       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
-       LDKUpdateFee msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_update_fee)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1PublicKeyZ_1free(JNIEnv *env, jclass clz, jobjectArray _res) {
+       LDKCVec_PublicKeyZ _res_constr;
+       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKPublicKey), "LDKCVec_PublicKeyZ Elements");
+       else
+               _res_constr.data = NULL;
+       for (size_t i = 0; i < _res_constr.datalen; i++) {
+               int8_tArray arr_conv_8 = (*env)->GetObjectArrayElement(env, _res, i);
+               LDKPublicKey arr_conv_8_ref;
+               CHECK((*env)->GetArrayLength(env, arr_conv_8) == 33);
+               (*env)->GetByteArrayRegion(env, arr_conv_8, 0, 33, arr_conv_8_ref.compressed_form);
+               _res_constr.data[i] = arr_conv_8_ref;
+       }
+       CVec_PublicKeyZ_free(_res_constr);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1announcement_1signatures(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
-       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
-       LDKAnnouncementSignatures msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_announcement_signatures)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u8Z_1free(JNIEnv *env, jclass clz, int8_tArray _res) {
+       LDKCVec_u8Z _res_ref;
+       _res_ref.datalen = (*env)->GetArrayLength(env, _res);
+       _res_ref.data = MALLOC(_res_ref.datalen, "LDKCVec_u8Z Bytes");
+       (*env)->GetByteArrayRegion(env, _res, 0, _res_ref.datalen, _res_ref.data);
+       CVec_u8Z_free(_res_ref);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
+       LDKCVec_u8Z o_ref;
+       o_ref.datalen = (*env)->GetArrayLength(env, o);
+       o_ref.data = MALLOC(o_ref.datalen, "LDKCVec_u8Z Bytes");
+       (*env)->GetByteArrayRegion(env, o, 0, o_ref.datalen, o_ref.data);
+       LDKCResult_CVec_u8ZPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_u8ZPeerHandleErrorZ), "LDKCResult_CVec_u8ZPeerHandleErrorZ");
+       *ret_conv = CResult_CVec_u8ZPeerHandleErrorZ_ok(o_ref);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKPeerHandleError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = PeerHandleError_clone(&e_conv);
+       LDKCResult_CVec_u8ZPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_u8ZPeerHandleErrorZ), "LDKCResult_CVec_u8ZPeerHandleErrorZ");
+       *ret_conv = CResult_CVec_u8ZPeerHandleErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1peer_1disconnected(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, jboolean no_connection_possible) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
-       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
-       (this_arg_conv->peer_disconnected)(this_arg_conv->this_arg, their_node_id_ref, no_connection_possible);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_CVec_u8ZPeerHandleErrorZ _res_conv = *(LDKCResult_CVec_u8ZPeerHandleErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_CVec_u8ZPeerHandleErrorZ_free(_res_conv);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1peer_1connected(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
-       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
-       LDKInit msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_CVec_u8ZPeerHandleErrorZ* orig_conv = (LDKCResult_CVec_u8ZPeerHandleErrorZ*)(orig & ~1);
+       LDKCResult_CVec_u8ZPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_u8ZPeerHandleErrorZ), "LDKCResult_CVec_u8ZPeerHandleErrorZ");
+       *ret_conv = CResult_CVec_u8ZPeerHandleErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1channel_1reestablish(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
-       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
-       LDKChannelReestablish msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_channel_reestablish)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1ok(JNIEnv *env, jclass clz) {
+       LDKCResult_NonePeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePeerHandleErrorZ), "LDKCResult_NonePeerHandleErrorZ");
+       *ret_conv = CResult_NonePeerHandleErrorZ_ok();
+       return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1error(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
-       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
-       LDKErrorMessage msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_error)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKPeerHandleError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = PeerHandleError_clone(&e_conv);
+       LDKCResult_NonePeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePeerHandleErrorZ), "LDKCResult_NonePeerHandleErrorZ");
+       *ret_conv = CResult_NonePeerHandleErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
 
-typedef struct LDKRoutingMessageHandler_JCalls {
-       atomic_size_t refcnt;
-       JavaVM *vm;
-       jweak o;
-       LDKMessageSendEventsProvider_JCalls* MessageSendEventsProvider;
-       jmethodID handle_node_announcement_meth;
-       jmethodID handle_channel_announcement_meth;
-       jmethodID handle_channel_update_meth;
-       jmethodID handle_htlc_fail_channel_update_meth;
-       jmethodID get_next_channel_announcements_meth;
-       jmethodID get_next_node_announcements_meth;
-       jmethodID sync_routing_table_meth;
-       jmethodID handle_reply_channel_range_meth;
-       jmethodID handle_reply_short_channel_ids_end_meth;
-       jmethodID handle_query_channel_range_meth;
-       jmethodID handle_query_short_channel_ids_meth;
-} LDKRoutingMessageHandler_JCalls;
-static void LDKRoutingMessageHandler_JCalls_free(void* this_arg) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
-               JNIEnv *env;
-               DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
-               FREE(j_calls);
-       }
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_NonePeerHandleErrorZ _res_conv = *(LDKCResult_NonePeerHandleErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_NonePeerHandleErrorZ_free(_res_conv);
 }
-LDKCResult_boolLightningErrorZ handle_node_announcement_jcall(const void* this_arg, const LDKNodeAnnouncement * msg) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       LDKNodeAnnouncement msg_var = *msg;
-       msg_var = NodeAnnouncement_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       LDKCResult_boolLightningErrorZ* ret = (LDKCResult_boolLightningErrorZ*)(*env)->CallLongMethod(env, obj, j_calls->handle_node_announcement_meth, msg_ref);
-       LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_boolLightningErrorZ_clone((LDKCResult_boolLightningErrorZ*)ret);
-       return ret_conv;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_NonePeerHandleErrorZ* orig_conv = (LDKCResult_NonePeerHandleErrorZ*)(orig & ~1);
+       LDKCResult_NonePeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePeerHandleErrorZ), "LDKCResult_NonePeerHandleErrorZ");
+       *ret_conv = CResult_NonePeerHandleErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
-LDKCResult_boolLightningErrorZ handle_channel_announcement_jcall(const void* this_arg, const LDKChannelAnnouncement * msg) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       LDKChannelAnnouncement msg_var = *msg;
-       msg_var = ChannelAnnouncement_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       LDKCResult_boolLightningErrorZ* ret = (LDKCResult_boolLightningErrorZ*)(*env)->CallLongMethod(env, obj, j_calls->handle_channel_announcement_meth, msg_ref);
-       LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_boolLightningErrorZ_clone((LDKCResult_boolLightningErrorZ*)ret);
-       return ret_conv;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1ok(JNIEnv *env, jclass clz, jboolean o) {
+       LDKCResult_boolPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolPeerHandleErrorZ), "LDKCResult_boolPeerHandleErrorZ");
+       *ret_conv = CResult_boolPeerHandleErrorZ_ok(o);
+       return (long)ret_conv;
 }
-LDKCResult_boolLightningErrorZ handle_channel_update_jcall(const void* this_arg, const LDKChannelUpdate * msg) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       LDKChannelUpdate msg_var = *msg;
-       msg_var = ChannelUpdate_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       LDKCResult_boolLightningErrorZ* ret = (LDKCResult_boolLightningErrorZ*)(*env)->CallLongMethod(env, obj, j_calls->handle_channel_update_meth, msg_ref);
-       LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_boolLightningErrorZ_clone((LDKCResult_boolLightningErrorZ*)ret);
-       return ret_conv;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKPeerHandleError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = PeerHandleError_clone(&e_conv);
+       LDKCResult_boolPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolPeerHandleErrorZ), "LDKCResult_boolPeerHandleErrorZ");
+       *ret_conv = CResult_boolPeerHandleErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-void handle_htlc_fail_channel_update_jcall(const void* this_arg, const LDKHTLCFailChannelUpdate * update) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       long ret_update = (long)update;
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->handle_htlc_fail_channel_update_meth, ret_update);
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_boolPeerHandleErrorZ _res_conv = *(LDKCResult_boolPeerHandleErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_boolPeerHandleErrorZ_free(_res_conv);
 }
-LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ get_next_channel_announcements_jcall(const void* this_arg, uint64_t starting_point, uint8_t batch_amount) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       int64_tArray arg = (*env)->CallObjectMethod(env, obj, j_calls->get_next_channel_announcements_meth, starting_point, batch_amount);
-       LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ arg_constr;
-       arg_constr.datalen = (*env)->GetArrayLength(env, arg);
-       if (arg_constr.datalen > 0)
-               arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ Elements");
-       else
-               arg_constr.data = NULL;
-       int64_t* arg_vals = (*env)->GetLongArrayElements (env, arg, NULL);
-       for (size_t l = 0; l < arg_constr.datalen; l++) {
-               int64_t arr_conv_63 = arg_vals[l];
-               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ arr_conv_63_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)arr_conv_63) & ~1);
-               FREE((void*)arr_conv_63);
-               arg_constr.data[l] = arr_conv_63_conv;
-       }
-       (*env)->ReleaseLongArrayElements(env, arg, arg_vals, 0);
-       return arg_constr;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_boolPeerHandleErrorZ* orig_conv = (LDKCResult_boolPeerHandleErrorZ*)(orig & ~1);
+       LDKCResult_boolPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolPeerHandleErrorZ), "LDKCResult_boolPeerHandleErrorZ");
+       *ret_conv = CResult_boolPeerHandleErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
-LDKCVec_NodeAnnouncementZ get_next_node_announcements_jcall(const void* this_arg, LDKPublicKey starting_point, uint8_t batch_amount) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       int8_tArray starting_point_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, starting_point_arr, 0, 33, starting_point.compressed_form);
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       int64_tArray arg = (*env)->CallObjectMethod(env, obj, j_calls->get_next_node_announcements_meth, starting_point_arr, batch_amount);
-       LDKCVec_NodeAnnouncementZ arg_constr;
-       arg_constr.datalen = (*env)->GetArrayLength(env, arg);
-       if (arg_constr.datalen > 0)
-               arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKNodeAnnouncement), "LDKCVec_NodeAnnouncementZ Elements");
-       else
-               arg_constr.data = NULL;
-       int64_t* arg_vals = (*env)->GetLongArrayElements (env, arg, NULL);
-       for (size_t s = 0; s < arg_constr.datalen; s++) {
-               int64_t arr_conv_18 = arg_vals[s];
-               LDKNodeAnnouncement arr_conv_18_conv;
-               arr_conv_18_conv.inner = (void*)(arr_conv_18 & (~1));
-               arr_conv_18_conv.is_owned = (arr_conv_18 & 1) || (arr_conv_18 == 0);
-               arr_conv_18_conv = NodeAnnouncement_clone(&arr_conv_18_conv);
-               arg_constr.data[s] = arr_conv_18_conv;
-       }
-       (*env)->ReleaseLongArrayElements(env, arg, arg_vals, 0);
-       return arg_constr;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InitFeaturesDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKInitFeatures o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = InitFeatures_clone(&o_conv);
+       LDKCResult_InitFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitFeaturesDecodeErrorZ), "LDKCResult_InitFeaturesDecodeErrorZ");
+       *ret_conv = CResult_InitFeaturesDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
-void sync_routing_table_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * init) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
-       LDKInit init_var = *init;
-       init_var = Init_clone(init);
-       CHECK((((long)init_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&init_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long init_ref = (long)init_var.inner;
-       if (init_var.is_owned) {
-               init_ref |= 1;
-       }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->sync_routing_table_meth, their_node_id_arr, init_ref);
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InitFeaturesDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_InitFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitFeaturesDecodeErrorZ), "LDKCResult_InitFeaturesDecodeErrorZ");
+       *ret_conv = CResult_InitFeaturesDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InitFeaturesDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_InitFeaturesDecodeErrorZ _res_conv = *(LDKCResult_InitFeaturesDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_InitFeaturesDecodeErrorZ_free(_res_conv);
 }
-LDKCResult_NoneLightningErrorZ handle_reply_channel_range_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKReplyChannelRange msg) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
-       LDKReplyChannelRange msg_var = msg;
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       LDKCResult_NoneLightningErrorZ* ret = (LDKCResult_NoneLightningErrorZ*)(*env)->CallLongMethod(env, obj, j_calls->handle_reply_channel_range_meth, their_node_id_arr, msg_ref);
-       LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_NoneLightningErrorZ_clone((LDKCResult_NoneLightningErrorZ*)ret);
-       return ret_conv;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeFeaturesDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKNodeFeatures o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = NodeFeatures_clone(&o_conv);
+       LDKCResult_NodeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeFeaturesDecodeErrorZ), "LDKCResult_NodeFeaturesDecodeErrorZ");
+       *ret_conv = CResult_NodeFeaturesDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
-LDKCResult_NoneLightningErrorZ handle_reply_short_channel_ids_end_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKReplyShortChannelIdsEnd msg) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
-       LDKReplyShortChannelIdsEnd msg_var = msg;
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       LDKCResult_NoneLightningErrorZ* ret = (LDKCResult_NoneLightningErrorZ*)(*env)->CallLongMethod(env, obj, j_calls->handle_reply_short_channel_ids_end_meth, their_node_id_arr, msg_ref);
-       LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_NoneLightningErrorZ_clone((LDKCResult_NoneLightningErrorZ*)ret);
-       return ret_conv;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeFeaturesDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_NodeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeFeaturesDecodeErrorZ), "LDKCResult_NodeFeaturesDecodeErrorZ");
+       *ret_conv = CResult_NodeFeaturesDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-LDKCResult_NoneLightningErrorZ handle_query_channel_range_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKQueryChannelRange msg) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
-       LDKQueryChannelRange msg_var = msg;
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       LDKCResult_NoneLightningErrorZ* ret = (LDKCResult_NoneLightningErrorZ*)(*env)->CallLongMethod(env, obj, j_calls->handle_query_channel_range_meth, their_node_id_arr, msg_ref);
-       LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_NoneLightningErrorZ_clone((LDKCResult_NoneLightningErrorZ*)ret);
-       return ret_conv;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NodeFeaturesDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_NodeFeaturesDecodeErrorZ _res_conv = *(LDKCResult_NodeFeaturesDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_NodeFeaturesDecodeErrorZ_free(_res_conv);
 }
-LDKCResult_NoneLightningErrorZ handle_query_short_channel_ids_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKQueryShortChannelIds msg) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
-       LDKQueryShortChannelIds msg_var = msg;
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       LDKCResult_NoneLightningErrorZ* ret = (LDKCResult_NoneLightningErrorZ*)(*env)->CallLongMethod(env, obj, j_calls->handle_query_short_channel_ids_meth, their_node_id_arr, msg_ref);
-       LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_NoneLightningErrorZ_clone((LDKCResult_NoneLightningErrorZ*)ret);
-       return ret_conv;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelFeaturesDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKChannelFeatures o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = ChannelFeatures_clone(&o_conv);
+       LDKCResult_ChannelFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelFeaturesDecodeErrorZ), "LDKCResult_ChannelFeaturesDecodeErrorZ");
+       *ret_conv = CResult_ChannelFeaturesDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
-static void* LDKRoutingMessageHandler_JCalls_clone(const void* this_arg) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
-       atomic_fetch_add_explicit(&j_calls->MessageSendEventsProvider->refcnt, 1, memory_order_release);
-       return (void*) this_arg;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelFeaturesDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_ChannelFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelFeaturesDecodeErrorZ), "LDKCResult_ChannelFeaturesDecodeErrorZ");
+       *ret_conv = CResult_ChannelFeaturesDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-static inline LDKRoutingMessageHandler LDKRoutingMessageHandler_init (JNIEnv *env, jclass clz, jobject o, jobject MessageSendEventsProvider) {
-       jclass c = (*env)->GetObjectClass(env, o);
-       CHECK(c != NULL);
-       LDKRoutingMessageHandler_JCalls *calls = MALLOC(sizeof(LDKRoutingMessageHandler_JCalls), "LDKRoutingMessageHandler_JCalls");
-       atomic_init(&calls->refcnt, 1);
-       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
-       calls->o = (*env)->NewWeakGlobalRef(env, o);
-       calls->handle_node_announcement_meth = (*env)->GetMethodID(env, c, "handle_node_announcement", "(J)J");
-       CHECK(calls->handle_node_announcement_meth != NULL);
-       calls->handle_channel_announcement_meth = (*env)->GetMethodID(env, c, "handle_channel_announcement", "(J)J");
-       CHECK(calls->handle_channel_announcement_meth != NULL);
-       calls->handle_channel_update_meth = (*env)->GetMethodID(env, c, "handle_channel_update", "(J)J");
-       CHECK(calls->handle_channel_update_meth != NULL);
-       calls->handle_htlc_fail_channel_update_meth = (*env)->GetMethodID(env, c, "handle_htlc_fail_channel_update", "(J)V");
-       CHECK(calls->handle_htlc_fail_channel_update_meth != NULL);
-       calls->get_next_channel_announcements_meth = (*env)->GetMethodID(env, c, "get_next_channel_announcements", "(JB)[J");
-       CHECK(calls->get_next_channel_announcements_meth != NULL);
-       calls->get_next_node_announcements_meth = (*env)->GetMethodID(env, c, "get_next_node_announcements", "([BB)[J");
-       CHECK(calls->get_next_node_announcements_meth != NULL);
-       calls->sync_routing_table_meth = (*env)->GetMethodID(env, c, "sync_routing_table", "([BJ)V");
-       CHECK(calls->sync_routing_table_meth != NULL);
-       calls->handle_reply_channel_range_meth = (*env)->GetMethodID(env, c, "handle_reply_channel_range", "([BJ)J");
-       CHECK(calls->handle_reply_channel_range_meth != NULL);
-       calls->handle_reply_short_channel_ids_end_meth = (*env)->GetMethodID(env, c, "handle_reply_short_channel_ids_end", "([BJ)J");
-       CHECK(calls->handle_reply_short_channel_ids_end_meth != NULL);
-       calls->handle_query_channel_range_meth = (*env)->GetMethodID(env, c, "handle_query_channel_range", "([BJ)J");
-       CHECK(calls->handle_query_channel_range_meth != NULL);
-       calls->handle_query_short_channel_ids_meth = (*env)->GetMethodID(env, c, "handle_query_short_channel_ids", "([BJ)J");
-       CHECK(calls->handle_query_short_channel_ids_meth != NULL);
 
-       LDKRoutingMessageHandler ret = {
-               .this_arg = (void*) calls,
-               .handle_node_announcement = handle_node_announcement_jcall,
-               .handle_channel_announcement = handle_channel_announcement_jcall,
-               .handle_channel_update = handle_channel_update_jcall,
-               .handle_htlc_fail_channel_update = handle_htlc_fail_channel_update_jcall,
-               .get_next_channel_announcements = get_next_channel_announcements_jcall,
-               .get_next_node_announcements = get_next_node_announcements_jcall,
-               .sync_routing_table = sync_routing_table_jcall,
-               .handle_reply_channel_range = handle_reply_channel_range_jcall,
-               .handle_reply_short_channel_ids_end = handle_reply_short_channel_ids_end_jcall,
-               .handle_query_channel_range = handle_query_channel_range_jcall,
-               .handle_query_short_channel_ids = handle_query_short_channel_ids_jcall,
-               .free = LDKRoutingMessageHandler_JCalls_free,
-               .MessageSendEventsProvider = LDKMessageSendEventsProvider_init(env, clz, MessageSendEventsProvider),
-       };
-       calls->MessageSendEventsProvider = ret.MessageSendEventsProvider.this_arg;
-       return ret;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelFeaturesDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_ChannelFeaturesDecodeErrorZ _res_conv = *(LDKCResult_ChannelFeaturesDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_ChannelFeaturesDecodeErrorZ_free(_res_conv);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKRoutingMessageHandler_1new(JNIEnv *env, jclass clz, jobject o, jobject MessageSendEventsProvider) {
-       LDKRoutingMessageHandler *res_ptr = MALLOC(sizeof(LDKRoutingMessageHandler), "LDKRoutingMessageHandler");
-       *res_ptr = LDKRoutingMessageHandler_init(env, clz, o, MessageSendEventsProvider);
-       return (long)res_ptr;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelConfigDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKChannelConfig o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = ChannelConfig_clone(&o_conv);
+       LDKCResult_ChannelConfigDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelConfigDecodeErrorZ), "LDKCResult_ChannelConfigDecodeErrorZ");
+       *ret_conv = CResult_ChannelConfigDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1node_1announcement(JNIEnv *env, jclass clz, int64_t this_arg, int64_t msg) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       LDKNodeAnnouncement msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelConfigDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_ChannelConfigDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelConfigDecodeErrorZ), "LDKCResult_ChannelConfigDecodeErrorZ");
+       *ret_conv = CResult_ChannelConfigDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelConfigDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_ChannelConfigDecodeErrorZ _res_conv = *(LDKCResult_ChannelConfigDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_ChannelConfigDecodeErrorZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelConfigDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_ChannelConfigDecodeErrorZ* orig_conv = (LDKCResult_ChannelConfigDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ChannelConfigDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelConfigDecodeErrorZ), "LDKCResult_ChannelConfigDecodeErrorZ");
+       *ret_conv = CResult_ChannelConfigDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1ok(JNIEnv *env, jclass clz, jboolean o) {
        LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
-       *ret_conv = (this_arg_conv->handle_node_announcement)(this_arg_conv->this_arg, &msg_conv);
+       *ret_conv = CResult_boolLightningErrorZ_ok(o);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1channel_1announcement(JNIEnv *env, jclass clz, int64_t this_arg, int64_t msg) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       LDKChannelAnnouncement msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKLightningError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = LightningError_clone(&e_conv);
        LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
-       *ret_conv = (this_arg_conv->handle_channel_announcement)(this_arg_conv->this_arg, &msg_conv);
+       *ret_conv = CResult_boolLightningErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1channel_1update(JNIEnv *env, jclass clz, int64_t this_arg, int64_t msg) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       LDKChannelUpdate msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_boolLightningErrorZ _res_conv = *(LDKCResult_boolLightningErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_boolLightningErrorZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_boolLightningErrorZ* orig_conv = (LDKCResult_boolLightningErrorZ*)(orig & ~1);
        LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
-       *ret_conv = (this_arg_conv->handle_channel_update)(this_arg_conv->this_arg, &msg_conv);
+       *ret_conv = CResult_boolLightningErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1htlc_1fail_1channel_1update(JNIEnv *env, jclass clz, int64_t this_arg, int64_t update) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       LDKHTLCFailChannelUpdate* update_conv = (LDKHTLCFailChannelUpdate*)update;
-       (this_arg_conv->handle_htlc_fail_channel_update)(this_arg_conv->this_arg, update_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* orig_conv = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(orig & ~1);
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
+       *ret_ref = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig_conv);
+       return (long)ret_ref;
 }
 
-JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1get_1next_1channel_1announcements(JNIEnv *env, jclass clz, int64_t this_arg, int64_t starting_point, int8_t batch_amount) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ ret_var = (this_arg_conv->get_next_channel_announcements)(this_arg_conv->this_arg, starting_point, batch_amount);
-       int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
-       int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
-       for (size_t l = 0; l < ret_var.datalen; l++) {
-               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* arr_conv_63_ref = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
-               *arr_conv_63_ref = ret_var.data[l];
-               ret_arr_ptr[l] = (long)arr_conv_63_ref;
-       }
-       (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
-       FREE(ret_var.data);
-       return ret_arr;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1new(JNIEnv *env, jclass clz, int64_t a, int64_t b, int64_t c) {
+       LDKChannelAnnouncement a_conv;
+       a_conv.inner = (void*)(a & (~1));
+       a_conv.is_owned = (a & 1) || (a == 0);
+       a_conv = ChannelAnnouncement_clone(&a_conv);
+       LDKChannelUpdate b_conv;
+       b_conv.inner = (void*)(b & (~1));
+       b_conv.is_owned = (b & 1) || (b == 0);
+       b_conv = ChannelUpdate_clone(&b_conv);
+       LDKChannelUpdate c_conv;
+       c_conv.inner = (void*)(c & (~1));
+       c_conv.is_owned = (c & 1) || (c == 0);
+       c_conv = ChannelUpdate_clone(&c_conv);
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
+       *ret_ref = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a_conv, b_conv, c_conv);
+       return (long)ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res_conv);
 }
 
-JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1get_1next_1node_1announcements(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray starting_point, int8_t batch_amount) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       LDKPublicKey starting_point_ref;
-       CHECK((*env)->GetArrayLength(env, starting_point) == 33);
-       (*env)->GetByteArrayRegion(env, starting_point, 0, 33, starting_point_ref.compressed_form);
-       LDKCVec_NodeAnnouncementZ ret_var = (this_arg_conv->get_next_node_announcements)(this_arg_conv->this_arg, starting_point_ref, batch_amount);
-       int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
-       int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
-       for (size_t s = 0; s < ret_var.datalen; s++) {
-               LDKNodeAnnouncement arr_conv_18_var = ret_var.data[s];
-               CHECK((((long)arr_conv_18_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-               CHECK((((long)&arr_conv_18_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-               long arr_conv_18_ref = (long)arr_conv_18_var.inner;
-               if (arr_conv_18_var.is_owned) {
-                       arr_conv_18_ref |= 1;
-               }
-               ret_arr_ptr[s] = arr_conv_18_ref;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+       LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res_constr;
+       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ Elements");
+       else
+               _res_constr.data = NULL;
+       int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
+       for (size_t l = 0; l < _res_constr.datalen; l++) {
+               int64_t arr_conv_63 = _res_vals[l];
+               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ arr_conv_63_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)arr_conv_63) & ~1);
+               FREE((void*)arr_conv_63);
+               _res_constr.data[l] = arr_conv_63_conv;
        }
-       (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
-       FREE(ret_var.data);
-       return ret_arr;
+       (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
+       CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res_constr);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1sync_1routing_1table(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t init) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
-       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
-       LDKInit init_conv;
-       init_conv.inner = (void*)(init & (~1));
-       init_conv.is_owned = false;
-       (this_arg_conv->sync_routing_table)(this_arg_conv->this_arg, their_node_id_ref, &init_conv);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1NodeAnnouncementZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+       LDKCVec_NodeAnnouncementZ _res_constr;
+       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKNodeAnnouncement), "LDKCVec_NodeAnnouncementZ Elements");
+       else
+               _res_constr.data = NULL;
+       int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
+       for (size_t s = 0; s < _res_constr.datalen; s++) {
+               int64_t arr_conv_18 = _res_vals[s];
+               LDKNodeAnnouncement arr_conv_18_conv;
+               arr_conv_18_conv.inner = (void*)(arr_conv_18 & (~1));
+               arr_conv_18_conv.is_owned = (arr_conv_18 & 1) || (arr_conv_18 == 0);
+               _res_constr.data[s] = arr_conv_18_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
+       CVec_NodeAnnouncementZ_free(_res_constr);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1reply_1channel_1range(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
-       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
-       LDKReplyChannelRange msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = (msg & 1) || (msg == 0);
-       msg_conv = ReplyChannelRange_clone(&msg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneLightningErrorZ_1ok(JNIEnv *env, jclass clz) {
        LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
-       *ret_conv = (this_arg_conv->handle_reply_channel_range)(this_arg_conv->this_arg, their_node_id_ref, msg_conv);
+       *ret_conv = CResult_NoneLightningErrorZ_ok();
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1reply_1short_1channel_1ids_1end(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
-       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
-       LDKReplyShortChannelIdsEnd msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = (msg & 1) || (msg == 0);
-       msg_conv = ReplyShortChannelIdsEnd_clone(&msg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneLightningErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKLightningError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = LightningError_clone(&e_conv);
        LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
-       *ret_conv = (this_arg_conv->handle_reply_short_channel_ids_end)(this_arg_conv->this_arg, their_node_id_ref, msg_conv);
+       *ret_conv = CResult_NoneLightningErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1query_1channel_1range(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
-       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
-       LDKQueryChannelRange msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = (msg & 1) || (msg == 0);
-       msg_conv = QueryChannelRange_clone(&msg_conv);
-       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
-       *ret_conv = (this_arg_conv->handle_query_channel_range)(this_arg_conv->this_arg, their_node_id_ref, msg_conv);
-       return (long)ret_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneLightningErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_NoneLightningErrorZ _res_conv = *(LDKCResult_NoneLightningErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_NoneLightningErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1query_1short_1channel_1ids(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
-       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
-       LDKQueryShortChannelIds msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = (msg & 1) || (msg == 0);
-       msg_conv = QueryShortChannelIds_clone(&msg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneLightningErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_NoneLightningErrorZ* orig_conv = (LDKCResult_NoneLightningErrorZ*)(orig & ~1);
        LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
-       *ret_conv = (this_arg_conv->handle_query_short_channel_ids)(this_arg_conv->this_arg, their_node_id_ref, msg_conv);
+       *ret_conv = CResult_NoneLightningErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-typedef struct LDKSocketDescriptor_JCalls {
-       atomic_size_t refcnt;
-       JavaVM *vm;
-       jweak o;
-       jmethodID send_data_meth;
-       jmethodID disconnect_socket_meth;
-       jmethodID eq_meth;
-       jmethodID hash_meth;
-} LDKSocketDescriptor_JCalls;
-static void LDKSocketDescriptor_JCalls_free(void* this_arg) {
-       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
-       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
-               JNIEnv *env;
-               DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
-               FREE(j_calls);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1MessageSendEventZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+       LDKCVec_MessageSendEventZ _res_constr;
+       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKMessageSendEvent), "LDKCVec_MessageSendEventZ Elements");
+       else
+               _res_constr.data = NULL;
+       int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
+       for (size_t s = 0; s < _res_constr.datalen; s++) {
+               int64_t arr_conv_18 = _res_vals[s];
+               LDKMessageSendEvent arr_conv_18_conv = *(LDKMessageSendEvent*)(((uint64_t)arr_conv_18) & ~1);
+               FREE((void*)arr_conv_18);
+               _res_constr.data[s] = arr_conv_18_conv;
        }
+       (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
+       CVec_MessageSendEventZ_free(_res_constr);
 }
-uintptr_t send_data_jcall(void* this_arg, LDKu8slice data, bool resume_read) {
-       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       LDKu8slice data_var = data;
-       int8_tArray data_arr = (*env)->NewByteArray(env, data_var.datalen);
-       (*env)->SetByteArrayRegion(env, data_arr, 0, data_var.datalen, data_var.data);
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       return (*env)->CallLongMethod(env, obj, j_calls->send_data_meth, data_arr, resume_read);
-}
-void disconnect_socket_jcall(void* this_arg) {
-       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->disconnect_socket_meth);
-}
-bool eq_jcall(const void* this_arg, const LDKSocketDescriptor * other_arg) {
-       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       LDKSocketDescriptor *other_arg_clone = MALLOC(sizeof(LDKSocketDescriptor), "LDKSocketDescriptor");
-       *other_arg_clone = SocketDescriptor_clone(other_arg);
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       return (*env)->CallBooleanMethod(env, obj, j_calls->eq_meth, (long)other_arg_clone);
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DirectionalChannelInfoDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKDirectionalChannelInfo o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = DirectionalChannelInfo_clone(&o_conv);
+       LDKCResult_DirectionalChannelInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DirectionalChannelInfoDecodeErrorZ), "LDKCResult_DirectionalChannelInfoDecodeErrorZ");
+       *ret_conv = CResult_DirectionalChannelInfoDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
-uint64_t hash_jcall(const void* this_arg) {
-       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       return (*env)->CallLongMethod(env, obj, j_calls->hash_meth);
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DirectionalChannelInfoDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_DirectionalChannelInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DirectionalChannelInfoDecodeErrorZ), "LDKCResult_DirectionalChannelInfoDecodeErrorZ");
+       *ret_conv = CResult_DirectionalChannelInfoDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-static void* LDKSocketDescriptor_JCalls_clone(const void* this_arg) {
-       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
-       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
-       return (void*) this_arg;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1DirectionalChannelInfoDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_DirectionalChannelInfoDecodeErrorZ _res_conv = *(LDKCResult_DirectionalChannelInfoDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_DirectionalChannelInfoDecodeErrorZ_free(_res_conv);
 }
-static inline LDKSocketDescriptor LDKSocketDescriptor_init (JNIEnv *env, jclass clz, jobject o) {
-       jclass c = (*env)->GetObjectClass(env, o);
-       CHECK(c != NULL);
-       LDKSocketDescriptor_JCalls *calls = MALLOC(sizeof(LDKSocketDescriptor_JCalls), "LDKSocketDescriptor_JCalls");
-       atomic_init(&calls->refcnt, 1);
-       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
-       calls->o = (*env)->NewWeakGlobalRef(env, o);
-       calls->send_data_meth = (*env)->GetMethodID(env, c, "send_data", "([BZ)J");
-       CHECK(calls->send_data_meth != NULL);
-       calls->disconnect_socket_meth = (*env)->GetMethodID(env, c, "disconnect_socket", "()V");
-       CHECK(calls->disconnect_socket_meth != NULL);
-       calls->eq_meth = (*env)->GetMethodID(env, c, "eq", "(J)Z");
-       CHECK(calls->eq_meth != NULL);
-       calls->hash_meth = (*env)->GetMethodID(env, c, "hash", "()J");
-       CHECK(calls->hash_meth != NULL);
 
-       LDKSocketDescriptor ret = {
-               .this_arg = (void*) calls,
-               .send_data = send_data_jcall,
-               .disconnect_socket = disconnect_socket_jcall,
-               .eq = eq_jcall,
-               .hash = hash_jcall,
-               .clone = LDKSocketDescriptor_JCalls_clone,
-               .free = LDKSocketDescriptor_JCalls_free,
-       };
-       return ret;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DirectionalChannelInfoDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_DirectionalChannelInfoDecodeErrorZ* orig_conv = (LDKCResult_DirectionalChannelInfoDecodeErrorZ*)(orig & ~1);
+       LDKCResult_DirectionalChannelInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DirectionalChannelInfoDecodeErrorZ), "LDKCResult_DirectionalChannelInfoDecodeErrorZ");
+       *ret_conv = CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKSocketDescriptor_1new(JNIEnv *env, jclass clz, jobject o) {
-       LDKSocketDescriptor *res_ptr = MALLOC(sizeof(LDKSocketDescriptor), "LDKSocketDescriptor");
-       *res_ptr = LDKSocketDescriptor_init(env, clz, o);
-       return (long)res_ptr;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelInfoDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKChannelInfo o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       // Warning: we need a move here but no clone is available for LDKChannelInfo
+       LDKCResult_ChannelInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelInfoDecodeErrorZ), "LDKCResult_ChannelInfoDecodeErrorZ");
+       *ret_conv = CResult_ChannelInfoDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1send_1data(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray data, jboolean resume_read) {
-       LDKSocketDescriptor* this_arg_conv = (LDKSocketDescriptor*)this_arg;
-       LDKu8slice data_ref;
-       data_ref.datalen = (*env)->GetArrayLength(env, data);
-       data_ref.data = (*env)->GetByteArrayElements (env, data, NULL);
-       int64_t ret_val = (this_arg_conv->send_data)(this_arg_conv->this_arg, data_ref, resume_read);
-       (*env)->ReleaseByteArrayElements(env, data, (int8_t*)data_ref.data, 0);
-       return ret_val;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelInfoDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_ChannelInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelInfoDecodeErrorZ), "LDKCResult_ChannelInfoDecodeErrorZ");
+       *ret_conv = CResult_ChannelInfoDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1disconnect_1socket(JNIEnv *env, jclass clz, int64_t this_arg) {
-       LDKSocketDescriptor* this_arg_conv = (LDKSocketDescriptor*)this_arg;
-       (this_arg_conv->disconnect_socket)(this_arg_conv->this_arg);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelInfoDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_ChannelInfoDecodeErrorZ _res_conv = *(LDKCResult_ChannelInfoDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_ChannelInfoDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1hash(JNIEnv *env, jclass clz, int64_t this_arg) {
-       LDKSocketDescriptor* this_arg_conv = (LDKSocketDescriptor*)this_arg;
-       int64_t ret_val = (this_arg_conv->hash)(this_arg_conv->this_arg);
-       return ret_val;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RoutingFeesDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKRoutingFees o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = RoutingFees_clone(&o_conv);
+       LDKCResult_RoutingFeesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RoutingFeesDecodeErrorZ), "LDKCResult_RoutingFeesDecodeErrorZ");
+       *ret_conv = CResult_RoutingFeesDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Transaction_1free(JNIEnv *env, jclass clz, int8_tArray _res) {
-       LDKTransaction _res_ref;
-       _res_ref.datalen = (*env)->GetArrayLength(env, _res);
-       _res_ref.data = MALLOC(_res_ref.datalen, "LDKTransaction Bytes");
-       (*env)->GetByteArrayRegion(env, _res, 0, _res_ref.datalen, _res_ref.data);
-       _res_ref.data_is_owned = true;
-       Transaction_free(_res_ref);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RoutingFeesDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_RoutingFeesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RoutingFeesDecodeErrorZ), "LDKCResult_RoutingFeesDecodeErrorZ");
+       *ret_conv = CResult_RoutingFeesDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxOut_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RoutingFeesDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKTxOut _res_conv = *(LDKTxOut*)(((uint64_t)_res) & ~1);
+       LDKCResult_RoutingFeesDecodeErrorZ _res_conv = *(LDKCResult_RoutingFeesDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       TxOut_free(_res_conv);
+       CResult_RoutingFeesDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxOut_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKTxOut* orig_conv = (LDKTxOut*)(orig & ~1);
-       LDKTxOut* ret_ref = MALLOC(sizeof(LDKTxOut), "LDKTxOut");
-       *ret_ref = TxOut_clone(orig_conv);
-       return (long)ret_ref;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RoutingFeesDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_RoutingFeesDecodeErrorZ* orig_conv = (LDKCResult_RoutingFeesDecodeErrorZ*)(orig & ~1);
+       LDKCResult_RoutingFeesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RoutingFeesDecodeErrorZ), "LDKCResult_RoutingFeesDecodeErrorZ");
+       *ret_conv = CResult_RoutingFeesDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1SpendableOutputDescriptorZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
-       LDKCVec_SpendableOutputDescriptorZ _res_constr;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1NetAddressZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+       LDKCVec_NetAddressZ _res_constr;
        _res_constr.datalen = (*env)->GetArrayLength(env, _res);
        if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements");
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKNetAddress), "LDKCVec_NetAddressZ Elements");
        else
                _res_constr.data = NULL;
        int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
-       for (size_t b = 0; b < _res_constr.datalen; b++) {
-               int64_t arr_conv_27 = _res_vals[b];
-               LDKSpendableOutputDescriptor arr_conv_27_conv = *(LDKSpendableOutputDescriptor*)(((uint64_t)arr_conv_27) & ~1);
-               FREE((void*)arr_conv_27);
-               _res_constr.data[b] = arr_conv_27_conv;
+       for (size_t m = 0; m < _res_constr.datalen; m++) {
+               int64_t arr_conv_12 = _res_vals[m];
+               LDKNetAddress arr_conv_12_conv = *(LDKNetAddress*)(((uint64_t)arr_conv_12) & ~1);
+               FREE((void*)arr_conv_12);
+               _res_constr.data[m] = arr_conv_12_conv;
        }
        (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
-       CVec_SpendableOutputDescriptorZ_free(_res_constr);
+       CVec_NetAddressZ_free(_res_constr);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1MessageSendEventZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
-       LDKCVec_MessageSendEventZ _res_constr;
-       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
-       if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKMessageSendEvent), "LDKCVec_MessageSendEventZ Elements");
-       else
-               _res_constr.data = NULL;
-       int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
-       for (size_t s = 0; s < _res_constr.datalen; s++) {
-               int64_t arr_conv_18 = _res_vals[s];
-               LDKMessageSendEvent arr_conv_18_conv = *(LDKMessageSendEvent*)(((uint64_t)arr_conv_18) & ~1);
-               FREE((void*)arr_conv_18);
-               _res_constr.data[s] = arr_conv_18_conv;
-       }
-       (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
-       CVec_MessageSendEventZ_free(_res_constr);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementInfoDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKNodeAnnouncementInfo o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = NodeAnnouncementInfo_clone(&o_conv);
+       LDKCResult_NodeAnnouncementInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementInfoDecodeErrorZ), "LDKCResult_NodeAnnouncementInfoDecodeErrorZ");
+       *ret_conv = CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1EventZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
-       LDKCVec_EventZ _res_constr;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementInfoDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_NodeAnnouncementInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementInfoDecodeErrorZ), "LDKCResult_NodeAnnouncementInfoDecodeErrorZ");
+       *ret_conv = CResult_NodeAnnouncementInfoDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementInfoDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res_conv = *(LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementInfoDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_NodeAnnouncementInfoDecodeErrorZ* orig_conv = (LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)(orig & ~1);
+       LDKCResult_NodeAnnouncementInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementInfoDecodeErrorZ), "LDKCResult_NodeAnnouncementInfoDecodeErrorZ");
+       *ret_conv = CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u64Z_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+       LDKCVec_u64Z _res_constr;
        _res_constr.datalen = (*env)->GetArrayLength(env, _res);
        if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKEvent), "LDKCVec_EventZ Elements");
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(int64_t), "LDKCVec_u64Z Elements");
        else
                _res_constr.data = NULL;
        int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
-       for (size_t h = 0; h < _res_constr.datalen; h++) {
-               int64_t arr_conv_7 = _res_vals[h];
-               LDKEvent arr_conv_7_conv = *(LDKEvent*)(((uint64_t)arr_conv_7) & ~1);
-               FREE((void*)arr_conv_7);
-               _res_constr.data[h] = arr_conv_7_conv;
+       for (size_t g = 0; g < _res_constr.datalen; g++) {
+               int64_t arr_conv_6 = _res_vals[g];
+               _res_constr.data[g] = arr_conv_6;
        }
        (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
-       CVec_EventZ_free(_res_constr);
+       CVec_u64Z_free(_res_constr);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeInfoDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKNodeInfo o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = NodeInfo_clone(&o_conv);
+       LDKCResult_NodeInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeInfoDecodeErrorZ), "LDKCResult_NodeInfoDecodeErrorZ");
+       *ret_conv = CResult_NodeInfoDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeInfoDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_NodeInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeInfoDecodeErrorZ), "LDKCResult_NodeInfoDecodeErrorZ");
+       *ret_conv = CResult_NodeInfoDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NodeInfoDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKC2Tuple_usizeTransactionZ _res_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_NodeInfoDecodeErrorZ _res_conv = *(LDKCResult_NodeInfoDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       C2Tuple_usizeTransactionZ_free(_res_conv);
+       CResult_NodeInfoDecodeErrorZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeInfoDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_NodeInfoDecodeErrorZ* orig_conv = (LDKCResult_NodeInfoDecodeErrorZ*)(orig & ~1);
+       LDKCResult_NodeInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeInfoDecodeErrorZ), "LDKCResult_NodeInfoDecodeErrorZ");
+       *ret_conv = CResult_NodeInfoDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKNetworkGraph o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       // Warning: we need a move here but no clone is available for LDKNetworkGraph
+       LDKCResult_NetworkGraphDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetworkGraphDecodeErrorZ), "LDKCResult_NetworkGraphDecodeErrorZ");
+       *ret_conv = CResult_NetworkGraphDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_NetworkGraphDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetworkGraphDecodeErrorZ), "LDKCResult_NetworkGraphDecodeErrorZ");
+       *ret_conv = CResult_NetworkGraphDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_NetworkGraphDecodeErrorZ _res_conv = *(LDKCResult_NetworkGraphDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_NetworkGraphDecodeErrorZ_free(_res_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1new(JNIEnv *env, jclass clz, int64_t a, int8_tArray b) {
@@ -5358,6 +7044,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_
        return (long)ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKC2Tuple_usizeTransactionZ _res_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       C2Tuple_usizeTransactionZ_free(_res_conv);
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1usizeTransactionZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
        LDKCVec_C2Tuple_usizeTransactionZZ _res_constr;
        _res_constr.datalen = (*env)->GetArrayLength(env, _res);
@@ -5422,31 +7115,124 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1MonitorEventZ_1free(JNIE
        CVec_MonitorEventZ_free(_res_constr);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelMonitorUpdateDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKChannelMonitorUpdate o_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1EventZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+       LDKCVec_EventZ _res_constr;
+       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKEvent), "LDKCVec_EventZ Elements");
+       else
+               _res_constr.data = NULL;
+       int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
+       for (size_t h = 0; h < _res_constr.datalen; h++) {
+               int64_t arr_conv_7 = _res_vals[h];
+               LDKEvent arr_conv_7_conv = *(LDKEvent*)(((uint64_t)arr_conv_7) & ~1);
+               FREE((void*)arr_conv_7);
+               _res_constr.data[h] = arr_conv_7_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
+       CVec_EventZ_free(_res_constr);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutPointDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKOutPoint o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = OutPoint_clone(&o_conv);
+       LDKCResult_OutPointDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutPointDecodeErrorZ), "LDKCResult_OutPointDecodeErrorZ");
+       *ret_conv = CResult_OutPointDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutPointDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_OutPointDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutPointDecodeErrorZ), "LDKCResult_OutPointDecodeErrorZ");
+       *ret_conv = CResult_OutPointDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OutPointDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_OutPointDecodeErrorZ _res_conv = *(LDKCResult_OutPointDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_OutPointDecodeErrorZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutPointDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_OutPointDecodeErrorZ* orig_conv = (LDKCResult_OutPointDecodeErrorZ*)(orig & ~1);
+       LDKCResult_OutPointDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutPointDecodeErrorZ), "LDKCResult_OutPointDecodeErrorZ");
+       *ret_conv = CResult_OutPointDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelMonitorUpdateDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKChannelMonitorUpdate o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = ChannelMonitorUpdate_clone(&o_conv);
+       LDKCResult_ChannelMonitorUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelMonitorUpdateDecodeErrorZ), "LDKCResult_ChannelMonitorUpdateDecodeErrorZ");
+       *ret_conv = CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelMonitorUpdateDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_ChannelMonitorUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelMonitorUpdateDecodeErrorZ), "LDKCResult_ChannelMonitorUpdateDecodeErrorZ");
+       *ret_conv = CResult_ChannelMonitorUpdateDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelMonitorUpdateDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res_conv = *(LDKCResult_ChannelMonitorUpdateDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelMonitorUpdateDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_ChannelMonitorUpdateDecodeErrorZ* orig_conv = (LDKCResult_ChannelMonitorUpdateDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ChannelMonitorUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelMonitorUpdateDecodeErrorZ), "LDKCResult_ChannelMonitorUpdateDecodeErrorZ");
+       *ret_conv = CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCUpdateDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKHTLCUpdate o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = ChannelMonitorUpdate_clone(&o_conv);
-       LDKCResult_ChannelMonitorUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelMonitorUpdateDecodeErrorZ), "LDKCResult_ChannelMonitorUpdateDecodeErrorZ");
-       *ret_conv = CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o_conv);
+       o_conv = HTLCUpdate_clone(&o_conv);
+       LDKCResult_HTLCUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCUpdateDecodeErrorZ), "LDKCResult_HTLCUpdateDecodeErrorZ");
+       *ret_conv = CResult_HTLCUpdateDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelMonitorUpdateDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCUpdateDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_ChannelMonitorUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelMonitorUpdateDecodeErrorZ), "LDKCResult_ChannelMonitorUpdateDecodeErrorZ");
-       *ret_conv = CResult_ChannelMonitorUpdateDecodeErrorZ_err(e_conv);
+       LDKCResult_HTLCUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCUpdateDecodeErrorZ), "LDKCResult_HTLCUpdateDecodeErrorZ");
+       *ret_conv = CResult_HTLCUpdateDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelMonitorUpdateDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCUpdateDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res_conv = *(LDKCResult_ChannelMonitorUpdateDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_HTLCUpdateDecodeErrorZ _res_conv = *(LDKCResult_HTLCUpdateDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res_conv);
+       CResult_HTLCUpdateDecodeErrorZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCUpdateDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_HTLCUpdateDecodeErrorZ* orig_conv = (LDKCResult_HTLCUpdateDecodeErrorZ*)(orig & ~1);
+       LDKCResult_HTLCUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCUpdateDecodeErrorZ), "LDKCResult_HTLCUpdateDecodeErrorZ");
+       *ret_conv = CResult_HTLCUpdateDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateErrorZ_1ok(JNIEnv *env, jclass clz) {
@@ -5479,11 +7265,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateE
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
-       if ((_res & 1) != 0) return;
-       LDKC2Tuple_OutPointScriptZ _res_conv = *(LDKC2Tuple_OutPointScriptZ*)(((uint64_t)_res) & ~1);
-       FREE((void*)_res);
-       C2Tuple_OutPointScriptZ_free(_res_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKC2Tuple_OutPointScriptZ* orig_conv = (LDKC2Tuple_OutPointScriptZ*)(orig & ~1);
+       LDKC2Tuple_OutPointScriptZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
+       *ret_ref = C2Tuple_OutPointScriptZ_clone(orig_conv);
+       return (long)ret_ref;
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1new(JNIEnv *env, jclass clz, int64_t a, int8_tArray b) {
@@ -5500,6 +7286,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1n
        return (long)ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKC2Tuple_OutPointScriptZ _res_conv = *(LDKC2Tuple_OutPointScriptZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       C2Tuple_OutPointScriptZ_free(_res_conv);
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TransactionZ_1free(JNIEnv *env, jclass clz, jobjectArray _res) {
        LDKCVec_TransactionZ _res_constr;
        _res_constr.datalen = (*env)->GetArrayLength(env, _res);
@@ -5526,13 +7319,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32TxOutZ_1clone(J
        return (long)ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32TxOutZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
-       if ((_res & 1) != 0) return;
-       LDKC2Tuple_u32TxOutZ _res_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)_res) & ~1);
-       FREE((void*)_res);
-       C2Tuple_u32TxOutZ_free(_res_conv);
-}
-
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32TxOutZ_1new(JNIEnv *env, jclass clz, int32_t a, int64_t b) {
        LDKTxOut b_conv = *(LDKTxOut*)(((uint64_t)b) & ~1);
        FREE((void*)b);
@@ -5541,6 +7327,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32TxOutZ_1new(JNI
        return (long)ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32TxOutZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKC2Tuple_u32TxOutZ _res_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       C2Tuple_u32TxOutZ_free(_res_conv);
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1u32TxOutZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
        LDKCVec_C2Tuple_u32TxOutZZ _res_constr;
        _res_constr.datalen = (*env)->GetArrayLength(env, _res);
@@ -5559,13 +7352,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1u32TxOutZZ_1fre
        CVec_C2Tuple_u32TxOutZZ_free(_res_constr);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
-       if ((_res & 1) != 0) return;
-       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(((uint64_t)_res) & ~1);
-       FREE((void*)_res);
-       C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res_conv);
-}
-
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int64_tArray b) {
        LDKThirtyTwoBytes a_ref;
        CHECK((*env)->GetArrayLength(env, a) == 32);
@@ -5589,6 +7375,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_
        return (long)ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res_conv);
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
        LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ _res_constr;
        _res_constr.datalen = (*env)->GetArrayLength(env, _res);
@@ -5607,13 +7400,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1TxidCVec_1C2Tup
        CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res_constr);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMonitorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
-       if ((_res & 1) != 0) return;
-       LDKC2Tuple_BlockHashChannelMonitorZ _res_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)_res) & ~1);
-       FREE((void*)_res);
-       C2Tuple_BlockHashChannelMonitorZ_free(_res_conv);
-}
-
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMonitorZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int64_t b) {
        LDKThirtyTwoBytes a_ref;
        CHECK((*env)->GetArrayLength(env, a) == 32);
@@ -5627,6 +7413,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMo
        return (long)ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMonitorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKC2Tuple_BlockHashChannelMonitorZ _res_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       C2Tuple_BlockHashChannelMonitorZ_free(_res_conv);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
        LDKC2Tuple_BlockHashChannelMonitorZ o_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o) & ~1);
        FREE((void*)o);
@@ -5635,21 +7428,209 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHash
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ");
+       *ret_conv = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res_conv = *(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1SpendableOutputDescriptorZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+       LDKCVec_SpendableOutputDescriptorZ _res_constr;
+       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements");
+       else
+               _res_constr.data = NULL;
+       int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
+       for (size_t b = 0; b < _res_constr.datalen; b++) {
+               int64_t arr_conv_27 = _res_vals[b];
+               LDKSpendableOutputDescriptor arr_conv_27_conv = *(LDKSpendableOutputDescriptor*)(((uint64_t)arr_conv_27) & ~1);
+               FREE((void*)arr_conv_27);
+               _res_constr.data[b] = arr_conv_27_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
+       CVec_SpendableOutputDescriptorZ_free(_res_constr);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKTxOut o_conv = *(LDKTxOut*)(((uint64_t)o) & ~1);
+       FREE((void*)o);
+       LDKCResult_TxOutAccessErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxOutAccessErrorZ), "LDKCResult_TxOutAccessErrorZ");
+       *ret_conv = CResult_TxOutAccessErrorZ_ok(o_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+       LDKAccessError e_conv = LDKAccessError_from_java(env, e);
+       LDKCResult_TxOutAccessErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxOutAccessErrorZ), "LDKCResult_TxOutAccessErrorZ");
+       *ret_conv = CResult_TxOutAccessErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_TxOutAccessErrorZ _res_conv = *(LDKCResult_TxOutAccessErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_TxOutAccessErrorZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_TxOutAccessErrorZ* orig_conv = (LDKCResult_TxOutAccessErrorZ*)(orig & ~1);
+       LDKCResult_TxOutAccessErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxOutAccessErrorZ), "LDKCResult_TxOutAccessErrorZ");
+       *ret_conv = CResult_TxOutAccessErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneAPIErrorZ_1ok(JNIEnv *env, jclass clz) {
+       LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
+       *ret_conv = CResult_NoneAPIErrorZ_ok();
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneAPIErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKAPIError e_conv = *(LDKAPIError*)(((uint64_t)e) & ~1);
+       FREE((void*)e);
+       LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
+       *ret_conv = CResult_NoneAPIErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneAPIErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_NoneAPIErrorZ _res_conv = *(LDKCResult_NoneAPIErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_NoneAPIErrorZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneAPIErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_NoneAPIErrorZ* orig_conv = (LDKCResult_NoneAPIErrorZ*)(orig & ~1);
+       LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
+       *ret_conv = CResult_NoneAPIErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ChannelDetailsZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+       LDKCVec_ChannelDetailsZ _res_constr;
+       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKChannelDetails), "LDKCVec_ChannelDetailsZ Elements");
+       else
+               _res_constr.data = NULL;
+       int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
+       for (size_t q = 0; q < _res_constr.datalen; q++) {
+               int64_t arr_conv_16 = _res_vals[q];
+               LDKChannelDetails arr_conv_16_conv;
+               arr_conv_16_conv.inner = (void*)(arr_conv_16 & (~1));
+               arr_conv_16_conv.is_owned = (arr_conv_16 & 1) || (arr_conv_16 == 0);
+               _res_constr.data[q] = arr_conv_16_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
+       CVec_ChannelDetailsZ_free(_res_constr);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1ok(JNIEnv *env, jclass clz) {
+       LDKCResult_NonePaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePaymentSendFailureZ), "LDKCResult_NonePaymentSendFailureZ");
+       *ret_conv = CResult_NonePaymentSendFailureZ_ok();
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKPaymentSendFailure e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = PaymentSendFailure_clone(&e_conv);
+       LDKCResult_NonePaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePaymentSendFailureZ), "LDKCResult_NonePaymentSendFailureZ");
+       *ret_conv = CResult_NonePaymentSendFailureZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_NonePaymentSendFailureZ _res_conv = *(LDKCResult_NonePaymentSendFailureZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_NonePaymentSendFailureZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_NonePaymentSendFailureZ* orig_conv = (LDKCResult_NonePaymentSendFailureZ*)(orig & ~1);
+       LDKCResult_NonePaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePaymentSendFailureZ), "LDKCResult_NonePaymentSendFailureZ");
+       *ret_conv = CResult_NonePaymentSendFailureZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ChannelMonitorZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+       LDKCVec_ChannelMonitorZ _res_constr;
+       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKChannelMonitor), "LDKCVec_ChannelMonitorZ Elements");
+       else
+               _res_constr.data = NULL;
+       int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
+       for (size_t q = 0; q < _res_constr.datalen; q++) {
+               int64_t arr_conv_16 = _res_vals[q];
+               LDKChannelMonitor arr_conv_16_conv;
+               arr_conv_16_conv.inner = (void*)(arr_conv_16 & (~1));
+               arr_conv_16_conv.is_owned = (arr_conv_16 & 1) || (arr_conv_16 == 0);
+               _res_constr.data[q] = arr_conv_16_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
+       CVec_ChannelMonitorZ_free(_res_constr);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelManagerZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int64_t b) {
+       LDKThirtyTwoBytes a_ref;
+       CHECK((*env)->GetArrayLength(env, a) == 32);
+       (*env)->GetByteArrayRegion(env, a, 0, 32, a_ref.data);
+       LDKChannelManager b_conv;
+       b_conv.inner = (void*)(b & (~1));
+       b_conv.is_owned = (b & 1) || (b == 0);
+       // Warning: we need a move here but no clone is available for LDKChannelManager
+       LDKC2Tuple_BlockHashChannelManagerZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelManagerZ), "LDKC2Tuple_BlockHashChannelManagerZ");
+       *ret_ref = C2Tuple_BlockHashChannelManagerZ_new(a_ref, b_conv);
+       return (long)ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelManagerZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKC2Tuple_BlockHashChannelManagerZ _res_conv = *(LDKC2Tuple_BlockHashChannelManagerZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       C2Tuple_BlockHashChannelManagerZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKC2Tuple_BlockHashChannelManagerZ o_conv = *(LDKC2Tuple_BlockHashChannelManagerZ*)(((uint64_t)o) & ~1);
+       FREE((void*)o);
+       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ");
+       *ret_conv = CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ");
-       *ret_conv = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e_conv);
+       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ");
+       *ret_conv = CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res_conv = *(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res_conv = *(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res_conv);
+       CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u64u64Z_1clone(JNIEnv *env, jclass clz, int64_t orig) {
@@ -5659,6 +7640,12 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u64u64Z_1clone(JNI
        return (long)ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u64u64Z_1new(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKC2Tuple_u64u64Z* ret_ref = MALLOC(sizeof(LDKC2Tuple_u64u64Z), "LDKC2Tuple_u64u64Z");
+       *ret_ref = C2Tuple_u64u64Z_new(a, b);
+       return (long)ret_ref;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u64u64Z_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
        LDKC2Tuple_u64u64Z _res_conv = *(LDKC2Tuple_u64u64Z*)(((uint64_t)_res) & ~1);
@@ -5666,12 +7653,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u64u64Z_1free(JNIEnv
        C2Tuple_u64u64Z_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u64u64Z_1new(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
-       LDKC2Tuple_u64u64Z* ret_ref = MALLOC(sizeof(LDKC2Tuple_u64u64Z), "LDKC2Tuple_u64u64Z");
-       *ret_ref = C2Tuple_u64u64Z_new(a, b);
-       return (long)ret_ref;
-}
-
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SpendableOutputDescriptorDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
        LDKSpendableOutputDescriptor o_conv = *(LDKSpendableOutputDescriptor*)(((uint64_t)o) & ~1);
        FREE((void*)o);
@@ -5704,23 +7685,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SpendableOutputDes
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1SignatureZ_1free(JNIEnv *env, jclass clz, jobjectArray _res) {
-       LDKCVec_SignatureZ _res_constr;
-       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
-       if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKSignature), "LDKCVec_SignatureZ Elements");
-       else
-               _res_constr.data = NULL;
-       for (size_t i = 0; i < _res_constr.datalen; i++) {
-               int8_tArray arr_conv_8 = (*env)->GetObjectArrayElement(env, _res, i);
-               LDKSignature arr_conv_8_ref;
-               CHECK((*env)->GetArrayLength(env, arr_conv_8) == 64);
-               (*env)->GetByteArrayRegion(env, arr_conv_8, 0, 64, arr_conv_8_ref.compact_form);
-               _res_constr.data[i] = arr_conv_8_ref;
-       }
-       CVec_SignatureZ_free(_res_constr);
-}
-
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
        LDKC2Tuple_SignatureCVec_SignatureZZ* orig_conv = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(orig & ~1);
        LDKC2Tuple_SignatureCVec_SignatureZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
@@ -5728,13 +7692,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1Sig
        return (long)ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
-       if ((_res & 1) != 0) return;
-       LDKC2Tuple_SignatureCVec_SignatureZZ _res_conv = *(LDKC2Tuple_SignatureCVec_SignatureZZ*)(((uint64_t)_res) & ~1);
-       FREE((void*)_res);
-       C2Tuple_SignatureCVec_SignatureZZ_free(_res_conv);
-}
-
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1new(JNIEnv *env, jclass clz, int8_tArray a, jobjectArray b) {
        LDKSignature a_ref;
        CHECK((*env)->GetArrayLength(env, a) == 64);
@@ -5757,6 +7714,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1Sig
        return (long)ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKC2Tuple_SignatureCVec_SignatureZZ _res_conv = *(LDKC2Tuple_SignatureCVec_SignatureZZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       C2Tuple_SignatureCVec_SignatureZZ_free(_res_conv);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
        LDKC2Tuple_SignatureCVec_SignatureZZ o_conv = *(LDKC2Tuple_SignatureCVec_SignatureZZ*)(((uint64_t)o) & ~1);
        FREE((void*)o);
@@ -5814,38 +7778,38 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SignatureNoneZ_1cl
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChanKeySignerDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelKeysDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
        LDKChannelKeys o_conv = *(LDKChannelKeys*)(((uint64_t)o) & ~1);
        if (o_conv.free == LDKChannelKeys_JCalls_free) {
                // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
                LDKChannelKeys_JCalls_clone(o_conv.this_arg);
        }
-       LDKCResult_ChanKeySignerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChanKeySignerDecodeErrorZ), "LDKCResult_ChanKeySignerDecodeErrorZ");
-       *ret_conv = CResult_ChanKeySignerDecodeErrorZ_ok(o_conv);
+       LDKCResult_ChannelKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelKeysDecodeErrorZ), "LDKCResult_ChannelKeysDecodeErrorZ");
+       *ret_conv = CResult_ChannelKeysDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChanKeySignerDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelKeysDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_ChanKeySignerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChanKeySignerDecodeErrorZ), "LDKCResult_ChanKeySignerDecodeErrorZ");
-       *ret_conv = CResult_ChanKeySignerDecodeErrorZ_err(e_conv);
+       LDKCResult_ChannelKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelKeysDecodeErrorZ), "LDKCResult_ChannelKeysDecodeErrorZ");
+       *ret_conv = CResult_ChannelKeysDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChanKeySignerDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelKeysDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_ChanKeySignerDecodeErrorZ _res_conv = *(LDKCResult_ChanKeySignerDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_ChannelKeysDecodeErrorZ _res_conv = *(LDKCResult_ChannelKeysDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_ChanKeySignerDecodeErrorZ_free(_res_conv);
+       CResult_ChannelKeysDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChanKeySignerDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKCResult_ChanKeySignerDecodeErrorZ* orig_conv = (LDKCResult_ChanKeySignerDecodeErrorZ*)(orig & ~1);
-       LDKCResult_ChanKeySignerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChanKeySignerDecodeErrorZ), "LDKCResult_ChanKeySignerDecodeErrorZ");
-       *ret_conv = CResult_ChanKeySignerDecodeErrorZ_clone(orig_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelKeysDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_ChannelKeysDecodeErrorZ* orig_conv = (LDKCResult_ChannelKeysDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ChannelKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelKeysDecodeErrorZ), "LDKCResult_ChannelKeysDecodeErrorZ");
+       *ret_conv = CResult_ChannelKeysDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
@@ -5876,185 +7840,146 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InMemoryChannelKeysDe
        CResult_InMemoryChannelKeysDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKTxOut o_conv = *(LDKTxOut*)(((uint64_t)o) & ~1);
-       FREE((void*)o);
-       LDKCResult_TxOutAccessErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxOutAccessErrorZ), "LDKCResult_TxOutAccessErrorZ");
-       *ret_conv = CResult_TxOutAccessErrorZ_ok(o_conv);
-       return (long)ret_conv;
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
-       LDKAccessError e_conv = LDKAccessError_from_java(env, e);
-       LDKCResult_TxOutAccessErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxOutAccessErrorZ), "LDKCResult_TxOutAccessErrorZ");
-       *ret_conv = CResult_TxOutAccessErrorZ_err(e_conv);
-       return (long)ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
-       if ((_res & 1) != 0) return;
-       LDKCResult_TxOutAccessErrorZ _res_conv = *(LDKCResult_TxOutAccessErrorZ*)(((uint64_t)_res) & ~1);
-       FREE((void*)_res);
-       CResult_TxOutAccessErrorZ_free(_res_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKCResult_TxOutAccessErrorZ* orig_conv = (LDKCResult_TxOutAccessErrorZ*)(orig & ~1);
-       LDKCResult_TxOutAccessErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxOutAccessErrorZ), "LDKCResult_TxOutAccessErrorZ");
-       *ret_conv = CResult_TxOutAccessErrorZ_clone(orig_conv);
-       return (long)ret_conv;
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneAPIErrorZ_1ok(JNIEnv *env, jclass clz) {
-       LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
-       *ret_conv = CResult_NoneAPIErrorZ_ok();
-       return (long)ret_conv;
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneAPIErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKAPIError e_conv = *(LDKAPIError*)(((uint64_t)e) & ~1);
-       FREE((void*)e);
-       LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
-       *ret_conv = CResult_NoneAPIErrorZ_err(e_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InMemoryChannelKeysDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_InMemoryChannelKeysDecodeErrorZ* orig_conv = (LDKCResult_InMemoryChannelKeysDecodeErrorZ*)(orig & ~1);
+       LDKCResult_InMemoryChannelKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InMemoryChannelKeysDecodeErrorZ), "LDKCResult_InMemoryChannelKeysDecodeErrorZ");
+       *ret_conv = CResult_InMemoryChannelKeysDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneAPIErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
-       if ((_res & 1) != 0) return;
-       LDKCResult_NoneAPIErrorZ _res_conv = *(LDKCResult_NoneAPIErrorZ*)(((uint64_t)_res) & ~1);
-       FREE((void*)_res);
-       CResult_NoneAPIErrorZ_free(_res_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ChannelDetailsZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
-       LDKCVec_ChannelDetailsZ _res_constr;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1RouteHopZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+       LDKCVec_RouteHopZ _res_constr;
        _res_constr.datalen = (*env)->GetArrayLength(env, _res);
        if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKChannelDetails), "LDKCVec_ChannelDetailsZ Elements");
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKRouteHop), "LDKCVec_RouteHopZ Elements");
        else
                _res_constr.data = NULL;
        int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
-       for (size_t q = 0; q < _res_constr.datalen; q++) {
-               int64_t arr_conv_16 = _res_vals[q];
-               LDKChannelDetails arr_conv_16_conv;
-               arr_conv_16_conv.inner = (void*)(arr_conv_16 & (~1));
-               arr_conv_16_conv.is_owned = (arr_conv_16 & 1) || (arr_conv_16 == 0);
-               _res_constr.data[q] = arr_conv_16_conv;
+       for (size_t k = 0; k < _res_constr.datalen; k++) {
+               int64_t arr_conv_10 = _res_vals[k];
+               LDKRouteHop arr_conv_10_conv;
+               arr_conv_10_conv.inner = (void*)(arr_conv_10 & (~1));
+               arr_conv_10_conv.is_owned = (arr_conv_10 & 1) || (arr_conv_10 == 0);
+               _res_constr.data[k] = arr_conv_10_conv;
        }
        (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
-       CVec_ChannelDetailsZ_free(_res_constr);
+       CVec_RouteHopZ_free(_res_constr);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1ok(JNIEnv *env, jclass clz) {
-       LDKCResult_NonePaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePaymentSendFailureZ), "LDKCResult_NonePaymentSendFailureZ");
-       *ret_conv = CResult_NonePaymentSendFailureZ_ok();
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1CVec_1RouteHopZZ_1free(JNIEnv *env, jclass clz, jobjectArray _res) {
+       LDKCVec_CVec_RouteHopZZ _res_constr;
+       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKCVec_RouteHopZ), "LDKCVec_CVec_RouteHopZZ Elements");
+       else
+               _res_constr.data = NULL;
+       for (size_t m = 0; m < _res_constr.datalen; m++) {
+               int64_tArray arr_conv_12 = (*env)->GetObjectArrayElement(env, _res, m);
+               LDKCVec_RouteHopZ arr_conv_12_constr;
+               arr_conv_12_constr.datalen = (*env)->GetArrayLength(env, arr_conv_12);
+               if (arr_conv_12_constr.datalen > 0)
+                       arr_conv_12_constr.data = MALLOC(arr_conv_12_constr.datalen * sizeof(LDKRouteHop), "LDKCVec_RouteHopZ Elements");
+               else
+                       arr_conv_12_constr.data = NULL;
+               int64_t* arr_conv_12_vals = (*env)->GetLongArrayElements (env, arr_conv_12, NULL);
+               for (size_t k = 0; k < arr_conv_12_constr.datalen; k++) {
+                       int64_t arr_conv_10 = arr_conv_12_vals[k];
+                       LDKRouteHop arr_conv_10_conv;
+                       arr_conv_10_conv.inner = (void*)(arr_conv_10 & (~1));
+                       arr_conv_10_conv.is_owned = (arr_conv_10 & 1) || (arr_conv_10 == 0);
+                       arr_conv_12_constr.data[k] = arr_conv_10_conv;
+               }
+               (*env)->ReleaseLongArrayElements(env, arr_conv_12, arr_conv_12_vals, 0);
+               _res_constr.data[m] = arr_conv_12_constr;
+       }
+       CVec_CVec_RouteHopZZ_free(_res_constr);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKRoute o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = Route_clone(&o_conv);
+       LDKCResult_RouteDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteDecodeErrorZ), "LDKCResult_RouteDecodeErrorZ");
+       *ret_conv = CResult_RouteDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKPaymentSendFailure e_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
-       e_conv = PaymentSendFailure_clone(&e_conv);
-       LDKCResult_NonePaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePaymentSendFailureZ), "LDKCResult_NonePaymentSendFailureZ");
-       *ret_conv = CResult_NonePaymentSendFailureZ_err(e_conv);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_RouteDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteDecodeErrorZ), "LDKCResult_RouteDecodeErrorZ");
+       *ret_conv = CResult_RouteDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RouteDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_NonePaymentSendFailureZ _res_conv = *(LDKCResult_NonePaymentSendFailureZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_RouteDecodeErrorZ _res_conv = *(LDKCResult_RouteDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_NonePaymentSendFailureZ_free(_res_conv);
+       CResult_RouteDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKCResult_NonePaymentSendFailureZ* orig_conv = (LDKCResult_NonePaymentSendFailureZ*)(orig & ~1);
-       LDKCResult_NonePaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePaymentSendFailureZ), "LDKCResult_NonePaymentSendFailureZ");
-       *ret_conv = CResult_NonePaymentSendFailureZ_clone(orig_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_RouteDecodeErrorZ* orig_conv = (LDKCResult_RouteDecodeErrorZ*)(orig & ~1);
+       LDKCResult_RouteDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteDecodeErrorZ), "LDKCResult_RouteDecodeErrorZ");
+       *ret_conv = CResult_RouteDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1NetAddressZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
-       LDKCVec_NetAddressZ _res_constr;
-       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
-       if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKNetAddress), "LDKCVec_NetAddressZ Elements");
-       else
-               _res_constr.data = NULL;
-       int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
-       for (size_t m = 0; m < _res_constr.datalen; m++) {
-               int64_t arr_conv_12 = _res_vals[m];
-               LDKNetAddress arr_conv_12_conv = *(LDKNetAddress*)(((uint64_t)arr_conv_12) & ~1);
-               FREE((void*)arr_conv_12);
-               _res_constr.data[m] = arr_conv_12_conv;
-       }
-       (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
-       CVec_NetAddressZ_free(_res_constr);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ChannelMonitorZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
-       LDKCVec_ChannelMonitorZ _res_constr;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1RouteHintZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+       LDKCVec_RouteHintZ _res_constr;
        _res_constr.datalen = (*env)->GetArrayLength(env, _res);
        if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKChannelMonitor), "LDKCVec_ChannelMonitorZ Elements");
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKRouteHint), "LDKCVec_RouteHintZ Elements");
        else
                _res_constr.data = NULL;
        int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
-       for (size_t q = 0; q < _res_constr.datalen; q++) {
-               int64_t arr_conv_16 = _res_vals[q];
-               LDKChannelMonitor arr_conv_16_conv;
-               arr_conv_16_conv.inner = (void*)(arr_conv_16 & (~1));
-               arr_conv_16_conv.is_owned = (arr_conv_16 & 1) || (arr_conv_16 == 0);
-               _res_constr.data[q] = arr_conv_16_conv;
+       for (size_t l = 0; l < _res_constr.datalen; l++) {
+               int64_t arr_conv_11 = _res_vals[l];
+               LDKRouteHint arr_conv_11_conv;
+               arr_conv_11_conv.inner = (void*)(arr_conv_11 & (~1));
+               arr_conv_11_conv.is_owned = (arr_conv_11 & 1) || (arr_conv_11 == 0);
+               _res_constr.data[l] = arr_conv_11_conv;
        }
        (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
-       CVec_ChannelMonitorZ_free(_res_constr);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelManagerZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
-       if ((_res & 1) != 0) return;
-       LDKC2Tuple_BlockHashChannelManagerZ _res_conv = *(LDKC2Tuple_BlockHashChannelManagerZ*)(((uint64_t)_res) & ~1);
-       FREE((void*)_res);
-       C2Tuple_BlockHashChannelManagerZ_free(_res_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelManagerZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int64_t b) {
-       LDKThirtyTwoBytes a_ref;
-       CHECK((*env)->GetArrayLength(env, a) == 32);
-       (*env)->GetByteArrayRegion(env, a, 0, 32, a_ref.data);
-       LDKChannelManager b_conv;
-       b_conv.inner = (void*)(b & (~1));
-       b_conv.is_owned = (b & 1) || (b == 0);
-       // Warning: we need a move here but no clone is available for LDKChannelManager
-       LDKC2Tuple_BlockHashChannelManagerZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelManagerZ), "LDKC2Tuple_BlockHashChannelManagerZ");
-       *ret_ref = C2Tuple_BlockHashChannelManagerZ_new(a_ref, b_conv);
-       return (long)ret_ref;
+       CVec_RouteHintZ_free(_res_constr);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKC2Tuple_BlockHashChannelManagerZ o_conv = *(LDKC2Tuple_BlockHashChannelManagerZ*)(((uint64_t)o) & ~1);
-       FREE((void*)o);
-       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ");
-       *ret_conv = CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKRoute o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = Route_clone(&o_conv);
+       LDKCResult_RouteLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteLightningErrorZ), "LDKCResult_RouteLightningErrorZ");
+       *ret_conv = CResult_RouteLightningErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKLightningError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
-       e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ");
-       *ret_conv = CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e_conv);
+       e_conv = LightningError_clone(&e_conv);
+       LDKCResult_RouteLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteLightningErrorZ), "LDKCResult_RouteLightningErrorZ");
+       *ret_conv = CResult_RouteLightningErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res_conv = *(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_RouteLightningErrorZ _res_conv = *(LDKCResult_RouteLightningErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res_conv);
+       CResult_RouteLightningErrorZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_RouteLightningErrorZ* orig_conv = (LDKCResult_RouteLightningErrorZ*)(orig & ~1);
+       LDKCResult_RouteLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteLightningErrorZ), "LDKCResult_RouteLightningErrorZ");
+       *ret_conv = CResult_RouteLightningErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NetAddressu8Z_1ok(JNIEnv *env, jclass clz, int64_t o) {
@@ -6110,20 +8035,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CResult_1NetAddressu8
        CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u64Z_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
-       LDKCVec_u64Z _res_constr;
-       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
-       if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(int64_t), "LDKCVec_u64Z Elements");
-       else
-               _res_constr.data = NULL;
-       int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
-       for (size_t g = 0; g < _res_constr.datalen; g++) {
-               int64_t arr_conv_6 = _res_vals[g];
-               _res_constr.data[g] = arr_conv_6;
-       }
-       (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
-       CVec_u64Z_free(_res_constr);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CResult_1NetAddressu8ZDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_CResult_NetAddressu8ZDecodeErrorZ* orig_conv = (LDKCResult_CResult_NetAddressu8ZDecodeErrorZ*)(orig & ~1);
+       LDKCResult_CResult_NetAddressu8ZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CResult_NetAddressu8ZDecodeErrorZ), "LDKCResult_CResult_NetAddressu8ZDecodeErrorZ");
+       *ret_conv = CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateAddHTLCZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
@@ -6202,125 +8118,71 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateFailMalformedHTLCZ
        CVec_UpdateFailMalformedHTLCZ_free(_res_constr);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1ok(JNIEnv *env, jclass clz, jboolean o) {
-       LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
-       *ret_conv = CResult_boolLightningErrorZ_ok(o);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1AcceptChannelDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKAcceptChannel o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = AcceptChannel_clone(&o_conv);
+       LDKCResult_AcceptChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AcceptChannelDecodeErrorZ), "LDKCResult_AcceptChannelDecodeErrorZ");
+       *ret_conv = CResult_AcceptChannelDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKLightningError e_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1AcceptChannelDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
-       e_conv = LightningError_clone(&e_conv);
-       LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
-       *ret_conv = CResult_boolLightningErrorZ_err(e_conv);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_AcceptChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AcceptChannelDecodeErrorZ), "LDKCResult_AcceptChannelDecodeErrorZ");
+       *ret_conv = CResult_AcceptChannelDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1AcceptChannelDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_boolLightningErrorZ _res_conv = *(LDKCResult_boolLightningErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_AcceptChannelDecodeErrorZ _res_conv = *(LDKCResult_AcceptChannelDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_boolLightningErrorZ_free(_res_conv);
+       CResult_AcceptChannelDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKCResult_boolLightningErrorZ* orig_conv = (LDKCResult_boolLightningErrorZ*)(orig & ~1);
-       LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
-       *ret_conv = CResult_boolLightningErrorZ_clone(orig_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1AcceptChannelDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_AcceptChannelDecodeErrorZ* orig_conv = (LDKCResult_AcceptChannelDecodeErrorZ*)(orig & ~1);
+       LDKCResult_AcceptChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AcceptChannelDecodeErrorZ), "LDKCResult_AcceptChannelDecodeErrorZ");
+       *ret_conv = CResult_AcceptChannelDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
-       if ((_res & 1) != 0) return;
-       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)_res) & ~1);
-       FREE((void*)_res);
-       C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1new(JNIEnv *env, jclass clz, int64_t a, int64_t b, int64_t c) {
-       LDKChannelAnnouncement a_conv;
-       a_conv.inner = (void*)(a & (~1));
-       a_conv.is_owned = (a & 1) || (a == 0);
-       a_conv = ChannelAnnouncement_clone(&a_conv);
-       LDKChannelUpdate b_conv;
-       b_conv.inner = (void*)(b & (~1));
-       b_conv.is_owned = (b & 1) || (b == 0);
-       b_conv = ChannelUpdate_clone(&b_conv);
-       LDKChannelUpdate c_conv;
-       c_conv.inner = (void*)(c & (~1));
-       c_conv.is_owned = (c & 1) || (c == 0);
-       c_conv = ChannelUpdate_clone(&c_conv);
-       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
-       *ret_ref = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a_conv, b_conv, c_conv);
-       return (long)ret_ref;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
-       LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res_constr;
-       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
-       if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ Elements");
-       else
-               _res_constr.data = NULL;
-       int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
-       for (size_t l = 0; l < _res_constr.datalen; l++) {
-               int64_t arr_conv_63 = _res_vals[l];
-               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ arr_conv_63_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)arr_conv_63) & ~1);
-               FREE((void*)arr_conv_63);
-               _res_constr.data[l] = arr_conv_63_conv;
-       }
-       (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
-       CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res_constr);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1NodeAnnouncementZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
-       LDKCVec_NodeAnnouncementZ _res_constr;
-       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
-       if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKNodeAnnouncement), "LDKCVec_NodeAnnouncementZ Elements");
-       else
-               _res_constr.data = NULL;
-       int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
-       for (size_t s = 0; s < _res_constr.datalen; s++) {
-               int64_t arr_conv_18 = _res_vals[s];
-               LDKNodeAnnouncement arr_conv_18_conv;
-               arr_conv_18_conv.inner = (void*)(arr_conv_18 & (~1));
-               arr_conv_18_conv.is_owned = (arr_conv_18 & 1) || (arr_conv_18 == 0);
-               _res_constr.data[s] = arr_conv_18_conv;
-       }
-       (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
-       CVec_NodeAnnouncementZ_free(_res_constr);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneLightningErrorZ_1ok(JNIEnv *env, jclass clz) {
-       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
-       *ret_conv = CResult_NoneLightningErrorZ_ok();
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1AnnouncementSignaturesDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKAnnouncementSignatures o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = AnnouncementSignatures_clone(&o_conv);
+       LDKCResult_AnnouncementSignaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AnnouncementSignaturesDecodeErrorZ), "LDKCResult_AnnouncementSignaturesDecodeErrorZ");
+       *ret_conv = CResult_AnnouncementSignaturesDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneLightningErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKLightningError e_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1AnnouncementSignaturesDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
-       e_conv = LightningError_clone(&e_conv);
-       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
-       *ret_conv = CResult_NoneLightningErrorZ_err(e_conv);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_AnnouncementSignaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AnnouncementSignaturesDecodeErrorZ), "LDKCResult_AnnouncementSignaturesDecodeErrorZ");
+       *ret_conv = CResult_AnnouncementSignaturesDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneLightningErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1AnnouncementSignaturesDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_NoneLightningErrorZ _res_conv = *(LDKCResult_NoneLightningErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_AnnouncementSignaturesDecodeErrorZ _res_conv = *(LDKCResult_AnnouncementSignaturesDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_NoneLightningErrorZ_free(_res_conv);
+       CResult_AnnouncementSignaturesDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneLightningErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKCResult_NoneLightningErrorZ* orig_conv = (LDKCResult_NoneLightningErrorZ*)(orig & ~1);
-       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
-       *ret_conv = CResult_NoneLightningErrorZ_clone(orig_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1AnnouncementSignaturesDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_AnnouncementSignaturesDecodeErrorZ* orig_conv = (LDKCResult_AnnouncementSignaturesDecodeErrorZ*)(orig & ~1);
+       LDKCResult_AnnouncementSignaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AnnouncementSignaturesDecodeErrorZ), "LDKCResult_AnnouncementSignaturesDecodeErrorZ");
+       *ret_conv = CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
@@ -6351,822 +8213,963 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelReestablishDec
        CResult_ChannelReestablishDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InitDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKInit o_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelReestablishDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_ChannelReestablishDecodeErrorZ* orig_conv = (LDKCResult_ChannelReestablishDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ChannelReestablishDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelReestablishDecodeErrorZ), "LDKCResult_ChannelReestablishDecodeErrorZ");
+       *ret_conv = CResult_ChannelReestablishDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ClosingSignedDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKClosingSigned o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = Init_clone(&o_conv);
-       LDKCResult_InitDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitDecodeErrorZ), "LDKCResult_InitDecodeErrorZ");
-       *ret_conv = CResult_InitDecodeErrorZ_ok(o_conv);
+       o_conv = ClosingSigned_clone(&o_conv);
+       LDKCResult_ClosingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ClosingSignedDecodeErrorZ), "LDKCResult_ClosingSignedDecodeErrorZ");
+       *ret_conv = CResult_ClosingSignedDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InitDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ClosingSignedDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_InitDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitDecodeErrorZ), "LDKCResult_InitDecodeErrorZ");
-       *ret_conv = CResult_InitDecodeErrorZ_err(e_conv);
+       LDKCResult_ClosingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ClosingSignedDecodeErrorZ), "LDKCResult_ClosingSignedDecodeErrorZ");
+       *ret_conv = CResult_ClosingSignedDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InitDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ClosingSignedDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_InitDecodeErrorZ _res_conv = *(LDKCResult_InitDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_ClosingSignedDecodeErrorZ _res_conv = *(LDKCResult_ClosingSignedDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_InitDecodeErrorZ_free(_res_conv);
+       CResult_ClosingSignedDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PingDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKPing o_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ClosingSignedDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_ClosingSignedDecodeErrorZ* orig_conv = (LDKCResult_ClosingSignedDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ClosingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ClosingSignedDecodeErrorZ), "LDKCResult_ClosingSignedDecodeErrorZ");
+       *ret_conv = CResult_ClosingSignedDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentSignedDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCommitmentSigned o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = Ping_clone(&o_conv);
-       LDKCResult_PingDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PingDecodeErrorZ), "LDKCResult_PingDecodeErrorZ");
-       *ret_conv = CResult_PingDecodeErrorZ_ok(o_conv);
+       o_conv = CommitmentSigned_clone(&o_conv);
+       LDKCResult_CommitmentSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentSignedDecodeErrorZ), "LDKCResult_CommitmentSignedDecodeErrorZ");
+       *ret_conv = CResult_CommitmentSignedDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PingDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentSignedDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_PingDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PingDecodeErrorZ), "LDKCResult_PingDecodeErrorZ");
-       *ret_conv = CResult_PingDecodeErrorZ_err(e_conv);
+       LDKCResult_CommitmentSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentSignedDecodeErrorZ), "LDKCResult_CommitmentSignedDecodeErrorZ");
+       *ret_conv = CResult_CommitmentSignedDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PingDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentSignedDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_PingDecodeErrorZ _res_conv = *(LDKCResult_PingDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_CommitmentSignedDecodeErrorZ _res_conv = *(LDKCResult_CommitmentSignedDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_PingDecodeErrorZ_free(_res_conv);
+       CResult_CommitmentSignedDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PongDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKPong o_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentSignedDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_CommitmentSignedDecodeErrorZ* orig_conv = (LDKCResult_CommitmentSignedDecodeErrorZ*)(orig & ~1);
+       LDKCResult_CommitmentSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentSignedDecodeErrorZ), "LDKCResult_CommitmentSignedDecodeErrorZ");
+       *ret_conv = CResult_CommitmentSignedDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1FundingCreatedDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKFundingCreated o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = Pong_clone(&o_conv);
-       LDKCResult_PongDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PongDecodeErrorZ), "LDKCResult_PongDecodeErrorZ");
-       *ret_conv = CResult_PongDecodeErrorZ_ok(o_conv);
+       o_conv = FundingCreated_clone(&o_conv);
+       LDKCResult_FundingCreatedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingCreatedDecodeErrorZ), "LDKCResult_FundingCreatedDecodeErrorZ");
+       *ret_conv = CResult_FundingCreatedDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PongDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1FundingCreatedDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_PongDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PongDecodeErrorZ), "LDKCResult_PongDecodeErrorZ");
-       *ret_conv = CResult_PongDecodeErrorZ_err(e_conv);
+       LDKCResult_FundingCreatedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingCreatedDecodeErrorZ), "LDKCResult_FundingCreatedDecodeErrorZ");
+       *ret_conv = CResult_FundingCreatedDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PongDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1FundingCreatedDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_PongDecodeErrorZ _res_conv = *(LDKCResult_PongDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_FundingCreatedDecodeErrorZ _res_conv = *(LDKCResult_FundingCreatedDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_PongDecodeErrorZ_free(_res_conv);
+       CResult_FundingCreatedDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelAnnouncementDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKUnsignedChannelAnnouncement o_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1FundingCreatedDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_FundingCreatedDecodeErrorZ* orig_conv = (LDKCResult_FundingCreatedDecodeErrorZ*)(orig & ~1);
+       LDKCResult_FundingCreatedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingCreatedDecodeErrorZ), "LDKCResult_FundingCreatedDecodeErrorZ");
+       *ret_conv = CResult_FundingCreatedDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1FundingSignedDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKFundingSigned o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = UnsignedChannelAnnouncement_clone(&o_conv);
-       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ), "LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ");
-       *ret_conv = CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o_conv);
+       o_conv = FundingSigned_clone(&o_conv);
+       LDKCResult_FundingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingSignedDecodeErrorZ), "LDKCResult_FundingSignedDecodeErrorZ");
+       *ret_conv = CResult_FundingSignedDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelAnnouncementDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1FundingSignedDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ), "LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ");
-       *ret_conv = CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e_conv);
+       LDKCResult_FundingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingSignedDecodeErrorZ), "LDKCResult_FundingSignedDecodeErrorZ");
+       *ret_conv = CResult_FundingSignedDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelAnnouncementDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1FundingSignedDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res_conv = *(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_FundingSignedDecodeErrorZ _res_conv = *(LDKCResult_FundingSignedDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res_conv);
+       CResult_FundingSignedDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelUpdateDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKUnsignedChannelUpdate o_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1FundingSignedDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_FundingSignedDecodeErrorZ* orig_conv = (LDKCResult_FundingSignedDecodeErrorZ*)(orig & ~1);
+       LDKCResult_FundingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingSignedDecodeErrorZ), "LDKCResult_FundingSignedDecodeErrorZ");
+       *ret_conv = CResult_FundingSignedDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1FundingLockedDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKFundingLocked o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = UnsignedChannelUpdate_clone(&o_conv);
-       LDKCResult_UnsignedChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelUpdateDecodeErrorZ), "LDKCResult_UnsignedChannelUpdateDecodeErrorZ");
-       *ret_conv = CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o_conv);
+       o_conv = FundingLocked_clone(&o_conv);
+       LDKCResult_FundingLockedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingLockedDecodeErrorZ), "LDKCResult_FundingLockedDecodeErrorZ");
+       *ret_conv = CResult_FundingLockedDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelUpdateDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1FundingLockedDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_UnsignedChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelUpdateDecodeErrorZ), "LDKCResult_UnsignedChannelUpdateDecodeErrorZ");
-       *ret_conv = CResult_UnsignedChannelUpdateDecodeErrorZ_err(e_conv);
+       LDKCResult_FundingLockedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingLockedDecodeErrorZ), "LDKCResult_FundingLockedDecodeErrorZ");
+       *ret_conv = CResult_FundingLockedDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelUpdateDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1FundingLockedDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res_conv = *(LDKCResult_UnsignedChannelUpdateDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_FundingLockedDecodeErrorZ _res_conv = *(LDKCResult_FundingLockedDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res_conv);
+       CResult_FundingLockedDecodeErrorZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1FundingLockedDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_FundingLockedDecodeErrorZ* orig_conv = (LDKCResult_FundingLockedDecodeErrorZ*)(orig & ~1);
+       LDKCResult_FundingLockedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingLockedDecodeErrorZ), "LDKCResult_FundingLockedDecodeErrorZ");
+       *ret_conv = CResult_FundingLockedDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InitDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKInit o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = Init_clone(&o_conv);
+       LDKCResult_InitDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitDecodeErrorZ), "LDKCResult_InitDecodeErrorZ");
+       *ret_conv = CResult_InitDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InitDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_InitDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitDecodeErrorZ), "LDKCResult_InitDecodeErrorZ");
+       *ret_conv = CResult_InitDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InitDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_InitDecodeErrorZ _res_conv = *(LDKCResult_InitDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_InitDecodeErrorZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InitDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_InitDecodeErrorZ* orig_conv = (LDKCResult_InitDecodeErrorZ*)(orig & ~1);
+       LDKCResult_InitDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitDecodeErrorZ), "LDKCResult_InitDecodeErrorZ");
+       *ret_conv = CResult_InitDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OpenChannelDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKOpenChannel o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = OpenChannel_clone(&o_conv);
+       LDKCResult_OpenChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OpenChannelDecodeErrorZ), "LDKCResult_OpenChannelDecodeErrorZ");
+       *ret_conv = CResult_OpenChannelDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OpenChannelDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_OpenChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OpenChannelDecodeErrorZ), "LDKCResult_OpenChannelDecodeErrorZ");
+       *ret_conv = CResult_OpenChannelDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OpenChannelDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_OpenChannelDecodeErrorZ _res_conv = *(LDKCResult_OpenChannelDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_OpenChannelDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ErrorMessageDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKErrorMessage o_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OpenChannelDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_OpenChannelDecodeErrorZ* orig_conv = (LDKCResult_OpenChannelDecodeErrorZ*)(orig & ~1);
+       LDKCResult_OpenChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OpenChannelDecodeErrorZ), "LDKCResult_OpenChannelDecodeErrorZ");
+       *ret_conv = CResult_OpenChannelDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevokeAndACKDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKRevokeAndACK o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = ErrorMessage_clone(&o_conv);
-       LDKCResult_ErrorMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ErrorMessageDecodeErrorZ), "LDKCResult_ErrorMessageDecodeErrorZ");
-       *ret_conv = CResult_ErrorMessageDecodeErrorZ_ok(o_conv);
+       o_conv = RevokeAndACK_clone(&o_conv);
+       LDKCResult_RevokeAndACKDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RevokeAndACKDecodeErrorZ), "LDKCResult_RevokeAndACKDecodeErrorZ");
+       *ret_conv = CResult_RevokeAndACKDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ErrorMessageDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevokeAndACKDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_ErrorMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ErrorMessageDecodeErrorZ), "LDKCResult_ErrorMessageDecodeErrorZ");
-       *ret_conv = CResult_ErrorMessageDecodeErrorZ_err(e_conv);
+       LDKCResult_RevokeAndACKDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RevokeAndACKDecodeErrorZ), "LDKCResult_RevokeAndACKDecodeErrorZ");
+       *ret_conv = CResult_RevokeAndACKDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ErrorMessageDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RevokeAndACKDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_ErrorMessageDecodeErrorZ _res_conv = *(LDKCResult_ErrorMessageDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_RevokeAndACKDecodeErrorZ _res_conv = *(LDKCResult_RevokeAndACKDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_ErrorMessageDecodeErrorZ_free(_res_conv);
+       CResult_RevokeAndACKDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedNodeAnnouncementDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKUnsignedNodeAnnouncement o_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevokeAndACKDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_RevokeAndACKDecodeErrorZ* orig_conv = (LDKCResult_RevokeAndACKDecodeErrorZ*)(orig & ~1);
+       LDKCResult_RevokeAndACKDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RevokeAndACKDecodeErrorZ), "LDKCResult_RevokeAndACKDecodeErrorZ");
+       *ret_conv = CResult_RevokeAndACKDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ShutdownDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKShutdown o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = UnsignedNodeAnnouncement_clone(&o_conv);
-       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ), "LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ");
-       *ret_conv = CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o_conv);
+       o_conv = Shutdown_clone(&o_conv);
+       LDKCResult_ShutdownDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ShutdownDecodeErrorZ), "LDKCResult_ShutdownDecodeErrorZ");
+       *ret_conv = CResult_ShutdownDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedNodeAnnouncementDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ShutdownDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ), "LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ");
-       *ret_conv = CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e_conv);
+       LDKCResult_ShutdownDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ShutdownDecodeErrorZ), "LDKCResult_ShutdownDecodeErrorZ");
+       *ret_conv = CResult_ShutdownDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedNodeAnnouncementDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ShutdownDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res_conv = *(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_ShutdownDecodeErrorZ _res_conv = *(LDKCResult_ShutdownDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res_conv);
+       CResult_ShutdownDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1QueryShortChannelIdsDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKQueryShortChannelIds o_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ShutdownDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_ShutdownDecodeErrorZ* orig_conv = (LDKCResult_ShutdownDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ShutdownDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ShutdownDecodeErrorZ), "LDKCResult_ShutdownDecodeErrorZ");
+       *ret_conv = CResult_ShutdownDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailHTLCDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKUpdateFailHTLC o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = QueryShortChannelIds_clone(&o_conv);
-       LDKCResult_QueryShortChannelIdsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryShortChannelIdsDecodeErrorZ), "LDKCResult_QueryShortChannelIdsDecodeErrorZ");
-       *ret_conv = CResult_QueryShortChannelIdsDecodeErrorZ_ok(o_conv);
+       o_conv = UpdateFailHTLC_clone(&o_conv);
+       LDKCResult_UpdateFailHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailHTLCDecodeErrorZ), "LDKCResult_UpdateFailHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateFailHTLCDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1QueryShortChannelIdsDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailHTLCDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_QueryShortChannelIdsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryShortChannelIdsDecodeErrorZ), "LDKCResult_QueryShortChannelIdsDecodeErrorZ");
-       *ret_conv = CResult_QueryShortChannelIdsDecodeErrorZ_err(e_conv);
+       LDKCResult_UpdateFailHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailHTLCDecodeErrorZ), "LDKCResult_UpdateFailHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateFailHTLCDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1QueryShortChannelIdsDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailHTLCDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_QueryShortChannelIdsDecodeErrorZ _res_conv = *(LDKCResult_QueryShortChannelIdsDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_UpdateFailHTLCDecodeErrorZ _res_conv = *(LDKCResult_UpdateFailHTLCDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_QueryShortChannelIdsDecodeErrorZ_free(_res_conv);
+       CResult_UpdateFailHTLCDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyShortChannelIdsEndDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKReplyShortChannelIdsEnd o_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailHTLCDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_UpdateFailHTLCDecodeErrorZ* orig_conv = (LDKCResult_UpdateFailHTLCDecodeErrorZ*)(orig & ~1);
+       LDKCResult_UpdateFailHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailHTLCDecodeErrorZ), "LDKCResult_UpdateFailHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateFailHTLCDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailMalformedHTLCDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKUpdateFailMalformedHTLC o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = ReplyShortChannelIdsEnd_clone(&o_conv);
-       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ), "LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ");
-       *ret_conv = CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o_conv);
+       o_conv = UpdateFailMalformedHTLC_clone(&o_conv);
+       LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ), "LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyShortChannelIdsEndDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailMalformedHTLCDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ), "LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ");
-       *ret_conv = CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e_conv);
+       LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ), "LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyShortChannelIdsEndDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailMalformedHTLCDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res_conv = *(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ _res_conv = *(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res_conv);
+       CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1QueryChannelRangeDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKQueryChannelRange o_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailMalformedHTLCDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ* orig_conv = (LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ*)(orig & ~1);
+       LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ), "LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFeeDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKUpdateFee o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = QueryChannelRange_clone(&o_conv);
-       LDKCResult_QueryChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryChannelRangeDecodeErrorZ), "LDKCResult_QueryChannelRangeDecodeErrorZ");
-       *ret_conv = CResult_QueryChannelRangeDecodeErrorZ_ok(o_conv);
+       o_conv = UpdateFee_clone(&o_conv);
+       LDKCResult_UpdateFeeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFeeDecodeErrorZ), "LDKCResult_UpdateFeeDecodeErrorZ");
+       *ret_conv = CResult_UpdateFeeDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1QueryChannelRangeDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFeeDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_QueryChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryChannelRangeDecodeErrorZ), "LDKCResult_QueryChannelRangeDecodeErrorZ");
-       *ret_conv = CResult_QueryChannelRangeDecodeErrorZ_err(e_conv);
+       LDKCResult_UpdateFeeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFeeDecodeErrorZ), "LDKCResult_UpdateFeeDecodeErrorZ");
+       *ret_conv = CResult_UpdateFeeDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1QueryChannelRangeDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFeeDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_QueryChannelRangeDecodeErrorZ _res_conv = *(LDKCResult_QueryChannelRangeDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_UpdateFeeDecodeErrorZ _res_conv = *(LDKCResult_UpdateFeeDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_QueryChannelRangeDecodeErrorZ_free(_res_conv);
+       CResult_UpdateFeeDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyChannelRangeDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKReplyChannelRange o_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFeeDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_UpdateFeeDecodeErrorZ* orig_conv = (LDKCResult_UpdateFeeDecodeErrorZ*)(orig & ~1);
+       LDKCResult_UpdateFeeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFeeDecodeErrorZ), "LDKCResult_UpdateFeeDecodeErrorZ");
+       *ret_conv = CResult_UpdateFeeDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFulfillHTLCDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKUpdateFulfillHTLC o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = ReplyChannelRange_clone(&o_conv);
-       LDKCResult_ReplyChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyChannelRangeDecodeErrorZ), "LDKCResult_ReplyChannelRangeDecodeErrorZ");
-       *ret_conv = CResult_ReplyChannelRangeDecodeErrorZ_ok(o_conv);
+       o_conv = UpdateFulfillHTLC_clone(&o_conv);
+       LDKCResult_UpdateFulfillHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFulfillHTLCDecodeErrorZ), "LDKCResult_UpdateFulfillHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyChannelRangeDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFulfillHTLCDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_ReplyChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyChannelRangeDecodeErrorZ), "LDKCResult_ReplyChannelRangeDecodeErrorZ");
-       *ret_conv = CResult_ReplyChannelRangeDecodeErrorZ_err(e_conv);
+       LDKCResult_UpdateFulfillHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFulfillHTLCDecodeErrorZ), "LDKCResult_UpdateFulfillHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateFulfillHTLCDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyChannelRangeDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFulfillHTLCDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_ReplyChannelRangeDecodeErrorZ _res_conv = *(LDKCResult_ReplyChannelRangeDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_UpdateFulfillHTLCDecodeErrorZ _res_conv = *(LDKCResult_UpdateFulfillHTLCDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_ReplyChannelRangeDecodeErrorZ_free(_res_conv);
+       CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1GossipTimestampFilterDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKGossipTimestampFilter o_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFulfillHTLCDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_UpdateFulfillHTLCDecodeErrorZ* orig_conv = (LDKCResult_UpdateFulfillHTLCDecodeErrorZ*)(orig & ~1);
+       LDKCResult_UpdateFulfillHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFulfillHTLCDecodeErrorZ), "LDKCResult_UpdateFulfillHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateAddHTLCDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKUpdateAddHTLC o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = GossipTimestampFilter_clone(&o_conv);
-       LDKCResult_GossipTimestampFilterDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_GossipTimestampFilterDecodeErrorZ), "LDKCResult_GossipTimestampFilterDecodeErrorZ");
-       *ret_conv = CResult_GossipTimestampFilterDecodeErrorZ_ok(o_conv);
+       o_conv = UpdateAddHTLC_clone(&o_conv);
+       LDKCResult_UpdateAddHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateAddHTLCDecodeErrorZ), "LDKCResult_UpdateAddHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateAddHTLCDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1GossipTimestampFilterDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateAddHTLCDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_GossipTimestampFilterDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_GossipTimestampFilterDecodeErrorZ), "LDKCResult_GossipTimestampFilterDecodeErrorZ");
-       *ret_conv = CResult_GossipTimestampFilterDecodeErrorZ_err(e_conv);
+       LDKCResult_UpdateAddHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateAddHTLCDecodeErrorZ), "LDKCResult_UpdateAddHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateAddHTLCDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1GossipTimestampFilterDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateAddHTLCDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_GossipTimestampFilterDecodeErrorZ _res_conv = *(LDKCResult_GossipTimestampFilterDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_UpdateAddHTLCDecodeErrorZ _res_conv = *(LDKCResult_UpdateAddHTLCDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_GossipTimestampFilterDecodeErrorZ_free(_res_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1PublicKeyZ_1free(JNIEnv *env, jclass clz, jobjectArray _res) {
-       LDKCVec_PublicKeyZ _res_constr;
-       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
-       if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKPublicKey), "LDKCVec_PublicKeyZ Elements");
-       else
-               _res_constr.data = NULL;
-       for (size_t i = 0; i < _res_constr.datalen; i++) {
-               int8_tArray arr_conv_8 = (*env)->GetObjectArrayElement(env, _res, i);
-               LDKPublicKey arr_conv_8_ref;
-               CHECK((*env)->GetArrayLength(env, arr_conv_8) == 33);
-               (*env)->GetByteArrayRegion(env, arr_conv_8, 0, 33, arr_conv_8_ref.compressed_form);
-               _res_constr.data[i] = arr_conv_8_ref;
-       }
-       CVec_PublicKeyZ_free(_res_constr);
+       CResult_UpdateAddHTLCDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u8Z_1free(JNIEnv *env, jclass clz, int8_tArray _res) {
-       LDKCVec_u8Z _res_ref;
-       _res_ref.datalen = (*env)->GetArrayLength(env, _res);
-       _res_ref.data = MALLOC(_res_ref.datalen, "LDKCVec_u8Z Bytes");
-       (*env)->GetByteArrayRegion(env, _res, 0, _res_ref.datalen, _res_ref.data);
-       CVec_u8Z_free(_res_ref);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateAddHTLCDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_UpdateAddHTLCDecodeErrorZ* orig_conv = (LDKCResult_UpdateAddHTLCDecodeErrorZ*)(orig & ~1);
+       LDKCResult_UpdateAddHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateAddHTLCDecodeErrorZ), "LDKCResult_UpdateAddHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateAddHTLCDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
-       LDKCVec_u8Z o_ref;
-       o_ref.datalen = (*env)->GetArrayLength(env, o);
-       o_ref.data = MALLOC(o_ref.datalen, "LDKCVec_u8Z Bytes");
-       (*env)->GetByteArrayRegion(env, o, 0, o_ref.datalen, o_ref.data);
-       LDKCResult_CVec_u8ZPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_u8ZPeerHandleErrorZ), "LDKCResult_CVec_u8ZPeerHandleErrorZ");
-       *ret_conv = CResult_CVec_u8ZPeerHandleErrorZ_ok(o_ref);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PingDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKPing o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = Ping_clone(&o_conv);
+       LDKCResult_PingDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PingDecodeErrorZ), "LDKCResult_PingDecodeErrorZ");
+       *ret_conv = CResult_PingDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKPeerHandleError e_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PingDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
-       e_conv = PeerHandleError_clone(&e_conv);
-       LDKCResult_CVec_u8ZPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_u8ZPeerHandleErrorZ), "LDKCResult_CVec_u8ZPeerHandleErrorZ");
-       *ret_conv = CResult_CVec_u8ZPeerHandleErrorZ_err(e_conv);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_PingDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PingDecodeErrorZ), "LDKCResult_PingDecodeErrorZ");
+       *ret_conv = CResult_PingDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PingDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_CVec_u8ZPeerHandleErrorZ _res_conv = *(LDKCResult_CVec_u8ZPeerHandleErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_PingDecodeErrorZ _res_conv = *(LDKCResult_PingDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_CVec_u8ZPeerHandleErrorZ_free(_res_conv);
+       CResult_PingDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKCResult_CVec_u8ZPeerHandleErrorZ* orig_conv = (LDKCResult_CVec_u8ZPeerHandleErrorZ*)(orig & ~1);
-       LDKCResult_CVec_u8ZPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_u8ZPeerHandleErrorZ), "LDKCResult_CVec_u8ZPeerHandleErrorZ");
-       *ret_conv = CResult_CVec_u8ZPeerHandleErrorZ_clone(orig_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PingDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_PingDecodeErrorZ* orig_conv = (LDKCResult_PingDecodeErrorZ*)(orig & ~1);
+       LDKCResult_PingDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PingDecodeErrorZ), "LDKCResult_PingDecodeErrorZ");
+       *ret_conv = CResult_PingDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1ok(JNIEnv *env, jclass clz) {
-       LDKCResult_NonePeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePeerHandleErrorZ), "LDKCResult_NonePeerHandleErrorZ");
-       *ret_conv = CResult_NonePeerHandleErrorZ_ok();
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PongDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKPong o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = Pong_clone(&o_conv);
+       LDKCResult_PongDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PongDecodeErrorZ), "LDKCResult_PongDecodeErrorZ");
+       *ret_conv = CResult_PongDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKPeerHandleError e_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PongDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
-       e_conv = PeerHandleError_clone(&e_conv);
-       LDKCResult_NonePeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePeerHandleErrorZ), "LDKCResult_NonePeerHandleErrorZ");
-       *ret_conv = CResult_NonePeerHandleErrorZ_err(e_conv);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_PongDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PongDecodeErrorZ), "LDKCResult_PongDecodeErrorZ");
+       *ret_conv = CResult_PongDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PongDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_NonePeerHandleErrorZ _res_conv = *(LDKCResult_NonePeerHandleErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_PongDecodeErrorZ _res_conv = *(LDKCResult_PongDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_NonePeerHandleErrorZ_free(_res_conv);
+       CResult_PongDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKCResult_NonePeerHandleErrorZ* orig_conv = (LDKCResult_NonePeerHandleErrorZ*)(orig & ~1);
-       LDKCResult_NonePeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePeerHandleErrorZ), "LDKCResult_NonePeerHandleErrorZ");
-       *ret_conv = CResult_NonePeerHandleErrorZ_clone(orig_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PongDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_PongDecodeErrorZ* orig_conv = (LDKCResult_PongDecodeErrorZ*)(orig & ~1);
+       LDKCResult_PongDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PongDecodeErrorZ), "LDKCResult_PongDecodeErrorZ");
+       *ret_conv = CResult_PongDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1ok(JNIEnv *env, jclass clz, jboolean o) {
-       LDKCResult_boolPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolPeerHandleErrorZ), "LDKCResult_boolPeerHandleErrorZ");
-       *ret_conv = CResult_boolPeerHandleErrorZ_ok(o);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelAnnouncementDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKUnsignedChannelAnnouncement o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = UnsignedChannelAnnouncement_clone(&o_conv);
+       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ), "LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKPeerHandleError e_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelAnnouncementDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
-       e_conv = PeerHandleError_clone(&e_conv);
-       LDKCResult_boolPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolPeerHandleErrorZ), "LDKCResult_boolPeerHandleErrorZ");
-       *ret_conv = CResult_boolPeerHandleErrorZ_err(e_conv);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ), "LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelAnnouncementDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_boolPeerHandleErrorZ _res_conv = *(LDKCResult_boolPeerHandleErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res_conv = *(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_boolPeerHandleErrorZ_free(_res_conv);
+       CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKCResult_boolPeerHandleErrorZ* orig_conv = (LDKCResult_boolPeerHandleErrorZ*)(orig & ~1);
-       LDKCResult_boolPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolPeerHandleErrorZ), "LDKCResult_boolPeerHandleErrorZ");
-       *ret_conv = CResult_boolPeerHandleErrorZ_clone(orig_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelAnnouncementDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* orig_conv = (LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ*)(orig & ~1);
+       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ), "LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SecretKeySecpErrorZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
-       LDKSecretKey o_ref;
-       CHECK((*env)->GetArrayLength(env, o) == 32);
-       (*env)->GetByteArrayRegion(env, o, 0, 32, o_ref.bytes);
-       LDKCResult_SecretKeySecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SecretKeySecpErrorZ), "LDKCResult_SecretKeySecpErrorZ");
-       *ret_conv = CResult_SecretKeySecpErrorZ_ok(o_ref);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelAnnouncementDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKChannelAnnouncement o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = ChannelAnnouncement_clone(&o_conv);
+       LDKCResult_ChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelAnnouncementDecodeErrorZ), "LDKCResult_ChannelAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_ChannelAnnouncementDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SecretKeySecpErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
-       LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_java(env, e);
-       LDKCResult_SecretKeySecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SecretKeySecpErrorZ), "LDKCResult_SecretKeySecpErrorZ");
-       *ret_conv = CResult_SecretKeySecpErrorZ_err(e_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelAnnouncementDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_ChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelAnnouncementDecodeErrorZ), "LDKCResult_ChannelAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_ChannelAnnouncementDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SecretKeySecpErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelAnnouncementDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_SecretKeySecpErrorZ _res_conv = *(LDKCResult_SecretKeySecpErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_ChannelAnnouncementDecodeErrorZ _res_conv = *(LDKCResult_ChannelAnnouncementDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_SecretKeySecpErrorZ_free(_res_conv);
+       CResult_ChannelAnnouncementDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecpErrorZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
-       LDKPublicKey o_ref;
-       CHECK((*env)->GetArrayLength(env, o) == 33);
-       (*env)->GetByteArrayRegion(env, o, 0, 33, o_ref.compressed_form);
-       LDKCResult_PublicKeySecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecpErrorZ), "LDKCResult_PublicKeySecpErrorZ");
-       *ret_conv = CResult_PublicKeySecpErrorZ_ok(o_ref);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelAnnouncementDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_ChannelAnnouncementDecodeErrorZ* orig_conv = (LDKCResult_ChannelAnnouncementDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelAnnouncementDecodeErrorZ), "LDKCResult_ChannelAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_ChannelAnnouncementDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecpErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
-       LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_java(env, e);
-       LDKCResult_PublicKeySecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecpErrorZ), "LDKCResult_PublicKeySecpErrorZ");
-       *ret_conv = CResult_PublicKeySecpErrorZ_err(e_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelUpdateDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKUnsignedChannelUpdate o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = UnsignedChannelUpdate_clone(&o_conv);
+       LDKCResult_UnsignedChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelUpdateDecodeErrorZ), "LDKCResult_UnsignedChannelUpdateDecodeErrorZ");
+       *ret_conv = CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecpErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelUpdateDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_UnsignedChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelUpdateDecodeErrorZ), "LDKCResult_UnsignedChannelUpdateDecodeErrorZ");
+       *ret_conv = CResult_UnsignedChannelUpdateDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelUpdateDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_PublicKeySecpErrorZ _res_conv = *(LDKCResult_PublicKeySecpErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res_conv = *(LDKCResult_UnsignedChannelUpdateDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_PublicKeySecpErrorZ_free(_res_conv);
+       CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelUpdateDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_UnsignedChannelUpdateDecodeErrorZ* orig_conv = (LDKCResult_UnsignedChannelUpdateDecodeErrorZ*)(orig & ~1);
+       LDKCResult_UnsignedChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelUpdateDecodeErrorZ), "LDKCResult_UnsignedChannelUpdateDecodeErrorZ");
+       *ret_conv = CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysSecpErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKTxCreationKeys o_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelUpdateDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKChannelUpdate o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = TxCreationKeys_clone(&o_conv);
-       LDKCResult_TxCreationKeysSecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysSecpErrorZ), "LDKCResult_TxCreationKeysSecpErrorZ");
-       *ret_conv = CResult_TxCreationKeysSecpErrorZ_ok(o_conv);
+       o_conv = ChannelUpdate_clone(&o_conv);
+       LDKCResult_ChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelUpdateDecodeErrorZ), "LDKCResult_ChannelUpdateDecodeErrorZ");
+       *ret_conv = CResult_ChannelUpdateDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysSecpErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
-       LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_java(env, e);
-       LDKCResult_TxCreationKeysSecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysSecpErrorZ), "LDKCResult_TxCreationKeysSecpErrorZ");
-       *ret_conv = CResult_TxCreationKeysSecpErrorZ_err(e_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelUpdateDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_ChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelUpdateDecodeErrorZ), "LDKCResult_ChannelUpdateDecodeErrorZ");
+       *ret_conv = CResult_ChannelUpdateDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysSecpErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelUpdateDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_TxCreationKeysSecpErrorZ _res_conv = *(LDKCResult_TxCreationKeysSecpErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_ChannelUpdateDecodeErrorZ _res_conv = *(LDKCResult_ChannelUpdateDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_TxCreationKeysSecpErrorZ_free(_res_conv);
+       CResult_ChannelUpdateDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrustedCommitmentTransactionNoneZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKTrustedCommitmentTransaction o_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelUpdateDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_ChannelUpdateDecodeErrorZ* orig_conv = (LDKCResult_ChannelUpdateDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelUpdateDecodeErrorZ), "LDKCResult_ChannelUpdateDecodeErrorZ");
+       *ret_conv = CResult_ChannelUpdateDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ErrorMessageDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKErrorMessage o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       // Warning: we need a move here but no clone is available for LDKTrustedCommitmentTransaction
-       LDKCResult_TrustedCommitmentTransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TrustedCommitmentTransactionNoneZ), "LDKCResult_TrustedCommitmentTransactionNoneZ");
-       *ret_conv = CResult_TrustedCommitmentTransactionNoneZ_ok(o_conv);
+       o_conv = ErrorMessage_clone(&o_conv);
+       LDKCResult_ErrorMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ErrorMessageDecodeErrorZ), "LDKCResult_ErrorMessageDecodeErrorZ");
+       *ret_conv = CResult_ErrorMessageDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrustedCommitmentTransactionNoneZ_1err(JNIEnv *env, jclass clz) {
-       LDKCResult_TrustedCommitmentTransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TrustedCommitmentTransactionNoneZ), "LDKCResult_TrustedCommitmentTransactionNoneZ");
-       *ret_conv = CResult_TrustedCommitmentTransactionNoneZ_err();
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ErrorMessageDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_ErrorMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ErrorMessageDecodeErrorZ), "LDKCResult_ErrorMessageDecodeErrorZ");
+       *ret_conv = CResult_ErrorMessageDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TrustedCommitmentTransactionNoneZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ErrorMessageDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_TrustedCommitmentTransactionNoneZ _res_conv = *(LDKCResult_TrustedCommitmentTransactionNoneZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_ErrorMessageDecodeErrorZ _res_conv = *(LDKCResult_ErrorMessageDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_TrustedCommitmentTransactionNoneZ_free(_res_conv);
+       CResult_ErrorMessageDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1ok(JNIEnv *env, jclass clz, jobjectArray o) {
-       LDKCVec_SignatureZ o_constr;
-       o_constr.datalen = (*env)->GetArrayLength(env, o);
-       if (o_constr.datalen > 0)
-               o_constr.data = MALLOC(o_constr.datalen * sizeof(LDKSignature), "LDKCVec_SignatureZ Elements");
-       else
-               o_constr.data = NULL;
-       for (size_t i = 0; i < o_constr.datalen; i++) {
-               int8_tArray arr_conv_8 = (*env)->GetObjectArrayElement(env, o, i);
-               LDKSignature arr_conv_8_ref;
-               CHECK((*env)->GetArrayLength(env, arr_conv_8) == 64);
-               (*env)->GetByteArrayRegion(env, arr_conv_8, 0, 64, arr_conv_8_ref.compact_form);
-               o_constr.data[i] = arr_conv_8_ref;
-       }
-       LDKCResult_CVec_SignatureZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_SignatureZNoneZ), "LDKCResult_CVec_SignatureZNoneZ");
-       *ret_conv = CResult_CVec_SignatureZNoneZ_ok(o_constr);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ErrorMessageDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_ErrorMessageDecodeErrorZ* orig_conv = (LDKCResult_ErrorMessageDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ErrorMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ErrorMessageDecodeErrorZ), "LDKCResult_ErrorMessageDecodeErrorZ");
+       *ret_conv = CResult_ErrorMessageDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1err(JNIEnv *env, jclass clz) {
-       LDKCResult_CVec_SignatureZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_SignatureZNoneZ), "LDKCResult_CVec_SignatureZNoneZ");
-       *ret_conv = CResult_CVec_SignatureZNoneZ_err();
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedNodeAnnouncementDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKUnsignedNodeAnnouncement o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = UnsignedNodeAnnouncement_clone(&o_conv);
+       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ), "LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
-       if ((_res & 1) != 0) return;
-       LDKCResult_CVec_SignatureZNoneZ _res_conv = *(LDKCResult_CVec_SignatureZNoneZ*)(((uint64_t)_res) & ~1);
-       FREE((void*)_res);
-       CResult_CVec_SignatureZNoneZ_free(_res_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKCResult_CVec_SignatureZNoneZ* orig_conv = (LDKCResult_CVec_SignatureZNoneZ*)(orig & ~1);
-       LDKCResult_CVec_SignatureZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_SignatureZNoneZ), "LDKCResult_CVec_SignatureZNoneZ");
-       *ret_conv = CResult_CVec_SignatureZNoneZ_clone(orig_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedNodeAnnouncementDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ), "LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1RouteHopZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
-       LDKCVec_RouteHopZ _res_constr;
-       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
-       if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKRouteHop), "LDKCVec_RouteHopZ Elements");
-       else
-               _res_constr.data = NULL;
-       int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
-       for (size_t k = 0; k < _res_constr.datalen; k++) {
-               int64_t arr_conv_10 = _res_vals[k];
-               LDKRouteHop arr_conv_10_conv;
-               arr_conv_10_conv.inner = (void*)(arr_conv_10 & (~1));
-               arr_conv_10_conv.is_owned = (arr_conv_10 & 1) || (arr_conv_10 == 0);
-               _res_constr.data[k] = arr_conv_10_conv;
-       }
-       (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
-       CVec_RouteHopZ_free(_res_constr);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedNodeAnnouncementDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res_conv = *(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1CVec_1RouteHopZZ_1free(JNIEnv *env, jclass clz, jobjectArray _res) {
-       LDKCVec_CVec_RouteHopZZ _res_constr;
-       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
-       if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKCVec_RouteHopZ), "LDKCVec_CVec_RouteHopZZ Elements");
-       else
-               _res_constr.data = NULL;
-       for (size_t m = 0; m < _res_constr.datalen; m++) {
-               int64_tArray arr_conv_12 = (*env)->GetObjectArrayElement(env, _res, m);
-               LDKCVec_RouteHopZ arr_conv_12_constr;
-               arr_conv_12_constr.datalen = (*env)->GetArrayLength(env, arr_conv_12);
-               if (arr_conv_12_constr.datalen > 0)
-                       arr_conv_12_constr.data = MALLOC(arr_conv_12_constr.datalen * sizeof(LDKRouteHop), "LDKCVec_RouteHopZ Elements");
-               else
-                       arr_conv_12_constr.data = NULL;
-               int64_t* arr_conv_12_vals = (*env)->GetLongArrayElements (env, arr_conv_12, NULL);
-               for (size_t k = 0; k < arr_conv_12_constr.datalen; k++) {
-                       int64_t arr_conv_10 = arr_conv_12_vals[k];
-                       LDKRouteHop arr_conv_10_conv;
-                       arr_conv_10_conv.inner = (void*)(arr_conv_10 & (~1));
-                       arr_conv_10_conv.is_owned = (arr_conv_10 & 1) || (arr_conv_10 == 0);
-                       arr_conv_12_constr.data[k] = arr_conv_10_conv;
-               }
-               (*env)->ReleaseLongArrayElements(env, arr_conv_12, arr_conv_12_vals, 0);
-               _res_constr.data[m] = arr_conv_12_constr;
-       }
-       CVec_CVec_RouteHopZZ_free(_res_constr);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedNodeAnnouncementDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ* orig_conv = (LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ*)(orig & ~1);
+       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ), "LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKRoute o_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKNodeAnnouncement o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = Route_clone(&o_conv);
-       LDKCResult_RouteDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteDecodeErrorZ), "LDKCResult_RouteDecodeErrorZ");
-       *ret_conv = CResult_RouteDecodeErrorZ_ok(o_conv);
+       o_conv = NodeAnnouncement_clone(&o_conv);
+       LDKCResult_NodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementDecodeErrorZ), "LDKCResult_NodeAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_NodeAnnouncementDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_RouteDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteDecodeErrorZ), "LDKCResult_RouteDecodeErrorZ");
-       *ret_conv = CResult_RouteDecodeErrorZ_err(e_conv);
+       LDKCResult_NodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementDecodeErrorZ), "LDKCResult_NodeAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_NodeAnnouncementDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RouteDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_RouteDecodeErrorZ _res_conv = *(LDKCResult_RouteDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_NodeAnnouncementDecodeErrorZ _res_conv = *(LDKCResult_NodeAnnouncementDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_RouteDecodeErrorZ_free(_res_conv);
+       CResult_NodeAnnouncementDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1RouteHintZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
-       LDKCVec_RouteHintZ _res_constr;
-       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
-       if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKRouteHint), "LDKCVec_RouteHintZ Elements");
-       else
-               _res_constr.data = NULL;
-       int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
-       for (size_t l = 0; l < _res_constr.datalen; l++) {
-               int64_t arr_conv_11 = _res_vals[l];
-               LDKRouteHint arr_conv_11_conv;
-               arr_conv_11_conv.inner = (void*)(arr_conv_11 & (~1));
-               arr_conv_11_conv.is_owned = (arr_conv_11 & 1) || (arr_conv_11 == 0);
-               _res_constr.data[l] = arr_conv_11_conv;
-       }
-       (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
-       CVec_RouteHintZ_free(_res_constr);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_NodeAnnouncementDecodeErrorZ* orig_conv = (LDKCResult_NodeAnnouncementDecodeErrorZ*)(orig & ~1);
+       LDKCResult_NodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementDecodeErrorZ), "LDKCResult_NodeAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_NodeAnnouncementDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKRoute o_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1QueryShortChannelIdsDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKQueryShortChannelIds o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = Route_clone(&o_conv);
-       LDKCResult_RouteLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteLightningErrorZ), "LDKCResult_RouteLightningErrorZ");
-       *ret_conv = CResult_RouteLightningErrorZ_ok(o_conv);
+       o_conv = QueryShortChannelIds_clone(&o_conv);
+       LDKCResult_QueryShortChannelIdsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryShortChannelIdsDecodeErrorZ), "LDKCResult_QueryShortChannelIdsDecodeErrorZ");
+       *ret_conv = CResult_QueryShortChannelIdsDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKLightningError e_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1QueryShortChannelIdsDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
-       e_conv = LightningError_clone(&e_conv);
-       LDKCResult_RouteLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteLightningErrorZ), "LDKCResult_RouteLightningErrorZ");
-       *ret_conv = CResult_RouteLightningErrorZ_err(e_conv);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_QueryShortChannelIdsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryShortChannelIdsDecodeErrorZ), "LDKCResult_QueryShortChannelIdsDecodeErrorZ");
+       *ret_conv = CResult_QueryShortChannelIdsDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1QueryShortChannelIdsDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_RouteLightningErrorZ _res_conv = *(LDKCResult_RouteLightningErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_QueryShortChannelIdsDecodeErrorZ _res_conv = *(LDKCResult_QueryShortChannelIdsDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_RouteLightningErrorZ_free(_res_conv);
+       CResult_QueryShortChannelIdsDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RoutingFeesDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKRoutingFees o_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1QueryShortChannelIdsDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_QueryShortChannelIdsDecodeErrorZ* orig_conv = (LDKCResult_QueryShortChannelIdsDecodeErrorZ*)(orig & ~1);
+       LDKCResult_QueryShortChannelIdsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryShortChannelIdsDecodeErrorZ), "LDKCResult_QueryShortChannelIdsDecodeErrorZ");
+       *ret_conv = CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyShortChannelIdsEndDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKReplyShortChannelIdsEnd o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = RoutingFees_clone(&o_conv);
-       LDKCResult_RoutingFeesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RoutingFeesDecodeErrorZ), "LDKCResult_RoutingFeesDecodeErrorZ");
-       *ret_conv = CResult_RoutingFeesDecodeErrorZ_ok(o_conv);
+       o_conv = ReplyShortChannelIdsEnd_clone(&o_conv);
+       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ), "LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ");
+       *ret_conv = CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RoutingFeesDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyShortChannelIdsEndDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_RoutingFeesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RoutingFeesDecodeErrorZ), "LDKCResult_RoutingFeesDecodeErrorZ");
-       *ret_conv = CResult_RoutingFeesDecodeErrorZ_err(e_conv);
+       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ), "LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ");
+       *ret_conv = CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RoutingFeesDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyShortChannelIdsEndDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_RoutingFeesDecodeErrorZ _res_conv = *(LDKCResult_RoutingFeesDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res_conv = *(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_RoutingFeesDecodeErrorZ_free(_res_conv);
+       CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementInfoDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKNodeAnnouncementInfo o_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyShortChannelIdsEndDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* orig_conv = (LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ), "LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ");
+       *ret_conv = CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1QueryChannelRangeDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKQueryChannelRange o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = NodeAnnouncementInfo_clone(&o_conv);
-       LDKCResult_NodeAnnouncementInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementInfoDecodeErrorZ), "LDKCResult_NodeAnnouncementInfoDecodeErrorZ");
-       *ret_conv = CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o_conv);
+       o_conv = QueryChannelRange_clone(&o_conv);
+       LDKCResult_QueryChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryChannelRangeDecodeErrorZ), "LDKCResult_QueryChannelRangeDecodeErrorZ");
+       *ret_conv = CResult_QueryChannelRangeDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementInfoDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1QueryChannelRangeDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_NodeAnnouncementInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementInfoDecodeErrorZ), "LDKCResult_NodeAnnouncementInfoDecodeErrorZ");
-       *ret_conv = CResult_NodeAnnouncementInfoDecodeErrorZ_err(e_conv);
+       LDKCResult_QueryChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryChannelRangeDecodeErrorZ), "LDKCResult_QueryChannelRangeDecodeErrorZ");
+       *ret_conv = CResult_QueryChannelRangeDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementInfoDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1QueryChannelRangeDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res_conv = *(LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_QueryChannelRangeDecodeErrorZ _res_conv = *(LDKCResult_QueryChannelRangeDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res_conv);
+       CResult_QueryChannelRangeDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementInfoDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKCResult_NodeAnnouncementInfoDecodeErrorZ* orig_conv = (LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)(orig & ~1);
-       LDKCResult_NodeAnnouncementInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementInfoDecodeErrorZ), "LDKCResult_NodeAnnouncementInfoDecodeErrorZ");
-       *ret_conv = CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1QueryChannelRangeDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_QueryChannelRangeDecodeErrorZ* orig_conv = (LDKCResult_QueryChannelRangeDecodeErrorZ*)(orig & ~1);
+       LDKCResult_QueryChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryChannelRangeDecodeErrorZ), "LDKCResult_QueryChannelRangeDecodeErrorZ");
+       *ret_conv = CResult_QueryChannelRangeDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeInfoDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKNodeInfo o_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyChannelRangeDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKReplyChannelRange o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = NodeInfo_clone(&o_conv);
-       LDKCResult_NodeInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeInfoDecodeErrorZ), "LDKCResult_NodeInfoDecodeErrorZ");
-       *ret_conv = CResult_NodeInfoDecodeErrorZ_ok(o_conv);
+       o_conv = ReplyChannelRange_clone(&o_conv);
+       LDKCResult_ReplyChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyChannelRangeDecodeErrorZ), "LDKCResult_ReplyChannelRangeDecodeErrorZ");
+       *ret_conv = CResult_ReplyChannelRangeDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeInfoDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyChannelRangeDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_NodeInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeInfoDecodeErrorZ), "LDKCResult_NodeInfoDecodeErrorZ");
-       *ret_conv = CResult_NodeInfoDecodeErrorZ_err(e_conv);
+       LDKCResult_ReplyChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyChannelRangeDecodeErrorZ), "LDKCResult_ReplyChannelRangeDecodeErrorZ");
+       *ret_conv = CResult_ReplyChannelRangeDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NodeInfoDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyChannelRangeDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_NodeInfoDecodeErrorZ _res_conv = *(LDKCResult_NodeInfoDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_ReplyChannelRangeDecodeErrorZ _res_conv = *(LDKCResult_ReplyChannelRangeDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_NodeInfoDecodeErrorZ_free(_res_conv);
+       CResult_ReplyChannelRangeDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeInfoDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKCResult_NodeInfoDecodeErrorZ* orig_conv = (LDKCResult_NodeInfoDecodeErrorZ*)(orig & ~1);
-       LDKCResult_NodeInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeInfoDecodeErrorZ), "LDKCResult_NodeInfoDecodeErrorZ");
-       *ret_conv = CResult_NodeInfoDecodeErrorZ_clone(orig_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyChannelRangeDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_ReplyChannelRangeDecodeErrorZ* orig_conv = (LDKCResult_ReplyChannelRangeDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ReplyChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyChannelRangeDecodeErrorZ), "LDKCResult_ReplyChannelRangeDecodeErrorZ");
+       *ret_conv = CResult_ReplyChannelRangeDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKNetworkGraph o_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1GossipTimestampFilterDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKGossipTimestampFilter o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       // Warning: we need a move here but no clone is available for LDKNetworkGraph
-       LDKCResult_NetworkGraphDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetworkGraphDecodeErrorZ), "LDKCResult_NetworkGraphDecodeErrorZ");
-       *ret_conv = CResult_NetworkGraphDecodeErrorZ_ok(o_conv);
+       o_conv = GossipTimestampFilter_clone(&o_conv);
+       LDKCResult_GossipTimestampFilterDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_GossipTimestampFilterDecodeErrorZ), "LDKCResult_GossipTimestampFilterDecodeErrorZ");
+       *ret_conv = CResult_GossipTimestampFilterDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1GossipTimestampFilterDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_NetworkGraphDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetworkGraphDecodeErrorZ), "LDKCResult_NetworkGraphDecodeErrorZ");
-       *ret_conv = CResult_NetworkGraphDecodeErrorZ_err(e_conv);
+       LDKCResult_GossipTimestampFilterDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_GossipTimestampFilterDecodeErrorZ), "LDKCResult_GossipTimestampFilterDecodeErrorZ");
+       *ret_conv = CResult_GossipTimestampFilterDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1GossipTimestampFilterDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_NetworkGraphDecodeErrorZ _res_conv = *(LDKCResult_NetworkGraphDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_GossipTimestampFilterDecodeErrorZ _res_conv = *(LDKCResult_GossipTimestampFilterDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_NetworkGraphDecodeErrorZ_free(_res_conv);
+       CResult_GossipTimestampFilterDecodeErrorZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1GossipTimestampFilterDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_GossipTimestampFilterDecodeErrorZ* orig_conv = (LDKCResult_GossipTimestampFilterDecodeErrorZ*)(orig & ~1);
+       LDKCResult_GossipTimestampFilterDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_GossipTimestampFilterDecodeErrorZ), "LDKCResult_GossipTimestampFilterDecodeErrorZ");
+       *ret_conv = CResult_GossipTimestampFilterDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Event_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -7262,20 +9265,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1free(J
        ChannelHandshakeConfig_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKChannelHandshakeConfig orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKChannelHandshakeConfig ret_var = ChannelHandshakeConfig_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1get_1minimum_1depth(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKChannelHandshakeConfig this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -7332,8 +9321,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1new
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1default(JNIEnv *env, jclass clz) {
-       LDKChannelHandshakeConfig ret_var = ChannelHandshakeConfig_default();
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKChannelHandshakeConfig orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKChannelHandshakeConfig ret_var = ChannelHandshakeConfig_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -7343,18 +9335,8 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1def
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKChannelHandshakeLimits this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       ChannelHandshakeLimits_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKChannelHandshakeLimits orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKChannelHandshakeLimits ret_var = ChannelHandshakeLimits_clone(&orig_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1default(JNIEnv *env, jclass clz) {
+       LDKChannelHandshakeConfig ret_var = ChannelHandshakeConfig_default();
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -7364,6 +9346,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1clo
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKChannelHandshakeLimits this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       ChannelHandshakeLimits_free(this_ptr_conv);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1min_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKChannelHandshakeLimits this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -7525,8 +9514,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1new
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1default(JNIEnv *env, jclass clz) {
-       LDKChannelHandshakeLimits ret_var = ChannelHandshakeLimits_default();
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKChannelHandshakeLimits orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKChannelHandshakeLimits ret_var = ChannelHandshakeLimits_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -7536,18 +9528,8 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1def
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKChannelConfig this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       ChannelConfig_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKChannelConfig orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKChannelConfig ret_var = ChannelConfig_clone(&orig_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1default(JNIEnv *env, jclass clz) {
+       LDKChannelHandshakeLimits ret_var = ChannelHandshakeLimits_default();
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -7557,6 +9539,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1clone(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKChannelConfig this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       ChannelConfig_free(this_ptr_conv);
+}
+
 JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1get_1fee_1proportional_1millionths(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKChannelConfig this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -7613,6 +9602,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1new(JNIEnv *
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKChannelConfig orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKChannelConfig ret_var = ChannelConfig_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1default(JNIEnv *env, jclass clz) {
        LDKChannelConfig ret_var = ChannelConfig_default();
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -7639,15 +9642,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1read(JNIEnv
        LDKu8slice ser_ref;
        ser_ref.datalen = (*env)->GetArrayLength(env, ser);
        ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
-       LDKChannelConfig ret_var = ChannelConfig_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_ChannelConfigDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelConfigDecodeErrorZ), "LDKCResult_ChannelConfigDecodeErrorZ");
+       *ret_conv = ChannelConfig_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UserConfig_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -7657,20 +9655,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UserConfig_1free(JNIEnv *env,
        UserConfig_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UserConfig_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKUserConfig orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKUserConfig ret_var = UserConfig_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UserConfig_1get_1own_1channel_1config(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKUserConfig this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -7769,6 +9753,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UserConfig_1new(JNIEnv *env
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UserConfig_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKUserConfig orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKUserConfig ret_var = UserConfig_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UserConfig_1default(JNIEnv *env, jclass clz) {
        LDKUserConfig ret_var = UserConfig_default();
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -7927,20 +9925,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1free(JNI
        ChannelMonitorUpdate_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKChannelMonitorUpdate orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKChannelMonitorUpdate ret_var = ChannelMonitorUpdate_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1get_1update_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKChannelMonitorUpdate this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -7956,6 +9940,20 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1set_1upd
        ChannelMonitorUpdate_set_update_id(&this_ptr_conv, val);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKChannelMonitorUpdate orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKChannelMonitorUpdate ret_var = ChannelMonitorUpdate_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKChannelMonitorUpdate obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
@@ -8061,15 +10059,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCUpdate_1read(JNIEnv *en
        LDKu8slice ser_ref;
        ser_ref.datalen = (*env)->GetArrayLength(env, ser);
        ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
-       LDKHTLCUpdate ret_var = HTLCUpdate_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_HTLCUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCUpdateDecodeErrorZ), "LDKCResult_HTLCUpdateDecodeErrorZ");
+       *ret_conv = HTLCUpdate_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -8296,20 +10289,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutPoint_1free(JNIEnv *env, jc
        OutPoint_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutPoint_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKOutPoint orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKOutPoint ret_var = OutPoint_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OutPoint_1get_1txid(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKOutPoint this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -8358,6 +10337,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutPoint_1new(JNIEnv *env,
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutPoint_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKOutPoint orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKOutPoint ret_var = OutPoint_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OutPoint_1to_1channel_1id(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKOutPoint this_arg_conv;
        this_arg_conv.inner = (void*)(this_arg & (~1));
@@ -8382,15 +10375,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutPoint_1read(JNIEnv *env,
        LDKu8slice ser_ref;
        ser_ref.datalen = (*env)->GetArrayLength(env, ser);
        ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
-       LDKOutPoint ret_var = OutPoint_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_OutPointDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutPointDecodeErrorZ), "LDKCResult_OutPointDecodeErrorZ");
+       *ret_conv = OutPoint_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpendableOutputDescriptor_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -8455,20 +10443,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1free(JNIE
        InMemoryChannelKeys_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKInMemoryChannelKeys orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKInMemoryChannelKeys ret_var = InMemoryChannelKeys_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1funding_1key(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKInMemoryChannelKeys this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -8583,6 +10557,20 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1comm
        InMemoryChannelKeys_set_commitment_seed(&this_ptr_conv, val_ref);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKInMemoryChannelKeys orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKInMemoryChannelKeys ret_var = InMemoryChannelKeys_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1new(JNIEnv *env, jclass clz, int8_tArray funding_key, int8_tArray revocation_base_key, int8_tArray payment_key, int8_tArray delayed_payment_base_key, int8_tArray htlc_base_key, int8_tArray commitment_seed, int64_t channel_value_satoshis, int64_t key_derivation_params) {
        LDKSecretKey funding_key_ref;
        CHECK((*env)->GetArrayLength(env, funding_key) == 32);
@@ -8770,20 +10758,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1free(JNIEnv *e
        ChannelDetails_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKChannelDetails orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKChannelDetails ret_var = ChannelDetails_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKChannelDetails this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -8843,7 +10817,7 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1counterpa
        LDKInitFeatures val_conv;
        val_conv.inner = (void*)(val & (~1));
        val_conv.is_owned = (val & 1) || (val == 0);
-       // Warning: we need a move here but no clone is available for LDKInitFeatures
+       val_conv = InitFeatures_clone(&val_conv);
        ChannelDetails_set_counterparty_features(&this_ptr_conv, val_conv);
 }
 
@@ -8922,6 +10896,20 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1is_1live(
        ChannelDetails_set_is_live(&this_ptr_conv, val);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKChannelDetails orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKChannelDetails ret_var = ChannelDetails_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PaymentSendFailure_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKPaymentSendFailure this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -9523,20 +11511,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1free(JNIEnv *env
        ErrorMessage_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKErrorMessage orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKErrorMessage ret_var = ErrorMessage_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKErrorMessage this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -9594,18 +11568,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1new(JNIEnv *e
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Ping_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKPing this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       Ping_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Ping_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKPing orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKErrorMessage orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKPing ret_var = Ping_clone(&orig_conv);
+       LDKErrorMessage ret_var = ErrorMessage_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -9615,6 +11582,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Ping_1clone(JNIEnv *env, jc
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Ping_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKPing this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       Ping_free(this_ptr_conv);
+}
+
 JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_Ping_1get_1ponglen(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKPing this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -9656,18 +11630,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Ping_1new(JNIEnv *env, jcla
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Pong_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKPong this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       Pong_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Pong_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKPong orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Ping_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKPing orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKPong ret_var = Pong_clone(&orig_conv);
+       LDKPing ret_var = Ping_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -9677,6 +11644,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Pong_1clone(JNIEnv *env, jc
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Pong_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKPong this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       Pong_free(this_ptr_conv);
+}
+
 JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_Pong_1get_1byteslen(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKPong this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -9703,18 +11677,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Pong_1new(JNIEnv *env, jcla
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       OpenChannel_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKOpenChannel orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Pong_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKPong orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKOpenChannel ret_var = OpenChannel_clone(&orig_conv);
+       LDKPong ret_var = Pong_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -9724,6 +11691,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1clone(JNIEnv *
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKOpenChannel this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       OpenChannel_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKOpenChannel this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -10026,18 +12000,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1fla
        OpenChannel_set_channel_flags(&this_ptr_conv, val);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannel this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       AcceptChannel_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKAcceptChannel orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKOpenChannel orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKAcceptChannel ret_var = AcceptChannel_clone(&orig_conv);
+       LDKOpenChannel ret_var = OpenChannel_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -10047,6 +12014,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1clone(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKAcceptChannel this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       AcceptChannel_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKAcceptChannel this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -10285,18 +12259,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1first_1per
        AcceptChannel_set_first_per_commitment_point(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKFundingCreated this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       FundingCreated_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingCreated_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKFundingCreated orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKAcceptChannel orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKFundingCreated ret_var = FundingCreated_clone(&orig_conv);
+       LDKAcceptChannel ret_var = AcceptChannel_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -10306,6 +12273,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingCreated_1clone(JNIEn
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKFundingCreated this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       FundingCreated_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKFundingCreated this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -10398,18 +12372,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingCreated_1new(JNIEnv
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKFundingSigned this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       FundingSigned_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingSigned_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKFundingSigned orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingCreated_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKFundingCreated orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKFundingSigned ret_var = FundingSigned_clone(&orig_conv);
+       LDKFundingCreated ret_var = FundingCreated_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -10419,6 +12386,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingSigned_1clone(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKFundingSigned this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       FundingSigned_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_FundingSigned_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKFundingSigned this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -10474,18 +12448,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingSigned_1new(JNIEnv *
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingLocked_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKFundingLocked this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       FundingLocked_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingLocked_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKFundingLocked orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingSigned_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKFundingSigned orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKFundingLocked ret_var = FundingLocked_clone(&orig_conv);
+       LDKFundingSigned ret_var = FundingSigned_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -10495,6 +12462,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingLocked_1clone(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingLocked_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKFundingLocked this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       FundingLocked_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_FundingLocked_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKFundingLocked this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -10550,18 +12524,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingLocked_1new(JNIEnv *
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKShutdown this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       Shutdown_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Shutdown_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKShutdown orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingLocked_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKFundingLocked orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKShutdown ret_var = Shutdown_clone(&orig_conv);
+       LDKFundingLocked ret_var = FundingLocked_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -10571,6 +12538,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Shutdown_1clone(JNIEnv *env
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKShutdown this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       Shutdown_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Shutdown_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKShutdown this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -10629,18 +12603,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Shutdown_1new(JNIEnv *env,
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKClosingSigned this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       ClosingSigned_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKClosingSigned orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Shutdown_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKShutdown orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKClosingSigned ret_var = ClosingSigned_clone(&orig_conv);
+       LDKShutdown ret_var = Shutdown_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -10650,6 +12617,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1clone(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKClosingSigned this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       ClosingSigned_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKClosingSigned this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -10720,18 +12694,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1new(JNIEnv *
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKUpdateAddHTLC this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       UpdateAddHTLC_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKUpdateAddHTLC orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKClosingSigned orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKUpdateAddHTLC ret_var = UpdateAddHTLC_clone(&orig_conv);
+       LDKClosingSigned ret_var = ClosingSigned_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -10741,6 +12708,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1clone(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKUpdateAddHTLC this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       UpdateAddHTLC_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKUpdateAddHTLC this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -10821,21 +12795,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1cltv_1expi
        LDKUpdateAddHTLC this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       UpdateAddHTLC_set_cltv_expiry(&this_ptr_conv, val);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKUpdateFulfillHTLC this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       UpdateFulfillHTLC_free(this_ptr_conv);
+       UpdateAddHTLC_set_cltv_expiry(&this_ptr_conv, val);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKUpdateFulfillHTLC orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKUpdateAddHTLC orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKUpdateFulfillHTLC ret_var = UpdateFulfillHTLC_clone(&orig_conv);
+       LDKUpdateAddHTLC ret_var = UpdateAddHTLC_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -10845,6 +12812,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1clone(JN
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKUpdateFulfillHTLC this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       UpdateFulfillHTLC_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKUpdateFulfillHTLC this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -10915,18 +12889,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1new(JNIE
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKUpdateFailHTLC this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       UpdateFailHTLC_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKUpdateFailHTLC orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKUpdateFulfillHTLC orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKUpdateFailHTLC ret_var = UpdateFailHTLC_clone(&orig_conv);
+       LDKUpdateFulfillHTLC ret_var = UpdateFulfillHTLC_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -10936,6 +12903,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1clone(JNIEn
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKUpdateFailHTLC this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       UpdateFailHTLC_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKUpdateFailHTLC this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -10970,18 +12944,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1set_1htlc_1id(
        UpdateFailHTLC_set_htlc_id(&this_ptr_conv, val);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKUpdateFailMalformedHTLC this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       UpdateFailMalformedHTLC_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKUpdateFailMalformedHTLC orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKUpdateFailHTLC orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKUpdateFailMalformedHTLC ret_var = UpdateFailMalformedHTLC_clone(&orig_conv);
+       LDKUpdateFailHTLC ret_var = UpdateFailHTLC_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -10991,6 +12958,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1cl
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKUpdateFailMalformedHTLC this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       UpdateFailMalformedHTLC_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKUpdateFailMalformedHTLC this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -11040,18 +13014,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1set_1
        UpdateFailMalformedHTLC_set_failure_code(&this_ptr_conv, val);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKCommitmentSigned this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       CommitmentSigned_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKCommitmentSigned orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKUpdateFailMalformedHTLC orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKCommitmentSigned ret_var = CommitmentSigned_clone(&orig_conv);
+       LDKUpdateFailMalformedHTLC ret_var = UpdateFailMalformedHTLC_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -11061,6 +13028,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1clone(JNI
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommitmentSigned this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       CommitmentSigned_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKCommitmentSigned this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -11149,18 +13123,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1new(JNIEn
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKRevokeAndACK this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       RevokeAndACK_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKRevokeAndACK orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCommitmentSigned orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKRevokeAndACK ret_var = RevokeAndACK_clone(&orig_conv);
+       LDKCommitmentSigned ret_var = CommitmentSigned_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -11170,6 +13137,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1clone(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKRevokeAndACK this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       RevokeAndACK_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKRevokeAndACK this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -11247,18 +13221,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1new(JNIEnv *e
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKUpdateFee this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       UpdateFee_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFee_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKUpdateFee orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKRevokeAndACK orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKUpdateFee ret_var = UpdateFee_clone(&orig_conv);
+       LDKRevokeAndACK ret_var = RevokeAndACK_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -11268,6 +13235,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFee_1clone(JNIEnv *en
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKUpdateFee this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       UpdateFee_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateFee_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKUpdateFee this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -11316,18 +13290,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFee_1new(JNIEnv *env,
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKDataLossProtect this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       DataLossProtect_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKDataLossProtect orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFee_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKUpdateFee orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKDataLossProtect ret_var = DataLossProtect_clone(&orig_conv);
+       LDKUpdateFee ret_var = UpdateFee_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -11337,6 +13304,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1clone(JNIE
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKDataLossProtect this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       DataLossProtect_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1get_1your_1last_1per_1commitment_1secret(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKDataLossProtect this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -11392,18 +13366,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1new(JNIEnv
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKChannelReestablish this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       ChannelReestablish_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKChannelReestablish orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKDataLossProtect orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKChannelReestablish ret_var = ChannelReestablish_clone(&orig_conv);
+       LDKDataLossProtect ret_var = DataLossProtect_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -11413,6 +13380,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1clone(J
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKChannelReestablish this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       ChannelReestablish_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKChannelReestablish this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -11462,18 +13436,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1set_1next_
        ChannelReestablish_set_next_remote_commitment_number(&this_ptr_conv, val);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAnnouncementSignatures this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       AnnouncementSignatures_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKAnnouncementSignatures orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKChannelReestablish orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKAnnouncementSignatures ret_var = AnnouncementSignatures_clone(&orig_conv);
+       LDKChannelReestablish ret_var = ChannelReestablish_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -11483,6 +13450,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1clo
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKAnnouncementSignatures this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       AnnouncementSignatures_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKAnnouncementSignatures this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -11575,6 +13549,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1new
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKAnnouncementSignatures orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKAnnouncementSignatures ret_var = AnnouncementSignatures_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetAddress_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
        if ((this_ptr & 1) != 0) return;
        LDKNetAddress this_ptr_conv = *(LDKNetAddress*)(((uint64_t)this_ptr) & ~1);
@@ -11616,20 +13604,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1free
        UnsignedNodeAnnouncement_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKUnsignedNodeAnnouncement orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKUnsignedNodeAnnouncement ret_var = UnsignedNodeAnnouncement_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1get_1features(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKUnsignedNodeAnnouncement this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -11651,7 +13625,7 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_
        LDKNodeFeatures val_conv;
        val_conv.inner = (void*)(val & (~1));
        val_conv.is_owned = (val & 1) || (val == 0);
-       // Warning: we need a move here but no clone is available for LDKNodeFeatures
+       val_conv = NodeFeatures_clone(&val_conv);
        UnsignedNodeAnnouncement_set_features(&this_ptr_conv, val_conv);
 }
 
@@ -11748,18 +13722,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_
        UnsignedNodeAnnouncement_set_addresses(&this_ptr_conv, val_constr);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKNodeAnnouncement this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       NodeAnnouncement_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKNodeAnnouncement orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKUnsignedNodeAnnouncement orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKNodeAnnouncement ret_var = NodeAnnouncement_clone(&orig_conv);
+       LDKUnsignedNodeAnnouncement ret_var = UnsignedNodeAnnouncement_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -11769,6 +13736,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1clone(JNI
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKNodeAnnouncement this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       NodeAnnouncement_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1get_1signature(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKNodeAnnouncement this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -11831,18 +13805,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1new(JNIEn
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKUnsignedChannelAnnouncement this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       UnsignedChannelAnnouncement_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKUnsignedChannelAnnouncement orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKNodeAnnouncement orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKUnsignedChannelAnnouncement ret_var = UnsignedChannelAnnouncement_clone(&orig_conv);
+       LDKNodeAnnouncement ret_var = NodeAnnouncement_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -11852,6 +13819,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKUnsignedChannelAnnouncement this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       UnsignedChannelAnnouncement_free(this_ptr_conv);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1get_1features(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKUnsignedChannelAnnouncement this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -11873,7 +13847,7 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1s
        LDKChannelFeatures val_conv;
        val_conv.inner = (void*)(val & (~1));
        val_conv.is_owned = (val & 1) || (val == 0);
-       // Warning: we need a move here but no clone is available for LDKChannelFeatures
+       val_conv = ChannelFeatures_clone(&val_conv);
        UnsignedChannelAnnouncement_set_features(&this_ptr_conv, val_conv);
 }
 
@@ -11987,18 +13961,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1s
        UnsignedChannelAnnouncement_set_bitcoin_key_2(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKChannelAnnouncement this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       ChannelAnnouncement_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKChannelAnnouncement orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKUnsignedChannelAnnouncement orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKChannelAnnouncement ret_var = ChannelAnnouncement_clone(&orig_conv);
+       LDKUnsignedChannelAnnouncement ret_var = UnsignedChannelAnnouncement_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -12008,6 +13975,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1clone(
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKChannelAnnouncement this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       ChannelAnnouncement_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1get_1node_1signature_11(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKChannelAnnouncement this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -12136,18 +14110,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1new(JN
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKUnsignedChannelUpdate this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       UnsignedChannelUpdate_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKUnsignedChannelUpdate orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKChannelAnnouncement orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKUnsignedChannelUpdate ret_var = UnsignedChannelUpdate_clone(&orig_conv);
+       LDKChannelAnnouncement ret_var = ChannelAnnouncement_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -12157,6 +14124,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1clon
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKUnsignedChannelUpdate this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       UnsignedChannelUpdate_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKUnsignedChannelUpdate this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -12281,18 +14255,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1fe
        UnsignedChannelUpdate_set_fee_proportional_millionths(&this_ptr_conv, val);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKChannelUpdate this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       ChannelUpdate_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKChannelUpdate orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKUnsignedChannelUpdate orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKChannelUpdate ret_var = ChannelUpdate_clone(&orig_conv);
+       LDKUnsignedChannelUpdate ret_var = UnsignedChannelUpdate_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -12302,6 +14269,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1clone(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKChannelUpdate this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       ChannelUpdate_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1get_1signature(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKChannelUpdate this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -12364,18 +14338,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1new(JNIEnv *
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKQueryChannelRange this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       QueryChannelRange_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKQueryChannelRange orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKChannelUpdate orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKQueryChannelRange ret_var = QueryChannelRange_clone(&orig_conv);
+       LDKChannelUpdate ret_var = ChannelUpdate_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -12385,6 +14352,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1clone(JN
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKQueryChannelRange this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       QueryChannelRange_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1get_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKQueryChannelRange this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -12448,18 +14422,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1new(JNIE
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKReplyChannelRange this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       ReplyChannelRange_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKReplyChannelRange orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKQueryChannelRange orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKReplyChannelRange ret_var = ReplyChannelRange_clone(&orig_conv);
+       LDKQueryChannelRange ret_var = QueryChannelRange_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -12469,6 +14436,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1clone(JN
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKReplyChannelRange this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       ReplyChannelRange_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1get_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKReplyChannelRange this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -12518,19 +14492,19 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1set_1number
        ReplyChannelRange_set_number_of_blocks(&this_ptr_conv, val);
 }
 
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1get_1full_1information(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1get_1sync_1complete(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKReplyChannelRange this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       jboolean ret_val = ReplyChannelRange_get_full_information(&this_ptr_conv);
+       jboolean ret_val = ReplyChannelRange_get_sync_complete(&this_ptr_conv);
        return ret_val;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1set_1full_1information(JNIEnv *env, jclass clz, int64_t this_ptr, jboolean val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1set_1sync_1complete(JNIEnv *env, jclass clz, int64_t this_ptr, jboolean val) {
        LDKReplyChannelRange this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       ReplyChannelRange_set_full_information(&this_ptr_conv, val);
+       ReplyChannelRange_set_sync_complete(&this_ptr_conv, val);
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1set_1short_1channel_1ids(JNIEnv *env, jclass clz, int64_t this_ptr, int64_tArray val) {
@@ -12552,7 +14526,7 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1set_1short_
        ReplyChannelRange_set_short_channel_ids(&this_ptr_conv, val_constr);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1new(JNIEnv *env, jclass clz, int8_tArray chain_hash_arg, int32_t first_blocknum_arg, int32_t number_of_blocks_arg, jboolean full_information_arg, int64_tArray short_channel_ids_arg) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1new(JNIEnv *env, jclass clz, int8_tArray chain_hash_arg, int32_t first_blocknum_arg, int32_t number_of_blocks_arg, jboolean sync_complete_arg, int64_tArray short_channel_ids_arg) {
        LDKThirtyTwoBytes chain_hash_arg_ref;
        CHECK((*env)->GetArrayLength(env, chain_hash_arg) == 32);
        (*env)->GetByteArrayRegion(env, chain_hash_arg, 0, 32, chain_hash_arg_ref.data);
@@ -12568,7 +14542,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1new(JNIE
                short_channel_ids_arg_constr.data[g] = arr_conv_6;
        }
        (*env)->ReleaseLongArrayElements(env, short_channel_ids_arg, short_channel_ids_arg_vals, 0);
-       LDKReplyChannelRange ret_var = ReplyChannelRange_new(chain_hash_arg_ref, first_blocknum_arg, number_of_blocks_arg, full_information_arg, short_channel_ids_arg_constr);
+       LDKReplyChannelRange ret_var = ReplyChannelRange_new(chain_hash_arg_ref, first_blocknum_arg, number_of_blocks_arg, sync_complete_arg, short_channel_ids_arg_constr);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -12578,18 +14552,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1new(JNIE
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKQueryShortChannelIds this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       QueryShortChannelIds_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKQueryShortChannelIds orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKReplyChannelRange orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKQueryShortChannelIds ret_var = QueryShortChannelIds_clone(&orig_conv);
+       LDKReplyChannelRange ret_var = ReplyChannelRange_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -12599,6 +14566,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1clone
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKQueryShortChannelIds this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       QueryShortChannelIds_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1get_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKQueryShortChannelIds this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -12663,18 +14637,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1new(J
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKReplyShortChannelIdsEnd this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       ReplyShortChannelIdsEnd_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKReplyShortChannelIdsEnd orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKQueryShortChannelIds orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKReplyShortChannelIdsEnd ret_var = ReplyShortChannelIdsEnd_clone(&orig_conv);
+       LDKQueryShortChannelIds ret_var = QueryShortChannelIds_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -12684,6 +14651,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1cl
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKReplyShortChannelIdsEnd this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       ReplyShortChannelIdsEnd_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1get_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKReplyShortChannelIdsEnd this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -12732,18 +14706,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1ne
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKGossipTimestampFilter this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       GossipTimestampFilter_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKGossipTimestampFilter orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKReplyShortChannelIdsEnd orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKGossipTimestampFilter ret_var = GossipTimestampFilter_clone(&orig_conv);
+       LDKReplyShortChannelIdsEnd ret_var = ReplyShortChannelIdsEnd_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -12753,6 +14720,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1clon
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKGossipTimestampFilter this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       GossipTimestampFilter_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1get_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKGossipTimestampFilter this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -12816,6 +14790,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1new(
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKGossipTimestampFilter orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKGossipTimestampFilter ret_var = GossipTimestampFilter_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorAction_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
        if ((this_ptr & 1) != 0) return;
        LDKErrorAction this_ptr_conv = *(LDKErrorAction*)(((uint64_t)this_ptr) & ~1);
@@ -12838,20 +14826,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LightningError_1free(JNIEnv *e
        LightningError_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LightningError_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKLightningError orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKLightningError ret_var = LightningError_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 JNIEXPORT jstring JNICALL Java_org_ldk_impl_bindings_LightningError_1get_1err(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKLightningError this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -12908,18 +14882,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LightningError_1new(JNIEnv
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKCommitmentUpdate this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       CommitmentUpdate_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKCommitmentUpdate orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LightningError_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKLightningError orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKCommitmentUpdate ret_var = CommitmentUpdate_clone(&orig_conv);
+       LDKLightningError ret_var = LightningError_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -12929,6 +14896,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1clone(JNI
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommitmentUpdate this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       CommitmentUpdate_free(this_ptr_conv);
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1set_1update_1add_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr, int64_tArray val) {
        LDKCommitmentUpdate this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -13154,6 +15128,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1new(JNIEn
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCommitmentUpdate orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKCommitmentUpdate ret_var = CommitmentUpdate_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCFailChannelUpdate_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
        if ((this_ptr & 1) != 0) return;
        LDKHTLCFailChannelUpdate this_ptr_conv = *(LDKHTLCFailChannelUpdate*)(((uint64_t)this_ptr) & ~1);
@@ -13198,15 +15186,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1read(JNIEnv
        LDKu8slice ser_ref;
        ser_ref.datalen = (*env)->GetArrayLength(env, ser);
        ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
-       LDKAcceptChannel ret_var = AcceptChannel_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_AcceptChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AcceptChannelDecodeErrorZ), "LDKCResult_AcceptChannelDecodeErrorZ");
+       *ret_conv = AcceptChannel_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1write(JNIEnv *env, jclass clz, int64_t obj) {
@@ -13224,15 +15207,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1rea
        LDKu8slice ser_ref;
        ser_ref.datalen = (*env)->GetArrayLength(env, ser);
        ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
-       LDKAnnouncementSignatures ret_var = AnnouncementSignatures_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_AnnouncementSignaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AnnouncementSignaturesDecodeErrorZ), "LDKCResult_AnnouncementSignaturesDecodeErrorZ");
+       *ret_conv = AnnouncementSignatures_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1write(JNIEnv *env, jclass clz, int64_t obj) {
@@ -13271,15 +15249,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1read(JNIEnv
        LDKu8slice ser_ref;
        ser_ref.datalen = (*env)->GetArrayLength(env, ser);
        ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
-       LDKClosingSigned ret_var = ClosingSigned_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_ClosingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ClosingSignedDecodeErrorZ), "LDKCResult_ClosingSignedDecodeErrorZ");
+       *ret_conv = ClosingSigned_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1write(JNIEnv *env, jclass clz, int64_t obj) {
@@ -13297,15 +15270,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1read(JNIE
        LDKu8slice ser_ref;
        ser_ref.datalen = (*env)->GetArrayLength(env, ser);
        ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
-       LDKCommitmentSigned ret_var = CommitmentSigned_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_CommitmentSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentSignedDecodeErrorZ), "LDKCResult_CommitmentSignedDecodeErrorZ");
+       *ret_conv = CommitmentSigned_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_FundingCreated_1write(JNIEnv *env, jclass clz, int64_t obj) {
@@ -13323,15 +15291,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingCreated_1read(JNIEnv
        LDKu8slice ser_ref;
        ser_ref.datalen = (*env)->GetArrayLength(env, ser);
        ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
-       LDKFundingCreated ret_var = FundingCreated_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_FundingCreatedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingCreatedDecodeErrorZ), "LDKCResult_FundingCreatedDecodeErrorZ");
+       *ret_conv = FundingCreated_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_FundingSigned_1write(JNIEnv *env, jclass clz, int64_t obj) {
@@ -13349,15 +15312,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingSigned_1read(JNIEnv
        LDKu8slice ser_ref;
        ser_ref.datalen = (*env)->GetArrayLength(env, ser);
        ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
-       LDKFundingSigned ret_var = FundingSigned_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_FundingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingSignedDecodeErrorZ), "LDKCResult_FundingSignedDecodeErrorZ");
+       *ret_conv = FundingSigned_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_FundingLocked_1write(JNIEnv *env, jclass clz, int64_t obj) {
@@ -13375,15 +15333,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingLocked_1read(JNIEnv
        LDKu8slice ser_ref;
        ser_ref.datalen = (*env)->GetArrayLength(env, ser);
        ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
-       LDKFundingLocked ret_var = FundingLocked_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_FundingLockedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingLockedDecodeErrorZ), "LDKCResult_FundingLockedDecodeErrorZ");
+       *ret_conv = FundingLocked_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Init_1write(JNIEnv *env, jclass clz, int64_t obj) {
@@ -13422,15 +15375,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1read(JNIEnv *e
        LDKu8slice ser_ref;
        ser_ref.datalen = (*env)->GetArrayLength(env, ser);
        ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
-       LDKOpenChannel ret_var = OpenChannel_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_OpenChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OpenChannelDecodeErrorZ), "LDKCResult_OpenChannelDecodeErrorZ");
+       *ret_conv = OpenChannel_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1write(JNIEnv *env, jclass clz, int64_t obj) {
@@ -13448,15 +15396,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1read(JNIEnv *
        LDKu8slice ser_ref;
        ser_ref.datalen = (*env)->GetArrayLength(env, ser);
        ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
-       LDKRevokeAndACK ret_var = RevokeAndACK_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_RevokeAndACKDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RevokeAndACKDecodeErrorZ), "LDKCResult_RevokeAndACKDecodeErrorZ");
+       *ret_conv = RevokeAndACK_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Shutdown_1write(JNIEnv *env, jclass clz, int64_t obj) {
@@ -13474,15 +15417,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Shutdown_1read(JNIEnv *env,
        LDKu8slice ser_ref;
        ser_ref.datalen = (*env)->GetArrayLength(env, ser);
        ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
-       LDKShutdown ret_var = Shutdown_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_ShutdownDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ShutdownDecodeErrorZ), "LDKCResult_ShutdownDecodeErrorZ");
+       *ret_conv = Shutdown_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1write(JNIEnv *env, jclass clz, int64_t obj) {
@@ -13500,15 +15438,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1read(JNIEnv
        LDKu8slice ser_ref;
        ser_ref.datalen = (*env)->GetArrayLength(env, ser);
        ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
-       LDKUpdateFailHTLC ret_var = UpdateFailHTLC_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_UpdateFailHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailHTLCDecodeErrorZ), "LDKCResult_UpdateFailHTLCDecodeErrorZ");
+       *ret_conv = UpdateFailHTLC_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1write(JNIEnv *env, jclass clz, int64_t obj) {
@@ -13526,15 +15459,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1re
        LDKu8slice ser_ref;
        ser_ref.datalen = (*env)->GetArrayLength(env, ser);
        ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
-       LDKUpdateFailMalformedHTLC ret_var = UpdateFailMalformedHTLC_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ), "LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ");
+       *ret_conv = UpdateFailMalformedHTLC_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateFee_1write(JNIEnv *env, jclass clz, int64_t obj) {
@@ -13552,15 +15480,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFee_1read(JNIEnv *env
        LDKu8slice ser_ref;
        ser_ref.datalen = (*env)->GetArrayLength(env, ser);
        ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
-       LDKUpdateFee ret_var = UpdateFee_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_UpdateFeeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFeeDecodeErrorZ), "LDKCResult_UpdateFeeDecodeErrorZ");
+       *ret_conv = UpdateFee_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1write(JNIEnv *env, jclass clz, int64_t obj) {
@@ -13578,15 +15501,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1read(JNI
        LDKu8slice ser_ref;
        ser_ref.datalen = (*env)->GetArrayLength(env, ser);
        ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
-       LDKUpdateFulfillHTLC ret_var = UpdateFulfillHTLC_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_UpdateFulfillHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFulfillHTLCDecodeErrorZ), "LDKCResult_UpdateFulfillHTLCDecodeErrorZ");
+       *ret_conv = UpdateFulfillHTLC_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1write(JNIEnv *env, jclass clz, int64_t obj) {
@@ -13604,15 +15522,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1read(JNIEnv
        LDKu8slice ser_ref;
        ser_ref.datalen = (*env)->GetArrayLength(env, ser);
        ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
-       LDKUpdateAddHTLC ret_var = UpdateAddHTLC_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_UpdateAddHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateAddHTLCDecodeErrorZ), "LDKCResult_UpdateAddHTLCDecodeErrorZ");
+       *ret_conv = UpdateAddHTLC_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Ping_1write(JNIEnv *env, jclass clz, int64_t obj) {
@@ -13693,15 +15606,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1read(J
        LDKu8slice ser_ref;
        ser_ref.datalen = (*env)->GetArrayLength(env, ser);
        ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
-       LDKChannelAnnouncement ret_var = ChannelAnnouncement_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_ChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelAnnouncementDecodeErrorZ), "LDKCResult_ChannelAnnouncementDecodeErrorZ");
+       *ret_conv = ChannelAnnouncement_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1write(JNIEnv *env, jclass clz, int64_t obj) {
@@ -13740,15 +15648,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1read(JNIEnv
        LDKu8slice ser_ref;
        ser_ref.datalen = (*env)->GetArrayLength(env, ser);
        ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
-       LDKChannelUpdate ret_var = ChannelUpdate_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_ChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelUpdateDecodeErrorZ), "LDKCResult_ChannelUpdateDecodeErrorZ");
+       *ret_conv = ChannelUpdate_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1write(JNIEnv *env, jclass clz, int64_t obj) {
@@ -13808,15 +15711,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1read(JNIE
        LDKu8slice ser_ref;
        ser_ref.datalen = (*env)->GetArrayLength(env, ser);
        ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
-       LDKNodeAnnouncement ret_var = NodeAnnouncement_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_NodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementDecodeErrorZ), "LDKCResult_NodeAnnouncementDecodeErrorZ");
+       *ret_conv = NodeAnnouncement_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
@@ -14013,20 +15911,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerHandleError_1free(JNIEnv *
        PeerHandleError_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerHandleError_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKPeerHandleError orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKPeerHandleError ret_var = PeerHandleError_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_PeerHandleError_1get_1no_1connection_1possible(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKPeerHandleError this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -14053,6 +15937,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerHandleError_1new(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerHandleError_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKPeerHandleError orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKPeerHandleError ret_var = PeerHandleError_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerManager_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKPeerManager this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -14208,7 +16106,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_derive_1private_1key(JNIEnv
        CHECK((*env)->GetArrayLength(env, base_secret) == 32);
        (*env)->GetByteArrayRegion(env, base_secret, 0, 32, base_secret_arr);
        unsigned char (*base_secret_ref)[32] = &base_secret_arr;
-       LDKCResult_SecretKeySecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SecretKeySecpErrorZ), "LDKCResult_SecretKeySecpErrorZ");
+       LDKCResult_SecretKeyErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SecretKeyErrorZ), "LDKCResult_SecretKeyErrorZ");
        *ret_conv = derive_private_key(per_commitment_point_ref, base_secret_ref);
        return (long)ret_conv;
 }
@@ -14220,7 +16118,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_derive_1public_1key(JNIEnv
        LDKPublicKey base_point_ref;
        CHECK((*env)->GetArrayLength(env, base_point) == 33);
        (*env)->GetByteArrayRegion(env, base_point, 0, 33, base_point_ref.compressed_form);
-       LDKCResult_PublicKeySecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecpErrorZ), "LDKCResult_PublicKeySecpErrorZ");
+       LDKCResult_PublicKeyErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyErrorZ), "LDKCResult_PublicKeyErrorZ");
        *ret_conv = derive_public_key(per_commitment_point_ref, base_point_ref);
        return (long)ret_conv;
 }
@@ -14234,7 +16132,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_derive_1private_1revocation
        CHECK((*env)->GetArrayLength(env, countersignatory_revocation_base_secret) == 32);
        (*env)->GetByteArrayRegion(env, countersignatory_revocation_base_secret, 0, 32, countersignatory_revocation_base_secret_arr);
        unsigned char (*countersignatory_revocation_base_secret_ref)[32] = &countersignatory_revocation_base_secret_arr;
-       LDKCResult_SecretKeySecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SecretKeySecpErrorZ), "LDKCResult_SecretKeySecpErrorZ");
+       LDKCResult_SecretKeyErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SecretKeyErrorZ), "LDKCResult_SecretKeyErrorZ");
        *ret_conv = derive_private_revocation_key(per_commitment_secret_ref, countersignatory_revocation_base_secret_ref);
        return (long)ret_conv;
 }
@@ -14246,7 +16144,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_derive_1public_1revocation_
        LDKPublicKey countersignatory_revocation_base_point_ref;
        CHECK((*env)->GetArrayLength(env, countersignatory_revocation_base_point) == 33);
        (*env)->GetByteArrayRegion(env, countersignatory_revocation_base_point, 0, 33, countersignatory_revocation_base_point_ref.compressed_form);
-       LDKCResult_PublicKeySecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecpErrorZ), "LDKCResult_PublicKeySecpErrorZ");
+       LDKCResult_PublicKeyErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyErrorZ), "LDKCResult_PublicKeyErrorZ");
        *ret_conv = derive_public_revocation_key(per_commitment_point_ref, countersignatory_revocation_base_point_ref);
        return (long)ret_conv;
 }
@@ -14258,20 +16156,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1free(JNIEnv *e
        TxCreationKeys_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKTxCreationKeys orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKTxCreationKeys ret_var = TxCreationKeys_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1get_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKTxCreationKeys this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -14393,6 +16277,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1new(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKTxCreationKeys orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKTxCreationKeys ret_var = TxCreationKeys_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKTxCreationKeys obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
@@ -14408,15 +16306,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1read(JNIEnv
        LDKu8slice ser_ref;
        ser_ref.datalen = (*env)->GetArrayLength(env, ser);
        ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
-       LDKTxCreationKeys ret_var = TxCreationKeys_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_TxCreationKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysDecodeErrorZ), "LDKCResult_TxCreationKeysDecodeErrorZ");
+       *ret_conv = TxCreationKeys_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -14426,20 +16319,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1free(JNIEnv
        ChannelPublicKeys_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKChannelPublicKeys orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKChannelPublicKeys ret_var = ChannelPublicKeys_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1get_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKChannelPublicKeys this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -14561,6 +16440,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1new(JNIE
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKChannelPublicKeys orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKChannelPublicKeys ret_var = ChannelPublicKeys_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKChannelPublicKeys obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
@@ -14576,15 +16469,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1read(JNI
        LDKu8slice ser_ref;
        ser_ref.datalen = (*env)->GetArrayLength(env, ser);
        ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
-       LDKChannelPublicKeys ret_var = ChannelPublicKeys_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_ChannelPublicKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelPublicKeysDecodeErrorZ), "LDKCResult_ChannelPublicKeysDecodeErrorZ");
+       *ret_conv = ChannelPublicKeys_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1derive_1new(JNIEnv *env, jclass clz, int8_tArray per_commitment_point, int8_tArray broadcaster_delayed_payment_base, int8_tArray broadcaster_htlc_base, int8_tArray countersignatory_revocation_base, int8_tArray countersignatory_htlc_base) {
@@ -14603,7 +16491,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1derive_1new
        LDKPublicKey countersignatory_htlc_base_ref;
        CHECK((*env)->GetArrayLength(env, countersignatory_htlc_base) == 33);
        (*env)->GetByteArrayRegion(env, countersignatory_htlc_base, 0, 33, countersignatory_htlc_base_ref.compressed_form);
-       LDKCResult_TxCreationKeysSecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysSecpErrorZ), "LDKCResult_TxCreationKeysSecpErrorZ");
+       LDKCResult_TxCreationKeysErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysErrorZ), "LDKCResult_TxCreationKeysErrorZ");
        *ret_conv = TxCreationKeys_derive_new(per_commitment_point_ref, broadcaster_delayed_payment_base_ref, broadcaster_htlc_base_ref, countersignatory_revocation_base_ref, countersignatory_htlc_base_ref);
        return (long)ret_conv;
 }
@@ -14618,7 +16506,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1from_1chann
        LDKChannelPublicKeys countersignatory_keys_conv;
        countersignatory_keys_conv.inner = (void*)(countersignatory_keys & (~1));
        countersignatory_keys_conv.is_owned = false;
-       LDKCResult_TxCreationKeysSecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysSecpErrorZ), "LDKCResult_TxCreationKeysSecpErrorZ");
+       LDKCResult_TxCreationKeysErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysErrorZ), "LDKCResult_TxCreationKeysErrorZ");
        *ret_conv = TxCreationKeys_from_channel_static_keys(per_commitment_point_ref, &broadcaster_keys_conv, &countersignatory_keys_conv);
        return (long)ret_conv;
 }
@@ -14644,20 +16532,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1free(J
        HTLCOutputInCommitment_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKHTLCOutputInCommitment orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKHTLCOutputInCommitment ret_var = HTLCOutputInCommitment_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1get_1offered(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKHTLCOutputInCommitment this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -14722,6 +16596,20 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1set_1p
        HTLCOutputInCommitment_set_payment_hash(&this_ptr_conv, val_ref);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKHTLCOutputInCommitment orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKHTLCOutputInCommitment ret_var = HTLCOutputInCommitment_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKHTLCOutputInCommitment obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
@@ -14737,15 +16625,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1rea
        LDKu8slice ser_ref;
        ser_ref.datalen = (*env)->GetArrayLength(env, ser);
        ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
-       LDKHTLCOutputInCommitment ret_var = HTLCOutputInCommitment_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_HTLCOutputInCommitmentDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ), "LDKCResult_HTLCOutputInCommitmentDecodeErrorZ");
+       *ret_conv = HTLCOutputInCommitment_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_get_1htlc_1redeemscript(JNIEnv *env, jclass clz, int64_t htlc, int64_t keys) {
@@ -14804,20 +16687,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelTransactionParameters_1
        ChannelTransactionParameters_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelTransactionParameters_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKChannelTransactionParameters orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKChannelTransactionParameters ret_var = ChannelTransactionParameters_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelTransactionParameters_1get_1holder_1pubkeys(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKChannelTransactionParameters this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -14946,6 +16815,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelTransactionParameter
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelTransactionParameters_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKChannelTransactionParameters orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKChannelTransactionParameters ret_var = ChannelTransactionParameters_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CounterpartyChannelTransactionParameters_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKCounterpartyChannelTransactionParameters this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -14953,20 +16836,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CounterpartyChannelTransaction
        CounterpartyChannelTransactionParameters_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CounterpartyChannelTransactionParameters_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKCounterpartyChannelTransactionParameters orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKCounterpartyChannelTransactionParameters ret_var = CounterpartyChannelTransactionParameters_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CounterpartyChannelTransactionParameters_1get_1pubkeys(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKCounterpartyChannelTransactionParameters this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -15022,6 +16891,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CounterpartyChannelTransact
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CounterpartyChannelTransactionParameters_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCounterpartyChannelTransactionParameters orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKCounterpartyChannelTransactionParameters ret_var = CounterpartyChannelTransactionParameters_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelTransactionParameters_1is_1populated(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKChannelTransactionParameters this_arg_conv;
        this_arg_conv.inner = (void*)(this_arg & (~1));
@@ -15073,15 +16956,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CounterpartyChannelTransact
        LDKu8slice ser_ref;
        ser_ref.datalen = (*env)->GetArrayLength(env, ser);
        ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
-       LDKCounterpartyChannelTransactionParameters ret_var = CounterpartyChannelTransactionParameters_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ), "LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ");
+       *ret_conv = CounterpartyChannelTransactionParameters_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelTransactionParameters_1write(JNIEnv *env, jclass clz, int64_t obj) {
@@ -15099,15 +16977,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelTransactionParameter
        LDKu8slice ser_ref;
        ser_ref.datalen = (*env)->GetArrayLength(env, ser);
        ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
-       LDKChannelTransactionParameters ret_var = ChannelTransactionParameters_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_ChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTransactionParametersDecodeErrorZ), "LDKCResult_ChannelTransactionParametersDecodeErrorZ");
+       *ret_conv = ChannelTransactionParameters_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectedChannelTransactionParameters_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -15182,20 +17055,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1f
        HolderCommitmentTransaction_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKHolderCommitmentTransaction orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKHolderCommitmentTransaction ret_var = HolderCommitmentTransaction_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1get_1counterparty_1sig(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKHolderCommitmentTransaction this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -15235,6 +17094,20 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1s
        HolderCommitmentTransaction_set_counterparty_htlc_sigs(&this_ptr_conv, val_constr);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKHolderCommitmentTransaction orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKHolderCommitmentTransaction ret_var = HolderCommitmentTransaction_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKHolderCommitmentTransaction obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
@@ -15250,15 +17123,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction
        LDKu8slice ser_ref;
        ser_ref.datalen = (*env)->GetArrayLength(env, ser);
        ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
-       LDKHolderCommitmentTransaction ret_var = HolderCommitmentTransaction_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_HolderCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HolderCommitmentTransactionDecodeErrorZ), "LDKCResult_HolderCommitmentTransactionDecodeErrorZ");
+       *ret_conv = HolderCommitmentTransaction_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1new(JNIEnv *env, jclass clz, int64_t commitment_tx, int8_tArray counterparty_sig, jobjectArray counterparty_htlc_sigs, int8_tArray holder_funding_key, int8_tArray counterparty_funding_key) {
@@ -15305,20 +17173,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BuiltCommitmentTransaction_1fr
        BuiltCommitmentTransaction_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BuiltCommitmentTransaction_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKBuiltCommitmentTransaction orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKBuiltCommitmentTransaction ret_var = BuiltCommitmentTransaction_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BuiltCommitmentTransaction_1get_1transaction(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKBuiltCommitmentTransaction this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -15380,6 +17234,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BuiltCommitmentTransaction_
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BuiltCommitmentTransaction_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKBuiltCommitmentTransaction orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKBuiltCommitmentTransaction ret_var = BuiltCommitmentTransaction_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BuiltCommitmentTransaction_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKBuiltCommitmentTransaction obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
@@ -15395,15 +17263,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BuiltCommitmentTransaction_
        LDKu8slice ser_ref;
        ser_ref.datalen = (*env)->GetArrayLength(env, ser);
        ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
-       LDKBuiltCommitmentTransaction ret_var = BuiltCommitmentTransaction_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_BuiltCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ), "LDKCResult_BuiltCommitmentTransactionDecodeErrorZ");
+       *ret_conv = BuiltCommitmentTransaction_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BuiltCommitmentTransaction_1get_1sighash_1all(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray funding_redeemscript, int64_t channel_value_satoshis) {
@@ -15472,15 +17335,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentTransaction_1read
        LDKu8slice ser_ref;
        ser_ref.datalen = (*env)->GetArrayLength(env, ser);
        ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
-       LDKCommitmentTransaction ret_var = CommitmentTransaction_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_CommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentTransactionDecodeErrorZ), "LDKCResult_CommitmentTransactionDecodeErrorZ");
+       *ret_conv = CommitmentTransaction_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentTransaction_1commitment_1number(JNIEnv *env, jclass clz, int64_t this_arg) {
@@ -15607,36 +17465,207 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrustedCommitmentTransactio
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_get_1commitment_1transaction_1number_1obscure_1factor(JNIEnv *env, jclass clz, int8_tArray broadcaster_payment_basepoint, int8_tArray countersignatory_payment_basepoint, jboolean outbound_from_broadcaster) {
-       LDKPublicKey broadcaster_payment_basepoint_ref;
-       CHECK((*env)->GetArrayLength(env, broadcaster_payment_basepoint) == 33);
-       (*env)->GetByteArrayRegion(env, broadcaster_payment_basepoint, 0, 33, broadcaster_payment_basepoint_ref.compressed_form);
-       LDKPublicKey countersignatory_payment_basepoint_ref;
-       CHECK((*env)->GetArrayLength(env, countersignatory_payment_basepoint) == 33);
-       (*env)->GetByteArrayRegion(env, countersignatory_payment_basepoint, 0, 33, countersignatory_payment_basepoint_ref.compressed_form);
-       int64_t ret_val = get_commitment_transaction_number_obscure_factor(broadcaster_payment_basepoint_ref, countersignatory_payment_basepoint_ref, outbound_from_broadcaster);
-       return ret_val;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_get_1commitment_1transaction_1number_1obscure_1factor(JNIEnv *env, jclass clz, int8_tArray broadcaster_payment_basepoint, int8_tArray countersignatory_payment_basepoint, jboolean outbound_from_broadcaster) {
+       LDKPublicKey broadcaster_payment_basepoint_ref;
+       CHECK((*env)->GetArrayLength(env, broadcaster_payment_basepoint) == 33);
+       (*env)->GetByteArrayRegion(env, broadcaster_payment_basepoint, 0, 33, broadcaster_payment_basepoint_ref.compressed_form);
+       LDKPublicKey countersignatory_payment_basepoint_ref;
+       CHECK((*env)->GetArrayLength(env, countersignatory_payment_basepoint) == 33);
+       (*env)->GetByteArrayRegion(env, countersignatory_payment_basepoint, 0, 33, countersignatory_payment_basepoint_ref.compressed_form);
+       int64_t ret_val = get_commitment_transaction_number_obscure_factor(broadcaster_payment_basepoint_ref, countersignatory_payment_basepoint_ref, outbound_from_broadcaster);
+       return ret_val;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InitFeatures_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKInitFeatures orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKInitFeatures ret_var = InitFeatures_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKNodeFeatures orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKNodeFeatures ret_var = NodeFeatures_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelFeatures_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKChannelFeatures orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKChannelFeatures ret_var = ChannelFeatures_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InitFeatures_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKInitFeatures this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       InitFeatures_free(this_ptr_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKNodeFeatures this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       NodeFeatures_free(this_ptr_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelFeatures_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKChannelFeatures this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       ChannelFeatures_free(this_ptr_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InitFeatures_1empty(JNIEnv *env, jclass clz) {
+       LDKInitFeatures ret_var = InitFeatures_empty();
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InitFeatures_1known(JNIEnv *env, jclass clz) {
+       LDKInitFeatures ret_var = InitFeatures_known();
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1empty(JNIEnv *env, jclass clz) {
+       LDKNodeFeatures ret_var = NodeFeatures_empty();
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1known(JNIEnv *env, jclass clz) {
+       LDKNodeFeatures ret_var = NodeFeatures_known();
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelFeatures_1empty(JNIEnv *env, jclass clz) {
+       LDKChannelFeatures ret_var = ChannelFeatures_empty();
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelFeatures_1known(JNIEnv *env, jclass clz) {
+       LDKChannelFeatures ret_var = ChannelFeatures_known();
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InitFeatures_1write(JNIEnv *env, jclass clz, int64_t obj) {
+       LDKInitFeatures obj_conv;
+       obj_conv.inner = (void*)(obj & (~1));
+       obj_conv.is_owned = false;
+       LDKCVec_u8Z arg_var = InitFeatures_write(&obj_conv);
+       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
+       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
+       CVec_u8Z_free(arg_var);
+       return arg_arr;
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1write(JNIEnv *env, jclass clz, int64_t obj) {
+       LDKNodeFeatures obj_conv;
+       obj_conv.inner = (void*)(obj & (~1));
+       obj_conv.is_owned = false;
+       LDKCVec_u8Z arg_var = NodeFeatures_write(&obj_conv);
+       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
+       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
+       CVec_u8Z_free(arg_var);
+       return arg_arr;
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelFeatures_1write(JNIEnv *env, jclass clz, int64_t obj) {
+       LDKChannelFeatures obj_conv;
+       obj_conv.inner = (void*)(obj & (~1));
+       obj_conv.is_owned = false;
+       LDKCVec_u8Z arg_var = ChannelFeatures_write(&obj_conv);
+       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
+       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
+       CVec_u8Z_free(arg_var);
+       return arg_arr;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InitFeatures_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKInitFeatures this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       InitFeatures_free(this_ptr_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InitFeatures_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+       LDKu8slice ser_ref;
+       ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+       ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+       LDKCResult_InitFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitFeaturesDecodeErrorZ), "LDKCResult_InitFeaturesDecodeErrorZ");
+       *ret_conv = InitFeatures_read(ser_ref);
+       (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+       return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKNodeFeatures this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       NodeFeatures_free(this_ptr_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+       LDKu8slice ser_ref;
+       ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+       ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+       LDKCResult_NodeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeFeaturesDecodeErrorZ), "LDKCResult_NodeFeaturesDecodeErrorZ");
+       *ret_conv = NodeFeatures_read(ser_ref);
+       (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+       return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelFeatures_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKChannelFeatures this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       ChannelFeatures_free(this_ptr_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelFeatures_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+       LDKu8slice ser_ref;
+       ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+       ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+       LDKCResult_ChannelFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelFeaturesDecodeErrorZ), "LDKCResult_ChannelFeaturesDecodeErrorZ");
+       *ret_conv = ChannelFeatures_read(ser_ref);
+       (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+       return (long)ret_conv;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHop_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -15646,20 +17675,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHop_1free(JNIEnv *env, jc
        RouteHop_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RouteHop_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKRouteHop orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKRouteHop ret_var = RouteHop_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_RouteHop_1get_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKRouteHop this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -15700,7 +17715,7 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHop_1set_1node_1features(
        LDKNodeFeatures val_conv;
        val_conv.inner = (void*)(val & (~1));
        val_conv.is_owned = (val & 1) || (val == 0);
-       // Warning: we need a move here but no clone is available for LDKNodeFeatures
+       val_conv = NodeFeatures_clone(&val_conv);
        RouteHop_set_node_features(&this_ptr_conv, val_conv);
 }
 
@@ -15740,7 +17755,7 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHop_1set_1channel_1featur
        LDKChannelFeatures val_conv;
        val_conv.inner = (void*)(val & (~1));
        val_conv.is_owned = (val & 1) || (val == 0);
-       // Warning: we need a move here but no clone is available for LDKChannelFeatures
+       val_conv = ChannelFeatures_clone(&val_conv);
        RouteHop_set_channel_features(&this_ptr_conv, val_conv);
 }
 
@@ -15781,11 +17796,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RouteHop_1new(JNIEnv *env,
        LDKNodeFeatures node_features_arg_conv;
        node_features_arg_conv.inner = (void*)(node_features_arg & (~1));
        node_features_arg_conv.is_owned = (node_features_arg & 1) || (node_features_arg == 0);
-       // Warning: we need a move here but no clone is available for LDKNodeFeatures
+       node_features_arg_conv = NodeFeatures_clone(&node_features_arg_conv);
        LDKChannelFeatures channel_features_arg_conv;
        channel_features_arg_conv.inner = (void*)(channel_features_arg & (~1));
        channel_features_arg_conv.is_owned = (channel_features_arg & 1) || (channel_features_arg == 0);
-       // Warning: we need a move here but no clone is available for LDKChannelFeatures
+       channel_features_arg_conv = ChannelFeatures_clone(&channel_features_arg_conv);
        LDKRouteHop ret_var = RouteHop_new(pubkey_arg_ref, node_features_arg_conv, short_channel_id_arg, channel_features_arg_conv, fee_msat_arg, cltv_expiry_delta_arg);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
@@ -15796,18 +17811,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RouteHop_1new(JNIEnv *env,
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Route_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKRoute this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       Route_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Route_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKRoute orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RouteHop_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKRouteHop orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKRoute ret_var = Route_clone(&orig_conv);
+       LDKRouteHop ret_var = RouteHop_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -15817,6 +17825,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Route_1clone(JNIEnv *env, j
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Route_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKRoute this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       Route_free(this_ptr_conv);
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Route_1set_1paths(JNIEnv *env, jclass clz, int64_t this_ptr, jobjectArray val) {
        LDKRoute this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -15887,6 +17902,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Route_1new(JNIEnv *env, jcl
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Route_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKRoute orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKRoute ret_var = Route_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Route_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKRoute obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
@@ -15915,20 +17944,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1free(JNIEnv *env, j
        RouteHint_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RouteHint_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKRouteHint orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKRouteHint ret_var = RouteHint_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_RouteHint_1get_1src_1node_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKRouteHint this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -16036,6 +18051,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RouteHint_1new(JNIEnv *env,
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RouteHint_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKRouteHint orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKRouteHint ret_var = RouteHint_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_get_1route(JNIEnv *env, jclass clz, int8_tArray our_node_id, int64_t network, int8_tArray target, int64_tArray first_hops, int64_tArray last_hops, int64_t final_value_msat, int32_t final_cltv, int64_t logger) {
        LDKPublicKey our_node_id_ref;
        CHECK((*env)->GetArrayLength(env, our_node_id) == 33);
@@ -16203,20 +18232,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1free(J
        DirectionalChannelInfo_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKDirectionalChannelInfo orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKDirectionalChannelInfo ret_var = DirectionalChannelInfo_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1get_1last_1update(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKDirectionalChannelInfo this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -16327,6 +18342,20 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1set_1l
        DirectionalChannelInfo_set_last_update_message(&this_ptr_conv, val_conv);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKDirectionalChannelInfo orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKDirectionalChannelInfo ret_var = DirectionalChannelInfo_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKDirectionalChannelInfo obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
@@ -16342,15 +18371,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1rea
        LDKu8slice ser_ref;
        ser_ref.datalen = (*env)->GetArrayLength(env, ser);
        ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
-       LDKDirectionalChannelInfo ret_var = DirectionalChannelInfo_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_DirectionalChannelInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DirectionalChannelInfoDecodeErrorZ), "LDKCResult_DirectionalChannelInfoDecodeErrorZ");
+       *ret_conv = DirectionalChannelInfo_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -16381,7 +18405,7 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1set_1features(JNI
        LDKChannelFeatures val_conv;
        val_conv.inner = (void*)(val & (~1));
        val_conv.is_owned = (val & 1) || (val == 0);
-       // Warning: we need a move here but no clone is available for LDKChannelFeatures
+       val_conv = ChannelFeatures_clone(&val_conv);
        ChannelInfo_set_features(&this_ptr_conv, val_conv);
 }
 
@@ -16513,15 +18537,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1read(JNIEnv *e
        LDKu8slice ser_ref;
        ser_ref.datalen = (*env)->GetArrayLength(env, ser);
        ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
-       LDKChannelInfo ret_var = ChannelInfo_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_ChannelInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelInfoDecodeErrorZ), "LDKCResult_ChannelInfoDecodeErrorZ");
+       *ret_conv = ChannelInfo_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingFees_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -16531,20 +18550,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingFees_1free(JNIEnv *env,
        RoutingFees_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RoutingFees_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKRoutingFees orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKRoutingFees ret_var = RoutingFees_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_RoutingFees_1get_1base_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKRoutingFees this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -16586,6 +18591,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RoutingFees_1new(JNIEnv *en
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RoutingFees_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKRoutingFees orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKRoutingFees ret_var = RoutingFees_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RoutingFees_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
        LDKu8slice ser_ref;
        ser_ref.datalen = (*env)->GetArrayLength(env, ser);
@@ -16614,20 +18633,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1free(JNI
        NodeAnnouncementInfo_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKNodeAnnouncementInfo orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKNodeAnnouncementInfo ret_var = NodeAnnouncementInfo_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1get_1features(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKNodeAnnouncementInfo this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -16649,7 +18654,7 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1set_1fea
        LDKNodeFeatures val_conv;
        val_conv.inner = (void*)(val & (~1));
        val_conv.is_owned = (val & 1) || (val == 0);
-       // Warning: we need a move here but no clone is available for LDKNodeFeatures
+       val_conv = NodeFeatures_clone(&val_conv);
        NodeAnnouncementInfo_set_features(&this_ptr_conv, val_conv);
 }
 
@@ -16756,7 +18761,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1new(J
        LDKNodeFeatures features_arg_conv;
        features_arg_conv.inner = (void*)(features_arg & (~1));
        features_arg_conv.is_owned = (features_arg & 1) || (features_arg == 0);
-       // Warning: we need a move here but no clone is available for LDKNodeFeatures
+       features_arg_conv = NodeFeatures_clone(&features_arg_conv);
        LDKThreeBytes rgb_arg_ref;
        CHECK((*env)->GetArrayLength(env, rgb_arg) == 3);
        (*env)->GetByteArrayRegion(env, rgb_arg, 0, 3, rgb_arg_ref.data);
@@ -16791,6 +18796,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1new(J
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKNodeAnnouncementInfo orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKNodeAnnouncementInfo ret_var = NodeAnnouncementInfo_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKNodeAnnouncementInfo obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
@@ -16819,20 +18838,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeInfo_1free(JNIEnv *env, jc
        NodeInfo_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeInfo_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKNodeInfo orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKNodeInfo ret_var = NodeInfo_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeInfo_1set_1channels(JNIEnv *env, jclass clz, int64_t this_ptr, int64_tArray val) {
        LDKNodeInfo this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -16933,6 +18938,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeInfo_1new(JNIEnv *env,
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeInfo_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKNodeInfo orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKNodeInfo ret_var = NodeInfo_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_NodeInfo_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKNodeInfo obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
index d8aa468f4e4c8549bc6f5b59a65cae1692ff67a3..e8cce8212ee201398aaac6326a4e24c9cd5c5110 100644 (file)
@@ -121,674 +121,682 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1u8Z_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_u64u64Z_new
- * Signature: (JJ)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u64u64Z_1new
-  (JNIEnv *, jclass, jlong, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_u64u64Z_get_a
- * Signature: (J)J
+ * Method:    LDKCResult_SecretKeyErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u64u64Z_1get_1a
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SecretKeyErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_u64u64Z_get_b
- * Signature: (J)J
+ * Method:    LDKCResult_SecretKeyErrorZ_get_ok
+ * Signature: (J)[B
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u64u64Z_1get_1b
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SecretKeyErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKSpendableOutputDescriptor_ref_from_ptr
- * Signature: (J)Lorg/ldk/impl/bindings/LDKSpendableOutputDescriptor;
+ * Method:    LDKCResult_SecretKeyErrorZ_get_err
+ * Signature: (J)Lorg/ldk/enums/LDKSecp256k1Error;
  */
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKSpendableOutputDescriptor_1ref_1from_1ptr
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SecretKeyErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCVec_SpendableOutputDescriptorZ_new
- * Signature: ([J)J
+ * Method:    LDKCResult_PublicKeyErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1SpendableOutputDescriptorZ_1new
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PublicKeyErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKErrorAction_ref_from_ptr
- * Signature: (J)Lorg/ldk/impl/bindings/LDKErrorAction;
+ * Method:    LDKCResult_PublicKeyErrorZ_get_ok
+ * Signature: (J)[B
  */
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKErrorAction_1ref_1from_1ptr
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PublicKeyErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKHTLCFailChannelUpdate_ref_from_ptr
- * Signature: (J)Lorg/ldk/impl/bindings/LDKHTLCFailChannelUpdate;
+ * Method:    LDKCResult_PublicKeyErrorZ_get_err
+ * Signature: (J)Lorg/ldk/enums/LDKSecp256k1Error;
  */
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKHTLCFailChannelUpdate_1ref_1from_1ptr
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PublicKeyErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKMessageSendEvent_ref_from_ptr
- * Signature: (J)Lorg/ldk/impl/bindings/LDKMessageSendEvent;
+ * Method:    LDKCResult_TxCreationKeysDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKMessageSendEvent_1ref_1from_1ptr
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxCreationKeysDecodeErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCVec_MessageSendEventZ_new
- * Signature: ([J)J
+ * Method:    LDKCResult_TxCreationKeysDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1MessageSendEventZ_1new
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxCreationKeysDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKEvent_ref_from_ptr
- * Signature: (J)Lorg/ldk/impl/bindings/LDKEvent;
+ * Method:    LDKCResult_TxCreationKeysDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKEvent_1ref_1from_1ptr
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxCreationKeysDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCVec_EventZ_new
- * Signature: ([J)J
+ * Method:    LDKCResult_ChannelPublicKeysDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1EventZ_1new
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelPublicKeysDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_usizeTransactionZ_new
- * Signature: (J[B)J
+ * Method:    LDKCResult_ChannelPublicKeysDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1usizeTransactionZ_1new
-  (JNIEnv *, jclass, jlong, jbyteArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelPublicKeysDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_usizeTransactionZ_get_a
+ * Method:    LDKCResult_ChannelPublicKeysDecodeErrorZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1usizeTransactionZ_1get_1a
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelPublicKeysDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_usizeTransactionZ_get_b
- * Signature: (J)[B
+ * Method:    LDKCResult_TxCreationKeysErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1usizeTransactionZ_1get_1b
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxCreationKeysErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCVec_C2Tuple_usizeTransactionZZ_new
- * Signature: ([J)J
+ * Method:    LDKCResult_TxCreationKeysErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1usizeTransactionZZ_1new
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxCreationKeysErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NoneChannelMonitorUpdateErrZ_result_ok
- * Signature: (J)Z
+ * Method:    LDKCResult_TxCreationKeysErrorZ_get_err
+ * Signature: (J)Lorg/ldk/enums/LDKSecp256k1Error;
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneChannelMonitorUpdateErrZ_1result_1ok
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxCreationKeysErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NoneChannelMonitorUpdateErrZ_get_ok
- * Signature: (J)V
+ * Method:    LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneChannelMonitorUpdateErrZ_1get_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1HTLCOutputInCommitmentDecodeErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NoneChannelMonitorUpdateErrZ_get_err
- * Signature: (J)Lorg/ldk/enums/LDKChannelMonitorUpdateErr;
+ * Method:    LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneChannelMonitorUpdateErrZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1HTLCOutputInCommitmentDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCVec_MonitorEventZ_new
- * Signature: ([J)J
+ * Method:    LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1MonitorEventZ_1new
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1HTLCOutputInCommitmentDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_ChannelMonitorUpdateDecodeErrorZ_result_ok
+ * Method:    LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_result_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelMonitorUpdateDecodeErrorZ_1result_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CounterpartyChannelTransactionParametersDecodeErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_ok
+ * Method:    LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelMonitorUpdateDecodeErrorZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CounterpartyChannelTransactionParametersDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_err
+ * Method:    LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelMonitorUpdateDecodeErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CounterpartyChannelTransactionParametersDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NoneMonitorUpdateErrorZ_result_ok
+ * Method:    LDKCResult_ChannelTransactionParametersDecodeErrorZ_result_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneMonitorUpdateErrorZ_1result_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelTransactionParametersDecodeErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NoneMonitorUpdateErrorZ_get_ok
- * Signature: (J)V
+ * Method:    LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneMonitorUpdateErrorZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelTransactionParametersDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NoneMonitorUpdateErrorZ_get_err
+ * Method:    LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneMonitorUpdateErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelTransactionParametersDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_OutPointScriptZ_new
- * Signature: (J[B)J
+ * Method:    LDKCResult_HolderCommitmentTransactionDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1OutPointScriptZ_1new
-  (JNIEnv *, jclass, jlong, jbyteArray);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1HolderCommitmentTransactionDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_OutPointScriptZ_get_a
+ * Method:    LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1OutPointScriptZ_1get_1a
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1HolderCommitmentTransactionDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_OutPointScriptZ_get_b
- * Signature: (J)[B
+ * Method:    LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1OutPointScriptZ_1get_1b
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1HolderCommitmentTransactionDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_u32TxOutZ_new
- * Signature: (IJ)J
+ * Method:    LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32TxOutZ_1new
-  (JNIEnv *, jclass, jint, jlong);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1BuiltCommitmentTransactionDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_u32TxOutZ_get_a
- * Signature: (J)I
+ * Method:    LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32TxOutZ_1get_1a
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1BuiltCommitmentTransactionDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_u32TxOutZ_get_b
+ * Method:    LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32TxOutZ_1get_1b
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1BuiltCommitmentTransactionDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCVec_C2Tuple_u32TxOutZZ_new
- * Signature: ([J)J
+ * Method:    LDKCResult_CommitmentTransactionDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1u32TxOutZZ_1new
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CommitmentTransactionDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new
- * Signature: ([B[J)J
+ * Method:    LDKCResult_CommitmentTransactionDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1new
-  (JNIEnv *, jclass, jbyteArray, jlongArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CommitmentTransactionDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a
- * Signature: (J)[B
+ * Method:    LDKCResult_CommitmentTransactionDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1get_1a
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CommitmentTransactionDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b
- * Signature: (J)[J
+ * Method:    LDKCResult_TrustedCommitmentTransactionNoneZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1get_1b
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TrustedCommitmentTransactionNoneZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_new
- * Signature: ([J)J
+ * Method:    LDKCResult_TrustedCommitmentTransactionNoneZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZZ_1new
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TrustedCommitmentTransactionNoneZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_SignatureCVec_SignatureZZ_new
- * Signature: ([B[[B)J
+ * Method:    LDKCResult_TrustedCommitmentTransactionNoneZ_get_err
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1SignatureCVec_1SignatureZZ_1new
-  (JNIEnv *, jclass, jbyteArray, jobjectArray);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TrustedCommitmentTransactionNoneZ_1get_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_SignatureCVec_SignatureZZ_get_a
- * Signature: (J)[B
+ * Method:    LDKCResult_CVec_SignatureZNoneZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1SignatureCVec_1SignatureZZ_1get_1a
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1SignatureZNoneZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_SignatureCVec_SignatureZZ_get_b
+ * Method:    LDKCResult_CVec_SignatureZNoneZ_get_ok
  * Signature: (J)[[B
  */
-JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1SignatureCVec_1SignatureZZ_1get_1b
+JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1SignatureZNoneZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_result_ok
- * Signature: (J)Z
+ * Method:    LDKCResult_CVec_SignatureZNoneZ_get_err
+ * Signature: (J)V
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1result_1ok
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1SignatureZNoneZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok
- * Signature: (J)J
+ * Method:    LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1get_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1u8ZPeerHandleErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err
- * Signature: (J)V
+ * Method:    LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok
+ * Signature: (J)[B
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1get_1err
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1u8ZPeerHandleErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_SignatureNoneZ_result_ok
- * Signature: (J)Z
+ * Method:    LDKCResult_CVec_u8ZPeerHandleErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SignatureNoneZ_1result_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1u8ZPeerHandleErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_SignatureNoneZ_get_ok
- * Signature: (J)[B
+ * Method:    LDKCResult_NonePeerHandleErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SignatureNoneZ_1get_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NonePeerHandleErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_SignatureNoneZ_get_err
+ * Method:    LDKCResult_NonePeerHandleErrorZ_get_ok
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SignatureNoneZ_1get_1err
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NonePeerHandleErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKChannelKeys_new
- * Signature: (Lorg/ldk/impl/bindings/LDKChannelKeys;J)J
+ * Method:    LDKCResult_NonePeerHandleErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKChannelKeys_1new
-  (JNIEnv *, jclass, jobject, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NonePeerHandleErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelKeys_get_per_commitment_point
- * Signature: (JJ)[B
+ * Method:    LDKCResult_boolPeerHandleErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1get_1per_1commitment_1point
-  (JNIEnv *, jclass, jlong, jlong);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolPeerHandleErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelKeys_release_commitment_secret
- * Signature: (JJ)[B
+ * Method:    LDKCResult_boolPeerHandleErrorZ_get_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1release_1commitment_1secret
-  (JNIEnv *, jclass, jlong, jlong);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolPeerHandleErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelKeys_key_derivation_params
+ * Method:    LDKCResult_boolPeerHandleErrorZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1key_1derivation_1params
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolPeerHandleErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelKeys_sign_counterparty_commitment
- * Signature: (JJ)J
+ * Method:    LDKCResult_InitFeaturesDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1sign_1counterparty_1commitment
-  (JNIEnv *, jclass, jlong, jlong);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InitFeaturesDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelKeys_sign_holder_commitment_and_htlcs
- * Signature: (JJ)J
+ * Method:    LDKCResult_InitFeaturesDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1sign_1holder_1commitment_1and_1htlcs
-  (JNIEnv *, jclass, jlong, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InitFeaturesDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelKeys_sign_justice_transaction
- * Signature: (J[BJJ[BJ)J
+ * Method:    LDKCResult_InitFeaturesDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1sign_1justice_1transaction
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong, jlong, jbyteArray, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InitFeaturesDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelKeys_sign_counterparty_htlc_transaction
- * Signature: (J[BJJ[BJ)J
+ * Method:    LDKCResult_NodeFeaturesDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1sign_1counterparty_1htlc_1transaction
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong, jlong, jbyteArray, jlong);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeFeaturesDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelKeys_sign_closing_transaction
- * Signature: (J[B)J
+ * Method:    LDKCResult_NodeFeaturesDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1sign_1closing_1transaction
-  (JNIEnv *, jclass, jlong, jbyteArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeFeaturesDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelKeys_sign_channel_announcement
- * Signature: (JJ)J
+ * Method:    LDKCResult_NodeFeaturesDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1sign_1channel_1announcement
-  (JNIEnv *, jclass, jlong, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeFeaturesDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelKeys_ready_channel
- * Signature: (JJ)V
+ * Method:    LDKCResult_ChannelFeaturesDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1ready_1channel
-  (JNIEnv *, jclass, jlong, jlong);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelFeaturesDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelKeys_write
- * Signature: (J)[B
+ * Method:    LDKCResult_ChannelFeaturesDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1write
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelFeaturesDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelKeys_get_pubkeys
+ * Method:    LDKCResult_ChannelFeaturesDecodeErrorZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1get_1pubkeys
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelFeaturesDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_BlockHashChannelMonitorZ_new
- * Signature: ([BJ)J
+ * Method:    LDKCResult_ChannelConfigDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelMonitorZ_1new
-  (JNIEnv *, jclass, jbyteArray, jlong);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelConfigDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_BlockHashChannelMonitorZ_get_a
- * Signature: (J)[B
+ * Method:    LDKCResult_ChannelConfigDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelMonitorZ_1get_1a
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelConfigDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_BlockHashChannelMonitorZ_get_b
+ * Method:    LDKCResult_ChannelConfigDecodeErrorZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelMonitorZ_1get_1b
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelConfigDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_result_ok
+ * Method:    LDKCResult_boolLightningErrorZ_result_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1result_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolLightningErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok
- * Signature: (J)J
+ * Method:    LDKCResult_boolLightningErrorZ_get_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1get_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolLightningErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err
+ * Method:    LDKCResult_boolLightningErrorZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolLightningErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_SpendableOutputDescriptorDecodeErrorZ_result_ok
- * Signature: (J)Z
+ * Method:    LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new
+ * Signature: (JJJ)J
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SpendableOutputDescriptorDecodeErrorZ_1result_1ok
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1new
+  (JNIEnv *, jclass, jlong, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_ok
+ * Method:    LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SpendableOutputDescriptorDecodeErrorZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1a
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_err
+ * Method:    LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SpendableOutputDescriptorDecodeErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1b
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_ChanKeySignerDecodeErrorZ_result_ok
- * Signature: (J)Z
+ * Method:    LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c
+ * Signature: (J)J
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChanKeySignerDecodeErrorZ_1result_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1c
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_ChanKeySignerDecodeErrorZ_get_ok
- * Signature: (J)J
+ * Method:    LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new
+ * Signature: ([J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChanKeySignerDecodeErrorZ_1get_1ok
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZZ_1new
+  (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_ChanKeySignerDecodeErrorZ_get_err
- * Signature: (J)J
+ * Method:    LDKCVec_NodeAnnouncementZ_new
+ * Signature: ([J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChanKeySignerDecodeErrorZ_1get_1err
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1NodeAnnouncementZ_1new
+  (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_InMemoryChannelKeysDecodeErrorZ_result_ok
+ * Method:    LDKCResult_NoneLightningErrorZ_result_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InMemoryChannelKeysDecodeErrorZ_1result_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneLightningErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_InMemoryChannelKeysDecodeErrorZ_get_ok
- * Signature: (J)J
+ * Method:    LDKCResult_NoneLightningErrorZ_get_ok
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InMemoryChannelKeysDecodeErrorZ_1get_1ok
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneLightningErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_InMemoryChannelKeysDecodeErrorZ_get_err
+ * Method:    LDKCResult_NoneLightningErrorZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InMemoryChannelKeysDecodeErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneLightningErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_TxOutAccessErrorZ_result_ok
- * Signature: (J)Z
+ * Method:    LDKErrorAction_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKErrorAction;
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxOutAccessErrorZ_1result_1ok
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKErrorAction_1ref_1from_1ptr
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_TxOutAccessErrorZ_get_ok
- * Signature: (J)J
+ * Method:    LDKHTLCFailChannelUpdate_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKHTLCFailChannelUpdate;
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxOutAccessErrorZ_1get_1ok
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKHTLCFailChannelUpdate_1ref_1from_1ptr
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_TxOutAccessErrorZ_get_err
- * Signature: (J)Lorg/ldk/enums/LDKAccessError;
+ * Method:    LDKMessageSendEvent_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKMessageSendEvent;
  */
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxOutAccessErrorZ_1get_1err
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKMessageSendEvent_1ref_1from_1ptr
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKAPIError_ref_from_ptr
- * Signature: (J)Lorg/ldk/impl/bindings/LDKAPIError;
+ * Method:    LDKCVec_MessageSendEventZ_new
+ * Signature: ([J)J
  */
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKAPIError_1ref_1from_1ptr
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1MessageSendEventZ_1new
+  (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NoneAPIErrorZ_result_ok
+ * Method:    LDKCResult_DirectionalChannelInfoDecodeErrorZ_result_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneAPIErrorZ_1result_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1DirectionalChannelInfoDecodeErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NoneAPIErrorZ_get_ok
- * Signature: (J)V
+ * Method:    LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneAPIErrorZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1DirectionalChannelInfoDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NoneAPIErrorZ_get_err
+ * Method:    LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneAPIErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1DirectionalChannelInfoDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCVec_ChannelDetailsZ_new
- * Signature: ([J)J
+ * Method:    LDKCResult_ChannelInfoDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1ChannelDetailsZ_1new
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelInfoDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NonePaymentSendFailureZ_result_ok
+ * Method:    LDKCResult_ChannelInfoDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelInfoDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_ChannelInfoDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelInfoDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_RoutingFeesDecodeErrorZ_result_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NonePaymentSendFailureZ_1result_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RoutingFeesDecodeErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NonePaymentSendFailureZ_get_ok
- * Signature: (J)V
+ * Method:    LDKCResult_RoutingFeesDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NonePaymentSendFailureZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RoutingFeesDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NonePaymentSendFailureZ_get_err
+ * Method:    LDKCResult_RoutingFeesDecodeErrorZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NonePaymentSendFailureZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RoutingFeesDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -809,874 +817,954 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1NetAddressZ_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCVec_ChannelMonitorZ_new
- * Signature: ([J)J
+ * Method:    LDKCResult_NodeAnnouncementInfoDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1ChannelMonitorZ_1new
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeAnnouncementInfoDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKWatch_new
- * Signature: (Lorg/ldk/impl/bindings/LDKWatch;)J
+ * Method:    LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKWatch_1new
-  (JNIEnv *, jclass, jobject);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeAnnouncementInfoDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    Watch_watch_channel
- * Signature: (JJJ)J
+ * Method:    LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Watch_1watch_1channel
-  (JNIEnv *, jclass, jlong, jlong, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeAnnouncementInfoDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    Watch_update_channel
- * Signature: (JJJ)J
+ * Method:    LDKCVec_u64Z_new
+ * Signature: ([J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Watch_1update_1channel
-  (JNIEnv *, jclass, jlong, jlong, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1u64Z_1new
+  (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    Watch_release_pending_monitor_events
- * Signature: (J)[J
+ * Method:    LDKCResult_NodeInfoDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_Watch_1release_1pending_1monitor_1events
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeInfoDecodeErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKBroadcasterInterface_new
- * Signature: (Lorg/ldk/impl/bindings/LDKBroadcasterInterface;)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKBroadcasterInterface_1new
-  (JNIEnv *, jclass, jobject);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    BroadcasterInterface_broadcast_transaction
- * Signature: (J[B)V
+ * Method:    LDKCResult_NodeInfoDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BroadcasterInterface_1broadcast_1transaction
-  (JNIEnv *, jclass, jlong, jbyteArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeInfoDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKKeysInterface_new
- * Signature: (Lorg/ldk/impl/bindings/LDKKeysInterface;)J
+ * Method:    LDKCResult_NodeInfoDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKKeysInterface_1new
-  (JNIEnv *, jclass, jobject);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeInfoDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    KeysInterface_get_node_secret
- * Signature: (J)[B
+ * Method:    LDKCResult_NetworkGraphDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_KeysInterface_1get_1node_1secret
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NetworkGraphDecodeErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    KeysInterface_get_destination_script
- * Signature: (J)[B
+ * Method:    LDKCResult_NetworkGraphDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_KeysInterface_1get_1destination_1script
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NetworkGraphDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    KeysInterface_get_shutdown_pubkey
- * Signature: (J)[B
+ * Method:    LDKCResult_NetworkGraphDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_KeysInterface_1get_1shutdown_1pubkey
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NetworkGraphDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    KeysInterface_get_channel_keys
- * Signature: (JZJ)J
+ * Method:    LDKC2Tuple_usizeTransactionZ_new
+ * Signature: (J[B)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_KeysInterface_1get_1channel_1keys
-  (JNIEnv *, jclass, jlong, jboolean, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1usizeTransactionZ_1new
+  (JNIEnv *, jclass, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    KeysInterface_get_secure_random_bytes
+ * Method:    LDKC2Tuple_usizeTransactionZ_get_a
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1usizeTransactionZ_1get_1a
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKC2Tuple_usizeTransactionZ_get_b
  * Signature: (J)[B
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_KeysInterface_1get_1secure_1random_1bytes
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1usizeTransactionZ_1get_1b
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    KeysInterface_read_chan_signer
- * Signature: (J[B)J
+ * Method:    LDKCVec_C2Tuple_usizeTransactionZZ_new
+ * Signature: ([J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_KeysInterface_1read_1chan_1signer
-  (JNIEnv *, jclass, jlong, jbyteArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1usizeTransactionZZ_1new
+  (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKFeeEstimator_new
- * Signature: (Lorg/ldk/impl/bindings/LDKFeeEstimator;)J
+ * Method:    LDKCResult_NoneChannelMonitorUpdateErrZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKFeeEstimator_1new
-  (JNIEnv *, jclass, jobject);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneChannelMonitorUpdateErrZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    FeeEstimator_get_est_sat_per_1000_weight
- * Signature: (JLorg/ldk/enums/LDKConfirmationTarget;)I
+ * Method:    LDKCResult_NoneChannelMonitorUpdateErrZ_get_ok
+ * Signature: (J)V
  */
-JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_FeeEstimator_1get_1est_1sat_1per_11000_1weight
-  (JNIEnv *, jclass, jlong, jobject);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneChannelMonitorUpdateErrZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKLogger_new
- * Signature: (Lorg/ldk/impl/bindings/LDKLogger;)J
+ * Method:    LDKCResult_NoneChannelMonitorUpdateErrZ_get_err
+ * Signature: (J)Lorg/ldk/enums/LDKChannelMonitorUpdateErr;
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKLogger_1new
-  (JNIEnv *, jclass, jobject);
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneChannelMonitorUpdateErrZ_1get_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_BlockHashChannelManagerZ_new
- * Signature: ([BJ)J
+ * Method:    LDKCVec_MonitorEventZ_new
+ * Signature: ([J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelManagerZ_1new
-  (JNIEnv *, jclass, jbyteArray, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1MonitorEventZ_1new
+  (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_BlockHashChannelManagerZ_get_a
- * Signature: (J)[B
+ * Method:    LDKC2Tuple_u64u64Z_new
+ * Signature: (JJ)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelManagerZ_1get_1a
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u64u64Z_1new
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_BlockHashChannelManagerZ_get_b
+ * Method:    LDKC2Tuple_u64u64Z_get_a
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelManagerZ_1get_1b
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u64u64Z_1get_1a
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_result_ok
- * Signature: (J)Z
+ * Method:    LDKC2Tuple_u64u64Z_get_b
+ * Signature: (J)J
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1result_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u64u64Z_1get_1b
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok
- * Signature: (J)J
+ * Method:    LDKSpendableOutputDescriptor_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKSpendableOutputDescriptor;
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1get_1ok
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKSpendableOutputDescriptor_1ref_1from_1ptr
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err
- * Signature: (J)J
+ * Method:    LDKCVec_SpendableOutputDescriptorZ_new
+ * Signature: ([J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1SpendableOutputDescriptorZ_1new
+  (JNIEnv *, jclass, jlongArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKEvent_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKEvent;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKEvent_1ref_1from_1ptr
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NetAddressu8Z_result_ok
+ * Method:    LDKCVec_EventZ_new
+ * Signature: ([J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1EventZ_1new
+  (JNIEnv *, jclass, jlongArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_OutPointDecodeErrorZ_result_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NetAddressu8Z_1result_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1OutPointDecodeErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NetAddressu8Z_get_ok
+ * Method:    LDKCResult_OutPointDecodeErrorZ_get_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NetAddressu8Z_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1OutPointDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NetAddressu8Z_get_err
- * Signature: (J)B
+ * Method:    LDKCResult_OutPointDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT jbyte JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NetAddressu8Z_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1OutPointDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_result_ok
+ * Method:    LDKCResult_ChannelMonitorUpdateDecodeErrorZ_result_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CResult_1NetAddressu8ZDecodeErrorZ_1result_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelMonitorUpdateDecodeErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_ok
+ * Method:    LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CResult_1NetAddressu8ZDecodeErrorZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelMonitorUpdateDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_err
+ * Method:    LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CResult_1NetAddressu8ZDecodeErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelMonitorUpdateDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCVec_u64Z_new
- * Signature: ([J)J
+ * Method:    LDKCResult_HTLCUpdateDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1u64Z_1new
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1HTLCUpdateDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCVec_UpdateAddHTLCZ_new
- * Signature: ([J)J
+ * Method:    LDKCResult_HTLCUpdateDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1UpdateAddHTLCZ_1new
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1HTLCUpdateDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCVec_UpdateFulfillHTLCZ_new
- * Signature: ([J)J
+ * Method:    LDKCResult_HTLCUpdateDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1UpdateFulfillHTLCZ_1new
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1HTLCUpdateDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCVec_UpdateFailHTLCZ_new
- * Signature: ([J)J
+ * Method:    LDKCResult_NoneMonitorUpdateErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1UpdateFailHTLCZ_1new
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneMonitorUpdateErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCVec_UpdateFailMalformedHTLCZ_new
- * Signature: ([J)J
+ * Method:    LDKCResult_NoneMonitorUpdateErrorZ_get_ok
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1UpdateFailMalformedHTLCZ_1new
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneMonitorUpdateErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_boolLightningErrorZ_result_ok
- * Signature: (J)Z
+ * Method:    LDKCResult_NoneMonitorUpdateErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolLightningErrorZ_1result_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneMonitorUpdateErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_boolLightningErrorZ_get_ok
- * Signature: (J)Z
+ * Method:    LDKC2Tuple_OutPointScriptZ_new
+ * Signature: (J[B)J
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolLightningErrorZ_1get_1ok
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1OutPointScriptZ_1new
+  (JNIEnv *, jclass, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_boolLightningErrorZ_get_err
+ * Method:    LDKC2Tuple_OutPointScriptZ_get_a
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolLightningErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1OutPointScriptZ_1get_1a
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new
- * Signature: (JJJ)J
+ * Method:    LDKC2Tuple_OutPointScriptZ_get_b
+ * Signature: (J)[B
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1new
-  (JNIEnv *, jclass, jlong, jlong, jlong);
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1OutPointScriptZ_1get_1b
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a
- * Signature: (J)J
+ * Method:    LDKC2Tuple_u32TxOutZ_new
+ * Signature: (IJ)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1a
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32TxOutZ_1new
+  (JNIEnv *, jclass, jint, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b
- * Signature: (J)J
+ * Method:    LDKC2Tuple_u32TxOutZ_get_a
+ * Signature: (J)I
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1b
+JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32TxOutZ_1get_1a
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c
+ * Method:    LDKC2Tuple_u32TxOutZ_get_b
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1c
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32TxOutZ_1get_1b
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new
+ * Method:    LDKCVec_C2Tuple_u32TxOutZZ_new
  * Signature: ([J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZZ_1new
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1u32TxOutZZ_1new
   (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCVec_NodeAnnouncementZ_new
- * Signature: ([J)J
+ * Method:    LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new
+ * Signature: ([B[J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1NodeAnnouncementZ_1new
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1new
+  (JNIEnv *, jclass, jbyteArray, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NoneLightningErrorZ_result_ok
- * Signature: (J)Z
+ * Method:    LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a
+ * Signature: (J)[B
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneLightningErrorZ_1result_1ok
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1get_1a
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NoneLightningErrorZ_get_ok
- * Signature: (J)V
+ * Method:    LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b
+ * Signature: (J)[J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneLightningErrorZ_1get_1ok
+JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1get_1b
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NoneLightningErrorZ_get_err
- * Signature: (J)J
+ * Method:    LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_new
+ * Signature: ([J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneLightningErrorZ_1get_1err
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZZ_1new
+  (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_ChannelReestablishDecodeErrorZ_result_ok
- * Signature: (J)Z
+ * Method:    LDKC2Tuple_SignatureCVec_SignatureZZ_new
+ * Signature: ([B[[B)J
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelReestablishDecodeErrorZ_1result_1ok
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1SignatureCVec_1SignatureZZ_1new
+  (JNIEnv *, jclass, jbyteArray, jobjectArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_ChannelReestablishDecodeErrorZ_get_ok
- * Signature: (J)J
+ * Method:    LDKC2Tuple_SignatureCVec_SignatureZZ_get_a
+ * Signature: (J)[B
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelReestablishDecodeErrorZ_1get_1ok
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1SignatureCVec_1SignatureZZ_1get_1a
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_ChannelReestablishDecodeErrorZ_get_err
- * Signature: (J)J
+ * Method:    LDKC2Tuple_SignatureCVec_SignatureZZ_get_b
+ * Signature: (J)[[B
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelReestablishDecodeErrorZ_1get_1err
+JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1SignatureCVec_1SignatureZZ_1get_1b
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_InitDecodeErrorZ_result_ok
+ * Method:    LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_result_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InitDecodeErrorZ_1result_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_InitDecodeErrorZ_get_ok
+ * Method:    LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InitDecodeErrorZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_InitDecodeErrorZ_get_err
- * Signature: (J)J
+ * Method:    LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InitDecodeErrorZ_1get_1err
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_PingDecodeErrorZ_result_ok
+ * Method:    LDKCResult_SignatureNoneZ_result_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PingDecodeErrorZ_1result_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SignatureNoneZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_PingDecodeErrorZ_get_ok
- * Signature: (J)J
+ * Method:    LDKCResult_SignatureNoneZ_get_ok
+ * Signature: (J)[B
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PingDecodeErrorZ_1get_1ok
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SignatureNoneZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_PingDecodeErrorZ_get_err
- * Signature: (J)J
+ * Method:    LDKCResult_SignatureNoneZ_get_err
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PingDecodeErrorZ_1get_1err
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SignatureNoneZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_PongDecodeErrorZ_result_ok
- * Signature: (J)Z
+ * Method:    LDKChannelKeys_new
+ * Signature: (Lorg/ldk/impl/bindings/LDKChannelKeys;J)J
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PongDecodeErrorZ_1result_1ok
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKChannelKeys_1new
+  (JNIEnv *, jclass, jobject, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_PongDecodeErrorZ_get_ok
- * Signature: (J)J
+ * Method:    ChannelKeys_get_per_commitment_point
+ * Signature: (JJ)[B
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PongDecodeErrorZ_1get_1ok
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1get_1per_1commitment_1point
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_PongDecodeErrorZ_get_err
+ * Method:    ChannelKeys_release_commitment_secret
+ * Signature: (JJ)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1release_1commitment_1secret
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelKeys_key_derivation_params
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PongDecodeErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1key_1derivation_1params
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_result_ok
- * Signature: (J)Z
+ * Method:    ChannelKeys_sign_counterparty_commitment
+ * Signature: (JJ)J
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelAnnouncementDecodeErrorZ_1result_1ok
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1sign_1counterparty_1commitment
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok
- * Signature: (J)J
+ * Method:    ChannelKeys_sign_holder_commitment_and_htlcs
+ * Signature: (JJ)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelAnnouncementDecodeErrorZ_1get_1ok
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1sign_1holder_1commitment_1and_1htlcs
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err
- * Signature: (J)J
+ * Method:    ChannelKeys_sign_justice_transaction
+ * Signature: (J[BJJ[BJ)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelAnnouncementDecodeErrorZ_1get_1err
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1sign_1justice_1transaction
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong, jlong, jbyteArray, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_UnsignedChannelUpdateDecodeErrorZ_result_ok
- * Signature: (J)Z
+ * Method:    ChannelKeys_sign_counterparty_htlc_transaction
+ * Signature: (J[BJJ[BJ)J
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelUpdateDecodeErrorZ_1result_1ok
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1sign_1counterparty_1htlc_1transaction
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong, jlong, jbyteArray, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_ok
- * Signature: (J)J
+ * Method:    ChannelKeys_sign_closing_transaction
+ * Signature: (J[B)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelUpdateDecodeErrorZ_1get_1ok
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1sign_1closing_1transaction
+  (JNIEnv *, jclass, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_err
- * Signature: (J)J
+ * Method:    ChannelKeys_sign_channel_announcement
+ * Signature: (JJ)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelUpdateDecodeErrorZ_1get_1err
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1sign_1channel_1announcement
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_ErrorMessageDecodeErrorZ_result_ok
- * Signature: (J)Z
+ * Method:    ChannelKeys_ready_channel
+ * Signature: (JJ)V
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ErrorMessageDecodeErrorZ_1result_1ok
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1ready_1channel
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_ErrorMessageDecodeErrorZ_get_ok
- * Signature: (J)J
+ * Method:    ChannelKeys_write
+ * Signature: (J)[B
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ErrorMessageDecodeErrorZ_1get_1ok
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1write
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_ErrorMessageDecodeErrorZ_get_err
+ * Method:    ChannelKeys_get_pubkeys
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ErrorMessageDecodeErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1get_1pubkeys
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_result_ok
- * Signature: (J)Z
+ * Method:    LDKC2Tuple_BlockHashChannelMonitorZ_new
+ * Signature: ([BJ)J
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedNodeAnnouncementDecodeErrorZ_1result_1ok
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelMonitorZ_1new
+  (JNIEnv *, jclass, jbyteArray, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok
- * Signature: (J)J
+ * Method:    LDKC2Tuple_BlockHashChannelMonitorZ_get_a
+ * Signature: (J)[B
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedNodeAnnouncementDecodeErrorZ_1get_1ok
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelMonitorZ_1get_1a
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err
+ * Method:    LDKC2Tuple_BlockHashChannelMonitorZ_get_b
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedNodeAnnouncementDecodeErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelMonitorZ_1get_1b
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_QueryShortChannelIdsDecodeErrorZ_result_ok
+ * Method:    LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_result_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryShortChannelIdsDecodeErrorZ_1result_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_ok
+ * Method:    LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryShortChannelIdsDecodeErrorZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_err
+ * Method:    LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryShortChannelIdsDecodeErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_result_ok
+ * Method:    LDKCResult_TxOutAccessErrorZ_result_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyShortChannelIdsEndDecodeErrorZ_1result_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxOutAccessErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok
+ * Method:    LDKCResult_TxOutAccessErrorZ_get_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyShortChannelIdsEndDecodeErrorZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxOutAccessErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err
- * Signature: (J)J
+ * Method:    LDKCResult_TxOutAccessErrorZ_get_err
+ * Signature: (J)Lorg/ldk/enums/LDKAccessError;
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyShortChannelIdsEndDecodeErrorZ_1get_1err
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxOutAccessErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_QueryChannelRangeDecodeErrorZ_result_ok
- * Signature: (J)Z
+ * Method:    LDKAPIError_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKAPIError;
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryChannelRangeDecodeErrorZ_1result_1ok
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKAPIError_1ref_1from_1ptr
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_QueryChannelRangeDecodeErrorZ_get_ok
- * Signature: (J)J
+ * Method:    LDKCResult_NoneAPIErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryChannelRangeDecodeErrorZ_1get_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneAPIErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_QueryChannelRangeDecodeErrorZ_get_err
- * Signature: (J)J
+ * Method:    LDKCResult_NoneAPIErrorZ_get_ok
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryChannelRangeDecodeErrorZ_1get_1err
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneAPIErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_ReplyChannelRangeDecodeErrorZ_result_ok
- * Signature: (J)Z
+ * Method:    LDKCResult_NoneAPIErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyChannelRangeDecodeErrorZ_1result_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneAPIErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_ReplyChannelRangeDecodeErrorZ_get_ok
- * Signature: (J)J
+ * Method:    LDKCVec_ChannelDetailsZ_new
+ * Signature: ([J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyChannelRangeDecodeErrorZ_1get_1ok
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1ChannelDetailsZ_1new
+  (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_ReplyChannelRangeDecodeErrorZ_get_err
- * Signature: (J)J
+ * Method:    LDKCResult_NonePaymentSendFailureZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyChannelRangeDecodeErrorZ_1get_1err
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NonePaymentSendFailureZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_GossipTimestampFilterDecodeErrorZ_result_ok
- * Signature: (J)Z
+ * Method:    LDKCResult_NonePaymentSendFailureZ_get_ok
+ * Signature: (J)V
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1GossipTimestampFilterDecodeErrorZ_1result_1ok
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NonePaymentSendFailureZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_GossipTimestampFilterDecodeErrorZ_get_ok
+ * Method:    LDKCResult_NonePaymentSendFailureZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1GossipTimestampFilterDecodeErrorZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NonePaymentSendFailureZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_GossipTimestampFilterDecodeErrorZ_get_err
- * Signature: (J)J
+ * Method:    LDKCVec_ChannelMonitorZ_new
+ * Signature: ([J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1GossipTimestampFilterDecodeErrorZ_1get_1err
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1ChannelMonitorZ_1new
+  (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok
- * Signature: (J)Z
+ * Method:    LDKWatch_new
+ * Signature: (Lorg/ldk/impl/bindings/LDKWatch;)J
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1u8ZPeerHandleErrorZ_1result_1ok
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKWatch_1new
+  (JNIEnv *, jclass, jobject);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok
- * Signature: (J)[B
+ * Method:    Watch_watch_channel
+ * Signature: (JJJ)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1u8ZPeerHandleErrorZ_1get_1ok
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Watch_1watch_1channel
+  (JNIEnv *, jclass, jlong, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_CVec_u8ZPeerHandleErrorZ_get_err
- * Signature: (J)J
+ * Method:    Watch_update_channel
+ * Signature: (JJJ)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1u8ZPeerHandleErrorZ_1get_1err
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Watch_1update_1channel
+  (JNIEnv *, jclass, jlong, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NonePeerHandleErrorZ_result_ok
- * Signature: (J)Z
+ * Method:    Watch_release_pending_monitor_events
+ * Signature: (J)[J
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NonePeerHandleErrorZ_1result_1ok
+JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_Watch_1release_1pending_1monitor_1events
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NonePeerHandleErrorZ_get_ok
- * Signature: (J)V
+ * Method:    LDKBroadcasterInterface_new
+ * Signature: (Lorg/ldk/impl/bindings/LDKBroadcasterInterface;)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NonePeerHandleErrorZ_1get_1ok
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKBroadcasterInterface_1new
+  (JNIEnv *, jclass, jobject);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NonePeerHandleErrorZ_get_err
- * Signature: (J)J
+ * Method:    BroadcasterInterface_broadcast_transaction
+ * Signature: (J[B)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NonePeerHandleErrorZ_1get_1err
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BroadcasterInterface_1broadcast_1transaction
+  (JNIEnv *, jclass, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_boolPeerHandleErrorZ_result_ok
+ * Method:    LDKCResult_ChannelKeysDecodeErrorZ_result_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolPeerHandleErrorZ_1result_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelKeysDecodeErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_boolPeerHandleErrorZ_get_ok
- * Signature: (J)Z
+ * Method:    LDKCResult_ChannelKeysDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolPeerHandleErrorZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelKeysDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_boolPeerHandleErrorZ_get_err
+ * Method:    LDKCResult_ChannelKeysDecodeErrorZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolPeerHandleErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelKeysDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_SecretKeySecpErrorZ_result_ok
- * Signature: (J)Z
+ * Method:    LDKKeysInterface_new
+ * Signature: (Lorg/ldk/impl/bindings/LDKKeysInterface;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKKeysInterface_1new
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    KeysInterface_get_node_secret
+ * Signature: (J)[B
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SecretKeySecpErrorZ_1result_1ok
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_KeysInterface_1get_1node_1secret
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_SecretKeySecpErrorZ_get_ok
+ * Method:    KeysInterface_get_destination_script
  * Signature: (J)[B
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SecretKeySecpErrorZ_1get_1ok
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_KeysInterface_1get_1destination_1script
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_SecretKeySecpErrorZ_get_err
- * Signature: (J)Lorg/ldk/enums/LDKSecp256k1Error;
+ * Method:    KeysInterface_get_shutdown_pubkey
+ * Signature: (J)[B
  */
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SecretKeySecpErrorZ_1get_1err
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_KeysInterface_1get_1shutdown_1pubkey
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_PublicKeySecpErrorZ_result_ok
- * Signature: (J)Z
+ * Method:    KeysInterface_get_channel_keys
+ * Signature: (JZJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_KeysInterface_1get_1channel_1keys
+  (JNIEnv *, jclass, jlong, jboolean, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    KeysInterface_get_secure_random_bytes
+ * Signature: (J)[B
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PublicKeySecpErrorZ_1result_1ok
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_KeysInterface_1get_1secure_1random_1bytes
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_PublicKeySecpErrorZ_get_ok
+ * Method:    KeysInterface_read_chan_signer
+ * Signature: (J[B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_KeysInterface_1read_1chan_1signer
+  (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKFeeEstimator_new
+ * Signature: (Lorg/ldk/impl/bindings/LDKFeeEstimator;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKFeeEstimator_1new
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    FeeEstimator_get_est_sat_per_1000_weight
+ * Signature: (JLorg/ldk/enums/LDKConfirmationTarget;)I
+ */
+JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_FeeEstimator_1get_1est_1sat_1per_11000_1weight
+  (JNIEnv *, jclass, jlong, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKLogger_new
+ * Signature: (Lorg/ldk/impl/bindings/LDKLogger;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKLogger_1new
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKC2Tuple_BlockHashChannelManagerZ_new
+ * Signature: ([BJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelManagerZ_1new
+  (JNIEnv *, jclass, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKC2Tuple_BlockHashChannelManagerZ_get_a
  * Signature: (J)[B
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PublicKeySecpErrorZ_1get_1ok
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelManagerZ_1get_1a
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_PublicKeySecpErrorZ_get_err
- * Signature: (J)Lorg/ldk/enums/LDKSecp256k1Error;
+ * Method:    LDKC2Tuple_BlockHashChannelManagerZ_get_b
+ * Signature: (J)J
  */
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PublicKeySecpErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelManagerZ_1get_1b
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_TxCreationKeysSecpErrorZ_result_ok
+ * Method:    LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_result_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxCreationKeysSecpErrorZ_1result_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_TxCreationKeysSecpErrorZ_get_ok
+ * Method:    LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxCreationKeysSecpErrorZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_TxCreationKeysSecpErrorZ_get_err
- * Signature: (J)Lorg/ldk/enums/LDKSecp256k1Error;
+ * Method:    LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxCreationKeysSecpErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_TrustedCommitmentTransactionNoneZ_result_ok
+ * Method:    LDKCResult_SpendableOutputDescriptorDecodeErrorZ_result_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TrustedCommitmentTransactionNoneZ_1result_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SpendableOutputDescriptorDecodeErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_TrustedCommitmentTransactionNoneZ_get_ok
+ * Method:    LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TrustedCommitmentTransactionNoneZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SpendableOutputDescriptorDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_TrustedCommitmentTransactionNoneZ_get_err
- * Signature: (J)V
+ * Method:    LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TrustedCommitmentTransactionNoneZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SpendableOutputDescriptorDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_CVec_SignatureZNoneZ_result_ok
+ * Method:    LDKCResult_InMemoryChannelKeysDecodeErrorZ_result_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1SignatureZNoneZ_1result_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InMemoryChannelKeysDecodeErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_CVec_SignatureZNoneZ_get_ok
- * Signature: (J)[[B
+ * Method:    LDKCResult_InMemoryChannelKeysDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1SignatureZNoneZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InMemoryChannelKeysDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_CVec_SignatureZNoneZ_get_err
- * Signature: (J)V
+ * Method:    LDKCResult_InMemoryChannelKeysDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1SignatureZNoneZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InMemoryChannelKeysDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -1745,770 +1833,2634 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RouteLightningErr
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_RoutingFeesDecodeErrorZ_result_ok
+ * Method:    LDKCResult_NetAddressu8Z_result_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RoutingFeesDecodeErrorZ_1result_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NetAddressu8Z_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_RoutingFeesDecodeErrorZ_get_ok
+ * Method:    LDKCResult_NetAddressu8Z_get_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RoutingFeesDecodeErrorZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NetAddressu8Z_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_RoutingFeesDecodeErrorZ_get_err
- * Signature: (J)J
+ * Method:    LDKCResult_NetAddressu8Z_get_err
+ * Signature: (J)B
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RoutingFeesDecodeErrorZ_1get_1err
+JNIEXPORT jbyte JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NetAddressu8Z_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NodeAnnouncementInfoDecodeErrorZ_result_ok
+ * Method:    LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_result_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeAnnouncementInfoDecodeErrorZ_1result_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CResult_1NetAddressu8ZDecodeErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_ok
+ * Method:    LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeAnnouncementInfoDecodeErrorZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CResult_1NetAddressu8ZDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_err
+ * Method:    LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeAnnouncementInfoDecodeErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CResult_1NetAddressu8ZDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NodeInfoDecodeErrorZ_result_ok
+ * Method:    LDKCVec_UpdateAddHTLCZ_new
+ * Signature: ([J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1UpdateAddHTLCZ_1new
+  (JNIEnv *, jclass, jlongArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCVec_UpdateFulfillHTLCZ_new
+ * Signature: ([J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1UpdateFulfillHTLCZ_1new
+  (JNIEnv *, jclass, jlongArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCVec_UpdateFailHTLCZ_new
+ * Signature: ([J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1UpdateFailHTLCZ_1new
+  (JNIEnv *, jclass, jlongArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCVec_UpdateFailMalformedHTLCZ_new
+ * Signature: ([J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1UpdateFailMalformedHTLCZ_1new
+  (JNIEnv *, jclass, jlongArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_AcceptChannelDecodeErrorZ_result_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeInfoDecodeErrorZ_1result_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1AcceptChannelDecodeErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NodeInfoDecodeErrorZ_get_ok
+ * Method:    LDKCResult_AcceptChannelDecodeErrorZ_get_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeInfoDecodeErrorZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1AcceptChannelDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NodeInfoDecodeErrorZ_get_err
+ * Method:    LDKCResult_AcceptChannelDecodeErrorZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeInfoDecodeErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1AcceptChannelDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NetworkGraphDecodeErrorZ_result_ok
+ * Method:    LDKCResult_AnnouncementSignaturesDecodeErrorZ_result_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NetworkGraphDecodeErrorZ_1result_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1AnnouncementSignaturesDecodeErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NetworkGraphDecodeErrorZ_get_ok
+ * Method:    LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NetworkGraphDecodeErrorZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1AnnouncementSignaturesDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NetworkGraphDecodeErrorZ_get_err
+ * Method:    LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NetworkGraphDecodeErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1AnnouncementSignaturesDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKMessageSendEventsProvider_new
- * Signature: (Lorg/ldk/impl/bindings/LDKMessageSendEventsProvider;)J
+ * Method:    LDKCResult_ChannelReestablishDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKMessageSendEventsProvider_1new
-  (JNIEnv *, jclass, jobject);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelReestablishDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    MessageSendEventsProvider_get_and_clear_pending_msg_events
- * Signature: (J)[J
+ * Method:    LDKCResult_ChannelReestablishDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_MessageSendEventsProvider_1get_1and_1clear_1pending_1msg_1events
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelReestablishDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKEventsProvider_new
- * Signature: (Lorg/ldk/impl/bindings/LDKEventsProvider;)J
+ * Method:    LDKCResult_ChannelReestablishDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKEventsProvider_1new
-  (JNIEnv *, jclass, jobject);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelReestablishDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    EventsProvider_get_and_clear_pending_events
- * Signature: (J)[J
+ * Method:    LDKCResult_ClosingSignedDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_EventsProvider_1get_1and_1clear_1pending_1events
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ClosingSignedDecodeErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKAccess_new
- * Signature: (Lorg/ldk/impl/bindings/LDKAccess;)J
+ * Method:    LDKCResult_ClosingSignedDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKAccess_1new
-  (JNIEnv *, jclass, jobject);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ClosingSignedDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    Access_get_utxo
- * Signature: (J[BJ)J
+ * Method:    LDKCResult_ClosingSignedDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Access_1get_1utxo
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ClosingSignedDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKFilter_new
- * Signature: (Lorg/ldk/impl/bindings/LDKFilter;)J
+ * Method:    LDKCResult_CommitmentSignedDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKFilter_1new
-  (JNIEnv *, jclass, jobject);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CommitmentSignedDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    Filter_register_tx
- * Signature: (J[B[B)V
+ * Method:    LDKCResult_CommitmentSignedDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Filter_1register_1tx
-  (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CommitmentSignedDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    Filter_register_output
- * Signature: (JJ[B)V
+ * Method:    LDKCResult_CommitmentSignedDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Filter_1register_1output
-  (JNIEnv *, jclass, jlong, jlong, jbyteArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CommitmentSignedDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKPersist_new
- * Signature: (Lorg/ldk/impl/bindings/LDKPersist;)J
+ * Method:    LDKCResult_FundingCreatedDecodeErrorZ_result_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1FundingCreatedDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_FundingCreatedDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1FundingCreatedDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_FundingCreatedDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1FundingCreatedDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_FundingSignedDecodeErrorZ_result_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1FundingSignedDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_FundingSignedDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1FundingSignedDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_FundingSignedDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1FundingSignedDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_FundingLockedDecodeErrorZ_result_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1FundingLockedDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_FundingLockedDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1FundingLockedDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_FundingLockedDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1FundingLockedDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_InitDecodeErrorZ_result_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InitDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_InitDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InitDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_InitDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InitDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_OpenChannelDecodeErrorZ_result_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1OpenChannelDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_OpenChannelDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1OpenChannelDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_OpenChannelDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1OpenChannelDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_RevokeAndACKDecodeErrorZ_result_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RevokeAndACKDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_RevokeAndACKDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RevokeAndACKDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_RevokeAndACKDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RevokeAndACKDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_ShutdownDecodeErrorZ_result_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ShutdownDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_ShutdownDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ShutdownDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_ShutdownDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ShutdownDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_UpdateFailHTLCDecodeErrorZ_result_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFailHTLCDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_UpdateFailHTLCDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFailHTLCDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_UpdateFailHTLCDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFailHTLCDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_result_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFailMalformedHTLCDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFailMalformedHTLCDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFailMalformedHTLCDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_UpdateFeeDecodeErrorZ_result_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFeeDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_UpdateFeeDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFeeDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_UpdateFeeDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFeeDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_UpdateFulfillHTLCDecodeErrorZ_result_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFulfillHTLCDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFulfillHTLCDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFulfillHTLCDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_UpdateAddHTLCDecodeErrorZ_result_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateAddHTLCDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_UpdateAddHTLCDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateAddHTLCDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_UpdateAddHTLCDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateAddHTLCDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_PingDecodeErrorZ_result_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PingDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_PingDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PingDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_PingDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PingDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_PongDecodeErrorZ_result_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PongDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_PongDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PongDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_PongDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PongDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_result_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelAnnouncementDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelAnnouncementDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelAnnouncementDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_ChannelAnnouncementDecodeErrorZ_result_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelAnnouncementDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_ChannelAnnouncementDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelAnnouncementDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_ChannelAnnouncementDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelAnnouncementDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_UnsignedChannelUpdateDecodeErrorZ_result_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelUpdateDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelUpdateDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelUpdateDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_ChannelUpdateDecodeErrorZ_result_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelUpdateDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_ChannelUpdateDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelUpdateDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_ChannelUpdateDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelUpdateDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_ErrorMessageDecodeErrorZ_result_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ErrorMessageDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_ErrorMessageDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ErrorMessageDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_ErrorMessageDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ErrorMessageDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_result_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedNodeAnnouncementDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedNodeAnnouncementDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedNodeAnnouncementDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_NodeAnnouncementDecodeErrorZ_result_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeAnnouncementDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_NodeAnnouncementDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeAnnouncementDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_NodeAnnouncementDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeAnnouncementDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_QueryShortChannelIdsDecodeErrorZ_result_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryShortChannelIdsDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryShortChannelIdsDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryShortChannelIdsDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_result_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyShortChannelIdsEndDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyShortChannelIdsEndDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyShortChannelIdsEndDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_QueryChannelRangeDecodeErrorZ_result_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryChannelRangeDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_QueryChannelRangeDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryChannelRangeDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_QueryChannelRangeDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryChannelRangeDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_ReplyChannelRangeDecodeErrorZ_result_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyChannelRangeDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_ReplyChannelRangeDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyChannelRangeDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_ReplyChannelRangeDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyChannelRangeDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_GossipTimestampFilterDecodeErrorZ_result_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1GossipTimestampFilterDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_GossipTimestampFilterDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1GossipTimestampFilterDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_GossipTimestampFilterDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1GossipTimestampFilterDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKMessageSendEventsProvider_new
+ * Signature: (Lorg/ldk/impl/bindings/LDKMessageSendEventsProvider;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKMessageSendEventsProvider_1new
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    MessageSendEventsProvider_get_and_clear_pending_msg_events
+ * Signature: (J)[J
+ */
+JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_MessageSendEventsProvider_1get_1and_1clear_1pending_1msg_1events
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKEventsProvider_new
+ * Signature: (Lorg/ldk/impl/bindings/LDKEventsProvider;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKEventsProvider_1new
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    EventsProvider_get_and_clear_pending_events
+ * Signature: (J)[J
+ */
+JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_EventsProvider_1get_1and_1clear_1pending_1events
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKAccess_new
+ * Signature: (Lorg/ldk/impl/bindings/LDKAccess;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKAccess_1new
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Access_get_utxo
+ * Signature: (J[BJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Access_1get_1utxo
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKFilter_new
+ * Signature: (Lorg/ldk/impl/bindings/LDKFilter;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKFilter_1new
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Filter_register_tx
+ * Signature: (J[B[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Filter_1register_1tx
+  (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Filter_register_output
+ * Signature: (JJ[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Filter_1register_1output
+  (JNIEnv *, jclass, jlong, jlong, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKPersist_new
+ * Signature: (Lorg/ldk/impl/bindings/LDKPersist;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKPersist_1new
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Persist_persist_new_channel
+ * Signature: (JJJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Persist_1persist_1new_1channel
+  (JNIEnv *, jclass, jlong, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Persist_update_persisted_channel
+ * Signature: (JJJJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Persist_1update_1persisted_1channel
+  (JNIEnv *, jclass, jlong, jlong, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKChannelMessageHandler_new
+ * Signature: (Lorg/ldk/impl/bindings/LDKChannelMessageHandler;Lorg/ldk/impl/bindings/LDKMessageSendEventsProvider;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKChannelMessageHandler_1new
+  (JNIEnv *, jclass, jobject, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMessageHandler_handle_open_channel
+ * Signature: (J[BJJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1open_1channel
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMessageHandler_handle_accept_channel
+ * Signature: (J[BJJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1accept_1channel
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMessageHandler_handle_funding_created
+ * Signature: (J[BJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1funding_1created
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMessageHandler_handle_funding_signed
+ * Signature: (J[BJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1funding_1signed
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMessageHandler_handle_funding_locked
+ * Signature: (J[BJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1funding_1locked
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMessageHandler_handle_shutdown
+ * Signature: (J[BJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1shutdown
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMessageHandler_handle_closing_signed
+ * Signature: (J[BJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1closing_1signed
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMessageHandler_handle_update_add_htlc
+ * Signature: (J[BJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1update_1add_1htlc
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMessageHandler_handle_update_fulfill_htlc
+ * Signature: (J[BJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1update_1fulfill_1htlc
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMessageHandler_handle_update_fail_htlc
+ * Signature: (J[BJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1update_1fail_1htlc
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMessageHandler_handle_update_fail_malformed_htlc
+ * Signature: (J[BJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1update_1fail_1malformed_1htlc
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMessageHandler_handle_commitment_signed
+ * Signature: (J[BJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1commitment_1signed
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMessageHandler_handle_revoke_and_ack
+ * Signature: (J[BJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1revoke_1and_1ack
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMessageHandler_handle_update_fee
+ * Signature: (J[BJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1update_1fee
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMessageHandler_handle_announcement_signatures
+ * Signature: (J[BJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1announcement_1signatures
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMessageHandler_peer_disconnected
+ * Signature: (J[BZ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1peer_1disconnected
+  (JNIEnv *, jclass, jlong, jbyteArray, jboolean);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMessageHandler_peer_connected
+ * Signature: (J[BJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1peer_1connected
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMessageHandler_handle_channel_reestablish
+ * Signature: (J[BJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1channel_1reestablish
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMessageHandler_handle_error
+ * Signature: (J[BJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1error
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKRoutingMessageHandler_new
+ * Signature: (Lorg/ldk/impl/bindings/LDKRoutingMessageHandler;Lorg/ldk/impl/bindings/LDKMessageSendEventsProvider;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKRoutingMessageHandler_1new
+  (JNIEnv *, jclass, jobject, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RoutingMessageHandler_handle_node_announcement
+ * Signature: (JJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1node_1announcement
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RoutingMessageHandler_handle_channel_announcement
+ * Signature: (JJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1channel_1announcement
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RoutingMessageHandler_handle_channel_update
+ * Signature: (JJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1channel_1update
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RoutingMessageHandler_handle_htlc_fail_channel_update
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1htlc_1fail_1channel_1update
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RoutingMessageHandler_get_next_channel_announcements
+ * Signature: (JJB)[J
+ */
+JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1get_1next_1channel_1announcements
+  (JNIEnv *, jclass, jlong, jlong, jbyte);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RoutingMessageHandler_get_next_node_announcements
+ * Signature: (J[BB)[J
+ */
+JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1get_1next_1node_1announcements
+  (JNIEnv *, jclass, jlong, jbyteArray, jbyte);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RoutingMessageHandler_sync_routing_table
+ * Signature: (J[BJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1sync_1routing_1table
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RoutingMessageHandler_handle_reply_channel_range
+ * Signature: (J[BJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1reply_1channel_1range
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RoutingMessageHandler_handle_reply_short_channel_ids_end
+ * Signature: (J[BJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1reply_1short_1channel_1ids_1end
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RoutingMessageHandler_handle_query_channel_range
+ * Signature: (J[BJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1query_1channel_1range
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RoutingMessageHandler_handle_query_short_channel_ids
+ * Signature: (J[BJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1query_1short_1channel_1ids
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKSocketDescriptor_new
+ * Signature: (Lorg/ldk/impl/bindings/LDKSocketDescriptor;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKSocketDescriptor_1new
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    SocketDescriptor_send_data
+ * Signature: (J[BZ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1send_1data
+  (JNIEnv *, jclass, jlong, jbyteArray, jboolean);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    SocketDescriptor_disconnect_socket
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1disconnect_1socket
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    SocketDescriptor_hash
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1hash
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Transaction_free
+ * Signature: ([B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Transaction_1free
+  (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    TxOut_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxOut_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    TxOut_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxOut_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_SecretKeyErrorZ_ok
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SecretKeyErrorZ_1ok
+  (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_SecretKeyErrorZ_err
+ * Signature: (Lorg/ldk/enums/LDKSecp256k1Error;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SecretKeyErrorZ_1err
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_SecretKeyErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SecretKeyErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_PublicKeyErrorZ_ok
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeyErrorZ_1ok
+  (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_PublicKeyErrorZ_err
+ * Signature: (Lorg/ldk/enums/LDKSecp256k1Error;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeyErrorZ_1err
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_PublicKeyErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeyErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_TxCreationKeysDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_TxCreationKeysDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_TxCreationKeysDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_TxCreationKeysDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelPublicKeysDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelPublicKeysDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelPublicKeysDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelPublicKeysDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelPublicKeysDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelPublicKeysDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelPublicKeysDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelPublicKeysDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_TxCreationKeysErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_TxCreationKeysErrorZ_err
+ * Signature: (Lorg/ldk/enums/LDKSecp256k1Error;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysErrorZ_1err
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_TxCreationKeysErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_HTLCOutputInCommitmentDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCOutputInCommitmentDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_HTLCOutputInCommitmentDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCOutputInCommitmentDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_HTLCOutputInCommitmentDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCOutputInCommitmentDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_HTLCOutputInCommitmentDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCOutputInCommitmentDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CounterpartyChannelTransactionParametersDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CounterpartyChannelTransactionParametersDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CounterpartyChannelTransactionParametersDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CounterpartyChannelTransactionParametersDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelTransactionParametersDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTransactionParametersDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelTransactionParametersDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTransactionParametersDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelTransactionParametersDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTransactionParametersDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelTransactionParametersDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTransactionParametersDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CVec_SignatureZ_free
+ * Signature: ([[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1SignatureZ_1free
+  (JNIEnv *, jclass, jobjectArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_HolderCommitmentTransactionDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1HolderCommitmentTransactionDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_HolderCommitmentTransactionDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1HolderCommitmentTransactionDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_HolderCommitmentTransactionDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1HolderCommitmentTransactionDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_HolderCommitmentTransactionDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1HolderCommitmentTransactionDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_BuiltCommitmentTransactionDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1BuiltCommitmentTransactionDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_BuiltCommitmentTransactionDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1BuiltCommitmentTransactionDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_BuiltCommitmentTransactionDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1BuiltCommitmentTransactionDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_BuiltCommitmentTransactionDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1BuiltCommitmentTransactionDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_CommitmentTransactionDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentTransactionDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_CommitmentTransactionDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentTransactionDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_CommitmentTransactionDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentTransactionDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_CommitmentTransactionDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentTransactionDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_TrustedCommitmentTransactionNoneZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TrustedCommitmentTransactionNoneZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_TrustedCommitmentTransactionNoneZ_err
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TrustedCommitmentTransactionNoneZ_1err
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_TrustedCommitmentTransactionNoneZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TrustedCommitmentTransactionNoneZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_CVec_SignatureZNoneZ_ok
+ * Signature: ([[B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1ok
+  (JNIEnv *, jclass, jobjectArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_CVec_SignatureZNoneZ_err
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1err
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_CVec_SignatureZNoneZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_CVec_SignatureZNoneZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CVec_PublicKeyZ_free
+ * Signature: ([[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1PublicKeyZ_1free
+  (JNIEnv *, jclass, jobjectArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CVec_u8Z_free
+ * Signature: ([B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u8Z_1free
+  (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_CVec_u8ZPeerHandleErrorZ_ok
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1ok
+  (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_CVec_u8ZPeerHandleErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_CVec_u8ZPeerHandleErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_CVec_u8ZPeerHandleErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NonePeerHandleErrorZ_ok
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1ok
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NonePeerHandleErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NonePeerHandleErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NonePeerHandleErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_boolPeerHandleErrorZ_ok
+ * Signature: (Z)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1ok
+  (JNIEnv *, jclass, jboolean);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_boolPeerHandleErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_boolPeerHandleErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_boolPeerHandleErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InitFeaturesDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InitFeaturesDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InitFeaturesDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InitFeaturesDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InitFeaturesDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InitFeaturesDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NodeFeaturesDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeFeaturesDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NodeFeaturesDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeFeaturesDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NodeFeaturesDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NodeFeaturesDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelFeaturesDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelFeaturesDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelFeaturesDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelFeaturesDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelFeaturesDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelFeaturesDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelConfigDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelConfigDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelConfigDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelConfigDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelConfigDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelConfigDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelConfigDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelConfigDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_boolLightningErrorZ_ok
+ * Signature: (Z)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1ok
+  (JNIEnv *, jclass, jboolean);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_boolLightningErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_boolLightningErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_boolLightningErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new
+ * Signature: (JJJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1new
+  (JNIEnv *, jclass, jlong, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free
+ * Signature: ([J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZZ_1free
+  (JNIEnv *, jclass, jlongArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CVec_NodeAnnouncementZ_free
+ * Signature: ([J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1NodeAnnouncementZ_1free
+  (JNIEnv *, jclass, jlongArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NoneLightningErrorZ_ok
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneLightningErrorZ_1ok
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NoneLightningErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneLightningErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NoneLightningErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneLightningErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NoneLightningErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneLightningErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CVec_MessageSendEventZ_free
+ * Signature: ([J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1MessageSendEventZ_1free
+  (JNIEnv *, jclass, jlongArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_DirectionalChannelInfoDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1DirectionalChannelInfoDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_DirectionalChannelInfoDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1DirectionalChannelInfoDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_DirectionalChannelInfoDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1DirectionalChannelInfoDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_DirectionalChannelInfoDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1DirectionalChannelInfoDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelInfoDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelInfoDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelInfoDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelInfoDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelInfoDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelInfoDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_RoutingFeesDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RoutingFeesDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_RoutingFeesDecodeErrorZ_err
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKPersist_1new
-  (JNIEnv *, jclass, jobject);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RoutingFeesDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    Persist_persist_new_channel
- * Signature: (JJJ)J
+ * Method:    CResult_RoutingFeesDecodeErrorZ_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Persist_1persist_1new_1channel
-  (JNIEnv *, jclass, jlong, jlong, jlong);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RoutingFeesDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    Persist_update_persisted_channel
- * Signature: (JJJJ)J
+ * Method:    CResult_RoutingFeesDecodeErrorZ_clone
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Persist_1update_1persisted_1channel
-  (JNIEnv *, jclass, jlong, jlong, jlong, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RoutingFeesDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKChannelMessageHandler_new
- * Signature: (Lorg/ldk/impl/bindings/LDKChannelMessageHandler;Lorg/ldk/impl/bindings/LDKMessageSendEventsProvider;)J
+ * Method:    CVec_NetAddressZ_free
+ * Signature: ([J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKChannelMessageHandler_1new
-  (JNIEnv *, jclass, jobject, jobject);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1NetAddressZ_1free
+  (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMessageHandler_handle_open_channel
- * Signature: (J[BJJ)V
+ * Method:    CResult_NodeAnnouncementInfoDecodeErrorZ_ok
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1open_1channel
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementInfoDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMessageHandler_handle_accept_channel
- * Signature: (J[BJJ)V
+ * Method:    CResult_NodeAnnouncementInfoDecodeErrorZ_err
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1accept_1channel
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementInfoDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMessageHandler_handle_funding_created
- * Signature: (J[BJ)V
+ * Method:    CResult_NodeAnnouncementInfoDecodeErrorZ_free
+ * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1funding_1created
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementInfoDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMessageHandler_handle_funding_signed
- * Signature: (J[BJ)V
+ * Method:    CResult_NodeAnnouncementInfoDecodeErrorZ_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1funding_1signed
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementInfoDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMessageHandler_handle_funding_locked
- * Signature: (J[BJ)V
+ * Method:    CVec_u64Z_free
+ * Signature: ([J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1funding_1locked
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u64Z_1free
+  (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMessageHandler_handle_shutdown
- * Signature: (J[BJ)V
+ * Method:    CResult_NodeInfoDecodeErrorZ_ok
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1shutdown
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeInfoDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMessageHandler_handle_closing_signed
- * Signature: (J[BJ)V
+ * Method:    CResult_NodeInfoDecodeErrorZ_err
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1closing_1signed
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeInfoDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMessageHandler_handle_update_add_htlc
- * Signature: (J[BJ)V
+ * Method:    CResult_NodeInfoDecodeErrorZ_free
+ * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1update_1add_1htlc
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NodeInfoDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMessageHandler_handle_update_fulfill_htlc
- * Signature: (J[BJ)V
+ * Method:    CResult_NodeInfoDecodeErrorZ_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1update_1fulfill_1htlc
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeInfoDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMessageHandler_handle_update_fail_htlc
- * Signature: (J[BJ)V
+ * Method:    CResult_NetworkGraphDecodeErrorZ_ok
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1update_1fail_1htlc
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMessageHandler_handle_update_fail_malformed_htlc
- * Signature: (J[BJ)V
+ * Method:    CResult_NetworkGraphDecodeErrorZ_err
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1update_1fail_1malformed_1htlc
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMessageHandler_handle_commitment_signed
- * Signature: (J[BJ)V
+ * Method:    CResult_NetworkGraphDecodeErrorZ_free
+ * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1commitment_1signed
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMessageHandler_handle_revoke_and_ack
- * Signature: (J[BJ)V
+ * Method:    C2Tuple_usizeTransactionZ_new
+ * Signature: (J[B)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1revoke_1and_1ack
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1new
+  (JNIEnv *, jclass, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMessageHandler_handle_update_fee
- * Signature: (J[BJ)V
+ * Method:    C2Tuple_usizeTransactionZ_free
+ * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1update_1fee
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1free
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMessageHandler_handle_announcement_signatures
- * Signature: (J[BJ)V
+ * Method:    CVec_C2Tuple_usizeTransactionZZ_free
+ * Signature: ([J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1announcement_1signatures
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1usizeTransactionZZ_1free
+  (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMessageHandler_peer_disconnected
- * Signature: (J[BZ)V
+ * Method:    CResult_NoneChannelMonitorUpdateErrZ_ok
+ * Signature: ()J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1peer_1disconnected
-  (JNIEnv *, jclass, jlong, jbyteArray, jboolean);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1ok
+  (JNIEnv *, jclass);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMessageHandler_peer_connected
- * Signature: (J[BJ)V
+ * Method:    CResult_NoneChannelMonitorUpdateErrZ_err
+ * Signature: (Lorg/ldk/enums/LDKChannelMonitorUpdateErr;)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1peer_1connected
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1err
+  (JNIEnv *, jclass, jobject);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMessageHandler_handle_channel_reestablish
- * Signature: (J[BJ)V
+ * Method:    CResult_NoneChannelMonitorUpdateErrZ_free
+ * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1channel_1reestablish
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1free
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMessageHandler_handle_error
- * Signature: (J[BJ)V
+ * Method:    CResult_NoneChannelMonitorUpdateErrZ_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1error
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1clone
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKRoutingMessageHandler_new
- * Signature: (Lorg/ldk/impl/bindings/LDKRoutingMessageHandler;Lorg/ldk/impl/bindings/LDKMessageSendEventsProvider;)J
+ * Method:    CVec_MonitorEventZ_free
+ * Signature: ([J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKRoutingMessageHandler_1new
-  (JNIEnv *, jclass, jobject, jobject);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1MonitorEventZ_1free
+  (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    RoutingMessageHandler_handle_node_announcement
- * Signature: (JJ)J
+ * Method:    CVec_EventZ_free
+ * Signature: ([J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1node_1announcement
-  (JNIEnv *, jclass, jlong, jlong);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1EventZ_1free
+  (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    RoutingMessageHandler_handle_channel_announcement
- * Signature: (JJ)J
+ * Method:    CResult_OutPointDecodeErrorZ_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1channel_1announcement
-  (JNIEnv *, jclass, jlong, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OutPointDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    RoutingMessageHandler_handle_channel_update
- * Signature: (JJ)J
+ * Method:    CResult_OutPointDecodeErrorZ_err
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1channel_1update
-  (JNIEnv *, jclass, jlong, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OutPointDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    RoutingMessageHandler_handle_htlc_fail_channel_update
- * Signature: (JJ)V
+ * Method:    CResult_OutPointDecodeErrorZ_free
+ * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1htlc_1fail_1channel_1update
-  (JNIEnv *, jclass, jlong, jlong);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OutPointDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    RoutingMessageHandler_get_next_channel_announcements
- * Signature: (JJB)[J
+ * Method:    CResult_OutPointDecodeErrorZ_clone
+ * Signature: (J)J
  */
-JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1get_1next_1channel_1announcements
-  (JNIEnv *, jclass, jlong, jlong, jbyte);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OutPointDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    RoutingMessageHandler_get_next_node_announcements
- * Signature: (J[BB)[J
+ * Method:    CResult_ChannelMonitorUpdateDecodeErrorZ_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1get_1next_1node_1announcements
-  (JNIEnv *, jclass, jlong, jbyteArray, jbyte);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelMonitorUpdateDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    RoutingMessageHandler_sync_routing_table
- * Signature: (J[BJ)V
+ * Method:    CResult_ChannelMonitorUpdateDecodeErrorZ_err
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1sync_1routing_1table
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelMonitorUpdateDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    RoutingMessageHandler_handle_reply_channel_range
- * Signature: (J[BJ)J
+ * Method:    CResult_ChannelMonitorUpdateDecodeErrorZ_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1reply_1channel_1range
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelMonitorUpdateDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    RoutingMessageHandler_handle_reply_short_channel_ids_end
- * Signature: (J[BJ)J
+ * Method:    CResult_ChannelMonitorUpdateDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelMonitorUpdateDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_HTLCUpdateDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCUpdateDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_HTLCUpdateDecodeErrorZ_err
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1reply_1short_1channel_1ids_1end
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCUpdateDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    RoutingMessageHandler_handle_query_channel_range
- * Signature: (J[BJ)J
+ * Method:    CResult_HTLCUpdateDecodeErrorZ_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1query_1channel_1range
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCUpdateDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    RoutingMessageHandler_handle_query_short_channel_ids
- * Signature: (J[BJ)J
+ * Method:    CResult_HTLCUpdateDecodeErrorZ_clone
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1query_1short_1channel_1ids
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCUpdateDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKSocketDescriptor_new
- * Signature: (Lorg/ldk/impl/bindings/LDKSocketDescriptor;)J
+ * Method:    CResult_NoneMonitorUpdateErrorZ_ok
+ * Signature: ()J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKSocketDescriptor_1new
-  (JNIEnv *, jclass, jobject);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateErrorZ_1ok
+  (JNIEnv *, jclass);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    SocketDescriptor_send_data
- * Signature: (J[BZ)J
+ * Method:    CResult_NoneMonitorUpdateErrorZ_err
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1send_1data
-  (JNIEnv *, jclass, jlong, jbyteArray, jboolean);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateErrorZ_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    SocketDescriptor_disconnect_socket
+ * Method:    CResult_NoneMonitorUpdateErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1disconnect_1socket
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    SocketDescriptor_hash
+ * Method:    CResult_NoneMonitorUpdateErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1hash
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    Transaction_free
- * Signature: ([B)V
+ * Method:    C2Tuple_OutPointScriptZ_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Transaction_1free
-  (JNIEnv *, jclass, jbyteArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1clone
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    TxOut_free
- * Signature: (J)V
+ * Method:    C2Tuple_OutPointScriptZ_new
+ * Signature: (J[B)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxOut_1free
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1new
+  (JNIEnv *, jclass, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    TxOut_clone
- * Signature: (J)J
+ * Method:    C2Tuple_OutPointScriptZ_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxOut_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_SpendableOutputDescriptorZ_free
- * Signature: ([J)V
+ * Method:    CVec_TransactionZ_free
+ * Signature: ([[B)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1SpendableOutputDescriptorZ_1free
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TransactionZ_1free
+  (JNIEnv *, jclass, jobjectArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_MessageSendEventZ_free
- * Signature: ([J)V
+ * Method:    C2Tuple_u32TxOutZ_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1MessageSendEventZ_1free
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32TxOutZ_1clone
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_EventZ_free
- * Signature: ([J)V
+ * Method:    C2Tuple_u32TxOutZ_new
+ * Signature: (IJ)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1EventZ_1free
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32TxOutZ_1new
+  (JNIEnv *, jclass, jint, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C2Tuple_usizeTransactionZ_free
+ * Method:    C2Tuple_u32TxOutZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32TxOutZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C2Tuple_usizeTransactionZ_new
- * Signature: (J[B)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1new
-  (JNIEnv *, jclass, jlong, jbyteArray);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    CVec_C2Tuple_usizeTransactionZZ_free
+ * Method:    CVec_C2Tuple_u32TxOutZZ_free
  * Signature: ([J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1usizeTransactionZZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1u32TxOutZZ_1free
   (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NoneChannelMonitorUpdateErrZ_ok
- * Signature: ()J
+ * Method:    C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new
+ * Signature: ([B[J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1ok
-  (JNIEnv *, jclass);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1new
+  (JNIEnv *, jclass, jbyteArray, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NoneChannelMonitorUpdateErrZ_err
- * Signature: (Lorg/ldk/enums/LDKChannelMonitorUpdateErr;)J
+ * Method:    C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1err
-  (JNIEnv *, jclass, jobject);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1free
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NoneChannelMonitorUpdateErrZ_free
- * Signature: (J)V
+ * Method:    CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free
+ * Signature: ([J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1free
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZZ_1free
+  (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NoneChannelMonitorUpdateErrZ_clone
- * Signature: (J)J
+ * Method:    C2Tuple_BlockHashChannelMonitorZ_new
+ * Signature: ([BJ)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1clone
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMonitorZ_1new
+  (JNIEnv *, jclass, jbyteArray, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_MonitorEventZ_free
- * Signature: ([J)V
+ * Method:    C2Tuple_BlockHashChannelMonitorZ_free
+ * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1MonitorEventZ_1free
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMonitorZ_1free
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ChannelMonitorUpdateDecodeErrorZ_ok
+ * Method:    CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelMonitorUpdateDecodeErrorZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ChannelMonitorUpdateDecodeErrorZ_err
+ * Method:    CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelMonitorUpdateDecodeErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ChannelMonitorUpdateDecodeErrorZ_free
+ * Method:    CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelMonitorUpdateDecodeErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NoneMonitorUpdateErrorZ_ok
- * Signature: ()J
+ * Method:    CVec_SpendableOutputDescriptorZ_free
+ * Signature: ([J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateErrorZ_1ok
-  (JNIEnv *, jclass);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1SpendableOutputDescriptorZ_1free
+  (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NoneMonitorUpdateErrorZ_err
+ * Method:    CResult_TxOutAccessErrorZ_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NoneMonitorUpdateErrorZ_free
+ * Method:    CResult_TxOutAccessErrorZ_err
+ * Signature: (Lorg/ldk/enums/LDKAccessError;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_1err
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_TxOutAccessErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NoneMonitorUpdateErrorZ_clone
+ * Method:    CResult_TxOutAccessErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateErrorZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C2Tuple_OutPointScriptZ_free
- * Signature: (J)V
+ * Method:    CResult_NoneAPIErrorZ_ok
+ * Signature: ()J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1free
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneAPIErrorZ_1ok
+  (JNIEnv *, jclass);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C2Tuple_OutPointScriptZ_new
- * Signature: (J[B)J
+ * Method:    CResult_NoneAPIErrorZ_err
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1new
-  (JNIEnv *, jclass, jlong, jbyteArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneAPIErrorZ_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_TransactionZ_free
- * Signature: ([[B)V
+ * Method:    CResult_NoneAPIErrorZ_free
+ * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TransactionZ_1free
-  (JNIEnv *, jclass, jobjectArray);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneAPIErrorZ_1free
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C2Tuple_u32TxOutZ_clone
+ * Method:    CResult_NoneAPIErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32TxOutZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneAPIErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C2Tuple_u32TxOutZ_free
- * Signature: (J)V
+ * Method:    CVec_ChannelDetailsZ_free
+ * Signature: ([J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32TxOutZ_1free
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ChannelDetailsZ_1free
+  (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C2Tuple_u32TxOutZ_new
- * Signature: (IJ)J
+ * Method:    CResult_NonePaymentSendFailureZ_ok
+ * Signature: ()J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32TxOutZ_1new
-  (JNIEnv *, jclass, jint, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1ok
+  (JNIEnv *, jclass);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_C2Tuple_u32TxOutZZ_free
- * Signature: ([J)V
+ * Method:    CResult_NonePaymentSendFailureZ_err
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1u32TxOutZZ_1free
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free
+ * Method:    CResult_NonePaymentSendFailureZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new
- * Signature: ([B[J)J
+ * Method:    CResult_NonePaymentSendFailureZ_clone
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1new
-  (JNIEnv *, jclass, jbyteArray, jlongArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1clone
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free
+ * Method:    CVec_ChannelMonitorZ_free
  * Signature: ([J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ChannelMonitorZ_1free
   (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C2Tuple_BlockHashChannelMonitorZ_free
- * Signature: (J)V
+ * Method:    C2Tuple_BlockHashChannelManagerZ_new
+ * Signature: ([BJ)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMonitorZ_1free
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelManagerZ_1new
+  (JNIEnv *, jclass, jbyteArray, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C2Tuple_BlockHashChannelMonitorZ_new
- * Signature: ([BJ)J
+ * Method:    C2Tuple_BlockHashChannelManagerZ_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMonitorZ_1new
-  (JNIEnv *, jclass, jbyteArray, jlong);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelManagerZ_1free
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok
+ * Method:    CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err
+ * Method:    CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free
+ * Method:    CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -2519,14 +4471,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashCha
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u64u64Z_1clone
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    C2Tuple_u64u64Z_free
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u64u64Z_1free
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    C2Tuple_u64u64Z_new
@@ -2535,6 +4479,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u64u64Z_1free
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u64u64Z_1new
   (JNIEnv *, jclass, jlong, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    C2Tuple_u64u64Z_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u64u64Z_1free
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    CResult_SpendableOutputDescriptorDecodeErrorZ_ok
@@ -2567,14 +4519,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SpendableOutputDescri
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SpendableOutputDescriptorDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    CVec_SignatureZ_free
- * Signature: ([[B)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1SignatureZ_1free
-  (JNIEnv *, jclass, jobjectArray);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    C2Tuple_SignatureCVec_SignatureZZ_clone
@@ -2583,14 +4527,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1SignatureZ_1free
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1clone
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    C2Tuple_SignatureCVec_SignatureZZ_free
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1free
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    C2Tuple_SignatureCVec_SignatureZZ_new
@@ -2599,6 +4535,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1Signat
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1new
   (JNIEnv *, jclass, jbyteArray, jobjectArray);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    C2Tuple_SignatureCVec_SignatureZZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1free
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok
@@ -2665,34 +4609,34 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SignatureNoneZ_1clon
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ChanKeySignerDecodeErrorZ_ok
+ * Method:    CResult_ChannelKeysDecodeErrorZ_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChanKeySignerDecodeErrorZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelKeysDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ChanKeySignerDecodeErrorZ_err
+ * Method:    CResult_ChannelKeysDecodeErrorZ_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChanKeySignerDecodeErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelKeysDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ChanKeySignerDecodeErrorZ_free
+ * Method:    CResult_ChannelKeysDecodeErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChanKeySignerDecodeErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelKeysDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ChanKeySignerDecodeErrorZ_clone
+ * Method:    CResult_ChannelKeysDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChanKeySignerDecodeErrorZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelKeysDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -2721,370 +4665,450 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InMemoryChannelKeysDe
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_TxOutAccessErrorZ_ok
+ * Method:    CResult_InMemoryChannelKeysDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InMemoryChannelKeysDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_TxOutAccessErrorZ_err
- * Signature: (Lorg/ldk/enums/LDKAccessError;)J
+ * Method:    CVec_RouteHopZ_free
+ * Signature: ([J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_1err
-  (JNIEnv *, jclass, jobject);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1RouteHopZ_1free
+  (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_TxOutAccessErrorZ_free
+ * Method:    CVec_CVec_RouteHopZZ_free
+ * Signature: ([[J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1CVec_1RouteHopZZ_1free
+  (JNIEnv *, jclass, jobjectArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_RouteDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RouteDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_RouteDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RouteDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_RouteDecodeErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RouteDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_TxOutAccessErrorZ_clone
+ * Method:    CResult_RouteDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RouteDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NoneAPIErrorZ_ok
- * Signature: ()J
+ * Method:    CVec_RouteHintZ_free
+ * Signature: ([J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneAPIErrorZ_1ok
-  (JNIEnv *, jclass);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1RouteHintZ_1free
+  (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NoneAPIErrorZ_err
+ * Method:    CResult_RouteLightningErrorZ_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneAPIErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NoneAPIErrorZ_free
+ * Method:    CResult_RouteLightningErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_RouteLightningErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneAPIErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_ChannelDetailsZ_free
- * Signature: ([J)V
+ * Method:    CResult_RouteLightningErrorZ_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ChannelDetailsZ_1free
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NonePaymentSendFailureZ_ok
- * Signature: ()J
+ * Method:    CResult_NetAddressu8Z_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1ok
-  (JNIEnv *, jclass);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NetAddressu8Z_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NonePaymentSendFailureZ_err
+ * Method:    CResult_NetAddressu8Z_err
+ * Signature: (B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NetAddressu8Z_1err
+  (JNIEnv *, jclass, jbyte);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NetAddressu8Z_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NetAddressu8Z_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NetAddressu8Z_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NetAddressu8Z_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NonePaymentSendFailureZ_free
+ * Method:    CResult_CResult_NetAddressu8ZDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CResult_1NetAddressu8ZDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_CResult_NetAddressu8ZDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CResult_1NetAddressu8ZDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_CResult_NetAddressu8ZDecodeErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CResult_1NetAddressu8ZDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NonePaymentSendFailureZ_clone
+ * Method:    CResult_CResult_NetAddressu8ZDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CResult_1NetAddressu8ZDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_NetAddressZ_free
+ * Method:    CVec_UpdateAddHTLCZ_free
  * Signature: ([J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1NetAddressZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateAddHTLCZ_1free
   (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_ChannelMonitorZ_free
+ * Method:    CVec_UpdateFulfillHTLCZ_free
  * Signature: ([J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ChannelMonitorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateFulfillHTLCZ_1free
   (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C2Tuple_BlockHashChannelManagerZ_free
- * Signature: (J)V
+ * Method:    CVec_UpdateFailHTLCZ_free
+ * Signature: ([J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelManagerZ_1free
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateFailHTLCZ_1free
+  (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C2Tuple_BlockHashChannelManagerZ_new
- * Signature: ([BJ)J
+ * Method:    CVec_UpdateFailMalformedHTLCZ_free
+ * Signature: ([J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelManagerZ_1new
-  (JNIEnv *, jclass, jbyteArray, jlong);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateFailMalformedHTLCZ_1free
+  (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok
+ * Method:    CResult_AcceptChannelDecodeErrorZ_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1AcceptChannelDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err
+ * Method:    CResult_AcceptChannelDecodeErrorZ_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1AcceptChannelDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free
+ * Method:    CResult_AcceptChannelDecodeErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1AcceptChannelDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NetAddressu8Z_ok
+ * Method:    CResult_AcceptChannelDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NetAddressu8Z_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1AcceptChannelDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NetAddressu8Z_err
- * Signature: (B)J
+ * Method:    CResult_AnnouncementSignaturesDecodeErrorZ_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NetAddressu8Z_1err
-  (JNIEnv *, jclass, jbyte);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1AnnouncementSignaturesDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NetAddressu8Z_free
+ * Method:    CResult_AnnouncementSignaturesDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1AnnouncementSignaturesDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_AnnouncementSignaturesDecodeErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NetAddressu8Z_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1AnnouncementSignaturesDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NetAddressu8Z_clone
+ * Method:    CResult_AnnouncementSignaturesDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NetAddressu8Z_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1AnnouncementSignaturesDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_CResult_NetAddressu8ZDecodeErrorZ_ok
+ * Method:    CResult_ChannelReestablishDecodeErrorZ_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CResult_1NetAddressu8ZDecodeErrorZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelReestablishDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_CResult_NetAddressu8ZDecodeErrorZ_err
+ * Method:    CResult_ChannelReestablishDecodeErrorZ_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CResult_1NetAddressu8ZDecodeErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelReestablishDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_CResult_NetAddressu8ZDecodeErrorZ_free
+ * Method:    CResult_ChannelReestablishDecodeErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CResult_1NetAddressu8ZDecodeErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelReestablishDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_u64Z_free
- * Signature: ([J)V
+ * Method:    CResult_ChannelReestablishDecodeErrorZ_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u64Z_1free
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelReestablishDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_UpdateAddHTLCZ_free
- * Signature: ([J)V
+ * Method:    CResult_ClosingSignedDecodeErrorZ_ok
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateAddHTLCZ_1free
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ClosingSignedDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_UpdateFulfillHTLCZ_free
- * Signature: ([J)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateFulfillHTLCZ_1free
-  (JNIEnv *, jclass, jlongArray);
+ * Method:    CResult_ClosingSignedDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ClosingSignedDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_UpdateFailHTLCZ_free
- * Signature: ([J)V
+ * Method:    CResult_ClosingSignedDecodeErrorZ_free
+ * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateFailHTLCZ_1free
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ClosingSignedDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_UpdateFailMalformedHTLCZ_free
- * Signature: ([J)V
+ * Method:    CResult_ClosingSignedDecodeErrorZ_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateFailMalformedHTLCZ_1free
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ClosingSignedDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_boolLightningErrorZ_ok
- * Signature: (Z)J
+ * Method:    CResult_CommitmentSignedDecodeErrorZ_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1ok
-  (JNIEnv *, jclass, jboolean);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentSignedDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_boolLightningErrorZ_err
+ * Method:    CResult_CommitmentSignedDecodeErrorZ_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentSignedDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_boolLightningErrorZ_free
+ * Method:    CResult_CommitmentSignedDecodeErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentSignedDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_boolLightningErrorZ_clone
+ * Method:    CResult_CommitmentSignedDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentSignedDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free
- * Signature: (J)V
+ * Method:    CResult_FundingCreatedDecodeErrorZ_ok
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1FundingCreatedDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new
- * Signature: (JJJ)J
+ * Method:    CResult_FundingCreatedDecodeErrorZ_err
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1new
-  (JNIEnv *, jclass, jlong, jlong, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1FundingCreatedDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free
- * Signature: ([J)V
+ * Method:    CResult_FundingCreatedDecodeErrorZ_free
+ * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZZ_1free
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1FundingCreatedDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_NodeAnnouncementZ_free
- * Signature: ([J)V
+ * Method:    CResult_FundingCreatedDecodeErrorZ_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1NodeAnnouncementZ_1free
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1FundingCreatedDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NoneLightningErrorZ_ok
- * Signature: ()J
+ * Method:    CResult_FundingSignedDecodeErrorZ_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneLightningErrorZ_1ok
-  (JNIEnv *, jclass);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1FundingSignedDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NoneLightningErrorZ_err
+ * Method:    CResult_FundingSignedDecodeErrorZ_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneLightningErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1FundingSignedDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NoneLightningErrorZ_free
+ * Method:    CResult_FundingSignedDecodeErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneLightningErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1FundingSignedDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NoneLightningErrorZ_clone
+ * Method:    CResult_FundingSignedDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneLightningErrorZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1FundingSignedDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ChannelReestablishDecodeErrorZ_ok
+ * Method:    CResult_FundingLockedDecodeErrorZ_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelReestablishDecodeErrorZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1FundingLockedDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ChannelReestablishDecodeErrorZ_err
+ * Method:    CResult_FundingLockedDecodeErrorZ_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelReestablishDecodeErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1FundingLockedDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ChannelReestablishDecodeErrorZ_free
+ * Method:    CResult_FundingLockedDecodeErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelReestablishDecodeErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1FundingLockedDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_FundingLockedDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1FundingLockedDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -3113,690 +5137,714 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InitDecodeErrorZ_1fre
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_PingDecodeErrorZ_ok
+ * Method:    CResult_InitDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PingDecodeErrorZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InitDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_PingDecodeErrorZ_err
+ * Method:    CResult_OpenChannelDecodeErrorZ_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PingDecodeErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OpenChannelDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_PingDecodeErrorZ_free
- * Signature: (J)V
+ * Method:    CResult_OpenChannelDecodeErrorZ_err
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PingDecodeErrorZ_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OpenChannelDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_PongDecodeErrorZ_ok
- * Signature: (J)J
+ * Method:    CResult_OpenChannelDecodeErrorZ_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PongDecodeErrorZ_1ok
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OpenChannelDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_PongDecodeErrorZ_err
+ * Method:    CResult_OpenChannelDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PongDecodeErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OpenChannelDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_PongDecodeErrorZ_free
- * Signature: (J)V
+ * Method:    CResult_RevokeAndACKDecodeErrorZ_ok
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PongDecodeErrorZ_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RevokeAndACKDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok
+ * Method:    CResult_RevokeAndACKDecodeErrorZ_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelAnnouncementDecodeErrorZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RevokeAndACKDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_UnsignedChannelAnnouncementDecodeErrorZ_err
- * Signature: (J)J
+ * Method:    CResult_RevokeAndACKDecodeErrorZ_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelAnnouncementDecodeErrorZ_1err
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RevokeAndACKDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_UnsignedChannelAnnouncementDecodeErrorZ_free
- * Signature: (J)V
+ * Method:    CResult_RevokeAndACKDecodeErrorZ_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelAnnouncementDecodeErrorZ_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RevokeAndACKDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_UnsignedChannelUpdateDecodeErrorZ_ok
+ * Method:    CResult_ShutdownDecodeErrorZ_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelUpdateDecodeErrorZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ShutdownDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_UnsignedChannelUpdateDecodeErrorZ_err
+ * Method:    CResult_ShutdownDecodeErrorZ_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelUpdateDecodeErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ShutdownDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_UnsignedChannelUpdateDecodeErrorZ_free
+ * Method:    CResult_ShutdownDecodeErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelUpdateDecodeErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ShutdownDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ErrorMessageDecodeErrorZ_ok
+ * Method:    CResult_ShutdownDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ErrorMessageDecodeErrorZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ShutdownDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ErrorMessageDecodeErrorZ_err
+ * Method:    CResult_UpdateFailHTLCDecodeErrorZ_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ErrorMessageDecodeErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailHTLCDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ErrorMessageDecodeErrorZ_free
- * Signature: (J)V
+ * Method:    CResult_UpdateFailHTLCDecodeErrorZ_err
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ErrorMessageDecodeErrorZ_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailHTLCDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok
- * Signature: (J)J
+ * Method:    CResult_UpdateFailHTLCDecodeErrorZ_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedNodeAnnouncementDecodeErrorZ_1ok
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailHTLCDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_UnsignedNodeAnnouncementDecodeErrorZ_err
+ * Method:    CResult_UpdateFailHTLCDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedNodeAnnouncementDecodeErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailHTLCDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_UnsignedNodeAnnouncementDecodeErrorZ_free
- * Signature: (J)V
+ * Method:    CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedNodeAnnouncementDecodeErrorZ_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailMalformedHTLCDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_QueryShortChannelIdsDecodeErrorZ_ok
+ * Method:    CResult_UpdateFailMalformedHTLCDecodeErrorZ_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1QueryShortChannelIdsDecodeErrorZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailMalformedHTLCDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_QueryShortChannelIdsDecodeErrorZ_err
- * Signature: (J)J
+ * Method:    CResult_UpdateFailMalformedHTLCDecodeErrorZ_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1QueryShortChannelIdsDecodeErrorZ_1err
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailMalformedHTLCDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_QueryShortChannelIdsDecodeErrorZ_free
- * Signature: (J)V
+ * Method:    CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1QueryShortChannelIdsDecodeErrorZ_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailMalformedHTLCDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok
+ * Method:    CResult_UpdateFeeDecodeErrorZ_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyShortChannelIdsEndDecodeErrorZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFeeDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ReplyShortChannelIdsEndDecodeErrorZ_err
+ * Method:    CResult_UpdateFeeDecodeErrorZ_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyShortChannelIdsEndDecodeErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFeeDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ReplyShortChannelIdsEndDecodeErrorZ_free
+ * Method:    CResult_UpdateFeeDecodeErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyShortChannelIdsEndDecodeErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFeeDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_QueryChannelRangeDecodeErrorZ_ok
+ * Method:    CResult_UpdateFeeDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1QueryChannelRangeDecodeErrorZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFeeDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_QueryChannelRangeDecodeErrorZ_err
+ * Method:    CResult_UpdateFulfillHTLCDecodeErrorZ_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1QueryChannelRangeDecodeErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFulfillHTLCDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_QueryChannelRangeDecodeErrorZ_free
- * Signature: (J)V
+ * Method:    CResult_UpdateFulfillHTLCDecodeErrorZ_err
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1QueryChannelRangeDecodeErrorZ_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFulfillHTLCDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ReplyChannelRangeDecodeErrorZ_ok
- * Signature: (J)J
+ * Method:    CResult_UpdateFulfillHTLCDecodeErrorZ_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyChannelRangeDecodeErrorZ_1ok
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFulfillHTLCDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ReplyChannelRangeDecodeErrorZ_err
+ * Method:    CResult_UpdateFulfillHTLCDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyChannelRangeDecodeErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFulfillHTLCDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ReplyChannelRangeDecodeErrorZ_free
- * Signature: (J)V
+ * Method:    CResult_UpdateAddHTLCDecodeErrorZ_ok
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyChannelRangeDecodeErrorZ_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateAddHTLCDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_GossipTimestampFilterDecodeErrorZ_ok
+ * Method:    CResult_UpdateAddHTLCDecodeErrorZ_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1GossipTimestampFilterDecodeErrorZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateAddHTLCDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_GossipTimestampFilterDecodeErrorZ_err
- * Signature: (J)J
+ * Method:    CResult_UpdateAddHTLCDecodeErrorZ_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1GossipTimestampFilterDecodeErrorZ_1err
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateAddHTLCDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_GossipTimestampFilterDecodeErrorZ_free
- * Signature: (J)V
+ * Method:    CResult_UpdateAddHTLCDecodeErrorZ_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1GossipTimestampFilterDecodeErrorZ_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateAddHTLCDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_PublicKeyZ_free
- * Signature: ([[B)V
+ * Method:    CResult_PingDecodeErrorZ_ok
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1PublicKeyZ_1free
-  (JNIEnv *, jclass, jobjectArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PingDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_u8Z_free
- * Signature: ([B)V
+ * Method:    CResult_PingDecodeErrorZ_err
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u8Z_1free
-  (JNIEnv *, jclass, jbyteArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PingDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_CVec_u8ZPeerHandleErrorZ_ok
- * Signature: ([B)J
+ * Method:    CResult_PingDecodeErrorZ_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1ok
-  (JNIEnv *, jclass, jbyteArray);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PingDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_CVec_u8ZPeerHandleErrorZ_err
+ * Method:    CResult_PingDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PingDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_CVec_u8ZPeerHandleErrorZ_free
- * Signature: (J)V
+ * Method:    CResult_PongDecodeErrorZ_ok
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PongDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_CVec_u8ZPeerHandleErrorZ_clone
+ * Method:    CResult_PongDecodeErrorZ_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PongDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NonePeerHandleErrorZ_ok
- * Signature: ()J
+ * Method:    CResult_PongDecodeErrorZ_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1ok
-  (JNIEnv *, jclass);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PongDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NonePeerHandleErrorZ_err
+ * Method:    CResult_PongDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PongDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NonePeerHandleErrorZ_free
- * Signature: (J)V
+ * Method:    CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelAnnouncementDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NonePeerHandleErrorZ_clone
+ * Method:    CResult_UnsignedChannelAnnouncementDecodeErrorZ_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelAnnouncementDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_boolPeerHandleErrorZ_ok
- * Signature: (Z)J
+ * Method:    CResult_UnsignedChannelAnnouncementDecodeErrorZ_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1ok
-  (JNIEnv *, jclass, jboolean);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelAnnouncementDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_boolPeerHandleErrorZ_err
+ * Method:    CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelAnnouncementDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_boolPeerHandleErrorZ_free
- * Signature: (J)V
+ * Method:    CResult_ChannelAnnouncementDecodeErrorZ_ok
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelAnnouncementDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_boolPeerHandleErrorZ_clone
+ * Method:    CResult_ChannelAnnouncementDecodeErrorZ_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelAnnouncementDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_SecretKeySecpErrorZ_ok
- * Signature: ([B)J
+ * Method:    CResult_ChannelAnnouncementDecodeErrorZ_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SecretKeySecpErrorZ_1ok
-  (JNIEnv *, jclass, jbyteArray);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelAnnouncementDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_SecretKeySecpErrorZ_err
- * Signature: (Lorg/ldk/enums/LDKSecp256k1Error;)J
+ * Method:    CResult_ChannelAnnouncementDecodeErrorZ_clone
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SecretKeySecpErrorZ_1err
-  (JNIEnv *, jclass, jobject);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelAnnouncementDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_SecretKeySecpErrorZ_free
- * Signature: (J)V
+ * Method:    CResult_UnsignedChannelUpdateDecodeErrorZ_ok
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SecretKeySecpErrorZ_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelUpdateDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_PublicKeySecpErrorZ_ok
- * Signature: ([B)J
+ * Method:    CResult_UnsignedChannelUpdateDecodeErrorZ_err
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecpErrorZ_1ok
-  (JNIEnv *, jclass, jbyteArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelUpdateDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_PublicKeySecpErrorZ_err
- * Signature: (Lorg/ldk/enums/LDKSecp256k1Error;)J
+ * Method:    CResult_UnsignedChannelUpdateDecodeErrorZ_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecpErrorZ_1err
-  (JNIEnv *, jclass, jobject);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelUpdateDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_PublicKeySecpErrorZ_free
- * Signature: (J)V
+ * Method:    CResult_UnsignedChannelUpdateDecodeErrorZ_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecpErrorZ_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelUpdateDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_TxCreationKeysSecpErrorZ_ok
+ * Method:    CResult_ChannelUpdateDecodeErrorZ_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysSecpErrorZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelUpdateDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_TxCreationKeysSecpErrorZ_err
- * Signature: (Lorg/ldk/enums/LDKSecp256k1Error;)J
+ * Method:    CResult_ChannelUpdateDecodeErrorZ_err
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysSecpErrorZ_1err
-  (JNIEnv *, jclass, jobject);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelUpdateDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_TxCreationKeysSecpErrorZ_free
+ * Method:    CResult_ChannelUpdateDecodeErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysSecpErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelUpdateDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_TrustedCommitmentTransactionNoneZ_ok
+ * Method:    CResult_ChannelUpdateDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TrustedCommitmentTransactionNoneZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelUpdateDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_TrustedCommitmentTransactionNoneZ_err
- * Signature: ()J
+ * Method:    CResult_ErrorMessageDecodeErrorZ_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TrustedCommitmentTransactionNoneZ_1err
-  (JNIEnv *, jclass);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ErrorMessageDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_TrustedCommitmentTransactionNoneZ_free
- * Signature: (J)V
+ * Method:    CResult_ErrorMessageDecodeErrorZ_err
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TrustedCommitmentTransactionNoneZ_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ErrorMessageDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_CVec_SignatureZNoneZ_ok
- * Signature: ([[B)J
+ * Method:    CResult_ErrorMessageDecodeErrorZ_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1ok
-  (JNIEnv *, jclass, jobjectArray);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ErrorMessageDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_CVec_SignatureZNoneZ_err
- * Signature: ()J
+ * Method:    CResult_ErrorMessageDecodeErrorZ_clone
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1err
-  (JNIEnv *, jclass);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ErrorMessageDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_CVec_SignatureZNoneZ_free
- * Signature: (J)V
+ * Method:    CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedNodeAnnouncementDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_CVec_SignatureZNoneZ_clone
+ * Method:    CResult_UnsignedNodeAnnouncementDecodeErrorZ_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedNodeAnnouncementDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_RouteHopZ_free
- * Signature: ([J)V
+ * Method:    CResult_UnsignedNodeAnnouncementDecodeErrorZ_free
+ * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1RouteHopZ_1free
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedNodeAnnouncementDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_CVec_RouteHopZZ_free
- * Signature: ([[J)V
+ * Method:    CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1CVec_1RouteHopZZ_1free
-  (JNIEnv *, jclass, jobjectArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedNodeAnnouncementDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_RouteDecodeErrorZ_ok
+ * Method:    CResult_NodeAnnouncementDecodeErrorZ_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RouteDecodeErrorZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_RouteDecodeErrorZ_err
+ * Method:    CResult_NodeAnnouncementDecodeErrorZ_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RouteDecodeErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_RouteDecodeErrorZ_free
+ * Method:    CResult_NodeAnnouncementDecodeErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RouteDecodeErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_RouteHintZ_free
- * Signature: ([J)V
+ * Method:    CResult_NodeAnnouncementDecodeErrorZ_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1RouteHintZ_1free
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_RouteLightningErrorZ_ok
+ * Method:    CResult_QueryShortChannelIdsDecodeErrorZ_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1QueryShortChannelIdsDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_RouteLightningErrorZ_err
+ * Method:    CResult_QueryShortChannelIdsDecodeErrorZ_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1QueryShortChannelIdsDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_RouteLightningErrorZ_free
+ * Method:    CResult_QueryShortChannelIdsDecodeErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1QueryShortChannelIdsDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_RoutingFeesDecodeErrorZ_ok
+ * Method:    CResult_QueryShortChannelIdsDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RoutingFeesDecodeErrorZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1QueryShortChannelIdsDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_RoutingFeesDecodeErrorZ_err
+ * Method:    CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RoutingFeesDecodeErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyShortChannelIdsEndDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_RoutingFeesDecodeErrorZ_free
+ * Method:    CResult_ReplyShortChannelIdsEndDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyShortChannelIdsEndDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ReplyShortChannelIdsEndDecodeErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RoutingFeesDecodeErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyShortChannelIdsEndDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NodeAnnouncementInfoDecodeErrorZ_ok
+ * Method:    CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementInfoDecodeErrorZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyShortChannelIdsEndDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NodeAnnouncementInfoDecodeErrorZ_err
+ * Method:    CResult_QueryChannelRangeDecodeErrorZ_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementInfoDecodeErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1QueryChannelRangeDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NodeAnnouncementInfoDecodeErrorZ_free
+ * Method:    CResult_QueryChannelRangeDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1QueryChannelRangeDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_QueryChannelRangeDecodeErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementInfoDecodeErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1QueryChannelRangeDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NodeAnnouncementInfoDecodeErrorZ_clone
+ * Method:    CResult_QueryChannelRangeDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementInfoDecodeErrorZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1QueryChannelRangeDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NodeInfoDecodeErrorZ_ok
+ * Method:    CResult_ReplyChannelRangeDecodeErrorZ_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeInfoDecodeErrorZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyChannelRangeDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NodeInfoDecodeErrorZ_err
+ * Method:    CResult_ReplyChannelRangeDecodeErrorZ_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeInfoDecodeErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyChannelRangeDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NodeInfoDecodeErrorZ_free
+ * Method:    CResult_ReplyChannelRangeDecodeErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NodeInfoDecodeErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyChannelRangeDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NodeInfoDecodeErrorZ_clone
+ * Method:    CResult_ReplyChannelRangeDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeInfoDecodeErrorZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyChannelRangeDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NetworkGraphDecodeErrorZ_ok
+ * Method:    CResult_GossipTimestampFilterDecodeErrorZ_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecodeErrorZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1GossipTimestampFilterDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NetworkGraphDecodeErrorZ_err
+ * Method:    CResult_GossipTimestampFilterDecodeErrorZ_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecodeErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1GossipTimestampFilterDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NetworkGraphDecodeErrorZ_free
+ * Method:    CResult_GossipTimestampFilterDecodeErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecodeErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1GossipTimestampFilterDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_GossipTimestampFilterDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1GossipTimestampFilterDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -3903,14 +5951,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Logger_1free
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    ChannelHandshakeConfig_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelHandshakeConfig_get_minimum_depth
@@ -3967,6 +6007,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1set_1o
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1new
   (JNIEnv *, jclass, jint, jshort, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelHandshakeConfig_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelHandshakeConfig_default
@@ -3983,14 +6031,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1defau
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    ChannelHandshakeLimits_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelHandshakeLimits_get_min_funding_satoshis
@@ -4159,6 +6199,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1t
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1new
   (JNIEnv *, jclass, jlong, jlong, jlong, jlong, jshort, jlong, jlong, jint, jboolean, jshort);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelHandshakeLimits_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelHandshakeLimits_default
@@ -4175,14 +6223,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1defau
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    ChannelConfig_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelConfig_get_fee_proportional_millionths
@@ -4239,6 +6279,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1set_1commit_1up
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1new
   (JNIEnv *, jclass, jint, jboolean, jboolean);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelConfig_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelConfig_default
@@ -4271,14 +6319,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1read
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UserConfig_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    UserConfig_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UserConfig_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    UserConfig_get_own_channel_config
@@ -4335,6 +6375,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UserConfig_1set_1channel_1opti
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UserConfig_1new
   (JNIEnv *, jclass, jlong, jlong, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    UserConfig_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UserConfig_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    UserConfig_default
@@ -4455,14 +6503,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1as_1EventsProvi
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    ChannelMonitorUpdate_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelMonitorUpdate_get_update_id
@@ -4479,6 +6519,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1get_1up
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1set_1update_1id
   (JNIEnv *, jclass, jlong, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMonitorUpdate_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelMonitorUpdate_write
@@ -4679,14 +6727,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMoni
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutPoint_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    OutPoint_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutPoint_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    OutPoint_get_txid
@@ -4724,8 +6764,16 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutPoint_1set_1index
  * Method:    OutPoint_new
  * Signature: ([BS)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutPoint_1new
-  (JNIEnv *, jclass, jbyteArray, jshort);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutPoint_1new
+  (JNIEnv *, jclass, jbyteArray, jshort);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OutPoint_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutPoint_1clone
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -4815,14 +6863,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_KeysInterface_1free
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    InMemoryChannelKeys_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    InMemoryChannelKeys_get_funding_key
@@ -4919,6 +6959,14 @@ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1commitment_1seed
   (JNIEnv *, jclass, jlong, jbyteArray);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InMemoryChannelKeys_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    InMemoryChannelKeys_new
@@ -5047,14 +7095,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1free
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    ChannelDetails_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelDetails_get_channel_id
@@ -5183,6 +7223,14 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1is_1l
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1is_1live
   (JNIEnv *, jclass, jlong, jboolean);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelDetails_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    PaymentSendFailure_free
@@ -5535,14 +7583,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Init_1clone
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    ErrorMessage_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ErrorMessage_get_channel_id
@@ -5585,18 +7625,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    Ping_free
- * Signature: (J)V
+ * Method:    ErrorMessage_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Ping_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    Ping_clone
- * Signature: (J)J
+ * Method:    Ping_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Ping_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Ping_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -5641,18 +7681,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Ping_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    Pong_free
- * Signature: (J)V
+ * Method:    Ping_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Pong_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Ping_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    Pong_clone
- * Signature: (J)J
+ * Method:    Pong_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Pong_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Pong_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -5681,18 +7721,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Pong_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_free
- * Signature: (J)V
+ * Method:    Pong_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Pong_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_clone
- * Signature: (J)J
+ * Method:    OpenChannel_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -5985,18 +8025,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1fla
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannel_free
- * Signature: (J)V
+ * Method:    OpenChannel_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannel_clone
- * Signature: (J)J
+ * Method:    AcceptChannel_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -6225,18 +8265,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1first_1per
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    FundingCreated_free
- * Signature: (J)V
+ * Method:    AcceptChannel_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    FundingCreated_clone
- * Signature: (J)J
+ * Method:    FundingCreated_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingCreated_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -6313,18 +8353,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingCreated_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    FundingSigned_free
- * Signature: (J)V
+ * Method:    FundingCreated_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingCreated_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    FundingSigned_clone
- * Signature: (J)J
+ * Method:    FundingSigned_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingSigned_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -6369,18 +8409,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingSigned_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    FundingLocked_free
- * Signature: (J)V
+ * Method:    FundingSigned_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingLocked_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingSigned_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    FundingLocked_clone
- * Signature: (J)J
+ * Method:    FundingLocked_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingLocked_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingLocked_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -6425,18 +8465,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingLocked_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    Shutdown_free
- * Signature: (J)V
+ * Method:    FundingLocked_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingLocked_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    Shutdown_clone
- * Signature: (J)J
+ * Method:    Shutdown_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Shutdown_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -6481,18 +8521,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Shutdown_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ClosingSigned_free
- * Signature: (J)V
+ * Method:    Shutdown_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Shutdown_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ClosingSigned_clone
- * Signature: (J)J
+ * Method:    ClosingSigned_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -6553,18 +8593,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    UpdateAddHTLC_free
- * Signature: (J)V
+ * Method:    ClosingSigned_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    UpdateAddHTLC_clone
- * Signature: (J)J
+ * Method:    UpdateAddHTLC_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -6649,18 +8689,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1cltv_1expi
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    UpdateFulfillHTLC_free
- * Signature: (J)V
+ * Method:    UpdateAddHTLC_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    UpdateFulfillHTLC_clone
- * Signature: (J)J
+ * Method:    UpdateFulfillHTLC_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -6721,18 +8761,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    UpdateFailHTLC_free
- * Signature: (J)V
+ * Method:    UpdateFulfillHTLC_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    UpdateFailHTLC_clone
- * Signature: (J)J
+ * Method:    UpdateFailHTLC_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -6769,18 +8809,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1set_1htlc_1id
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    UpdateFailMalformedHTLC_free
- * Signature: (J)V
+ * Method:    UpdateFailHTLC_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    UpdateFailMalformedHTLC_clone
- * Signature: (J)J
+ * Method:    UpdateFailMalformedHTLC_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -6833,18 +8873,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1set_1
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CommitmentSigned_free
- * Signature: (J)V
+ * Method:    UpdateFailMalformedHTLC_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CommitmentSigned_clone
- * Signature: (J)J
+ * Method:    CommitmentSigned_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -6897,18 +8937,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    RevokeAndACK_free
- * Signature: (J)V
+ * Method:    CommitmentSigned_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    RevokeAndACK_clone
- * Signature: (J)J
+ * Method:    RevokeAndACK_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -6969,18 +9009,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    UpdateFee_free
- * Signature: (J)V
+ * Method:    RevokeAndACK_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    UpdateFee_clone
- * Signature: (J)J
+ * Method:    UpdateFee_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFee_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -7025,18 +9065,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFee_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    DataLossProtect_free
- * Signature: (J)V
+ * Method:    UpdateFee_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFee_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    DataLossProtect_clone
- * Signature: (J)J
+ * Method:    DataLossProtect_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -7079,6 +9119,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1set_1my_1curr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1new
   (JNIEnv *, jclass, jbyteArray, jbyteArray);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    DataLossProtect_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelReestablish_free
@@ -7087,14 +9135,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1new
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    ChannelReestablish_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelReestablish_get_channel_id
@@ -7145,18 +9185,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1set_1next_
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AnnouncementSignatures_free
- * Signature: (J)V
+ * Method:    ChannelReestablish_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AnnouncementSignatures_clone
- * Signature: (J)J
+ * Method:    AnnouncementSignatures_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -7231,6 +9271,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1b
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1new
   (JNIEnv *, jclass, jbyteArray, jlong, jbyteArray, jbyteArray);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    AnnouncementSignatures_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    NetAddress_free
@@ -7271,14 +9319,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Result_1read
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    UnsignedNodeAnnouncement_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    UnsignedNodeAnnouncement_get_features
@@ -7369,18 +9409,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    NodeAnnouncement_free
- * Signature: (J)V
+ * Method:    UnsignedNodeAnnouncement_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    NodeAnnouncement_clone
- * Signature: (J)J
+ * Method:    NodeAnnouncement_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -7425,18 +9465,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    UnsignedChannelAnnouncement_free
- * Signature: (J)V
+ * Method:    NodeAnnouncement_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    UnsignedChannelAnnouncement_clone
- * Signature: (J)J
+ * Method:    UnsignedChannelAnnouncement_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -7553,18 +9593,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1s
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelAnnouncement_free
- * Signature: (J)V
+ * Method:    UnsignedChannelAnnouncement_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelAnnouncement_clone
- * Signature: (J)J
+ * Method:    ChannelAnnouncement_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -7657,18 +9697,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    UnsignedChannelUpdate_free
- * Signature: (J)V
+ * Method:    ChannelAnnouncement_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    UnsignedChannelUpdate_clone
- * Signature: (J)J
+ * Method:    UnsignedChannelUpdate_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -7801,18 +9841,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1fe
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelUpdate_free
- * Signature: (J)V
+ * Method:    UnsignedChannelUpdate_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelUpdate_clone
- * Signature: (J)J
+ * Method:    ChannelUpdate_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -7857,18 +9897,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    QueryChannelRange_free
- * Signature: (J)V
+ * Method:    ChannelUpdate_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    QueryChannelRange_clone
- * Signature: (J)J
+ * Method:    QueryChannelRange_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -7929,18 +9969,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ReplyChannelRange_free
- * Signature: (J)V
+ * Method:    QueryChannelRange_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ReplyChannelRange_clone
- * Signature: (J)J
+ * Method:    ReplyChannelRange_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -7993,18 +10033,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1set_1number
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ReplyChannelRange_get_full_information
+ * Method:    ReplyChannelRange_get_sync_complete
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1get_1full_1information
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1get_1sync_1complete
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ReplyChannelRange_set_full_information
+ * Method:    ReplyChannelRange_set_sync_complete
  * Signature: (JZ)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1set_1full_1information
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1set_1sync_1complete
   (JNIEnv *, jclass, jlong, jboolean);
 
 /*
@@ -8025,18 +10065,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    QueryShortChannelIds_free
- * Signature: (J)V
+ * Method:    ReplyChannelRange_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    QueryShortChannelIds_clone
- * Signature: (J)J
+ * Method:    QueryShortChannelIds_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -8073,18 +10113,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ReplyShortChannelIdsEnd_free
- * Signature: (J)V
+ * Method:    QueryShortChannelIds_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ReplyShortChannelIdsEnd_clone
- * Signature: (J)J
+ * Method:    ReplyShortChannelIdsEnd_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -8129,18 +10169,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    GossipTimestampFilter_free
- * Signature: (J)V
+ * Method:    ReplyShortChannelIdsEnd_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    GossipTimestampFilter_clone
- * Signature: (J)J
+ * Method:    GossipTimestampFilter_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -8199,6 +10239,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1set_1ti
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1new
   (JNIEnv *, jclass, jbyteArray, jint, jint);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    GossipTimestampFilter_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ErrorAction_free
@@ -8223,14 +10271,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ErrorAction_1clone
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LightningError_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    LightningError_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LightningError_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    LightningError_get_err
@@ -8273,18 +10313,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LightningError_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CommitmentUpdate_free
- * Signature: (J)V
+ * Method:    LightningError_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LightningError_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CommitmentUpdate_clone
- * Signature: (J)J
+ * Method:    CommitmentUpdate_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -8359,6 +10399,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1set_1commitm
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1new
   (JNIEnv *, jclass, jlongArray, jlongArray, jlongArray, jlongArray, jlong, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CommitmentUpdate_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    HTLCFailChannelUpdate_free
@@ -8959,14 +11007,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1free
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerHandleError_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    PeerHandleError_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeerHandleError_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    PeerHandleError_get_no_connection_possible
@@ -8991,6 +11031,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerHandleError_1set_1no_1conn
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeerHandleError_1new
   (JNIEnv *, jclass, jboolean);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    PeerHandleError_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeerHandleError_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    PeerManager_free
@@ -9127,14 +11175,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_derive_1public_1revocation_1k
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    TxCreationKeys_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    TxCreationKeys_get_per_commitment_point
@@ -9223,6 +11263,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1set_1broadcast
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1new
   (JNIEnv *, jclass, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    TxCreationKeys_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    TxCreationKeys_write
@@ -9247,14 +11295,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1read
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    ChannelPublicKeys_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelPublicKeys_get_funding_pubkey
@@ -9343,6 +11383,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1set_1htlc_1
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1new
   (JNIEnv *, jclass, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelPublicKeys_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelPublicKeys_write
@@ -9391,14 +11439,6 @@ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_get_1revokeable_1redeems
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    HTLCOutputInCommitment_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    HTLCOutputInCommitment_get_offered
@@ -9463,6 +11503,14 @@ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1set_1payment_1hash
   (JNIEnv *, jclass, jlong, jbyteArray);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    HTLCOutputInCommitment_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    HTLCOutputInCommitment_write
@@ -9511,14 +11559,6 @@ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_build_1htlc_1transaction
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelTransactionParameters_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    ChannelTransactionParameters_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelTransactionParameters_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelTransactionParameters_get_holder_pubkeys
@@ -9609,18 +11649,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelTransactionParameters_
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CounterpartyChannelTransactionParameters_free
- * Signature: (J)V
+ * Method:    ChannelTransactionParameters_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CounterpartyChannelTransactionParameters_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelTransactionParameters_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CounterpartyChannelTransactionParameters_clone
- * Signature: (J)J
+ * Method:    CounterpartyChannelTransactionParameters_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CounterpartyChannelTransactionParameters_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CounterpartyChannelTransactionParameters_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -9663,6 +11703,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CounterpartyChannelTransaction
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CounterpartyChannelTransactionParameters_1new
   (JNIEnv *, jclass, jlong, jshort);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CounterpartyChannelTransactionParameters_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CounterpartyChannelTransactionParameters_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelTransactionParameters_is_populated
@@ -9775,14 +11823,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DirectedChannelTransactionPar
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    HolderCommitmentTransaction_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    HolderCommitmentTransaction_get_counterparty_sig
@@ -9807,6 +11847,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1s
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1set_1counterparty_1htlc_1sigs
   (JNIEnv *, jclass, jlong, jobjectArray);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    HolderCommitmentTransaction_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    HolderCommitmentTransaction_write
@@ -9839,14 +11887,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BuiltCommitmentTransaction_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    BuiltCommitmentTransaction_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BuiltCommitmentTransaction_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    BuiltCommitmentTransaction_get_transaction
@@ -9887,6 +11927,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BuiltCommitmentTransaction_1se
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BuiltCommitmentTransaction_1new
   (JNIEnv *, jclass, jbyteArray, jbyteArray);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    BuiltCommitmentTransaction_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BuiltCommitmentTransaction_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    BuiltCommitmentTransaction_write
@@ -10047,6 +12095,30 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TrustedCommitmentTransaction_
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_get_1commitment_1transaction_1number_1obscure_1factor
   (JNIEnv *, jclass, jbyteArray, jbyteArray, jboolean);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InitFeatures_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InitFeatures_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    NodeFeatures_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelFeatures_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelFeatures_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    InitFeatures_free
@@ -10073,18 +12145,106 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelFeatures_1free
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    RouteHop_free
- * Signature: (J)V
+ * Method:    InitFeatures_empty
+ * Signature: ()J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHop_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InitFeatures_1empty
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InitFeatures_known
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InitFeatures_1known
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    NodeFeatures_empty
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1empty
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    NodeFeatures_known
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1known
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelFeatures_empty
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelFeatures_1empty
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelFeatures_known
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelFeatures_1known
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InitFeatures_write
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InitFeatures_1write
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    RouteHop_clone
- * Signature: (J)J
+ * Method:    NodeFeatures_write
+ * Signature: (J)[B
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHop_1clone
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1write
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelFeatures_write
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelFeatures_1write
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InitFeatures_read
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InitFeatures_1read
+  (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    NodeFeatures_read
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1read
+  (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelFeatures_read
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelFeatures_1read
+  (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RouteHop_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHop_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -10193,18 +12353,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHop_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    Route_free
- * Signature: (J)V
+ * Method:    RouteHop_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Route_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHop_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    Route_clone
- * Signature: (J)J
+ * Method:    Route_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Route_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Route_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -10223,6 +12383,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Route_1set_1paths
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Route_1new
   (JNIEnv *, jclass, jobjectArray);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Route_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Route_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Route_write
@@ -10247,14 +12415,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Route_1read
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    RouteHint_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHint_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    RouteHint_get_src_node_id
@@ -10343,6 +12503,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1set_1htlc_1minimum_
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHint_1new
   (JNIEnv *, jclass, jbyteArray, jlong, jlong, jshort, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RouteHint_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHint_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    get_route
@@ -10431,14 +12599,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetGraphMsgHandler_1as_1Messa
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    DirectionalChannelInfo_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    DirectionalChannelInfo_get_last_update
@@ -10535,6 +12695,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1get_1
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1set_1last_1update_1message
   (JNIEnv *, jclass, jlong, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    DirectionalChannelInfo_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    DirectionalChannelInfo_write
@@ -10679,14 +12847,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1read
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingFees_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    RoutingFees_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingFees_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    RoutingFees_get_base_msat
@@ -10727,6 +12887,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingFees_1set_1proportional
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingFees_1new
   (JNIEnv *, jclass, jint, jint);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RoutingFees_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingFees_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    RoutingFees_read
@@ -10751,14 +12919,6 @@ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_RoutingFees_1write
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    NodeAnnouncementInfo_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    NodeAnnouncementInfo_get_features
@@ -10855,6 +13015,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1set_1ann
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1new
   (JNIEnv *, jclass, jlong, jint, jbyteArray, jbyteArray, jlongArray, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    NodeAnnouncementInfo_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    NodeAnnouncementInfo_write
@@ -10879,14 +13047,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1read
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeInfo_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    NodeInfo_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeInfo_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    NodeInfo_set_channels
@@ -10935,6 +13095,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeInfo_1set_1announcement_1i
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeInfo_1new
   (JNIEnv *, jclass, jlongArray, jlong, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    NodeInfo_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeInfo_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    NodeInfo_write
index 5430855529668bc9bb1eb431da6897be00dded4d..7570bb2b10627dcba792f23e712975f99b895be3 100644 (file)
@@ -185,80 +185,527 @@ static inline LDKCVec_u8Z CVec_u8Z_clone(const LDKCVec_u8Z *orig) {
        memcpy(ret.data, orig->data, sizeof(int8_t) * ret.datalen);
        return ret;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_u64u64Z_new(int64_t a, int64_t b) {
-       LDKC2Tuple_u64u64Z* ret = MALLOC(sizeof(LDKC2Tuple_u64u64Z), "LDKC2Tuple_u64u64Z");
-       ret->a = a;
-       ret->b = b;
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_SecretKeyErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_SecretKeyErrorZ*)arg)->result_ok;
+}
+int8_tArray  __attribute__((visibility("default"))) TS_LDKCResult_SecretKeyErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_SecretKeyErrorZ *val = (LDKCResult_SecretKeyErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       int8_tArray res_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(res_arr + 4), (*val->contents.result).bytes, 32);
+       return res_arr;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_SecretKeyErrorZ_get_err(uint32_t arg) {
+       LDKCResult_SecretKeyErrorZ *val = (LDKCResult_SecretKeyErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       uint32_t err_conv = LDKSecp256k1Error_to_js((*val->contents.err));
+       return err_conv;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_PublicKeyErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_PublicKeyErrorZ*)arg)->result_ok;
+}
+int8_tArray  __attribute__((visibility("default"))) TS_LDKCResult_PublicKeyErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_PublicKeyErrorZ *val = (LDKCResult_PublicKeyErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       int8_tArray res_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(res_arr + 4), (*val->contents.result).compressed_form, 33);
+       return res_arr;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_PublicKeyErrorZ_get_err(uint32_t arg) {
+       LDKCResult_PublicKeyErrorZ *val = (LDKCResult_PublicKeyErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       uint32_t err_conv = LDKSecp256k1Error_to_js((*val->contents.err));
+       return err_conv;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_TxCreationKeysDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_TxCreationKeysDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_TxCreationKeysDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_TxCreationKeysDecodeErrorZ *val = (LDKCResult_TxCreationKeysDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKTxCreationKeys res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_TxCreationKeysDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_TxCreationKeysDecodeErrorZ *val = (LDKCResult_TxCreationKeysDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_ChannelPublicKeysDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_ChannelPublicKeysDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelPublicKeysDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_ChannelPublicKeysDecodeErrorZ *val = (LDKCResult_ChannelPublicKeysDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKChannelPublicKeys res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelPublicKeysDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_ChannelPublicKeysDecodeErrorZ *val = (LDKCResult_ChannelPublicKeysDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_TxCreationKeysErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_TxCreationKeysErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_TxCreationKeysErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_TxCreationKeysErrorZ *val = (LDKCResult_TxCreationKeysErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKTxCreationKeys res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_TxCreationKeysErrorZ_get_err(uint32_t arg) {
+       LDKCResult_TxCreationKeysErrorZ *val = (LDKCResult_TxCreationKeysErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       uint32_t err_conv = LDKSecp256k1Error_to_js((*val->contents.err));
+       return err_conv;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_HTLCOutputInCommitmentDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *val = (LDKCResult_HTLCOutputInCommitmentDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKHTLCOutputInCommitment res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *val = (LDKCResult_HTLCOutputInCommitmentDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *val = (LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKCounterpartyChannelTransactionParameters res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *val = (LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_ChannelTransactionParametersDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_ChannelTransactionParametersDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_ChannelTransactionParametersDecodeErrorZ *val = (LDKCResult_ChannelTransactionParametersDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKChannelTransactionParameters res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_ChannelTransactionParametersDecodeErrorZ *val = (LDKCResult_ChannelTransactionParametersDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_HolderCommitmentTransactionDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_HolderCommitmentTransactionDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_HolderCommitmentTransactionDecodeErrorZ *val = (LDKCResult_HolderCommitmentTransactionDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKHolderCommitmentTransaction res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_HolderCommitmentTransactionDecodeErrorZ *val = (LDKCResult_HolderCommitmentTransactionDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_BuiltCommitmentTransactionDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *val = (LDKCResult_BuiltCommitmentTransactionDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKBuiltCommitmentTransaction res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *val = (LDKCResult_BuiltCommitmentTransactionDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_CommitmentTransactionDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_CommitmentTransactionDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_CommitmentTransactionDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_CommitmentTransactionDecodeErrorZ *val = (LDKCResult_CommitmentTransactionDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKCommitmentTransaction res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_CommitmentTransactionDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_CommitmentTransactionDecodeErrorZ *val = (LDKCResult_CommitmentTransactionDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_TrustedCommitmentTransactionNoneZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_TrustedCommitmentTransactionNoneZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_TrustedCommitmentTransactionNoneZ_get_ok(uint32_t arg) {
+       LDKCResult_TrustedCommitmentTransactionNoneZ *val = (LDKCResult_TrustedCommitmentTransactionNoneZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKTrustedCommitmentTransaction res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+void  __attribute__((visibility("default"))) TS_LDKCResult_TrustedCommitmentTransactionNoneZ_get_err(uint32_t arg) {
+       LDKCResult_TrustedCommitmentTransactionNoneZ *val = (LDKCResult_TrustedCommitmentTransactionNoneZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       return *val->contents.err;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_CVec_SignatureZNoneZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_CVec_SignatureZNoneZ*)arg)->result_ok;
+}
+ptrArray  __attribute__((visibility("default"))) TS_LDKCResult_CVec_SignatureZNoneZ_get_ok(uint32_t arg) {
+       LDKCResult_CVec_SignatureZNoneZ *val = (LDKCResult_CVec_SignatureZNoneZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKCVec_SignatureZ res_var = (*val->contents.result);
+       ptrArray res_arr = init_arr(res_var.datalen, sizeof(uint32_t), "Native ptrArray Bytes");
+       int8_tArray *res_arr_ptr = (int8_tArray*)(res_arr + 4);
+       for (size_t m = 0; m < res_var.datalen; m++) {
+               int8_tArray arr_conv_12_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
+               memcpy((uint8_t*)(arr_conv_12_arr + 4), res_var.data[m].compact_form, 64);
+               res_arr_ptr[m] = arr_conv_12_arr;
+       }
+       return res_arr;
+}
+void  __attribute__((visibility("default"))) TS_LDKCResult_CVec_SignatureZNoneZ_get_err(uint32_t arg) {
+       LDKCResult_CVec_SignatureZNoneZ *val = (LDKCResult_CVec_SignatureZNoneZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       return *val->contents.err;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_CVec_u8ZPeerHandleErrorZ*)arg)->result_ok;
+}
+int8_tArray  __attribute__((visibility("default"))) TS_LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_CVec_u8ZPeerHandleErrorZ *val = (LDKCResult_CVec_u8ZPeerHandleErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKCVec_u8Z res_var = (*val->contents.result);
+       int8_tArray res_arr = init_arr(res_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(res_arr + 4), res_var.data, res_var.datalen);
+       return res_arr;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_CVec_u8ZPeerHandleErrorZ_get_err(uint32_t arg) {
+       LDKCResult_CVec_u8ZPeerHandleErrorZ *val = (LDKCResult_CVec_u8ZPeerHandleErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKPeerHandleError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_NonePeerHandleErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_NonePeerHandleErrorZ*)arg)->result_ok;
+}
+void  __attribute__((visibility("default"))) TS_LDKCResult_NonePeerHandleErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_NonePeerHandleErrorZ *val = (LDKCResult_NonePeerHandleErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       return *val->contents.result;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NonePeerHandleErrorZ_get_err(uint32_t arg) {
+       LDKCResult_NonePeerHandleErrorZ *val = (LDKCResult_NonePeerHandleErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKPeerHandleError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_boolPeerHandleErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_boolPeerHandleErrorZ*)arg)->result_ok;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_boolPeerHandleErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_boolPeerHandleErrorZ *val = (LDKCResult_boolPeerHandleErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       return *val->contents.result;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_boolPeerHandleErrorZ_get_err(uint32_t arg) {
+       LDKCResult_boolPeerHandleErrorZ *val = (LDKCResult_boolPeerHandleErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKPeerHandleError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_InitFeaturesDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_InitFeaturesDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_InitFeaturesDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_InitFeaturesDecodeErrorZ *val = (LDKCResult_InitFeaturesDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKInitFeatures res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_InitFeaturesDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_InitFeaturesDecodeErrorZ *val = (LDKCResult_InitFeaturesDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_NodeFeaturesDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_NodeFeaturesDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NodeFeaturesDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_NodeFeaturesDecodeErrorZ *val = (LDKCResult_NodeFeaturesDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKNodeFeatures res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NodeFeaturesDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_NodeFeaturesDecodeErrorZ *val = (LDKCResult_NodeFeaturesDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_ChannelFeaturesDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_ChannelFeaturesDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelFeaturesDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_ChannelFeaturesDecodeErrorZ *val = (LDKCResult_ChannelFeaturesDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKChannelFeatures res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelFeaturesDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_ChannelFeaturesDecodeErrorZ *val = (LDKCResult_ChannelFeaturesDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_ChannelConfigDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_ChannelConfigDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelConfigDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_ChannelConfigDecodeErrorZ *val = (LDKCResult_ChannelConfigDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKChannelConfig res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelConfigDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_ChannelConfigDecodeErrorZ *val = (LDKCResult_ChannelConfigDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_boolLightningErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_boolLightningErrorZ*)arg)->result_ok;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_boolLightningErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_boolLightningErrorZ *val = (LDKCResult_boolLightningErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       return *val->contents.result;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_boolLightningErrorZ_get_err(uint32_t arg) {
+       LDKCResult_boolLightningErrorZ *val = (LDKCResult_boolLightningErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKLightningError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(uint32_t a, uint32_t b, uint32_t c) {
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
+       LDKChannelAnnouncement a_conv;
+       a_conv.inner = (void*)(a & (~1));
+       a_conv.is_owned = (a & 1) || (a == 0);
+       a_conv = ChannelAnnouncement_clone(&a_conv);
+       ret->a = a_conv;
+       LDKChannelUpdate b_conv;
+       b_conv.inner = (void*)(b & (~1));
+       b_conv.is_owned = (b & 1) || (b == 0);
+       b_conv = ChannelUpdate_clone(&b_conv);
+       ret->b = b_conv;
+       LDKChannelUpdate c_conv;
+       c_conv.inner = (void*)(c & (~1));
+       c_conv.is_owned = (c & 1) || (c == 0);
+       c_conv = ChannelUpdate_clone(&c_conv);
+       ret->c = c_conv;
        return (long)ret;
 }
-int64_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_u64u64Z_get_a(uint32_t ptr) {
-       LDKC2Tuple_u64u64Z *tuple = (LDKC2Tuple_u64u64Z*)(ptr & ~1);
-       return tuple->a;
+uint32_t  __attribute__((visibility("default"))) TS_LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(uint32_t ptr) {
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *tuple = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(ptr & ~1);
+       LDKChannelAnnouncement a_var = tuple->a;
+       CHECK((((long)a_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&a_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long a_ref = (long)a_var.inner & ~1;
+       return a_ref;
 }
-int64_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_u64u64Z_get_b(uint32_t ptr) {
-       LDKC2Tuple_u64u64Z *tuple = (LDKC2Tuple_u64u64Z*)(ptr & ~1);
-       return tuple->b;
+uint32_t  __attribute__((visibility("default"))) TS_LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(uint32_t ptr) {
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *tuple = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(ptr & ~1);
+       LDKChannelUpdate b_var = tuple->b;
+       CHECK((((long)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long b_ref = (long)b_var.inner & ~1;
+       return b_ref;
 }
-uint32_t __attribute__((visibility("default"))) TS_LDKSpendableOutputDescriptor_ref_from_ptr(uint32_t ptr) {
-       LDKSpendableOutputDescriptor *obj = (LDKSpendableOutputDescriptor*)ptr;
-       switch(obj->tag) {
-               case LDKSpendableOutputDescriptor_StaticOutput: {
-                       LDKOutPoint outpoint_var = obj->static_output.outpoint;
-                       CHECK((((long)outpoint_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-                       CHECK((((long)&outpoint_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-                       long outpoint_ref = (long)outpoint_var.inner & ~1;
-                       long output_ref = ((long)&obj->static_output.output) | 1;
-                       return 0 /* LDKSpendableOutputDescriptor - StaticOutput */; (void) outpoint_ref; (void) (long)output_ref;
-               }
-               case LDKSpendableOutputDescriptor_DynamicOutputP2WSH: {
-                       LDKOutPoint outpoint_var = obj->dynamic_output_p2wsh.outpoint;
-                       CHECK((((long)outpoint_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-                       CHECK((((long)&outpoint_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-                       long outpoint_ref = (long)outpoint_var.inner & ~1;
-                       int8_tArray per_commitment_point_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-                       memcpy((uint8_t*)(per_commitment_point_arr + 4), obj->dynamic_output_p2wsh.per_commitment_point.compressed_form, 33);
-                       long output_ref = ((long)&obj->dynamic_output_p2wsh.output) | 1;
-                       long key_derivation_params_ref = (long)(&obj->dynamic_output_p2wsh.key_derivation_params) | 1;
-                       int8_tArray revocation_pubkey_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-                       memcpy((uint8_t*)(revocation_pubkey_arr + 4), obj->dynamic_output_p2wsh.revocation_pubkey.compressed_form, 33);
-                       return 0 /* LDKSpendableOutputDescriptor - DynamicOutputP2WSH */; (void) outpoint_ref; (void) per_commitment_point_arr; (void) obj->dynamic_output_p2wsh.to_self_delay; (void) (long)output_ref; (void) key_derivation_params_ref; (void) revocation_pubkey_arr;
-               }
-               case LDKSpendableOutputDescriptor_StaticOutputCounterpartyPayment: {
-                       LDKOutPoint outpoint_var = obj->static_output_counterparty_payment.outpoint;
-                       CHECK((((long)outpoint_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-                       CHECK((((long)&outpoint_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-                       long outpoint_ref = (long)outpoint_var.inner & ~1;
-                       long output_ref = ((long)&obj->static_output_counterparty_payment.output) | 1;
-                       long key_derivation_params_ref = (long)(&obj->static_output_counterparty_payment.key_derivation_params) | 1;
-                       return 0 /* LDKSpendableOutputDescriptor - StaticOutputCounterpartyPayment */; (void) outpoint_ref; (void) (long)output_ref; (void) key_derivation_params_ref;
+uint32_t  __attribute__((visibility("default"))) TS_LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(uint32_t ptr) {
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *tuple = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(ptr & ~1);
+       LDKChannelUpdate c_var = tuple->c;
+       CHECK((((long)c_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&c_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long c_ref = (long)c_var.inner & ~1;
+       return c_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new(uint32_tArray elems) {
+       LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ *ret = MALLOC(sizeof(LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ), "LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ");
+       ret->datalen = *((uint32_t*)elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ) * ret->datalen, "LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ Data");
+               uint32_t *java_elems = (uint32_t*)(elems + 4);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       uint32_t arr_elem = java_elems[i];
+                       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ arr_elem_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)arr_elem) & ~1);
+                       FREE((void*)arr_elem);
+                       ret->data[i] = arr_elem_conv;
                }
-               default: abort();
        }
+       return (long)ret;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_SpendableOutputDescriptorZ_new(uint32_tArray elems) {
-       LDKCVec_SpendableOutputDescriptorZ *ret = MALLOC(sizeof(LDKCVec_SpendableOutputDescriptorZ), "LDKCVec_SpendableOutputDescriptorZ");
+static inline LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_clone(const LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ *orig) {
+       LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ ret = { .data = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ) * orig->datalen, "LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(&orig->data[i]);
+       }
+       return ret;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_NodeAnnouncementZ_new(uint32_tArray elems) {
+       LDKCVec_NodeAnnouncementZ *ret = MALLOC(sizeof(LDKCVec_NodeAnnouncementZ), "LDKCVec_NodeAnnouncementZ");
        ret->datalen = *((uint32_t*)elems);
        if (ret->datalen == 0) {
                ret->data = NULL;
        } else {
-               ret->data = MALLOC(sizeof(LDKSpendableOutputDescriptor) * ret->datalen, "LDKCVec_SpendableOutputDescriptorZ Data");
+               ret->data = MALLOC(sizeof(LDKNodeAnnouncement) * ret->datalen, "LDKCVec_NodeAnnouncementZ Data");
                uint32_t *java_elems = (uint32_t*)(elems + 4);
                for (size_t i = 0; i < ret->datalen; i++) {
                        uint32_t arr_elem = java_elems[i];
-                       LDKSpendableOutputDescriptor arr_elem_conv = *(LDKSpendableOutputDescriptor*)(((uint64_t)arr_elem) & ~1);
-                       FREE((void*)arr_elem);
+                       LDKNodeAnnouncement arr_elem_conv;
+                       arr_elem_conv.inner = (void*)(arr_elem & (~1));
+                       arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
+                       arr_elem_conv = NodeAnnouncement_clone(&arr_elem_conv);
                        ret->data[i] = arr_elem_conv;
                }
        }
        return (long)ret;
 }
-static inline LDKCVec_SpendableOutputDescriptorZ CVec_SpendableOutputDescriptorZ_clone(const LDKCVec_SpendableOutputDescriptorZ *orig) {
-       LDKCVec_SpendableOutputDescriptorZ ret = { .data = MALLOC(sizeof(LDKSpendableOutputDescriptor) * orig->datalen, "LDKCVec_SpendableOutputDescriptorZ clone bytes"), .datalen = orig->datalen };
+static inline LDKCVec_NodeAnnouncementZ CVec_NodeAnnouncementZ_clone(const LDKCVec_NodeAnnouncementZ *orig) {
+       LDKCVec_NodeAnnouncementZ ret = { .data = MALLOC(sizeof(LDKNodeAnnouncement) * orig->datalen, "LDKCVec_NodeAnnouncementZ clone bytes"), .datalen = orig->datalen };
        for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = SpendableOutputDescriptor_clone(&orig->data[i]);
+               ret.data[i] = NodeAnnouncement_clone(&orig->data[i]);
        }
        return ret;
 }
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_NoneLightningErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_NoneLightningErrorZ*)arg)->result_ok;
+}
+void  __attribute__((visibility("default"))) TS_LDKCResult_NoneLightningErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_NoneLightningErrorZ *val = (LDKCResult_NoneLightningErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       return *val->contents.result;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NoneLightningErrorZ_get_err(uint32_t arg) {
+       LDKCResult_NoneLightningErrorZ *val = (LDKCResult_NoneLightningErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKLightningError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
 uint32_t __attribute__((visibility("default"))) TS_LDKErrorAction_ref_from_ptr(uint32_t ptr) {
        LDKErrorAction *obj = (LDKErrorAction*)ptr;
        switch(obj->tag) {
@@ -485,81 +932,201 @@ static inline LDKCVec_MessageSendEventZ CVec_MessageSendEventZ_clone(const LDKCV
        }
        return ret;
 }
-uint32_t __attribute__((visibility("default"))) TS_LDKEvent_ref_from_ptr(uint32_t ptr) {
-       LDKEvent *obj = (LDKEvent*)ptr;
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_DirectionalChannelInfoDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_DirectionalChannelInfoDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_DirectionalChannelInfoDecodeErrorZ *val = (LDKCResult_DirectionalChannelInfoDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKDirectionalChannelInfo res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_DirectionalChannelInfoDecodeErrorZ *val = (LDKCResult_DirectionalChannelInfoDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_ChannelInfoDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_ChannelInfoDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelInfoDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_ChannelInfoDecodeErrorZ *val = (LDKCResult_ChannelInfoDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKChannelInfo res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelInfoDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_ChannelInfoDecodeErrorZ *val = (LDKCResult_ChannelInfoDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_RoutingFeesDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_RoutingFeesDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_RoutingFeesDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_RoutingFeesDecodeErrorZ *val = (LDKCResult_RoutingFeesDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKRoutingFees res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_RoutingFeesDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_RoutingFeesDecodeErrorZ *val = (LDKCResult_RoutingFeesDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+uint32_t __attribute__((visibility("default"))) TS_LDKNetAddress_ref_from_ptr(uint32_t ptr) {
+       LDKNetAddress *obj = (LDKNetAddress*)ptr;
        switch(obj->tag) {
-               case LDKEvent_FundingGenerationReady: {
-                       int8_tArray temporary_channel_id_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
-                       memcpy((uint8_t*)(temporary_channel_id_arr + 4), obj->funding_generation_ready.temporary_channel_id.data, 32);
-                       LDKCVec_u8Z output_script_var = obj->funding_generation_ready.output_script;
-                       int8_tArray output_script_arr = init_arr(output_script_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-                       memcpy((uint8_t*)(output_script_arr + 4), output_script_var.data, output_script_var.datalen);
-                       return 0 /* LDKEvent - FundingGenerationReady */; (void) temporary_channel_id_arr; (void) obj->funding_generation_ready.channel_value_satoshis; (void) output_script_arr; (void) obj->funding_generation_ready.user_channel_id;
-               }
-               case LDKEvent_FundingBroadcastSafe: {
-                       LDKOutPoint funding_txo_var = obj->funding_broadcast_safe.funding_txo;
-                       CHECK((((long)funding_txo_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-                       CHECK((((long)&funding_txo_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-                       long funding_txo_ref = (long)funding_txo_var.inner & ~1;
-                       return 0 /* LDKEvent - FundingBroadcastSafe */; (void) funding_txo_ref; (void) obj->funding_broadcast_safe.user_channel_id;
-               }
-               case LDKEvent_PaymentReceived: {
-                       int8_tArray payment_hash_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
-                       memcpy((uint8_t*)(payment_hash_arr + 4), obj->payment_received.payment_hash.data, 32);
-                       int8_tArray payment_secret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
-                       memcpy((uint8_t*)(payment_secret_arr + 4), obj->payment_received.payment_secret.data, 32);
-                       return 0 /* LDKEvent - PaymentReceived */; (void) payment_hash_arr; (void) payment_secret_arr; (void) obj->payment_received.amt;
-               }
-               case LDKEvent_PaymentSent: {
-                       int8_tArray payment_preimage_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
-                       memcpy((uint8_t*)(payment_preimage_arr + 4), obj->payment_sent.payment_preimage.data, 32);
-                       return 0 /* LDKEvent - PaymentSent */; (void) payment_preimage_arr;
+               case LDKNetAddress_IPv4: {
+                       int8_tArray addr_arr = init_arr(4, sizeof(uint8_t), "Native int8_tArray Bytes");
+                       memcpy((uint8_t*)(addr_arr + 4), obj->i_pv4.addr.data, 4);
+                       return 0 /* LDKNetAddress - IPv4 */; (void) addr_arr; (void) obj->i_pv4.port;
                }
-               case LDKEvent_PaymentFailed: {
-                       int8_tArray payment_hash_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
-                       memcpy((uint8_t*)(payment_hash_arr + 4), obj->payment_failed.payment_hash.data, 32);
-                       return 0 /* LDKEvent - PaymentFailed */; (void) payment_hash_arr; (void) obj->payment_failed.rejected_by_dest;
+               case LDKNetAddress_IPv6: {
+                       int8_tArray addr_arr = init_arr(16, sizeof(uint8_t), "Native int8_tArray Bytes");
+                       memcpy((uint8_t*)(addr_arr + 4), obj->i_pv6.addr.data, 16);
+                       return 0 /* LDKNetAddress - IPv6 */; (void) addr_arr; (void) obj->i_pv6.port;
                }
-               case LDKEvent_PendingHTLCsForwardable: {
-                       return 0 /* LDKEvent - PendingHTLCsForwardable */; (void) obj->pending_htl_cs_forwardable.time_forwardable;
+               case LDKNetAddress_OnionV2: {
+                       int8_tArray addr_arr = init_arr(10, sizeof(uint8_t), "Native int8_tArray Bytes");
+                       memcpy((uint8_t*)(addr_arr + 4), obj->onion_v2.addr.data, 10);
+                       return 0 /* LDKNetAddress - OnionV2 */; (void) addr_arr; (void) obj->onion_v2.port;
                }
-               case LDKEvent_SpendableOutputs: {
-                       LDKCVec_SpendableOutputDescriptorZ outputs_var = obj->spendable_outputs.outputs;
-                       uint32_tArray outputs_arr = init_arr(outputs_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
-                       uint32_t *outputs_arr_ptr = (uint32_t*)(outputs_arr + 4);
-                       for (size_t b = 0; b < outputs_var.datalen; b++) {
-                               long arr_conv_27_ref = ((long)&outputs_var.data[b]) | 1;
-                               outputs_arr_ptr[b] = arr_conv_27_ref;
-                       }
-                       return 0 /* LDKEvent - SpendableOutputs */; (void) outputs_arr;
+               case LDKNetAddress_OnionV3: {
+                       int8_tArray ed25519_pubkey_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+                       memcpy((uint8_t*)(ed25519_pubkey_arr + 4), obj->onion_v3.ed25519_pubkey.data, 32);
+                       return 0 /* LDKNetAddress - OnionV3 */; (void) ed25519_pubkey_arr; (void) obj->onion_v3.checksum; (void) obj->onion_v3.version; (void) obj->onion_v3.port;
                }
                default: abort();
        }
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_EventZ_new(uint32_tArray elems) {
-       LDKCVec_EventZ *ret = MALLOC(sizeof(LDKCVec_EventZ), "LDKCVec_EventZ");
+uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_NetAddressZ_new(uint32_tArray elems) {
+       LDKCVec_NetAddressZ *ret = MALLOC(sizeof(LDKCVec_NetAddressZ), "LDKCVec_NetAddressZ");
        ret->datalen = *((uint32_t*)elems);
        if (ret->datalen == 0) {
                ret->data = NULL;
        } else {
-               ret->data = MALLOC(sizeof(LDKEvent) * ret->datalen, "LDKCVec_EventZ Data");
+               ret->data = MALLOC(sizeof(LDKNetAddress) * ret->datalen, "LDKCVec_NetAddressZ Data");
                uint32_t *java_elems = (uint32_t*)(elems + 4);
                for (size_t i = 0; i < ret->datalen; i++) {
                        uint32_t arr_elem = java_elems[i];
-                       LDKEvent arr_elem_conv = *(LDKEvent*)(((uint64_t)arr_elem) & ~1);
+                       LDKNetAddress arr_elem_conv = *(LDKNetAddress*)(((uint64_t)arr_elem) & ~1);
                        FREE((void*)arr_elem);
                        ret->data[i] = arr_elem_conv;
                }
        }
        return (long)ret;
 }
-static inline LDKCVec_EventZ CVec_EventZ_clone(const LDKCVec_EventZ *orig) {
-       LDKCVec_EventZ ret = { .data = MALLOC(sizeof(LDKEvent) * orig->datalen, "LDKCVec_EventZ clone bytes"), .datalen = orig->datalen };
+static inline LDKCVec_NetAddressZ CVec_NetAddressZ_clone(const LDKCVec_NetAddressZ *orig) {
+       LDKCVec_NetAddressZ ret = { .data = MALLOC(sizeof(LDKNetAddress) * orig->datalen, "LDKCVec_NetAddressZ clone bytes"), .datalen = orig->datalen };
        for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = Event_clone(&orig->data[i]);
+               ret.data[i] = NetAddress_clone(&orig->data[i]);
+       }
+       return ret;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_NodeAnnouncementInfoDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_NodeAnnouncementInfoDecodeErrorZ *val = (LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKNodeAnnouncementInfo res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_NodeAnnouncementInfoDecodeErrorZ *val = (LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_u64Z_new(int64_tArray elems) {
+       LDKCVec_u64Z *ret = MALLOC(sizeof(LDKCVec_u64Z), "LDKCVec_u64Z");
+       ret->datalen = *((uint32_t*)elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(uint64_t) * ret->datalen, "LDKCVec_u64Z Data");
+               int64_t *java_elems = (int64_t*)(elems + 4);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       ret->data[i] = java_elems[i];
+               }
        }
+       return (long)ret;
+}
+static inline LDKCVec_u64Z CVec_u64Z_clone(const LDKCVec_u64Z *orig) {
+       LDKCVec_u64Z ret = { .data = MALLOC(sizeof(int64_t) * orig->datalen, "LDKCVec_u64Z clone bytes"), .datalen = orig->datalen };
+       memcpy(ret.data, orig->data, sizeof(int64_t) * ret.datalen);
        return ret;
 }
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_NodeInfoDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_NodeInfoDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NodeInfoDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_NodeInfoDecodeErrorZ *val = (LDKCResult_NodeInfoDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKNodeInfo res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NodeInfoDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_NodeInfoDecodeErrorZ *val = (LDKCResult_NodeInfoDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_NetworkGraphDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_NetworkGraphDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NetworkGraphDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_NetworkGraphDecodeErrorZ *val = (LDKCResult_NetworkGraphDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKNetworkGraph res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NetworkGraphDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_NetworkGraphDecodeErrorZ *val = (LDKCResult_NetworkGraphDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
 uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_usizeTransactionZ_new(int64_t a, int8_tArray b) {
        LDKC2Tuple_usizeTransactionZ* ret = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
        ret->a = a;
@@ -613,32 +1180,202 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NoneChannelMonito
        uint32_t err_conv = LDKChannelMonitorUpdateErr_to_js((*val->contents.err));
        return err_conv;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_MonitorEventZ_new(uint32_tArray elems) {
-       LDKCVec_MonitorEventZ *ret = MALLOC(sizeof(LDKCVec_MonitorEventZ), "LDKCVec_MonitorEventZ");
+uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_MonitorEventZ_new(uint32_tArray elems) {
+       LDKCVec_MonitorEventZ *ret = MALLOC(sizeof(LDKCVec_MonitorEventZ), "LDKCVec_MonitorEventZ");
+       ret->datalen = *((uint32_t*)elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(LDKMonitorEvent) * ret->datalen, "LDKCVec_MonitorEventZ Data");
+               uint32_t *java_elems = (uint32_t*)(elems + 4);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       uint32_t arr_elem = java_elems[i];
+                       LDKMonitorEvent arr_elem_conv;
+                       arr_elem_conv.inner = (void*)(arr_elem & (~1));
+                       arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
+                       arr_elem_conv = MonitorEvent_clone(&arr_elem_conv);
+                       ret->data[i] = arr_elem_conv;
+               }
+       }
+       return (long)ret;
+}
+static inline LDKCVec_MonitorEventZ CVec_MonitorEventZ_clone(const LDKCVec_MonitorEventZ *orig) {
+       LDKCVec_MonitorEventZ ret = { .data = MALLOC(sizeof(LDKMonitorEvent) * orig->datalen, "LDKCVec_MonitorEventZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = MonitorEvent_clone(&orig->data[i]);
+       }
+       return ret;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_u64u64Z_new(int64_t a, int64_t b) {
+       LDKC2Tuple_u64u64Z* ret = MALLOC(sizeof(LDKC2Tuple_u64u64Z), "LDKC2Tuple_u64u64Z");
+       ret->a = a;
+       ret->b = b;
+       return (long)ret;
+}
+int64_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_u64u64Z_get_a(uint32_t ptr) {
+       LDKC2Tuple_u64u64Z *tuple = (LDKC2Tuple_u64u64Z*)(ptr & ~1);
+       return tuple->a;
+}
+int64_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_u64u64Z_get_b(uint32_t ptr) {
+       LDKC2Tuple_u64u64Z *tuple = (LDKC2Tuple_u64u64Z*)(ptr & ~1);
+       return tuple->b;
+}
+uint32_t __attribute__((visibility("default"))) TS_LDKSpendableOutputDescriptor_ref_from_ptr(uint32_t ptr) {
+       LDKSpendableOutputDescriptor *obj = (LDKSpendableOutputDescriptor*)ptr;
+       switch(obj->tag) {
+               case LDKSpendableOutputDescriptor_StaticOutput: {
+                       LDKOutPoint outpoint_var = obj->static_output.outpoint;
+                       CHECK((((long)outpoint_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+                       CHECK((((long)&outpoint_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+                       long outpoint_ref = (long)outpoint_var.inner & ~1;
+                       long output_ref = ((long)&obj->static_output.output) | 1;
+                       return 0 /* LDKSpendableOutputDescriptor - StaticOutput */; (void) outpoint_ref; (void) (long)output_ref;
+               }
+               case LDKSpendableOutputDescriptor_DynamicOutputP2WSH: {
+                       LDKOutPoint outpoint_var = obj->dynamic_output_p2wsh.outpoint;
+                       CHECK((((long)outpoint_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+                       CHECK((((long)&outpoint_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+                       long outpoint_ref = (long)outpoint_var.inner & ~1;
+                       int8_tArray per_commitment_point_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+                       memcpy((uint8_t*)(per_commitment_point_arr + 4), obj->dynamic_output_p2wsh.per_commitment_point.compressed_form, 33);
+                       long output_ref = ((long)&obj->dynamic_output_p2wsh.output) | 1;
+                       long key_derivation_params_ref = (long)(&obj->dynamic_output_p2wsh.key_derivation_params) | 1;
+                       int8_tArray revocation_pubkey_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+                       memcpy((uint8_t*)(revocation_pubkey_arr + 4), obj->dynamic_output_p2wsh.revocation_pubkey.compressed_form, 33);
+                       return 0 /* LDKSpendableOutputDescriptor - DynamicOutputP2WSH */; (void) outpoint_ref; (void) per_commitment_point_arr; (void) obj->dynamic_output_p2wsh.to_self_delay; (void) (long)output_ref; (void) key_derivation_params_ref; (void) revocation_pubkey_arr;
+               }
+               case LDKSpendableOutputDescriptor_StaticOutputCounterpartyPayment: {
+                       LDKOutPoint outpoint_var = obj->static_output_counterparty_payment.outpoint;
+                       CHECK((((long)outpoint_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+                       CHECK((((long)&outpoint_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+                       long outpoint_ref = (long)outpoint_var.inner & ~1;
+                       long output_ref = ((long)&obj->static_output_counterparty_payment.output) | 1;
+                       long key_derivation_params_ref = (long)(&obj->static_output_counterparty_payment.key_derivation_params) | 1;
+                       return 0 /* LDKSpendableOutputDescriptor - StaticOutputCounterpartyPayment */; (void) outpoint_ref; (void) (long)output_ref; (void) key_derivation_params_ref;
+               }
+               default: abort();
+       }
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_SpendableOutputDescriptorZ_new(uint32_tArray elems) {
+       LDKCVec_SpendableOutputDescriptorZ *ret = MALLOC(sizeof(LDKCVec_SpendableOutputDescriptorZ), "LDKCVec_SpendableOutputDescriptorZ");
+       ret->datalen = *((uint32_t*)elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(LDKSpendableOutputDescriptor) * ret->datalen, "LDKCVec_SpendableOutputDescriptorZ Data");
+               uint32_t *java_elems = (uint32_t*)(elems + 4);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       uint32_t arr_elem = java_elems[i];
+                       LDKSpendableOutputDescriptor arr_elem_conv = *(LDKSpendableOutputDescriptor*)(((uint64_t)arr_elem) & ~1);
+                       FREE((void*)arr_elem);
+                       ret->data[i] = arr_elem_conv;
+               }
+       }
+       return (long)ret;
+}
+static inline LDKCVec_SpendableOutputDescriptorZ CVec_SpendableOutputDescriptorZ_clone(const LDKCVec_SpendableOutputDescriptorZ *orig) {
+       LDKCVec_SpendableOutputDescriptorZ ret = { .data = MALLOC(sizeof(LDKSpendableOutputDescriptor) * orig->datalen, "LDKCVec_SpendableOutputDescriptorZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = SpendableOutputDescriptor_clone(&orig->data[i]);
+       }
+       return ret;
+}
+uint32_t __attribute__((visibility("default"))) TS_LDKEvent_ref_from_ptr(uint32_t ptr) {
+       LDKEvent *obj = (LDKEvent*)ptr;
+       switch(obj->tag) {
+               case LDKEvent_FundingGenerationReady: {
+                       int8_tArray temporary_channel_id_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+                       memcpy((uint8_t*)(temporary_channel_id_arr + 4), obj->funding_generation_ready.temporary_channel_id.data, 32);
+                       LDKCVec_u8Z output_script_var = obj->funding_generation_ready.output_script;
+                       int8_tArray output_script_arr = init_arr(output_script_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+                       memcpy((uint8_t*)(output_script_arr + 4), output_script_var.data, output_script_var.datalen);
+                       return 0 /* LDKEvent - FundingGenerationReady */; (void) temporary_channel_id_arr; (void) obj->funding_generation_ready.channel_value_satoshis; (void) output_script_arr; (void) obj->funding_generation_ready.user_channel_id;
+               }
+               case LDKEvent_FundingBroadcastSafe: {
+                       LDKOutPoint funding_txo_var = obj->funding_broadcast_safe.funding_txo;
+                       CHECK((((long)funding_txo_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+                       CHECK((((long)&funding_txo_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+                       long funding_txo_ref = (long)funding_txo_var.inner & ~1;
+                       return 0 /* LDKEvent - FundingBroadcastSafe */; (void) funding_txo_ref; (void) obj->funding_broadcast_safe.user_channel_id;
+               }
+               case LDKEvent_PaymentReceived: {
+                       int8_tArray payment_hash_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+                       memcpy((uint8_t*)(payment_hash_arr + 4), obj->payment_received.payment_hash.data, 32);
+                       int8_tArray payment_secret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+                       memcpy((uint8_t*)(payment_secret_arr + 4), obj->payment_received.payment_secret.data, 32);
+                       return 0 /* LDKEvent - PaymentReceived */; (void) payment_hash_arr; (void) payment_secret_arr; (void) obj->payment_received.amt;
+               }
+               case LDKEvent_PaymentSent: {
+                       int8_tArray payment_preimage_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+                       memcpy((uint8_t*)(payment_preimage_arr + 4), obj->payment_sent.payment_preimage.data, 32);
+                       return 0 /* LDKEvent - PaymentSent */; (void) payment_preimage_arr;
+               }
+               case LDKEvent_PaymentFailed: {
+                       int8_tArray payment_hash_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+                       memcpy((uint8_t*)(payment_hash_arr + 4), obj->payment_failed.payment_hash.data, 32);
+                       return 0 /* LDKEvent - PaymentFailed */; (void) payment_hash_arr; (void) obj->payment_failed.rejected_by_dest;
+               }
+               case LDKEvent_PendingHTLCsForwardable: {
+                       return 0 /* LDKEvent - PendingHTLCsForwardable */; (void) obj->pending_htl_cs_forwardable.time_forwardable;
+               }
+               case LDKEvent_SpendableOutputs: {
+                       LDKCVec_SpendableOutputDescriptorZ outputs_var = obj->spendable_outputs.outputs;
+                       uint32_tArray outputs_arr = init_arr(outputs_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
+                       uint32_t *outputs_arr_ptr = (uint32_t*)(outputs_arr + 4);
+                       for (size_t b = 0; b < outputs_var.datalen; b++) {
+                               long arr_conv_27_ref = ((long)&outputs_var.data[b]) | 1;
+                               outputs_arr_ptr[b] = arr_conv_27_ref;
+                       }
+                       return 0 /* LDKEvent - SpendableOutputs */; (void) outputs_arr;
+               }
+               default: abort();
+       }
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_EventZ_new(uint32_tArray elems) {
+       LDKCVec_EventZ *ret = MALLOC(sizeof(LDKCVec_EventZ), "LDKCVec_EventZ");
        ret->datalen = *((uint32_t*)elems);
        if (ret->datalen == 0) {
                ret->data = NULL;
        } else {
-               ret->data = MALLOC(sizeof(LDKMonitorEvent) * ret->datalen, "LDKCVec_MonitorEventZ Data");
+               ret->data = MALLOC(sizeof(LDKEvent) * ret->datalen, "LDKCVec_EventZ Data");
                uint32_t *java_elems = (uint32_t*)(elems + 4);
                for (size_t i = 0; i < ret->datalen; i++) {
                        uint32_t arr_elem = java_elems[i];
-                       LDKMonitorEvent arr_elem_conv;
-                       arr_elem_conv.inner = (void*)(arr_elem & (~1));
-                       arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
-                       arr_elem_conv = MonitorEvent_clone(&arr_elem_conv);
+                       LDKEvent arr_elem_conv = *(LDKEvent*)(((uint64_t)arr_elem) & ~1);
+                       FREE((void*)arr_elem);
                        ret->data[i] = arr_elem_conv;
                }
        }
        return (long)ret;
 }
-static inline LDKCVec_MonitorEventZ CVec_MonitorEventZ_clone(const LDKCVec_MonitorEventZ *orig) {
-       LDKCVec_MonitorEventZ ret = { .data = MALLOC(sizeof(LDKMonitorEvent) * orig->datalen, "LDKCVec_MonitorEventZ clone bytes"), .datalen = orig->datalen };
+static inline LDKCVec_EventZ CVec_EventZ_clone(const LDKCVec_EventZ *orig) {
+       LDKCVec_EventZ ret = { .data = MALLOC(sizeof(LDKEvent) * orig->datalen, "LDKCVec_EventZ clone bytes"), .datalen = orig->datalen };
        for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = MonitorEvent_clone(&orig->data[i]);
+               ret.data[i] = Event_clone(&orig->data[i]);
        }
        return ret;
 }
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_OutPointDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_OutPointDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_OutPointDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_OutPointDecodeErrorZ *val = (LDKCResult_OutPointDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKOutPoint res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_OutPointDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_OutPointDecodeErrorZ *val = (LDKCResult_OutPointDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
 jboolean  __attribute__((visibility("default"))) TS_LDKCResult_ChannelMonitorUpdateDecodeErrorZ_result_ok(uint32_t arg) {
        return ((LDKCResult_ChannelMonitorUpdateDecodeErrorZ*)arg)->result_ok;
 }
@@ -660,6 +1397,27 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelMonitorUpd
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_HTLCUpdateDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_HTLCUpdateDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_HTLCUpdateDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_HTLCUpdateDecodeErrorZ *val = (LDKCResult_HTLCUpdateDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKHTLCUpdate res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_HTLCUpdateDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_HTLCUpdateDecodeErrorZ *val = (LDKCResult_HTLCUpdateDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
 jboolean  __attribute__((visibility("default"))) TS_LDKCResult_NoneMonitorUpdateErrorZ_result_ok(uint32_t arg) {
        return ((LDKCResult_NoneMonitorUpdateErrorZ*)arg)->result_ok;
 }
@@ -1265,64 +2023,6 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_BlockHash
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_SpendableOutputDescriptorDecodeErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_SpendableOutputDescriptorDecodeErrorZ*)arg)->result_ok;
-}
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_SpendableOutputDescriptorDecodeErrorZ *val = (LDKCResult_SpendableOutputDescriptorDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       long res_ref = ((long)&(*val->contents.result)) | 1;
-       return res_ref;
-}
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_err(uint32_t arg) {
-       LDKCResult_SpendableOutputDescriptorDecodeErrorZ *val = (LDKCResult_SpendableOutputDescriptorDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
-}
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_ChanKeySignerDecodeErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_ChanKeySignerDecodeErrorZ*)arg)->result_ok;
-}
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChanKeySignerDecodeErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_ChanKeySignerDecodeErrorZ *val = (LDKCResult_ChanKeySignerDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKChannelKeys* ret = MALLOC(sizeof(LDKChannelKeys), "LDKChannelKeys");
-       *ret = ChannelKeys_clone(&(*val->contents.result));
-       return (long)ret;
-}
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChanKeySignerDecodeErrorZ_get_err(uint32_t arg) {
-       LDKCResult_ChanKeySignerDecodeErrorZ *val = (LDKCResult_ChanKeySignerDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
-}
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_InMemoryChannelKeysDecodeErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_InMemoryChannelKeysDecodeErrorZ*)arg)->result_ok;
-}
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_InMemoryChannelKeysDecodeErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_InMemoryChannelKeysDecodeErrorZ *val = (LDKCResult_InMemoryChannelKeysDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKInMemoryChannelKeys res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
-}
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_InMemoryChannelKeysDecodeErrorZ_get_err(uint32_t arg) {
-       LDKCResult_InMemoryChannelKeysDecodeErrorZ *val = (LDKCResult_InMemoryChannelKeysDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
-}
 jboolean  __attribute__((visibility("default"))) TS_LDKCResult_TxOutAccessErrorZ_result_ok(uint32_t arg) {
        return ((LDKCResult_TxOutAccessErrorZ*)arg)->result_ok;
 }
@@ -1427,56 +2127,6 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NonePaymentSendFa
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-uint32_t __attribute__((visibility("default"))) TS_LDKNetAddress_ref_from_ptr(uint32_t ptr) {
-       LDKNetAddress *obj = (LDKNetAddress*)ptr;
-       switch(obj->tag) {
-               case LDKNetAddress_IPv4: {
-                       int8_tArray addr_arr = init_arr(4, sizeof(uint8_t), "Native int8_tArray Bytes");
-                       memcpy((uint8_t*)(addr_arr + 4), obj->i_pv4.addr.data, 4);
-                       return 0 /* LDKNetAddress - IPv4 */; (void) addr_arr; (void) obj->i_pv4.port;
-               }
-               case LDKNetAddress_IPv6: {
-                       int8_tArray addr_arr = init_arr(16, sizeof(uint8_t), "Native int8_tArray Bytes");
-                       memcpy((uint8_t*)(addr_arr + 4), obj->i_pv6.addr.data, 16);
-                       return 0 /* LDKNetAddress - IPv6 */; (void) addr_arr; (void) obj->i_pv6.port;
-               }
-               case LDKNetAddress_OnionV2: {
-                       int8_tArray addr_arr = init_arr(10, sizeof(uint8_t), "Native int8_tArray Bytes");
-                       memcpy((uint8_t*)(addr_arr + 4), obj->onion_v2.addr.data, 10);
-                       return 0 /* LDKNetAddress - OnionV2 */; (void) addr_arr; (void) obj->onion_v2.port;
-               }
-               case LDKNetAddress_OnionV3: {
-                       int8_tArray ed25519_pubkey_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
-                       memcpy((uint8_t*)(ed25519_pubkey_arr + 4), obj->onion_v3.ed25519_pubkey.data, 32);
-                       return 0 /* LDKNetAddress - OnionV3 */; (void) ed25519_pubkey_arr; (void) obj->onion_v3.checksum; (void) obj->onion_v3.version; (void) obj->onion_v3.port;
-               }
-               default: abort();
-       }
-}
-uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_NetAddressZ_new(uint32_tArray elems) {
-       LDKCVec_NetAddressZ *ret = MALLOC(sizeof(LDKCVec_NetAddressZ), "LDKCVec_NetAddressZ");
-       ret->datalen = *((uint32_t*)elems);
-       if (ret->datalen == 0) {
-               ret->data = NULL;
-       } else {
-               ret->data = MALLOC(sizeof(LDKNetAddress) * ret->datalen, "LDKCVec_NetAddressZ Data");
-               uint32_t *java_elems = (uint32_t*)(elems + 4);
-               for (size_t i = 0; i < ret->datalen; i++) {
-                       uint32_t arr_elem = java_elems[i];
-                       LDKNetAddress arr_elem_conv = *(LDKNetAddress*)(((uint64_t)arr_elem) & ~1);
-                       FREE((void*)arr_elem);
-                       ret->data[i] = arr_elem_conv;
-               }
-       }
-       return (long)ret;
-}
-static inline LDKCVec_NetAddressZ CVec_NetAddressZ_clone(const LDKCVec_NetAddressZ *orig) {
-       LDKCVec_NetAddressZ ret = { .data = MALLOC(sizeof(LDKNetAddress) * orig->datalen, "LDKCVec_NetAddressZ clone bytes"), .datalen = orig->datalen };
-       for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = NetAddress_clone(&orig->data[i]);
-       }
-       return ret;
-}
 uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_ChannelMonitorZ_new(uint32_tArray elems) {
        LDKCVec_ChannelMonitorZ *ret = MALLOC(sizeof(LDKCVec_ChannelMonitorZ), "LDKCVec_ChannelMonitorZ");
        ret->datalen = *((uint32_t*)elems);
@@ -1704,6 +2354,25 @@ void  __attribute__((visibility("default"))) TS_BroadcasterInterface_broadcast_t
        (this_arg_conv->broadcast_transaction)(this_arg_conv->this_arg, tx_ref);
 }
 
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_ChannelKeysDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_ChannelKeysDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelKeysDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_ChannelKeysDecodeErrorZ *val = (LDKCResult_ChannelKeysDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKChannelKeys* ret = MALLOC(sizeof(LDKChannelKeys), "LDKChannelKeys");
+       *ret = ChannelKeys_clone(&(*val->contents.result));
+       return (long)ret;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelKeysDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_ChannelKeysDecodeErrorZ *val = (LDKCResult_ChannelKeysDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
 typedef struct LDKKeysInterface_JCalls {
        atomic_size_t refcnt;
        uint32_t get_node_secret_meth;
@@ -1765,14 +2434,14 @@ LDKThirtyTwoBytes get_secure_random_bytes_jcall(const void* this_arg) {
        memcpy(arg_ref.data, (uint8_t*)(arg + 4), 32);
        return arg_ref;
 }
-LDKCResult_ChanKeySignerDecodeErrorZ read_chan_signer_jcall(const void* this_arg, LDKu8slice reader) {
+LDKCResult_ChannelKeysDecodeErrorZ read_chan_signer_jcall(const void* this_arg, LDKu8slice reader) {
        LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
        LDKu8slice reader_var = reader;
        int8_tArray reader_arr = init_arr(reader_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
        memcpy((uint8_t*)(reader_arr + 4), reader_var.data, reader_var.datalen);
-       LDKCResult_ChanKeySignerDecodeErrorZ* ret = (LDKCResult_ChanKeySignerDecodeErrorZ*)js_invoke_function_1(j_calls->read_chan_signer_meth, reader_arr);
-       LDKCResult_ChanKeySignerDecodeErrorZ ret_conv = *(LDKCResult_ChanKeySignerDecodeErrorZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_ChanKeySignerDecodeErrorZ_clone((LDKCResult_ChanKeySignerDecodeErrorZ*)ret);
+       LDKCResult_ChannelKeysDecodeErrorZ* ret = (LDKCResult_ChannelKeysDecodeErrorZ*)js_invoke_function_1(j_calls->read_chan_signer_meth, reader_arr);
+       LDKCResult_ChannelKeysDecodeErrorZ ret_conv = *(LDKCResult_ChannelKeysDecodeErrorZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_ChannelKeysDecodeErrorZ_clone((LDKCResult_ChannelKeysDecodeErrorZ*)ret);
        return ret_conv;
 }
 static void* LDKKeysInterface_JCalls_clone(const void* this_arg) {
@@ -1844,7 +2513,7 @@ uint32_t  __attribute__((visibility("default"))) TS_KeysInterface_read_chan_sign
        LDKu8slice reader_ref;
        reader_ref.datalen = *((uint32_t*)reader);
        reader_ref.data = (int8_t*)(reader + 4);
-       LDKCResult_ChanKeySignerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChanKeySignerDecodeErrorZ), "LDKCResult_ChanKeySignerDecodeErrorZ");
+       LDKCResult_ChannelKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelKeysDecodeErrorZ), "LDKCResult_ChannelKeysDecodeErrorZ");
        *ret_conv = (this_arg_conv->read_chan_signer)(this_arg_conv->this_arg, reader_ref);
        return (long)ret_conv;
 }
@@ -1946,31 +2615,124 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_BlockHashChannelM
        ret->b = b_conv;
        return (long)ret;
 }
-int8_tArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_BlockHashChannelManagerZ_get_a(uint32_t ptr) {
-       LDKC2Tuple_BlockHashChannelManagerZ *tuple = (LDKC2Tuple_BlockHashChannelManagerZ*)(ptr & ~1);
-       int8_tArray a_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(a_arr + 4), tuple->a.data, 32);
-       return a_arr;
+int8_tArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_BlockHashChannelManagerZ_get_a(uint32_t ptr) {
+       LDKC2Tuple_BlockHashChannelManagerZ *tuple = (LDKC2Tuple_BlockHashChannelManagerZ*)(ptr & ~1);
+       int8_tArray a_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(a_arr + 4), tuple->a.data, 32);
+       return a_arr;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_BlockHashChannelManagerZ_get_b(uint32_t ptr) {
+       LDKC2Tuple_BlockHashChannelManagerZ *tuple = (LDKC2Tuple_BlockHashChannelManagerZ*)(ptr & ~1);
+       LDKChannelManager b_var = tuple->b;
+       CHECK((((long)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long b_ref = (long)b_var.inner & ~1;
+       return b_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       long res_ref = (long)(&(*val->contents.result)) | 1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_SpendableOutputDescriptorDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_SpendableOutputDescriptorDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_SpendableOutputDescriptorDecodeErrorZ *val = (LDKCResult_SpendableOutputDescriptorDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       long res_ref = ((long)&(*val->contents.result)) | 1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_SpendableOutputDescriptorDecodeErrorZ *val = (LDKCResult_SpendableOutputDescriptorDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_InMemoryChannelKeysDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_InMemoryChannelKeysDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_InMemoryChannelKeysDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_InMemoryChannelKeysDecodeErrorZ *val = (LDKCResult_InMemoryChannelKeysDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKInMemoryChannelKeys res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_InMemoryChannelKeysDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_InMemoryChannelKeysDecodeErrorZ *val = (LDKCResult_InMemoryChannelKeysDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_RouteHopZ_new(uint32_tArray elems) {
+       LDKCVec_RouteHopZ *ret = MALLOC(sizeof(LDKCVec_RouteHopZ), "LDKCVec_RouteHopZ");
+       ret->datalen = *((uint32_t*)elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(LDKRouteHop) * ret->datalen, "LDKCVec_RouteHopZ Data");
+               uint32_t *java_elems = (uint32_t*)(elems + 4);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       uint32_t arr_elem = java_elems[i];
+                       LDKRouteHop arr_elem_conv;
+                       arr_elem_conv.inner = (void*)(arr_elem & (~1));
+                       arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
+                       arr_elem_conv = RouteHop_clone(&arr_elem_conv);
+                       ret->data[i] = arr_elem_conv;
+               }
+       }
+       return (long)ret;
+}
+static inline LDKCVec_RouteHopZ CVec_RouteHopZ_clone(const LDKCVec_RouteHopZ *orig) {
+       LDKCVec_RouteHopZ ret = { .data = MALLOC(sizeof(LDKRouteHop) * orig->datalen, "LDKCVec_RouteHopZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = RouteHop_clone(&orig->data[i]);
+       }
+       return ret;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_BlockHashChannelManagerZ_get_b(uint32_t ptr) {
-       LDKC2Tuple_BlockHashChannelManagerZ *tuple = (LDKC2Tuple_BlockHashChannelManagerZ*)(ptr & ~1);
-       LDKChannelManager b_var = tuple->b;
-       CHECK((((long)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long b_ref = (long)b_var.inner & ~1;
-       return b_ref;
+static inline LDKCVec_CVec_RouteHopZZ CVec_CVec_RouteHopZZ_clone(const LDKCVec_CVec_RouteHopZZ *orig) {
+       LDKCVec_CVec_RouteHopZZ ret = { .data = MALLOC(sizeof(LDKCVec_RouteHopZ) * orig->datalen, "LDKCVec_CVec_RouteHopZZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = CVec_RouteHopZ_clone(&orig->data[i]);
+       }
+       return ret;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)arg)->result_ok;
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_RouteDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_RouteDecodeErrorZ*)arg)->result_ok;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_RouteDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_RouteDecodeErrorZ *val = (LDKCResult_RouteDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       long res_ref = (long)(&(*val->contents.result)) | 1;
+       LDKRoute res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
        return res_ref;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(uint32_t arg) {
-       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_RouteDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_RouteDecodeErrorZ *val = (LDKCResult_RouteDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
        LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -1978,6 +2740,53 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_BlockHash
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
+uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_RouteHintZ_new(uint32_tArray elems) {
+       LDKCVec_RouteHintZ *ret = MALLOC(sizeof(LDKCVec_RouteHintZ), "LDKCVec_RouteHintZ");
+       ret->datalen = *((uint32_t*)elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(LDKRouteHint) * ret->datalen, "LDKCVec_RouteHintZ Data");
+               uint32_t *java_elems = (uint32_t*)(elems + 4);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       uint32_t arr_elem = java_elems[i];
+                       LDKRouteHint arr_elem_conv;
+                       arr_elem_conv.inner = (void*)(arr_elem & (~1));
+                       arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
+                       arr_elem_conv = RouteHint_clone(&arr_elem_conv);
+                       ret->data[i] = arr_elem_conv;
+               }
+       }
+       return (long)ret;
+}
+static inline LDKCVec_RouteHintZ CVec_RouteHintZ_clone(const LDKCVec_RouteHintZ *orig) {
+       LDKCVec_RouteHintZ ret = { .data = MALLOC(sizeof(LDKRouteHint) * orig->datalen, "LDKCVec_RouteHintZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = RouteHint_clone(&orig->data[i]);
+       }
+       return ret;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_RouteLightningErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_RouteLightningErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_RouteLightningErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_RouteLightningErrorZ *val = (LDKCResult_RouteLightningErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKRoute res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_RouteLightningErrorZ_get_err(uint32_t arg) {
+       LDKCResult_RouteLightningErrorZ *val = (LDKCResult_RouteLightningErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKLightningError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
 jboolean  __attribute__((visibility("default"))) TS_LDKCResult_NetAddressu8Z_result_ok(uint32_t arg) {
        return ((LDKCResult_NetAddressu8Z*)arg)->result_ok;
 }
@@ -2012,25 +2821,6 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_CResult_NetAddres
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_u64Z_new(int64_tArray elems) {
-       LDKCVec_u64Z *ret = MALLOC(sizeof(LDKCVec_u64Z), "LDKCVec_u64Z");
-       ret->datalen = *((uint32_t*)elems);
-       if (ret->datalen == 0) {
-               ret->data = NULL;
-       } else {
-               ret->data = MALLOC(sizeof(uint64_t) * ret->datalen, "LDKCVec_u64Z Data");
-               int64_t *java_elems = (int64_t*)(elems + 4);
-               for (size_t i = 0; i < ret->datalen; i++) {
-                       ret->data[i] = java_elems[i];
-               }
-       }
-       return (long)ret;
-}
-static inline LDKCVec_u64Z CVec_u64Z_clone(const LDKCVec_u64Z *orig) {
-       LDKCVec_u64Z ret = { .data = MALLOC(sizeof(int64_t) * orig->datalen, "LDKCVec_u64Z clone bytes"), .datalen = orig->datalen };
-       memcpy(ret.data, orig->data, sizeof(int64_t) * ret.datalen);
-       return ret;
-}
 uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_UpdateAddHTLCZ_new(uint32_tArray elems) {
        LDKCVec_UpdateAddHTLCZ *ret = MALLOC(sizeof(LDKCVec_UpdateAddHTLCZ), "LDKCVec_UpdateAddHTLCZ");
        ret->datalen = *((uint32_t*)elems);
@@ -2128,147 +2918,342 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_UpdateFailMalformedH
        }
        return (long)ret;
 }
-static inline LDKCVec_UpdateFailMalformedHTLCZ CVec_UpdateFailMalformedHTLCZ_clone(const LDKCVec_UpdateFailMalformedHTLCZ *orig) {
-       LDKCVec_UpdateFailMalformedHTLCZ ret = { .data = MALLOC(sizeof(LDKUpdateFailMalformedHTLC) * orig->datalen, "LDKCVec_UpdateFailMalformedHTLCZ clone bytes"), .datalen = orig->datalen };
-       for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = UpdateFailMalformedHTLC_clone(&orig->data[i]);
-       }
-       return ret;
+static inline LDKCVec_UpdateFailMalformedHTLCZ CVec_UpdateFailMalformedHTLCZ_clone(const LDKCVec_UpdateFailMalformedHTLCZ *orig) {
+       LDKCVec_UpdateFailMalformedHTLCZ ret = { .data = MALLOC(sizeof(LDKUpdateFailMalformedHTLC) * orig->datalen, "LDKCVec_UpdateFailMalformedHTLCZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = UpdateFailMalformedHTLC_clone(&orig->data[i]);
+       }
+       return ret;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_AcceptChannelDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_AcceptChannelDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_AcceptChannelDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_AcceptChannelDecodeErrorZ *val = (LDKCResult_AcceptChannelDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKAcceptChannel res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_AcceptChannelDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_AcceptChannelDecodeErrorZ *val = (LDKCResult_AcceptChannelDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_AnnouncementSignaturesDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_AnnouncementSignaturesDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_AnnouncementSignaturesDecodeErrorZ *val = (LDKCResult_AnnouncementSignaturesDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKAnnouncementSignatures res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_AnnouncementSignaturesDecodeErrorZ *val = (LDKCResult_AnnouncementSignaturesDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_ChannelReestablishDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_ChannelReestablishDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelReestablishDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_ChannelReestablishDecodeErrorZ *val = (LDKCResult_ChannelReestablishDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKChannelReestablish res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelReestablishDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_ChannelReestablishDecodeErrorZ *val = (LDKCResult_ChannelReestablishDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_ClosingSignedDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_ClosingSignedDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ClosingSignedDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_ClosingSignedDecodeErrorZ *val = (LDKCResult_ClosingSignedDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKClosingSigned res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ClosingSignedDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_ClosingSignedDecodeErrorZ *val = (LDKCResult_ClosingSignedDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_CommitmentSignedDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_CommitmentSignedDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_CommitmentSignedDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_CommitmentSignedDecodeErrorZ *val = (LDKCResult_CommitmentSignedDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKCommitmentSigned res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_CommitmentSignedDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_CommitmentSignedDecodeErrorZ *val = (LDKCResult_CommitmentSignedDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_FundingCreatedDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_FundingCreatedDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_FundingCreatedDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_FundingCreatedDecodeErrorZ *val = (LDKCResult_FundingCreatedDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKFundingCreated res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_FundingCreatedDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_FundingCreatedDecodeErrorZ *val = (LDKCResult_FundingCreatedDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_FundingSignedDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_FundingSignedDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_FundingSignedDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_FundingSignedDecodeErrorZ *val = (LDKCResult_FundingSignedDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKFundingSigned res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_FundingSignedDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_FundingSignedDecodeErrorZ *val = (LDKCResult_FundingSignedDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_FundingLockedDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_FundingLockedDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_FundingLockedDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_FundingLockedDecodeErrorZ *val = (LDKCResult_FundingLockedDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKFundingLocked res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_FundingLockedDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_FundingLockedDecodeErrorZ *val = (LDKCResult_FundingLockedDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_InitDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_InitDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_InitDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_InitDecodeErrorZ *val = (LDKCResult_InitDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKInit res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_InitDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_InitDecodeErrorZ *val = (LDKCResult_InitDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_OpenChannelDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_OpenChannelDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_OpenChannelDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_OpenChannelDecodeErrorZ *val = (LDKCResult_OpenChannelDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKOpenChannel res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_boolLightningErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_boolLightningErrorZ*)arg)->result_ok;
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_OpenChannelDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_OpenChannelDecodeErrorZ *val = (LDKCResult_OpenChannelDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_boolLightningErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_boolLightningErrorZ *val = (LDKCResult_boolLightningErrorZ*)(arg & ~1);
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_RevokeAndACKDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_RevokeAndACKDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_RevokeAndACKDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_RevokeAndACKDecodeErrorZ *val = (LDKCResult_RevokeAndACKDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       return *val->contents.result;
+       LDKRevokeAndACK res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_boolLightningErrorZ_get_err(uint32_t arg) {
-       LDKCResult_boolLightningErrorZ *val = (LDKCResult_boolLightningErrorZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_RevokeAndACKDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_RevokeAndACKDecodeErrorZ *val = (LDKCResult_RevokeAndACKDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
-       LDKLightningError err_var = (*val->contents.err);
+       LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(uint32_t a, uint32_t b, uint32_t c) {
-       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
-       LDKChannelAnnouncement a_conv;
-       a_conv.inner = (void*)(a & (~1));
-       a_conv.is_owned = (a & 1) || (a == 0);
-       a_conv = ChannelAnnouncement_clone(&a_conv);
-       ret->a = a_conv;
-       LDKChannelUpdate b_conv;
-       b_conv.inner = (void*)(b & (~1));
-       b_conv.is_owned = (b & 1) || (b == 0);
-       b_conv = ChannelUpdate_clone(&b_conv);
-       ret->b = b_conv;
-       LDKChannelUpdate c_conv;
-       c_conv.inner = (void*)(c & (~1));
-       c_conv.is_owned = (c & 1) || (c == 0);
-       c_conv = ChannelUpdate_clone(&c_conv);
-       ret->c = c_conv;
-       return (long)ret;
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_ShutdownDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_ShutdownDecodeErrorZ*)arg)->result_ok;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(uint32_t ptr) {
-       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *tuple = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(ptr & ~1);
-       LDKChannelAnnouncement a_var = tuple->a;
-       CHECK((((long)a_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&a_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long a_ref = (long)a_var.inner & ~1;
-       return a_ref;
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ShutdownDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_ShutdownDecodeErrorZ *val = (LDKCResult_ShutdownDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKShutdown res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(uint32_t ptr) {
-       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *tuple = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(ptr & ~1);
-       LDKChannelUpdate b_var = tuple->b;
-       CHECK((((long)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long b_ref = (long)b_var.inner & ~1;
-       return b_ref;
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ShutdownDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_ShutdownDecodeErrorZ *val = (LDKCResult_ShutdownDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(uint32_t ptr) {
-       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *tuple = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(ptr & ~1);
-       LDKChannelUpdate c_var = tuple->c;
-       CHECK((((long)c_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&c_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long c_ref = (long)c_var.inner & ~1;
-       return c_ref;
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_UpdateFailHTLCDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_UpdateFailHTLCDecodeErrorZ*)arg)->result_ok;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new(uint32_tArray elems) {
-       LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ *ret = MALLOC(sizeof(LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ), "LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ");
-       ret->datalen = *((uint32_t*)elems);
-       if (ret->datalen == 0) {
-               ret->data = NULL;
-       } else {
-               ret->data = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ) * ret->datalen, "LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ Data");
-               uint32_t *java_elems = (uint32_t*)(elems + 4);
-               for (size_t i = 0; i < ret->datalen; i++) {
-                       uint32_t arr_elem = java_elems[i];
-                       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ arr_elem_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)arr_elem) & ~1);
-                       FREE((void*)arr_elem);
-                       ret->data[i] = arr_elem_conv;
-               }
-       }
-       return (long)ret;
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_UpdateFailHTLCDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_UpdateFailHTLCDecodeErrorZ *val = (LDKCResult_UpdateFailHTLCDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKUpdateFailHTLC res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_NodeAnnouncementZ_new(uint32_tArray elems) {
-       LDKCVec_NodeAnnouncementZ *ret = MALLOC(sizeof(LDKCVec_NodeAnnouncementZ), "LDKCVec_NodeAnnouncementZ");
-       ret->datalen = *((uint32_t*)elems);
-       if (ret->datalen == 0) {
-               ret->data = NULL;
-       } else {
-               ret->data = MALLOC(sizeof(LDKNodeAnnouncement) * ret->datalen, "LDKCVec_NodeAnnouncementZ Data");
-               uint32_t *java_elems = (uint32_t*)(elems + 4);
-               for (size_t i = 0; i < ret->datalen; i++) {
-                       uint32_t arr_elem = java_elems[i];
-                       LDKNodeAnnouncement arr_elem_conv;
-                       arr_elem_conv.inner = (void*)(arr_elem & (~1));
-                       arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
-                       arr_elem_conv = NodeAnnouncement_clone(&arr_elem_conv);
-                       ret->data[i] = arr_elem_conv;
-               }
-       }
-       return (long)ret;
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_UpdateFailHTLCDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_UpdateFailHTLCDecodeErrorZ *val = (LDKCResult_UpdateFailHTLCDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-static inline LDKCVec_NodeAnnouncementZ CVec_NodeAnnouncementZ_clone(const LDKCVec_NodeAnnouncementZ *orig) {
-       LDKCVec_NodeAnnouncementZ ret = { .data = MALLOC(sizeof(LDKNodeAnnouncement) * orig->datalen, "LDKCVec_NodeAnnouncementZ clone bytes"), .datalen = orig->datalen };
-       for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = NodeAnnouncement_clone(&orig->data[i]);
-       }
-       return ret;
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ*)arg)->result_ok;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_NoneLightningErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_NoneLightningErrorZ*)arg)->result_ok;
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *val = (LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKUpdateFailMalformedHTLC res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-void  __attribute__((visibility("default"))) TS_LDKCResult_NoneLightningErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_NoneLightningErrorZ *val = (LDKCResult_NoneLightningErrorZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *val = (LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_UpdateFeeDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_UpdateFeeDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_UpdateFeeDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_UpdateFeeDecodeErrorZ *val = (LDKCResult_UpdateFeeDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       return *val->contents.result;
+       LDKUpdateFee res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NoneLightningErrorZ_get_err(uint32_t arg) {
-       LDKCResult_NoneLightningErrorZ *val = (LDKCResult_NoneLightningErrorZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_UpdateFeeDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_UpdateFeeDecodeErrorZ *val = (LDKCResult_UpdateFeeDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
-       LDKLightningError err_var = (*val->contents.err);
+       LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_ChannelReestablishDecodeErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_ChannelReestablishDecodeErrorZ*)arg)->result_ok;
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_UpdateFulfillHTLCDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_UpdateFulfillHTLCDecodeErrorZ*)arg)->result_ok;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelReestablishDecodeErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_ChannelReestablishDecodeErrorZ *val = (LDKCResult_ChannelReestablishDecodeErrorZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_UpdateFulfillHTLCDecodeErrorZ *val = (LDKCResult_UpdateFulfillHTLCDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       LDKChannelReestablish res_var = (*val->contents.result);
+       LDKUpdateFulfillHTLC res_var = (*val->contents.result);
        CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long res_ref = (long)res_var.inner & ~1;
        return res_ref;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelReestablishDecodeErrorZ_get_err(uint32_t arg) {
-       LDKCResult_ChannelReestablishDecodeErrorZ *val = (LDKCResult_ChannelReestablishDecodeErrorZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_UpdateFulfillHTLCDecodeErrorZ *val = (LDKCResult_UpdateFulfillHTLCDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
        LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -2276,20 +3261,20 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelReestablis
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_InitDecodeErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_InitDecodeErrorZ*)arg)->result_ok;
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_UpdateAddHTLCDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_UpdateAddHTLCDecodeErrorZ*)arg)->result_ok;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_InitDecodeErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_InitDecodeErrorZ *val = (LDKCResult_InitDecodeErrorZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_UpdateAddHTLCDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_UpdateAddHTLCDecodeErrorZ *val = (LDKCResult_UpdateAddHTLCDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       LDKInit res_var = (*val->contents.result);
+       LDKUpdateAddHTLC res_var = (*val->contents.result);
        CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long res_ref = (long)res_var.inner & ~1;
        return res_ref;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_InitDecodeErrorZ_get_err(uint32_t arg) {
-       LDKCResult_InitDecodeErrorZ *val = (LDKCResult_InitDecodeErrorZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_UpdateAddHTLCDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_UpdateAddHTLCDecodeErrorZ *val = (LDKCResult_UpdateAddHTLCDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
        LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -2360,6 +3345,27 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_UnsignedChannelAn
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_ChannelAnnouncementDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_ChannelAnnouncementDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelAnnouncementDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_ChannelAnnouncementDecodeErrorZ *val = (LDKCResult_ChannelAnnouncementDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKChannelAnnouncement res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelAnnouncementDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_ChannelAnnouncementDecodeErrorZ *val = (LDKCResult_ChannelAnnouncementDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
 jboolean  __attribute__((visibility("default"))) TS_LDKCResult_UnsignedChannelUpdateDecodeErrorZ_result_ok(uint32_t arg) {
        return ((LDKCResult_UnsignedChannelUpdateDecodeErrorZ*)arg)->result_ok;
 }
@@ -2381,6 +3387,27 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_UnsignedChannelUp
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_ChannelUpdateDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_ChannelUpdateDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelUpdateDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_ChannelUpdateDecodeErrorZ *val = (LDKCResult_ChannelUpdateDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKChannelUpdate res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelUpdateDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_ChannelUpdateDecodeErrorZ *val = (LDKCResult_ChannelUpdateDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
 jboolean  __attribute__((visibility("default"))) TS_LDKCResult_ErrorMessageDecodeErrorZ_result_ok(uint32_t arg) {
        return ((LDKCResult_ErrorMessageDecodeErrorZ*)arg)->result_ok;
 }
@@ -2423,6 +3450,27 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_UnsignedNodeAnnou
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_NodeAnnouncementDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_NodeAnnouncementDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NodeAnnouncementDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_NodeAnnouncementDecodeErrorZ *val = (LDKCResult_NodeAnnouncementDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKNodeAnnouncement res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NodeAnnouncementDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_NodeAnnouncementDecodeErrorZ *val = (LDKCResult_NodeAnnouncementDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
 jboolean  __attribute__((visibility("default"))) TS_LDKCResult_QueryShortChannelIdsDecodeErrorZ_result_ok(uint32_t arg) {
        return ((LDKCResult_QueryShortChannelIdsDecodeErrorZ*)arg)->result_ok;
 }
@@ -2456,8 +3504,50 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ReplyShortChannel
        long res_ref = (long)res_var.inner & ~1;
        return res_ref;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(uint32_t arg) {
-       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *val = (LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *val = (LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_QueryChannelRangeDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_QueryChannelRangeDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_QueryChannelRangeDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_QueryChannelRangeDecodeErrorZ *val = (LDKCResult_QueryChannelRangeDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKQueryChannelRange res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_QueryChannelRangeDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_QueryChannelRangeDecodeErrorZ *val = (LDKCResult_QueryChannelRangeDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_ReplyChannelRangeDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_ReplyChannelRangeDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ReplyChannelRangeDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_ReplyChannelRangeDecodeErrorZ *val = (LDKCResult_ReplyChannelRangeDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKReplyChannelRange res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ReplyChannelRangeDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_ReplyChannelRangeDecodeErrorZ *val = (LDKCResult_ReplyChannelRangeDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
        LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -2465,20 +3555,20 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ReplyShortChannel
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_QueryChannelRangeDecodeErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_QueryChannelRangeDecodeErrorZ*)arg)->result_ok;
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_GossipTimestampFilterDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_GossipTimestampFilterDecodeErrorZ*)arg)->result_ok;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_QueryChannelRangeDecodeErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_QueryChannelRangeDecodeErrorZ *val = (LDKCResult_QueryChannelRangeDecodeErrorZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_GossipTimestampFilterDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_GossipTimestampFilterDecodeErrorZ *val = (LDKCResult_GossipTimestampFilterDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       LDKQueryChannelRange res_var = (*val->contents.result);
+       LDKGossipTimestampFilter res_var = (*val->contents.result);
        CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long res_ref = (long)res_var.inner & ~1;
        return res_ref;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_QueryChannelRangeDecodeErrorZ_get_err(uint32_t arg) {
-       LDKCResult_QueryChannelRangeDecodeErrorZ *val = (LDKCResult_QueryChannelRangeDecodeErrorZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_GossipTimestampFilterDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_GossipTimestampFilterDecodeErrorZ *val = (LDKCResult_GossipTimestampFilterDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
        LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -2486,1876 +3576,2473 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_QueryChannelRange
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_ReplyChannelRangeDecodeErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_ReplyChannelRangeDecodeErrorZ*)arg)->result_ok;
+typedef struct LDKMessageSendEventsProvider_JCalls {
+       atomic_size_t refcnt;
+       uint32_t get_and_clear_pending_msg_events_meth;
+} LDKMessageSendEventsProvider_JCalls;
+static void LDKMessageSendEventsProvider_JCalls_free(void* this_arg) {
+       LDKMessageSendEventsProvider_JCalls *j_calls = (LDKMessageSendEventsProvider_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               js_free(j_calls->get_and_clear_pending_msg_events_meth);
+               FREE(j_calls);
+       }
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ReplyChannelRangeDecodeErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_ReplyChannelRangeDecodeErrorZ *val = (LDKCResult_ReplyChannelRangeDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKReplyChannelRange res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+LDKCVec_MessageSendEventZ get_and_clear_pending_msg_events_jcall(const void* this_arg) {
+       LDKMessageSendEventsProvider_JCalls *j_calls = (LDKMessageSendEventsProvider_JCalls*) this_arg;
+       uint32_tArray arg = js_invoke_function_0(j_calls->get_and_clear_pending_msg_events_meth);
+       LDKCVec_MessageSendEventZ arg_constr;
+       arg_constr.datalen = *((uint32_t*)arg);
+       if (arg_constr.datalen > 0)
+               arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKMessageSendEvent), "LDKCVec_MessageSendEventZ Elements");
+       else
+               arg_constr.data = NULL;
+       uint32_t* arg_vals = (uint32_t*)(arg + 4);
+       for (size_t s = 0; s < arg_constr.datalen; s++) {
+               uint32_t arr_conv_18 = arg_vals[s];
+               LDKMessageSendEvent arr_conv_18_conv = *(LDKMessageSendEvent*)(((uint64_t)arr_conv_18) & ~1);
+               FREE((void*)arr_conv_18);
+               arg_constr.data[s] = arr_conv_18_conv;
+       }
+       return arg_constr;
+}
+static void* LDKMessageSendEventsProvider_JCalls_clone(const void* this_arg) {
+       LDKMessageSendEventsProvider_JCalls *j_calls = (LDKMessageSendEventsProvider_JCalls*) this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+       return (void*) this_arg;
+}
+static inline LDKMessageSendEventsProvider LDKMessageSendEventsProvider_init (/*TODO: JS Object Reference */void* o) {
+       LDKMessageSendEventsProvider_JCalls *calls = MALLOC(sizeof(LDKMessageSendEventsProvider_JCalls), "LDKMessageSendEventsProvider_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       //TODO: Assign calls->o from o
+
+       LDKMessageSendEventsProvider ret = {
+               .this_arg = (void*) calls,
+               .get_and_clear_pending_msg_events = get_and_clear_pending_msg_events_jcall,
+               .free = LDKMessageSendEventsProvider_JCalls_free,
+       };
+       return ret;
+}
+long  __attribute__((visibility("default"))) TS_LDKMessageSendEventsProvider_new(/*TODO: JS Object Reference */void* o) {
+       LDKMessageSendEventsProvider *res_ptr = MALLOC(sizeof(LDKMessageSendEventsProvider), "LDKMessageSendEventsProvider");
+       *res_ptr = LDKMessageSendEventsProvider_init(o);
+       return (long)res_ptr;
+}
+uint32_tArray  __attribute__((visibility("default"))) TS_MessageSendEventsProvider_get_and_clear_pending_msg_events(uint32_t this_arg) {
+       LDKMessageSendEventsProvider* this_arg_conv = (LDKMessageSendEventsProvider*)this_arg;
+       LDKCVec_MessageSendEventZ ret_var = (this_arg_conv->get_and_clear_pending_msg_events)(this_arg_conv->this_arg);
+       uint32_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
+       uint32_t *ret_arr_ptr = (uint32_t*)(ret_arr + 4);
+       for (size_t s = 0; s < ret_var.datalen; s++) {
+               LDKMessageSendEvent *arr_conv_18_copy = MALLOC(sizeof(LDKMessageSendEvent), "LDKMessageSendEvent");
+               *arr_conv_18_copy = MessageSendEvent_clone(&ret_var.data[s]);
+               long arr_conv_18_ref = (long)arr_conv_18_copy;
+               ret_arr_ptr[s] = arr_conv_18_ref;
+       }
+       FREE(ret_var.data);
+       return ret_arr;
+}
+
+typedef struct LDKEventsProvider_JCalls {
+       atomic_size_t refcnt;
+       uint32_t get_and_clear_pending_events_meth;
+} LDKEventsProvider_JCalls;
+static void LDKEventsProvider_JCalls_free(void* this_arg) {
+       LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               js_free(j_calls->get_and_clear_pending_events_meth);
+               FREE(j_calls);
+       }
+}
+LDKCVec_EventZ get_and_clear_pending_events_jcall(const void* this_arg) {
+       LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) this_arg;
+       uint32_tArray arg = js_invoke_function_0(j_calls->get_and_clear_pending_events_meth);
+       LDKCVec_EventZ arg_constr;
+       arg_constr.datalen = *((uint32_t*)arg);
+       if (arg_constr.datalen > 0)
+               arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKEvent), "LDKCVec_EventZ Elements");
+       else
+               arg_constr.data = NULL;
+       uint32_t* arg_vals = (uint32_t*)(arg + 4);
+       for (size_t h = 0; h < arg_constr.datalen; h++) {
+               uint32_t arr_conv_7 = arg_vals[h];
+               LDKEvent arr_conv_7_conv = *(LDKEvent*)(((uint64_t)arr_conv_7) & ~1);
+               FREE((void*)arr_conv_7);
+               arg_constr.data[h] = arr_conv_7_conv;
+       }
+       return arg_constr;
+}
+static void* LDKEventsProvider_JCalls_clone(const void* this_arg) {
+       LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+       return (void*) this_arg;
+}
+static inline LDKEventsProvider LDKEventsProvider_init (/*TODO: JS Object Reference */void* o) {
+       LDKEventsProvider_JCalls *calls = MALLOC(sizeof(LDKEventsProvider_JCalls), "LDKEventsProvider_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       //TODO: Assign calls->o from o
+
+       LDKEventsProvider ret = {
+               .this_arg = (void*) calls,
+               .get_and_clear_pending_events = get_and_clear_pending_events_jcall,
+               .free = LDKEventsProvider_JCalls_free,
+       };
+       return ret;
+}
+long  __attribute__((visibility("default"))) TS_LDKEventsProvider_new(/*TODO: JS Object Reference */void* o) {
+       LDKEventsProvider *res_ptr = MALLOC(sizeof(LDKEventsProvider), "LDKEventsProvider");
+       *res_ptr = LDKEventsProvider_init(o);
+       return (long)res_ptr;
+}
+uint32_tArray  __attribute__((visibility("default"))) TS_EventsProvider_get_and_clear_pending_events(uint32_t this_arg) {
+       LDKEventsProvider* this_arg_conv = (LDKEventsProvider*)this_arg;
+       LDKCVec_EventZ ret_var = (this_arg_conv->get_and_clear_pending_events)(this_arg_conv->this_arg);
+       uint32_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
+       uint32_t *ret_arr_ptr = (uint32_t*)(ret_arr + 4);
+       for (size_t h = 0; h < ret_var.datalen; h++) {
+               LDKEvent *arr_conv_7_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
+               *arr_conv_7_copy = Event_clone(&ret_var.data[h]);
+               long arr_conv_7_ref = (long)arr_conv_7_copy;
+               ret_arr_ptr[h] = arr_conv_7_ref;
+       }
+       FREE(ret_var.data);
+       return ret_arr;
+}
+
+typedef struct LDKAccess_JCalls {
+       atomic_size_t refcnt;
+       uint32_t get_utxo_meth;
+} LDKAccess_JCalls;
+static void LDKAccess_JCalls_free(void* this_arg) {
+       LDKAccess_JCalls *j_calls = (LDKAccess_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               js_free(j_calls->get_utxo_meth);
+               FREE(j_calls);
+       }
+}
+LDKCResult_TxOutAccessErrorZ get_utxo_jcall(const void* this_arg, const uint8_t (* genesis_hash)[32], uint64_t short_channel_id) {
+       LDKAccess_JCalls *j_calls = (LDKAccess_JCalls*) this_arg;
+       int8_tArray genesis_hash_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(genesis_hash_arr + 4), *genesis_hash, 32);
+       LDKCResult_TxOutAccessErrorZ* ret = (LDKCResult_TxOutAccessErrorZ*)js_invoke_function_2(j_calls->get_utxo_meth, genesis_hash_arr, short_channel_id);
+       LDKCResult_TxOutAccessErrorZ ret_conv = *(LDKCResult_TxOutAccessErrorZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_TxOutAccessErrorZ_clone((LDKCResult_TxOutAccessErrorZ*)ret);
+       return ret_conv;
+}
+static void* LDKAccess_JCalls_clone(const void* this_arg) {
+       LDKAccess_JCalls *j_calls = (LDKAccess_JCalls*) this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+       return (void*) this_arg;
+}
+static inline LDKAccess LDKAccess_init (/*TODO: JS Object Reference */void* o) {
+       LDKAccess_JCalls *calls = MALLOC(sizeof(LDKAccess_JCalls), "LDKAccess_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       //TODO: Assign calls->o from o
+
+       LDKAccess ret = {
+               .this_arg = (void*) calls,
+               .get_utxo = get_utxo_jcall,
+               .free = LDKAccess_JCalls_free,
+       };
+       return ret;
+}
+long  __attribute__((visibility("default"))) TS_LDKAccess_new(/*TODO: JS Object Reference */void* o) {
+       LDKAccess *res_ptr = MALLOC(sizeof(LDKAccess), "LDKAccess");
+       *res_ptr = LDKAccess_init(o);
+       return (long)res_ptr;
+}
+uint32_t  __attribute__((visibility("default"))) TS_Access_get_utxo(uint32_t this_arg, int8_tArray genesis_hash, int64_t short_channel_id) {
+       LDKAccess* this_arg_conv = (LDKAccess*)this_arg;
+       unsigned char genesis_hash_arr[32];
+       CHECK(*((uint32_t*)genesis_hash) == 32);
+       memcpy(genesis_hash_arr, (uint8_t*)(genesis_hash + 4), 32);
+       unsigned char (*genesis_hash_ref)[32] = &genesis_hash_arr;
+       LDKCResult_TxOutAccessErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxOutAccessErrorZ), "LDKCResult_TxOutAccessErrorZ");
+       *ret_conv = (this_arg_conv->get_utxo)(this_arg_conv->this_arg, genesis_hash_ref, short_channel_id);
+       return (long)ret_conv;
+}
+
+typedef struct LDKFilter_JCalls {
+       atomic_size_t refcnt;
+       uint32_t register_tx_meth;
+       uint32_t register_output_meth;
+} LDKFilter_JCalls;
+static void LDKFilter_JCalls_free(void* this_arg) {
+       LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               js_free(j_calls->register_tx_meth);
+               js_free(j_calls->register_output_meth);
+               FREE(j_calls);
+       }
+}
+void register_tx_jcall(const void* this_arg, const uint8_t (* txid)[32], LDKu8slice script_pubkey) {
+       LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
+       int8_tArray txid_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(txid_arr + 4), *txid, 32);
+       LDKu8slice script_pubkey_var = script_pubkey;
+       int8_tArray script_pubkey_arr = init_arr(script_pubkey_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(script_pubkey_arr + 4), script_pubkey_var.data, script_pubkey_var.datalen);
+       js_invoke_function_2(j_calls->register_tx_meth, txid_arr, script_pubkey_arr);
+}
+void register_output_jcall(const void* this_arg, const LDKOutPoint * outpoint, LDKu8slice script_pubkey) {
+       LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
+       LDKOutPoint outpoint_var = *outpoint;
+       outpoint_var = OutPoint_clone(outpoint);
+       CHECK((((long)outpoint_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&outpoint_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long outpoint_ref = (long)outpoint_var.inner;
+       if (outpoint_var.is_owned) {
+               outpoint_ref |= 1;
+       }
+       LDKu8slice script_pubkey_var = script_pubkey;
+       int8_tArray script_pubkey_arr = init_arr(script_pubkey_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(script_pubkey_arr + 4), script_pubkey_var.data, script_pubkey_var.datalen);
+       js_invoke_function_2(j_calls->register_output_meth, outpoint_ref, script_pubkey_arr);
+}
+static void* LDKFilter_JCalls_clone(const void* this_arg) {
+       LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+       return (void*) this_arg;
+}
+static inline LDKFilter LDKFilter_init (/*TODO: JS Object Reference */void* o) {
+       LDKFilter_JCalls *calls = MALLOC(sizeof(LDKFilter_JCalls), "LDKFilter_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       //TODO: Assign calls->o from o
+
+       LDKFilter ret = {
+               .this_arg = (void*) calls,
+               .register_tx = register_tx_jcall,
+               .register_output = register_output_jcall,
+               .free = LDKFilter_JCalls_free,
+       };
+       return ret;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ReplyChannelRangeDecodeErrorZ_get_err(uint32_t arg) {
-       LDKCResult_ReplyChannelRangeDecodeErrorZ *val = (LDKCResult_ReplyChannelRangeDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+long  __attribute__((visibility("default"))) TS_LDKFilter_new(/*TODO: JS Object Reference */void* o) {
+       LDKFilter *res_ptr = MALLOC(sizeof(LDKFilter), "LDKFilter");
+       *res_ptr = LDKFilter_init(o);
+       return (long)res_ptr;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_GossipTimestampFilterDecodeErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_GossipTimestampFilterDecodeErrorZ*)arg)->result_ok;
+void  __attribute__((visibility("default"))) TS_Filter_register_tx(uint32_t this_arg, int8_tArray txid, int8_tArray script_pubkey) {
+       LDKFilter* this_arg_conv = (LDKFilter*)this_arg;
+       unsigned char txid_arr[32];
+       CHECK(*((uint32_t*)txid) == 32);
+       memcpy(txid_arr, (uint8_t*)(txid + 4), 32);
+       unsigned char (*txid_ref)[32] = &txid_arr;
+       LDKu8slice script_pubkey_ref;
+       script_pubkey_ref.datalen = *((uint32_t*)script_pubkey);
+       script_pubkey_ref.data = (int8_t*)(script_pubkey + 4);
+       (this_arg_conv->register_tx)(this_arg_conv->this_arg, txid_ref, script_pubkey_ref);
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_GossipTimestampFilterDecodeErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_GossipTimestampFilterDecodeErrorZ *val = (LDKCResult_GossipTimestampFilterDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKGossipTimestampFilter res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+
+void  __attribute__((visibility("default"))) TS_Filter_register_output(uint32_t this_arg, uint32_t outpoint, int8_tArray script_pubkey) {
+       LDKFilter* this_arg_conv = (LDKFilter*)this_arg;
+       LDKOutPoint outpoint_conv;
+       outpoint_conv.inner = (void*)(outpoint & (~1));
+       outpoint_conv.is_owned = false;
+       LDKu8slice script_pubkey_ref;
+       script_pubkey_ref.datalen = *((uint32_t*)script_pubkey);
+       script_pubkey_ref.data = (int8_t*)(script_pubkey + 4);
+       (this_arg_conv->register_output)(this_arg_conv->this_arg, &outpoint_conv, script_pubkey_ref);
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_GossipTimestampFilterDecodeErrorZ_get_err(uint32_t arg) {
-       LDKCResult_GossipTimestampFilterDecodeErrorZ *val = (LDKCResult_GossipTimestampFilterDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+
+typedef struct LDKPersist_JCalls {
+       atomic_size_t refcnt;
+       uint32_t persist_new_channel_meth;
+       uint32_t update_persisted_channel_meth;
+} LDKPersist_JCalls;
+static void LDKPersist_JCalls_free(void* this_arg) {
+       LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               js_free(j_calls->persist_new_channel_meth);
+               js_free(j_calls->update_persisted_channel_meth);
+               FREE(j_calls);
+       }
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_CVec_u8ZPeerHandleErrorZ*)arg)->result_ok;
+LDKCResult_NoneChannelMonitorUpdateErrZ persist_new_channel_jcall(const void* this_arg, LDKOutPoint id, const LDKChannelMonitor * data) {
+       LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
+       LDKOutPoint id_var = id;
+       CHECK((((long)id_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&id_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long id_ref = (long)id_var.inner;
+       if (id_var.is_owned) {
+               id_ref |= 1;
+       }
+       LDKChannelMonitor data_var = *data;
+       data_var = ChannelMonitor_clone(data);
+       CHECK((((long)data_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&data_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long data_ref = (long)data_var.inner;
+       if (data_var.is_owned) {
+               data_ref |= 1;
+       }
+       LDKCResult_NoneChannelMonitorUpdateErrZ* ret = (LDKCResult_NoneChannelMonitorUpdateErrZ*)js_invoke_function_2(j_calls->persist_new_channel_meth, id_ref, data_ref);
+       LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone((LDKCResult_NoneChannelMonitorUpdateErrZ*)ret);
+       return ret_conv;
 }
-int8_tArray  __attribute__((visibility("default"))) TS_LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_CVec_u8ZPeerHandleErrorZ *val = (LDKCResult_CVec_u8ZPeerHandleErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKCVec_u8Z res_var = (*val->contents.result);
-       int8_tArray res_arr = init_arr(res_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(res_arr + 4), res_var.data, res_var.datalen);
-       return res_arr;
+LDKCResult_NoneChannelMonitorUpdateErrZ update_persisted_channel_jcall(const void* this_arg, LDKOutPoint id, const LDKChannelMonitorUpdate * update, const LDKChannelMonitor * data) {
+       LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
+       LDKOutPoint id_var = id;
+       CHECK((((long)id_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&id_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long id_ref = (long)id_var.inner;
+       if (id_var.is_owned) {
+               id_ref |= 1;
+       }
+       LDKChannelMonitorUpdate update_var = *update;
+       update_var = ChannelMonitorUpdate_clone(update);
+       CHECK((((long)update_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&update_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long update_ref = (long)update_var.inner;
+       if (update_var.is_owned) {
+               update_ref |= 1;
+       }
+       LDKChannelMonitor data_var = *data;
+       data_var = ChannelMonitor_clone(data);
+       CHECK((((long)data_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&data_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long data_ref = (long)data_var.inner;
+       if (data_var.is_owned) {
+               data_ref |= 1;
+       }
+       LDKCResult_NoneChannelMonitorUpdateErrZ* ret = (LDKCResult_NoneChannelMonitorUpdateErrZ*)js_invoke_function_3(j_calls->update_persisted_channel_meth, id_ref, update_ref, data_ref);
+       LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone((LDKCResult_NoneChannelMonitorUpdateErrZ*)ret);
+       return ret_conv;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_CVec_u8ZPeerHandleErrorZ_get_err(uint32_t arg) {
-       LDKCResult_CVec_u8ZPeerHandleErrorZ *val = (LDKCResult_CVec_u8ZPeerHandleErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKPeerHandleError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+static void* LDKPersist_JCalls_clone(const void* this_arg) {
+       LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+       return (void*) this_arg;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_NonePeerHandleErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_NonePeerHandleErrorZ*)arg)->result_ok;
+static inline LDKPersist LDKPersist_init (/*TODO: JS Object Reference */void* o) {
+       LDKPersist_JCalls *calls = MALLOC(sizeof(LDKPersist_JCalls), "LDKPersist_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       //TODO: Assign calls->o from o
+
+       LDKPersist ret = {
+               .this_arg = (void*) calls,
+               .persist_new_channel = persist_new_channel_jcall,
+               .update_persisted_channel = update_persisted_channel_jcall,
+               .free = LDKPersist_JCalls_free,
+       };
+       return ret;
 }
-void  __attribute__((visibility("default"))) TS_LDKCResult_NonePeerHandleErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_NonePeerHandleErrorZ *val = (LDKCResult_NonePeerHandleErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       return *val->contents.result;
+long  __attribute__((visibility("default"))) TS_LDKPersist_new(/*TODO: JS Object Reference */void* o) {
+       LDKPersist *res_ptr = MALLOC(sizeof(LDKPersist), "LDKPersist");
+       *res_ptr = LDKPersist_init(o);
+       return (long)res_ptr;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NonePeerHandleErrorZ_get_err(uint32_t arg) {
-       LDKCResult_NonePeerHandleErrorZ *val = (LDKCResult_NonePeerHandleErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKPeerHandleError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+uint32_t  __attribute__((visibility("default"))) TS_Persist_persist_new_channel(uint32_t this_arg, uint32_t id, uint32_t data) {
+       LDKPersist* this_arg_conv = (LDKPersist*)this_arg;
+       LDKOutPoint id_conv;
+       id_conv.inner = (void*)(id & (~1));
+       id_conv.is_owned = (id & 1) || (id == 0);
+       id_conv = OutPoint_clone(&id_conv);
+       LDKChannelMonitor data_conv;
+       data_conv.inner = (void*)(data & (~1));
+       data_conv.is_owned = false;
+       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
+       *ret_conv = (this_arg_conv->persist_new_channel)(this_arg_conv->this_arg, id_conv, &data_conv);
+       return (long)ret_conv;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_boolPeerHandleErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_boolPeerHandleErrorZ*)arg)->result_ok;
+
+uint32_t  __attribute__((visibility("default"))) TS_Persist_update_persisted_channel(uint32_t this_arg, uint32_t id, uint32_t update, uint32_t data) {
+       LDKPersist* this_arg_conv = (LDKPersist*)this_arg;
+       LDKOutPoint id_conv;
+       id_conv.inner = (void*)(id & (~1));
+       id_conv.is_owned = (id & 1) || (id == 0);
+       id_conv = OutPoint_clone(&id_conv);
+       LDKChannelMonitorUpdate update_conv;
+       update_conv.inner = (void*)(update & (~1));
+       update_conv.is_owned = false;
+       LDKChannelMonitor data_conv;
+       data_conv.inner = (void*)(data & (~1));
+       data_conv.is_owned = false;
+       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
+       *ret_conv = (this_arg_conv->update_persisted_channel)(this_arg_conv->this_arg, id_conv, &update_conv, &data_conv);
+       return (long)ret_conv;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_boolPeerHandleErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_boolPeerHandleErrorZ *val = (LDKCResult_boolPeerHandleErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       return *val->contents.result;
+
+typedef struct LDKChannelMessageHandler_JCalls {
+       atomic_size_t refcnt;
+       LDKMessageSendEventsProvider_JCalls* MessageSendEventsProvider;
+       uint32_t handle_open_channel_meth;
+       uint32_t handle_accept_channel_meth;
+       uint32_t handle_funding_created_meth;
+       uint32_t handle_funding_signed_meth;
+       uint32_t handle_funding_locked_meth;
+       uint32_t handle_shutdown_meth;
+       uint32_t handle_closing_signed_meth;
+       uint32_t handle_update_add_htlc_meth;
+       uint32_t handle_update_fulfill_htlc_meth;
+       uint32_t handle_update_fail_htlc_meth;
+       uint32_t handle_update_fail_malformed_htlc_meth;
+       uint32_t handle_commitment_signed_meth;
+       uint32_t handle_revoke_and_ack_meth;
+       uint32_t handle_update_fee_meth;
+       uint32_t handle_announcement_signatures_meth;
+       uint32_t peer_disconnected_meth;
+       uint32_t peer_connected_meth;
+       uint32_t handle_channel_reestablish_meth;
+       uint32_t handle_error_meth;
+} LDKChannelMessageHandler_JCalls;
+static void LDKChannelMessageHandler_JCalls_free(void* this_arg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               js_free(j_calls->handle_open_channel_meth);
+               js_free(j_calls->handle_accept_channel_meth);
+               js_free(j_calls->handle_funding_created_meth);
+               js_free(j_calls->handle_funding_signed_meth);
+               js_free(j_calls->handle_funding_locked_meth);
+               js_free(j_calls->handle_shutdown_meth);
+               js_free(j_calls->handle_closing_signed_meth);
+               js_free(j_calls->handle_update_add_htlc_meth);
+               js_free(j_calls->handle_update_fulfill_htlc_meth);
+               js_free(j_calls->handle_update_fail_htlc_meth);
+               js_free(j_calls->handle_update_fail_malformed_htlc_meth);
+               js_free(j_calls->handle_commitment_signed_meth);
+               js_free(j_calls->handle_revoke_and_ack_meth);
+               js_free(j_calls->handle_update_fee_meth);
+               js_free(j_calls->handle_announcement_signatures_meth);
+               js_free(j_calls->peer_disconnected_meth);
+               js_free(j_calls->peer_connected_meth);
+               js_free(j_calls->handle_channel_reestablish_meth);
+               js_free(j_calls->handle_error_meth);
+               FREE(j_calls);
+       }
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_boolPeerHandleErrorZ_get_err(uint32_t arg) {
-       LDKCResult_boolPeerHandleErrorZ *val = (LDKCResult_boolPeerHandleErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKPeerHandleError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+void handle_open_channel_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKInitFeatures their_features, const LDKOpenChannel * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKInitFeatures their_features_var = their_features;
+       CHECK((((long)their_features_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&their_features_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long their_features_ref = (long)their_features_var.inner;
+       if (their_features_var.is_owned) {
+               their_features_ref |= 1;
+       }
+       LDKOpenChannel msg_var = *msg;
+       msg_var = OpenChannel_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       js_invoke_function_3(j_calls->handle_open_channel_meth, their_node_id_arr, their_features_ref, msg_ref);
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_SecretKeySecpErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_SecretKeySecpErrorZ*)arg)->result_ok;
+void handle_accept_channel_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKInitFeatures their_features, const LDKAcceptChannel * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKInitFeatures their_features_var = their_features;
+       CHECK((((long)their_features_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&their_features_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long their_features_ref = (long)their_features_var.inner;
+       if (their_features_var.is_owned) {
+               their_features_ref |= 1;
+       }
+       LDKAcceptChannel msg_var = *msg;
+       msg_var = AcceptChannel_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       js_invoke_function_3(j_calls->handle_accept_channel_meth, their_node_id_arr, their_features_ref, msg_ref);
 }
-int8_tArray  __attribute__((visibility("default"))) TS_LDKCResult_SecretKeySecpErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_SecretKeySecpErrorZ *val = (LDKCResult_SecretKeySecpErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       int8_tArray res_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(res_arr + 4), (*val->contents.result).bytes, 32);
-       return res_arr;
+void handle_funding_created_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingCreated * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKFundingCreated msg_var = *msg;
+       msg_var = FundingCreated_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       js_invoke_function_2(j_calls->handle_funding_created_meth, their_node_id_arr, msg_ref);
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_SecretKeySecpErrorZ_get_err(uint32_t arg) {
-       LDKCResult_SecretKeySecpErrorZ *val = (LDKCResult_SecretKeySecpErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       uint32_t err_conv = LDKSecp256k1Error_to_js((*val->contents.err));
-       return err_conv;
+void handle_funding_signed_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingSigned * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKFundingSigned msg_var = *msg;
+       msg_var = FundingSigned_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       js_invoke_function_2(j_calls->handle_funding_signed_meth, their_node_id_arr, msg_ref);
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_PublicKeySecpErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_PublicKeySecpErrorZ*)arg)->result_ok;
+void handle_funding_locked_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingLocked * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKFundingLocked msg_var = *msg;
+       msg_var = FundingLocked_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       js_invoke_function_2(j_calls->handle_funding_locked_meth, their_node_id_arr, msg_ref);
 }
-int8_tArray  __attribute__((visibility("default"))) TS_LDKCResult_PublicKeySecpErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_PublicKeySecpErrorZ *val = (LDKCResult_PublicKeySecpErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       int8_tArray res_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(res_arr + 4), (*val->contents.result).compressed_form, 33);
-       return res_arr;
+void handle_shutdown_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKShutdown * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKShutdown msg_var = *msg;
+       msg_var = Shutdown_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       js_invoke_function_2(j_calls->handle_shutdown_meth, their_node_id_arr, msg_ref);
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_PublicKeySecpErrorZ_get_err(uint32_t arg) {
-       LDKCResult_PublicKeySecpErrorZ *val = (LDKCResult_PublicKeySecpErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       uint32_t err_conv = LDKSecp256k1Error_to_js((*val->contents.err));
-       return err_conv;
+void handle_closing_signed_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKClosingSigned * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKClosingSigned msg_var = *msg;
+       msg_var = ClosingSigned_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       js_invoke_function_2(j_calls->handle_closing_signed_meth, their_node_id_arr, msg_ref);
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_TxCreationKeysSecpErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_TxCreationKeysSecpErrorZ*)arg)->result_ok;
+void handle_update_add_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateAddHTLC * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKUpdateAddHTLC msg_var = *msg;
+       msg_var = UpdateAddHTLC_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       js_invoke_function_2(j_calls->handle_update_add_htlc_meth, their_node_id_arr, msg_ref);
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_TxCreationKeysSecpErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_TxCreationKeysSecpErrorZ *val = (LDKCResult_TxCreationKeysSecpErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKTxCreationKeys res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+void handle_update_fulfill_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFulfillHTLC * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKUpdateFulfillHTLC msg_var = *msg;
+       msg_var = UpdateFulfillHTLC_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       js_invoke_function_2(j_calls->handle_update_fulfill_htlc_meth, their_node_id_arr, msg_ref);
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_TxCreationKeysSecpErrorZ_get_err(uint32_t arg) {
-       LDKCResult_TxCreationKeysSecpErrorZ *val = (LDKCResult_TxCreationKeysSecpErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       uint32_t err_conv = LDKSecp256k1Error_to_js((*val->contents.err));
-       return err_conv;
+void handle_update_fail_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFailHTLC * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKUpdateFailHTLC msg_var = *msg;
+       msg_var = UpdateFailHTLC_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       js_invoke_function_2(j_calls->handle_update_fail_htlc_meth, their_node_id_arr, msg_ref);
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_TrustedCommitmentTransactionNoneZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_TrustedCommitmentTransactionNoneZ*)arg)->result_ok;
+void handle_update_fail_malformed_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFailMalformedHTLC * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKUpdateFailMalformedHTLC msg_var = *msg;
+       msg_var = UpdateFailMalformedHTLC_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       js_invoke_function_2(j_calls->handle_update_fail_malformed_htlc_meth, their_node_id_arr, msg_ref);
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_TrustedCommitmentTransactionNoneZ_get_ok(uint32_t arg) {
-       LDKCResult_TrustedCommitmentTransactionNoneZ *val = (LDKCResult_TrustedCommitmentTransactionNoneZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKTrustedCommitmentTransaction res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+void handle_commitment_signed_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKCommitmentSigned * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKCommitmentSigned msg_var = *msg;
+       msg_var = CommitmentSigned_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       js_invoke_function_2(j_calls->handle_commitment_signed_meth, their_node_id_arr, msg_ref);
 }
-void  __attribute__((visibility("default"))) TS_LDKCResult_TrustedCommitmentTransactionNoneZ_get_err(uint32_t arg) {
-       LDKCResult_TrustedCommitmentTransactionNoneZ *val = (LDKCResult_TrustedCommitmentTransactionNoneZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       return *val->contents.err;
+void handle_revoke_and_ack_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKRevokeAndACK * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKRevokeAndACK msg_var = *msg;
+       msg_var = RevokeAndACK_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       js_invoke_function_2(j_calls->handle_revoke_and_ack_meth, their_node_id_arr, msg_ref);
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_CVec_SignatureZNoneZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_CVec_SignatureZNoneZ*)arg)->result_ok;
+void handle_update_fee_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFee * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKUpdateFee msg_var = *msg;
+       msg_var = UpdateFee_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       js_invoke_function_2(j_calls->handle_update_fee_meth, their_node_id_arr, msg_ref);
 }
-ptrArray  __attribute__((visibility("default"))) TS_LDKCResult_CVec_SignatureZNoneZ_get_ok(uint32_t arg) {
-       LDKCResult_CVec_SignatureZNoneZ *val = (LDKCResult_CVec_SignatureZNoneZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKCVec_SignatureZ res_var = (*val->contents.result);
-       ptrArray res_arr = init_arr(res_var.datalen, sizeof(uint32_t), "Native ptrArray Bytes");
-       int8_tArray *res_arr_ptr = (int8_tArray*)(res_arr + 4);
-       for (size_t m = 0; m < res_var.datalen; m++) {
-               int8_tArray arr_conv_12_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
-               memcpy((uint8_t*)(arr_conv_12_arr + 4), res_var.data[m].compact_form, 64);
-               res_arr_ptr[m] = arr_conv_12_arr;
+void handle_announcement_signatures_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKAnnouncementSignatures * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKAnnouncementSignatures msg_var = *msg;
+       msg_var = AnnouncementSignatures_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
        }
-       return res_arr;
+       js_invoke_function_2(j_calls->handle_announcement_signatures_meth, their_node_id_arr, msg_ref);
 }
-void  __attribute__((visibility("default"))) TS_LDKCResult_CVec_SignatureZNoneZ_get_err(uint32_t arg) {
-       LDKCResult_CVec_SignatureZNoneZ *val = (LDKCResult_CVec_SignatureZNoneZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       return *val->contents.err;
+void peer_disconnected_jcall(const void* this_arg, LDKPublicKey their_node_id, bool no_connection_possible) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       js_invoke_function_2(j_calls->peer_disconnected_meth, their_node_id_arr, no_connection_possible);
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_RouteHopZ_new(uint32_tArray elems) {
-       LDKCVec_RouteHopZ *ret = MALLOC(sizeof(LDKCVec_RouteHopZ), "LDKCVec_RouteHopZ");
-       ret->datalen = *((uint32_t*)elems);
-       if (ret->datalen == 0) {
-               ret->data = NULL;
-       } else {
-               ret->data = MALLOC(sizeof(LDKRouteHop) * ret->datalen, "LDKCVec_RouteHopZ Data");
-               uint32_t *java_elems = (uint32_t*)(elems + 4);
-               for (size_t i = 0; i < ret->datalen; i++) {
-                       uint32_t arr_elem = java_elems[i];
-                       LDKRouteHop arr_elem_conv;
-                       arr_elem_conv.inner = (void*)(arr_elem & (~1));
-                       arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
-                       arr_elem_conv = RouteHop_clone(&arr_elem_conv);
-                       ret->data[i] = arr_elem_conv;
-               }
+void peer_connected_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKInit msg_var = *msg;
+       msg_var = Init_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
        }
-       return (long)ret;
+       js_invoke_function_2(j_calls->peer_connected_meth, their_node_id_arr, msg_ref);
 }
-static inline LDKCVec_RouteHopZ CVec_RouteHopZ_clone(const LDKCVec_RouteHopZ *orig) {
-       LDKCVec_RouteHopZ ret = { .data = MALLOC(sizeof(LDKRouteHop) * orig->datalen, "LDKCVec_RouteHopZ clone bytes"), .datalen = orig->datalen };
-       for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = RouteHop_clone(&orig->data[i]);
+void handle_channel_reestablish_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelReestablish * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKChannelReestablish msg_var = *msg;
+       msg_var = ChannelReestablish_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
        }
-       return ret;
+       js_invoke_function_2(j_calls->handle_channel_reestablish_meth, their_node_id_arr, msg_ref);
 }
-static inline LDKCVec_CVec_RouteHopZZ CVec_CVec_RouteHopZZ_clone(const LDKCVec_CVec_RouteHopZZ *orig) {
-       LDKCVec_CVec_RouteHopZZ ret = { .data = MALLOC(sizeof(LDKCVec_RouteHopZ) * orig->datalen, "LDKCVec_CVec_RouteHopZZ clone bytes"), .datalen = orig->datalen };
-       for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = CVec_RouteHopZ_clone(&orig->data[i]);
+void handle_error_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKErrorMessage * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKErrorMessage msg_var = *msg;
+       msg_var = ErrorMessage_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
        }
+       js_invoke_function_2(j_calls->handle_error_meth, their_node_id_arr, msg_ref);
+}
+static void* LDKChannelMessageHandler_JCalls_clone(const void* this_arg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+       atomic_fetch_add_explicit(&j_calls->MessageSendEventsProvider->refcnt, 1, memory_order_release);
+       return (void*) this_arg;
+}
+static inline LDKChannelMessageHandler LDKChannelMessageHandler_init (/*TODO: JS Object Reference */void* o, /*TODO: JS Object Reference */void* MessageSendEventsProvider) {
+       LDKChannelMessageHandler_JCalls *calls = MALLOC(sizeof(LDKChannelMessageHandler_JCalls), "LDKChannelMessageHandler_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       //TODO: Assign calls->o from o
+
+       LDKChannelMessageHandler ret = {
+               .this_arg = (void*) calls,
+               .handle_open_channel = handle_open_channel_jcall,
+               .handle_accept_channel = handle_accept_channel_jcall,
+               .handle_funding_created = handle_funding_created_jcall,
+               .handle_funding_signed = handle_funding_signed_jcall,
+               .handle_funding_locked = handle_funding_locked_jcall,
+               .handle_shutdown = handle_shutdown_jcall,
+               .handle_closing_signed = handle_closing_signed_jcall,
+               .handle_update_add_htlc = handle_update_add_htlc_jcall,
+               .handle_update_fulfill_htlc = handle_update_fulfill_htlc_jcall,
+               .handle_update_fail_htlc = handle_update_fail_htlc_jcall,
+               .handle_update_fail_malformed_htlc = handle_update_fail_malformed_htlc_jcall,
+               .handle_commitment_signed = handle_commitment_signed_jcall,
+               .handle_revoke_and_ack = handle_revoke_and_ack_jcall,
+               .handle_update_fee = handle_update_fee_jcall,
+               .handle_announcement_signatures = handle_announcement_signatures_jcall,
+               .peer_disconnected = peer_disconnected_jcall,
+               .peer_connected = peer_connected_jcall,
+               .handle_channel_reestablish = handle_channel_reestablish_jcall,
+               .handle_error = handle_error_jcall,
+               .free = LDKChannelMessageHandler_JCalls_free,
+               .MessageSendEventsProvider = LDKMessageSendEventsProvider_init(MessageSendEventsProvider),
+       };
+       calls->MessageSendEventsProvider = ret.MessageSendEventsProvider.this_arg;
        return ret;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_RouteDecodeErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_RouteDecodeErrorZ*)arg)->result_ok;
+long  __attribute__((visibility("default"))) TS_LDKChannelMessageHandler_new(/*TODO: JS Object Reference */void* o, /*TODO: JS Object Reference */ void* MessageSendEventsProvider) {
+       LDKChannelMessageHandler *res_ptr = MALLOC(sizeof(LDKChannelMessageHandler), "LDKChannelMessageHandler");
+       *res_ptr = LDKChannelMessageHandler_init(o, MessageSendEventsProvider);
+       return (long)res_ptr;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_RouteDecodeErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_RouteDecodeErrorZ *val = (LDKCResult_RouteDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKRoute res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_open_channel(uint32_t this_arg, int8_tArray their_node_id, uint32_t their_features, uint32_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKInitFeatures their_features_conv;
+       their_features_conv.inner = (void*)(their_features & (~1));
+       their_features_conv.is_owned = (their_features & 1) || (their_features == 0);
+       their_features_conv = InitFeatures_clone(&their_features_conv);
+       LDKOpenChannel msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_open_channel)(this_arg_conv->this_arg, their_node_id_ref, their_features_conv, &msg_conv);
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_RouteDecodeErrorZ_get_err(uint32_t arg) {
-       LDKCResult_RouteDecodeErrorZ *val = (LDKCResult_RouteDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+
+void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_accept_channel(uint32_t this_arg, int8_tArray their_node_id, uint32_t their_features, uint32_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKInitFeatures their_features_conv;
+       their_features_conv.inner = (void*)(their_features & (~1));
+       their_features_conv.is_owned = (their_features & 1) || (their_features == 0);
+       their_features_conv = InitFeatures_clone(&their_features_conv);
+       LDKAcceptChannel msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_accept_channel)(this_arg_conv->this_arg, their_node_id_ref, their_features_conv, &msg_conv);
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_RouteHintZ_new(uint32_tArray elems) {
-       LDKCVec_RouteHintZ *ret = MALLOC(sizeof(LDKCVec_RouteHintZ), "LDKCVec_RouteHintZ");
-       ret->datalen = *((uint32_t*)elems);
-       if (ret->datalen == 0) {
-               ret->data = NULL;
-       } else {
-               ret->data = MALLOC(sizeof(LDKRouteHint) * ret->datalen, "LDKCVec_RouteHintZ Data");
-               uint32_t *java_elems = (uint32_t*)(elems + 4);
-               for (size_t i = 0; i < ret->datalen; i++) {
-                       uint32_t arr_elem = java_elems[i];
-                       LDKRouteHint arr_elem_conv;
-                       arr_elem_conv.inner = (void*)(arr_elem & (~1));
-                       arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
-                       arr_elem_conv = RouteHint_clone(&arr_elem_conv);
-                       ret->data[i] = arr_elem_conv;
-               }
-       }
-       return (long)ret;
+
+void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_funding_created(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKFundingCreated msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_funding_created)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
 }
-static inline LDKCVec_RouteHintZ CVec_RouteHintZ_clone(const LDKCVec_RouteHintZ *orig) {
-       LDKCVec_RouteHintZ ret = { .data = MALLOC(sizeof(LDKRouteHint) * orig->datalen, "LDKCVec_RouteHintZ clone bytes"), .datalen = orig->datalen };
-       for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = RouteHint_clone(&orig->data[i]);
-       }
-       return ret;
+
+void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_funding_signed(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKFundingSigned msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_funding_signed)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+}
+
+void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_funding_locked(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKFundingLocked msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_funding_locked)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+}
+
+void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_shutdown(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKShutdown msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_shutdown)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+}
+
+void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_closing_signed(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKClosingSigned msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_closing_signed)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+}
+
+void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_update_add_htlc(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKUpdateAddHTLC msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_update_add_htlc)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+}
+
+void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_update_fulfill_htlc(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKUpdateFulfillHTLC msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_update_fulfill_htlc)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_RouteLightningErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_RouteLightningErrorZ*)arg)->result_ok;
+
+void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_update_fail_htlc(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKUpdateFailHTLC msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_update_fail_htlc)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_RouteLightningErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_RouteLightningErrorZ *val = (LDKCResult_RouteLightningErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKRoute res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+
+void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_update_fail_malformed_htlc(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKUpdateFailMalformedHTLC msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_update_fail_malformed_htlc)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_RouteLightningErrorZ_get_err(uint32_t arg) {
-       LDKCResult_RouteLightningErrorZ *val = (LDKCResult_RouteLightningErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKLightningError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+
+void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_commitment_signed(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKCommitmentSigned msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_commitment_signed)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_RoutingFeesDecodeErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_RoutingFeesDecodeErrorZ*)arg)->result_ok;
+
+void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_revoke_and_ack(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKRevokeAndACK msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_revoke_and_ack)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_RoutingFeesDecodeErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_RoutingFeesDecodeErrorZ *val = (LDKCResult_RoutingFeesDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKRoutingFees res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+
+void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_update_fee(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKUpdateFee msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_update_fee)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_RoutingFeesDecodeErrorZ_get_err(uint32_t arg) {
-       LDKCResult_RoutingFeesDecodeErrorZ *val = (LDKCResult_RoutingFeesDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+
+void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_announcement_signatures(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKAnnouncementSignatures msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_announcement_signatures)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_NodeAnnouncementInfoDecodeErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)arg)->result_ok;
+
+void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_peer_disconnected(uint32_t this_arg, int8_tArray their_node_id, jboolean no_connection_possible) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       (this_arg_conv->peer_disconnected)(this_arg_conv->this_arg, their_node_id_ref, no_connection_possible);
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_NodeAnnouncementInfoDecodeErrorZ *val = (LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKNodeAnnouncementInfo res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+
+void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_peer_connected(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKInit msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_err(uint32_t arg) {
-       LDKCResult_NodeAnnouncementInfoDecodeErrorZ *val = (LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+
+void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_channel_reestablish(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKChannelReestablish msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_channel_reestablish)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_NodeInfoDecodeErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_NodeInfoDecodeErrorZ*)arg)->result_ok;
+
+void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_error(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKErrorMessage msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_error)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NodeInfoDecodeErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_NodeInfoDecodeErrorZ *val = (LDKCResult_NodeInfoDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKNodeInfo res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+
+typedef struct LDKRoutingMessageHandler_JCalls {
+       atomic_size_t refcnt;
+       LDKMessageSendEventsProvider_JCalls* MessageSendEventsProvider;
+       uint32_t handle_node_announcement_meth;
+       uint32_t handle_channel_announcement_meth;
+       uint32_t handle_channel_update_meth;
+       uint32_t handle_htlc_fail_channel_update_meth;
+       uint32_t get_next_channel_announcements_meth;
+       uint32_t get_next_node_announcements_meth;
+       uint32_t sync_routing_table_meth;
+       uint32_t handle_reply_channel_range_meth;
+       uint32_t handle_reply_short_channel_ids_end_meth;
+       uint32_t handle_query_channel_range_meth;
+       uint32_t handle_query_short_channel_ids_meth;
+} LDKRoutingMessageHandler_JCalls;
+static void LDKRoutingMessageHandler_JCalls_free(void* this_arg) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               js_free(j_calls->handle_node_announcement_meth);
+               js_free(j_calls->handle_channel_announcement_meth);
+               js_free(j_calls->handle_channel_update_meth);
+               js_free(j_calls->handle_htlc_fail_channel_update_meth);
+               js_free(j_calls->get_next_channel_announcements_meth);
+               js_free(j_calls->get_next_node_announcements_meth);
+               js_free(j_calls->sync_routing_table_meth);
+               js_free(j_calls->handle_reply_channel_range_meth);
+               js_free(j_calls->handle_reply_short_channel_ids_end_meth);
+               js_free(j_calls->handle_query_channel_range_meth);
+               js_free(j_calls->handle_query_short_channel_ids_meth);
+               FREE(j_calls);
+       }
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NodeInfoDecodeErrorZ_get_err(uint32_t arg) {
-       LDKCResult_NodeInfoDecodeErrorZ *val = (LDKCResult_NodeInfoDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+LDKCResult_boolLightningErrorZ handle_node_announcement_jcall(const void* this_arg, const LDKNodeAnnouncement * msg) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+       LDKNodeAnnouncement msg_var = *msg;
+       msg_var = NodeAnnouncement_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       LDKCResult_boolLightningErrorZ* ret = (LDKCResult_boolLightningErrorZ*)js_invoke_function_1(j_calls->handle_node_announcement_meth, msg_ref);
+       LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_boolLightningErrorZ_clone((LDKCResult_boolLightningErrorZ*)ret);
+       return ret_conv;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_NetworkGraphDecodeErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_NetworkGraphDecodeErrorZ*)arg)->result_ok;
+LDKCResult_boolLightningErrorZ handle_channel_announcement_jcall(const void* this_arg, const LDKChannelAnnouncement * msg) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+       LDKChannelAnnouncement msg_var = *msg;
+       msg_var = ChannelAnnouncement_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       LDKCResult_boolLightningErrorZ* ret = (LDKCResult_boolLightningErrorZ*)js_invoke_function_1(j_calls->handle_channel_announcement_meth, msg_ref);
+       LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_boolLightningErrorZ_clone((LDKCResult_boolLightningErrorZ*)ret);
+       return ret_conv;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NetworkGraphDecodeErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_NetworkGraphDecodeErrorZ *val = (LDKCResult_NetworkGraphDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKNetworkGraph res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+LDKCResult_boolLightningErrorZ handle_channel_update_jcall(const void* this_arg, const LDKChannelUpdate * msg) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+       LDKChannelUpdate msg_var = *msg;
+       msg_var = ChannelUpdate_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       LDKCResult_boolLightningErrorZ* ret = (LDKCResult_boolLightningErrorZ*)js_invoke_function_1(j_calls->handle_channel_update_meth, msg_ref);
+       LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_boolLightningErrorZ_clone((LDKCResult_boolLightningErrorZ*)ret);
+       return ret_conv;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NetworkGraphDecodeErrorZ_get_err(uint32_t arg) {
-       LDKCResult_NetworkGraphDecodeErrorZ *val = (LDKCResult_NetworkGraphDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+void handle_htlc_fail_channel_update_jcall(const void* this_arg, const LDKHTLCFailChannelUpdate * update) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+       long ret_update = (long)update;
+       js_invoke_function_1(j_calls->handle_htlc_fail_channel_update_meth, ret_update);
 }
-typedef struct LDKMessageSendEventsProvider_JCalls {
-       atomic_size_t refcnt;
-       uint32_t get_and_clear_pending_msg_events_meth;
-} LDKMessageSendEventsProvider_JCalls;
-static void LDKMessageSendEventsProvider_JCalls_free(void* this_arg) {
-       LDKMessageSendEventsProvider_JCalls *j_calls = (LDKMessageSendEventsProvider_JCalls*) this_arg;
-       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
-               js_free(j_calls->get_and_clear_pending_msg_events_meth);
-               FREE(j_calls);
+LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ get_next_channel_announcements_jcall(const void* this_arg, uint64_t starting_point, uint8_t batch_amount) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+       uint32_tArray arg = js_invoke_function_2(j_calls->get_next_channel_announcements_meth, starting_point, batch_amount);
+       LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ arg_constr;
+       arg_constr.datalen = *((uint32_t*)arg);
+       if (arg_constr.datalen > 0)
+               arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ Elements");
+       else
+               arg_constr.data = NULL;
+       uint32_t* arg_vals = (uint32_t*)(arg + 4);
+       for (size_t l = 0; l < arg_constr.datalen; l++) {
+               uint32_t arr_conv_63 = arg_vals[l];
+               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ arr_conv_63_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)arr_conv_63) & ~1);
+               FREE((void*)arr_conv_63);
+               arg_constr.data[l] = arr_conv_63_conv;
        }
+       return arg_constr;
 }
-LDKCVec_MessageSendEventZ get_and_clear_pending_msg_events_jcall(const void* this_arg) {
-       LDKMessageSendEventsProvider_JCalls *j_calls = (LDKMessageSendEventsProvider_JCalls*) this_arg;
-       uint32_tArray arg = js_invoke_function_0(j_calls->get_and_clear_pending_msg_events_meth);
-       LDKCVec_MessageSendEventZ arg_constr;
+LDKCVec_NodeAnnouncementZ get_next_node_announcements_jcall(const void* this_arg, LDKPublicKey starting_point, uint8_t batch_amount) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+       int8_tArray starting_point_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(starting_point_arr + 4), starting_point.compressed_form, 33);
+       uint32_tArray arg = js_invoke_function_2(j_calls->get_next_node_announcements_meth, starting_point_arr, batch_amount);
+       LDKCVec_NodeAnnouncementZ arg_constr;
        arg_constr.datalen = *((uint32_t*)arg);
        if (arg_constr.datalen > 0)
-               arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKMessageSendEvent), "LDKCVec_MessageSendEventZ Elements");
+               arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKNodeAnnouncement), "LDKCVec_NodeAnnouncementZ Elements");
        else
                arg_constr.data = NULL;
        uint32_t* arg_vals = (uint32_t*)(arg + 4);
        for (size_t s = 0; s < arg_constr.datalen; s++) {
                uint32_t arr_conv_18 = arg_vals[s];
-               LDKMessageSendEvent arr_conv_18_conv = *(LDKMessageSendEvent*)(((uint64_t)arr_conv_18) & ~1);
-               FREE((void*)arr_conv_18);
+               LDKNodeAnnouncement arr_conv_18_conv;
+               arr_conv_18_conv.inner = (void*)(arr_conv_18 & (~1));
+               arr_conv_18_conv.is_owned = (arr_conv_18 & 1) || (arr_conv_18 == 0);
+               arr_conv_18_conv = NodeAnnouncement_clone(&arr_conv_18_conv);
                arg_constr.data[s] = arr_conv_18_conv;
        }
        return arg_constr;
 }
-static void* LDKMessageSendEventsProvider_JCalls_clone(const void* this_arg) {
-       LDKMessageSendEventsProvider_JCalls *j_calls = (LDKMessageSendEventsProvider_JCalls*) this_arg;
-       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
-       return (void*) this_arg;
-}
-static inline LDKMessageSendEventsProvider LDKMessageSendEventsProvider_init (/*TODO: JS Object Reference */void* o) {
-       LDKMessageSendEventsProvider_JCalls *calls = MALLOC(sizeof(LDKMessageSendEventsProvider_JCalls), "LDKMessageSendEventsProvider_JCalls");
-       atomic_init(&calls->refcnt, 1);
-       //TODO: Assign calls->o from o
-
-       LDKMessageSendEventsProvider ret = {
-               .this_arg = (void*) calls,
-               .get_and_clear_pending_msg_events = get_and_clear_pending_msg_events_jcall,
-               .free = LDKMessageSendEventsProvider_JCalls_free,
-       };
-       return ret;
+void sync_routing_table_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * init) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKInit init_var = *init;
+       init_var = Init_clone(init);
+       CHECK((((long)init_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&init_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long init_ref = (long)init_var.inner;
+       if (init_var.is_owned) {
+               init_ref |= 1;
+       }
+       js_invoke_function_2(j_calls->sync_routing_table_meth, their_node_id_arr, init_ref);
 }
-long  __attribute__((visibility("default"))) TS_LDKMessageSendEventsProvider_new(/*TODO: JS Object Reference */void* o) {
-       LDKMessageSendEventsProvider *res_ptr = MALLOC(sizeof(LDKMessageSendEventsProvider), "LDKMessageSendEventsProvider");
-       *res_ptr = LDKMessageSendEventsProvider_init(o);
-       return (long)res_ptr;
+LDKCResult_NoneLightningErrorZ handle_reply_channel_range_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKReplyChannelRange msg) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKReplyChannelRange msg_var = msg;
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       LDKCResult_NoneLightningErrorZ* ret = (LDKCResult_NoneLightningErrorZ*)js_invoke_function_2(j_calls->handle_reply_channel_range_meth, their_node_id_arr, msg_ref);
+       LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_NoneLightningErrorZ_clone((LDKCResult_NoneLightningErrorZ*)ret);
+       return ret_conv;
 }
-uint32_tArray  __attribute__((visibility("default"))) TS_MessageSendEventsProvider_get_and_clear_pending_msg_events(uint32_t this_arg) {
-       LDKMessageSendEventsProvider* this_arg_conv = (LDKMessageSendEventsProvider*)this_arg;
-       LDKCVec_MessageSendEventZ ret_var = (this_arg_conv->get_and_clear_pending_msg_events)(this_arg_conv->this_arg);
-       uint32_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
-       uint32_t *ret_arr_ptr = (uint32_t*)(ret_arr + 4);
-       for (size_t s = 0; s < ret_var.datalen; s++) {
-               LDKMessageSendEvent *arr_conv_18_copy = MALLOC(sizeof(LDKMessageSendEvent), "LDKMessageSendEvent");
-               *arr_conv_18_copy = MessageSendEvent_clone(&ret_var.data[s]);
-               long arr_conv_18_ref = (long)arr_conv_18_copy;
-               ret_arr_ptr[s] = arr_conv_18_ref;
+LDKCResult_NoneLightningErrorZ handle_reply_short_channel_ids_end_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKReplyShortChannelIdsEnd msg) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKReplyShortChannelIdsEnd msg_var = msg;
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
        }
-       FREE(ret_var.data);
-       return ret_arr;
+       LDKCResult_NoneLightningErrorZ* ret = (LDKCResult_NoneLightningErrorZ*)js_invoke_function_2(j_calls->handle_reply_short_channel_ids_end_meth, their_node_id_arr, msg_ref);
+       LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_NoneLightningErrorZ_clone((LDKCResult_NoneLightningErrorZ*)ret);
+       return ret_conv;
 }
-
-typedef struct LDKEventsProvider_JCalls {
-       atomic_size_t refcnt;
-       uint32_t get_and_clear_pending_events_meth;
-} LDKEventsProvider_JCalls;
-static void LDKEventsProvider_JCalls_free(void* this_arg) {
-       LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) this_arg;
-       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
-               js_free(j_calls->get_and_clear_pending_events_meth);
-               FREE(j_calls);
+LDKCResult_NoneLightningErrorZ handle_query_channel_range_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKQueryChannelRange msg) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKQueryChannelRange msg_var = msg;
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
        }
+       LDKCResult_NoneLightningErrorZ* ret = (LDKCResult_NoneLightningErrorZ*)js_invoke_function_2(j_calls->handle_query_channel_range_meth, their_node_id_arr, msg_ref);
+       LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_NoneLightningErrorZ_clone((LDKCResult_NoneLightningErrorZ*)ret);
+       return ret_conv;
 }
-LDKCVec_EventZ get_and_clear_pending_events_jcall(const void* this_arg) {
-       LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) this_arg;
-       uint32_tArray arg = js_invoke_function_0(j_calls->get_and_clear_pending_events_meth);
-       LDKCVec_EventZ arg_constr;
-       arg_constr.datalen = *((uint32_t*)arg);
-       if (arg_constr.datalen > 0)
-               arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKEvent), "LDKCVec_EventZ Elements");
-       else
-               arg_constr.data = NULL;
-       uint32_t* arg_vals = (uint32_t*)(arg + 4);
-       for (size_t h = 0; h < arg_constr.datalen; h++) {
-               uint32_t arr_conv_7 = arg_vals[h];
-               LDKEvent arr_conv_7_conv = *(LDKEvent*)(((uint64_t)arr_conv_7) & ~1);
-               FREE((void*)arr_conv_7);
-               arg_constr.data[h] = arr_conv_7_conv;
+LDKCResult_NoneLightningErrorZ handle_query_short_channel_ids_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKQueryShortChannelIds msg) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKQueryShortChannelIds msg_var = msg;
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
        }
-       return arg_constr;
+       LDKCResult_NoneLightningErrorZ* ret = (LDKCResult_NoneLightningErrorZ*)js_invoke_function_2(j_calls->handle_query_short_channel_ids_meth, their_node_id_arr, msg_ref);
+       LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_NoneLightningErrorZ_clone((LDKCResult_NoneLightningErrorZ*)ret);
+       return ret_conv;
 }
-static void* LDKEventsProvider_JCalls_clone(const void* this_arg) {
-       LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) this_arg;
+static void* LDKRoutingMessageHandler_JCalls_clone(const void* this_arg) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
        atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+       atomic_fetch_add_explicit(&j_calls->MessageSendEventsProvider->refcnt, 1, memory_order_release);
        return (void*) this_arg;
 }
-static inline LDKEventsProvider LDKEventsProvider_init (/*TODO: JS Object Reference */void* o) {
-       LDKEventsProvider_JCalls *calls = MALLOC(sizeof(LDKEventsProvider_JCalls), "LDKEventsProvider_JCalls");
+static inline LDKRoutingMessageHandler LDKRoutingMessageHandler_init (/*TODO: JS Object Reference */void* o, /*TODO: JS Object Reference */void* MessageSendEventsProvider) {
+       LDKRoutingMessageHandler_JCalls *calls = MALLOC(sizeof(LDKRoutingMessageHandler_JCalls), "LDKRoutingMessageHandler_JCalls");
        atomic_init(&calls->refcnt, 1);
        //TODO: Assign calls->o from o
 
-       LDKEventsProvider ret = {
+       LDKRoutingMessageHandler ret = {
                .this_arg = (void*) calls,
-               .get_and_clear_pending_events = get_and_clear_pending_events_jcall,
-               .free = LDKEventsProvider_JCalls_free,
+               .handle_node_announcement = handle_node_announcement_jcall,
+               .handle_channel_announcement = handle_channel_announcement_jcall,
+               .handle_channel_update = handle_channel_update_jcall,
+               .handle_htlc_fail_channel_update = handle_htlc_fail_channel_update_jcall,
+               .get_next_channel_announcements = get_next_channel_announcements_jcall,
+               .get_next_node_announcements = get_next_node_announcements_jcall,
+               .sync_routing_table = sync_routing_table_jcall,
+               .handle_reply_channel_range = handle_reply_channel_range_jcall,
+               .handle_reply_short_channel_ids_end = handle_reply_short_channel_ids_end_jcall,
+               .handle_query_channel_range = handle_query_channel_range_jcall,
+               .handle_query_short_channel_ids = handle_query_short_channel_ids_jcall,
+               .free = LDKRoutingMessageHandler_JCalls_free,
+               .MessageSendEventsProvider = LDKMessageSendEventsProvider_init(MessageSendEventsProvider),
        };
+       calls->MessageSendEventsProvider = ret.MessageSendEventsProvider.this_arg;
        return ret;
 }
-long  __attribute__((visibility("default"))) TS_LDKEventsProvider_new(/*TODO: JS Object Reference */void* o) {
-       LDKEventsProvider *res_ptr = MALLOC(sizeof(LDKEventsProvider), "LDKEventsProvider");
-       *res_ptr = LDKEventsProvider_init(o);
+long  __attribute__((visibility("default"))) TS_LDKRoutingMessageHandler_new(/*TODO: JS Object Reference */void* o, /*TODO: JS Object Reference */ void* MessageSendEventsProvider) {
+       LDKRoutingMessageHandler *res_ptr = MALLOC(sizeof(LDKRoutingMessageHandler), "LDKRoutingMessageHandler");
+       *res_ptr = LDKRoutingMessageHandler_init(o, MessageSendEventsProvider);
        return (long)res_ptr;
 }
-uint32_tArray  __attribute__((visibility("default"))) TS_EventsProvider_get_and_clear_pending_events(uint32_t this_arg) {
-       LDKEventsProvider* this_arg_conv = (LDKEventsProvider*)this_arg;
-       LDKCVec_EventZ ret_var = (this_arg_conv->get_and_clear_pending_events)(this_arg_conv->this_arg);
+uint32_t  __attribute__((visibility("default"))) TS_RoutingMessageHandler_handle_node_announcement(uint32_t this_arg, uint32_t msg) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       LDKNodeAnnouncement msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
+       *ret_conv = (this_arg_conv->handle_node_announcement)(this_arg_conv->this_arg, &msg_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_RoutingMessageHandler_handle_channel_announcement(uint32_t this_arg, uint32_t msg) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       LDKChannelAnnouncement msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
+       *ret_conv = (this_arg_conv->handle_channel_announcement)(this_arg_conv->this_arg, &msg_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_RoutingMessageHandler_handle_channel_update(uint32_t this_arg, uint32_t msg) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       LDKChannelUpdate msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
+       *ret_conv = (this_arg_conv->handle_channel_update)(this_arg_conv->this_arg, &msg_conv);
+       return (long)ret_conv;
+}
+
+void  __attribute__((visibility("default"))) TS_RoutingMessageHandler_handle_htlc_fail_channel_update(uint32_t this_arg, uint32_t update) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       LDKHTLCFailChannelUpdate* update_conv = (LDKHTLCFailChannelUpdate*)update;
+       (this_arg_conv->handle_htlc_fail_channel_update)(this_arg_conv->this_arg, update_conv);
+}
+
+uint32_tArray  __attribute__((visibility("default"))) TS_RoutingMessageHandler_get_next_channel_announcements(uint32_t this_arg, int64_t starting_point, int8_t batch_amount) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ ret_var = (this_arg_conv->get_next_channel_announcements)(this_arg_conv->this_arg, starting_point, batch_amount);
        uint32_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
        uint32_t *ret_arr_ptr = (uint32_t*)(ret_arr + 4);
-       for (size_t h = 0; h < ret_var.datalen; h++) {
-               LDKEvent *arr_conv_7_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
-               *arr_conv_7_copy = Event_clone(&ret_var.data[h]);
-               long arr_conv_7_ref = (long)arr_conv_7_copy;
-               ret_arr_ptr[h] = arr_conv_7_ref;
+       for (size_t l = 0; l < ret_var.datalen; l++) {
+               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* arr_conv_63_ref = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
+               *arr_conv_63_ref = ret_var.data[l];
+               ret_arr_ptr[l] = (long)arr_conv_63_ref;
        }
        FREE(ret_var.data);
        return ret_arr;
 }
 
-typedef struct LDKAccess_JCalls {
+uint32_tArray  __attribute__((visibility("default"))) TS_RoutingMessageHandler_get_next_node_announcements(uint32_t this_arg, int8_tArray starting_point, int8_t batch_amount) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       LDKPublicKey starting_point_ref;
+       CHECK(*((uint32_t*)starting_point) == 33);
+       memcpy(starting_point_ref.compressed_form, (uint8_t*)(starting_point + 4), 33);
+       LDKCVec_NodeAnnouncementZ ret_var = (this_arg_conv->get_next_node_announcements)(this_arg_conv->this_arg, starting_point_ref, batch_amount);
+       uint32_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
+       uint32_t *ret_arr_ptr = (uint32_t*)(ret_arr + 4);
+       for (size_t s = 0; s < ret_var.datalen; s++) {
+               LDKNodeAnnouncement arr_conv_18_var = ret_var.data[s];
+               CHECK((((long)arr_conv_18_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+               CHECK((((long)&arr_conv_18_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+               long arr_conv_18_ref = (long)arr_conv_18_var.inner;
+               if (arr_conv_18_var.is_owned) {
+                       arr_conv_18_ref |= 1;
+               }
+               ret_arr_ptr[s] = arr_conv_18_ref;
+       }
+       FREE(ret_var.data);
+       return ret_arr;
+}
+
+void  __attribute__((visibility("default"))) TS_RoutingMessageHandler_sync_routing_table(uint32_t this_arg, int8_tArray their_node_id, uint32_t init) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKInit init_conv;
+       init_conv.inner = (void*)(init & (~1));
+       init_conv.is_owned = false;
+       (this_arg_conv->sync_routing_table)(this_arg_conv->this_arg, their_node_id_ref, &init_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_RoutingMessageHandler_handle_reply_channel_range(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKReplyChannelRange msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = (msg & 1) || (msg == 0);
+       msg_conv = ReplyChannelRange_clone(&msg_conv);
+       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
+       *ret_conv = (this_arg_conv->handle_reply_channel_range)(this_arg_conv->this_arg, their_node_id_ref, msg_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_RoutingMessageHandler_handle_reply_short_channel_ids_end(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKReplyShortChannelIdsEnd msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = (msg & 1) || (msg == 0);
+       msg_conv = ReplyShortChannelIdsEnd_clone(&msg_conv);
+       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
+       *ret_conv = (this_arg_conv->handle_reply_short_channel_ids_end)(this_arg_conv->this_arg, their_node_id_ref, msg_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_RoutingMessageHandler_handle_query_channel_range(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKQueryChannelRange msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = (msg & 1) || (msg == 0);
+       msg_conv = QueryChannelRange_clone(&msg_conv);
+       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
+       *ret_conv = (this_arg_conv->handle_query_channel_range)(this_arg_conv->this_arg, their_node_id_ref, msg_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_RoutingMessageHandler_handle_query_short_channel_ids(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKQueryShortChannelIds msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = (msg & 1) || (msg == 0);
+       msg_conv = QueryShortChannelIds_clone(&msg_conv);
+       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
+       *ret_conv = (this_arg_conv->handle_query_short_channel_ids)(this_arg_conv->this_arg, their_node_id_ref, msg_conv);
+       return (long)ret_conv;
+}
+
+typedef struct LDKSocketDescriptor_JCalls {
        atomic_size_t refcnt;
-       uint32_t get_utxo_meth;
-} LDKAccess_JCalls;
-static void LDKAccess_JCalls_free(void* this_arg) {
-       LDKAccess_JCalls *j_calls = (LDKAccess_JCalls*) this_arg;
+       uint32_t send_data_meth;
+       uint32_t disconnect_socket_meth;
+       uint32_t eq_meth;
+       uint32_t hash_meth;
+} LDKSocketDescriptor_JCalls;
+static void LDKSocketDescriptor_JCalls_free(void* this_arg) {
+       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
        if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
-               js_free(j_calls->get_utxo_meth);
+               js_free(j_calls->send_data_meth);
+               js_free(j_calls->disconnect_socket_meth);
+               js_free(j_calls->eq_meth);
+               js_free(j_calls->hash_meth);
                FREE(j_calls);
        }
 }
-LDKCResult_TxOutAccessErrorZ get_utxo_jcall(const void* this_arg, const uint8_t (* genesis_hash)[32], uint64_t short_channel_id) {
-       LDKAccess_JCalls *j_calls = (LDKAccess_JCalls*) this_arg;
-       int8_tArray genesis_hash_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(genesis_hash_arr + 4), *genesis_hash, 32);
-       LDKCResult_TxOutAccessErrorZ* ret = (LDKCResult_TxOutAccessErrorZ*)js_invoke_function_2(j_calls->get_utxo_meth, genesis_hash_arr, short_channel_id);
-       LDKCResult_TxOutAccessErrorZ ret_conv = *(LDKCResult_TxOutAccessErrorZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_TxOutAccessErrorZ_clone((LDKCResult_TxOutAccessErrorZ*)ret);
-       return ret_conv;
+uintptr_t send_data_jcall(void* this_arg, LDKu8slice data, bool resume_read) {
+       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
+       LDKu8slice data_var = data;
+       int8_tArray data_arr = init_arr(data_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(data_arr + 4), data_var.data, data_var.datalen);
+       return js_invoke_function_2(j_calls->send_data_meth, data_arr, resume_read);
 }
-static void* LDKAccess_JCalls_clone(const void* this_arg) {
-       LDKAccess_JCalls *j_calls = (LDKAccess_JCalls*) this_arg;
+void disconnect_socket_jcall(void* this_arg) {
+       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
+       js_invoke_function_0(j_calls->disconnect_socket_meth);
+}
+bool eq_jcall(const void* this_arg, const LDKSocketDescriptor * other_arg) {
+       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
+       LDKSocketDescriptor *other_arg_clone = MALLOC(sizeof(LDKSocketDescriptor), "LDKSocketDescriptor");
+       *other_arg_clone = SocketDescriptor_clone(other_arg);
+       return js_invoke_function_1(j_calls->eq_meth, (long)other_arg_clone);
+}
+uint64_t hash_jcall(const void* this_arg) {
+       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
+       return js_invoke_function_0(j_calls->hash_meth);
+}
+static void* LDKSocketDescriptor_JCalls_clone(const void* this_arg) {
+       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
        atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
        return (void*) this_arg;
 }
-static inline LDKAccess LDKAccess_init (/*TODO: JS Object Reference */void* o) {
-       LDKAccess_JCalls *calls = MALLOC(sizeof(LDKAccess_JCalls), "LDKAccess_JCalls");
+static inline LDKSocketDescriptor LDKSocketDescriptor_init (/*TODO: JS Object Reference */void* o) {
+       LDKSocketDescriptor_JCalls *calls = MALLOC(sizeof(LDKSocketDescriptor_JCalls), "LDKSocketDescriptor_JCalls");
        atomic_init(&calls->refcnt, 1);
        //TODO: Assign calls->o from o
 
-       LDKAccess ret = {
+       LDKSocketDescriptor ret = {
                .this_arg = (void*) calls,
-               .get_utxo = get_utxo_jcall,
-               .free = LDKAccess_JCalls_free,
+               .send_data = send_data_jcall,
+               .disconnect_socket = disconnect_socket_jcall,
+               .eq = eq_jcall,
+               .hash = hash_jcall,
+               .clone = LDKSocketDescriptor_JCalls_clone,
+               .free = LDKSocketDescriptor_JCalls_free,
        };
        return ret;
 }
-long  __attribute__((visibility("default"))) TS_LDKAccess_new(/*TODO: JS Object Reference */void* o) {
-       LDKAccess *res_ptr = MALLOC(sizeof(LDKAccess), "LDKAccess");
-       *res_ptr = LDKAccess_init(o);
+long  __attribute__((visibility("default"))) TS_LDKSocketDescriptor_new(/*TODO: JS Object Reference */void* o) {
+       LDKSocketDescriptor *res_ptr = MALLOC(sizeof(LDKSocketDescriptor), "LDKSocketDescriptor");
+       *res_ptr = LDKSocketDescriptor_init(o);
        return (long)res_ptr;
 }
-uint32_t  __attribute__((visibility("default"))) TS_Access_get_utxo(uint32_t this_arg, int8_tArray genesis_hash, int64_t short_channel_id) {
-       LDKAccess* this_arg_conv = (LDKAccess*)this_arg;
-       unsigned char genesis_hash_arr[32];
-       CHECK(*((uint32_t*)genesis_hash) == 32);
-       memcpy(genesis_hash_arr, (uint8_t*)(genesis_hash + 4), 32);
-       unsigned char (*genesis_hash_ref)[32] = &genesis_hash_arr;
-       LDKCResult_TxOutAccessErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxOutAccessErrorZ), "LDKCResult_TxOutAccessErrorZ");
-       *ret_conv = (this_arg_conv->get_utxo)(this_arg_conv->this_arg, genesis_hash_ref, short_channel_id);
-       return (long)ret_conv;
+int64_t  __attribute__((visibility("default"))) TS_SocketDescriptor_send_data(uint32_t this_arg, int8_tArray data, jboolean resume_read) {
+       LDKSocketDescriptor* this_arg_conv = (LDKSocketDescriptor*)this_arg;
+       LDKu8slice data_ref;
+       data_ref.datalen = *((uint32_t*)data);
+       data_ref.data = (int8_t*)(data + 4);
+       int64_t ret_val = (this_arg_conv->send_data)(this_arg_conv->this_arg, data_ref, resume_read);
+       return ret_val;
 }
 
-typedef struct LDKFilter_JCalls {
-       atomic_size_t refcnt;
-       uint32_t register_tx_meth;
-       uint32_t register_output_meth;
-} LDKFilter_JCalls;
-static void LDKFilter_JCalls_free(void* this_arg) {
-       LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
-       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
-               js_free(j_calls->register_tx_meth);
-               js_free(j_calls->register_output_meth);
-               FREE(j_calls);
-       }
+void  __attribute__((visibility("default"))) TS_SocketDescriptor_disconnect_socket(uint32_t this_arg) {
+       LDKSocketDescriptor* this_arg_conv = (LDKSocketDescriptor*)this_arg;
+       (this_arg_conv->disconnect_socket)(this_arg_conv->this_arg);
 }
-void register_tx_jcall(const void* this_arg, const uint8_t (* txid)[32], LDKu8slice script_pubkey) {
-       LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
-       int8_tArray txid_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(txid_arr + 4), *txid, 32);
-       LDKu8slice script_pubkey_var = script_pubkey;
-       int8_tArray script_pubkey_arr = init_arr(script_pubkey_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(script_pubkey_arr + 4), script_pubkey_var.data, script_pubkey_var.datalen);
-       js_invoke_function_2(j_calls->register_tx_meth, txid_arr, script_pubkey_arr);
+
+int64_t  __attribute__((visibility("default"))) TS_SocketDescriptor_hash(uint32_t this_arg) {
+       LDKSocketDescriptor* this_arg_conv = (LDKSocketDescriptor*)this_arg;
+       int64_t ret_val = (this_arg_conv->hash)(this_arg_conv->this_arg);
+       return ret_val;
 }
-void register_output_jcall(const void* this_arg, const LDKOutPoint * outpoint, LDKu8slice script_pubkey) {
-       LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
-       LDKOutPoint outpoint_var = *outpoint;
-       outpoint_var = OutPoint_clone(outpoint);
-       CHECK((((long)outpoint_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&outpoint_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long outpoint_ref = (long)outpoint_var.inner;
-       if (outpoint_var.is_owned) {
-               outpoint_ref |= 1;
-       }
-       LDKu8slice script_pubkey_var = script_pubkey;
-       int8_tArray script_pubkey_arr = init_arr(script_pubkey_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(script_pubkey_arr + 4), script_pubkey_var.data, script_pubkey_var.datalen);
-       js_invoke_function_2(j_calls->register_output_meth, outpoint_ref, script_pubkey_arr);
+
+void  __attribute__((visibility("default"))) TS_Transaction_free(int8_tArray _res) {
+       LDKTransaction _res_ref;
+       _res_ref.datalen = *((uint32_t*)_res);
+       _res_ref.data = MALLOC(_res_ref.datalen, "LDKTransaction Bytes");
+       memcpy(_res_ref.data, (uint8_t*)(_res + 4), _res_ref.datalen);
+       _res_ref.data_is_owned = true;
+       Transaction_free(_res_ref);
 }
-static void* LDKFilter_JCalls_clone(const void* this_arg) {
-       LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
-       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
-       return (void*) this_arg;
+
+void  __attribute__((visibility("default"))) TS_TxOut_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKTxOut _res_conv = *(LDKTxOut*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       TxOut_free(_res_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_TxOut_clone(uint32_t orig) {
+       LDKTxOut* orig_conv = (LDKTxOut*)(orig & ~1);
+       LDKTxOut* ret_ref = MALLOC(sizeof(LDKTxOut), "LDKTxOut");
+       *ret_ref = TxOut_clone(orig_conv);
+       return (long)ret_ref;
 }
-static inline LDKFilter LDKFilter_init (/*TODO: JS Object Reference */void* o) {
-       LDKFilter_JCalls *calls = MALLOC(sizeof(LDKFilter_JCalls), "LDKFilter_JCalls");
-       atomic_init(&calls->refcnt, 1);
-       //TODO: Assign calls->o from o
 
-       LDKFilter ret = {
-               .this_arg = (void*) calls,
-               .register_tx = register_tx_jcall,
-               .register_output = register_output_jcall,
-               .free = LDKFilter_JCalls_free,
-       };
-       return ret;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_SecretKeyErrorZ_ok(int8_tArray o) {
+       LDKSecretKey o_ref;
+       CHECK(*((uint32_t*)o) == 32);
+       memcpy(o_ref.bytes, (uint8_t*)(o + 4), 32);
+       LDKCResult_SecretKeyErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SecretKeyErrorZ), "LDKCResult_SecretKeyErrorZ");
+       *ret_conv = CResult_SecretKeyErrorZ_ok(o_ref);
+       return (long)ret_conv;
 }
-long  __attribute__((visibility("default"))) TS_LDKFilter_new(/*TODO: JS Object Reference */void* o) {
-       LDKFilter *res_ptr = MALLOC(sizeof(LDKFilter), "LDKFilter");
-       *res_ptr = LDKFilter_init(o);
-       return (long)res_ptr;
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_SecretKeyErrorZ_err(uint32_t e) {
+       LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_js(e);
+       LDKCResult_SecretKeyErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SecretKeyErrorZ), "LDKCResult_SecretKeyErrorZ");
+       *ret_conv = CResult_SecretKeyErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-void  __attribute__((visibility("default"))) TS_Filter_register_tx(uint32_t this_arg, int8_tArray txid, int8_tArray script_pubkey) {
-       LDKFilter* this_arg_conv = (LDKFilter*)this_arg;
-       unsigned char txid_arr[32];
-       CHECK(*((uint32_t*)txid) == 32);
-       memcpy(txid_arr, (uint8_t*)(txid + 4), 32);
-       unsigned char (*txid_ref)[32] = &txid_arr;
-       LDKu8slice script_pubkey_ref;
-       script_pubkey_ref.datalen = *((uint32_t*)script_pubkey);
-       script_pubkey_ref.data = (int8_t*)(script_pubkey + 4);
-       (this_arg_conv->register_tx)(this_arg_conv->this_arg, txid_ref, script_pubkey_ref);
+
+void  __attribute__((visibility("default"))) TS_CResult_SecretKeyErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_SecretKeyErrorZ _res_conv = *(LDKCResult_SecretKeyErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_SecretKeyErrorZ_free(_res_conv);
 }
 
-void  __attribute__((visibility("default"))) TS_Filter_register_output(uint32_t this_arg, uint32_t outpoint, int8_tArray script_pubkey) {
-       LDKFilter* this_arg_conv = (LDKFilter*)this_arg;
-       LDKOutPoint outpoint_conv;
-       outpoint_conv.inner = (void*)(outpoint & (~1));
-       outpoint_conv.is_owned = false;
-       LDKu8slice script_pubkey_ref;
-       script_pubkey_ref.datalen = *((uint32_t*)script_pubkey);
-       script_pubkey_ref.data = (int8_t*)(script_pubkey + 4);
-       (this_arg_conv->register_output)(this_arg_conv->this_arg, &outpoint_conv, script_pubkey_ref);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_PublicKeyErrorZ_ok(int8_tArray o) {
+       LDKPublicKey o_ref;
+       CHECK(*((uint32_t*)o) == 33);
+       memcpy(o_ref.compressed_form, (uint8_t*)(o + 4), 33);
+       LDKCResult_PublicKeyErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyErrorZ), "LDKCResult_PublicKeyErrorZ");
+       *ret_conv = CResult_PublicKeyErrorZ_ok(o_ref);
+       return (long)ret_conv;
 }
 
-typedef struct LDKPersist_JCalls {
-       atomic_size_t refcnt;
-       uint32_t persist_new_channel_meth;
-       uint32_t update_persisted_channel_meth;
-} LDKPersist_JCalls;
-static void LDKPersist_JCalls_free(void* this_arg) {
-       LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
-       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
-               js_free(j_calls->persist_new_channel_meth);
-               js_free(j_calls->update_persisted_channel_meth);
-               FREE(j_calls);
-       }
+uint32_t  __attribute__((visibility("default"))) TS_CResult_PublicKeyErrorZ_err(uint32_t e) {
+       LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_js(e);
+       LDKCResult_PublicKeyErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyErrorZ), "LDKCResult_PublicKeyErrorZ");
+       *ret_conv = CResult_PublicKeyErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-LDKCResult_NoneChannelMonitorUpdateErrZ persist_new_channel_jcall(const void* this_arg, LDKOutPoint id, const LDKChannelMonitor * data) {
-       LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
-       LDKOutPoint id_var = id;
-       CHECK((((long)id_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&id_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long id_ref = (long)id_var.inner;
-       if (id_var.is_owned) {
-               id_ref |= 1;
-       }
-       LDKChannelMonitor data_var = *data;
-       data_var = ChannelMonitor_clone(data);
-       CHECK((((long)data_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&data_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long data_ref = (long)data_var.inner;
-       if (data_var.is_owned) {
-               data_ref |= 1;
-       }
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret = (LDKCResult_NoneChannelMonitorUpdateErrZ*)js_invoke_function_2(j_calls->persist_new_channel_meth, id_ref, data_ref);
-       LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone((LDKCResult_NoneChannelMonitorUpdateErrZ*)ret);
-       return ret_conv;
+
+void  __attribute__((visibility("default"))) TS_CResult_PublicKeyErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_PublicKeyErrorZ _res_conv = *(LDKCResult_PublicKeyErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_PublicKeyErrorZ_free(_res_conv);
 }
-LDKCResult_NoneChannelMonitorUpdateErrZ update_persisted_channel_jcall(const void* this_arg, LDKOutPoint id, const LDKChannelMonitorUpdate * update, const LDKChannelMonitor * data) {
-       LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
-       LDKOutPoint id_var = id;
-       CHECK((((long)id_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&id_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long id_ref = (long)id_var.inner;
-       if (id_var.is_owned) {
-               id_ref |= 1;
-       }
-       LDKChannelMonitorUpdate update_var = *update;
-       update_var = ChannelMonitorUpdate_clone(update);
-       CHECK((((long)update_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&update_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long update_ref = (long)update_var.inner;
-       if (update_var.is_owned) {
-               update_ref |= 1;
-       }
-       LDKChannelMonitor data_var = *data;
-       data_var = ChannelMonitor_clone(data);
-       CHECK((((long)data_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&data_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long data_ref = (long)data_var.inner;
-       if (data_var.is_owned) {
-               data_ref |= 1;
-       }
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret = (LDKCResult_NoneChannelMonitorUpdateErrZ*)js_invoke_function_3(j_calls->update_persisted_channel_meth, id_ref, update_ref, data_ref);
-       LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone((LDKCResult_NoneChannelMonitorUpdateErrZ*)ret);
-       return ret_conv;
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_TxCreationKeysDecodeErrorZ_ok(uint32_t o) {
+       LDKTxCreationKeys o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = TxCreationKeys_clone(&o_conv);
+       LDKCResult_TxCreationKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysDecodeErrorZ), "LDKCResult_TxCreationKeysDecodeErrorZ");
+       *ret_conv = CResult_TxCreationKeysDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
-static void* LDKPersist_JCalls_clone(const void* this_arg) {
-       LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
-       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
-       return (void*) this_arg;
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_TxCreationKeysDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_TxCreationKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysDecodeErrorZ), "LDKCResult_TxCreationKeysDecodeErrorZ");
+       *ret_conv = CResult_TxCreationKeysDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-static inline LDKPersist LDKPersist_init (/*TODO: JS Object Reference */void* o) {
-       LDKPersist_JCalls *calls = MALLOC(sizeof(LDKPersist_JCalls), "LDKPersist_JCalls");
-       atomic_init(&calls->refcnt, 1);
-       //TODO: Assign calls->o from o
 
-       LDKPersist ret = {
-               .this_arg = (void*) calls,
-               .persist_new_channel = persist_new_channel_jcall,
-               .update_persisted_channel = update_persisted_channel_jcall,
-               .free = LDKPersist_JCalls_free,
-       };
-       return ret;
+void  __attribute__((visibility("default"))) TS_CResult_TxCreationKeysDecodeErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_TxCreationKeysDecodeErrorZ _res_conv = *(LDKCResult_TxCreationKeysDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_TxCreationKeysDecodeErrorZ_free(_res_conv);
 }
-long  __attribute__((visibility("default"))) TS_LDKPersist_new(/*TODO: JS Object Reference */void* o) {
-       LDKPersist *res_ptr = MALLOC(sizeof(LDKPersist), "LDKPersist");
-       *res_ptr = LDKPersist_init(o);
-       return (long)res_ptr;
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_TxCreationKeysDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_TxCreationKeysDecodeErrorZ* orig_conv = (LDKCResult_TxCreationKeysDecodeErrorZ*)(orig & ~1);
+       LDKCResult_TxCreationKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysDecodeErrorZ), "LDKCResult_TxCreationKeysDecodeErrorZ");
+       *ret_conv = CResult_TxCreationKeysDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
-uint32_t  __attribute__((visibility("default"))) TS_Persist_persist_new_channel(uint32_t this_arg, uint32_t id, uint32_t data) {
-       LDKPersist* this_arg_conv = (LDKPersist*)this_arg;
-       LDKOutPoint id_conv;
-       id_conv.inner = (void*)(id & (~1));
-       id_conv.is_owned = (id & 1) || (id == 0);
-       id_conv = OutPoint_clone(&id_conv);
-       LDKChannelMonitor data_conv;
-       data_conv.inner = (void*)(data & (~1));
-       data_conv.is_owned = false;
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
-       *ret_conv = (this_arg_conv->persist_new_channel)(this_arg_conv->this_arg, id_conv, &data_conv);
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelPublicKeysDecodeErrorZ_ok(uint32_t o) {
+       LDKChannelPublicKeys o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = ChannelPublicKeys_clone(&o_conv);
+       LDKCResult_ChannelPublicKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelPublicKeysDecodeErrorZ), "LDKCResult_ChannelPublicKeysDecodeErrorZ");
+       *ret_conv = CResult_ChannelPublicKeysDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_Persist_update_persisted_channel(uint32_t this_arg, uint32_t id, uint32_t update, uint32_t data) {
-       LDKPersist* this_arg_conv = (LDKPersist*)this_arg;
-       LDKOutPoint id_conv;
-       id_conv.inner = (void*)(id & (~1));
-       id_conv.is_owned = (id & 1) || (id == 0);
-       id_conv = OutPoint_clone(&id_conv);
-       LDKChannelMonitorUpdate update_conv;
-       update_conv.inner = (void*)(update & (~1));
-       update_conv.is_owned = false;
-       LDKChannelMonitor data_conv;
-       data_conv.inner = (void*)(data & (~1));
-       data_conv.is_owned = false;
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
-       *ret_conv = (this_arg_conv->update_persisted_channel)(this_arg_conv->this_arg, id_conv, &update_conv, &data_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelPublicKeysDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_ChannelPublicKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelPublicKeysDecodeErrorZ), "LDKCResult_ChannelPublicKeysDecodeErrorZ");
+       *ret_conv = CResult_ChannelPublicKeysDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-typedef struct LDKChannelMessageHandler_JCalls {
-       atomic_size_t refcnt;
-       LDKMessageSendEventsProvider_JCalls* MessageSendEventsProvider;
-       uint32_t handle_open_channel_meth;
-       uint32_t handle_accept_channel_meth;
-       uint32_t handle_funding_created_meth;
-       uint32_t handle_funding_signed_meth;
-       uint32_t handle_funding_locked_meth;
-       uint32_t handle_shutdown_meth;
-       uint32_t handle_closing_signed_meth;
-       uint32_t handle_update_add_htlc_meth;
-       uint32_t handle_update_fulfill_htlc_meth;
-       uint32_t handle_update_fail_htlc_meth;
-       uint32_t handle_update_fail_malformed_htlc_meth;
-       uint32_t handle_commitment_signed_meth;
-       uint32_t handle_revoke_and_ack_meth;
-       uint32_t handle_update_fee_meth;
-       uint32_t handle_announcement_signatures_meth;
-       uint32_t peer_disconnected_meth;
-       uint32_t peer_connected_meth;
-       uint32_t handle_channel_reestablish_meth;
-       uint32_t handle_error_meth;
-} LDKChannelMessageHandler_JCalls;
-static void LDKChannelMessageHandler_JCalls_free(void* this_arg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
-               js_free(j_calls->handle_open_channel_meth);
-               js_free(j_calls->handle_accept_channel_meth);
-               js_free(j_calls->handle_funding_created_meth);
-               js_free(j_calls->handle_funding_signed_meth);
-               js_free(j_calls->handle_funding_locked_meth);
-               js_free(j_calls->handle_shutdown_meth);
-               js_free(j_calls->handle_closing_signed_meth);
-               js_free(j_calls->handle_update_add_htlc_meth);
-               js_free(j_calls->handle_update_fulfill_htlc_meth);
-               js_free(j_calls->handle_update_fail_htlc_meth);
-               js_free(j_calls->handle_update_fail_malformed_htlc_meth);
-               js_free(j_calls->handle_commitment_signed_meth);
-               js_free(j_calls->handle_revoke_and_ack_meth);
-               js_free(j_calls->handle_update_fee_meth);
-               js_free(j_calls->handle_announcement_signatures_meth);
-               js_free(j_calls->peer_disconnected_meth);
-               js_free(j_calls->peer_connected_meth);
-               js_free(j_calls->handle_channel_reestablish_meth);
-               js_free(j_calls->handle_error_meth);
-               FREE(j_calls);
-       }
+void  __attribute__((visibility("default"))) TS_CResult_ChannelPublicKeysDecodeErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_ChannelPublicKeysDecodeErrorZ _res_conv = *(LDKCResult_ChannelPublicKeysDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_ChannelPublicKeysDecodeErrorZ_free(_res_conv);
 }
-void handle_open_channel_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKInitFeatures their_features, const LDKOpenChannel * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKInitFeatures their_features_var = their_features;
-       CHECK((((long)their_features_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&their_features_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long their_features_ref = (long)their_features_var.inner;
-       if (their_features_var.is_owned) {
-               their_features_ref |= 1;
-       }
-       LDKOpenChannel msg_var = *msg;
-       msg_var = OpenChannel_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       js_invoke_function_3(j_calls->handle_open_channel_meth, their_node_id_arr, their_features_ref, msg_ref);
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelPublicKeysDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_ChannelPublicKeysDecodeErrorZ* orig_conv = (LDKCResult_ChannelPublicKeysDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ChannelPublicKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelPublicKeysDecodeErrorZ), "LDKCResult_ChannelPublicKeysDecodeErrorZ");
+       *ret_conv = CResult_ChannelPublicKeysDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_TxCreationKeysErrorZ_ok(uint32_t o) {
+       LDKTxCreationKeys o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = TxCreationKeys_clone(&o_conv);
+       LDKCResult_TxCreationKeysErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysErrorZ), "LDKCResult_TxCreationKeysErrorZ");
+       *ret_conv = CResult_TxCreationKeysErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
-void handle_accept_channel_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKInitFeatures their_features, const LDKAcceptChannel * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKInitFeatures their_features_var = their_features;
-       CHECK((((long)their_features_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&their_features_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long their_features_ref = (long)their_features_var.inner;
-       if (their_features_var.is_owned) {
-               their_features_ref |= 1;
-       }
-       LDKAcceptChannel msg_var = *msg;
-       msg_var = AcceptChannel_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       js_invoke_function_3(j_calls->handle_accept_channel_meth, their_node_id_arr, their_features_ref, msg_ref);
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_TxCreationKeysErrorZ_err(uint32_t e) {
+       LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_js(e);
+       LDKCResult_TxCreationKeysErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysErrorZ), "LDKCResult_TxCreationKeysErrorZ");
+       *ret_conv = CResult_TxCreationKeysErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-void handle_funding_created_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingCreated * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKFundingCreated msg_var = *msg;
-       msg_var = FundingCreated_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       js_invoke_function_2(j_calls->handle_funding_created_meth, their_node_id_arr, msg_ref);
+
+void  __attribute__((visibility("default"))) TS_CResult_TxCreationKeysErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_TxCreationKeysErrorZ _res_conv = *(LDKCResult_TxCreationKeysErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_TxCreationKeysErrorZ_free(_res_conv);
 }
-void handle_funding_signed_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingSigned * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKFundingSigned msg_var = *msg;
-       msg_var = FundingSigned_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       js_invoke_function_2(j_calls->handle_funding_signed_meth, their_node_id_arr, msg_ref);
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(uint32_t o) {
+       LDKHTLCOutputInCommitment o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = HTLCOutputInCommitment_clone(&o_conv);
+       LDKCResult_HTLCOutputInCommitmentDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ), "LDKCResult_HTLCOutputInCommitmentDecodeErrorZ");
+       *ret_conv = CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
-void handle_funding_locked_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingLocked * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKFundingLocked msg_var = *msg;
-       msg_var = FundingLocked_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       js_invoke_function_2(j_calls->handle_funding_locked_meth, their_node_id_arr, msg_ref);
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_HTLCOutputInCommitmentDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ), "LDKCResult_HTLCOutputInCommitmentDecodeErrorZ");
+       *ret_conv = CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-void handle_shutdown_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKShutdown * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKShutdown msg_var = *msg;
-       msg_var = Shutdown_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       js_invoke_function_2(j_calls->handle_shutdown_meth, their_node_id_arr, msg_ref);
+
+void  __attribute__((visibility("default"))) TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_HTLCOutputInCommitmentDecodeErrorZ _res_conv = *(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res_conv);
 }
-void handle_closing_signed_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKClosingSigned * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKClosingSigned msg_var = *msg;
-       msg_var = ClosingSigned_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       js_invoke_function_2(j_calls->handle_closing_signed_meth, their_node_id_arr, msg_ref);
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_HTLCOutputInCommitmentDecodeErrorZ* orig_conv = (LDKCResult_HTLCOutputInCommitmentDecodeErrorZ*)(orig & ~1);
+       LDKCResult_HTLCOutputInCommitmentDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ), "LDKCResult_HTLCOutputInCommitmentDecodeErrorZ");
+       *ret_conv = CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
-void handle_update_add_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateAddHTLC * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKUpdateAddHTLC msg_var = *msg;
-       msg_var = UpdateAddHTLC_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       js_invoke_function_2(j_calls->handle_update_add_htlc_meth, their_node_id_arr, msg_ref);
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(uint32_t o) {
+       LDKCounterpartyChannelTransactionParameters o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = CounterpartyChannelTransactionParameters_clone(&o_conv);
+       LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ), "LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ");
+       *ret_conv = CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
-void handle_update_fulfill_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFulfillHTLC * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKUpdateFulfillHTLC msg_var = *msg;
-       msg_var = UpdateFulfillHTLC_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       js_invoke_function_2(j_calls->handle_update_fulfill_htlc_meth, their_node_id_arr, msg_ref);
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ), "LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ");
+       *ret_conv = CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-void handle_update_fail_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFailHTLC * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKUpdateFailHTLC msg_var = *msg;
-       msg_var = UpdateFailHTLC_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       js_invoke_function_2(j_calls->handle_update_fail_htlc_meth, their_node_id_arr, msg_ref);
+
+void  __attribute__((visibility("default"))) TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ _res_conv = *(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res_conv);
 }
-void handle_update_fail_malformed_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFailMalformedHTLC * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKUpdateFailMalformedHTLC msg_var = *msg;
-       msg_var = UpdateFailMalformedHTLC_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       js_invoke_function_2(j_calls->handle_update_fail_malformed_htlc_meth, their_node_id_arr, msg_ref);
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ* orig_conv = (LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ*)(orig & ~1);
+       LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ), "LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ");
+       *ret_conv = CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
-void handle_commitment_signed_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKCommitmentSigned * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKCommitmentSigned msg_var = *msg;
-       msg_var = CommitmentSigned_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       js_invoke_function_2(j_calls->handle_commitment_signed_meth, their_node_id_arr, msg_ref);
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelTransactionParametersDecodeErrorZ_ok(uint32_t o) {
+       LDKChannelTransactionParameters o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = ChannelTransactionParameters_clone(&o_conv);
+       LDKCResult_ChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTransactionParametersDecodeErrorZ), "LDKCResult_ChannelTransactionParametersDecodeErrorZ");
+       *ret_conv = CResult_ChannelTransactionParametersDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
-void handle_revoke_and_ack_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKRevokeAndACK * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKRevokeAndACK msg_var = *msg;
-       msg_var = RevokeAndACK_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       js_invoke_function_2(j_calls->handle_revoke_and_ack_meth, their_node_id_arr, msg_ref);
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelTransactionParametersDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_ChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTransactionParametersDecodeErrorZ), "LDKCResult_ChannelTransactionParametersDecodeErrorZ");
+       *ret_conv = CResult_ChannelTransactionParametersDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-void handle_update_fee_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFee * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKUpdateFee msg_var = *msg;
-       msg_var = UpdateFee_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       js_invoke_function_2(j_calls->handle_update_fee_meth, their_node_id_arr, msg_ref);
+
+void  __attribute__((visibility("default"))) TS_CResult_ChannelTransactionParametersDecodeErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_ChannelTransactionParametersDecodeErrorZ _res_conv = *(LDKCResult_ChannelTransactionParametersDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_ChannelTransactionParametersDecodeErrorZ_free(_res_conv);
 }
-void handle_announcement_signatures_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKAnnouncementSignatures * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKAnnouncementSignatures msg_var = *msg;
-       msg_var = AnnouncementSignatures_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelTransactionParametersDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_ChannelTransactionParametersDecodeErrorZ* orig_conv = (LDKCResult_ChannelTransactionParametersDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTransactionParametersDecodeErrorZ), "LDKCResult_ChannelTransactionParametersDecodeErrorZ");
+       *ret_conv = CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+void  __attribute__((visibility("default"))) TS_CVec_SignatureZ_free(ptrArray _res) {
+       LDKCVec_SignatureZ _res_constr;
+       _res_constr.datalen = *((uint32_t*)_res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKSignature), "LDKCVec_SignatureZ Elements");
+       else
+               _res_constr.data = NULL;
+       int8_tArray* _res_vals = (int8_tArray*)(_res + 4);
+       for (size_t m = 0; m < _res_constr.datalen; m++) {
+               int8_tArray arr_conv_12 = _res_vals[m];
+               LDKSignature arr_conv_12_ref;
+               CHECK(*((uint32_t*)arr_conv_12) == 64);
+               memcpy(arr_conv_12_ref.compact_form, (uint8_t*)(arr_conv_12 + 4), 64);
+               _res_constr.data[m] = arr_conv_12_ref;
        }
-       js_invoke_function_2(j_calls->handle_announcement_signatures_meth, their_node_id_arr, msg_ref);
+       CVec_SignatureZ_free(_res_constr);
 }
-void peer_disconnected_jcall(const void* this_arg, LDKPublicKey their_node_id, bool no_connection_possible) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       js_invoke_function_2(j_calls->peer_disconnected_meth, their_node_id_arr, no_connection_possible);
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_HolderCommitmentTransactionDecodeErrorZ_ok(uint32_t o) {
+       LDKHolderCommitmentTransaction o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = HolderCommitmentTransaction_clone(&o_conv);
+       LDKCResult_HolderCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HolderCommitmentTransactionDecodeErrorZ), "LDKCResult_HolderCommitmentTransactionDecodeErrorZ");
+       *ret_conv = CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
-void peer_connected_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKInit msg_var = *msg;
-       msg_var = Init_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       js_invoke_function_2(j_calls->peer_connected_meth, their_node_id_arr, msg_ref);
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_HolderCommitmentTransactionDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_HolderCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HolderCommitmentTransactionDecodeErrorZ), "LDKCResult_HolderCommitmentTransactionDecodeErrorZ");
+       *ret_conv = CResult_HolderCommitmentTransactionDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-void handle_channel_reestablish_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelReestablish * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKChannelReestablish msg_var = *msg;
-       msg_var = ChannelReestablish_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       js_invoke_function_2(j_calls->handle_channel_reestablish_meth, their_node_id_arr, msg_ref);
+
+void  __attribute__((visibility("default"))) TS_CResult_HolderCommitmentTransactionDecodeErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_HolderCommitmentTransactionDecodeErrorZ _res_conv = *(LDKCResult_HolderCommitmentTransactionDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res_conv);
 }
-void handle_error_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKErrorMessage * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKErrorMessage msg_var = *msg;
-       msg_var = ErrorMessage_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       js_invoke_function_2(j_calls->handle_error_meth, their_node_id_arr, msg_ref);
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_HolderCommitmentTransactionDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_HolderCommitmentTransactionDecodeErrorZ* orig_conv = (LDKCResult_HolderCommitmentTransactionDecodeErrorZ*)(orig & ~1);
+       LDKCResult_HolderCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HolderCommitmentTransactionDecodeErrorZ), "LDKCResult_HolderCommitmentTransactionDecodeErrorZ");
+       *ret_conv = CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
-static void* LDKChannelMessageHandler_JCalls_clone(const void* this_arg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
-       atomic_fetch_add_explicit(&j_calls->MessageSendEventsProvider->refcnt, 1, memory_order_release);
-       return (void*) this_arg;
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(uint32_t o) {
+       LDKBuiltCommitmentTransaction o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = BuiltCommitmentTransaction_clone(&o_conv);
+       LDKCResult_BuiltCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ), "LDKCResult_BuiltCommitmentTransactionDecodeErrorZ");
+       *ret_conv = CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
-static inline LDKChannelMessageHandler LDKChannelMessageHandler_init (/*TODO: JS Object Reference */void* o, /*TODO: JS Object Reference */void* MessageSendEventsProvider) {
-       LDKChannelMessageHandler_JCalls *calls = MALLOC(sizeof(LDKChannelMessageHandler_JCalls), "LDKChannelMessageHandler_JCalls");
-       atomic_init(&calls->refcnt, 1);
-       //TODO: Assign calls->o from o
 
-       LDKChannelMessageHandler ret = {
-               .this_arg = (void*) calls,
-               .handle_open_channel = handle_open_channel_jcall,
-               .handle_accept_channel = handle_accept_channel_jcall,
-               .handle_funding_created = handle_funding_created_jcall,
-               .handle_funding_signed = handle_funding_signed_jcall,
-               .handle_funding_locked = handle_funding_locked_jcall,
-               .handle_shutdown = handle_shutdown_jcall,
-               .handle_closing_signed = handle_closing_signed_jcall,
-               .handle_update_add_htlc = handle_update_add_htlc_jcall,
-               .handle_update_fulfill_htlc = handle_update_fulfill_htlc_jcall,
-               .handle_update_fail_htlc = handle_update_fail_htlc_jcall,
-               .handle_update_fail_malformed_htlc = handle_update_fail_malformed_htlc_jcall,
-               .handle_commitment_signed = handle_commitment_signed_jcall,
-               .handle_revoke_and_ack = handle_revoke_and_ack_jcall,
-               .handle_update_fee = handle_update_fee_jcall,
-               .handle_announcement_signatures = handle_announcement_signatures_jcall,
-               .peer_disconnected = peer_disconnected_jcall,
-               .peer_connected = peer_connected_jcall,
-               .handle_channel_reestablish = handle_channel_reestablish_jcall,
-               .handle_error = handle_error_jcall,
-               .free = LDKChannelMessageHandler_JCalls_free,
-               .MessageSendEventsProvider = LDKMessageSendEventsProvider_init(MessageSendEventsProvider),
-       };
-       calls->MessageSendEventsProvider = ret.MessageSendEventsProvider.this_arg;
-       return ret;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_BuiltCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ), "LDKCResult_BuiltCommitmentTransactionDecodeErrorZ");
+       *ret_conv = CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-long  __attribute__((visibility("default"))) TS_LDKChannelMessageHandler_new(/*TODO: JS Object Reference */void* o, /*TODO: JS Object Reference */ void* MessageSendEventsProvider) {
-       LDKChannelMessageHandler *res_ptr = MALLOC(sizeof(LDKChannelMessageHandler), "LDKChannelMessageHandler");
-       *res_ptr = LDKChannelMessageHandler_init(o, MessageSendEventsProvider);
-       return (long)res_ptr;
+
+void  __attribute__((visibility("default"))) TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_BuiltCommitmentTransactionDecodeErrorZ _res_conv = *(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res_conv);
 }
-void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_open_channel(uint32_t this_arg, int8_tArray their_node_id, uint32_t their_features, uint32_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKInitFeatures their_features_conv;
-       their_features_conv.inner = (void*)(their_features & (~1));
-       their_features_conv.is_owned = (their_features & 1) || (their_features == 0);
-       // Warning: we need a move here but no clone is available for LDKInitFeatures
-       LDKOpenChannel msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_open_channel)(this_arg_conv->this_arg, their_node_id_ref, their_features_conv, &msg_conv);
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_BuiltCommitmentTransactionDecodeErrorZ* orig_conv = (LDKCResult_BuiltCommitmentTransactionDecodeErrorZ*)(orig & ~1);
+       LDKCResult_BuiltCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ), "LDKCResult_BuiltCommitmentTransactionDecodeErrorZ");
+       *ret_conv = CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_accept_channel(uint32_t this_arg, int8_tArray their_node_id, uint32_t their_features, uint32_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKInitFeatures their_features_conv;
-       their_features_conv.inner = (void*)(their_features & (~1));
-       their_features_conv.is_owned = (their_features & 1) || (their_features == 0);
-       // Warning: we need a move here but no clone is available for LDKInitFeatures
-       LDKAcceptChannel msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_accept_channel)(this_arg_conv->this_arg, their_node_id_ref, their_features_conv, &msg_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_CommitmentTransactionDecodeErrorZ_ok(uint32_t o) {
+       LDKCommitmentTransaction o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = CommitmentTransaction_clone(&o_conv);
+       LDKCResult_CommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentTransactionDecodeErrorZ), "LDKCResult_CommitmentTransactionDecodeErrorZ");
+       *ret_conv = CResult_CommitmentTransactionDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_funding_created(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKFundingCreated msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_funding_created)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_CommitmentTransactionDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_CommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentTransactionDecodeErrorZ), "LDKCResult_CommitmentTransactionDecodeErrorZ");
+       *ret_conv = CResult_CommitmentTransactionDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_funding_signed(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKFundingSigned msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_funding_signed)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+void  __attribute__((visibility("default"))) TS_CResult_CommitmentTransactionDecodeErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_CommitmentTransactionDecodeErrorZ _res_conv = *(LDKCResult_CommitmentTransactionDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_CommitmentTransactionDecodeErrorZ_free(_res_conv);
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_funding_locked(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKFundingLocked msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_funding_locked)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_CommitmentTransactionDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_CommitmentTransactionDecodeErrorZ* orig_conv = (LDKCResult_CommitmentTransactionDecodeErrorZ*)(orig & ~1);
+       LDKCResult_CommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentTransactionDecodeErrorZ), "LDKCResult_CommitmentTransactionDecodeErrorZ");
+       *ret_conv = CResult_CommitmentTransactionDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_shutdown(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKShutdown msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_shutdown)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_TrustedCommitmentTransactionNoneZ_ok(uint32_t o) {
+       LDKTrustedCommitmentTransaction o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       // Warning: we need a move here but no clone is available for LDKTrustedCommitmentTransaction
+       LDKCResult_TrustedCommitmentTransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TrustedCommitmentTransactionNoneZ), "LDKCResult_TrustedCommitmentTransactionNoneZ");
+       *ret_conv = CResult_TrustedCommitmentTransactionNoneZ_ok(o_conv);
+       return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_closing_signed(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKClosingSigned msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_closing_signed)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_TrustedCommitmentTransactionNoneZ_err() {
+       LDKCResult_TrustedCommitmentTransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TrustedCommitmentTransactionNoneZ), "LDKCResult_TrustedCommitmentTransactionNoneZ");
+       *ret_conv = CResult_TrustedCommitmentTransactionNoneZ_err();
+       return (long)ret_conv;
+}
+
+void  __attribute__((visibility("default"))) TS_CResult_TrustedCommitmentTransactionNoneZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_TrustedCommitmentTransactionNoneZ _res_conv = *(LDKCResult_TrustedCommitmentTransactionNoneZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_TrustedCommitmentTransactionNoneZ_free(_res_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_CVec_SignatureZNoneZ_ok(ptrArray o) {
+       LDKCVec_SignatureZ o_constr;
+       o_constr.datalen = *((uint32_t*)o);
+       if (o_constr.datalen > 0)
+               o_constr.data = MALLOC(o_constr.datalen * sizeof(LDKSignature), "LDKCVec_SignatureZ Elements");
+       else
+               o_constr.data = NULL;
+       int8_tArray* o_vals = (int8_tArray*)(o + 4);
+       for (size_t m = 0; m < o_constr.datalen; m++) {
+               int8_tArray arr_conv_12 = o_vals[m];
+               LDKSignature arr_conv_12_ref;
+               CHECK(*((uint32_t*)arr_conv_12) == 64);
+               memcpy(arr_conv_12_ref.compact_form, (uint8_t*)(arr_conv_12 + 4), 64);
+               o_constr.data[m] = arr_conv_12_ref;
+       }
+       LDKCResult_CVec_SignatureZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_SignatureZNoneZ), "LDKCResult_CVec_SignatureZNoneZ");
+       *ret_conv = CResult_CVec_SignatureZNoneZ_ok(o_constr);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_CVec_SignatureZNoneZ_err() {
+       LDKCResult_CVec_SignatureZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_SignatureZNoneZ), "LDKCResult_CVec_SignatureZNoneZ");
+       *ret_conv = CResult_CVec_SignatureZNoneZ_err();
+       return (long)ret_conv;
+}
+
+void  __attribute__((visibility("default"))) TS_CResult_CVec_SignatureZNoneZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_CVec_SignatureZNoneZ _res_conv = *(LDKCResult_CVec_SignatureZNoneZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_CVec_SignatureZNoneZ_free(_res_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_CVec_SignatureZNoneZ_clone(uint32_t orig) {
+       LDKCResult_CVec_SignatureZNoneZ* orig_conv = (LDKCResult_CVec_SignatureZNoneZ*)(orig & ~1);
+       LDKCResult_CVec_SignatureZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_SignatureZNoneZ), "LDKCResult_CVec_SignatureZNoneZ");
+       *ret_conv = CResult_CVec_SignatureZNoneZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_update_add_htlc(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKUpdateAddHTLC msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_update_add_htlc)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+void  __attribute__((visibility("default"))) TS_CVec_PublicKeyZ_free(ptrArray _res) {
+       LDKCVec_PublicKeyZ _res_constr;
+       _res_constr.datalen = *((uint32_t*)_res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKPublicKey), "LDKCVec_PublicKeyZ Elements");
+       else
+               _res_constr.data = NULL;
+       int8_tArray* _res_vals = (int8_tArray*)(_res + 4);
+       for (size_t m = 0; m < _res_constr.datalen; m++) {
+               int8_tArray arr_conv_12 = _res_vals[m];
+               LDKPublicKey arr_conv_12_ref;
+               CHECK(*((uint32_t*)arr_conv_12) == 33);
+               memcpy(arr_conv_12_ref.compressed_form, (uint8_t*)(arr_conv_12 + 4), 33);
+               _res_constr.data[m] = arr_conv_12_ref;
+       }
+       CVec_PublicKeyZ_free(_res_constr);
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_update_fulfill_htlc(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKUpdateFulfillHTLC msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_update_fulfill_htlc)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+void  __attribute__((visibility("default"))) TS_CVec_u8Z_free(int8_tArray _res) {
+       LDKCVec_u8Z _res_ref;
+       _res_ref.datalen = *((uint32_t*)_res);
+       _res_ref.data = MALLOC(_res_ref.datalen, "LDKCVec_u8Z Bytes");
+       memcpy(_res_ref.data, (uint8_t*)(_res + 4), _res_ref.datalen);
+       CVec_u8Z_free(_res_ref);
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_update_fail_htlc(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKUpdateFailHTLC msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_update_fail_htlc)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_CVec_u8ZPeerHandleErrorZ_ok(int8_tArray o) {
+       LDKCVec_u8Z o_ref;
+       o_ref.datalen = *((uint32_t*)o);
+       o_ref.data = MALLOC(o_ref.datalen, "LDKCVec_u8Z Bytes");
+       memcpy(o_ref.data, (uint8_t*)(o + 4), o_ref.datalen);
+       LDKCResult_CVec_u8ZPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_u8ZPeerHandleErrorZ), "LDKCResult_CVec_u8ZPeerHandleErrorZ");
+       *ret_conv = CResult_CVec_u8ZPeerHandleErrorZ_ok(o_ref);
+       return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_update_fail_malformed_htlc(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKUpdateFailMalformedHTLC msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_update_fail_malformed_htlc)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_CVec_u8ZPeerHandleErrorZ_err(uint32_t e) {
+       LDKPeerHandleError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = PeerHandleError_clone(&e_conv);
+       LDKCResult_CVec_u8ZPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_u8ZPeerHandleErrorZ), "LDKCResult_CVec_u8ZPeerHandleErrorZ");
+       *ret_conv = CResult_CVec_u8ZPeerHandleErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_commitment_signed(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKCommitmentSigned msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_commitment_signed)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+void  __attribute__((visibility("default"))) TS_CResult_CVec_u8ZPeerHandleErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_CVec_u8ZPeerHandleErrorZ _res_conv = *(LDKCResult_CVec_u8ZPeerHandleErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_CVec_u8ZPeerHandleErrorZ_free(_res_conv);
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_revoke_and_ack(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKRevokeAndACK msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_revoke_and_ack)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_CVec_u8ZPeerHandleErrorZ_clone(uint32_t orig) {
+       LDKCResult_CVec_u8ZPeerHandleErrorZ* orig_conv = (LDKCResult_CVec_u8ZPeerHandleErrorZ*)(orig & ~1);
+       LDKCResult_CVec_u8ZPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_u8ZPeerHandleErrorZ), "LDKCResult_CVec_u8ZPeerHandleErrorZ");
+       *ret_conv = CResult_CVec_u8ZPeerHandleErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_update_fee(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKUpdateFee msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_update_fee)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NonePeerHandleErrorZ_ok() {
+       LDKCResult_NonePeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePeerHandleErrorZ), "LDKCResult_NonePeerHandleErrorZ");
+       *ret_conv = CResult_NonePeerHandleErrorZ_ok();
+       return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_announcement_signatures(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKAnnouncementSignatures msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_announcement_signatures)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NonePeerHandleErrorZ_err(uint32_t e) {
+       LDKPeerHandleError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = PeerHandleError_clone(&e_conv);
+       LDKCResult_NonePeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePeerHandleErrorZ), "LDKCResult_NonePeerHandleErrorZ");
+       *ret_conv = CResult_NonePeerHandleErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_peer_disconnected(uint32_t this_arg, int8_tArray their_node_id, jboolean no_connection_possible) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       (this_arg_conv->peer_disconnected)(this_arg_conv->this_arg, their_node_id_ref, no_connection_possible);
+void  __attribute__((visibility("default"))) TS_CResult_NonePeerHandleErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_NonePeerHandleErrorZ _res_conv = *(LDKCResult_NonePeerHandleErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_NonePeerHandleErrorZ_free(_res_conv);
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_peer_connected(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKInit msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NonePeerHandleErrorZ_clone(uint32_t orig) {
+       LDKCResult_NonePeerHandleErrorZ* orig_conv = (LDKCResult_NonePeerHandleErrorZ*)(orig & ~1);
+       LDKCResult_NonePeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePeerHandleErrorZ), "LDKCResult_NonePeerHandleErrorZ");
+       *ret_conv = CResult_NonePeerHandleErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_channel_reestablish(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKChannelReestablish msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_channel_reestablish)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_boolPeerHandleErrorZ_ok(jboolean o) {
+       LDKCResult_boolPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolPeerHandleErrorZ), "LDKCResult_boolPeerHandleErrorZ");
+       *ret_conv = CResult_boolPeerHandleErrorZ_ok(o);
+       return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_error(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKErrorMessage msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_error)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_boolPeerHandleErrorZ_err(uint32_t e) {
+       LDKPeerHandleError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = PeerHandleError_clone(&e_conv);
+       LDKCResult_boolPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolPeerHandleErrorZ), "LDKCResult_boolPeerHandleErrorZ");
+       *ret_conv = CResult_boolPeerHandleErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
 
-typedef struct LDKRoutingMessageHandler_JCalls {
-       atomic_size_t refcnt;
-       LDKMessageSendEventsProvider_JCalls* MessageSendEventsProvider;
-       uint32_t handle_node_announcement_meth;
-       uint32_t handle_channel_announcement_meth;
-       uint32_t handle_channel_update_meth;
-       uint32_t handle_htlc_fail_channel_update_meth;
-       uint32_t get_next_channel_announcements_meth;
-       uint32_t get_next_node_announcements_meth;
-       uint32_t sync_routing_table_meth;
-       uint32_t handle_reply_channel_range_meth;
-       uint32_t handle_reply_short_channel_ids_end_meth;
-       uint32_t handle_query_channel_range_meth;
-       uint32_t handle_query_short_channel_ids_meth;
-} LDKRoutingMessageHandler_JCalls;
-static void LDKRoutingMessageHandler_JCalls_free(void* this_arg) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
-               js_free(j_calls->handle_node_announcement_meth);
-               js_free(j_calls->handle_channel_announcement_meth);
-               js_free(j_calls->handle_channel_update_meth);
-               js_free(j_calls->handle_htlc_fail_channel_update_meth);
-               js_free(j_calls->get_next_channel_announcements_meth);
-               js_free(j_calls->get_next_node_announcements_meth);
-               js_free(j_calls->sync_routing_table_meth);
-               js_free(j_calls->handle_reply_channel_range_meth);
-               js_free(j_calls->handle_reply_short_channel_ids_end_meth);
-               js_free(j_calls->handle_query_channel_range_meth);
-               js_free(j_calls->handle_query_short_channel_ids_meth);
-               FREE(j_calls);
-       }
-}
-LDKCResult_boolLightningErrorZ handle_node_announcement_jcall(const void* this_arg, const LDKNodeAnnouncement * msg) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       LDKNodeAnnouncement msg_var = *msg;
-       msg_var = NodeAnnouncement_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       LDKCResult_boolLightningErrorZ* ret = (LDKCResult_boolLightningErrorZ*)js_invoke_function_1(j_calls->handle_node_announcement_meth, msg_ref);
-       LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_boolLightningErrorZ_clone((LDKCResult_boolLightningErrorZ*)ret);
-       return ret_conv;
+void  __attribute__((visibility("default"))) TS_CResult_boolPeerHandleErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_boolPeerHandleErrorZ _res_conv = *(LDKCResult_boolPeerHandleErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_boolPeerHandleErrorZ_free(_res_conv);
 }
-LDKCResult_boolLightningErrorZ handle_channel_announcement_jcall(const void* this_arg, const LDKChannelAnnouncement * msg) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       LDKChannelAnnouncement msg_var = *msg;
-       msg_var = ChannelAnnouncement_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       LDKCResult_boolLightningErrorZ* ret = (LDKCResult_boolLightningErrorZ*)js_invoke_function_1(j_calls->handle_channel_announcement_meth, msg_ref);
-       LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_boolLightningErrorZ_clone((LDKCResult_boolLightningErrorZ*)ret);
-       return ret_conv;
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_boolPeerHandleErrorZ_clone(uint32_t orig) {
+       LDKCResult_boolPeerHandleErrorZ* orig_conv = (LDKCResult_boolPeerHandleErrorZ*)(orig & ~1);
+       LDKCResult_boolPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolPeerHandleErrorZ), "LDKCResult_boolPeerHandleErrorZ");
+       *ret_conv = CResult_boolPeerHandleErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
-LDKCResult_boolLightningErrorZ handle_channel_update_jcall(const void* this_arg, const LDKChannelUpdate * msg) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       LDKChannelUpdate msg_var = *msg;
-       msg_var = ChannelUpdate_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       LDKCResult_boolLightningErrorZ* ret = (LDKCResult_boolLightningErrorZ*)js_invoke_function_1(j_calls->handle_channel_update_meth, msg_ref);
-       LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_boolLightningErrorZ_clone((LDKCResult_boolLightningErrorZ*)ret);
-       return ret_conv;
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_InitFeaturesDecodeErrorZ_ok(uint32_t o) {
+       LDKInitFeatures o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = InitFeatures_clone(&o_conv);
+       LDKCResult_InitFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitFeaturesDecodeErrorZ), "LDKCResult_InitFeaturesDecodeErrorZ");
+       *ret_conv = CResult_InitFeaturesDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
-void handle_htlc_fail_channel_update_jcall(const void* this_arg, const LDKHTLCFailChannelUpdate * update) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       long ret_update = (long)update;
-       js_invoke_function_1(j_calls->handle_htlc_fail_channel_update_meth, ret_update);
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_InitFeaturesDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_InitFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitFeaturesDecodeErrorZ), "LDKCResult_InitFeaturesDecodeErrorZ");
+       *ret_conv = CResult_InitFeaturesDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ get_next_channel_announcements_jcall(const void* this_arg, uint64_t starting_point, uint8_t batch_amount) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       uint32_tArray arg = js_invoke_function_2(j_calls->get_next_channel_announcements_meth, starting_point, batch_amount);
-       LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ arg_constr;
-       arg_constr.datalen = *((uint32_t*)arg);
-       if (arg_constr.datalen > 0)
-               arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ Elements");
-       else
-               arg_constr.data = NULL;
-       uint32_t* arg_vals = (uint32_t*)(arg + 4);
-       for (size_t l = 0; l < arg_constr.datalen; l++) {
-               uint32_t arr_conv_63 = arg_vals[l];
-               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ arr_conv_63_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)arr_conv_63) & ~1);
-               FREE((void*)arr_conv_63);
-               arg_constr.data[l] = arr_conv_63_conv;
-       }
-       return arg_constr;
+
+void  __attribute__((visibility("default"))) TS_CResult_InitFeaturesDecodeErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_InitFeaturesDecodeErrorZ _res_conv = *(LDKCResult_InitFeaturesDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_InitFeaturesDecodeErrorZ_free(_res_conv);
 }
-LDKCVec_NodeAnnouncementZ get_next_node_announcements_jcall(const void* this_arg, LDKPublicKey starting_point, uint8_t batch_amount) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       int8_tArray starting_point_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(starting_point_arr + 4), starting_point.compressed_form, 33);
-       uint32_tArray arg = js_invoke_function_2(j_calls->get_next_node_announcements_meth, starting_point_arr, batch_amount);
-       LDKCVec_NodeAnnouncementZ arg_constr;
-       arg_constr.datalen = *((uint32_t*)arg);
-       if (arg_constr.datalen > 0)
-               arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKNodeAnnouncement), "LDKCVec_NodeAnnouncementZ Elements");
-       else
-               arg_constr.data = NULL;
-       uint32_t* arg_vals = (uint32_t*)(arg + 4);
-       for (size_t s = 0; s < arg_constr.datalen; s++) {
-               uint32_t arr_conv_18 = arg_vals[s];
-               LDKNodeAnnouncement arr_conv_18_conv;
-               arr_conv_18_conv.inner = (void*)(arr_conv_18 & (~1));
-               arr_conv_18_conv.is_owned = (arr_conv_18 & 1) || (arr_conv_18 == 0);
-               arr_conv_18_conv = NodeAnnouncement_clone(&arr_conv_18_conv);
-               arg_constr.data[s] = arr_conv_18_conv;
-       }
-       return arg_constr;
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NodeFeaturesDecodeErrorZ_ok(uint32_t o) {
+       LDKNodeFeatures o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = NodeFeatures_clone(&o_conv);
+       LDKCResult_NodeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeFeaturesDecodeErrorZ), "LDKCResult_NodeFeaturesDecodeErrorZ");
+       *ret_conv = CResult_NodeFeaturesDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
-void sync_routing_table_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * init) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKInit init_var = *init;
-       init_var = Init_clone(init);
-       CHECK((((long)init_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&init_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long init_ref = (long)init_var.inner;
-       if (init_var.is_owned) {
-               init_ref |= 1;
-       }
-       js_invoke_function_2(j_calls->sync_routing_table_meth, their_node_id_arr, init_ref);
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NodeFeaturesDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_NodeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeFeaturesDecodeErrorZ), "LDKCResult_NodeFeaturesDecodeErrorZ");
+       *ret_conv = CResult_NodeFeaturesDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-LDKCResult_NoneLightningErrorZ handle_reply_channel_range_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKReplyChannelRange msg) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKReplyChannelRange msg_var = msg;
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       LDKCResult_NoneLightningErrorZ* ret = (LDKCResult_NoneLightningErrorZ*)js_invoke_function_2(j_calls->handle_reply_channel_range_meth, their_node_id_arr, msg_ref);
-       LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_NoneLightningErrorZ_clone((LDKCResult_NoneLightningErrorZ*)ret);
-       return ret_conv;
+
+void  __attribute__((visibility("default"))) TS_CResult_NodeFeaturesDecodeErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_NodeFeaturesDecodeErrorZ _res_conv = *(LDKCResult_NodeFeaturesDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_NodeFeaturesDecodeErrorZ_free(_res_conv);
 }
-LDKCResult_NoneLightningErrorZ handle_reply_short_channel_ids_end_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKReplyShortChannelIdsEnd msg) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKReplyShortChannelIdsEnd msg_var = msg;
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       LDKCResult_NoneLightningErrorZ* ret = (LDKCResult_NoneLightningErrorZ*)js_invoke_function_2(j_calls->handle_reply_short_channel_ids_end_meth, their_node_id_arr, msg_ref);
-       LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_NoneLightningErrorZ_clone((LDKCResult_NoneLightningErrorZ*)ret);
-       return ret_conv;
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelFeaturesDecodeErrorZ_ok(uint32_t o) {
+       LDKChannelFeatures o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = ChannelFeatures_clone(&o_conv);
+       LDKCResult_ChannelFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelFeaturesDecodeErrorZ), "LDKCResult_ChannelFeaturesDecodeErrorZ");
+       *ret_conv = CResult_ChannelFeaturesDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
-LDKCResult_NoneLightningErrorZ handle_query_channel_range_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKQueryChannelRange msg) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKQueryChannelRange msg_var = msg;
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       LDKCResult_NoneLightningErrorZ* ret = (LDKCResult_NoneLightningErrorZ*)js_invoke_function_2(j_calls->handle_query_channel_range_meth, their_node_id_arr, msg_ref);
-       LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_NoneLightningErrorZ_clone((LDKCResult_NoneLightningErrorZ*)ret);
-       return ret_conv;
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelFeaturesDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_ChannelFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelFeaturesDecodeErrorZ), "LDKCResult_ChannelFeaturesDecodeErrorZ");
+       *ret_conv = CResult_ChannelFeaturesDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-LDKCResult_NoneLightningErrorZ handle_query_short_channel_ids_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKQueryShortChannelIds msg) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKQueryShortChannelIds msg_var = msg;
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       LDKCResult_NoneLightningErrorZ* ret = (LDKCResult_NoneLightningErrorZ*)js_invoke_function_2(j_calls->handle_query_short_channel_ids_meth, their_node_id_arr, msg_ref);
-       LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_NoneLightningErrorZ_clone((LDKCResult_NoneLightningErrorZ*)ret);
-       return ret_conv;
+
+void  __attribute__((visibility("default"))) TS_CResult_ChannelFeaturesDecodeErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_ChannelFeaturesDecodeErrorZ _res_conv = *(LDKCResult_ChannelFeaturesDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_ChannelFeaturesDecodeErrorZ_free(_res_conv);
 }
-static void* LDKRoutingMessageHandler_JCalls_clone(const void* this_arg) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
-       atomic_fetch_add_explicit(&j_calls->MessageSendEventsProvider->refcnt, 1, memory_order_release);
-       return (void*) this_arg;
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelConfigDecodeErrorZ_ok(uint32_t o) {
+       LDKChannelConfig o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = ChannelConfig_clone(&o_conv);
+       LDKCResult_ChannelConfigDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelConfigDecodeErrorZ), "LDKCResult_ChannelConfigDecodeErrorZ");
+       *ret_conv = CResult_ChannelConfigDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
-static inline LDKRoutingMessageHandler LDKRoutingMessageHandler_init (/*TODO: JS Object Reference */void* o, /*TODO: JS Object Reference */void* MessageSendEventsProvider) {
-       LDKRoutingMessageHandler_JCalls *calls = MALLOC(sizeof(LDKRoutingMessageHandler_JCalls), "LDKRoutingMessageHandler_JCalls");
-       atomic_init(&calls->refcnt, 1);
-       //TODO: Assign calls->o from o
 
-       LDKRoutingMessageHandler ret = {
-               .this_arg = (void*) calls,
-               .handle_node_announcement = handle_node_announcement_jcall,
-               .handle_channel_announcement = handle_channel_announcement_jcall,
-               .handle_channel_update = handle_channel_update_jcall,
-               .handle_htlc_fail_channel_update = handle_htlc_fail_channel_update_jcall,
-               .get_next_channel_announcements = get_next_channel_announcements_jcall,
-               .get_next_node_announcements = get_next_node_announcements_jcall,
-               .sync_routing_table = sync_routing_table_jcall,
-               .handle_reply_channel_range = handle_reply_channel_range_jcall,
-               .handle_reply_short_channel_ids_end = handle_reply_short_channel_ids_end_jcall,
-               .handle_query_channel_range = handle_query_channel_range_jcall,
-               .handle_query_short_channel_ids = handle_query_short_channel_ids_jcall,
-               .free = LDKRoutingMessageHandler_JCalls_free,
-               .MessageSendEventsProvider = LDKMessageSendEventsProvider_init(MessageSendEventsProvider),
-       };
-       calls->MessageSendEventsProvider = ret.MessageSendEventsProvider.this_arg;
-       return ret;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelConfigDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_ChannelConfigDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelConfigDecodeErrorZ), "LDKCResult_ChannelConfigDecodeErrorZ");
+       *ret_conv = CResult_ChannelConfigDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-long  __attribute__((visibility("default"))) TS_LDKRoutingMessageHandler_new(/*TODO: JS Object Reference */void* o, /*TODO: JS Object Reference */ void* MessageSendEventsProvider) {
-       LDKRoutingMessageHandler *res_ptr = MALLOC(sizeof(LDKRoutingMessageHandler), "LDKRoutingMessageHandler");
-       *res_ptr = LDKRoutingMessageHandler_init(o, MessageSendEventsProvider);
-       return (long)res_ptr;
+
+void  __attribute__((visibility("default"))) TS_CResult_ChannelConfigDecodeErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_ChannelConfigDecodeErrorZ _res_conv = *(LDKCResult_ChannelConfigDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_ChannelConfigDecodeErrorZ_free(_res_conv);
 }
-uint32_t  __attribute__((visibility("default"))) TS_RoutingMessageHandler_handle_node_announcement(uint32_t this_arg, uint32_t msg) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       LDKNodeAnnouncement msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelConfigDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_ChannelConfigDecodeErrorZ* orig_conv = (LDKCResult_ChannelConfigDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ChannelConfigDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelConfigDecodeErrorZ), "LDKCResult_ChannelConfigDecodeErrorZ");
+       *ret_conv = CResult_ChannelConfigDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_boolLightningErrorZ_ok(jboolean o) {
        LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
-       *ret_conv = (this_arg_conv->handle_node_announcement)(this_arg_conv->this_arg, &msg_conv);
+       *ret_conv = CResult_boolLightningErrorZ_ok(o);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_RoutingMessageHandler_handle_channel_announcement(uint32_t this_arg, uint32_t msg) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       LDKChannelAnnouncement msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_boolLightningErrorZ_err(uint32_t e) {
+       LDKLightningError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = LightningError_clone(&e_conv);
        LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
-       *ret_conv = (this_arg_conv->handle_channel_announcement)(this_arg_conv->this_arg, &msg_conv);
+       *ret_conv = CResult_boolLightningErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_RoutingMessageHandler_handle_channel_update(uint32_t this_arg, uint32_t msg) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       LDKChannelUpdate msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
+void  __attribute__((visibility("default"))) TS_CResult_boolLightningErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_boolLightningErrorZ _res_conv = *(LDKCResult_boolLightningErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_boolLightningErrorZ_free(_res_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_boolLightningErrorZ_clone(uint32_t orig) {
+       LDKCResult_boolLightningErrorZ* orig_conv = (LDKCResult_boolLightningErrorZ*)(orig & ~1);
        LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
-       *ret_conv = (this_arg_conv->handle_channel_update)(this_arg_conv->this_arg, &msg_conv);
+       *ret_conv = CResult_boolLightningErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_RoutingMessageHandler_handle_htlc_fail_channel_update(uint32_t this_arg, uint32_t update) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       LDKHTLCFailChannelUpdate* update_conv = (LDKHTLCFailChannelUpdate*)update;
-       (this_arg_conv->handle_htlc_fail_channel_update)(this_arg_conv->this_arg, update_conv);
+uint32_t  __attribute__((visibility("default"))) TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(uint32_t orig) {
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* orig_conv = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(orig & ~1);
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
+       *ret_ref = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig_conv);
+       return (long)ret_ref;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(uint32_t a, uint32_t b, uint32_t c) {
+       LDKChannelAnnouncement a_conv;
+       a_conv.inner = (void*)(a & (~1));
+       a_conv.is_owned = (a & 1) || (a == 0);
+       a_conv = ChannelAnnouncement_clone(&a_conv);
+       LDKChannelUpdate b_conv;
+       b_conv.inner = (void*)(b & (~1));
+       b_conv.is_owned = (b & 1) || (b == 0);
+       b_conv = ChannelUpdate_clone(&b_conv);
+       LDKChannelUpdate c_conv;
+       c_conv.inner = (void*)(c & (~1));
+       c_conv.is_owned = (c & 1) || (c == 0);
+       c_conv = ChannelUpdate_clone(&c_conv);
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
+       *ret_ref = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a_conv, b_conv, c_conv);
+       return (long)ret_ref;
 }
 
-uint32_tArray  __attribute__((visibility("default"))) TS_RoutingMessageHandler_get_next_channel_announcements(uint32_t this_arg, int64_t starting_point, int8_t batch_amount) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ ret_var = (this_arg_conv->get_next_channel_announcements)(this_arg_conv->this_arg, starting_point, batch_amount);
-       uint32_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
-       uint32_t *ret_arr_ptr = (uint32_t*)(ret_arr + 4);
-       for (size_t l = 0; l < ret_var.datalen; l++) {
-               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* arr_conv_63_ref = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
-               *arr_conv_63_ref = ret_var.data[l];
-               ret_arr_ptr[l] = (long)arr_conv_63_ref;
-       }
-       FREE(ret_var.data);
-       return ret_arr;
+void  __attribute__((visibility("default"))) TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res_conv);
 }
 
-uint32_tArray  __attribute__((visibility("default"))) TS_RoutingMessageHandler_get_next_node_announcements(uint32_t this_arg, int8_tArray starting_point, int8_t batch_amount) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       LDKPublicKey starting_point_ref;
-       CHECK(*((uint32_t*)starting_point) == 33);
-       memcpy(starting_point_ref.compressed_form, (uint8_t*)(starting_point + 4), 33);
-       LDKCVec_NodeAnnouncementZ ret_var = (this_arg_conv->get_next_node_announcements)(this_arg_conv->this_arg, starting_point_ref, batch_amount);
-       uint32_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
-       uint32_t *ret_arr_ptr = (uint32_t*)(ret_arr + 4);
-       for (size_t s = 0; s < ret_var.datalen; s++) {
-               LDKNodeAnnouncement arr_conv_18_var = ret_var.data[s];
-               CHECK((((long)arr_conv_18_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-               CHECK((((long)&arr_conv_18_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-               long arr_conv_18_ref = (long)arr_conv_18_var.inner;
-               if (arr_conv_18_var.is_owned) {
-                       arr_conv_18_ref |= 1;
-               }
-               ret_arr_ptr[s] = arr_conv_18_ref;
+void  __attribute__((visibility("default"))) TS_CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(uint32_tArray _res) {
+       LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res_constr;
+       _res_constr.datalen = *((uint32_t*)_res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ Elements");
+       else
+               _res_constr.data = NULL;
+       uint32_t* _res_vals = (uint32_t*)(_res + 4);
+       for (size_t l = 0; l < _res_constr.datalen; l++) {
+               uint32_t arr_conv_63 = _res_vals[l];
+               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ arr_conv_63_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)arr_conv_63) & ~1);
+               FREE((void*)arr_conv_63);
+               _res_constr.data[l] = arr_conv_63_conv;
        }
-       FREE(ret_var.data);
-       return ret_arr;
+       CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res_constr);
 }
 
-void  __attribute__((visibility("default"))) TS_RoutingMessageHandler_sync_routing_table(uint32_t this_arg, int8_tArray their_node_id, uint32_t init) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKInit init_conv;
-       init_conv.inner = (void*)(init & (~1));
-       init_conv.is_owned = false;
-       (this_arg_conv->sync_routing_table)(this_arg_conv->this_arg, their_node_id_ref, &init_conv);
+void  __attribute__((visibility("default"))) TS_CVec_NodeAnnouncementZ_free(uint32_tArray _res) {
+       LDKCVec_NodeAnnouncementZ _res_constr;
+       _res_constr.datalen = *((uint32_t*)_res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKNodeAnnouncement), "LDKCVec_NodeAnnouncementZ Elements");
+       else
+               _res_constr.data = NULL;
+       uint32_t* _res_vals = (uint32_t*)(_res + 4);
+       for (size_t s = 0; s < _res_constr.datalen; s++) {
+               uint32_t arr_conv_18 = _res_vals[s];
+               LDKNodeAnnouncement arr_conv_18_conv;
+               arr_conv_18_conv.inner = (void*)(arr_conv_18 & (~1));
+               arr_conv_18_conv.is_owned = (arr_conv_18 & 1) || (arr_conv_18 == 0);
+               _res_constr.data[s] = arr_conv_18_conv;
+       }
+       CVec_NodeAnnouncementZ_free(_res_constr);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_RoutingMessageHandler_handle_reply_channel_range(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKReplyChannelRange msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = (msg & 1) || (msg == 0);
-       msg_conv = ReplyChannelRange_clone(&msg_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NoneLightningErrorZ_ok() {
        LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
-       *ret_conv = (this_arg_conv->handle_reply_channel_range)(this_arg_conv->this_arg, their_node_id_ref, msg_conv);
+       *ret_conv = CResult_NoneLightningErrorZ_ok();
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_RoutingMessageHandler_handle_reply_short_channel_ids_end(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKReplyShortChannelIdsEnd msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = (msg & 1) || (msg == 0);
-       msg_conv = ReplyShortChannelIdsEnd_clone(&msg_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NoneLightningErrorZ_err(uint32_t e) {
+       LDKLightningError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = LightningError_clone(&e_conv);
        LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
-       *ret_conv = (this_arg_conv->handle_reply_short_channel_ids_end)(this_arg_conv->this_arg, their_node_id_ref, msg_conv);
+       *ret_conv = CResult_NoneLightningErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_RoutingMessageHandler_handle_query_channel_range(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKQueryChannelRange msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = (msg & 1) || (msg == 0);
-       msg_conv = QueryChannelRange_clone(&msg_conv);
-       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
-       *ret_conv = (this_arg_conv->handle_query_channel_range)(this_arg_conv->this_arg, their_node_id_ref, msg_conv);
-       return (long)ret_conv;
+void  __attribute__((visibility("default"))) TS_CResult_NoneLightningErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_NoneLightningErrorZ _res_conv = *(LDKCResult_NoneLightningErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_NoneLightningErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_RoutingMessageHandler_handle_query_short_channel_ids(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKQueryShortChannelIds msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = (msg & 1) || (msg == 0);
-       msg_conv = QueryShortChannelIds_clone(&msg_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NoneLightningErrorZ_clone(uint32_t orig) {
+       LDKCResult_NoneLightningErrorZ* orig_conv = (LDKCResult_NoneLightningErrorZ*)(orig & ~1);
        LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
-       *ret_conv = (this_arg_conv->handle_query_short_channel_ids)(this_arg_conv->this_arg, their_node_id_ref, msg_conv);
+       *ret_conv = CResult_NoneLightningErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-typedef struct LDKSocketDescriptor_JCalls {
-       atomic_size_t refcnt;
-       uint32_t send_data_meth;
-       uint32_t disconnect_socket_meth;
-       uint32_t eq_meth;
-       uint32_t hash_meth;
-} LDKSocketDescriptor_JCalls;
-static void LDKSocketDescriptor_JCalls_free(void* this_arg) {
-       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
-       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
-               js_free(j_calls->send_data_meth);
-               js_free(j_calls->disconnect_socket_meth);
-               js_free(j_calls->eq_meth);
-               js_free(j_calls->hash_meth);
-               FREE(j_calls);
+void  __attribute__((visibility("default"))) TS_CVec_MessageSendEventZ_free(uint32_tArray _res) {
+       LDKCVec_MessageSendEventZ _res_constr;
+       _res_constr.datalen = *((uint32_t*)_res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKMessageSendEvent), "LDKCVec_MessageSendEventZ Elements");
+       else
+               _res_constr.data = NULL;
+       uint32_t* _res_vals = (uint32_t*)(_res + 4);
+       for (size_t s = 0; s < _res_constr.datalen; s++) {
+               uint32_t arr_conv_18 = _res_vals[s];
+               LDKMessageSendEvent arr_conv_18_conv = *(LDKMessageSendEvent*)(((uint64_t)arr_conv_18) & ~1);
+               FREE((void*)arr_conv_18);
+               _res_constr.data[s] = arr_conv_18_conv;
        }
+       CVec_MessageSendEventZ_free(_res_constr);
 }
-uintptr_t send_data_jcall(void* this_arg, LDKu8slice data, bool resume_read) {
-       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
-       LDKu8slice data_var = data;
-       int8_tArray data_arr = init_arr(data_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(data_arr + 4), data_var.data, data_var.datalen);
-       return js_invoke_function_2(j_calls->send_data_meth, data_arr, resume_read);
-}
-void disconnect_socket_jcall(void* this_arg) {
-       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
-       js_invoke_function_0(j_calls->disconnect_socket_meth);
-}
-bool eq_jcall(const void* this_arg, const LDKSocketDescriptor * other_arg) {
-       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
-       LDKSocketDescriptor *other_arg_clone = MALLOC(sizeof(LDKSocketDescriptor), "LDKSocketDescriptor");
-       *other_arg_clone = SocketDescriptor_clone(other_arg);
-       return js_invoke_function_1(j_calls->eq_meth, (long)other_arg_clone);
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_DirectionalChannelInfoDecodeErrorZ_ok(uint32_t o) {
+       LDKDirectionalChannelInfo o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = DirectionalChannelInfo_clone(&o_conv);
+       LDKCResult_DirectionalChannelInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DirectionalChannelInfoDecodeErrorZ), "LDKCResult_DirectionalChannelInfoDecodeErrorZ");
+       *ret_conv = CResult_DirectionalChannelInfoDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
-uint64_t hash_jcall(const void* this_arg) {
-       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
-       return js_invoke_function_0(j_calls->hash_meth);
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_DirectionalChannelInfoDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_DirectionalChannelInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DirectionalChannelInfoDecodeErrorZ), "LDKCResult_DirectionalChannelInfoDecodeErrorZ");
+       *ret_conv = CResult_DirectionalChannelInfoDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-static void* LDKSocketDescriptor_JCalls_clone(const void* this_arg) {
-       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
-       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
-       return (void*) this_arg;
+
+void  __attribute__((visibility("default"))) TS_CResult_DirectionalChannelInfoDecodeErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_DirectionalChannelInfoDecodeErrorZ _res_conv = *(LDKCResult_DirectionalChannelInfoDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_DirectionalChannelInfoDecodeErrorZ_free(_res_conv);
 }
-static inline LDKSocketDescriptor LDKSocketDescriptor_init (/*TODO: JS Object Reference */void* o) {
-       LDKSocketDescriptor_JCalls *calls = MALLOC(sizeof(LDKSocketDescriptor_JCalls), "LDKSocketDescriptor_JCalls");
-       atomic_init(&calls->refcnt, 1);
-       //TODO: Assign calls->o from o
 
-       LDKSocketDescriptor ret = {
-               .this_arg = (void*) calls,
-               .send_data = send_data_jcall,
-               .disconnect_socket = disconnect_socket_jcall,
-               .eq = eq_jcall,
-               .hash = hash_jcall,
-               .clone = LDKSocketDescriptor_JCalls_clone,
-               .free = LDKSocketDescriptor_JCalls_free,
-       };
-       return ret;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_DirectionalChannelInfoDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_DirectionalChannelInfoDecodeErrorZ* orig_conv = (LDKCResult_DirectionalChannelInfoDecodeErrorZ*)(orig & ~1);
+       LDKCResult_DirectionalChannelInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DirectionalChannelInfoDecodeErrorZ), "LDKCResult_DirectionalChannelInfoDecodeErrorZ");
+       *ret_conv = CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
-long  __attribute__((visibility("default"))) TS_LDKSocketDescriptor_new(/*TODO: JS Object Reference */void* o) {
-       LDKSocketDescriptor *res_ptr = MALLOC(sizeof(LDKSocketDescriptor), "LDKSocketDescriptor");
-       *res_ptr = LDKSocketDescriptor_init(o);
-       return (long)res_ptr;
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelInfoDecodeErrorZ_ok(uint32_t o) {
+       LDKChannelInfo o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       // Warning: we need a move here but no clone is available for LDKChannelInfo
+       LDKCResult_ChannelInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelInfoDecodeErrorZ), "LDKCResult_ChannelInfoDecodeErrorZ");
+       *ret_conv = CResult_ChannelInfoDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
-int64_t  __attribute__((visibility("default"))) TS_SocketDescriptor_send_data(uint32_t this_arg, int8_tArray data, jboolean resume_read) {
-       LDKSocketDescriptor* this_arg_conv = (LDKSocketDescriptor*)this_arg;
-       LDKu8slice data_ref;
-       data_ref.datalen = *((uint32_t*)data);
-       data_ref.data = (int8_t*)(data + 4);
-       int64_t ret_val = (this_arg_conv->send_data)(this_arg_conv->this_arg, data_ref, resume_read);
-       return ret_val;
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelInfoDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_ChannelInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelInfoDecodeErrorZ), "LDKCResult_ChannelInfoDecodeErrorZ");
+       *ret_conv = CResult_ChannelInfoDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_SocketDescriptor_disconnect_socket(uint32_t this_arg) {
-       LDKSocketDescriptor* this_arg_conv = (LDKSocketDescriptor*)this_arg;
-       (this_arg_conv->disconnect_socket)(this_arg_conv->this_arg);
+void  __attribute__((visibility("default"))) TS_CResult_ChannelInfoDecodeErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_ChannelInfoDecodeErrorZ _res_conv = *(LDKCResult_ChannelInfoDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_ChannelInfoDecodeErrorZ_free(_res_conv);
 }
 
-int64_t  __attribute__((visibility("default"))) TS_SocketDescriptor_hash(uint32_t this_arg) {
-       LDKSocketDescriptor* this_arg_conv = (LDKSocketDescriptor*)this_arg;
-       int64_t ret_val = (this_arg_conv->hash)(this_arg_conv->this_arg);
-       return ret_val;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_RoutingFeesDecodeErrorZ_ok(uint32_t o) {
+       LDKRoutingFees o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = RoutingFees_clone(&o_conv);
+       LDKCResult_RoutingFeesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RoutingFeesDecodeErrorZ), "LDKCResult_RoutingFeesDecodeErrorZ");
+       *ret_conv = CResult_RoutingFeesDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_Transaction_free(int8_tArray _res) {
-       LDKTransaction _res_ref;
-       _res_ref.datalen = *((uint32_t*)_res);
-       _res_ref.data = MALLOC(_res_ref.datalen, "LDKTransaction Bytes");
-       memcpy(_res_ref.data, (uint8_t*)(_res + 4), _res_ref.datalen);
-       _res_ref.data_is_owned = true;
-       Transaction_free(_res_ref);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_RoutingFeesDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_RoutingFeesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RoutingFeesDecodeErrorZ), "LDKCResult_RoutingFeesDecodeErrorZ");
+       *ret_conv = CResult_RoutingFeesDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_TxOut_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_RoutingFeesDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKTxOut _res_conv = *(LDKTxOut*)(((uint64_t)_res) & ~1);
+       LDKCResult_RoutingFeesDecodeErrorZ _res_conv = *(LDKCResult_RoutingFeesDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       TxOut_free(_res_conv);
+       CResult_RoutingFeesDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_TxOut_clone(uint32_t orig) {
-       LDKTxOut* orig_conv = (LDKTxOut*)(orig & ~1);
-       LDKTxOut* ret_ref = MALLOC(sizeof(LDKTxOut), "LDKTxOut");
-       *ret_ref = TxOut_clone(orig_conv);
-       return (long)ret_ref;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_RoutingFeesDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_RoutingFeesDecodeErrorZ* orig_conv = (LDKCResult_RoutingFeesDecodeErrorZ*)(orig & ~1);
+       LDKCResult_RoutingFeesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RoutingFeesDecodeErrorZ), "LDKCResult_RoutingFeesDecodeErrorZ");
+       *ret_conv = CResult_RoutingFeesDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CVec_SpendableOutputDescriptorZ_free(uint32_tArray _res) {
-       LDKCVec_SpendableOutputDescriptorZ _res_constr;
+void  __attribute__((visibility("default"))) TS_CVec_NetAddressZ_free(uint32_tArray _res) {
+       LDKCVec_NetAddressZ _res_constr;
        _res_constr.datalen = *((uint32_t*)_res);
        if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements");
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKNetAddress), "LDKCVec_NetAddressZ Elements");
        else
                _res_constr.data = NULL;
        uint32_t* _res_vals = (uint32_t*)(_res + 4);
-       for (size_t b = 0; b < _res_constr.datalen; b++) {
-               uint32_t arr_conv_27 = _res_vals[b];
-               LDKSpendableOutputDescriptor arr_conv_27_conv = *(LDKSpendableOutputDescriptor*)(((uint64_t)arr_conv_27) & ~1);
-               FREE((void*)arr_conv_27);
-               _res_constr.data[b] = arr_conv_27_conv;
+       for (size_t m = 0; m < _res_constr.datalen; m++) {
+               uint32_t arr_conv_12 = _res_vals[m];
+               LDKNetAddress arr_conv_12_conv = *(LDKNetAddress*)(((uint64_t)arr_conv_12) & ~1);
+               FREE((void*)arr_conv_12);
+               _res_constr.data[m] = arr_conv_12_conv;
        }
-       CVec_SpendableOutputDescriptorZ_free(_res_constr);
+       CVec_NetAddressZ_free(_res_constr);
 }
 
-void  __attribute__((visibility("default"))) TS_CVec_MessageSendEventZ_free(uint32_tArray _res) {
-       LDKCVec_MessageSendEventZ _res_constr;
-       _res_constr.datalen = *((uint32_t*)_res);
-       if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKMessageSendEvent), "LDKCVec_MessageSendEventZ Elements");
-       else
-               _res_constr.data = NULL;
-       uint32_t* _res_vals = (uint32_t*)(_res + 4);
-       for (size_t s = 0; s < _res_constr.datalen; s++) {
-               uint32_t arr_conv_18 = _res_vals[s];
-               LDKMessageSendEvent arr_conv_18_conv = *(LDKMessageSendEvent*)(((uint64_t)arr_conv_18) & ~1);
-               FREE((void*)arr_conv_18);
-               _res_constr.data[s] = arr_conv_18_conv;
-       }
-       CVec_MessageSendEventZ_free(_res_constr);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NodeAnnouncementInfoDecodeErrorZ_ok(uint32_t o) {
+       LDKNodeAnnouncementInfo o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = NodeAnnouncementInfo_clone(&o_conv);
+       LDKCResult_NodeAnnouncementInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementInfoDecodeErrorZ), "LDKCResult_NodeAnnouncementInfoDecodeErrorZ");
+       *ret_conv = CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CVec_EventZ_free(uint32_tArray _res) {
-       LDKCVec_EventZ _res_constr;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NodeAnnouncementInfoDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_NodeAnnouncementInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementInfoDecodeErrorZ), "LDKCResult_NodeAnnouncementInfoDecodeErrorZ");
+       *ret_conv = CResult_NodeAnnouncementInfoDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+void  __attribute__((visibility("default"))) TS_CResult_NodeAnnouncementInfoDecodeErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res_conv = *(LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NodeAnnouncementInfoDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_NodeAnnouncementInfoDecodeErrorZ* orig_conv = (LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)(orig & ~1);
+       LDKCResult_NodeAnnouncementInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementInfoDecodeErrorZ), "LDKCResult_NodeAnnouncementInfoDecodeErrorZ");
+       *ret_conv = CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+void  __attribute__((visibility("default"))) TS_CVec_u64Z_free(int64_tArray _res) {
+       LDKCVec_u64Z _res_constr;
        _res_constr.datalen = *((uint32_t*)_res);
        if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKEvent), "LDKCVec_EventZ Elements");
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(int64_t), "LDKCVec_u64Z Elements");
        else
                _res_constr.data = NULL;
-       uint32_t* _res_vals = (uint32_t*)(_res + 4);
-       for (size_t h = 0; h < _res_constr.datalen; h++) {
-               uint32_t arr_conv_7 = _res_vals[h];
-               LDKEvent arr_conv_7_conv = *(LDKEvent*)(((uint64_t)arr_conv_7) & ~1);
-               FREE((void*)arr_conv_7);
-               _res_constr.data[h] = arr_conv_7_conv;
+       int64_t* _res_vals = (int64_t*)(_res + 4);
+       for (size_t i = 0; i < _res_constr.datalen; i++) {
+               int64_t arr_conv_8 = _res_vals[i];
+               _res_constr.data[i] = arr_conv_8;
        }
-       CVec_EventZ_free(_res_constr);
+       CVec_u64Z_free(_res_constr);
 }
 
-void  __attribute__((visibility("default"))) TS_C2Tuple_usizeTransactionZ_free(uint32_t _res) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NodeInfoDecodeErrorZ_ok(uint32_t o) {
+       LDKNodeInfo o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = NodeInfo_clone(&o_conv);
+       LDKCResult_NodeInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeInfoDecodeErrorZ), "LDKCResult_NodeInfoDecodeErrorZ");
+       *ret_conv = CResult_NodeInfoDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NodeInfoDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_NodeInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeInfoDecodeErrorZ), "LDKCResult_NodeInfoDecodeErrorZ");
+       *ret_conv = CResult_NodeInfoDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+void  __attribute__((visibility("default"))) TS_CResult_NodeInfoDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKC2Tuple_usizeTransactionZ _res_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_NodeInfoDecodeErrorZ _res_conv = *(LDKCResult_NodeInfoDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       C2Tuple_usizeTransactionZ_free(_res_conv);
+       CResult_NodeInfoDecodeErrorZ_free(_res_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NodeInfoDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_NodeInfoDecodeErrorZ* orig_conv = (LDKCResult_NodeInfoDecodeErrorZ*)(orig & ~1);
+       LDKCResult_NodeInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeInfoDecodeErrorZ), "LDKCResult_NodeInfoDecodeErrorZ");
+       *ret_conv = CResult_NodeInfoDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NetworkGraphDecodeErrorZ_ok(uint32_t o) {
+       LDKNetworkGraph o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       // Warning: we need a move here but no clone is available for LDKNetworkGraph
+       LDKCResult_NetworkGraphDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetworkGraphDecodeErrorZ), "LDKCResult_NetworkGraphDecodeErrorZ");
+       *ret_conv = CResult_NetworkGraphDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NetworkGraphDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_NetworkGraphDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetworkGraphDecodeErrorZ), "LDKCResult_NetworkGraphDecodeErrorZ");
+       *ret_conv = CResult_NetworkGraphDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+void  __attribute__((visibility("default"))) TS_CResult_NetworkGraphDecodeErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_NetworkGraphDecodeErrorZ _res_conv = *(LDKCResult_NetworkGraphDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_NetworkGraphDecodeErrorZ_free(_res_conv);
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_usizeTransactionZ_new(int64_t a, int8_tArray b) {
@@ -4369,6 +6056,13 @@ uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_usizeTransactionZ_ne
        return (long)ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_C2Tuple_usizeTransactionZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKC2Tuple_usizeTransactionZ _res_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       C2Tuple_usizeTransactionZ_free(_res_conv);
+}
+
 void  __attribute__((visibility("default"))) TS_CVec_C2Tuple_usizeTransactionZZ_free(uint32_tArray _res) {
        LDKCVec_C2Tuple_usizeTransactionZZ _res_constr;
        _res_constr.datalen = *((uint32_t*)_res);
@@ -4431,31 +6125,123 @@ void  __attribute__((visibility("default"))) TS_CVec_MonitorEventZ_free(uint32_t
        CVec_MonitorEventZ_free(_res_constr);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelMonitorUpdateDecodeErrorZ_ok(uint32_t o) {
-       LDKChannelMonitorUpdate o_conv;
+void  __attribute__((visibility("default"))) TS_CVec_EventZ_free(uint32_tArray _res) {
+       LDKCVec_EventZ _res_constr;
+       _res_constr.datalen = *((uint32_t*)_res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKEvent), "LDKCVec_EventZ Elements");
+       else
+               _res_constr.data = NULL;
+       uint32_t* _res_vals = (uint32_t*)(_res + 4);
+       for (size_t h = 0; h < _res_constr.datalen; h++) {
+               uint32_t arr_conv_7 = _res_vals[h];
+               LDKEvent arr_conv_7_conv = *(LDKEvent*)(((uint64_t)arr_conv_7) & ~1);
+               FREE((void*)arr_conv_7);
+               _res_constr.data[h] = arr_conv_7_conv;
+       }
+       CVec_EventZ_free(_res_constr);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_OutPointDecodeErrorZ_ok(uint32_t o) {
+       LDKOutPoint o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = OutPoint_clone(&o_conv);
+       LDKCResult_OutPointDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutPointDecodeErrorZ), "LDKCResult_OutPointDecodeErrorZ");
+       *ret_conv = CResult_OutPointDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_OutPointDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_OutPointDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutPointDecodeErrorZ), "LDKCResult_OutPointDecodeErrorZ");
+       *ret_conv = CResult_OutPointDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+void  __attribute__((visibility("default"))) TS_CResult_OutPointDecodeErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_OutPointDecodeErrorZ _res_conv = *(LDKCResult_OutPointDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_OutPointDecodeErrorZ_free(_res_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_OutPointDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_OutPointDecodeErrorZ* orig_conv = (LDKCResult_OutPointDecodeErrorZ*)(orig & ~1);
+       LDKCResult_OutPointDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutPointDecodeErrorZ), "LDKCResult_OutPointDecodeErrorZ");
+       *ret_conv = CResult_OutPointDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelMonitorUpdateDecodeErrorZ_ok(uint32_t o) {
+       LDKChannelMonitorUpdate o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = ChannelMonitorUpdate_clone(&o_conv);
+       LDKCResult_ChannelMonitorUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelMonitorUpdateDecodeErrorZ), "LDKCResult_ChannelMonitorUpdateDecodeErrorZ");
+       *ret_conv = CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelMonitorUpdateDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_ChannelMonitorUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelMonitorUpdateDecodeErrorZ), "LDKCResult_ChannelMonitorUpdateDecodeErrorZ");
+       *ret_conv = CResult_ChannelMonitorUpdateDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+void  __attribute__((visibility("default"))) TS_CResult_ChannelMonitorUpdateDecodeErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res_conv = *(LDKCResult_ChannelMonitorUpdateDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelMonitorUpdateDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_ChannelMonitorUpdateDecodeErrorZ* orig_conv = (LDKCResult_ChannelMonitorUpdateDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ChannelMonitorUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelMonitorUpdateDecodeErrorZ), "LDKCResult_ChannelMonitorUpdateDecodeErrorZ");
+       *ret_conv = CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_HTLCUpdateDecodeErrorZ_ok(uint32_t o) {
+       LDKHTLCUpdate o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = ChannelMonitorUpdate_clone(&o_conv);
-       LDKCResult_ChannelMonitorUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelMonitorUpdateDecodeErrorZ), "LDKCResult_ChannelMonitorUpdateDecodeErrorZ");
-       *ret_conv = CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o_conv);
+       o_conv = HTLCUpdate_clone(&o_conv);
+       LDKCResult_HTLCUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCUpdateDecodeErrorZ), "LDKCResult_HTLCUpdateDecodeErrorZ");
+       *ret_conv = CResult_HTLCUpdateDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelMonitorUpdateDecodeErrorZ_err(uint32_t e) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_HTLCUpdateDecodeErrorZ_err(uint32_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_ChannelMonitorUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelMonitorUpdateDecodeErrorZ), "LDKCResult_ChannelMonitorUpdateDecodeErrorZ");
-       *ret_conv = CResult_ChannelMonitorUpdateDecodeErrorZ_err(e_conv);
+       LDKCResult_HTLCUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCUpdateDecodeErrorZ), "LDKCResult_HTLCUpdateDecodeErrorZ");
+       *ret_conv = CResult_HTLCUpdateDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_ChannelMonitorUpdateDecodeErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_HTLCUpdateDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res_conv = *(LDKCResult_ChannelMonitorUpdateDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_HTLCUpdateDecodeErrorZ _res_conv = *(LDKCResult_HTLCUpdateDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res_conv);
+       CResult_HTLCUpdateDecodeErrorZ_free(_res_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_HTLCUpdateDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_HTLCUpdateDecodeErrorZ* orig_conv = (LDKCResult_HTLCUpdateDecodeErrorZ*)(orig & ~1);
+       LDKCResult_HTLCUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCUpdateDecodeErrorZ), "LDKCResult_HTLCUpdateDecodeErrorZ");
+       *ret_conv = CResult_HTLCUpdateDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_CResult_NoneMonitorUpdateErrorZ_ok() {
@@ -4488,11 +6274,11 @@ uint32_t  __attribute__((visibility("default"))) TS_CResult_NoneMonitorUpdateErr
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_C2Tuple_OutPointScriptZ_free(uint32_t _res) {
-       if ((_res & 1) != 0) return;
-       LDKC2Tuple_OutPointScriptZ _res_conv = *(LDKC2Tuple_OutPointScriptZ*)(((uint64_t)_res) & ~1);
-       FREE((void*)_res);
-       C2Tuple_OutPointScriptZ_free(_res_conv);
+uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_OutPointScriptZ_clone(uint32_t orig) {
+       LDKC2Tuple_OutPointScriptZ* orig_conv = (LDKC2Tuple_OutPointScriptZ*)(orig & ~1);
+       LDKC2Tuple_OutPointScriptZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
+       *ret_ref = C2Tuple_OutPointScriptZ_clone(orig_conv);
+       return (long)ret_ref;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_OutPointScriptZ_new(uint32_t a, int8_tArray b) {
@@ -4509,6 +6295,13 @@ uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_OutPointScriptZ_new(
        return (long)ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_C2Tuple_OutPointScriptZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKC2Tuple_OutPointScriptZ _res_conv = *(LDKC2Tuple_OutPointScriptZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       C2Tuple_OutPointScriptZ_free(_res_conv);
+}
+
 void  __attribute__((visibility("default"))) TS_CVec_TransactionZ_free(ptrArray _res) {
        LDKCVec_TransactionZ _res_constr;
        _res_constr.datalen = *((uint32_t*)_res);
@@ -4536,13 +6329,6 @@ uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_u32TxOutZ_clone(uint
        return (long)ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_C2Tuple_u32TxOutZ_free(uint32_t _res) {
-       if ((_res & 1) != 0) return;
-       LDKC2Tuple_u32TxOutZ _res_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)_res) & ~1);
-       FREE((void*)_res);
-       C2Tuple_u32TxOutZ_free(_res_conv);
-}
-
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_u32TxOutZ_new(int32_t a, uint32_t b) {
        LDKTxOut b_conv = *(LDKTxOut*)(((uint64_t)b) & ~1);
        FREE((void*)b);
@@ -4551,6 +6337,13 @@ uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_u32TxOutZ_new(int32_
        return (long)ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_C2Tuple_u32TxOutZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKC2Tuple_u32TxOutZ _res_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       C2Tuple_u32TxOutZ_free(_res_conv);
+}
+
 void  __attribute__((visibility("default"))) TS_CVec_C2Tuple_u32TxOutZZ_free(uint32_tArray _res) {
        LDKCVec_C2Tuple_u32TxOutZZ _res_constr;
        _res_constr.datalen = *((uint32_t*)_res);
@@ -4568,13 +6361,6 @@ void  __attribute__((visibility("default"))) TS_CVec_C2Tuple_u32TxOutZZ_free(uin
        CVec_C2Tuple_u32TxOutZZ_free(_res_constr);
 }
 
-void  __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(uint32_t _res) {
-       if ((_res & 1) != 0) return;
-       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(((uint64_t)_res) & ~1);
-       FREE((void*)_res);
-       C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res_conv);
-}
-
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(int8_tArray a, uint32_tArray b) {
        LDKThirtyTwoBytes a_ref;
        CHECK(*((uint32_t*)a) == 32);
@@ -4597,6 +6383,13 @@ uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32
        return (long)ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res_conv);
+}
+
 void  __attribute__((visibility("default"))) TS_CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(uint32_tArray _res) {
        LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ _res_constr;
        _res_constr.datalen = *((uint32_t*)_res);
@@ -4614,13 +6407,6 @@ void  __attribute__((visibility("default"))) TS_CVec_C2Tuple_TxidCVec_C2Tuple_u3
        CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res_constr);
 }
 
-void  __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelMonitorZ_free(uint32_t _res) {
-       if ((_res & 1) != 0) return;
-       LDKC2Tuple_BlockHashChannelMonitorZ _res_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)_res) & ~1);
-       FREE((void*)_res);
-       C2Tuple_BlockHashChannelMonitorZ_free(_res_conv);
-}
-
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelMonitorZ_new(int8_tArray a, uint32_t b) {
        LDKThirtyTwoBytes a_ref;
        CHECK(*((uint32_t*)a) == 32);
@@ -4634,29 +6420,221 @@ uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelMoni
        return (long)ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelMonitorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKC2Tuple_BlockHashChannelMonitorZ _res_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       C2Tuple_BlockHashChannelMonitorZ_free(_res_conv);
+}
+
 uint32_t  __attribute__((visibility("default"))) TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(uint32_t o) {
        LDKC2Tuple_BlockHashChannelMonitorZ o_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o) & ~1);
        FREE((void*)o);
-       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ");
-       *ret_conv = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o_conv);
+       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ");
+       *ret_conv = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ");
+       *ret_conv = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+void  __attribute__((visibility("default"))) TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res_conv = *(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res_conv);
+}
+
+void  __attribute__((visibility("default"))) TS_CVec_SpendableOutputDescriptorZ_free(uint32_tArray _res) {
+       LDKCVec_SpendableOutputDescriptorZ _res_constr;
+       _res_constr.datalen = *((uint32_t*)_res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements");
+       else
+               _res_constr.data = NULL;
+       uint32_t* _res_vals = (uint32_t*)(_res + 4);
+       for (size_t b = 0; b < _res_constr.datalen; b++) {
+               uint32_t arr_conv_27 = _res_vals[b];
+               LDKSpendableOutputDescriptor arr_conv_27_conv = *(LDKSpendableOutputDescriptor*)(((uint64_t)arr_conv_27) & ~1);
+               FREE((void*)arr_conv_27);
+               _res_constr.data[b] = arr_conv_27_conv;
+       }
+       CVec_SpendableOutputDescriptorZ_free(_res_constr);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_TxOutAccessErrorZ_ok(uint32_t o) {
+       LDKTxOut o_conv = *(LDKTxOut*)(((uint64_t)o) & ~1);
+       FREE((void*)o);
+       LDKCResult_TxOutAccessErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxOutAccessErrorZ), "LDKCResult_TxOutAccessErrorZ");
+       *ret_conv = CResult_TxOutAccessErrorZ_ok(o_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_TxOutAccessErrorZ_err(uint32_t e) {
+       LDKAccessError e_conv = LDKAccessError_from_js(e);
+       LDKCResult_TxOutAccessErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxOutAccessErrorZ), "LDKCResult_TxOutAccessErrorZ");
+       *ret_conv = CResult_TxOutAccessErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+void  __attribute__((visibility("default"))) TS_CResult_TxOutAccessErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_TxOutAccessErrorZ _res_conv = *(LDKCResult_TxOutAccessErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_TxOutAccessErrorZ_free(_res_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_TxOutAccessErrorZ_clone(uint32_t orig) {
+       LDKCResult_TxOutAccessErrorZ* orig_conv = (LDKCResult_TxOutAccessErrorZ*)(orig & ~1);
+       LDKCResult_TxOutAccessErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxOutAccessErrorZ), "LDKCResult_TxOutAccessErrorZ");
+       *ret_conv = CResult_TxOutAccessErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NoneAPIErrorZ_ok() {
+       LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
+       *ret_conv = CResult_NoneAPIErrorZ_ok();
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NoneAPIErrorZ_err(uint32_t e) {
+       LDKAPIError e_conv = *(LDKAPIError*)(((uint64_t)e) & ~1);
+       FREE((void*)e);
+       LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
+       *ret_conv = CResult_NoneAPIErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+void  __attribute__((visibility("default"))) TS_CResult_NoneAPIErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_NoneAPIErrorZ _res_conv = *(LDKCResult_NoneAPIErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_NoneAPIErrorZ_free(_res_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NoneAPIErrorZ_clone(uint32_t orig) {
+       LDKCResult_NoneAPIErrorZ* orig_conv = (LDKCResult_NoneAPIErrorZ*)(orig & ~1);
+       LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
+       *ret_conv = CResult_NoneAPIErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+void  __attribute__((visibility("default"))) TS_CVec_ChannelDetailsZ_free(uint32_tArray _res) {
+       LDKCVec_ChannelDetailsZ _res_constr;
+       _res_constr.datalen = *((uint32_t*)_res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKChannelDetails), "LDKCVec_ChannelDetailsZ Elements");
+       else
+               _res_constr.data = NULL;
+       uint32_t* _res_vals = (uint32_t*)(_res + 4);
+       for (size_t q = 0; q < _res_constr.datalen; q++) {
+               uint32_t arr_conv_16 = _res_vals[q];
+               LDKChannelDetails arr_conv_16_conv;
+               arr_conv_16_conv.inner = (void*)(arr_conv_16 & (~1));
+               arr_conv_16_conv.is_owned = (arr_conv_16 & 1) || (arr_conv_16 == 0);
+               _res_constr.data[q] = arr_conv_16_conv;
+       }
+       CVec_ChannelDetailsZ_free(_res_constr);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NonePaymentSendFailureZ_ok() {
+       LDKCResult_NonePaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePaymentSendFailureZ), "LDKCResult_NonePaymentSendFailureZ");
+       *ret_conv = CResult_NonePaymentSendFailureZ_ok();
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NonePaymentSendFailureZ_err(uint32_t e) {
+       LDKPaymentSendFailure e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = PaymentSendFailure_clone(&e_conv);
+       LDKCResult_NonePaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePaymentSendFailureZ), "LDKCResult_NonePaymentSendFailureZ");
+       *ret_conv = CResult_NonePaymentSendFailureZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+void  __attribute__((visibility("default"))) TS_CResult_NonePaymentSendFailureZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_NonePaymentSendFailureZ _res_conv = *(LDKCResult_NonePaymentSendFailureZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_NonePaymentSendFailureZ_free(_res_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NonePaymentSendFailureZ_clone(uint32_t orig) {
+       LDKCResult_NonePaymentSendFailureZ* orig_conv = (LDKCResult_NonePaymentSendFailureZ*)(orig & ~1);
+       LDKCResult_NonePaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePaymentSendFailureZ), "LDKCResult_NonePaymentSendFailureZ");
+       *ret_conv = CResult_NonePaymentSendFailureZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+void  __attribute__((visibility("default"))) TS_CVec_ChannelMonitorZ_free(uint32_tArray _res) {
+       LDKCVec_ChannelMonitorZ _res_constr;
+       _res_constr.datalen = *((uint32_t*)_res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKChannelMonitor), "LDKCVec_ChannelMonitorZ Elements");
+       else
+               _res_constr.data = NULL;
+       uint32_t* _res_vals = (uint32_t*)(_res + 4);
+       for (size_t q = 0; q < _res_constr.datalen; q++) {
+               uint32_t arr_conv_16 = _res_vals[q];
+               LDKChannelMonitor arr_conv_16_conv;
+               arr_conv_16_conv.inner = (void*)(arr_conv_16 & (~1));
+               arr_conv_16_conv.is_owned = (arr_conv_16 & 1) || (arr_conv_16 == 0);
+               _res_constr.data[q] = arr_conv_16_conv;
+       }
+       CVec_ChannelMonitorZ_free(_res_constr);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelManagerZ_new(int8_tArray a, uint32_t b) {
+       LDKThirtyTwoBytes a_ref;
+       CHECK(*((uint32_t*)a) == 32);
+       memcpy(a_ref.data, (uint8_t*)(a + 4), 32);
+       LDKChannelManager b_conv;
+       b_conv.inner = (void*)(b & (~1));
+       b_conv.is_owned = (b & 1) || (b == 0);
+       // Warning: we need a move here but no clone is available for LDKChannelManager
+       LDKC2Tuple_BlockHashChannelManagerZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelManagerZ), "LDKC2Tuple_BlockHashChannelManagerZ");
+       *ret_ref = C2Tuple_BlockHashChannelManagerZ_new(a_ref, b_conv);
+       return (long)ret_ref;
+}
+
+void  __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelManagerZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKC2Tuple_BlockHashChannelManagerZ _res_conv = *(LDKC2Tuple_BlockHashChannelManagerZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       C2Tuple_BlockHashChannelManagerZ_free(_res_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(uint32_t o) {
+       LDKC2Tuple_BlockHashChannelManagerZ o_conv = *(LDKC2Tuple_BlockHashChannelManagerZ*)(((uint64_t)o) & ~1);
+       FREE((void*)o);
+       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ");
+       *ret_conv = CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(uint32_t e) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(uint32_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ");
-       *ret_conv = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e_conv);
+       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ");
+       *ret_conv = CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res_conv = *(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res_conv = *(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res_conv);
+       CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res_conv);
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_u64u64Z_clone(uint32_t orig) {
@@ -4666,6 +6644,12 @@ uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_u64u64Z_clone(uint32
        return (long)ret_ref;
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_u64u64Z_new(int64_t a, int64_t b) {
+       LDKC2Tuple_u64u64Z* ret_ref = MALLOC(sizeof(LDKC2Tuple_u64u64Z), "LDKC2Tuple_u64u64Z");
+       *ret_ref = C2Tuple_u64u64Z_new(a, b);
+       return (long)ret_ref;
+}
+
 void  __attribute__((visibility("default"))) TS_C2Tuple_u64u64Z_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
        LDKC2Tuple_u64u64Z _res_conv = *(LDKC2Tuple_u64u64Z*)(((uint64_t)_res) & ~1);
@@ -4673,12 +6657,6 @@ void  __attribute__((visibility("default"))) TS_C2Tuple_u64u64Z_free(uint32_t _r
        C2Tuple_u64u64Z_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_u64u64Z_new(int64_t a, int64_t b) {
-       LDKC2Tuple_u64u64Z* ret_ref = MALLOC(sizeof(LDKC2Tuple_u64u64Z), "LDKC2Tuple_u64u64Z");
-       *ret_ref = C2Tuple_u64u64Z_new(a, b);
-       return (long)ret_ref;
-}
-
 uint32_t  __attribute__((visibility("default"))) TS_CResult_SpendableOutputDescriptorDecodeErrorZ_ok(uint32_t o) {
        LDKSpendableOutputDescriptor o_conv = *(LDKSpendableOutputDescriptor*)(((uint64_t)o) & ~1);
        FREE((void*)o);
@@ -4711,24 +6689,6 @@ uint32_t  __attribute__((visibility("default"))) TS_CResult_SpendableOutputDescr
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CVec_SignatureZ_free(ptrArray _res) {
-       LDKCVec_SignatureZ _res_constr;
-       _res_constr.datalen = *((uint32_t*)_res);
-       if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKSignature), "LDKCVec_SignatureZ Elements");
-       else
-               _res_constr.data = NULL;
-       int8_tArray* _res_vals = (int8_tArray*)(_res + 4);
-       for (size_t m = 0; m < _res_constr.datalen; m++) {
-               int8_tArray arr_conv_12 = _res_vals[m];
-               LDKSignature arr_conv_12_ref;
-               CHECK(*((uint32_t*)arr_conv_12) == 64);
-               memcpy(arr_conv_12_ref.compact_form, (uint8_t*)(arr_conv_12 + 4), 64);
-               _res_constr.data[m] = arr_conv_12_ref;
-       }
-       CVec_SignatureZ_free(_res_constr);
-}
-
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_SignatureCVec_SignatureZZ_clone(uint32_t orig) {
        LDKC2Tuple_SignatureCVec_SignatureZZ* orig_conv = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(orig & ~1);
        LDKC2Tuple_SignatureCVec_SignatureZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
@@ -4736,13 +6696,6 @@ uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_SignatureCVec_Signat
        return (long)ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_C2Tuple_SignatureCVec_SignatureZZ_free(uint32_t _res) {
-       if ((_res & 1) != 0) return;
-       LDKC2Tuple_SignatureCVec_SignatureZZ _res_conv = *(LDKC2Tuple_SignatureCVec_SignatureZZ*)(((uint64_t)_res) & ~1);
-       FREE((void*)_res);
-       C2Tuple_SignatureCVec_SignatureZZ_free(_res_conv);
-}
-
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_SignatureCVec_SignatureZZ_new(int8_tArray a, ptrArray b) {
        LDKSignature a_ref;
        CHECK(*((uint32_t*)a) == 64);
@@ -4766,6 +6719,13 @@ uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_SignatureCVec_Signat
        return (long)ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_C2Tuple_SignatureCVec_SignatureZZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKC2Tuple_SignatureCVec_SignatureZZ _res_conv = *(LDKC2Tuple_SignatureCVec_SignatureZZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       C2Tuple_SignatureCVec_SignatureZZ_free(_res_conv);
+}
+
 uint32_t  __attribute__((visibility("default"))) TS_CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(uint32_t o) {
        LDKC2Tuple_SignatureCVec_SignatureZZ o_conv = *(LDKC2Tuple_SignatureCVec_SignatureZZ*)(((uint64_t)o) & ~1);
        FREE((void*)o);
@@ -4823,34 +6783,34 @@ uint32_t  __attribute__((visibility("default"))) TS_CResult_SignatureNoneZ_clone
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_ChanKeySignerDecodeErrorZ_ok(uint32_t o) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelKeysDecodeErrorZ_ok(uint32_t o) {
        LDKChannelKeys o_conv = *(LDKChannelKeys*)(((uint64_t)o) & ~1);
-       LDKCResult_ChanKeySignerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChanKeySignerDecodeErrorZ), "LDKCResult_ChanKeySignerDecodeErrorZ");
-       *ret_conv = CResult_ChanKeySignerDecodeErrorZ_ok(o_conv);
+       LDKCResult_ChannelKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelKeysDecodeErrorZ), "LDKCResult_ChannelKeysDecodeErrorZ");
+       *ret_conv = CResult_ChannelKeysDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_ChanKeySignerDecodeErrorZ_err(uint32_t e) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelKeysDecodeErrorZ_err(uint32_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_ChanKeySignerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChanKeySignerDecodeErrorZ), "LDKCResult_ChanKeySignerDecodeErrorZ");
-       *ret_conv = CResult_ChanKeySignerDecodeErrorZ_err(e_conv);
+       LDKCResult_ChannelKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelKeysDecodeErrorZ), "LDKCResult_ChannelKeysDecodeErrorZ");
+       *ret_conv = CResult_ChannelKeysDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_ChanKeySignerDecodeErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_ChannelKeysDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_ChanKeySignerDecodeErrorZ _res_conv = *(LDKCResult_ChanKeySignerDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_ChannelKeysDecodeErrorZ _res_conv = *(LDKCResult_ChannelKeysDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_ChanKeySignerDecodeErrorZ_free(_res_conv);
+       CResult_ChannelKeysDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_ChanKeySignerDecodeErrorZ_clone(uint32_t orig) {
-       LDKCResult_ChanKeySignerDecodeErrorZ* orig_conv = (LDKCResult_ChanKeySignerDecodeErrorZ*)(orig & ~1);
-       LDKCResult_ChanKeySignerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChanKeySignerDecodeErrorZ), "LDKCResult_ChanKeySignerDecodeErrorZ");
-       *ret_conv = CResult_ChanKeySignerDecodeErrorZ_clone(orig_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelKeysDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_ChannelKeysDecodeErrorZ* orig_conv = (LDKCResult_ChannelKeysDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ChannelKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelKeysDecodeErrorZ), "LDKCResult_ChannelKeysDecodeErrorZ");
+       *ret_conv = CResult_ChannelKeysDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
@@ -4881,182 +6841,144 @@ void  __attribute__((visibility("default"))) TS_CResult_InMemoryChannelKeysDecod
        CResult_InMemoryChannelKeysDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_TxOutAccessErrorZ_ok(uint32_t o) {
-       LDKTxOut o_conv = *(LDKTxOut*)(((uint64_t)o) & ~1);
-       FREE((void*)o);
-       LDKCResult_TxOutAccessErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxOutAccessErrorZ), "LDKCResult_TxOutAccessErrorZ");
-       *ret_conv = CResult_TxOutAccessErrorZ_ok(o_conv);
-       return (long)ret_conv;
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_CResult_TxOutAccessErrorZ_err(uint32_t e) {
-       LDKAccessError e_conv = LDKAccessError_from_js(e);
-       LDKCResult_TxOutAccessErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxOutAccessErrorZ), "LDKCResult_TxOutAccessErrorZ");
-       *ret_conv = CResult_TxOutAccessErrorZ_err(e_conv);
-       return (long)ret_conv;
-}
-
-void  __attribute__((visibility("default"))) TS_CResult_TxOutAccessErrorZ_free(uint32_t _res) {
-       if ((_res & 1) != 0) return;
-       LDKCResult_TxOutAccessErrorZ _res_conv = *(LDKCResult_TxOutAccessErrorZ*)(((uint64_t)_res) & ~1);
-       FREE((void*)_res);
-       CResult_TxOutAccessErrorZ_free(_res_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_CResult_TxOutAccessErrorZ_clone(uint32_t orig) {
-       LDKCResult_TxOutAccessErrorZ* orig_conv = (LDKCResult_TxOutAccessErrorZ*)(orig & ~1);
-       LDKCResult_TxOutAccessErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxOutAccessErrorZ), "LDKCResult_TxOutAccessErrorZ");
-       *ret_conv = CResult_TxOutAccessErrorZ_clone(orig_conv);
-       return (long)ret_conv;
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_CResult_NoneAPIErrorZ_ok() {
-       LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
-       *ret_conv = CResult_NoneAPIErrorZ_ok();
-       return (long)ret_conv;
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_CResult_NoneAPIErrorZ_err(uint32_t e) {
-       LDKAPIError e_conv = *(LDKAPIError*)(((uint64_t)e) & ~1);
-       FREE((void*)e);
-       LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
-       *ret_conv = CResult_NoneAPIErrorZ_err(e_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_InMemoryChannelKeysDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_InMemoryChannelKeysDecodeErrorZ* orig_conv = (LDKCResult_InMemoryChannelKeysDecodeErrorZ*)(orig & ~1);
+       LDKCResult_InMemoryChannelKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InMemoryChannelKeysDecodeErrorZ), "LDKCResult_InMemoryChannelKeysDecodeErrorZ");
+       *ret_conv = CResult_InMemoryChannelKeysDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_NoneAPIErrorZ_free(uint32_t _res) {
-       if ((_res & 1) != 0) return;
-       LDKCResult_NoneAPIErrorZ _res_conv = *(LDKCResult_NoneAPIErrorZ*)(((uint64_t)_res) & ~1);
-       FREE((void*)_res);
-       CResult_NoneAPIErrorZ_free(_res_conv);
+void  __attribute__((visibility("default"))) TS_CVec_RouteHopZ_free(uint32_tArray _res) {
+       LDKCVec_RouteHopZ _res_constr;
+       _res_constr.datalen = *((uint32_t*)_res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKRouteHop), "LDKCVec_RouteHopZ Elements");
+       else
+               _res_constr.data = NULL;
+       uint32_t* _res_vals = (uint32_t*)(_res + 4);
+       for (size_t k = 0; k < _res_constr.datalen; k++) {
+               uint32_t arr_conv_10 = _res_vals[k];
+               LDKRouteHop arr_conv_10_conv;
+               arr_conv_10_conv.inner = (void*)(arr_conv_10 & (~1));
+               arr_conv_10_conv.is_owned = (arr_conv_10 & 1) || (arr_conv_10 == 0);
+               _res_constr.data[k] = arr_conv_10_conv;
+       }
+       CVec_RouteHopZ_free(_res_constr);
 }
 
-void  __attribute__((visibility("default"))) TS_CVec_ChannelDetailsZ_free(uint32_tArray _res) {
-       LDKCVec_ChannelDetailsZ _res_constr;
+void  __attribute__((visibility("default"))) TS_CVec_CVec_RouteHopZZ_free(ptrArray _res) {
+       LDKCVec_CVec_RouteHopZZ _res_constr;
        _res_constr.datalen = *((uint32_t*)_res);
        if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKChannelDetails), "LDKCVec_ChannelDetailsZ Elements");
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKCVec_RouteHopZ), "LDKCVec_CVec_RouteHopZZ Elements");
        else
                _res_constr.data = NULL;
-       uint32_t* _res_vals = (uint32_t*)(_res + 4);
-       for (size_t q = 0; q < _res_constr.datalen; q++) {
-               uint32_t arr_conv_16 = _res_vals[q];
-               LDKChannelDetails arr_conv_16_conv;
-               arr_conv_16_conv.inner = (void*)(arr_conv_16 & (~1));
-               arr_conv_16_conv.is_owned = (arr_conv_16 & 1) || (arr_conv_16 == 0);
-               _res_constr.data[q] = arr_conv_16_conv;
+       uint32_tArray* _res_vals = (uint32_tArray*)(_res + 4);
+       for (size_t m = 0; m < _res_constr.datalen; m++) {
+               uint32_tArray arr_conv_12 = _res_vals[m];
+               LDKCVec_RouteHopZ arr_conv_12_constr;
+               arr_conv_12_constr.datalen = *((uint32_t*)arr_conv_12);
+               if (arr_conv_12_constr.datalen > 0)
+                       arr_conv_12_constr.data = MALLOC(arr_conv_12_constr.datalen * sizeof(LDKRouteHop), "LDKCVec_RouteHopZ Elements");
+               else
+                       arr_conv_12_constr.data = NULL;
+               uint32_t* arr_conv_12_vals = (uint32_t*)(arr_conv_12 + 4);
+               for (size_t k = 0; k < arr_conv_12_constr.datalen; k++) {
+                       uint32_t arr_conv_10 = arr_conv_12_vals[k];
+                       LDKRouteHop arr_conv_10_conv;
+                       arr_conv_10_conv.inner = (void*)(arr_conv_10 & (~1));
+                       arr_conv_10_conv.is_owned = (arr_conv_10 & 1) || (arr_conv_10 == 0);
+                       arr_conv_12_constr.data[k] = arr_conv_10_conv;
+               }
+               _res_constr.data[m] = arr_conv_12_constr;
        }
-       CVec_ChannelDetailsZ_free(_res_constr);
+       CVec_CVec_RouteHopZZ_free(_res_constr);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_NonePaymentSendFailureZ_ok() {
-       LDKCResult_NonePaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePaymentSendFailureZ), "LDKCResult_NonePaymentSendFailureZ");
-       *ret_conv = CResult_NonePaymentSendFailureZ_ok();
+uint32_t  __attribute__((visibility("default"))) TS_CResult_RouteDecodeErrorZ_ok(uint32_t o) {
+       LDKRoute o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = Route_clone(&o_conv);
+       LDKCResult_RouteDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteDecodeErrorZ), "LDKCResult_RouteDecodeErrorZ");
+       *ret_conv = CResult_RouteDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_NonePaymentSendFailureZ_err(uint32_t e) {
-       LDKPaymentSendFailure e_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_RouteDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
-       e_conv = PaymentSendFailure_clone(&e_conv);
-       LDKCResult_NonePaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePaymentSendFailureZ), "LDKCResult_NonePaymentSendFailureZ");
-       *ret_conv = CResult_NonePaymentSendFailureZ_err(e_conv);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_RouteDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteDecodeErrorZ), "LDKCResult_RouteDecodeErrorZ");
+       *ret_conv = CResult_RouteDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_NonePaymentSendFailureZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_RouteDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_NonePaymentSendFailureZ _res_conv = *(LDKCResult_NonePaymentSendFailureZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_RouteDecodeErrorZ _res_conv = *(LDKCResult_RouteDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_NonePaymentSendFailureZ_free(_res_conv);
+       CResult_RouteDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_NonePaymentSendFailureZ_clone(uint32_t orig) {
-       LDKCResult_NonePaymentSendFailureZ* orig_conv = (LDKCResult_NonePaymentSendFailureZ*)(orig & ~1);
-       LDKCResult_NonePaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePaymentSendFailureZ), "LDKCResult_NonePaymentSendFailureZ");
-       *ret_conv = CResult_NonePaymentSendFailureZ_clone(orig_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_RouteDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_RouteDecodeErrorZ* orig_conv = (LDKCResult_RouteDecodeErrorZ*)(orig & ~1);
+       LDKCResult_RouteDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteDecodeErrorZ), "LDKCResult_RouteDecodeErrorZ");
+       *ret_conv = CResult_RouteDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CVec_NetAddressZ_free(uint32_tArray _res) {
-       LDKCVec_NetAddressZ _res_constr;
-       _res_constr.datalen = *((uint32_t*)_res);
-       if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKNetAddress), "LDKCVec_NetAddressZ Elements");
-       else
-               _res_constr.data = NULL;
-       uint32_t* _res_vals = (uint32_t*)(_res + 4);
-       for (size_t m = 0; m < _res_constr.datalen; m++) {
-               uint32_t arr_conv_12 = _res_vals[m];
-               LDKNetAddress arr_conv_12_conv = *(LDKNetAddress*)(((uint64_t)arr_conv_12) & ~1);
-               FREE((void*)arr_conv_12);
-               _res_constr.data[m] = arr_conv_12_conv;
-       }
-       CVec_NetAddressZ_free(_res_constr);
-}
-
-void  __attribute__((visibility("default"))) TS_CVec_ChannelMonitorZ_free(uint32_tArray _res) {
-       LDKCVec_ChannelMonitorZ _res_constr;
+void  __attribute__((visibility("default"))) TS_CVec_RouteHintZ_free(uint32_tArray _res) {
+       LDKCVec_RouteHintZ _res_constr;
        _res_constr.datalen = *((uint32_t*)_res);
        if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKChannelMonitor), "LDKCVec_ChannelMonitorZ Elements");
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKRouteHint), "LDKCVec_RouteHintZ Elements");
        else
                _res_constr.data = NULL;
        uint32_t* _res_vals = (uint32_t*)(_res + 4);
-       for (size_t q = 0; q < _res_constr.datalen; q++) {
-               uint32_t arr_conv_16 = _res_vals[q];
-               LDKChannelMonitor arr_conv_16_conv;
-               arr_conv_16_conv.inner = (void*)(arr_conv_16 & (~1));
-               arr_conv_16_conv.is_owned = (arr_conv_16 & 1) || (arr_conv_16 == 0);
-               _res_constr.data[q] = arr_conv_16_conv;
+       for (size_t l = 0; l < _res_constr.datalen; l++) {
+               uint32_t arr_conv_11 = _res_vals[l];
+               LDKRouteHint arr_conv_11_conv;
+               arr_conv_11_conv.inner = (void*)(arr_conv_11 & (~1));
+               arr_conv_11_conv.is_owned = (arr_conv_11 & 1) || (arr_conv_11 == 0);
+               _res_constr.data[l] = arr_conv_11_conv;
        }
-       CVec_ChannelMonitorZ_free(_res_constr);
-}
-
-void  __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelManagerZ_free(uint32_t _res) {
-       if ((_res & 1) != 0) return;
-       LDKC2Tuple_BlockHashChannelManagerZ _res_conv = *(LDKC2Tuple_BlockHashChannelManagerZ*)(((uint64_t)_res) & ~1);
-       FREE((void*)_res);
-       C2Tuple_BlockHashChannelManagerZ_free(_res_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelManagerZ_new(int8_tArray a, uint32_t b) {
-       LDKThirtyTwoBytes a_ref;
-       CHECK(*((uint32_t*)a) == 32);
-       memcpy(a_ref.data, (uint8_t*)(a + 4), 32);
-       LDKChannelManager b_conv;
-       b_conv.inner = (void*)(b & (~1));
-       b_conv.is_owned = (b & 1) || (b == 0);
-       // Warning: we need a move here but no clone is available for LDKChannelManager
-       LDKC2Tuple_BlockHashChannelManagerZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelManagerZ), "LDKC2Tuple_BlockHashChannelManagerZ");
-       *ret_ref = C2Tuple_BlockHashChannelManagerZ_new(a_ref, b_conv);
-       return (long)ret_ref;
+       CVec_RouteHintZ_free(_res_constr);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(uint32_t o) {
-       LDKC2Tuple_BlockHashChannelManagerZ o_conv = *(LDKC2Tuple_BlockHashChannelManagerZ*)(((uint64_t)o) & ~1);
-       FREE((void*)o);
-       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ");
-       *ret_conv = CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_RouteLightningErrorZ_ok(uint32_t o) {
+       LDKRoute o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = Route_clone(&o_conv);
+       LDKCResult_RouteLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteLightningErrorZ), "LDKCResult_RouteLightningErrorZ");
+       *ret_conv = CResult_RouteLightningErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(uint32_t e) {
-       LDKDecodeError e_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_RouteLightningErrorZ_err(uint32_t e) {
+       LDKLightningError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
-       e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ");
-       *ret_conv = CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e_conv);
+       e_conv = LightningError_clone(&e_conv);
+       LDKCResult_RouteLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteLightningErrorZ), "LDKCResult_RouteLightningErrorZ");
+       *ret_conv = CResult_RouteLightningErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_RouteLightningErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res_conv = *(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_RouteLightningErrorZ _res_conv = *(LDKCResult_RouteLightningErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res_conv);
+       CResult_RouteLightningErrorZ_free(_res_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_RouteLightningErrorZ_clone(uint32_t orig) {
+       LDKCResult_RouteLightningErrorZ* orig_conv = (LDKCResult_RouteLightningErrorZ*)(orig & ~1);
+       LDKCResult_RouteLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteLightningErrorZ), "LDKCResult_RouteLightningErrorZ");
+       *ret_conv = CResult_RouteLightningErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_CResult_NetAddressu8Z_ok(uint32_t o) {
@@ -5112,19 +7034,11 @@ void  __attribute__((visibility("default"))) TS_CResult_CResult_NetAddressu8ZDec
        CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res_conv);
 }
 
-void  __attribute__((visibility("default"))) TS_CVec_u64Z_free(int64_tArray _res) {
-       LDKCVec_u64Z _res_constr;
-       _res_constr.datalen = *((uint32_t*)_res);
-       if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(int64_t), "LDKCVec_u64Z Elements");
-       else
-               _res_constr.data = NULL;
-       int64_t* _res_vals = (int64_t*)(_res + 4);
-       for (size_t i = 0; i < _res_constr.datalen; i++) {
-               int64_t arr_conv_8 = _res_vals[i];
-               _res_constr.data[i] = arr_conv_8;
-       }
-       CVec_u64Z_free(_res_constr);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_CResult_NetAddressu8ZDecodeErrorZ* orig_conv = (LDKCResult_CResult_NetAddressu8ZDecodeErrorZ*)(orig & ~1);
+       LDKCResult_CResult_NetAddressu8ZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CResult_NetAddressu8ZDecodeErrorZ), "LDKCResult_CResult_NetAddressu8ZDecodeErrorZ");
+       *ret_conv = CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
 void  __attribute__((visibility("default"))) TS_CVec_UpdateAddHTLCZ_free(uint32_tArray _res) {
@@ -5199,123 +7113,71 @@ void  __attribute__((visibility("default"))) TS_CVec_UpdateFailMalformedHTLCZ_fr
        CVec_UpdateFailMalformedHTLCZ_free(_res_constr);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_boolLightningErrorZ_ok(jboolean o) {
-       LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
-       *ret_conv = CResult_boolLightningErrorZ_ok(o);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_AcceptChannelDecodeErrorZ_ok(uint32_t o) {
+       LDKAcceptChannel o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = AcceptChannel_clone(&o_conv);
+       LDKCResult_AcceptChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AcceptChannelDecodeErrorZ), "LDKCResult_AcceptChannelDecodeErrorZ");
+       *ret_conv = CResult_AcceptChannelDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_boolLightningErrorZ_err(uint32_t e) {
-       LDKLightningError e_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_AcceptChannelDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
-       e_conv = LightningError_clone(&e_conv);
-       LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
-       *ret_conv = CResult_boolLightningErrorZ_err(e_conv);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_AcceptChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AcceptChannelDecodeErrorZ), "LDKCResult_AcceptChannelDecodeErrorZ");
+       *ret_conv = CResult_AcceptChannelDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_boolLightningErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_AcceptChannelDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_boolLightningErrorZ _res_conv = *(LDKCResult_boolLightningErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_AcceptChannelDecodeErrorZ _res_conv = *(LDKCResult_AcceptChannelDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_boolLightningErrorZ_free(_res_conv);
+       CResult_AcceptChannelDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_boolLightningErrorZ_clone(uint32_t orig) {
-       LDKCResult_boolLightningErrorZ* orig_conv = (LDKCResult_boolLightningErrorZ*)(orig & ~1);
-       LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
-       *ret_conv = CResult_boolLightningErrorZ_clone(orig_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_AcceptChannelDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_AcceptChannelDecodeErrorZ* orig_conv = (LDKCResult_AcceptChannelDecodeErrorZ*)(orig & ~1);
+       LDKCResult_AcceptChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AcceptChannelDecodeErrorZ), "LDKCResult_AcceptChannelDecodeErrorZ");
+       *ret_conv = CResult_AcceptChannelDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(uint32_t _res) {
-       if ((_res & 1) != 0) return;
-       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)_res) & ~1);
-       FREE((void*)_res);
-       C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(uint32_t a, uint32_t b, uint32_t c) {
-       LDKChannelAnnouncement a_conv;
-       a_conv.inner = (void*)(a & (~1));
-       a_conv.is_owned = (a & 1) || (a == 0);
-       a_conv = ChannelAnnouncement_clone(&a_conv);
-       LDKChannelUpdate b_conv;
-       b_conv.inner = (void*)(b & (~1));
-       b_conv.is_owned = (b & 1) || (b == 0);
-       b_conv = ChannelUpdate_clone(&b_conv);
-       LDKChannelUpdate c_conv;
-       c_conv.inner = (void*)(c & (~1));
-       c_conv.is_owned = (c & 1) || (c == 0);
-       c_conv = ChannelUpdate_clone(&c_conv);
-       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
-       *ret_ref = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a_conv, b_conv, c_conv);
-       return (long)ret_ref;
-}
-
-void  __attribute__((visibility("default"))) TS_CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(uint32_tArray _res) {
-       LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res_constr;
-       _res_constr.datalen = *((uint32_t*)_res);
-       if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ Elements");
-       else
-               _res_constr.data = NULL;
-       uint32_t* _res_vals = (uint32_t*)(_res + 4);
-       for (size_t l = 0; l < _res_constr.datalen; l++) {
-               uint32_t arr_conv_63 = _res_vals[l];
-               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ arr_conv_63_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)arr_conv_63) & ~1);
-               FREE((void*)arr_conv_63);
-               _res_constr.data[l] = arr_conv_63_conv;
-       }
-       CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res_constr);
-}
-
-void  __attribute__((visibility("default"))) TS_CVec_NodeAnnouncementZ_free(uint32_tArray _res) {
-       LDKCVec_NodeAnnouncementZ _res_constr;
-       _res_constr.datalen = *((uint32_t*)_res);
-       if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKNodeAnnouncement), "LDKCVec_NodeAnnouncementZ Elements");
-       else
-               _res_constr.data = NULL;
-       uint32_t* _res_vals = (uint32_t*)(_res + 4);
-       for (size_t s = 0; s < _res_constr.datalen; s++) {
-               uint32_t arr_conv_18 = _res_vals[s];
-               LDKNodeAnnouncement arr_conv_18_conv;
-               arr_conv_18_conv.inner = (void*)(arr_conv_18 & (~1));
-               arr_conv_18_conv.is_owned = (arr_conv_18 & 1) || (arr_conv_18 == 0);
-               _res_constr.data[s] = arr_conv_18_conv;
-       }
-       CVec_NodeAnnouncementZ_free(_res_constr);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_CResult_NoneLightningErrorZ_ok() {
-       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
-       *ret_conv = CResult_NoneLightningErrorZ_ok();
+uint32_t  __attribute__((visibility("default"))) TS_CResult_AnnouncementSignaturesDecodeErrorZ_ok(uint32_t o) {
+       LDKAnnouncementSignatures o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = AnnouncementSignatures_clone(&o_conv);
+       LDKCResult_AnnouncementSignaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AnnouncementSignaturesDecodeErrorZ), "LDKCResult_AnnouncementSignaturesDecodeErrorZ");
+       *ret_conv = CResult_AnnouncementSignaturesDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_NoneLightningErrorZ_err(uint32_t e) {
-       LDKLightningError e_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_AnnouncementSignaturesDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
-       e_conv = LightningError_clone(&e_conv);
-       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
-       *ret_conv = CResult_NoneLightningErrorZ_err(e_conv);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_AnnouncementSignaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AnnouncementSignaturesDecodeErrorZ), "LDKCResult_AnnouncementSignaturesDecodeErrorZ");
+       *ret_conv = CResult_AnnouncementSignaturesDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_NoneLightningErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_AnnouncementSignaturesDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_NoneLightningErrorZ _res_conv = *(LDKCResult_NoneLightningErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_AnnouncementSignaturesDecodeErrorZ _res_conv = *(LDKCResult_AnnouncementSignaturesDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_NoneLightningErrorZ_free(_res_conv);
+       CResult_AnnouncementSignaturesDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_NoneLightningErrorZ_clone(uint32_t orig) {
-       LDKCResult_NoneLightningErrorZ* orig_conv = (LDKCResult_NoneLightningErrorZ*)(orig & ~1);
-       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
-       *ret_conv = CResult_NoneLightningErrorZ_clone(orig_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_AnnouncementSignaturesDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_AnnouncementSignaturesDecodeErrorZ* orig_conv = (LDKCResult_AnnouncementSignaturesDecodeErrorZ*)(orig & ~1);
+       LDKCResult_AnnouncementSignaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AnnouncementSignaturesDecodeErrorZ), "LDKCResult_AnnouncementSignaturesDecodeErrorZ");
+       *ret_conv = CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
@@ -5346,822 +7208,963 @@ void  __attribute__((visibility("default"))) TS_CResult_ChannelReestablishDecode
        CResult_ChannelReestablishDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_InitDecodeErrorZ_ok(uint32_t o) {
-       LDKInit o_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelReestablishDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_ChannelReestablishDecodeErrorZ* orig_conv = (LDKCResult_ChannelReestablishDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ChannelReestablishDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelReestablishDecodeErrorZ), "LDKCResult_ChannelReestablishDecodeErrorZ");
+       *ret_conv = CResult_ChannelReestablishDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ClosingSignedDecodeErrorZ_ok(uint32_t o) {
+       LDKClosingSigned o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = Init_clone(&o_conv);
-       LDKCResult_InitDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitDecodeErrorZ), "LDKCResult_InitDecodeErrorZ");
-       *ret_conv = CResult_InitDecodeErrorZ_ok(o_conv);
+       o_conv = ClosingSigned_clone(&o_conv);
+       LDKCResult_ClosingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ClosingSignedDecodeErrorZ), "LDKCResult_ClosingSignedDecodeErrorZ");
+       *ret_conv = CResult_ClosingSignedDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_InitDecodeErrorZ_err(uint32_t e) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ClosingSignedDecodeErrorZ_err(uint32_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_InitDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitDecodeErrorZ), "LDKCResult_InitDecodeErrorZ");
-       *ret_conv = CResult_InitDecodeErrorZ_err(e_conv);
+       LDKCResult_ClosingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ClosingSignedDecodeErrorZ), "LDKCResult_ClosingSignedDecodeErrorZ");
+       *ret_conv = CResult_ClosingSignedDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_InitDecodeErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_ClosingSignedDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_InitDecodeErrorZ _res_conv = *(LDKCResult_InitDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_ClosingSignedDecodeErrorZ _res_conv = *(LDKCResult_ClosingSignedDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_InitDecodeErrorZ_free(_res_conv);
+       CResult_ClosingSignedDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_PingDecodeErrorZ_ok(uint32_t o) {
-       LDKPing o_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ClosingSignedDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_ClosingSignedDecodeErrorZ* orig_conv = (LDKCResult_ClosingSignedDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ClosingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ClosingSignedDecodeErrorZ), "LDKCResult_ClosingSignedDecodeErrorZ");
+       *ret_conv = CResult_ClosingSignedDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_CommitmentSignedDecodeErrorZ_ok(uint32_t o) {
+       LDKCommitmentSigned o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = Ping_clone(&o_conv);
-       LDKCResult_PingDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PingDecodeErrorZ), "LDKCResult_PingDecodeErrorZ");
-       *ret_conv = CResult_PingDecodeErrorZ_ok(o_conv);
+       o_conv = CommitmentSigned_clone(&o_conv);
+       LDKCResult_CommitmentSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentSignedDecodeErrorZ), "LDKCResult_CommitmentSignedDecodeErrorZ");
+       *ret_conv = CResult_CommitmentSignedDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_PingDecodeErrorZ_err(uint32_t e) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_CommitmentSignedDecodeErrorZ_err(uint32_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_PingDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PingDecodeErrorZ), "LDKCResult_PingDecodeErrorZ");
-       *ret_conv = CResult_PingDecodeErrorZ_err(e_conv);
+       LDKCResult_CommitmentSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentSignedDecodeErrorZ), "LDKCResult_CommitmentSignedDecodeErrorZ");
+       *ret_conv = CResult_CommitmentSignedDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_PingDecodeErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_CommitmentSignedDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_PingDecodeErrorZ _res_conv = *(LDKCResult_PingDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_CommitmentSignedDecodeErrorZ _res_conv = *(LDKCResult_CommitmentSignedDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_PingDecodeErrorZ_free(_res_conv);
+       CResult_CommitmentSignedDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_PongDecodeErrorZ_ok(uint32_t o) {
-       LDKPong o_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_CommitmentSignedDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_CommitmentSignedDecodeErrorZ* orig_conv = (LDKCResult_CommitmentSignedDecodeErrorZ*)(orig & ~1);
+       LDKCResult_CommitmentSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentSignedDecodeErrorZ), "LDKCResult_CommitmentSignedDecodeErrorZ");
+       *ret_conv = CResult_CommitmentSignedDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_FundingCreatedDecodeErrorZ_ok(uint32_t o) {
+       LDKFundingCreated o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = Pong_clone(&o_conv);
-       LDKCResult_PongDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PongDecodeErrorZ), "LDKCResult_PongDecodeErrorZ");
-       *ret_conv = CResult_PongDecodeErrorZ_ok(o_conv);
+       o_conv = FundingCreated_clone(&o_conv);
+       LDKCResult_FundingCreatedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingCreatedDecodeErrorZ), "LDKCResult_FundingCreatedDecodeErrorZ");
+       *ret_conv = CResult_FundingCreatedDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_PongDecodeErrorZ_err(uint32_t e) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_FundingCreatedDecodeErrorZ_err(uint32_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_PongDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PongDecodeErrorZ), "LDKCResult_PongDecodeErrorZ");
-       *ret_conv = CResult_PongDecodeErrorZ_err(e_conv);
+       LDKCResult_FundingCreatedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingCreatedDecodeErrorZ), "LDKCResult_FundingCreatedDecodeErrorZ");
+       *ret_conv = CResult_FundingCreatedDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_PongDecodeErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_FundingCreatedDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_PongDecodeErrorZ _res_conv = *(LDKCResult_PongDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_FundingCreatedDecodeErrorZ _res_conv = *(LDKCResult_FundingCreatedDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_PongDecodeErrorZ_free(_res_conv);
+       CResult_FundingCreatedDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(uint32_t o) {
-       LDKUnsignedChannelAnnouncement o_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_FundingCreatedDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_FundingCreatedDecodeErrorZ* orig_conv = (LDKCResult_FundingCreatedDecodeErrorZ*)(orig & ~1);
+       LDKCResult_FundingCreatedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingCreatedDecodeErrorZ), "LDKCResult_FundingCreatedDecodeErrorZ");
+       *ret_conv = CResult_FundingCreatedDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_FundingSignedDecodeErrorZ_ok(uint32_t o) {
+       LDKFundingSigned o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = UnsignedChannelAnnouncement_clone(&o_conv);
-       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ), "LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ");
-       *ret_conv = CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o_conv);
+       o_conv = FundingSigned_clone(&o_conv);
+       LDKCResult_FundingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingSignedDecodeErrorZ), "LDKCResult_FundingSignedDecodeErrorZ");
+       *ret_conv = CResult_FundingSignedDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(uint32_t e) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_FundingSignedDecodeErrorZ_err(uint32_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ), "LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ");
-       *ret_conv = CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e_conv);
+       LDKCResult_FundingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingSignedDecodeErrorZ), "LDKCResult_FundingSignedDecodeErrorZ");
+       *ret_conv = CResult_FundingSignedDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_FundingSignedDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res_conv = *(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_FundingSignedDecodeErrorZ _res_conv = *(LDKCResult_FundingSignedDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res_conv);
+       CResult_FundingSignedDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_UnsignedChannelUpdateDecodeErrorZ_ok(uint32_t o) {
-       LDKUnsignedChannelUpdate o_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_FundingSignedDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_FundingSignedDecodeErrorZ* orig_conv = (LDKCResult_FundingSignedDecodeErrorZ*)(orig & ~1);
+       LDKCResult_FundingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingSignedDecodeErrorZ), "LDKCResult_FundingSignedDecodeErrorZ");
+       *ret_conv = CResult_FundingSignedDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_FundingLockedDecodeErrorZ_ok(uint32_t o) {
+       LDKFundingLocked o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = UnsignedChannelUpdate_clone(&o_conv);
-       LDKCResult_UnsignedChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelUpdateDecodeErrorZ), "LDKCResult_UnsignedChannelUpdateDecodeErrorZ");
-       *ret_conv = CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o_conv);
+       o_conv = FundingLocked_clone(&o_conv);
+       LDKCResult_FundingLockedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingLockedDecodeErrorZ), "LDKCResult_FundingLockedDecodeErrorZ");
+       *ret_conv = CResult_FundingLockedDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_UnsignedChannelUpdateDecodeErrorZ_err(uint32_t e) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_FundingLockedDecodeErrorZ_err(uint32_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_UnsignedChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelUpdateDecodeErrorZ), "LDKCResult_UnsignedChannelUpdateDecodeErrorZ");
-       *ret_conv = CResult_UnsignedChannelUpdateDecodeErrorZ_err(e_conv);
+       LDKCResult_FundingLockedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingLockedDecodeErrorZ), "LDKCResult_FundingLockedDecodeErrorZ");
+       *ret_conv = CResult_FundingLockedDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_UnsignedChannelUpdateDecodeErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_FundingLockedDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res_conv = *(LDKCResult_UnsignedChannelUpdateDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_FundingLockedDecodeErrorZ _res_conv = *(LDKCResult_FundingLockedDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res_conv);
+       CResult_FundingLockedDecodeErrorZ_free(_res_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_FundingLockedDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_FundingLockedDecodeErrorZ* orig_conv = (LDKCResult_FundingLockedDecodeErrorZ*)(orig & ~1);
+       LDKCResult_FundingLockedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingLockedDecodeErrorZ), "LDKCResult_FundingLockedDecodeErrorZ");
+       *ret_conv = CResult_FundingLockedDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_InitDecodeErrorZ_ok(uint32_t o) {
+       LDKInit o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = Init_clone(&o_conv);
+       LDKCResult_InitDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitDecodeErrorZ), "LDKCResult_InitDecodeErrorZ");
+       *ret_conv = CResult_InitDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_InitDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_InitDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitDecodeErrorZ), "LDKCResult_InitDecodeErrorZ");
+       *ret_conv = CResult_InitDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+void  __attribute__((visibility("default"))) TS_CResult_InitDecodeErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_InitDecodeErrorZ _res_conv = *(LDKCResult_InitDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_InitDecodeErrorZ_free(_res_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_InitDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_InitDecodeErrorZ* orig_conv = (LDKCResult_InitDecodeErrorZ*)(orig & ~1);
+       LDKCResult_InitDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitDecodeErrorZ), "LDKCResult_InitDecodeErrorZ");
+       *ret_conv = CResult_InitDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_OpenChannelDecodeErrorZ_ok(uint32_t o) {
+       LDKOpenChannel o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = OpenChannel_clone(&o_conv);
+       LDKCResult_OpenChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OpenChannelDecodeErrorZ), "LDKCResult_OpenChannelDecodeErrorZ");
+       *ret_conv = CResult_OpenChannelDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_OpenChannelDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_OpenChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OpenChannelDecodeErrorZ), "LDKCResult_OpenChannelDecodeErrorZ");
+       *ret_conv = CResult_OpenChannelDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+void  __attribute__((visibility("default"))) TS_CResult_OpenChannelDecodeErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_OpenChannelDecodeErrorZ _res_conv = *(LDKCResult_OpenChannelDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_OpenChannelDecodeErrorZ_free(_res_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_OpenChannelDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_OpenChannelDecodeErrorZ* orig_conv = (LDKCResult_OpenChannelDecodeErrorZ*)(orig & ~1);
+       LDKCResult_OpenChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OpenChannelDecodeErrorZ), "LDKCResult_OpenChannelDecodeErrorZ");
+       *ret_conv = CResult_OpenChannelDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_ErrorMessageDecodeErrorZ_ok(uint32_t o) {
-       LDKErrorMessage o_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_RevokeAndACKDecodeErrorZ_ok(uint32_t o) {
+       LDKRevokeAndACK o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = ErrorMessage_clone(&o_conv);
-       LDKCResult_ErrorMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ErrorMessageDecodeErrorZ), "LDKCResult_ErrorMessageDecodeErrorZ");
-       *ret_conv = CResult_ErrorMessageDecodeErrorZ_ok(o_conv);
+       o_conv = RevokeAndACK_clone(&o_conv);
+       LDKCResult_RevokeAndACKDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RevokeAndACKDecodeErrorZ), "LDKCResult_RevokeAndACKDecodeErrorZ");
+       *ret_conv = CResult_RevokeAndACKDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_ErrorMessageDecodeErrorZ_err(uint32_t e) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_RevokeAndACKDecodeErrorZ_err(uint32_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_ErrorMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ErrorMessageDecodeErrorZ), "LDKCResult_ErrorMessageDecodeErrorZ");
-       *ret_conv = CResult_ErrorMessageDecodeErrorZ_err(e_conv);
+       LDKCResult_RevokeAndACKDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RevokeAndACKDecodeErrorZ), "LDKCResult_RevokeAndACKDecodeErrorZ");
+       *ret_conv = CResult_RevokeAndACKDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_ErrorMessageDecodeErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_RevokeAndACKDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_ErrorMessageDecodeErrorZ _res_conv = *(LDKCResult_ErrorMessageDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_RevokeAndACKDecodeErrorZ _res_conv = *(LDKCResult_RevokeAndACKDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_ErrorMessageDecodeErrorZ_free(_res_conv);
+       CResult_RevokeAndACKDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(uint32_t o) {
-       LDKUnsignedNodeAnnouncement o_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_RevokeAndACKDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_RevokeAndACKDecodeErrorZ* orig_conv = (LDKCResult_RevokeAndACKDecodeErrorZ*)(orig & ~1);
+       LDKCResult_RevokeAndACKDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RevokeAndACKDecodeErrorZ), "LDKCResult_RevokeAndACKDecodeErrorZ");
+       *ret_conv = CResult_RevokeAndACKDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ShutdownDecodeErrorZ_ok(uint32_t o) {
+       LDKShutdown o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = UnsignedNodeAnnouncement_clone(&o_conv);
-       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ), "LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ");
-       *ret_conv = CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o_conv);
+       o_conv = Shutdown_clone(&o_conv);
+       LDKCResult_ShutdownDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ShutdownDecodeErrorZ), "LDKCResult_ShutdownDecodeErrorZ");
+       *ret_conv = CResult_ShutdownDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(uint32_t e) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ShutdownDecodeErrorZ_err(uint32_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ), "LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ");
-       *ret_conv = CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e_conv);
+       LDKCResult_ShutdownDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ShutdownDecodeErrorZ), "LDKCResult_ShutdownDecodeErrorZ");
+       *ret_conv = CResult_ShutdownDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_ShutdownDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res_conv = *(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_ShutdownDecodeErrorZ _res_conv = *(LDKCResult_ShutdownDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res_conv);
+       CResult_ShutdownDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_QueryShortChannelIdsDecodeErrorZ_ok(uint32_t o) {
-       LDKQueryShortChannelIds o_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ShutdownDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_ShutdownDecodeErrorZ* orig_conv = (LDKCResult_ShutdownDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ShutdownDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ShutdownDecodeErrorZ), "LDKCResult_ShutdownDecodeErrorZ");
+       *ret_conv = CResult_ShutdownDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UpdateFailHTLCDecodeErrorZ_ok(uint32_t o) {
+       LDKUpdateFailHTLC o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = QueryShortChannelIds_clone(&o_conv);
-       LDKCResult_QueryShortChannelIdsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryShortChannelIdsDecodeErrorZ), "LDKCResult_QueryShortChannelIdsDecodeErrorZ");
-       *ret_conv = CResult_QueryShortChannelIdsDecodeErrorZ_ok(o_conv);
+       o_conv = UpdateFailHTLC_clone(&o_conv);
+       LDKCResult_UpdateFailHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailHTLCDecodeErrorZ), "LDKCResult_UpdateFailHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateFailHTLCDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_QueryShortChannelIdsDecodeErrorZ_err(uint32_t e) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UpdateFailHTLCDecodeErrorZ_err(uint32_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_QueryShortChannelIdsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryShortChannelIdsDecodeErrorZ), "LDKCResult_QueryShortChannelIdsDecodeErrorZ");
-       *ret_conv = CResult_QueryShortChannelIdsDecodeErrorZ_err(e_conv);
+       LDKCResult_UpdateFailHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailHTLCDecodeErrorZ), "LDKCResult_UpdateFailHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateFailHTLCDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_QueryShortChannelIdsDecodeErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_UpdateFailHTLCDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_QueryShortChannelIdsDecodeErrorZ _res_conv = *(LDKCResult_QueryShortChannelIdsDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_UpdateFailHTLCDecodeErrorZ _res_conv = *(LDKCResult_UpdateFailHTLCDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_QueryShortChannelIdsDecodeErrorZ_free(_res_conv);
+       CResult_UpdateFailHTLCDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(uint32_t o) {
-       LDKReplyShortChannelIdsEnd o_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UpdateFailHTLCDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_UpdateFailHTLCDecodeErrorZ* orig_conv = (LDKCResult_UpdateFailHTLCDecodeErrorZ*)(orig & ~1);
+       LDKCResult_UpdateFailHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailHTLCDecodeErrorZ), "LDKCResult_UpdateFailHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateFailHTLCDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(uint32_t o) {
+       LDKUpdateFailMalformedHTLC o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = ReplyShortChannelIdsEnd_clone(&o_conv);
-       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ), "LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ");
-       *ret_conv = CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o_conv);
+       o_conv = UpdateFailMalformedHTLC_clone(&o_conv);
+       LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ), "LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(uint32_t e) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(uint32_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ), "LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ");
-       *ret_conv = CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e_conv);
+       LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ), "LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res_conv = *(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ _res_conv = *(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res_conv);
+       CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_QueryChannelRangeDecodeErrorZ_ok(uint32_t o) {
-       LDKQueryChannelRange o_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ* orig_conv = (LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ*)(orig & ~1);
+       LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ), "LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UpdateFeeDecodeErrorZ_ok(uint32_t o) {
+       LDKUpdateFee o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = QueryChannelRange_clone(&o_conv);
-       LDKCResult_QueryChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryChannelRangeDecodeErrorZ), "LDKCResult_QueryChannelRangeDecodeErrorZ");
-       *ret_conv = CResult_QueryChannelRangeDecodeErrorZ_ok(o_conv);
+       o_conv = UpdateFee_clone(&o_conv);
+       LDKCResult_UpdateFeeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFeeDecodeErrorZ), "LDKCResult_UpdateFeeDecodeErrorZ");
+       *ret_conv = CResult_UpdateFeeDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_QueryChannelRangeDecodeErrorZ_err(uint32_t e) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UpdateFeeDecodeErrorZ_err(uint32_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_QueryChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryChannelRangeDecodeErrorZ), "LDKCResult_QueryChannelRangeDecodeErrorZ");
-       *ret_conv = CResult_QueryChannelRangeDecodeErrorZ_err(e_conv);
+       LDKCResult_UpdateFeeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFeeDecodeErrorZ), "LDKCResult_UpdateFeeDecodeErrorZ");
+       *ret_conv = CResult_UpdateFeeDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_QueryChannelRangeDecodeErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_UpdateFeeDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_QueryChannelRangeDecodeErrorZ _res_conv = *(LDKCResult_QueryChannelRangeDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_UpdateFeeDecodeErrorZ _res_conv = *(LDKCResult_UpdateFeeDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_QueryChannelRangeDecodeErrorZ_free(_res_conv);
+       CResult_UpdateFeeDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_ReplyChannelRangeDecodeErrorZ_ok(uint32_t o) {
-       LDKReplyChannelRange o_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UpdateFeeDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_UpdateFeeDecodeErrorZ* orig_conv = (LDKCResult_UpdateFeeDecodeErrorZ*)(orig & ~1);
+       LDKCResult_UpdateFeeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFeeDecodeErrorZ), "LDKCResult_UpdateFeeDecodeErrorZ");
+       *ret_conv = CResult_UpdateFeeDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UpdateFulfillHTLCDecodeErrorZ_ok(uint32_t o) {
+       LDKUpdateFulfillHTLC o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = ReplyChannelRange_clone(&o_conv);
-       LDKCResult_ReplyChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyChannelRangeDecodeErrorZ), "LDKCResult_ReplyChannelRangeDecodeErrorZ");
-       *ret_conv = CResult_ReplyChannelRangeDecodeErrorZ_ok(o_conv);
+       o_conv = UpdateFulfillHTLC_clone(&o_conv);
+       LDKCResult_UpdateFulfillHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFulfillHTLCDecodeErrorZ), "LDKCResult_UpdateFulfillHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_ReplyChannelRangeDecodeErrorZ_err(uint32_t e) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UpdateFulfillHTLCDecodeErrorZ_err(uint32_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_ReplyChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyChannelRangeDecodeErrorZ), "LDKCResult_ReplyChannelRangeDecodeErrorZ");
-       *ret_conv = CResult_ReplyChannelRangeDecodeErrorZ_err(e_conv);
+       LDKCResult_UpdateFulfillHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFulfillHTLCDecodeErrorZ), "LDKCResult_UpdateFulfillHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateFulfillHTLCDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_ReplyChannelRangeDecodeErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_UpdateFulfillHTLCDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_ReplyChannelRangeDecodeErrorZ _res_conv = *(LDKCResult_ReplyChannelRangeDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_UpdateFulfillHTLCDecodeErrorZ _res_conv = *(LDKCResult_UpdateFulfillHTLCDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_ReplyChannelRangeDecodeErrorZ_free(_res_conv);
+       CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_GossipTimestampFilterDecodeErrorZ_ok(uint32_t o) {
-       LDKGossipTimestampFilter o_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UpdateFulfillHTLCDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_UpdateFulfillHTLCDecodeErrorZ* orig_conv = (LDKCResult_UpdateFulfillHTLCDecodeErrorZ*)(orig & ~1);
+       LDKCResult_UpdateFulfillHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFulfillHTLCDecodeErrorZ), "LDKCResult_UpdateFulfillHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UpdateAddHTLCDecodeErrorZ_ok(uint32_t o) {
+       LDKUpdateAddHTLC o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = GossipTimestampFilter_clone(&o_conv);
-       LDKCResult_GossipTimestampFilterDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_GossipTimestampFilterDecodeErrorZ), "LDKCResult_GossipTimestampFilterDecodeErrorZ");
-       *ret_conv = CResult_GossipTimestampFilterDecodeErrorZ_ok(o_conv);
+       o_conv = UpdateAddHTLC_clone(&o_conv);
+       LDKCResult_UpdateAddHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateAddHTLCDecodeErrorZ), "LDKCResult_UpdateAddHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateAddHTLCDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_GossipTimestampFilterDecodeErrorZ_err(uint32_t e) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UpdateAddHTLCDecodeErrorZ_err(uint32_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_GossipTimestampFilterDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_GossipTimestampFilterDecodeErrorZ), "LDKCResult_GossipTimestampFilterDecodeErrorZ");
-       *ret_conv = CResult_GossipTimestampFilterDecodeErrorZ_err(e_conv);
+       LDKCResult_UpdateAddHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateAddHTLCDecodeErrorZ), "LDKCResult_UpdateAddHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateAddHTLCDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_GossipTimestampFilterDecodeErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_UpdateAddHTLCDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_GossipTimestampFilterDecodeErrorZ _res_conv = *(LDKCResult_GossipTimestampFilterDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_UpdateAddHTLCDecodeErrorZ _res_conv = *(LDKCResult_UpdateAddHTLCDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_GossipTimestampFilterDecodeErrorZ_free(_res_conv);
-}
-
-void  __attribute__((visibility("default"))) TS_CVec_PublicKeyZ_free(ptrArray _res) {
-       LDKCVec_PublicKeyZ _res_constr;
-       _res_constr.datalen = *((uint32_t*)_res);
-       if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKPublicKey), "LDKCVec_PublicKeyZ Elements");
-       else
-               _res_constr.data = NULL;
-       int8_tArray* _res_vals = (int8_tArray*)(_res + 4);
-       for (size_t m = 0; m < _res_constr.datalen; m++) {
-               int8_tArray arr_conv_12 = _res_vals[m];
-               LDKPublicKey arr_conv_12_ref;
-               CHECK(*((uint32_t*)arr_conv_12) == 33);
-               memcpy(arr_conv_12_ref.compressed_form, (uint8_t*)(arr_conv_12 + 4), 33);
-               _res_constr.data[m] = arr_conv_12_ref;
-       }
-       CVec_PublicKeyZ_free(_res_constr);
+       CResult_UpdateAddHTLCDecodeErrorZ_free(_res_conv);
 }
 
-void  __attribute__((visibility("default"))) TS_CVec_u8Z_free(int8_tArray _res) {
-       LDKCVec_u8Z _res_ref;
-       _res_ref.datalen = *((uint32_t*)_res);
-       _res_ref.data = MALLOC(_res_ref.datalen, "LDKCVec_u8Z Bytes");
-       memcpy(_res_ref.data, (uint8_t*)(_res + 4), _res_ref.datalen);
-       CVec_u8Z_free(_res_ref);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UpdateAddHTLCDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_UpdateAddHTLCDecodeErrorZ* orig_conv = (LDKCResult_UpdateAddHTLCDecodeErrorZ*)(orig & ~1);
+       LDKCResult_UpdateAddHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateAddHTLCDecodeErrorZ), "LDKCResult_UpdateAddHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateAddHTLCDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_CVec_u8ZPeerHandleErrorZ_ok(int8_tArray o) {
-       LDKCVec_u8Z o_ref;
-       o_ref.datalen = *((uint32_t*)o);
-       o_ref.data = MALLOC(o_ref.datalen, "LDKCVec_u8Z Bytes");
-       memcpy(o_ref.data, (uint8_t*)(o + 4), o_ref.datalen);
-       LDKCResult_CVec_u8ZPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_u8ZPeerHandleErrorZ), "LDKCResult_CVec_u8ZPeerHandleErrorZ");
-       *ret_conv = CResult_CVec_u8ZPeerHandleErrorZ_ok(o_ref);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_PingDecodeErrorZ_ok(uint32_t o) {
+       LDKPing o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = Ping_clone(&o_conv);
+       LDKCResult_PingDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PingDecodeErrorZ), "LDKCResult_PingDecodeErrorZ");
+       *ret_conv = CResult_PingDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_CVec_u8ZPeerHandleErrorZ_err(uint32_t e) {
-       LDKPeerHandleError e_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_PingDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
-       e_conv = PeerHandleError_clone(&e_conv);
-       LDKCResult_CVec_u8ZPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_u8ZPeerHandleErrorZ), "LDKCResult_CVec_u8ZPeerHandleErrorZ");
-       *ret_conv = CResult_CVec_u8ZPeerHandleErrorZ_err(e_conv);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_PingDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PingDecodeErrorZ), "LDKCResult_PingDecodeErrorZ");
+       *ret_conv = CResult_PingDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_CVec_u8ZPeerHandleErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_PingDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_CVec_u8ZPeerHandleErrorZ _res_conv = *(LDKCResult_CVec_u8ZPeerHandleErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_PingDecodeErrorZ _res_conv = *(LDKCResult_PingDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_CVec_u8ZPeerHandleErrorZ_free(_res_conv);
+       CResult_PingDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_CVec_u8ZPeerHandleErrorZ_clone(uint32_t orig) {
-       LDKCResult_CVec_u8ZPeerHandleErrorZ* orig_conv = (LDKCResult_CVec_u8ZPeerHandleErrorZ*)(orig & ~1);
-       LDKCResult_CVec_u8ZPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_u8ZPeerHandleErrorZ), "LDKCResult_CVec_u8ZPeerHandleErrorZ");
-       *ret_conv = CResult_CVec_u8ZPeerHandleErrorZ_clone(orig_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_PingDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_PingDecodeErrorZ* orig_conv = (LDKCResult_PingDecodeErrorZ*)(orig & ~1);
+       LDKCResult_PingDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PingDecodeErrorZ), "LDKCResult_PingDecodeErrorZ");
+       *ret_conv = CResult_PingDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_NonePeerHandleErrorZ_ok() {
-       LDKCResult_NonePeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePeerHandleErrorZ), "LDKCResult_NonePeerHandleErrorZ");
-       *ret_conv = CResult_NonePeerHandleErrorZ_ok();
+uint32_t  __attribute__((visibility("default"))) TS_CResult_PongDecodeErrorZ_ok(uint32_t o) {
+       LDKPong o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = Pong_clone(&o_conv);
+       LDKCResult_PongDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PongDecodeErrorZ), "LDKCResult_PongDecodeErrorZ");
+       *ret_conv = CResult_PongDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_NonePeerHandleErrorZ_err(uint32_t e) {
-       LDKPeerHandleError e_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_PongDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
-       e_conv = PeerHandleError_clone(&e_conv);
-       LDKCResult_NonePeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePeerHandleErrorZ), "LDKCResult_NonePeerHandleErrorZ");
-       *ret_conv = CResult_NonePeerHandleErrorZ_err(e_conv);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_PongDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PongDecodeErrorZ), "LDKCResult_PongDecodeErrorZ");
+       *ret_conv = CResult_PongDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_NonePeerHandleErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_PongDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_NonePeerHandleErrorZ _res_conv = *(LDKCResult_NonePeerHandleErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_PongDecodeErrorZ _res_conv = *(LDKCResult_PongDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_NonePeerHandleErrorZ_free(_res_conv);
+       CResult_PongDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_NonePeerHandleErrorZ_clone(uint32_t orig) {
-       LDKCResult_NonePeerHandleErrorZ* orig_conv = (LDKCResult_NonePeerHandleErrorZ*)(orig & ~1);
-       LDKCResult_NonePeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePeerHandleErrorZ), "LDKCResult_NonePeerHandleErrorZ");
-       *ret_conv = CResult_NonePeerHandleErrorZ_clone(orig_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_PongDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_PongDecodeErrorZ* orig_conv = (LDKCResult_PongDecodeErrorZ*)(orig & ~1);
+       LDKCResult_PongDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PongDecodeErrorZ), "LDKCResult_PongDecodeErrorZ");
+       *ret_conv = CResult_PongDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_boolPeerHandleErrorZ_ok(jboolean o) {
-       LDKCResult_boolPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolPeerHandleErrorZ), "LDKCResult_boolPeerHandleErrorZ");
-       *ret_conv = CResult_boolPeerHandleErrorZ_ok(o);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(uint32_t o) {
+       LDKUnsignedChannelAnnouncement o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = UnsignedChannelAnnouncement_clone(&o_conv);
+       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ), "LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_boolPeerHandleErrorZ_err(uint32_t e) {
-       LDKPeerHandleError e_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
-       e_conv = PeerHandleError_clone(&e_conv);
-       LDKCResult_boolPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolPeerHandleErrorZ), "LDKCResult_boolPeerHandleErrorZ");
-       *ret_conv = CResult_boolPeerHandleErrorZ_err(e_conv);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ), "LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_boolPeerHandleErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_boolPeerHandleErrorZ _res_conv = *(LDKCResult_boolPeerHandleErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res_conv = *(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_boolPeerHandleErrorZ_free(_res_conv);
+       CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_boolPeerHandleErrorZ_clone(uint32_t orig) {
-       LDKCResult_boolPeerHandleErrorZ* orig_conv = (LDKCResult_boolPeerHandleErrorZ*)(orig & ~1);
-       LDKCResult_boolPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolPeerHandleErrorZ), "LDKCResult_boolPeerHandleErrorZ");
-       *ret_conv = CResult_boolPeerHandleErrorZ_clone(orig_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* orig_conv = (LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ*)(orig & ~1);
+       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ), "LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_SecretKeySecpErrorZ_ok(int8_tArray o) {
-       LDKSecretKey o_ref;
-       CHECK(*((uint32_t*)o) == 32);
-       memcpy(o_ref.bytes, (uint8_t*)(o + 4), 32);
-       LDKCResult_SecretKeySecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SecretKeySecpErrorZ), "LDKCResult_SecretKeySecpErrorZ");
-       *ret_conv = CResult_SecretKeySecpErrorZ_ok(o_ref);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelAnnouncementDecodeErrorZ_ok(uint32_t o) {
+       LDKChannelAnnouncement o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = ChannelAnnouncement_clone(&o_conv);
+       LDKCResult_ChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelAnnouncementDecodeErrorZ), "LDKCResult_ChannelAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_ChannelAnnouncementDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_SecretKeySecpErrorZ_err(uint32_t e) {
-       LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_js(e);
-       LDKCResult_SecretKeySecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SecretKeySecpErrorZ), "LDKCResult_SecretKeySecpErrorZ");
-       *ret_conv = CResult_SecretKeySecpErrorZ_err(e_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelAnnouncementDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_ChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelAnnouncementDecodeErrorZ), "LDKCResult_ChannelAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_ChannelAnnouncementDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_SecretKeySecpErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_ChannelAnnouncementDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_SecretKeySecpErrorZ _res_conv = *(LDKCResult_SecretKeySecpErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_ChannelAnnouncementDecodeErrorZ _res_conv = *(LDKCResult_ChannelAnnouncementDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_SecretKeySecpErrorZ_free(_res_conv);
+       CResult_ChannelAnnouncementDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_PublicKeySecpErrorZ_ok(int8_tArray o) {
-       LDKPublicKey o_ref;
-       CHECK(*((uint32_t*)o) == 33);
-       memcpy(o_ref.compressed_form, (uint8_t*)(o + 4), 33);
-       LDKCResult_PublicKeySecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecpErrorZ), "LDKCResult_PublicKeySecpErrorZ");
-       *ret_conv = CResult_PublicKeySecpErrorZ_ok(o_ref);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelAnnouncementDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_ChannelAnnouncementDecodeErrorZ* orig_conv = (LDKCResult_ChannelAnnouncementDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelAnnouncementDecodeErrorZ), "LDKCResult_ChannelAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_ChannelAnnouncementDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_PublicKeySecpErrorZ_err(uint32_t e) {
-       LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_js(e);
-       LDKCResult_PublicKeySecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecpErrorZ), "LDKCResult_PublicKeySecpErrorZ");
-       *ret_conv = CResult_PublicKeySecpErrorZ_err(e_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UnsignedChannelUpdateDecodeErrorZ_ok(uint32_t o) {
+       LDKUnsignedChannelUpdate o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = UnsignedChannelUpdate_clone(&o_conv);
+       LDKCResult_UnsignedChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelUpdateDecodeErrorZ), "LDKCResult_UnsignedChannelUpdateDecodeErrorZ");
+       *ret_conv = CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_PublicKeySecpErrorZ_free(uint32_t _res) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UnsignedChannelUpdateDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_UnsignedChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelUpdateDecodeErrorZ), "LDKCResult_UnsignedChannelUpdateDecodeErrorZ");
+       *ret_conv = CResult_UnsignedChannelUpdateDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+void  __attribute__((visibility("default"))) TS_CResult_UnsignedChannelUpdateDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_PublicKeySecpErrorZ _res_conv = *(LDKCResult_PublicKeySecpErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res_conv = *(LDKCResult_UnsignedChannelUpdateDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_PublicKeySecpErrorZ_free(_res_conv);
+       CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UnsignedChannelUpdateDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_UnsignedChannelUpdateDecodeErrorZ* orig_conv = (LDKCResult_UnsignedChannelUpdateDecodeErrorZ*)(orig & ~1);
+       LDKCResult_UnsignedChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelUpdateDecodeErrorZ), "LDKCResult_UnsignedChannelUpdateDecodeErrorZ");
+       *ret_conv = CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_TxCreationKeysSecpErrorZ_ok(uint32_t o) {
-       LDKTxCreationKeys o_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelUpdateDecodeErrorZ_ok(uint32_t o) {
+       LDKChannelUpdate o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = TxCreationKeys_clone(&o_conv);
-       LDKCResult_TxCreationKeysSecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysSecpErrorZ), "LDKCResult_TxCreationKeysSecpErrorZ");
-       *ret_conv = CResult_TxCreationKeysSecpErrorZ_ok(o_conv);
+       o_conv = ChannelUpdate_clone(&o_conv);
+       LDKCResult_ChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelUpdateDecodeErrorZ), "LDKCResult_ChannelUpdateDecodeErrorZ");
+       *ret_conv = CResult_ChannelUpdateDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_TxCreationKeysSecpErrorZ_err(uint32_t e) {
-       LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_js(e);
-       LDKCResult_TxCreationKeysSecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysSecpErrorZ), "LDKCResult_TxCreationKeysSecpErrorZ");
-       *ret_conv = CResult_TxCreationKeysSecpErrorZ_err(e_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelUpdateDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_ChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelUpdateDecodeErrorZ), "LDKCResult_ChannelUpdateDecodeErrorZ");
+       *ret_conv = CResult_ChannelUpdateDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_TxCreationKeysSecpErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_ChannelUpdateDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_TxCreationKeysSecpErrorZ _res_conv = *(LDKCResult_TxCreationKeysSecpErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_ChannelUpdateDecodeErrorZ _res_conv = *(LDKCResult_ChannelUpdateDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_TxCreationKeysSecpErrorZ_free(_res_conv);
+       CResult_ChannelUpdateDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_TrustedCommitmentTransactionNoneZ_ok(uint32_t o) {
-       LDKTrustedCommitmentTransaction o_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelUpdateDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_ChannelUpdateDecodeErrorZ* orig_conv = (LDKCResult_ChannelUpdateDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelUpdateDecodeErrorZ), "LDKCResult_ChannelUpdateDecodeErrorZ");
+       *ret_conv = CResult_ChannelUpdateDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ErrorMessageDecodeErrorZ_ok(uint32_t o) {
+       LDKErrorMessage o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       // Warning: we need a move here but no clone is available for LDKTrustedCommitmentTransaction
-       LDKCResult_TrustedCommitmentTransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TrustedCommitmentTransactionNoneZ), "LDKCResult_TrustedCommitmentTransactionNoneZ");
-       *ret_conv = CResult_TrustedCommitmentTransactionNoneZ_ok(o_conv);
+       o_conv = ErrorMessage_clone(&o_conv);
+       LDKCResult_ErrorMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ErrorMessageDecodeErrorZ), "LDKCResult_ErrorMessageDecodeErrorZ");
+       *ret_conv = CResult_ErrorMessageDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_TrustedCommitmentTransactionNoneZ_err() {
-       LDKCResult_TrustedCommitmentTransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TrustedCommitmentTransactionNoneZ), "LDKCResult_TrustedCommitmentTransactionNoneZ");
-       *ret_conv = CResult_TrustedCommitmentTransactionNoneZ_err();
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ErrorMessageDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_ErrorMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ErrorMessageDecodeErrorZ), "LDKCResult_ErrorMessageDecodeErrorZ");
+       *ret_conv = CResult_ErrorMessageDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_TrustedCommitmentTransactionNoneZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_ErrorMessageDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_TrustedCommitmentTransactionNoneZ _res_conv = *(LDKCResult_TrustedCommitmentTransactionNoneZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_ErrorMessageDecodeErrorZ _res_conv = *(LDKCResult_ErrorMessageDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_TrustedCommitmentTransactionNoneZ_free(_res_conv);
+       CResult_ErrorMessageDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_CVec_SignatureZNoneZ_ok(ptrArray o) {
-       LDKCVec_SignatureZ o_constr;
-       o_constr.datalen = *((uint32_t*)o);
-       if (o_constr.datalen > 0)
-               o_constr.data = MALLOC(o_constr.datalen * sizeof(LDKSignature), "LDKCVec_SignatureZ Elements");
-       else
-               o_constr.data = NULL;
-       int8_tArray* o_vals = (int8_tArray*)(o + 4);
-       for (size_t m = 0; m < o_constr.datalen; m++) {
-               int8_tArray arr_conv_12 = o_vals[m];
-               LDKSignature arr_conv_12_ref;
-               CHECK(*((uint32_t*)arr_conv_12) == 64);
-               memcpy(arr_conv_12_ref.compact_form, (uint8_t*)(arr_conv_12 + 4), 64);
-               o_constr.data[m] = arr_conv_12_ref;
-       }
-       LDKCResult_CVec_SignatureZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_SignatureZNoneZ), "LDKCResult_CVec_SignatureZNoneZ");
-       *ret_conv = CResult_CVec_SignatureZNoneZ_ok(o_constr);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ErrorMessageDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_ErrorMessageDecodeErrorZ* orig_conv = (LDKCResult_ErrorMessageDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ErrorMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ErrorMessageDecodeErrorZ), "LDKCResult_ErrorMessageDecodeErrorZ");
+       *ret_conv = CResult_ErrorMessageDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_CVec_SignatureZNoneZ_err() {
-       LDKCResult_CVec_SignatureZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_SignatureZNoneZ), "LDKCResult_CVec_SignatureZNoneZ");
-       *ret_conv = CResult_CVec_SignatureZNoneZ_err();
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(uint32_t o) {
+       LDKUnsignedNodeAnnouncement o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = UnsignedNodeAnnouncement_clone(&o_conv);
+       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ), "LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_CVec_SignatureZNoneZ_free(uint32_t _res) {
-       if ((_res & 1) != 0) return;
-       LDKCResult_CVec_SignatureZNoneZ _res_conv = *(LDKCResult_CVec_SignatureZNoneZ*)(((uint64_t)_res) & ~1);
-       FREE((void*)_res);
-       CResult_CVec_SignatureZNoneZ_free(_res_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_CResult_CVec_SignatureZNoneZ_clone(uint32_t orig) {
-       LDKCResult_CVec_SignatureZNoneZ* orig_conv = (LDKCResult_CVec_SignatureZNoneZ*)(orig & ~1);
-       LDKCResult_CVec_SignatureZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_SignatureZNoneZ), "LDKCResult_CVec_SignatureZNoneZ");
-       *ret_conv = CResult_CVec_SignatureZNoneZ_clone(orig_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ), "LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CVec_RouteHopZ_free(uint32_tArray _res) {
-       LDKCVec_RouteHopZ _res_constr;
-       _res_constr.datalen = *((uint32_t*)_res);
-       if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKRouteHop), "LDKCVec_RouteHopZ Elements");
-       else
-               _res_constr.data = NULL;
-       uint32_t* _res_vals = (uint32_t*)(_res + 4);
-       for (size_t k = 0; k < _res_constr.datalen; k++) {
-               uint32_t arr_conv_10 = _res_vals[k];
-               LDKRouteHop arr_conv_10_conv;
-               arr_conv_10_conv.inner = (void*)(arr_conv_10 & (~1));
-               arr_conv_10_conv.is_owned = (arr_conv_10 & 1) || (arr_conv_10 == 0);
-               _res_constr.data[k] = arr_conv_10_conv;
-       }
-       CVec_RouteHopZ_free(_res_constr);
+void  __attribute__((visibility("default"))) TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res_conv = *(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res_conv);
 }
 
-void  __attribute__((visibility("default"))) TS_CVec_CVec_RouteHopZZ_free(ptrArray _res) {
-       LDKCVec_CVec_RouteHopZZ _res_constr;
-       _res_constr.datalen = *((uint32_t*)_res);
-       if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKCVec_RouteHopZ), "LDKCVec_CVec_RouteHopZZ Elements");
-       else
-               _res_constr.data = NULL;
-       uint32_tArray* _res_vals = (uint32_tArray*)(_res + 4);
-       for (size_t m = 0; m < _res_constr.datalen; m++) {
-               uint32_tArray arr_conv_12 = _res_vals[m];
-               LDKCVec_RouteHopZ arr_conv_12_constr;
-               arr_conv_12_constr.datalen = *((uint32_t*)arr_conv_12);
-               if (arr_conv_12_constr.datalen > 0)
-                       arr_conv_12_constr.data = MALLOC(arr_conv_12_constr.datalen * sizeof(LDKRouteHop), "LDKCVec_RouteHopZ Elements");
-               else
-                       arr_conv_12_constr.data = NULL;
-               uint32_t* arr_conv_12_vals = (uint32_t*)(arr_conv_12 + 4);
-               for (size_t k = 0; k < arr_conv_12_constr.datalen; k++) {
-                       uint32_t arr_conv_10 = arr_conv_12_vals[k];
-                       LDKRouteHop arr_conv_10_conv;
-                       arr_conv_10_conv.inner = (void*)(arr_conv_10 & (~1));
-                       arr_conv_10_conv.is_owned = (arr_conv_10 & 1) || (arr_conv_10 == 0);
-                       arr_conv_12_constr.data[k] = arr_conv_10_conv;
-               }
-               _res_constr.data[m] = arr_conv_12_constr;
-       }
-       CVec_CVec_RouteHopZZ_free(_res_constr);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ* orig_conv = (LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ*)(orig & ~1);
+       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ), "LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_RouteDecodeErrorZ_ok(uint32_t o) {
-       LDKRoute o_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NodeAnnouncementDecodeErrorZ_ok(uint32_t o) {
+       LDKNodeAnnouncement o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = Route_clone(&o_conv);
-       LDKCResult_RouteDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteDecodeErrorZ), "LDKCResult_RouteDecodeErrorZ");
-       *ret_conv = CResult_RouteDecodeErrorZ_ok(o_conv);
+       o_conv = NodeAnnouncement_clone(&o_conv);
+       LDKCResult_NodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementDecodeErrorZ), "LDKCResult_NodeAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_NodeAnnouncementDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_RouteDecodeErrorZ_err(uint32_t e) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NodeAnnouncementDecodeErrorZ_err(uint32_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_RouteDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteDecodeErrorZ), "LDKCResult_RouteDecodeErrorZ");
-       *ret_conv = CResult_RouteDecodeErrorZ_err(e_conv);
+       LDKCResult_NodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementDecodeErrorZ), "LDKCResult_NodeAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_NodeAnnouncementDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_RouteDecodeErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_NodeAnnouncementDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_RouteDecodeErrorZ _res_conv = *(LDKCResult_RouteDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_NodeAnnouncementDecodeErrorZ _res_conv = *(LDKCResult_NodeAnnouncementDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_RouteDecodeErrorZ_free(_res_conv);
+       CResult_NodeAnnouncementDecodeErrorZ_free(_res_conv);
 }
 
-void  __attribute__((visibility("default"))) TS_CVec_RouteHintZ_free(uint32_tArray _res) {
-       LDKCVec_RouteHintZ _res_constr;
-       _res_constr.datalen = *((uint32_t*)_res);
-       if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKRouteHint), "LDKCVec_RouteHintZ Elements");
-       else
-               _res_constr.data = NULL;
-       uint32_t* _res_vals = (uint32_t*)(_res + 4);
-       for (size_t l = 0; l < _res_constr.datalen; l++) {
-               uint32_t arr_conv_11 = _res_vals[l];
-               LDKRouteHint arr_conv_11_conv;
-               arr_conv_11_conv.inner = (void*)(arr_conv_11 & (~1));
-               arr_conv_11_conv.is_owned = (arr_conv_11 & 1) || (arr_conv_11 == 0);
-               _res_constr.data[l] = arr_conv_11_conv;
-       }
-       CVec_RouteHintZ_free(_res_constr);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NodeAnnouncementDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_NodeAnnouncementDecodeErrorZ* orig_conv = (LDKCResult_NodeAnnouncementDecodeErrorZ*)(orig & ~1);
+       LDKCResult_NodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementDecodeErrorZ), "LDKCResult_NodeAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_NodeAnnouncementDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_RouteLightningErrorZ_ok(uint32_t o) {
-       LDKRoute o_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_QueryShortChannelIdsDecodeErrorZ_ok(uint32_t o) {
+       LDKQueryShortChannelIds o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = Route_clone(&o_conv);
-       LDKCResult_RouteLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteLightningErrorZ), "LDKCResult_RouteLightningErrorZ");
-       *ret_conv = CResult_RouteLightningErrorZ_ok(o_conv);
+       o_conv = QueryShortChannelIds_clone(&o_conv);
+       LDKCResult_QueryShortChannelIdsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryShortChannelIdsDecodeErrorZ), "LDKCResult_QueryShortChannelIdsDecodeErrorZ");
+       *ret_conv = CResult_QueryShortChannelIdsDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_RouteLightningErrorZ_err(uint32_t e) {
-       LDKLightningError e_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_QueryShortChannelIdsDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
-       e_conv = LightningError_clone(&e_conv);
-       LDKCResult_RouteLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteLightningErrorZ), "LDKCResult_RouteLightningErrorZ");
-       *ret_conv = CResult_RouteLightningErrorZ_err(e_conv);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_QueryShortChannelIdsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryShortChannelIdsDecodeErrorZ), "LDKCResult_QueryShortChannelIdsDecodeErrorZ");
+       *ret_conv = CResult_QueryShortChannelIdsDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_RouteLightningErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_QueryShortChannelIdsDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_RouteLightningErrorZ _res_conv = *(LDKCResult_RouteLightningErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_QueryShortChannelIdsDecodeErrorZ _res_conv = *(LDKCResult_QueryShortChannelIdsDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_RouteLightningErrorZ_free(_res_conv);
+       CResult_QueryShortChannelIdsDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_RoutingFeesDecodeErrorZ_ok(uint32_t o) {
-       LDKRoutingFees o_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_QueryShortChannelIdsDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_QueryShortChannelIdsDecodeErrorZ* orig_conv = (LDKCResult_QueryShortChannelIdsDecodeErrorZ*)(orig & ~1);
+       LDKCResult_QueryShortChannelIdsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryShortChannelIdsDecodeErrorZ), "LDKCResult_QueryShortChannelIdsDecodeErrorZ");
+       *ret_conv = CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(uint32_t o) {
+       LDKReplyShortChannelIdsEnd o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = RoutingFees_clone(&o_conv);
-       LDKCResult_RoutingFeesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RoutingFeesDecodeErrorZ), "LDKCResult_RoutingFeesDecodeErrorZ");
-       *ret_conv = CResult_RoutingFeesDecodeErrorZ_ok(o_conv);
+       o_conv = ReplyShortChannelIdsEnd_clone(&o_conv);
+       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ), "LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ");
+       *ret_conv = CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_RoutingFeesDecodeErrorZ_err(uint32_t e) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(uint32_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_RoutingFeesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RoutingFeesDecodeErrorZ), "LDKCResult_RoutingFeesDecodeErrorZ");
-       *ret_conv = CResult_RoutingFeesDecodeErrorZ_err(e_conv);
+       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ), "LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ");
+       *ret_conv = CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_RoutingFeesDecodeErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_RoutingFeesDecodeErrorZ _res_conv = *(LDKCResult_RoutingFeesDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res_conv = *(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_RoutingFeesDecodeErrorZ_free(_res_conv);
+       CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_NodeAnnouncementInfoDecodeErrorZ_ok(uint32_t o) {
-       LDKNodeAnnouncementInfo o_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* orig_conv = (LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ), "LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ");
+       *ret_conv = CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_QueryChannelRangeDecodeErrorZ_ok(uint32_t o) {
+       LDKQueryChannelRange o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = NodeAnnouncementInfo_clone(&o_conv);
-       LDKCResult_NodeAnnouncementInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementInfoDecodeErrorZ), "LDKCResult_NodeAnnouncementInfoDecodeErrorZ");
-       *ret_conv = CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o_conv);
+       o_conv = QueryChannelRange_clone(&o_conv);
+       LDKCResult_QueryChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryChannelRangeDecodeErrorZ), "LDKCResult_QueryChannelRangeDecodeErrorZ");
+       *ret_conv = CResult_QueryChannelRangeDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_NodeAnnouncementInfoDecodeErrorZ_err(uint32_t e) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_QueryChannelRangeDecodeErrorZ_err(uint32_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_NodeAnnouncementInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementInfoDecodeErrorZ), "LDKCResult_NodeAnnouncementInfoDecodeErrorZ");
-       *ret_conv = CResult_NodeAnnouncementInfoDecodeErrorZ_err(e_conv);
+       LDKCResult_QueryChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryChannelRangeDecodeErrorZ), "LDKCResult_QueryChannelRangeDecodeErrorZ");
+       *ret_conv = CResult_QueryChannelRangeDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_NodeAnnouncementInfoDecodeErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_QueryChannelRangeDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res_conv = *(LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_QueryChannelRangeDecodeErrorZ _res_conv = *(LDKCResult_QueryChannelRangeDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res_conv);
+       CResult_QueryChannelRangeDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_NodeAnnouncementInfoDecodeErrorZ_clone(uint32_t orig) {
-       LDKCResult_NodeAnnouncementInfoDecodeErrorZ* orig_conv = (LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)(orig & ~1);
-       LDKCResult_NodeAnnouncementInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementInfoDecodeErrorZ), "LDKCResult_NodeAnnouncementInfoDecodeErrorZ");
-       *ret_conv = CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_QueryChannelRangeDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_QueryChannelRangeDecodeErrorZ* orig_conv = (LDKCResult_QueryChannelRangeDecodeErrorZ*)(orig & ~1);
+       LDKCResult_QueryChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryChannelRangeDecodeErrorZ), "LDKCResult_QueryChannelRangeDecodeErrorZ");
+       *ret_conv = CResult_QueryChannelRangeDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_NodeInfoDecodeErrorZ_ok(uint32_t o) {
-       LDKNodeInfo o_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ReplyChannelRangeDecodeErrorZ_ok(uint32_t o) {
+       LDKReplyChannelRange o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = NodeInfo_clone(&o_conv);
-       LDKCResult_NodeInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeInfoDecodeErrorZ), "LDKCResult_NodeInfoDecodeErrorZ");
-       *ret_conv = CResult_NodeInfoDecodeErrorZ_ok(o_conv);
+       o_conv = ReplyChannelRange_clone(&o_conv);
+       LDKCResult_ReplyChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyChannelRangeDecodeErrorZ), "LDKCResult_ReplyChannelRangeDecodeErrorZ");
+       *ret_conv = CResult_ReplyChannelRangeDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_NodeInfoDecodeErrorZ_err(uint32_t e) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ReplyChannelRangeDecodeErrorZ_err(uint32_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_NodeInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeInfoDecodeErrorZ), "LDKCResult_NodeInfoDecodeErrorZ");
-       *ret_conv = CResult_NodeInfoDecodeErrorZ_err(e_conv);
+       LDKCResult_ReplyChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyChannelRangeDecodeErrorZ), "LDKCResult_ReplyChannelRangeDecodeErrorZ");
+       *ret_conv = CResult_ReplyChannelRangeDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_NodeInfoDecodeErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_ReplyChannelRangeDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_NodeInfoDecodeErrorZ _res_conv = *(LDKCResult_NodeInfoDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_ReplyChannelRangeDecodeErrorZ _res_conv = *(LDKCResult_ReplyChannelRangeDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_NodeInfoDecodeErrorZ_free(_res_conv);
+       CResult_ReplyChannelRangeDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_NodeInfoDecodeErrorZ_clone(uint32_t orig) {
-       LDKCResult_NodeInfoDecodeErrorZ* orig_conv = (LDKCResult_NodeInfoDecodeErrorZ*)(orig & ~1);
-       LDKCResult_NodeInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeInfoDecodeErrorZ), "LDKCResult_NodeInfoDecodeErrorZ");
-       *ret_conv = CResult_NodeInfoDecodeErrorZ_clone(orig_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ReplyChannelRangeDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_ReplyChannelRangeDecodeErrorZ* orig_conv = (LDKCResult_ReplyChannelRangeDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ReplyChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyChannelRangeDecodeErrorZ), "LDKCResult_ReplyChannelRangeDecodeErrorZ");
+       *ret_conv = CResult_ReplyChannelRangeDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_NetworkGraphDecodeErrorZ_ok(uint32_t o) {
-       LDKNetworkGraph o_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_GossipTimestampFilterDecodeErrorZ_ok(uint32_t o) {
+       LDKGossipTimestampFilter o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       // Warning: we need a move here but no clone is available for LDKNetworkGraph
-       LDKCResult_NetworkGraphDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetworkGraphDecodeErrorZ), "LDKCResult_NetworkGraphDecodeErrorZ");
-       *ret_conv = CResult_NetworkGraphDecodeErrorZ_ok(o_conv);
+       o_conv = GossipTimestampFilter_clone(&o_conv);
+       LDKCResult_GossipTimestampFilterDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_GossipTimestampFilterDecodeErrorZ), "LDKCResult_GossipTimestampFilterDecodeErrorZ");
+       *ret_conv = CResult_GossipTimestampFilterDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_NetworkGraphDecodeErrorZ_err(uint32_t e) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_GossipTimestampFilterDecodeErrorZ_err(uint32_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_NetworkGraphDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetworkGraphDecodeErrorZ), "LDKCResult_NetworkGraphDecodeErrorZ");
-       *ret_conv = CResult_NetworkGraphDecodeErrorZ_err(e_conv);
+       LDKCResult_GossipTimestampFilterDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_GossipTimestampFilterDecodeErrorZ), "LDKCResult_GossipTimestampFilterDecodeErrorZ");
+       *ret_conv = CResult_GossipTimestampFilterDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_NetworkGraphDecodeErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_GossipTimestampFilterDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_NetworkGraphDecodeErrorZ _res_conv = *(LDKCResult_NetworkGraphDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_GossipTimestampFilterDecodeErrorZ _res_conv = *(LDKCResult_GossipTimestampFilterDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_NetworkGraphDecodeErrorZ_free(_res_conv);
+       CResult_GossipTimestampFilterDecodeErrorZ_free(_res_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_GossipTimestampFilterDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_GossipTimestampFilterDecodeErrorZ* orig_conv = (LDKCResult_GossipTimestampFilterDecodeErrorZ*)(orig & ~1);
+       LDKCResult_GossipTimestampFilterDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_GossipTimestampFilterDecodeErrorZ), "LDKCResult_GossipTimestampFilterDecodeErrorZ");
+       *ret_conv = CResult_GossipTimestampFilterDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
 void  __attribute__((visibility("default"))) TS_Event_free(uint32_t this_ptr) {
@@ -6257,20 +8260,6 @@ void  __attribute__((visibility("default"))) TS_ChannelHandshakeConfig_free(uint
        ChannelHandshakeConfig_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_ChannelHandshakeConfig_clone(uint32_t orig) {
-       LDKChannelHandshakeConfig orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKChannelHandshakeConfig ret_var = ChannelHandshakeConfig_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 int32_t  __attribute__((visibility("default"))) TS_ChannelHandshakeConfig_get_minimum_depth(uint32_t this_ptr) {
        LDKChannelHandshakeConfig this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -6327,8 +8316,11 @@ uint32_t  __attribute__((visibility("default"))) TS_ChannelHandshakeConfig_new(i
        return ret_ref;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_ChannelHandshakeConfig_default() {
-       LDKChannelHandshakeConfig ret_var = ChannelHandshakeConfig_default();
+uint32_t  __attribute__((visibility("default"))) TS_ChannelHandshakeConfig_clone(uint32_t orig) {
+       LDKChannelHandshakeConfig orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKChannelHandshakeConfig ret_var = ChannelHandshakeConfig_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -6338,18 +8330,8 @@ uint32_t  __attribute__((visibility("default"))) TS_ChannelHandshakeConfig_defau
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelHandshakeLimits_free(uint32_t this_ptr) {
-       LDKChannelHandshakeLimits this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       ChannelHandshakeLimits_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_ChannelHandshakeLimits_clone(uint32_t orig) {
-       LDKChannelHandshakeLimits orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKChannelHandshakeLimits ret_var = ChannelHandshakeLimits_clone(&orig_conv);
+uint32_t  __attribute__((visibility("default"))) TS_ChannelHandshakeConfig_default() {
+       LDKChannelHandshakeConfig ret_var = ChannelHandshakeConfig_default();
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -6359,6 +8341,13 @@ uint32_t  __attribute__((visibility("default"))) TS_ChannelHandshakeLimits_clone
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_ChannelHandshakeLimits_free(uint32_t this_ptr) {
+       LDKChannelHandshakeLimits this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       ChannelHandshakeLimits_free(this_ptr_conv);
+}
+
 int64_t  __attribute__((visibility("default"))) TS_ChannelHandshakeLimits_get_min_funding_satoshis(uint32_t this_ptr) {
        LDKChannelHandshakeLimits this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -6520,8 +8509,11 @@ uint32_t  __attribute__((visibility("default"))) TS_ChannelHandshakeLimits_new(i
        return ret_ref;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_ChannelHandshakeLimits_default() {
-       LDKChannelHandshakeLimits ret_var = ChannelHandshakeLimits_default();
+uint32_t  __attribute__((visibility("default"))) TS_ChannelHandshakeLimits_clone(uint32_t orig) {
+       LDKChannelHandshakeLimits orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKChannelHandshakeLimits ret_var = ChannelHandshakeLimits_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -6531,18 +8523,8 @@ uint32_t  __attribute__((visibility("default"))) TS_ChannelHandshakeLimits_defau
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelConfig_free(uint32_t this_ptr) {
-       LDKChannelConfig this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       ChannelConfig_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_ChannelConfig_clone(uint32_t orig) {
-       LDKChannelConfig orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKChannelConfig ret_var = ChannelConfig_clone(&orig_conv);
+uint32_t  __attribute__((visibility("default"))) TS_ChannelHandshakeLimits_default() {
+       LDKChannelHandshakeLimits ret_var = ChannelHandshakeLimits_default();
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -6552,6 +8534,13 @@ uint32_t  __attribute__((visibility("default"))) TS_ChannelConfig_clone(uint32_t
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_ChannelConfig_free(uint32_t this_ptr) {
+       LDKChannelConfig this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       ChannelConfig_free(this_ptr_conv);
+}
+
 int32_t  __attribute__((visibility("default"))) TS_ChannelConfig_get_fee_proportional_millionths(uint32_t this_ptr) {
        LDKChannelConfig this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -6608,6 +8597,20 @@ uint32_t  __attribute__((visibility("default"))) TS_ChannelConfig_new(int32_t fe
        return ret_ref;
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_ChannelConfig_clone(uint32_t orig) {
+       LDKChannelConfig orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKChannelConfig ret_var = ChannelConfig_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 uint32_t  __attribute__((visibility("default"))) TS_ChannelConfig_default() {
        LDKChannelConfig ret_var = ChannelConfig_default();
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -6634,14 +8637,9 @@ uint32_t  __attribute__((visibility("default"))) TS_ChannelConfig_read(int8_tArr
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKChannelConfig ret_var = ChannelConfig_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_ChannelConfigDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelConfigDecodeErrorZ), "LDKCResult_ChannelConfigDecodeErrorZ");
+       *ret_conv = ChannelConfig_read(ser_ref);
+       return (long)ret_conv;
 }
 
 void  __attribute__((visibility("default"))) TS_UserConfig_free(uint32_t this_ptr) {
@@ -6651,20 +8649,6 @@ void  __attribute__((visibility("default"))) TS_UserConfig_free(uint32_t this_pt
        UserConfig_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_UserConfig_clone(uint32_t orig) {
-       LDKUserConfig orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKUserConfig ret_var = UserConfig_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 uint32_t  __attribute__((visibility("default"))) TS_UserConfig_get_own_channel_config(uint32_t this_ptr) {
        LDKUserConfig this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -6763,6 +8747,20 @@ uint32_t  __attribute__((visibility("default"))) TS_UserConfig_new(uint32_t own_
        return ret_ref;
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_UserConfig_clone(uint32_t orig) {
+       LDKUserConfig orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKUserConfig ret_var = UserConfig_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 uint32_t  __attribute__((visibility("default"))) TS_UserConfig_default() {
        LDKUserConfig ret_var = UserConfig_default();
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -6904,20 +8902,6 @@ void  __attribute__((visibility("default"))) TS_ChannelMonitorUpdate_free(uint32
        ChannelMonitorUpdate_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_ChannelMonitorUpdate_clone(uint32_t orig) {
-       LDKChannelMonitorUpdate orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKChannelMonitorUpdate ret_var = ChannelMonitorUpdate_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 int64_t  __attribute__((visibility("default"))) TS_ChannelMonitorUpdate_get_update_id(uint32_t this_ptr) {
        LDKChannelMonitorUpdate this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -6933,6 +8917,20 @@ void  __attribute__((visibility("default"))) TS_ChannelMonitorUpdate_set_update_
        ChannelMonitorUpdate_set_update_id(&this_ptr_conv, val);
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_ChannelMonitorUpdate_clone(uint32_t orig) {
+       LDKChannelMonitorUpdate orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKChannelMonitorUpdate ret_var = ChannelMonitorUpdate_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_ChannelMonitorUpdate_write(uint32_t obj) {
        LDKChannelMonitorUpdate obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
@@ -7037,14 +9035,9 @@ uint32_t  __attribute__((visibility("default"))) TS_HTLCUpdate_read(int8_tArray
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKHTLCUpdate ret_var = HTLCUpdate_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_HTLCUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCUpdateDecodeErrorZ), "LDKCResult_HTLCUpdateDecodeErrorZ");
+       *ret_conv = HTLCUpdate_read(ser_ref);
+       return (long)ret_conv;
 }
 
 void  __attribute__((visibility("default"))) TS_ChannelMonitor_free(uint32_t this_ptr) {
@@ -7242,20 +9235,6 @@ void  __attribute__((visibility("default"))) TS_OutPoint_free(uint32_t this_ptr)
        OutPoint_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_OutPoint_clone(uint32_t orig) {
-       LDKOutPoint orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKOutPoint ret_var = OutPoint_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 int8_tArray  __attribute__((visibility("default"))) TS_OutPoint_get_txid(uint32_t this_ptr) {
        LDKOutPoint this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -7304,6 +9283,20 @@ uint32_t  __attribute__((visibility("default"))) TS_OutPoint_new(int8_tArray txi
        return ret_ref;
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_OutPoint_clone(uint32_t orig) {
+       LDKOutPoint orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKOutPoint ret_var = OutPoint_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_OutPoint_to_channel_id(uint32_t this_arg) {
        LDKOutPoint this_arg_conv;
        this_arg_conv.inner = (void*)(this_arg & (~1));
@@ -7328,14 +9321,9 @@ uint32_t  __attribute__((visibility("default"))) TS_OutPoint_read(int8_tArray se
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKOutPoint ret_var = OutPoint_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_OutPointDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutPointDecodeErrorZ), "LDKCResult_OutPointDecodeErrorZ");
+       *ret_conv = OutPoint_read(ser_ref);
+       return (long)ret_conv;
 }
 
 void  __attribute__((visibility("default"))) TS_SpendableOutputDescriptor_free(uint32_t this_ptr) {
@@ -7399,20 +9387,6 @@ void  __attribute__((visibility("default"))) TS_InMemoryChannelKeys_free(uint32_
        InMemoryChannelKeys_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_InMemoryChannelKeys_clone(uint32_t orig) {
-       LDKInMemoryChannelKeys orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKInMemoryChannelKeys ret_var = InMemoryChannelKeys_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 int8_tArray  __attribute__((visibility("default"))) TS_InMemoryChannelKeys_get_funding_key(uint32_t this_ptr) {
        LDKInMemoryChannelKeys this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -7527,6 +9501,20 @@ void  __attribute__((visibility("default"))) TS_InMemoryChannelKeys_set_commitme
        InMemoryChannelKeys_set_commitment_seed(&this_ptr_conv, val_ref);
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_InMemoryChannelKeys_clone(uint32_t orig) {
+       LDKInMemoryChannelKeys orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKInMemoryChannelKeys ret_var = InMemoryChannelKeys_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 uint32_t  __attribute__((visibility("default"))) TS_InMemoryChannelKeys_new(int8_tArray funding_key, int8_tArray revocation_base_key, int8_tArray payment_key, int8_tArray delayed_payment_base_key, int8_tArray htlc_base_key, int8_tArray commitment_seed, int64_t channel_value_satoshis, uint32_t key_derivation_params) {
        LDKSecretKey funding_key_ref;
        CHECK(*((uint32_t*)funding_key) == 32);
@@ -7713,20 +9701,6 @@ void  __attribute__((visibility("default"))) TS_ChannelDetails_free(uint32_t thi
        ChannelDetails_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_ChannelDetails_clone(uint32_t orig) {
-       LDKChannelDetails orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKChannelDetails ret_var = ChannelDetails_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 int8_tArray  __attribute__((visibility("default"))) TS_ChannelDetails_get_channel_id(uint32_t this_ptr) {
        LDKChannelDetails this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -7786,7 +9760,7 @@ void  __attribute__((visibility("default"))) TS_ChannelDetails_set_counterparty_
        LDKInitFeatures val_conv;
        val_conv.inner = (void*)(val & (~1));
        val_conv.is_owned = (val & 1) || (val == 0);
-       // Warning: we need a move here but no clone is available for LDKInitFeatures
+       val_conv = InitFeatures_clone(&val_conv);
        ChannelDetails_set_counterparty_features(&this_ptr_conv, val_conv);
 }
 
@@ -7865,6 +9839,20 @@ void  __attribute__((visibility("default"))) TS_ChannelDetails_set_is_live(uint3
        ChannelDetails_set_is_live(&this_ptr_conv, val);
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_ChannelDetails_clone(uint32_t orig) {
+       LDKChannelDetails orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKChannelDetails ret_var = ChannelDetails_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 void  __attribute__((visibility("default"))) TS_PaymentSendFailure_free(uint32_t this_ptr) {
        LDKPaymentSendFailure this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -8400,20 +10388,6 @@ void  __attribute__((visibility("default"))) TS_ErrorMessage_free(uint32_t this_
        ErrorMessage_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_ErrorMessage_clone(uint32_t orig) {
-       LDKErrorMessage orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKErrorMessage ret_var = ErrorMessage_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 int8_tArray  __attribute__((visibility("default"))) TS_ErrorMessage_get_channel_id(uint32_t this_ptr) {
        LDKErrorMessage this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -8471,18 +10445,11 @@ uint32_t  __attribute__((visibility("default"))) TS_ErrorMessage_new(int8_tArray
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_Ping_free(uint32_t this_ptr) {
-       LDKPing this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       Ping_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_Ping_clone(uint32_t orig) {
-       LDKPing orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_ErrorMessage_clone(uint32_t orig) {
+       LDKErrorMessage orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKPing ret_var = Ping_clone(&orig_conv);
+       LDKErrorMessage ret_var = ErrorMessage_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -8492,6 +10459,13 @@ uint32_t  __attribute__((visibility("default"))) TS_Ping_clone(uint32_t orig) {
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_Ping_free(uint32_t this_ptr) {
+       LDKPing this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       Ping_free(this_ptr_conv);
+}
+
 int16_t  __attribute__((visibility("default"))) TS_Ping_get_ponglen(uint32_t this_ptr) {
        LDKPing this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -8533,18 +10507,11 @@ uint32_t  __attribute__((visibility("default"))) TS_Ping_new(int16_t ponglen_arg
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_Pong_free(uint32_t this_ptr) {
-       LDKPong this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       Pong_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_Pong_clone(uint32_t orig) {
-       LDKPong orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_Ping_clone(uint32_t orig) {
+       LDKPing orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKPong ret_var = Pong_clone(&orig_conv);
+       LDKPing ret_var = Ping_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -8554,6 +10521,13 @@ uint32_t  __attribute__((visibility("default"))) TS_Pong_clone(uint32_t orig) {
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_Pong_free(uint32_t this_ptr) {
+       LDKPong this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       Pong_free(this_ptr_conv);
+}
+
 int16_t  __attribute__((visibility("default"))) TS_Pong_get_byteslen(uint32_t this_ptr) {
        LDKPong this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -8580,18 +10554,11 @@ uint32_t  __attribute__((visibility("default"))) TS_Pong_new(int16_t byteslen_ar
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_OpenChannel_free(uint32_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       OpenChannel_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_OpenChannel_clone(uint32_t orig) {
-       LDKOpenChannel orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_Pong_clone(uint32_t orig) {
+       LDKPong orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKOpenChannel ret_var = OpenChannel_clone(&orig_conv);
+       LDKPong ret_var = Pong_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -8601,6 +10568,13 @@ uint32_t  __attribute__((visibility("default"))) TS_OpenChannel_clone(uint32_t o
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_OpenChannel_free(uint32_t this_ptr) {
+       LDKOpenChannel this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       OpenChannel_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_OpenChannel_get_chain_hash(uint32_t this_ptr) {
        LDKOpenChannel this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -8903,18 +10877,11 @@ void  __attribute__((visibility("default"))) TS_OpenChannel_set_channel_flags(ui
        OpenChannel_set_channel_flags(&this_ptr_conv, val);
 }
 
-void  __attribute__((visibility("default"))) TS_AcceptChannel_free(uint32_t this_ptr) {
-       LDKAcceptChannel this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       AcceptChannel_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_AcceptChannel_clone(uint32_t orig) {
-       LDKAcceptChannel orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_OpenChannel_clone(uint32_t orig) {
+       LDKOpenChannel orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKAcceptChannel ret_var = AcceptChannel_clone(&orig_conv);
+       LDKOpenChannel ret_var = OpenChannel_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -8924,6 +10891,13 @@ uint32_t  __attribute__((visibility("default"))) TS_AcceptChannel_clone(uint32_t
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_AcceptChannel_free(uint32_t this_ptr) {
+       LDKAcceptChannel this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       AcceptChannel_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_AcceptChannel_get_temporary_channel_id(uint32_t this_ptr) {
        LDKAcceptChannel this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -9162,18 +11136,11 @@ void  __attribute__((visibility("default"))) TS_AcceptChannel_set_first_per_comm
        AcceptChannel_set_first_per_commitment_point(&this_ptr_conv, val_ref);
 }
 
-void  __attribute__((visibility("default"))) TS_FundingCreated_free(uint32_t this_ptr) {
-       LDKFundingCreated this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       FundingCreated_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_FundingCreated_clone(uint32_t orig) {
-       LDKFundingCreated orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_AcceptChannel_clone(uint32_t orig) {
+       LDKAcceptChannel orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKFundingCreated ret_var = FundingCreated_clone(&orig_conv);
+       LDKAcceptChannel ret_var = AcceptChannel_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -9183,6 +11150,13 @@ uint32_t  __attribute__((visibility("default"))) TS_FundingCreated_clone(uint32_
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_FundingCreated_free(uint32_t this_ptr) {
+       LDKFundingCreated this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       FundingCreated_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_FundingCreated_get_temporary_channel_id(uint32_t this_ptr) {
        LDKFundingCreated this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -9275,18 +11249,11 @@ uint32_t  __attribute__((visibility("default"))) TS_FundingCreated_new(int8_tArr
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_FundingSigned_free(uint32_t this_ptr) {
-       LDKFundingSigned this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       FundingSigned_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_FundingSigned_clone(uint32_t orig) {
-       LDKFundingSigned orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_FundingCreated_clone(uint32_t orig) {
+       LDKFundingCreated orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKFundingSigned ret_var = FundingSigned_clone(&orig_conv);
+       LDKFundingCreated ret_var = FundingCreated_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -9296,6 +11263,13 @@ uint32_t  __attribute__((visibility("default"))) TS_FundingSigned_clone(uint32_t
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_FundingSigned_free(uint32_t this_ptr) {
+       LDKFundingSigned this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       FundingSigned_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_FundingSigned_get_channel_id(uint32_t this_ptr) {
        LDKFundingSigned this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -9351,18 +11325,11 @@ uint32_t  __attribute__((visibility("default"))) TS_FundingSigned_new(int8_tArra
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_FundingLocked_free(uint32_t this_ptr) {
-       LDKFundingLocked this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       FundingLocked_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_FundingLocked_clone(uint32_t orig) {
-       LDKFundingLocked orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_FundingSigned_clone(uint32_t orig) {
+       LDKFundingSigned orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKFundingLocked ret_var = FundingLocked_clone(&orig_conv);
+       LDKFundingSigned ret_var = FundingSigned_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -9372,6 +11339,13 @@ uint32_t  __attribute__((visibility("default"))) TS_FundingLocked_clone(uint32_t
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_FundingLocked_free(uint32_t this_ptr) {
+       LDKFundingLocked this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       FundingLocked_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_FundingLocked_get_channel_id(uint32_t this_ptr) {
        LDKFundingLocked this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -9427,18 +11401,11 @@ uint32_t  __attribute__((visibility("default"))) TS_FundingLocked_new(int8_tArra
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_Shutdown_free(uint32_t this_ptr) {
-       LDKShutdown this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       Shutdown_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_Shutdown_clone(uint32_t orig) {
-       LDKShutdown orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_FundingLocked_clone(uint32_t orig) {
+       LDKFundingLocked orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKShutdown ret_var = Shutdown_clone(&orig_conv);
+       LDKFundingLocked ret_var = FundingLocked_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -9448,6 +11415,13 @@ uint32_t  __attribute__((visibility("default"))) TS_Shutdown_clone(uint32_t orig
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_Shutdown_free(uint32_t this_ptr) {
+       LDKShutdown this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       Shutdown_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_Shutdown_get_channel_id(uint32_t this_ptr) {
        LDKShutdown this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -9506,18 +11480,11 @@ uint32_t  __attribute__((visibility("default"))) TS_Shutdown_new(int8_tArray cha
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_ClosingSigned_free(uint32_t this_ptr) {
-       LDKClosingSigned this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       ClosingSigned_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_ClosingSigned_clone(uint32_t orig) {
-       LDKClosingSigned orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_Shutdown_clone(uint32_t orig) {
+       LDKShutdown orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKClosingSigned ret_var = ClosingSigned_clone(&orig_conv);
+       LDKShutdown ret_var = Shutdown_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -9527,6 +11494,13 @@ uint32_t  __attribute__((visibility("default"))) TS_ClosingSigned_clone(uint32_t
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_ClosingSigned_free(uint32_t this_ptr) {
+       LDKClosingSigned this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       ClosingSigned_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_ClosingSigned_get_channel_id(uint32_t this_ptr) {
        LDKClosingSigned this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -9597,18 +11571,11 @@ uint32_t  __attribute__((visibility("default"))) TS_ClosingSigned_new(int8_tArra
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_UpdateAddHTLC_free(uint32_t this_ptr) {
-       LDKUpdateAddHTLC this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       UpdateAddHTLC_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_UpdateAddHTLC_clone(uint32_t orig) {
-       LDKUpdateAddHTLC orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_ClosingSigned_clone(uint32_t orig) {
+       LDKClosingSigned orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKUpdateAddHTLC ret_var = UpdateAddHTLC_clone(&orig_conv);
+       LDKClosingSigned ret_var = ClosingSigned_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -9618,6 +11585,13 @@ uint32_t  __attribute__((visibility("default"))) TS_UpdateAddHTLC_clone(uint32_t
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_UpdateAddHTLC_free(uint32_t this_ptr) {
+       LDKUpdateAddHTLC this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       UpdateAddHTLC_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_UpdateAddHTLC_get_channel_id(uint32_t this_ptr) {
        LDKUpdateAddHTLC this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -9694,25 +11668,18 @@ int32_t  __attribute__((visibility("default"))) TS_UpdateAddHTLC_get_cltv_expiry
        return ret_val;
 }
 
-void  __attribute__((visibility("default"))) TS_UpdateAddHTLC_set_cltv_expiry(uint32_t this_ptr, int32_t val) {
-       LDKUpdateAddHTLC this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = false;
-       UpdateAddHTLC_set_cltv_expiry(&this_ptr_conv, val);
-}
-
-void  __attribute__((visibility("default"))) TS_UpdateFulfillHTLC_free(uint32_t this_ptr) {
-       LDKUpdateFulfillHTLC this_ptr_conv;
+void  __attribute__((visibility("default"))) TS_UpdateAddHTLC_set_cltv_expiry(uint32_t this_ptr, int32_t val) {
+       LDKUpdateAddHTLC this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       UpdateFulfillHTLC_free(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       UpdateAddHTLC_set_cltv_expiry(&this_ptr_conv, val);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_UpdateFulfillHTLC_clone(uint32_t orig) {
-       LDKUpdateFulfillHTLC orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_UpdateAddHTLC_clone(uint32_t orig) {
+       LDKUpdateAddHTLC orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKUpdateFulfillHTLC ret_var = UpdateFulfillHTLC_clone(&orig_conv);
+       LDKUpdateAddHTLC ret_var = UpdateAddHTLC_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -9722,6 +11689,13 @@ uint32_t  __attribute__((visibility("default"))) TS_UpdateFulfillHTLC_clone(uint
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_UpdateFulfillHTLC_free(uint32_t this_ptr) {
+       LDKUpdateFulfillHTLC this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       UpdateFulfillHTLC_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_UpdateFulfillHTLC_get_channel_id(uint32_t this_ptr) {
        LDKUpdateFulfillHTLC this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -9792,18 +11766,11 @@ uint32_t  __attribute__((visibility("default"))) TS_UpdateFulfillHTLC_new(int8_t
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_UpdateFailHTLC_free(uint32_t this_ptr) {
-       LDKUpdateFailHTLC this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       UpdateFailHTLC_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_UpdateFailHTLC_clone(uint32_t orig) {
-       LDKUpdateFailHTLC orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_UpdateFulfillHTLC_clone(uint32_t orig) {
+       LDKUpdateFulfillHTLC orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKUpdateFailHTLC ret_var = UpdateFailHTLC_clone(&orig_conv);
+       LDKUpdateFulfillHTLC ret_var = UpdateFulfillHTLC_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -9813,6 +11780,13 @@ uint32_t  __attribute__((visibility("default"))) TS_UpdateFailHTLC_clone(uint32_
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_UpdateFailHTLC_free(uint32_t this_ptr) {
+       LDKUpdateFailHTLC this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       UpdateFailHTLC_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_UpdateFailHTLC_get_channel_id(uint32_t this_ptr) {
        LDKUpdateFailHTLC this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -9847,18 +11821,11 @@ void  __attribute__((visibility("default"))) TS_UpdateFailHTLC_set_htlc_id(uint3
        UpdateFailHTLC_set_htlc_id(&this_ptr_conv, val);
 }
 
-void  __attribute__((visibility("default"))) TS_UpdateFailMalformedHTLC_free(uint32_t this_ptr) {
-       LDKUpdateFailMalformedHTLC this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       UpdateFailMalformedHTLC_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_UpdateFailMalformedHTLC_clone(uint32_t orig) {
-       LDKUpdateFailMalformedHTLC orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_UpdateFailHTLC_clone(uint32_t orig) {
+       LDKUpdateFailHTLC orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKUpdateFailMalformedHTLC ret_var = UpdateFailMalformedHTLC_clone(&orig_conv);
+       LDKUpdateFailHTLC ret_var = UpdateFailHTLC_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -9868,6 +11835,13 @@ uint32_t  __attribute__((visibility("default"))) TS_UpdateFailMalformedHTLC_clon
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_UpdateFailMalformedHTLC_free(uint32_t this_ptr) {
+       LDKUpdateFailMalformedHTLC this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       UpdateFailMalformedHTLC_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_UpdateFailMalformedHTLC_get_channel_id(uint32_t this_ptr) {
        LDKUpdateFailMalformedHTLC this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -9917,18 +11891,11 @@ void  __attribute__((visibility("default"))) TS_UpdateFailMalformedHTLC_set_fail
        UpdateFailMalformedHTLC_set_failure_code(&this_ptr_conv, val);
 }
 
-void  __attribute__((visibility("default"))) TS_CommitmentSigned_free(uint32_t this_ptr) {
-       LDKCommitmentSigned this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       CommitmentSigned_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_CommitmentSigned_clone(uint32_t orig) {
-       LDKCommitmentSigned orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_UpdateFailMalformedHTLC_clone(uint32_t orig) {
+       LDKUpdateFailMalformedHTLC orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKCommitmentSigned ret_var = CommitmentSigned_clone(&orig_conv);
+       LDKUpdateFailMalformedHTLC ret_var = UpdateFailMalformedHTLC_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -9938,6 +11905,13 @@ uint32_t  __attribute__((visibility("default"))) TS_CommitmentSigned_clone(uint3
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_CommitmentSigned_free(uint32_t this_ptr) {
+       LDKCommitmentSigned this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       CommitmentSigned_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_CommitmentSigned_get_channel_id(uint32_t this_ptr) {
        LDKCommitmentSigned this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -10028,18 +12002,11 @@ uint32_t  __attribute__((visibility("default"))) TS_CommitmentSigned_new(int8_tA
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_RevokeAndACK_free(uint32_t this_ptr) {
-       LDKRevokeAndACK this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       RevokeAndACK_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_RevokeAndACK_clone(uint32_t orig) {
-       LDKRevokeAndACK orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CommitmentSigned_clone(uint32_t orig) {
+       LDKCommitmentSigned orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKRevokeAndACK ret_var = RevokeAndACK_clone(&orig_conv);
+       LDKCommitmentSigned ret_var = CommitmentSigned_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -10049,6 +12016,13 @@ uint32_t  __attribute__((visibility("default"))) TS_RevokeAndACK_clone(uint32_t
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_RevokeAndACK_free(uint32_t this_ptr) {
+       LDKRevokeAndACK this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       RevokeAndACK_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_RevokeAndACK_get_channel_id(uint32_t this_ptr) {
        LDKRevokeAndACK this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -10126,18 +12100,11 @@ uint32_t  __attribute__((visibility("default"))) TS_RevokeAndACK_new(int8_tArray
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_UpdateFee_free(uint32_t this_ptr) {
-       LDKUpdateFee this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       UpdateFee_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_UpdateFee_clone(uint32_t orig) {
-       LDKUpdateFee orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_RevokeAndACK_clone(uint32_t orig) {
+       LDKRevokeAndACK orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKUpdateFee ret_var = UpdateFee_clone(&orig_conv);
+       LDKRevokeAndACK ret_var = RevokeAndACK_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -10147,6 +12114,13 @@ uint32_t  __attribute__((visibility("default"))) TS_UpdateFee_clone(uint32_t ori
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_UpdateFee_free(uint32_t this_ptr) {
+       LDKUpdateFee this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       UpdateFee_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_UpdateFee_get_channel_id(uint32_t this_ptr) {
        LDKUpdateFee this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -10195,18 +12169,11 @@ uint32_t  __attribute__((visibility("default"))) TS_UpdateFee_new(int8_tArray ch
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_DataLossProtect_free(uint32_t this_ptr) {
-       LDKDataLossProtect this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       DataLossProtect_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_DataLossProtect_clone(uint32_t orig) {
-       LDKDataLossProtect orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_UpdateFee_clone(uint32_t orig) {
+       LDKUpdateFee orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKDataLossProtect ret_var = DataLossProtect_clone(&orig_conv);
+       LDKUpdateFee ret_var = UpdateFee_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -10216,6 +12183,13 @@ uint32_t  __attribute__((visibility("default"))) TS_DataLossProtect_clone(uint32
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_DataLossProtect_free(uint32_t this_ptr) {
+       LDKDataLossProtect this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       DataLossProtect_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_DataLossProtect_get_your_last_per_commitment_secret(uint32_t this_ptr) {
        LDKDataLossProtect this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -10271,18 +12245,11 @@ uint32_t  __attribute__((visibility("default"))) TS_DataLossProtect_new(int8_tAr
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelReestablish_free(uint32_t this_ptr) {
-       LDKChannelReestablish this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       ChannelReestablish_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_ChannelReestablish_clone(uint32_t orig) {
-       LDKChannelReestablish orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_DataLossProtect_clone(uint32_t orig) {
+       LDKDataLossProtect orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKChannelReestablish ret_var = ChannelReestablish_clone(&orig_conv);
+       LDKDataLossProtect ret_var = DataLossProtect_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -10292,6 +12259,13 @@ uint32_t  __attribute__((visibility("default"))) TS_ChannelReestablish_clone(uin
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_ChannelReestablish_free(uint32_t this_ptr) {
+       LDKChannelReestablish this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       ChannelReestablish_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_ChannelReestablish_get_channel_id(uint32_t this_ptr) {
        LDKChannelReestablish this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -10341,18 +12315,11 @@ void  __attribute__((visibility("default"))) TS_ChannelReestablish_set_next_remo
        ChannelReestablish_set_next_remote_commitment_number(&this_ptr_conv, val);
 }
 
-void  __attribute__((visibility("default"))) TS_AnnouncementSignatures_free(uint32_t this_ptr) {
-       LDKAnnouncementSignatures this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       AnnouncementSignatures_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_AnnouncementSignatures_clone(uint32_t orig) {
-       LDKAnnouncementSignatures orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_ChannelReestablish_clone(uint32_t orig) {
+       LDKChannelReestablish orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKAnnouncementSignatures ret_var = AnnouncementSignatures_clone(&orig_conv);
+       LDKChannelReestablish ret_var = ChannelReestablish_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -10362,6 +12329,13 @@ uint32_t  __attribute__((visibility("default"))) TS_AnnouncementSignatures_clone
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_AnnouncementSignatures_free(uint32_t this_ptr) {
+       LDKAnnouncementSignatures this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       AnnouncementSignatures_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_AnnouncementSignatures_get_channel_id(uint32_t this_ptr) {
        LDKAnnouncementSignatures this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -10454,6 +12428,20 @@ uint32_t  __attribute__((visibility("default"))) TS_AnnouncementSignatures_new(i
        return ret_ref;
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_AnnouncementSignatures_clone(uint32_t orig) {
+       LDKAnnouncementSignatures orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKAnnouncementSignatures ret_var = AnnouncementSignatures_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 void  __attribute__((visibility("default"))) TS_NetAddress_free(uint32_t this_ptr) {
        if ((this_ptr & 1) != 0) return;
        LDKNetAddress this_ptr_conv = *(LDKNetAddress*)(((uint64_t)this_ptr) & ~1);
@@ -10494,20 +12482,6 @@ void  __attribute__((visibility("default"))) TS_UnsignedNodeAnnouncement_free(ui
        UnsignedNodeAnnouncement_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_UnsignedNodeAnnouncement_clone(uint32_t orig) {
-       LDKUnsignedNodeAnnouncement orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKUnsignedNodeAnnouncement ret_var = UnsignedNodeAnnouncement_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 uint32_t  __attribute__((visibility("default"))) TS_UnsignedNodeAnnouncement_get_features(uint32_t this_ptr) {
        LDKUnsignedNodeAnnouncement this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -10529,7 +12503,7 @@ void  __attribute__((visibility("default"))) TS_UnsignedNodeAnnouncement_set_fea
        LDKNodeFeatures val_conv;
        val_conv.inner = (void*)(val & (~1));
        val_conv.is_owned = (val & 1) || (val == 0);
-       // Warning: we need a move here but no clone is available for LDKNodeFeatures
+       val_conv = NodeFeatures_clone(&val_conv);
        UnsignedNodeAnnouncement_set_features(&this_ptr_conv, val_conv);
 }
 
@@ -10625,18 +12599,11 @@ void  __attribute__((visibility("default"))) TS_UnsignedNodeAnnouncement_set_add
        UnsignedNodeAnnouncement_set_addresses(&this_ptr_conv, val_constr);
 }
 
-void  __attribute__((visibility("default"))) TS_NodeAnnouncement_free(uint32_t this_ptr) {
-       LDKNodeAnnouncement this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       NodeAnnouncement_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_NodeAnnouncement_clone(uint32_t orig) {
-       LDKNodeAnnouncement orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_UnsignedNodeAnnouncement_clone(uint32_t orig) {
+       LDKUnsignedNodeAnnouncement orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKNodeAnnouncement ret_var = NodeAnnouncement_clone(&orig_conv);
+       LDKUnsignedNodeAnnouncement ret_var = UnsignedNodeAnnouncement_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -10646,6 +12613,13 @@ uint32_t  __attribute__((visibility("default"))) TS_NodeAnnouncement_clone(uint3
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_NodeAnnouncement_free(uint32_t this_ptr) {
+       LDKNodeAnnouncement this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       NodeAnnouncement_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_NodeAnnouncement_get_signature(uint32_t this_ptr) {
        LDKNodeAnnouncement this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -10708,18 +12682,11 @@ uint32_t  __attribute__((visibility("default"))) TS_NodeAnnouncement_new(int8_tA
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_UnsignedChannelAnnouncement_free(uint32_t this_ptr) {
-       LDKUnsignedChannelAnnouncement this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       UnsignedChannelAnnouncement_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_UnsignedChannelAnnouncement_clone(uint32_t orig) {
-       LDKUnsignedChannelAnnouncement orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_NodeAnnouncement_clone(uint32_t orig) {
+       LDKNodeAnnouncement orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKUnsignedChannelAnnouncement ret_var = UnsignedChannelAnnouncement_clone(&orig_conv);
+       LDKNodeAnnouncement ret_var = NodeAnnouncement_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -10729,6 +12696,13 @@ uint32_t  __attribute__((visibility("default"))) TS_UnsignedChannelAnnouncement_
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_UnsignedChannelAnnouncement_free(uint32_t this_ptr) {
+       LDKUnsignedChannelAnnouncement this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       UnsignedChannelAnnouncement_free(this_ptr_conv);
+}
+
 uint32_t  __attribute__((visibility("default"))) TS_UnsignedChannelAnnouncement_get_features(uint32_t this_ptr) {
        LDKUnsignedChannelAnnouncement this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -10750,7 +12724,7 @@ void  __attribute__((visibility("default"))) TS_UnsignedChannelAnnouncement_set_
        LDKChannelFeatures val_conv;
        val_conv.inner = (void*)(val & (~1));
        val_conv.is_owned = (val & 1) || (val == 0);
-       // Warning: we need a move here but no clone is available for LDKChannelFeatures
+       val_conv = ChannelFeatures_clone(&val_conv);
        UnsignedChannelAnnouncement_set_features(&this_ptr_conv, val_conv);
 }
 
@@ -10860,22 +12834,15 @@ void  __attribute__((visibility("default"))) TS_UnsignedChannelAnnouncement_set_
        this_ptr_conv.is_owned = false;
        LDKPublicKey val_ref;
        CHECK(*((uint32_t*)val) == 33);
-       memcpy(val_ref.compressed_form, (uint8_t*)(val + 4), 33);
-       UnsignedChannelAnnouncement_set_bitcoin_key_2(&this_ptr_conv, val_ref);
-}
-
-void  __attribute__((visibility("default"))) TS_ChannelAnnouncement_free(uint32_t this_ptr) {
-       LDKChannelAnnouncement this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       ChannelAnnouncement_free(this_ptr_conv);
+       memcpy(val_ref.compressed_form, (uint8_t*)(val + 4), 33);
+       UnsignedChannelAnnouncement_set_bitcoin_key_2(&this_ptr_conv, val_ref);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_ChannelAnnouncement_clone(uint32_t orig) {
-       LDKChannelAnnouncement orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_UnsignedChannelAnnouncement_clone(uint32_t orig) {
+       LDKUnsignedChannelAnnouncement orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKChannelAnnouncement ret_var = ChannelAnnouncement_clone(&orig_conv);
+       LDKUnsignedChannelAnnouncement ret_var = UnsignedChannelAnnouncement_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -10885,6 +12852,13 @@ uint32_t  __attribute__((visibility("default"))) TS_ChannelAnnouncement_clone(ui
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_ChannelAnnouncement_free(uint32_t this_ptr) {
+       LDKChannelAnnouncement this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       ChannelAnnouncement_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_ChannelAnnouncement_get_node_signature_1(uint32_t this_ptr) {
        LDKChannelAnnouncement this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -11013,18 +12987,11 @@ uint32_t  __attribute__((visibility("default"))) TS_ChannelAnnouncement_new(int8
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_UnsignedChannelUpdate_free(uint32_t this_ptr) {
-       LDKUnsignedChannelUpdate this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       UnsignedChannelUpdate_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_UnsignedChannelUpdate_clone(uint32_t orig) {
-       LDKUnsignedChannelUpdate orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_ChannelAnnouncement_clone(uint32_t orig) {
+       LDKChannelAnnouncement orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKUnsignedChannelUpdate ret_var = UnsignedChannelUpdate_clone(&orig_conv);
+       LDKChannelAnnouncement ret_var = ChannelAnnouncement_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -11034,6 +13001,13 @@ uint32_t  __attribute__((visibility("default"))) TS_UnsignedChannelUpdate_clone(
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_UnsignedChannelUpdate_free(uint32_t this_ptr) {
+       LDKUnsignedChannelUpdate this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       UnsignedChannelUpdate_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_UnsignedChannelUpdate_get_chain_hash(uint32_t this_ptr) {
        LDKUnsignedChannelUpdate this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -11158,18 +13132,11 @@ void  __attribute__((visibility("default"))) TS_UnsignedChannelUpdate_set_fee_pr
        UnsignedChannelUpdate_set_fee_proportional_millionths(&this_ptr_conv, val);
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelUpdate_free(uint32_t this_ptr) {
-       LDKChannelUpdate this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       ChannelUpdate_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_ChannelUpdate_clone(uint32_t orig) {
-       LDKChannelUpdate orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_UnsignedChannelUpdate_clone(uint32_t orig) {
+       LDKUnsignedChannelUpdate orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKChannelUpdate ret_var = ChannelUpdate_clone(&orig_conv);
+       LDKUnsignedChannelUpdate ret_var = UnsignedChannelUpdate_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -11179,6 +13146,13 @@ uint32_t  __attribute__((visibility("default"))) TS_ChannelUpdate_clone(uint32_t
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_ChannelUpdate_free(uint32_t this_ptr) {
+       LDKChannelUpdate this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       ChannelUpdate_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_ChannelUpdate_get_signature(uint32_t this_ptr) {
        LDKChannelUpdate this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -11241,18 +13215,11 @@ uint32_t  __attribute__((visibility("default"))) TS_ChannelUpdate_new(int8_tArra
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_QueryChannelRange_free(uint32_t this_ptr) {
-       LDKQueryChannelRange this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       QueryChannelRange_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_QueryChannelRange_clone(uint32_t orig) {
-       LDKQueryChannelRange orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_ChannelUpdate_clone(uint32_t orig) {
+       LDKChannelUpdate orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKQueryChannelRange ret_var = QueryChannelRange_clone(&orig_conv);
+       LDKChannelUpdate ret_var = ChannelUpdate_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -11262,6 +13229,13 @@ uint32_t  __attribute__((visibility("default"))) TS_QueryChannelRange_clone(uint
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_QueryChannelRange_free(uint32_t this_ptr) {
+       LDKQueryChannelRange this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       QueryChannelRange_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_QueryChannelRange_get_chain_hash(uint32_t this_ptr) {
        LDKQueryChannelRange this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -11325,18 +13299,11 @@ uint32_t  __attribute__((visibility("default"))) TS_QueryChannelRange_new(int8_t
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_ReplyChannelRange_free(uint32_t this_ptr) {
-       LDKReplyChannelRange this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       ReplyChannelRange_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_ReplyChannelRange_clone(uint32_t orig) {
-       LDKReplyChannelRange orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_QueryChannelRange_clone(uint32_t orig) {
+       LDKQueryChannelRange orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKReplyChannelRange ret_var = ReplyChannelRange_clone(&orig_conv);
+       LDKQueryChannelRange ret_var = QueryChannelRange_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -11346,6 +13313,13 @@ uint32_t  __attribute__((visibility("default"))) TS_ReplyChannelRange_clone(uint
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_ReplyChannelRange_free(uint32_t this_ptr) {
+       LDKReplyChannelRange this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       ReplyChannelRange_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_ReplyChannelRange_get_chain_hash(uint32_t this_ptr) {
        LDKReplyChannelRange this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -11395,19 +13369,19 @@ void  __attribute__((visibility("default"))) TS_ReplyChannelRange_set_number_of_
        ReplyChannelRange_set_number_of_blocks(&this_ptr_conv, val);
 }
 
-jboolean  __attribute__((visibility("default"))) TS_ReplyChannelRange_get_full_information(uint32_t this_ptr) {
+jboolean  __attribute__((visibility("default"))) TS_ReplyChannelRange_get_sync_complete(uint32_t this_ptr) {
        LDKReplyChannelRange this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       jboolean ret_val = ReplyChannelRange_get_full_information(&this_ptr_conv);
+       jboolean ret_val = ReplyChannelRange_get_sync_complete(&this_ptr_conv);
        return ret_val;
 }
 
-void  __attribute__((visibility("default"))) TS_ReplyChannelRange_set_full_information(uint32_t this_ptr, jboolean val) {
+void  __attribute__((visibility("default"))) TS_ReplyChannelRange_set_sync_complete(uint32_t this_ptr, jboolean val) {
        LDKReplyChannelRange this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       ReplyChannelRange_set_full_information(&this_ptr_conv, val);
+       ReplyChannelRange_set_sync_complete(&this_ptr_conv, val);
 }
 
 void  __attribute__((visibility("default"))) TS_ReplyChannelRange_set_short_channel_ids(uint32_t this_ptr, int64_tArray val) {
@@ -11428,7 +13402,7 @@ void  __attribute__((visibility("default"))) TS_ReplyChannelRange_set_short_chan
        ReplyChannelRange_set_short_channel_ids(&this_ptr_conv, val_constr);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_ReplyChannelRange_new(int8_tArray chain_hash_arg, int32_t first_blocknum_arg, int32_t number_of_blocks_arg, jboolean full_information_arg, int64_tArray short_channel_ids_arg) {
+uint32_t  __attribute__((visibility("default"))) TS_ReplyChannelRange_new(int8_tArray chain_hash_arg, int32_t first_blocknum_arg, int32_t number_of_blocks_arg, jboolean sync_complete_arg, int64_tArray short_channel_ids_arg) {
        LDKThirtyTwoBytes chain_hash_arg_ref;
        CHECK(*((uint32_t*)chain_hash_arg) == 32);
        memcpy(chain_hash_arg_ref.data, (uint8_t*)(chain_hash_arg + 4), 32);
@@ -11443,7 +13417,7 @@ uint32_t  __attribute__((visibility("default"))) TS_ReplyChannelRange_new(int8_t
                int64_t arr_conv_8 = short_channel_ids_arg_vals[i];
                short_channel_ids_arg_constr.data[i] = arr_conv_8;
        }
-       LDKReplyChannelRange ret_var = ReplyChannelRange_new(chain_hash_arg_ref, first_blocknum_arg, number_of_blocks_arg, full_information_arg, short_channel_ids_arg_constr);
+       LDKReplyChannelRange ret_var = ReplyChannelRange_new(chain_hash_arg_ref, first_blocknum_arg, number_of_blocks_arg, sync_complete_arg, short_channel_ids_arg_constr);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -11453,18 +13427,11 @@ uint32_t  __attribute__((visibility("default"))) TS_ReplyChannelRange_new(int8_t
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_QueryShortChannelIds_free(uint32_t this_ptr) {
-       LDKQueryShortChannelIds this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       QueryShortChannelIds_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_QueryShortChannelIds_clone(uint32_t orig) {
-       LDKQueryShortChannelIds orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_ReplyChannelRange_clone(uint32_t orig) {
+       LDKReplyChannelRange orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKQueryShortChannelIds ret_var = QueryShortChannelIds_clone(&orig_conv);
+       LDKReplyChannelRange ret_var = ReplyChannelRange_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -11474,6 +13441,13 @@ uint32_t  __attribute__((visibility("default"))) TS_QueryShortChannelIds_clone(u
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_QueryShortChannelIds_free(uint32_t this_ptr) {
+       LDKQueryShortChannelIds this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       QueryShortChannelIds_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_QueryShortChannelIds_get_chain_hash(uint32_t this_ptr) {
        LDKQueryShortChannelIds this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -11536,18 +13510,11 @@ uint32_t  __attribute__((visibility("default"))) TS_QueryShortChannelIds_new(int
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_ReplyShortChannelIdsEnd_free(uint32_t this_ptr) {
-       LDKReplyShortChannelIdsEnd this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       ReplyShortChannelIdsEnd_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_ReplyShortChannelIdsEnd_clone(uint32_t orig) {
-       LDKReplyShortChannelIdsEnd orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_QueryShortChannelIds_clone(uint32_t orig) {
+       LDKQueryShortChannelIds orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKReplyShortChannelIdsEnd ret_var = ReplyShortChannelIdsEnd_clone(&orig_conv);
+       LDKQueryShortChannelIds ret_var = QueryShortChannelIds_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -11557,6 +13524,13 @@ uint32_t  __attribute__((visibility("default"))) TS_ReplyShortChannelIdsEnd_clon
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_ReplyShortChannelIdsEnd_free(uint32_t this_ptr) {
+       LDKReplyShortChannelIdsEnd this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       ReplyShortChannelIdsEnd_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_ReplyShortChannelIdsEnd_get_chain_hash(uint32_t this_ptr) {
        LDKReplyShortChannelIdsEnd this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -11605,18 +13579,11 @@ uint32_t  __attribute__((visibility("default"))) TS_ReplyShortChannelIdsEnd_new(
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_GossipTimestampFilter_free(uint32_t this_ptr) {
-       LDKGossipTimestampFilter this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       GossipTimestampFilter_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_GossipTimestampFilter_clone(uint32_t orig) {
-       LDKGossipTimestampFilter orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_ReplyShortChannelIdsEnd_clone(uint32_t orig) {
+       LDKReplyShortChannelIdsEnd orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKGossipTimestampFilter ret_var = GossipTimestampFilter_clone(&orig_conv);
+       LDKReplyShortChannelIdsEnd ret_var = ReplyShortChannelIdsEnd_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -11626,6 +13593,13 @@ uint32_t  __attribute__((visibility("default"))) TS_GossipTimestampFilter_clone(
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_GossipTimestampFilter_free(uint32_t this_ptr) {
+       LDKGossipTimestampFilter this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       GossipTimestampFilter_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_GossipTimestampFilter_get_chain_hash(uint32_t this_ptr) {
        LDKGossipTimestampFilter this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -11689,6 +13663,20 @@ uint32_t  __attribute__((visibility("default"))) TS_GossipTimestampFilter_new(in
        return ret_ref;
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_GossipTimestampFilter_clone(uint32_t orig) {
+       LDKGossipTimestampFilter orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKGossipTimestampFilter ret_var = GossipTimestampFilter_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 void  __attribute__((visibility("default"))) TS_ErrorAction_free(uint32_t this_ptr) {
        if ((this_ptr & 1) != 0) return;
        LDKErrorAction this_ptr_conv = *(LDKErrorAction*)(((uint64_t)this_ptr) & ~1);
@@ -11711,20 +13699,6 @@ void  __attribute__((visibility("default"))) TS_LightningError_free(uint32_t thi
        LightningError_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_LightningError_clone(uint32_t orig) {
-       LDKLightningError orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKLightningError ret_var = LightningError_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 jstring  __attribute__((visibility("default"))) TS_LightningError_get_err(uint32_t this_ptr) {
        LDKLightningError this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -11781,18 +13755,11 @@ uint32_t  __attribute__((visibility("default"))) TS_LightningError_new(int8_tArr
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_CommitmentUpdate_free(uint32_t this_ptr) {
-       LDKCommitmentUpdate this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       CommitmentUpdate_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_CommitmentUpdate_clone(uint32_t orig) {
-       LDKCommitmentUpdate orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_LightningError_clone(uint32_t orig) {
+       LDKLightningError orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKCommitmentUpdate ret_var = CommitmentUpdate_clone(&orig_conv);
+       LDKLightningError ret_var = LightningError_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -11802,6 +13769,13 @@ uint32_t  __attribute__((visibility("default"))) TS_CommitmentUpdate_clone(uint3
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_CommitmentUpdate_free(uint32_t this_ptr) {
+       LDKCommitmentUpdate this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       CommitmentUpdate_free(this_ptr_conv);
+}
+
 void  __attribute__((visibility("default"))) TS_CommitmentUpdate_set_update_add_htlcs(uint32_t this_ptr, uint32_tArray val) {
        LDKCommitmentUpdate this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -12019,6 +13993,20 @@ uint32_t  __attribute__((visibility("default"))) TS_CommitmentUpdate_new(uint32_
        return ret_ref;
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_CommitmentUpdate_clone(uint32_t orig) {
+       LDKCommitmentUpdate orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKCommitmentUpdate ret_var = CommitmentUpdate_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 void  __attribute__((visibility("default"))) TS_HTLCFailChannelUpdate_free(uint32_t this_ptr) {
        if ((this_ptr & 1) != 0) return;
        LDKHTLCFailChannelUpdate this_ptr_conv = *(LDKHTLCFailChannelUpdate*)(((uint64_t)this_ptr) & ~1);
@@ -12063,14 +14051,9 @@ uint32_t  __attribute__((visibility("default"))) TS_AcceptChannel_read(int8_tArr
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKAcceptChannel ret_var = AcceptChannel_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_AcceptChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AcceptChannelDecodeErrorZ), "LDKCResult_AcceptChannelDecodeErrorZ");
+       *ret_conv = AcceptChannel_read(ser_ref);
+       return (long)ret_conv;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_AnnouncementSignatures_write(uint32_t obj) {
@@ -12088,14 +14071,9 @@ uint32_t  __attribute__((visibility("default"))) TS_AnnouncementSignatures_read(
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKAnnouncementSignatures ret_var = AnnouncementSignatures_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_AnnouncementSignaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AnnouncementSignaturesDecodeErrorZ), "LDKCResult_AnnouncementSignaturesDecodeErrorZ");
+       *ret_conv = AnnouncementSignatures_read(ser_ref);
+       return (long)ret_conv;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_ChannelReestablish_write(uint32_t obj) {
@@ -12133,14 +14111,9 @@ uint32_t  __attribute__((visibility("default"))) TS_ClosingSigned_read(int8_tArr
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKClosingSigned ret_var = ClosingSigned_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_ClosingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ClosingSignedDecodeErrorZ), "LDKCResult_ClosingSignedDecodeErrorZ");
+       *ret_conv = ClosingSigned_read(ser_ref);
+       return (long)ret_conv;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_CommitmentSigned_write(uint32_t obj) {
@@ -12158,14 +14131,9 @@ uint32_t  __attribute__((visibility("default"))) TS_CommitmentSigned_read(int8_t
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKCommitmentSigned ret_var = CommitmentSigned_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_CommitmentSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentSignedDecodeErrorZ), "LDKCResult_CommitmentSignedDecodeErrorZ");
+       *ret_conv = CommitmentSigned_read(ser_ref);
+       return (long)ret_conv;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_FundingCreated_write(uint32_t obj) {
@@ -12183,14 +14151,9 @@ uint32_t  __attribute__((visibility("default"))) TS_FundingCreated_read(int8_tAr
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKFundingCreated ret_var = FundingCreated_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_FundingCreatedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingCreatedDecodeErrorZ), "LDKCResult_FundingCreatedDecodeErrorZ");
+       *ret_conv = FundingCreated_read(ser_ref);
+       return (long)ret_conv;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_FundingSigned_write(uint32_t obj) {
@@ -12208,14 +14171,9 @@ uint32_t  __attribute__((visibility("default"))) TS_FundingSigned_read(int8_tArr
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKFundingSigned ret_var = FundingSigned_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_FundingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingSignedDecodeErrorZ), "LDKCResult_FundingSignedDecodeErrorZ");
+       *ret_conv = FundingSigned_read(ser_ref);
+       return (long)ret_conv;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_FundingLocked_write(uint32_t obj) {
@@ -12233,14 +14191,9 @@ uint32_t  __attribute__((visibility("default"))) TS_FundingLocked_read(int8_tArr
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKFundingLocked ret_var = FundingLocked_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_FundingLockedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingLockedDecodeErrorZ), "LDKCResult_FundingLockedDecodeErrorZ");
+       *ret_conv = FundingLocked_read(ser_ref);
+       return (long)ret_conv;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_Init_write(uint32_t obj) {
@@ -12278,14 +14231,9 @@ uint32_t  __attribute__((visibility("default"))) TS_OpenChannel_read(int8_tArray
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKOpenChannel ret_var = OpenChannel_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_OpenChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OpenChannelDecodeErrorZ), "LDKCResult_OpenChannelDecodeErrorZ");
+       *ret_conv = OpenChannel_read(ser_ref);
+       return (long)ret_conv;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_RevokeAndACK_write(uint32_t obj) {
@@ -12303,14 +14251,9 @@ uint32_t  __attribute__((visibility("default"))) TS_RevokeAndACK_read(int8_tArra
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKRevokeAndACK ret_var = RevokeAndACK_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_RevokeAndACKDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RevokeAndACKDecodeErrorZ), "LDKCResult_RevokeAndACKDecodeErrorZ");
+       *ret_conv = RevokeAndACK_read(ser_ref);
+       return (long)ret_conv;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_Shutdown_write(uint32_t obj) {
@@ -12328,14 +14271,9 @@ uint32_t  __attribute__((visibility("default"))) TS_Shutdown_read(int8_tArray se
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKShutdown ret_var = Shutdown_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_ShutdownDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ShutdownDecodeErrorZ), "LDKCResult_ShutdownDecodeErrorZ");
+       *ret_conv = Shutdown_read(ser_ref);
+       return (long)ret_conv;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_UpdateFailHTLC_write(uint32_t obj) {
@@ -12353,14 +14291,9 @@ uint32_t  __attribute__((visibility("default"))) TS_UpdateFailHTLC_read(int8_tAr
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKUpdateFailHTLC ret_var = UpdateFailHTLC_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_UpdateFailHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailHTLCDecodeErrorZ), "LDKCResult_UpdateFailHTLCDecodeErrorZ");
+       *ret_conv = UpdateFailHTLC_read(ser_ref);
+       return (long)ret_conv;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_UpdateFailMalformedHTLC_write(uint32_t obj) {
@@ -12378,14 +14311,9 @@ uint32_t  __attribute__((visibility("default"))) TS_UpdateFailMalformedHTLC_read
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKUpdateFailMalformedHTLC ret_var = UpdateFailMalformedHTLC_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ), "LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ");
+       *ret_conv = UpdateFailMalformedHTLC_read(ser_ref);
+       return (long)ret_conv;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_UpdateFee_write(uint32_t obj) {
@@ -12403,14 +14331,9 @@ uint32_t  __attribute__((visibility("default"))) TS_UpdateFee_read(int8_tArray s
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKUpdateFee ret_var = UpdateFee_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_UpdateFeeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFeeDecodeErrorZ), "LDKCResult_UpdateFeeDecodeErrorZ");
+       *ret_conv = UpdateFee_read(ser_ref);
+       return (long)ret_conv;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_UpdateFulfillHTLC_write(uint32_t obj) {
@@ -12428,14 +14351,9 @@ uint32_t  __attribute__((visibility("default"))) TS_UpdateFulfillHTLC_read(int8_
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKUpdateFulfillHTLC ret_var = UpdateFulfillHTLC_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_UpdateFulfillHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFulfillHTLCDecodeErrorZ), "LDKCResult_UpdateFulfillHTLCDecodeErrorZ");
+       *ret_conv = UpdateFulfillHTLC_read(ser_ref);
+       return (long)ret_conv;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_UpdateAddHTLC_write(uint32_t obj) {
@@ -12453,14 +14371,9 @@ uint32_t  __attribute__((visibility("default"))) TS_UpdateAddHTLC_read(int8_tArr
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKUpdateAddHTLC ret_var = UpdateAddHTLC_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_UpdateAddHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateAddHTLCDecodeErrorZ), "LDKCResult_UpdateAddHTLCDecodeErrorZ");
+       *ret_conv = UpdateAddHTLC_read(ser_ref);
+       return (long)ret_conv;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_Ping_write(uint32_t obj) {
@@ -12538,14 +14451,9 @@ uint32_t  __attribute__((visibility("default"))) TS_ChannelAnnouncement_read(int
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKChannelAnnouncement ret_var = ChannelAnnouncement_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_ChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelAnnouncementDecodeErrorZ), "LDKCResult_ChannelAnnouncementDecodeErrorZ");
+       *ret_conv = ChannelAnnouncement_read(ser_ref);
+       return (long)ret_conv;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_UnsignedChannelUpdate_write(uint32_t obj) {
@@ -12583,14 +14491,9 @@ uint32_t  __attribute__((visibility("default"))) TS_ChannelUpdate_read(int8_tArr
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKChannelUpdate ret_var = ChannelUpdate_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_ChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelUpdateDecodeErrorZ), "LDKCResult_ChannelUpdateDecodeErrorZ");
+       *ret_conv = ChannelUpdate_read(ser_ref);
+       return (long)ret_conv;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_ErrorMessage_write(uint32_t obj) {
@@ -12648,14 +14551,9 @@ uint32_t  __attribute__((visibility("default"))) TS_NodeAnnouncement_read(int8_t
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKNodeAnnouncement ret_var = NodeAnnouncement_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_NodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementDecodeErrorZ), "LDKCResult_NodeAnnouncementDecodeErrorZ");
+       *ret_conv = NodeAnnouncement_read(ser_ref);
+       return (long)ret_conv;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_QueryShortChannelIds_read(int8_tArray ser) {
@@ -12831,20 +14729,6 @@ void  __attribute__((visibility("default"))) TS_PeerHandleError_free(uint32_t th
        PeerHandleError_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_PeerHandleError_clone(uint32_t orig) {
-       LDKPeerHandleError orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKPeerHandleError ret_var = PeerHandleError_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 jboolean  __attribute__((visibility("default"))) TS_PeerHandleError_get_no_connection_possible(uint32_t this_ptr) {
        LDKPeerHandleError this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -12871,6 +14755,20 @@ uint32_t  __attribute__((visibility("default"))) TS_PeerHandleError_new(jboolean
        return ret_ref;
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_PeerHandleError_clone(uint32_t orig) {
+       LDKPeerHandleError orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKPeerHandleError ret_var = PeerHandleError_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 void  __attribute__((visibility("default"))) TS_PeerManager_free(uint32_t this_ptr) {
        LDKPeerManager this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -13013,7 +14911,7 @@ uint32_t  __attribute__((visibility("default"))) TS_derive_private_key(int8_tArr
        CHECK(*((uint32_t*)base_secret) == 32);
        memcpy(base_secret_arr, (uint8_t*)(base_secret + 4), 32);
        unsigned char (*base_secret_ref)[32] = &base_secret_arr;
-       LDKCResult_SecretKeySecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SecretKeySecpErrorZ), "LDKCResult_SecretKeySecpErrorZ");
+       LDKCResult_SecretKeyErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SecretKeyErrorZ), "LDKCResult_SecretKeyErrorZ");
        *ret_conv = derive_private_key(per_commitment_point_ref, base_secret_ref);
        return (long)ret_conv;
 }
@@ -13025,7 +14923,7 @@ uint32_t  __attribute__((visibility("default"))) TS_derive_public_key(int8_tArra
        LDKPublicKey base_point_ref;
        CHECK(*((uint32_t*)base_point) == 33);
        memcpy(base_point_ref.compressed_form, (uint8_t*)(base_point + 4), 33);
-       LDKCResult_PublicKeySecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecpErrorZ), "LDKCResult_PublicKeySecpErrorZ");
+       LDKCResult_PublicKeyErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyErrorZ), "LDKCResult_PublicKeyErrorZ");
        *ret_conv = derive_public_key(per_commitment_point_ref, base_point_ref);
        return (long)ret_conv;
 }
@@ -13039,7 +14937,7 @@ uint32_t  __attribute__((visibility("default"))) TS_derive_private_revocation_ke
        CHECK(*((uint32_t*)countersignatory_revocation_base_secret) == 32);
        memcpy(countersignatory_revocation_base_secret_arr, (uint8_t*)(countersignatory_revocation_base_secret + 4), 32);
        unsigned char (*countersignatory_revocation_base_secret_ref)[32] = &countersignatory_revocation_base_secret_arr;
-       LDKCResult_SecretKeySecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SecretKeySecpErrorZ), "LDKCResult_SecretKeySecpErrorZ");
+       LDKCResult_SecretKeyErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SecretKeyErrorZ), "LDKCResult_SecretKeyErrorZ");
        *ret_conv = derive_private_revocation_key(per_commitment_secret_ref, countersignatory_revocation_base_secret_ref);
        return (long)ret_conv;
 }
@@ -13051,7 +14949,7 @@ uint32_t  __attribute__((visibility("default"))) TS_derive_public_revocation_key
        LDKPublicKey countersignatory_revocation_base_point_ref;
        CHECK(*((uint32_t*)countersignatory_revocation_base_point) == 33);
        memcpy(countersignatory_revocation_base_point_ref.compressed_form, (uint8_t*)(countersignatory_revocation_base_point + 4), 33);
-       LDKCResult_PublicKeySecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecpErrorZ), "LDKCResult_PublicKeySecpErrorZ");
+       LDKCResult_PublicKeyErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyErrorZ), "LDKCResult_PublicKeyErrorZ");
        *ret_conv = derive_public_revocation_key(per_commitment_point_ref, countersignatory_revocation_base_point_ref);
        return (long)ret_conv;
 }
@@ -13063,20 +14961,6 @@ void  __attribute__((visibility("default"))) TS_TxCreationKeys_free(uint32_t thi
        TxCreationKeys_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_TxCreationKeys_clone(uint32_t orig) {
-       LDKTxCreationKeys orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKTxCreationKeys ret_var = TxCreationKeys_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 int8_tArray  __attribute__((visibility("default"))) TS_TxCreationKeys_get_per_commitment_point(uint32_t this_ptr) {
        LDKTxCreationKeys this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -13198,6 +15082,20 @@ uint32_t  __attribute__((visibility("default"))) TS_TxCreationKeys_new(int8_tArr
        return ret_ref;
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_TxCreationKeys_clone(uint32_t orig) {
+       LDKTxCreationKeys orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKTxCreationKeys ret_var = TxCreationKeys_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_TxCreationKeys_write(uint32_t obj) {
        LDKTxCreationKeys obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
@@ -13213,14 +15111,9 @@ uint32_t  __attribute__((visibility("default"))) TS_TxCreationKeys_read(int8_tAr
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKTxCreationKeys ret_var = TxCreationKeys_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_TxCreationKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysDecodeErrorZ), "LDKCResult_TxCreationKeysDecodeErrorZ");
+       *ret_conv = TxCreationKeys_read(ser_ref);
+       return (long)ret_conv;
 }
 
 void  __attribute__((visibility("default"))) TS_ChannelPublicKeys_free(uint32_t this_ptr) {
@@ -13230,20 +15123,6 @@ void  __attribute__((visibility("default"))) TS_ChannelPublicKeys_free(uint32_t
        ChannelPublicKeys_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_ChannelPublicKeys_clone(uint32_t orig) {
-       LDKChannelPublicKeys orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKChannelPublicKeys ret_var = ChannelPublicKeys_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 int8_tArray  __attribute__((visibility("default"))) TS_ChannelPublicKeys_get_funding_pubkey(uint32_t this_ptr) {
        LDKChannelPublicKeys this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -13365,6 +15244,20 @@ uint32_t  __attribute__((visibility("default"))) TS_ChannelPublicKeys_new(int8_t
        return ret_ref;
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_ChannelPublicKeys_clone(uint32_t orig) {
+       LDKChannelPublicKeys orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKChannelPublicKeys ret_var = ChannelPublicKeys_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_ChannelPublicKeys_write(uint32_t obj) {
        LDKChannelPublicKeys obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
@@ -13380,14 +15273,9 @@ uint32_t  __attribute__((visibility("default"))) TS_ChannelPublicKeys_read(int8_
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKChannelPublicKeys ret_var = ChannelPublicKeys_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_ChannelPublicKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelPublicKeysDecodeErrorZ), "LDKCResult_ChannelPublicKeysDecodeErrorZ");
+       *ret_conv = ChannelPublicKeys_read(ser_ref);
+       return (long)ret_conv;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_TxCreationKeys_derive_new(int8_tArray per_commitment_point, int8_tArray broadcaster_delayed_payment_base, int8_tArray broadcaster_htlc_base, int8_tArray countersignatory_revocation_base, int8_tArray countersignatory_htlc_base) {
@@ -13406,7 +15294,7 @@ uint32_t  __attribute__((visibility("default"))) TS_TxCreationKeys_derive_new(in
        LDKPublicKey countersignatory_htlc_base_ref;
        CHECK(*((uint32_t*)countersignatory_htlc_base) == 33);
        memcpy(countersignatory_htlc_base_ref.compressed_form, (uint8_t*)(countersignatory_htlc_base + 4), 33);
-       LDKCResult_TxCreationKeysSecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysSecpErrorZ), "LDKCResult_TxCreationKeysSecpErrorZ");
+       LDKCResult_TxCreationKeysErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysErrorZ), "LDKCResult_TxCreationKeysErrorZ");
        *ret_conv = TxCreationKeys_derive_new(per_commitment_point_ref, broadcaster_delayed_payment_base_ref, broadcaster_htlc_base_ref, countersignatory_revocation_base_ref, countersignatory_htlc_base_ref);
        return (long)ret_conv;
 }
@@ -13421,7 +15309,7 @@ uint32_t  __attribute__((visibility("default"))) TS_TxCreationKeys_from_channel_
        LDKChannelPublicKeys countersignatory_keys_conv;
        countersignatory_keys_conv.inner = (void*)(countersignatory_keys & (~1));
        countersignatory_keys_conv.is_owned = false;
-       LDKCResult_TxCreationKeysSecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysSecpErrorZ), "LDKCResult_TxCreationKeysSecpErrorZ");
+       LDKCResult_TxCreationKeysErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysErrorZ), "LDKCResult_TxCreationKeysErrorZ");
        *ret_conv = TxCreationKeys_from_channel_static_keys(per_commitment_point_ref, &broadcaster_keys_conv, &countersignatory_keys_conv);
        return (long)ret_conv;
 }
@@ -13447,20 +15335,6 @@ void  __attribute__((visibility("default"))) TS_HTLCOutputInCommitment_free(uint
        HTLCOutputInCommitment_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_HTLCOutputInCommitment_clone(uint32_t orig) {
-       LDKHTLCOutputInCommitment orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKHTLCOutputInCommitment ret_var = HTLCOutputInCommitment_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 jboolean  __attribute__((visibility("default"))) TS_HTLCOutputInCommitment_get_offered(uint32_t this_ptr) {
        LDKHTLCOutputInCommitment this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -13525,6 +15399,20 @@ void  __attribute__((visibility("default"))) TS_HTLCOutputInCommitment_set_payme
        HTLCOutputInCommitment_set_payment_hash(&this_ptr_conv, val_ref);
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_HTLCOutputInCommitment_clone(uint32_t orig) {
+       LDKHTLCOutputInCommitment orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKHTLCOutputInCommitment ret_var = HTLCOutputInCommitment_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_HTLCOutputInCommitment_write(uint32_t obj) {
        LDKHTLCOutputInCommitment obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
@@ -13540,14 +15428,9 @@ uint32_t  __attribute__((visibility("default"))) TS_HTLCOutputInCommitment_read(
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKHTLCOutputInCommitment ret_var = HTLCOutputInCommitment_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_HTLCOutputInCommitmentDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ), "LDKCResult_HTLCOutputInCommitmentDecodeErrorZ");
+       *ret_conv = HTLCOutputInCommitment_read(ser_ref);
+       return (long)ret_conv;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_get_htlc_redeemscript(uint32_t htlc, uint32_t keys) {
@@ -13603,21 +15486,7 @@ void  __attribute__((visibility("default"))) TS_ChannelTransactionParameters_fre
        LDKChannelTransactionParameters this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       ChannelTransactionParameters_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_ChannelTransactionParameters_clone(uint32_t orig) {
-       LDKChannelTransactionParameters orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKChannelTransactionParameters ret_var = ChannelTransactionParameters_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       ChannelTransactionParameters_free(this_ptr_conv);
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_ChannelTransactionParameters_get_holder_pubkeys(uint32_t this_ptr) {
@@ -13748,18 +15617,11 @@ uint32_t  __attribute__((visibility("default"))) TS_ChannelTransactionParameters
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_CounterpartyChannelTransactionParameters_free(uint32_t this_ptr) {
-       LDKCounterpartyChannelTransactionParameters this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       CounterpartyChannelTransactionParameters_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_CounterpartyChannelTransactionParameters_clone(uint32_t orig) {
-       LDKCounterpartyChannelTransactionParameters orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_ChannelTransactionParameters_clone(uint32_t orig) {
+       LDKChannelTransactionParameters orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKCounterpartyChannelTransactionParameters ret_var = CounterpartyChannelTransactionParameters_clone(&orig_conv);
+       LDKChannelTransactionParameters ret_var = ChannelTransactionParameters_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -13769,6 +15631,13 @@ uint32_t  __attribute__((visibility("default"))) TS_CounterpartyChannelTransacti
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_CounterpartyChannelTransactionParameters_free(uint32_t this_ptr) {
+       LDKCounterpartyChannelTransactionParameters this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       CounterpartyChannelTransactionParameters_free(this_ptr_conv);
+}
+
 uint32_t  __attribute__((visibility("default"))) TS_CounterpartyChannelTransactionParameters_get_pubkeys(uint32_t this_ptr) {
        LDKCounterpartyChannelTransactionParameters this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -13824,6 +15693,20 @@ uint32_t  __attribute__((visibility("default"))) TS_CounterpartyChannelTransacti
        return ret_ref;
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_CounterpartyChannelTransactionParameters_clone(uint32_t orig) {
+       LDKCounterpartyChannelTransactionParameters orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKCounterpartyChannelTransactionParameters ret_var = CounterpartyChannelTransactionParameters_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 jboolean  __attribute__((visibility("default"))) TS_ChannelTransactionParameters_is_populated(uint32_t this_arg) {
        LDKChannelTransactionParameters this_arg_conv;
        this_arg_conv.inner = (void*)(this_arg & (~1));
@@ -13875,14 +15758,9 @@ uint32_t  __attribute__((visibility("default"))) TS_CounterpartyChannelTransacti
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKCounterpartyChannelTransactionParameters ret_var = CounterpartyChannelTransactionParameters_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ), "LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ");
+       *ret_conv = CounterpartyChannelTransactionParameters_read(ser_ref);
+       return (long)ret_conv;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_ChannelTransactionParameters_write(uint32_t obj) {
@@ -13900,14 +15778,9 @@ uint32_t  __attribute__((visibility("default"))) TS_ChannelTransactionParameters
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKChannelTransactionParameters ret_var = ChannelTransactionParameters_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_ChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTransactionParametersDecodeErrorZ), "LDKCResult_ChannelTransactionParametersDecodeErrorZ");
+       *ret_conv = ChannelTransactionParameters_read(ser_ref);
+       return (long)ret_conv;
 }
 
 void  __attribute__((visibility("default"))) TS_DirectedChannelTransactionParameters_free(uint32_t this_ptr) {
@@ -13982,20 +15855,6 @@ void  __attribute__((visibility("default"))) TS_HolderCommitmentTransaction_free
        HolderCommitmentTransaction_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_HolderCommitmentTransaction_clone(uint32_t orig) {
-       LDKHolderCommitmentTransaction orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKHolderCommitmentTransaction ret_var = HolderCommitmentTransaction_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 int8_tArray  __attribute__((visibility("default"))) TS_HolderCommitmentTransaction_get_counterparty_sig(uint32_t this_ptr) {
        LDKHolderCommitmentTransaction this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -14036,6 +15895,20 @@ void  __attribute__((visibility("default"))) TS_HolderCommitmentTransaction_set_
        HolderCommitmentTransaction_set_counterparty_htlc_sigs(&this_ptr_conv, val_constr);
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_HolderCommitmentTransaction_clone(uint32_t orig) {
+       LDKHolderCommitmentTransaction orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKHolderCommitmentTransaction ret_var = HolderCommitmentTransaction_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_HolderCommitmentTransaction_write(uint32_t obj) {
        LDKHolderCommitmentTransaction obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
@@ -14051,14 +15924,9 @@ uint32_t  __attribute__((visibility("default"))) TS_HolderCommitmentTransaction_
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKHolderCommitmentTransaction ret_var = HolderCommitmentTransaction_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_HolderCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HolderCommitmentTransactionDecodeErrorZ), "LDKCResult_HolderCommitmentTransactionDecodeErrorZ");
+       *ret_conv = HolderCommitmentTransaction_read(ser_ref);
+       return (long)ret_conv;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_HolderCommitmentTransaction_new(uint32_t commitment_tx, int8_tArray counterparty_sig, ptrArray counterparty_htlc_sigs, int8_tArray holder_funding_key, int8_tArray counterparty_funding_key) {
@@ -14106,20 +15974,6 @@ void  __attribute__((visibility("default"))) TS_BuiltCommitmentTransaction_free(
        BuiltCommitmentTransaction_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_BuiltCommitmentTransaction_clone(uint32_t orig) {
-       LDKBuiltCommitmentTransaction orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKBuiltCommitmentTransaction ret_var = BuiltCommitmentTransaction_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 int8_tArray  __attribute__((visibility("default"))) TS_BuiltCommitmentTransaction_get_transaction(uint32_t this_ptr) {
        LDKBuiltCommitmentTransaction this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -14181,6 +16035,20 @@ uint32_t  __attribute__((visibility("default"))) TS_BuiltCommitmentTransaction_n
        return ret_ref;
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_BuiltCommitmentTransaction_clone(uint32_t orig) {
+       LDKBuiltCommitmentTransaction orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKBuiltCommitmentTransaction ret_var = BuiltCommitmentTransaction_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_BuiltCommitmentTransaction_write(uint32_t obj) {
        LDKBuiltCommitmentTransaction obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
@@ -14196,14 +16064,9 @@ uint32_t  __attribute__((visibility("default"))) TS_BuiltCommitmentTransaction_r
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKBuiltCommitmentTransaction ret_var = BuiltCommitmentTransaction_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_BuiltCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ), "LDKCResult_BuiltCommitmentTransactionDecodeErrorZ");
+       *ret_conv = BuiltCommitmentTransaction_read(ser_ref);
+       return (long)ret_conv;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_BuiltCommitmentTransaction_get_sighash_all(uint32_t this_arg, int8_tArray funding_redeemscript, int64_t channel_value_satoshis) {
@@ -14270,14 +16133,9 @@ uint32_t  __attribute__((visibility("default"))) TS_CommitmentTransaction_read(i
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKCommitmentTransaction ret_var = CommitmentTransaction_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_CommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentTransactionDecodeErrorZ), "LDKCResult_CommitmentTransactionDecodeErrorZ");
+       *ret_conv = CommitmentTransaction_read(ser_ref);
+       return (long)ret_conv;
 }
 
 int64_t  __attribute__((visibility("default"))) TS_CommitmentTransaction_commitment_number(uint32_t this_arg) {
@@ -14404,36 +16262,204 @@ uint32_t  __attribute__((visibility("default"))) TS_TrustedCommitmentTransaction
        return (long)ret_conv;
 }
 
-int64_t  __attribute__((visibility("default"))) TS_get_commitment_transaction_number_obscure_factor(int8_tArray broadcaster_payment_basepoint, int8_tArray countersignatory_payment_basepoint, jboolean outbound_from_broadcaster) {
-       LDKPublicKey broadcaster_payment_basepoint_ref;
-       CHECK(*((uint32_t*)broadcaster_payment_basepoint) == 33);
-       memcpy(broadcaster_payment_basepoint_ref.compressed_form, (uint8_t*)(broadcaster_payment_basepoint + 4), 33);
-       LDKPublicKey countersignatory_payment_basepoint_ref;
-       CHECK(*((uint32_t*)countersignatory_payment_basepoint) == 33);
-       memcpy(countersignatory_payment_basepoint_ref.compressed_form, (uint8_t*)(countersignatory_payment_basepoint + 4), 33);
-       int64_t ret_val = get_commitment_transaction_number_obscure_factor(broadcaster_payment_basepoint_ref, countersignatory_payment_basepoint_ref, outbound_from_broadcaster);
-       return ret_val;
+int64_t  __attribute__((visibility("default"))) TS_get_commitment_transaction_number_obscure_factor(int8_tArray broadcaster_payment_basepoint, int8_tArray countersignatory_payment_basepoint, jboolean outbound_from_broadcaster) {
+       LDKPublicKey broadcaster_payment_basepoint_ref;
+       CHECK(*((uint32_t*)broadcaster_payment_basepoint) == 33);
+       memcpy(broadcaster_payment_basepoint_ref.compressed_form, (uint8_t*)(broadcaster_payment_basepoint + 4), 33);
+       LDKPublicKey countersignatory_payment_basepoint_ref;
+       CHECK(*((uint32_t*)countersignatory_payment_basepoint) == 33);
+       memcpy(countersignatory_payment_basepoint_ref.compressed_form, (uint8_t*)(countersignatory_payment_basepoint + 4), 33);
+       int64_t ret_val = get_commitment_transaction_number_obscure_factor(broadcaster_payment_basepoint_ref, countersignatory_payment_basepoint_ref, outbound_from_broadcaster);
+       return ret_val;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_InitFeatures_clone(uint32_t orig) {
+       LDKInitFeatures orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKInitFeatures ret_var = InitFeatures_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_NodeFeatures_clone(uint32_t orig) {
+       LDKNodeFeatures orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKNodeFeatures ret_var = NodeFeatures_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_ChannelFeatures_clone(uint32_t orig) {
+       LDKChannelFeatures orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKChannelFeatures ret_var = ChannelFeatures_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+void  __attribute__((visibility("default"))) TS_InitFeatures_free(uint32_t this_ptr) {
+       LDKInitFeatures this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       InitFeatures_free(this_ptr_conv);
+}
+
+void  __attribute__((visibility("default"))) TS_NodeFeatures_free(uint32_t this_ptr) {
+       LDKNodeFeatures this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       NodeFeatures_free(this_ptr_conv);
+}
+
+void  __attribute__((visibility("default"))) TS_ChannelFeatures_free(uint32_t this_ptr) {
+       LDKChannelFeatures this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       ChannelFeatures_free(this_ptr_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_InitFeatures_empty() {
+       LDKInitFeatures ret_var = InitFeatures_empty();
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_InitFeatures_known() {
+       LDKInitFeatures ret_var = InitFeatures_known();
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_NodeFeatures_empty() {
+       LDKNodeFeatures ret_var = NodeFeatures_empty();
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_NodeFeatures_known() {
+       LDKNodeFeatures ret_var = NodeFeatures_known();
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_ChannelFeatures_empty() {
+       LDKChannelFeatures ret_var = ChannelFeatures_empty();
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_ChannelFeatures_known() {
+       LDKChannelFeatures ret_var = ChannelFeatures_known();
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+int8_tArray  __attribute__((visibility("default"))) TS_InitFeatures_write(uint32_t obj) {
+       LDKInitFeatures obj_conv;
+       obj_conv.inner = (void*)(obj & (~1));
+       obj_conv.is_owned = false;
+       LDKCVec_u8Z arg_var = InitFeatures_write(&obj_conv);
+       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
+       CVec_u8Z_free(arg_var);
+       return arg_arr;
+}
+
+int8_tArray  __attribute__((visibility("default"))) TS_NodeFeatures_write(uint32_t obj) {
+       LDKNodeFeatures obj_conv;
+       obj_conv.inner = (void*)(obj & (~1));
+       obj_conv.is_owned = false;
+       LDKCVec_u8Z arg_var = NodeFeatures_write(&obj_conv);
+       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
+       CVec_u8Z_free(arg_var);
+       return arg_arr;
 }
 
-void  __attribute__((visibility("default"))) TS_InitFeatures_free(uint32_t this_ptr) {
-       LDKInitFeatures this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       InitFeatures_free(this_ptr_conv);
+int8_tArray  __attribute__((visibility("default"))) TS_ChannelFeatures_write(uint32_t obj) {
+       LDKChannelFeatures obj_conv;
+       obj_conv.inner = (void*)(obj & (~1));
+       obj_conv.is_owned = false;
+       LDKCVec_u8Z arg_var = ChannelFeatures_write(&obj_conv);
+       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
+       CVec_u8Z_free(arg_var);
+       return arg_arr;
 }
 
-void  __attribute__((visibility("default"))) TS_NodeFeatures_free(uint32_t this_ptr) {
-       LDKNodeFeatures this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       NodeFeatures_free(this_ptr_conv);
+uint32_t  __attribute__((visibility("default"))) TS_InitFeatures_read(int8_tArray ser) {
+       LDKu8slice ser_ref;
+       ser_ref.datalen = *((uint32_t*)ser);
+       ser_ref.data = (int8_t*)(ser + 4);
+       LDKCResult_InitFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitFeaturesDecodeErrorZ), "LDKCResult_InitFeaturesDecodeErrorZ");
+       *ret_conv = InitFeatures_read(ser_ref);
+       return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelFeatures_free(uint32_t this_ptr) {
-       LDKChannelFeatures this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       ChannelFeatures_free(this_ptr_conv);
+uint32_t  __attribute__((visibility("default"))) TS_NodeFeatures_read(int8_tArray ser) {
+       LDKu8slice ser_ref;
+       ser_ref.datalen = *((uint32_t*)ser);
+       ser_ref.data = (int8_t*)(ser + 4);
+       LDKCResult_NodeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeFeaturesDecodeErrorZ), "LDKCResult_NodeFeaturesDecodeErrorZ");
+       *ret_conv = NodeFeatures_read(ser_ref);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_ChannelFeatures_read(int8_tArray ser) {
+       LDKu8slice ser_ref;
+       ser_ref.datalen = *((uint32_t*)ser);
+       ser_ref.data = (int8_t*)(ser + 4);
+       LDKCResult_ChannelFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelFeaturesDecodeErrorZ), "LDKCResult_ChannelFeaturesDecodeErrorZ");
+       *ret_conv = ChannelFeatures_read(ser_ref);
+       return (long)ret_conv;
 }
 
 void  __attribute__((visibility("default"))) TS_RouteHop_free(uint32_t this_ptr) {
@@ -14443,20 +16469,6 @@ void  __attribute__((visibility("default"))) TS_RouteHop_free(uint32_t this_ptr)
        RouteHop_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_RouteHop_clone(uint32_t orig) {
-       LDKRouteHop orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKRouteHop ret_var = RouteHop_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 int8_tArray  __attribute__((visibility("default"))) TS_RouteHop_get_pubkey(uint32_t this_ptr) {
        LDKRouteHop this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -14497,7 +16509,7 @@ void  __attribute__((visibility("default"))) TS_RouteHop_set_node_features(uint3
        LDKNodeFeatures val_conv;
        val_conv.inner = (void*)(val & (~1));
        val_conv.is_owned = (val & 1) || (val == 0);
-       // Warning: we need a move here but no clone is available for LDKNodeFeatures
+       val_conv = NodeFeatures_clone(&val_conv);
        RouteHop_set_node_features(&this_ptr_conv, val_conv);
 }
 
@@ -14537,7 +16549,7 @@ void  __attribute__((visibility("default"))) TS_RouteHop_set_channel_features(ui
        LDKChannelFeatures val_conv;
        val_conv.inner = (void*)(val & (~1));
        val_conv.is_owned = (val & 1) || (val == 0);
-       // Warning: we need a move here but no clone is available for LDKChannelFeatures
+       val_conv = ChannelFeatures_clone(&val_conv);
        RouteHop_set_channel_features(&this_ptr_conv, val_conv);
 }
 
@@ -14578,11 +16590,11 @@ uint32_t  __attribute__((visibility("default"))) TS_RouteHop_new(int8_tArray pub
        LDKNodeFeatures node_features_arg_conv;
        node_features_arg_conv.inner = (void*)(node_features_arg & (~1));
        node_features_arg_conv.is_owned = (node_features_arg & 1) || (node_features_arg == 0);
-       // Warning: we need a move here but no clone is available for LDKNodeFeatures
+       node_features_arg_conv = NodeFeatures_clone(&node_features_arg_conv);
        LDKChannelFeatures channel_features_arg_conv;
        channel_features_arg_conv.inner = (void*)(channel_features_arg & (~1));
        channel_features_arg_conv.is_owned = (channel_features_arg & 1) || (channel_features_arg == 0);
-       // Warning: we need a move here but no clone is available for LDKChannelFeatures
+       channel_features_arg_conv = ChannelFeatures_clone(&channel_features_arg_conv);
        LDKRouteHop ret_var = RouteHop_new(pubkey_arg_ref, node_features_arg_conv, short_channel_id_arg, channel_features_arg_conv, fee_msat_arg, cltv_expiry_delta_arg);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
@@ -14593,18 +16605,11 @@ uint32_t  __attribute__((visibility("default"))) TS_RouteHop_new(int8_tArray pub
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_Route_free(uint32_t this_ptr) {
-       LDKRoute this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       Route_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_Route_clone(uint32_t orig) {
-       LDKRoute orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_RouteHop_clone(uint32_t orig) {
+       LDKRouteHop orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKRoute ret_var = Route_clone(&orig_conv);
+       LDKRouteHop ret_var = RouteHop_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -14614,6 +16619,13 @@ uint32_t  __attribute__((visibility("default"))) TS_Route_clone(uint32_t orig) {
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_Route_free(uint32_t this_ptr) {
+       LDKRoute this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       Route_free(this_ptr_conv);
+}
+
 void  __attribute__((visibility("default"))) TS_Route_set_paths(uint32_t this_ptr, ptrArray val) {
        LDKRoute this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -14684,6 +16696,20 @@ uint32_t  __attribute__((visibility("default"))) TS_Route_new(ptrArray paths_arg
        return ret_ref;
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_Route_clone(uint32_t orig) {
+       LDKRoute orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKRoute ret_var = Route_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_Route_write(uint32_t obj) {
        LDKRoute obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
@@ -14711,20 +16737,6 @@ void  __attribute__((visibility("default"))) TS_RouteHint_free(uint32_t this_ptr
        RouteHint_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_RouteHint_clone(uint32_t orig) {
-       LDKRouteHint orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKRouteHint ret_var = RouteHint_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 int8_tArray  __attribute__((visibility("default"))) TS_RouteHint_get_src_node_id(uint32_t this_ptr) {
        LDKRouteHint this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -14832,6 +16844,20 @@ uint32_t  __attribute__((visibility("default"))) TS_RouteHint_new(int8_tArray sr
        return ret_ref;
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_RouteHint_clone(uint32_t orig) {
+       LDKRouteHint orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKRouteHint ret_var = RouteHint_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 uint32_t  __attribute__((visibility("default"))) TS_get_route(int8_tArray our_node_id, uint32_t network, int8_tArray target, uint32_tArray first_hops, uint32_tArray last_hops, int64_t final_value_msat, int32_t final_cltv, uint32_t logger) {
        LDKPublicKey our_node_id_ref;
        CHECK(*((uint32_t*)our_node_id) == 33);
@@ -14985,20 +17011,6 @@ void  __attribute__((visibility("default"))) TS_DirectionalChannelInfo_free(uint
        DirectionalChannelInfo_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_DirectionalChannelInfo_clone(uint32_t orig) {
-       LDKDirectionalChannelInfo orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKDirectionalChannelInfo ret_var = DirectionalChannelInfo_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 int32_t  __attribute__((visibility("default"))) TS_DirectionalChannelInfo_get_last_update(uint32_t this_ptr) {
        LDKDirectionalChannelInfo this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -15109,6 +17121,20 @@ void  __attribute__((visibility("default"))) TS_DirectionalChannelInfo_set_last_
        DirectionalChannelInfo_set_last_update_message(&this_ptr_conv, val_conv);
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_DirectionalChannelInfo_clone(uint32_t orig) {
+       LDKDirectionalChannelInfo orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKDirectionalChannelInfo ret_var = DirectionalChannelInfo_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_DirectionalChannelInfo_write(uint32_t obj) {
        LDKDirectionalChannelInfo obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
@@ -15124,14 +17150,9 @@ uint32_t  __attribute__((visibility("default"))) TS_DirectionalChannelInfo_read(
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKDirectionalChannelInfo ret_var = DirectionalChannelInfo_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_DirectionalChannelInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DirectionalChannelInfoDecodeErrorZ), "LDKCResult_DirectionalChannelInfoDecodeErrorZ");
+       *ret_conv = DirectionalChannelInfo_read(ser_ref);
+       return (long)ret_conv;
 }
 
 void  __attribute__((visibility("default"))) TS_ChannelInfo_free(uint32_t this_ptr) {
@@ -15162,7 +17183,7 @@ void  __attribute__((visibility("default"))) TS_ChannelInfo_set_features(uint32_
        LDKChannelFeatures val_conv;
        val_conv.inner = (void*)(val & (~1));
        val_conv.is_owned = (val & 1) || (val == 0);
-       // Warning: we need a move here but no clone is available for LDKChannelFeatures
+       val_conv = ChannelFeatures_clone(&val_conv);
        ChannelInfo_set_features(&this_ptr_conv, val_conv);
 }
 
@@ -15294,14 +17315,9 @@ uint32_t  __attribute__((visibility("default"))) TS_ChannelInfo_read(int8_tArray
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKChannelInfo ret_var = ChannelInfo_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_ChannelInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelInfoDecodeErrorZ), "LDKCResult_ChannelInfoDecodeErrorZ");
+       *ret_conv = ChannelInfo_read(ser_ref);
+       return (long)ret_conv;
 }
 
 void  __attribute__((visibility("default"))) TS_RoutingFees_free(uint32_t this_ptr) {
@@ -15311,20 +17327,6 @@ void  __attribute__((visibility("default"))) TS_RoutingFees_free(uint32_t this_p
        RoutingFees_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_RoutingFees_clone(uint32_t orig) {
-       LDKRoutingFees orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKRoutingFees ret_var = RoutingFees_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 int32_t  __attribute__((visibility("default"))) TS_RoutingFees_get_base_msat(uint32_t this_ptr) {
        LDKRoutingFees this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -15366,6 +17368,20 @@ uint32_t  __attribute__((visibility("default"))) TS_RoutingFees_new(int32_t base
        return ret_ref;
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_RoutingFees_clone(uint32_t orig) {
+       LDKRoutingFees orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKRoutingFees ret_var = RoutingFees_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 uint32_t  __attribute__((visibility("default"))) TS_RoutingFees_read(int8_tArray ser) {
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
@@ -15393,20 +17409,6 @@ void  __attribute__((visibility("default"))) TS_NodeAnnouncementInfo_free(uint32
        NodeAnnouncementInfo_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_NodeAnnouncementInfo_clone(uint32_t orig) {
-       LDKNodeAnnouncementInfo orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKNodeAnnouncementInfo ret_var = NodeAnnouncementInfo_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 uint32_t  __attribute__((visibility("default"))) TS_NodeAnnouncementInfo_get_features(uint32_t this_ptr) {
        LDKNodeAnnouncementInfo this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -15428,7 +17430,7 @@ void  __attribute__((visibility("default"))) TS_NodeAnnouncementInfo_set_feature
        LDKNodeFeatures val_conv;
        val_conv.inner = (void*)(val & (~1));
        val_conv.is_owned = (val & 1) || (val == 0);
-       // Warning: we need a move here but no clone is available for LDKNodeFeatures
+       val_conv = NodeFeatures_clone(&val_conv);
        NodeAnnouncementInfo_set_features(&this_ptr_conv, val_conv);
 }
 
@@ -15534,7 +17536,7 @@ uint32_t  __attribute__((visibility("default"))) TS_NodeAnnouncementInfo_new(uin
        LDKNodeFeatures features_arg_conv;
        features_arg_conv.inner = (void*)(features_arg & (~1));
        features_arg_conv.is_owned = (features_arg & 1) || (features_arg == 0);
-       // Warning: we need a move here but no clone is available for LDKNodeFeatures
+       features_arg_conv = NodeFeatures_clone(&features_arg_conv);
        LDKThreeBytes rgb_arg_ref;
        CHECK(*((uint32_t*)rgb_arg) == 3);
        memcpy(rgb_arg_ref.data, (uint8_t*)(rgb_arg + 4), 3);
@@ -15568,6 +17570,20 @@ uint32_t  __attribute__((visibility("default"))) TS_NodeAnnouncementInfo_new(uin
        return ret_ref;
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_NodeAnnouncementInfo_clone(uint32_t orig) {
+       LDKNodeAnnouncementInfo orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKNodeAnnouncementInfo ret_var = NodeAnnouncementInfo_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_NodeAnnouncementInfo_write(uint32_t obj) {
        LDKNodeAnnouncementInfo obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
@@ -15595,20 +17611,6 @@ void  __attribute__((visibility("default"))) TS_NodeInfo_free(uint32_t this_ptr)
        NodeInfo_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_NodeInfo_clone(uint32_t orig) {
-       LDKNodeInfo orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKNodeInfo ret_var = NodeInfo_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 void  __attribute__((visibility("default"))) TS_NodeInfo_set_channels(uint32_t this_ptr, int64_tArray val) {
        LDKNodeInfo this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -15707,6 +17709,20 @@ uint32_t  __attribute__((visibility("default"))) TS_NodeInfo_new(int64_tArray ch
        return ret_ref;
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_NodeInfo_clone(uint32_t orig) {
+       LDKNodeInfo orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKNodeInfo ret_var = NodeInfo_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_NodeInfo_write(uint32_t obj) {
        LDKNodeInfo obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
index d5c6475b1f73e9cdb3183f695c251da792e26af7..64cc2939a80b053d4921f1ee33180b523ac6b625 100644 (file)
@@ -152,36 +152,78 @@ public static native long new_empty_slice_vec();
 */
 
        public static native long LDKCVec_u8Z_new(number[] elems);
-       public static native long LDKC2Tuple_u64u64Z_new(number a, number b);
-       public static native number LDKC2Tuple_u64u64Z_get_a(long ptr);
-       public static native number LDKC2Tuple_u64u64Z_get_b(long ptr);
-       public static class LDKSpendableOutputDescriptor {
-               private LDKSpendableOutputDescriptor() {}
-               export class StaticOutput extends LDKSpendableOutputDescriptor {
-                       public number outpoint;
-                       public number output;
-                       StaticOutput(number outpoint, number output) { this.outpoint = outpoint; this.output = output; }
-               }
-               export class DynamicOutputP2WSH extends LDKSpendableOutputDescriptor {
-                       public number outpoint;
-                       public Uint8Array per_commitment_point;
-                       public number to_self_delay;
-                       public number output;
-                       public number key_derivation_params;
-                       public Uint8Array revocation_pubkey;
-                       DynamicOutputP2WSH(number outpoint, Uint8Array per_commitment_point, number to_self_delay, number output, number key_derivation_params, Uint8Array revocation_pubkey) { this.outpoint = outpoint; this.per_commitment_point = per_commitment_point; this.to_self_delay = to_self_delay; this.output = output; this.key_derivation_params = key_derivation_params; this.revocation_pubkey = revocation_pubkey; }
-               }
-               export class StaticOutputCounterpartyPayment extends LDKSpendableOutputDescriptor {
-                       public number outpoint;
-                       public number output;
-                       public number key_derivation_params;
-                       StaticOutputCounterpartyPayment(number outpoint, number output, number key_derivation_params) { this.outpoint = outpoint; this.output = output; this.key_derivation_params = key_derivation_params; }
-               }
-               static native void init();
-       }
-       static { LDKSpendableOutputDescriptor.init(); }
-       public static native LDKSpendableOutputDescriptor LDKSpendableOutputDescriptor_ref_from_ptr(long ptr);
-       public static native long LDKCVec_SpendableOutputDescriptorZ_new(number[] elems);
+       public static native boolean LDKCResult_SecretKeyErrorZ_result_ok(long arg);
+       public static native Uint8Array LDKCResult_SecretKeyErrorZ_get_ok(long arg);
+       public static native LDKSecp256k1Error LDKCResult_SecretKeyErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_PublicKeyErrorZ_result_ok(long arg);
+       public static native Uint8Array LDKCResult_PublicKeyErrorZ_get_ok(long arg);
+       public static native LDKSecp256k1Error LDKCResult_PublicKeyErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_TxCreationKeysDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_TxCreationKeysDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_TxCreationKeysDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_ChannelPublicKeysDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_ChannelPublicKeysDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_ChannelPublicKeysDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_TxCreationKeysErrorZ_result_ok(long arg);
+       public static native number LDKCResult_TxCreationKeysErrorZ_get_ok(long arg);
+       public static native LDKSecp256k1Error LDKCResult_TxCreationKeysErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_ChannelTransactionParametersDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_HolderCommitmentTransactionDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_CommitmentTransactionDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_CommitmentTransactionDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_CommitmentTransactionDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_TrustedCommitmentTransactionNoneZ_result_ok(long arg);
+       public static native number LDKCResult_TrustedCommitmentTransactionNoneZ_get_ok(long arg);
+       public static native void LDKCResult_TrustedCommitmentTransactionNoneZ_get_err(long arg);
+       public static native boolean LDKCResult_CVec_SignatureZNoneZ_result_ok(long arg);
+       public static native Uint8Array[] LDKCResult_CVec_SignatureZNoneZ_get_ok(long arg);
+       public static native void LDKCResult_CVec_SignatureZNoneZ_get_err(long arg);
+       public static native boolean LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok(long arg);
+       public static native Uint8Array LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok(long arg);
+       public static native number LDKCResult_CVec_u8ZPeerHandleErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_NonePeerHandleErrorZ_result_ok(long arg);
+       public static native void LDKCResult_NonePeerHandleErrorZ_get_ok(long arg);
+       public static native number LDKCResult_NonePeerHandleErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_boolPeerHandleErrorZ_result_ok(long arg);
+       public static native boolean LDKCResult_boolPeerHandleErrorZ_get_ok(long arg);
+       public static native number LDKCResult_boolPeerHandleErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_InitFeaturesDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_InitFeaturesDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_InitFeaturesDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_NodeFeaturesDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_NodeFeaturesDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_NodeFeaturesDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_ChannelFeaturesDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_ChannelFeaturesDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_ChannelFeaturesDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_ChannelConfigDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_boolLightningErrorZ_result_ok(long arg);
+       public static native boolean LDKCResult_boolLightningErrorZ_get_ok(long arg);
+       public static native number LDKCResult_boolLightningErrorZ_get_err(long arg);
+       public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(number a, number b, number c);
+       public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(long ptr);
+       public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(long ptr);
+       public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(long ptr);
+       public static native long LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new(number[] elems);
+       public static native long LDKCVec_NodeAnnouncementZ_new(number[] elems);
+       public static native boolean LDKCResult_NoneLightningErrorZ_result_ok(long arg);
+       public static native void LDKCResult_NoneLightningErrorZ_get_ok(long arg);
+       public static native number LDKCResult_NoneLightningErrorZ_get_err(long arg);
        public static class LDKErrorAction {
                private LDKErrorAction() {}
                export class DisconnectPeer extends LDKErrorAction {
@@ -313,6 +355,92 @@ public static native long new_empty_slice_vec();
        static { LDKMessageSendEvent.init(); }
        public static native LDKMessageSendEvent LDKMessageSendEvent_ref_from_ptr(long ptr);
        public static native long LDKCVec_MessageSendEventZ_new(number[] elems);
+       public static native boolean LDKCResult_DirectionalChannelInfoDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_ChannelInfoDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_RoutingFeesDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_err(long arg);
+       public static class LDKNetAddress {
+               private LDKNetAddress() {}
+               export class IPv4 extends LDKNetAddress {
+                       public Uint8Array addr;
+                       public number port;
+                       IPv4(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
+               }
+               export class IPv6 extends LDKNetAddress {
+                       public Uint8Array addr;
+                       public number port;
+                       IPv6(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
+               }
+               export class OnionV2 extends LDKNetAddress {
+                       public Uint8Array addr;
+                       public number port;
+                       OnionV2(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
+               }
+               export class OnionV3 extends LDKNetAddress {
+                       public Uint8Array ed25519_pubkey;
+                       public number checksum;
+                       public number version;
+                       public number port;
+                       OnionV3(Uint8Array ed25519_pubkey, number checksum, number version, number port) { this.ed25519_pubkey = ed25519_pubkey; this.checksum = checksum; this.version = version; this.port = port; }
+               }
+               static native void init();
+       }
+       static { LDKNetAddress.init(); }
+       public static native LDKNetAddress LDKNetAddress_ref_from_ptr(long ptr);
+       public static native long LDKCVec_NetAddressZ_new(number[] elems);
+       public static native boolean LDKCResult_NodeAnnouncementInfoDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_err(long arg);
+       public static native long LDKCVec_u64Z_new(number[] elems);
+       public static native boolean LDKCResult_NodeInfoDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_NodeInfoDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_NodeInfoDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_NetworkGraphDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_err(long arg);
+       public static native long LDKC2Tuple_usizeTransactionZ_new(number a, Uint8Array b);
+       public static native number LDKC2Tuple_usizeTransactionZ_get_a(long ptr);
+       public static native Uint8Array LDKC2Tuple_usizeTransactionZ_get_b(long ptr);
+       public static native long LDKCVec_C2Tuple_usizeTransactionZZ_new(number[] elems);
+       public static native boolean LDKCResult_NoneChannelMonitorUpdateErrZ_result_ok(long arg);
+       public static native void LDKCResult_NoneChannelMonitorUpdateErrZ_get_ok(long arg);
+       public static native LDKChannelMonitorUpdateErr LDKCResult_NoneChannelMonitorUpdateErrZ_get_err(long arg);
+       public static native long LDKCVec_MonitorEventZ_new(number[] elems);
+       public static native long LDKC2Tuple_u64u64Z_new(number a, number b);
+       public static native number LDKC2Tuple_u64u64Z_get_a(long ptr);
+       public static native number LDKC2Tuple_u64u64Z_get_b(long ptr);
+       public static class LDKSpendableOutputDescriptor {
+               private LDKSpendableOutputDescriptor() {}
+               export class StaticOutput extends LDKSpendableOutputDescriptor {
+                       public number outpoint;
+                       public number output;
+                       StaticOutput(number outpoint, number output) { this.outpoint = outpoint; this.output = output; }
+               }
+               export class DynamicOutputP2WSH extends LDKSpendableOutputDescriptor {
+                       public number outpoint;
+                       public Uint8Array per_commitment_point;
+                       public number to_self_delay;
+                       public number output;
+                       public number key_derivation_params;
+                       public Uint8Array revocation_pubkey;
+                       DynamicOutputP2WSH(number outpoint, Uint8Array per_commitment_point, number to_self_delay, number output, number key_derivation_params, Uint8Array revocation_pubkey) { this.outpoint = outpoint; this.per_commitment_point = per_commitment_point; this.to_self_delay = to_self_delay; this.output = output; this.key_derivation_params = key_derivation_params; this.revocation_pubkey = revocation_pubkey; }
+               }
+               export class StaticOutputCounterpartyPayment extends LDKSpendableOutputDescriptor {
+                       public number outpoint;
+                       public number output;
+                       public number key_derivation_params;
+                       StaticOutputCounterpartyPayment(number outpoint, number output, number key_derivation_params) { this.outpoint = outpoint; this.output = output; this.key_derivation_params = key_derivation_params; }
+               }
+               static native void init();
+       }
+       static { LDKSpendableOutputDescriptor.init(); }
+       public static native LDKSpendableOutputDescriptor LDKSpendableOutputDescriptor_ref_from_ptr(long ptr);
+       public static native long LDKCVec_SpendableOutputDescriptorZ_new(number[] elems);
        public static class LDKEvent {
                private LDKEvent() {}
                export class FundingGenerationReady extends LDKEvent {
@@ -355,17 +483,15 @@ public static native long new_empty_slice_vec();
        static { LDKEvent.init(); }
        public static native LDKEvent LDKEvent_ref_from_ptr(long ptr);
        public static native long LDKCVec_EventZ_new(number[] elems);
-       public static native long LDKC2Tuple_usizeTransactionZ_new(number a, Uint8Array b);
-       public static native number LDKC2Tuple_usizeTransactionZ_get_a(long ptr);
-       public static native Uint8Array LDKC2Tuple_usizeTransactionZ_get_b(long ptr);
-       public static native long LDKCVec_C2Tuple_usizeTransactionZZ_new(number[] elems);
-       public static native boolean LDKCResult_NoneChannelMonitorUpdateErrZ_result_ok(long arg);
-       public static native void LDKCResult_NoneChannelMonitorUpdateErrZ_get_ok(long arg);
-       public static native LDKChannelMonitorUpdateErr LDKCResult_NoneChannelMonitorUpdateErrZ_get_err(long arg);
-       public static native long LDKCVec_MonitorEventZ_new(number[] elems);
+       public static native boolean LDKCResult_OutPointDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_OutPointDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_OutPointDecodeErrorZ_get_err(long arg);
        public static native boolean LDKCResult_ChannelMonitorUpdateDecodeErrorZ_result_ok(long arg);
        public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(long arg);
        public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_HTLCUpdateDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_err(long arg);
        public static native boolean LDKCResult_NoneMonitorUpdateErrorZ_result_ok(long arg);
        public static native void LDKCResult_NoneMonitorUpdateErrorZ_get_ok(long arg);
        public static native number LDKCResult_NoneMonitorUpdateErrorZ_get_err(long arg);
@@ -517,15 +643,6 @@ public static native long new_empty_slice_vec();
        public static native boolean LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_result_ok(long arg);
        public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(long arg);
        public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_SpendableOutputDescriptorDecodeErrorZ_result_ok(long arg);
-       public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(long arg);
-       public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_ChanKeySignerDecodeErrorZ_result_ok(long arg);
-       public static native number LDKCResult_ChanKeySignerDecodeErrorZ_get_ok(long arg);
-       public static native number LDKCResult_ChanKeySignerDecodeErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_InMemoryChannelKeysDecodeErrorZ_result_ok(long arg);
-       public static native number LDKCResult_InMemoryChannelKeysDecodeErrorZ_get_ok(long arg);
-       public static native number LDKCResult_InMemoryChannelKeysDecodeErrorZ_get_err(long arg);
        public static native boolean LDKCResult_TxOutAccessErrorZ_result_ok(long arg);
        public static native number LDKCResult_TxOutAccessErrorZ_get_ok(long arg);
        public static native LDKAccessError LDKCResult_TxOutAccessErrorZ_get_err(long arg);
@@ -562,35 +679,6 @@ public static native long new_empty_slice_vec();
        public static native boolean LDKCResult_NonePaymentSendFailureZ_result_ok(long arg);
        public static native void LDKCResult_NonePaymentSendFailureZ_get_ok(long arg);
        public static native number LDKCResult_NonePaymentSendFailureZ_get_err(long arg);
-       public static class LDKNetAddress {
-               private LDKNetAddress() {}
-               export class IPv4 extends LDKNetAddress {
-                       public Uint8Array addr;
-                       public number port;
-                       IPv4(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
-               }
-               export class IPv6 extends LDKNetAddress {
-                       public Uint8Array addr;
-                       public number port;
-                       IPv6(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
-               }
-               export class OnionV2 extends LDKNetAddress {
-                       public Uint8Array addr;
-                       public number port;
-                       OnionV2(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
-               }
-               export class OnionV3 extends LDKNetAddress {
-                       public Uint8Array ed25519_pubkey;
-                       public number checksum;
-                       public number version;
-                       public number port;
-                       OnionV3(Uint8Array ed25519_pubkey, number checksum, number version, number port) { this.ed25519_pubkey = ed25519_pubkey; this.checksum = checksum; this.version = version; this.port = port; }
-               }
-               static native void init();
-       }
-       static { LDKNetAddress.init(); }
-       public static native LDKNetAddress LDKNetAddress_ref_from_ptr(long ptr);
-       public static native long LDKCVec_NetAddressZ_new(number[] elems);
        public static native long LDKCVec_ChannelMonitorZ_new(number[] elems);
 
 
@@ -658,6 +746,9 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.BroadcasterInterface_broadcast_transaction(this_arg, encodeArray(tx));
                // debug statements here
        }
+       public static native boolean LDKCResult_ChannelKeysDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_ChannelKeysDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_ChannelKeysDecodeErrorZ_get_err(long arg);
 
 
 
@@ -719,7 +810,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.KeysInterface_get_secure_random_bytes(this_arg);
                return decodeArray(nativeResponseValue);
        }
-       // LDKCResult_ChanKeySignerDecodeErrorZ KeysInterface_read_chan_signer LDKKeysInterface* this_arg, struct LDKu8slice reader
+       // LDKCResult_ChannelKeysDecodeErrorZ KeysInterface_read_chan_signer LDKKeysInterface* this_arg, struct LDKu8slice reader
        export function KeysInterface_read_chan_signer(this_arg: number, reader: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -773,35 +864,81 @@ public static native long new_empty_slice_vec();
        public static native boolean LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_result_ok(long arg);
        public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(long arg);
        public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_SpendableOutputDescriptorDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_InMemoryChannelKeysDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_InMemoryChannelKeysDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_InMemoryChannelKeysDecodeErrorZ_get_err(long arg);
+       public static native long LDKCVec_RouteHopZ_new(number[] elems);
+       public static native boolean LDKCResult_RouteDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_RouteDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_RouteDecodeErrorZ_get_err(long arg);
+       public static native long LDKCVec_RouteHintZ_new(number[] elems);
+       public static native boolean LDKCResult_RouteLightningErrorZ_result_ok(long arg);
+       public static native number LDKCResult_RouteLightningErrorZ_get_ok(long arg);
+       public static native number LDKCResult_RouteLightningErrorZ_get_err(long arg);
        public static native boolean LDKCResult_NetAddressu8Z_result_ok(long arg);
        public static native number LDKCResult_NetAddressu8Z_get_ok(long arg);
        public static native number LDKCResult_NetAddressu8Z_get_err(long arg);
        public static native boolean LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_result_ok(long arg);
        public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_ok(long arg);
        public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_err(long arg);
-       public static native long LDKCVec_u64Z_new(number[] elems);
        public static native long LDKCVec_UpdateAddHTLCZ_new(number[] elems);
        public static native long LDKCVec_UpdateFulfillHTLCZ_new(number[] elems);
        public static native long LDKCVec_UpdateFailHTLCZ_new(number[] elems);
        public static native long LDKCVec_UpdateFailMalformedHTLCZ_new(number[] elems);
-       public static native boolean LDKCResult_boolLightningErrorZ_result_ok(long arg);
-       public static native boolean LDKCResult_boolLightningErrorZ_get_ok(long arg);
-       public static native number LDKCResult_boolLightningErrorZ_get_err(long arg);
-       public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(number a, number b, number c);
-       public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(long ptr);
-       public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(long ptr);
-       public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(long ptr);
-       public static native long LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new(number[] elems);
-       public static native long LDKCVec_NodeAnnouncementZ_new(number[] elems);
-       public static native boolean LDKCResult_NoneLightningErrorZ_result_ok(long arg);
-       public static native void LDKCResult_NoneLightningErrorZ_get_ok(long arg);
-       public static native number LDKCResult_NoneLightningErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_AcceptChannelDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_AnnouncementSignaturesDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_err(long arg);
        public static native boolean LDKCResult_ChannelReestablishDecodeErrorZ_result_ok(long arg);
        public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_ok(long arg);
        public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_ClosingSignedDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_CommitmentSignedDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_FundingCreatedDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_FundingSignedDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_FundingSignedDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_FundingSignedDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_FundingLockedDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_FundingLockedDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_FundingLockedDecodeErrorZ_get_err(long arg);
        public static native boolean LDKCResult_InitDecodeErrorZ_result_ok(long arg);
        public static native number LDKCResult_InitDecodeErrorZ_get_ok(long arg);
        public static native number LDKCResult_InitDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_OpenChannelDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_OpenChannelDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_OpenChannelDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_RevokeAndACKDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_ShutdownDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_ShutdownDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_ShutdownDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_UpdateFailHTLCDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_UpdateFeeDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_UpdateFulfillHTLCDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_UpdateAddHTLCDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_err(long arg);
        public static native boolean LDKCResult_PingDecodeErrorZ_result_ok(long arg);
        public static native number LDKCResult_PingDecodeErrorZ_get_ok(long arg);
        public static native number LDKCResult_PingDecodeErrorZ_get_err(long arg);
@@ -811,15 +948,24 @@ public static native long new_empty_slice_vec();
        public static native boolean LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_result_ok(long arg);
        public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(long arg);
        public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_ChannelAnnouncementDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_err(long arg);
        public static native boolean LDKCResult_UnsignedChannelUpdateDecodeErrorZ_result_ok(long arg);
        public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(long arg);
        public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_ChannelUpdateDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_err(long arg);
        public static native boolean LDKCResult_ErrorMessageDecodeErrorZ_result_ok(long arg);
        public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_ok(long arg);
        public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_err(long arg);
        public static native boolean LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_result_ok(long arg);
        public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(long arg);
        public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_NodeAnnouncementDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_err(long arg);
        public static native boolean LDKCResult_QueryShortChannelIdsDecodeErrorZ_result_ok(long arg);
        public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_ok(long arg);
        public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_err(long arg);
@@ -835,50 +981,6 @@ public static native long new_empty_slice_vec();
        public static native boolean LDKCResult_GossipTimestampFilterDecodeErrorZ_result_ok(long arg);
        public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_ok(long arg);
        public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok(long arg);
-       public static native Uint8Array LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok(long arg);
-       public static native number LDKCResult_CVec_u8ZPeerHandleErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_NonePeerHandleErrorZ_result_ok(long arg);
-       public static native void LDKCResult_NonePeerHandleErrorZ_get_ok(long arg);
-       public static native number LDKCResult_NonePeerHandleErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_boolPeerHandleErrorZ_result_ok(long arg);
-       public static native boolean LDKCResult_boolPeerHandleErrorZ_get_ok(long arg);
-       public static native number LDKCResult_boolPeerHandleErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_SecretKeySecpErrorZ_result_ok(long arg);
-       public static native Uint8Array LDKCResult_SecretKeySecpErrorZ_get_ok(long arg);
-       public static native LDKSecp256k1Error LDKCResult_SecretKeySecpErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_PublicKeySecpErrorZ_result_ok(long arg);
-       public static native Uint8Array LDKCResult_PublicKeySecpErrorZ_get_ok(long arg);
-       public static native LDKSecp256k1Error LDKCResult_PublicKeySecpErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_TxCreationKeysSecpErrorZ_result_ok(long arg);
-       public static native number LDKCResult_TxCreationKeysSecpErrorZ_get_ok(long arg);
-       public static native LDKSecp256k1Error LDKCResult_TxCreationKeysSecpErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_TrustedCommitmentTransactionNoneZ_result_ok(long arg);
-       public static native number LDKCResult_TrustedCommitmentTransactionNoneZ_get_ok(long arg);
-       public static native void LDKCResult_TrustedCommitmentTransactionNoneZ_get_err(long arg);
-       public static native boolean LDKCResult_CVec_SignatureZNoneZ_result_ok(long arg);
-       public static native Uint8Array[] LDKCResult_CVec_SignatureZNoneZ_get_ok(long arg);
-       public static native void LDKCResult_CVec_SignatureZNoneZ_get_err(long arg);
-       public static native long LDKCVec_RouteHopZ_new(number[] elems);
-       public static native boolean LDKCResult_RouteDecodeErrorZ_result_ok(long arg);
-       public static native number LDKCResult_RouteDecodeErrorZ_get_ok(long arg);
-       public static native number LDKCResult_RouteDecodeErrorZ_get_err(long arg);
-       public static native long LDKCVec_RouteHintZ_new(number[] elems);
-       public static native boolean LDKCResult_RouteLightningErrorZ_result_ok(long arg);
-       public static native number LDKCResult_RouteLightningErrorZ_get_ok(long arg);
-       public static native number LDKCResult_RouteLightningErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_RoutingFeesDecodeErrorZ_result_ok(long arg);
-       public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_ok(long arg);
-       public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_NodeAnnouncementInfoDecodeErrorZ_result_ok(long arg);
-       public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(long arg);
-       public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_NodeInfoDecodeErrorZ_result_ok(long arg);
-       public static native number LDKCResult_NodeInfoDecodeErrorZ_get_ok(long arg);
-       public static native number LDKCResult_NodeInfoDecodeErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_NetworkGraphDecodeErrorZ_result_ok(long arg);
-       public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_ok(long arg);
-       public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_err(long arg);
 
 
 
@@ -1384,572 +1486,812 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.TxOut_clone(orig);
                return nativeResponseValue;
        }
-       // void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res);
-       export function CVec_SpendableOutputDescriptorZ_free(_res: number[]): void {
+       // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_ok(struct LDKSecretKey o);
+       export function CResult_SecretKeyErrorZ_ok(o: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CVec_SpendableOutputDescriptorZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_ok(encodeArray(o));
+               return nativeResponseValue;
        }
-       // void CVec_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res);
-       export function CVec_MessageSendEventZ_free(_res: number[]): void {
+       // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_err(enum LDKSecp256k1Error e);
+       export function CResult_SecretKeyErrorZ_err(e: LDKSecp256k1Error): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CVec_MessageSendEventZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_err(e);
+               return nativeResponseValue;
        }
-       // void CVec_EventZ_free(struct LDKCVec_EventZ _res);
-       export function CVec_EventZ_free(_res: number[]): void {
+       // void CResult_SecretKeyErrorZ_free(struct LDKCResult_SecretKeyErrorZ _res);
+       export function CResult_SecretKeyErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CVec_EventZ_free(_res);
+               const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_free(_res);
                // debug statements here
        }
-       // void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res);
-       export function C2Tuple_usizeTransactionZ_free(_res: number): void {
+       // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_ok(struct LDKPublicKey o);
+       export function CResult_PublicKeyErrorZ_ok(o: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_ok(encodeArray(o));
+               return nativeResponseValue;
        }
-       // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b);
-       export function C2Tuple_usizeTransactionZ_new(a: number, b: Uint8Array): number {
+       // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_err(enum LDKSecp256k1Error e);
+       export function CResult_PublicKeyErrorZ_err(e: LDKSecp256k1Error): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_new(a, encodeArray(b));
+               const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res);
-       export function CVec_C2Tuple_usizeTransactionZZ_free(_res: number[]): void {
+       // void CResult_PublicKeyErrorZ_free(struct LDKCResult_PublicKeyErrorZ _res);
+       export function CResult_PublicKeyErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CVec_C2Tuple_usizeTransactionZZ_free(_res);
+               const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void);
-       export function CResult_NoneChannelMonitorUpdateErrZ_ok(): number {
+       // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_ok(struct LDKTxCreationKeys o);
+       export function CResult_TxCreationKeysDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_ok();
+               const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e);
-       export function CResult_NoneChannelMonitorUpdateErrZ_err(e: LDKChannelMonitorUpdateErr): number {
+       // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_TxCreationKeysDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_err(e);
+               const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res);
-       export function CResult_NoneChannelMonitorUpdateErrZ_free(_res: number): void {
+       // void CResult_TxCreationKeysDecodeErrorZ_free(struct LDKCResult_TxCreationKeysDecodeErrorZ _res);
+       export function CResult_TxCreationKeysDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_free(_res);
+               const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_clone(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR orig);
-       export function CResult_NoneChannelMonitorUpdateErrZ_clone(orig: number): number {
+       // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_clone(const struct LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_TxCreationKeysDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_clone(orig);
+               const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
-       export function CVec_MonitorEventZ_free(_res: number[]): void {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.CVec_MonitorEventZ_free(_res);
-               // debug statements here
-       }
-       // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_ok(struct LDKChannelMonitorUpdate o);
-       export function CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_ok(struct LDKChannelPublicKeys o);
+       export function CResult_ChannelPublicKeysDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_ChannelMonitorUpdateDecodeErrorZ_err(e: number): number {
+       // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_ChannelPublicKeysDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CResult_ChannelMonitorUpdateDecodeErrorZ_free(struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res);
-       export function CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res: number): void {
+       // void CResult_ChannelPublicKeysDecodeErrorZ_free(struct LDKCResult_ChannelPublicKeysDecodeErrorZ _res);
+       export function CResult_ChannelPublicKeysDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_ok(void);
-       export function CResult_NoneMonitorUpdateErrorZ_ok(): number {
+       // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_clone(const struct LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_ChannelPublicKeysDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_ok();
+               const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_err(struct LDKMonitorUpdateError e);
-       export function CResult_NoneMonitorUpdateErrorZ_err(e: number): number {
+       // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_ok(struct LDKTxCreationKeys o);
+       export function CResult_TxCreationKeysErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // void CResult_NoneMonitorUpdateErrorZ_free(struct LDKCResult_NoneMonitorUpdateErrorZ _res);
-       export function CResult_NoneMonitorUpdateErrorZ_free(_res: number): void {
+       // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_err(enum LDKSecp256k1Error e);
+       export function CResult_TxCreationKeysErrorZ_err(e: LDKSecp256k1Error): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_err(e);
+               return nativeResponseValue;
        }
-       // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_clone(const struct LDKCResult_NoneMonitorUpdateErrorZ *NONNULL_PTR orig);
-       export function CResult_NoneMonitorUpdateErrorZ_clone(orig: number): number {
+       // void CResult_TxCreationKeysErrorZ_free(struct LDKCResult_TxCreationKeysErrorZ _res);
+       export function CResult_TxCreationKeysErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_free(_res);
+               // debug statements here
        }
-       // void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res);
-       export function C2Tuple_OutPointScriptZ_free(_res: number): void {
+       // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(struct LDKHTLCOutputInCommitment o);
+       export function CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o);
+               return nativeResponseValue;
        }
-       // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b);
-       export function C2Tuple_OutPointScriptZ_new(a: number, b: Uint8Array): number {
+       // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_new(a, encodeArray(b));
+               const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res);
-       export function CVec_TransactionZ_free(_res: Uint8Array[]): void {
+       // void CResult_HTLCOutputInCommitmentDecodeErrorZ_free(struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ _res);
+       export function CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CVec_TransactionZ_free(_res);
+               const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_clone(const struct LDKC2Tuple_u32TxOutZ *NONNULL_PTR orig);
-       export function C2Tuple_u32TxOutZ_clone(orig: number): number {
+       // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(const struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_clone(orig);
+               const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // void C2Tuple_u32TxOutZ_free(struct LDKC2Tuple_u32TxOutZ _res);
-       export function C2Tuple_u32TxOutZ_free(_res: number): void {
+       // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(struct LDKCounterpartyChannelTransactionParameters o);
+       export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o);
+               return nativeResponseValue;
        }
-       // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_new(uint32_t a, struct LDKTxOut b);
-       export function C2Tuple_u32TxOutZ_new(a: number, b: number): number {
+       // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_new(a, b);
+               const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CVec_C2Tuple_u32TxOutZZ_free(struct LDKCVec_C2Tuple_u32TxOutZZ _res);
-       export function CVec_C2Tuple_u32TxOutZZ_free(_res: number[]): void {
+       // void CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ _res);
+       export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CVec_C2Tuple_u32TxOutZZ_free(_res);
+               const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res);
-       export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res: number): void {
+       // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b);
-       export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a: Uint8Array, b: number[]): number {
+       // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_ok(struct LDKChannelTransactionParameters o);
+       export function CResult_ChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(encodeArray(a), b);
+               const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // void CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ _res);
-       export function CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res: number[]): void {
+       // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_ChannelTransactionParametersDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_err(e);
+               return nativeResponseValue;
        }
-       // void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res);
-       export function C2Tuple_BlockHashChannelMonitorZ_free(_res: number): void {
+       // void CResult_ChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_ChannelTransactionParametersDecodeErrorZ _res);
+       export function CResult_ChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
-       export function C2Tuple_BlockHashChannelMonitorZ_new(a: Uint8Array, b: number): number {
+       // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_new(encodeArray(a), b);
+               const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelMonitorZ o);
-       export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o: number): number {
+       // void CVec_SignatureZ_free(struct LDKCVec_SignatureZ _res);
+       export function CVec_SignatureZ_free(_res: Uint8Array[]): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.CVec_SignatureZ_free(_res);
+               // debug statements here
        }
-       // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e: number): number {
+       // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_ok(struct LDKHolderCommitmentTransaction o);
+       export function CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res);
-       export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res: number): void {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res);
-               // debug statements here
-       }
-       // struct LDKC2Tuple_u64u64Z C2Tuple_u64u64Z_clone(const struct LDKC2Tuple_u64u64Z *NONNULL_PTR orig);
-       export function C2Tuple_u64u64Z_clone(orig: number): number {
+       // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_HolderCommitmentTransactionDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.C2Tuple_u64u64Z_clone(orig);
+               const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void C2Tuple_u64u64Z_free(struct LDKC2Tuple_u64u64Z _res);
-       export function C2Tuple_u64u64Z_free(_res: number): void {
+       // void CResult_HolderCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ _res);
+       export function CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.C2Tuple_u64u64Z_free(_res);
+               const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKC2Tuple_u64u64Z C2Tuple_u64u64Z_new(uint64_t a, uint64_t b);
-       export function C2Tuple_u64u64Z_new(a: number, b: number): number {
+       // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.C2Tuple_u64u64Z_new(a, b);
+               const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o);
-       export function CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(struct LDKBuiltCommitmentTransaction o);
+       export function CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_SpendableOutputDescriptorDecodeErrorZ_err(e: number): number {
+       // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res);
-       export function CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res: number): void {
+       // void CResult_BuiltCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ _res);
+       export function CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
-       export function CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig: number): number {
+       // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig);
+               const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // void CVec_SignatureZ_free(struct LDKCVec_SignatureZ _res);
-       export function CVec_SignatureZ_free(_res: Uint8Array[]): void {
+       // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_ok(struct LDKCommitmentTransaction o);
+       export function CResult_CommitmentTransactionDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CVec_SignatureZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_ok(o);
+               return nativeResponseValue;
        }
-       // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_clone(const struct LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR orig);
-       export function C2Tuple_SignatureCVec_SignatureZZ_clone(orig: number): number {
+       // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_CommitmentTransactionDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_clone(orig);
+               const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res);
-       export function C2Tuple_SignatureCVec_SignatureZZ_free(_res: number): void {
+       // void CResult_CommitmentTransactionDecodeErrorZ_free(struct LDKCResult_CommitmentTransactionDecodeErrorZ _res);
+       export function CResult_CommitmentTransactionDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_free(_res);
+               const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b);
-       export function C2Tuple_SignatureCVec_SignatureZZ_new(a: Uint8Array, b: Uint8Array[]): number {
+       // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_CommitmentTransactionDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_new(encodeArray(a), b);
+               const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o);
-       export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o: number): number {
+       // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_ok(struct LDKTrustedCommitmentTransaction o);
+       export function CResult_TrustedCommitmentTransactionNoneZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o);
+               const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void);
-       export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(): number {
+       // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_err(void);
+       export function CResult_TrustedCommitmentTransactionNoneZ_err(): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
+               const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_err();
                return nativeResponseValue;
        }
-       // void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ _res);
-       export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res: number): void {
+       // void CResult_TrustedCommitmentTransactionNoneZ_free(struct LDKCResult_TrustedCommitmentTransactionNoneZ _res);
+       export function CResult_TrustedCommitmentTransactionNoneZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res);
+               const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR orig);
-       export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig: number): number {
+       // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_ok(struct LDKCVec_SignatureZ o);
+       export function CResult_CVec_SignatureZNoneZ_ok(o: Uint8Array[]): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig);
+               const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_ok(struct LDKSignature o);
-       export function CResult_SignatureNoneZ_ok(o: Uint8Array): number {
+       // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_err(void);
+       export function CResult_CVec_SignatureZNoneZ_err(): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_SignatureNoneZ_ok(encodeArray(o));
+               const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_err();
                return nativeResponseValue;
        }
-       // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_err(void);
-       export function CResult_SignatureNoneZ_err(): number {
+       // void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res);
+       export function CResult_CVec_SignatureZNoneZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_SignatureNoneZ_err();
+               const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_clone(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR orig);
+       export function CResult_CVec_SignatureZNoneZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_clone(orig);
                return nativeResponseValue;
        }
-       // void CResult_SignatureNoneZ_free(struct LDKCResult_SignatureNoneZ _res);
-       export function CResult_SignatureNoneZ_free(_res: number): void {
+       // void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res);
+       export function CVec_PublicKeyZ_free(_res: Uint8Array[]): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_SignatureNoneZ_free(_res);
+               const nativeResponseValue = wasm.CVec_PublicKeyZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_clone(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR orig);
-       export function CResult_SignatureNoneZ_clone(orig: number): number {
+       // void CVec_u8Z_free(struct LDKCVec_u8Z _res);
+       export function CVec_u8Z_free(_res: Uint8Array): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_SignatureNoneZ_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.CVec_u8Z_free(encodeArray(_res));
+               // debug statements here
        }
-       // struct LDKCResult_ChanKeySignerDecodeErrorZ CResult_ChanKeySignerDecodeErrorZ_ok(struct LDKChannelKeys o);
-       export function CResult_ChanKeySignerDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o);
+       export function CResult_CVec_u8ZPeerHandleErrorZ_ok(o: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_ChanKeySignerDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_ok(encodeArray(o));
                return nativeResponseValue;
        }
-       // struct LDKCResult_ChanKeySignerDecodeErrorZ CResult_ChanKeySignerDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_ChanKeySignerDecodeErrorZ_err(e: number): number {
+       // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_err(struct LDKPeerHandleError e);
+       export function CResult_CVec_u8ZPeerHandleErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_ChanKeySignerDecodeErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CResult_ChanKeySignerDecodeErrorZ_free(struct LDKCResult_ChanKeySignerDecodeErrorZ _res);
-       export function CResult_ChanKeySignerDecodeErrorZ_free(_res: number): void {
+       // void CResult_CVec_u8ZPeerHandleErrorZ_free(struct LDKCResult_CVec_u8ZPeerHandleErrorZ _res);
+       export function CResult_CVec_u8ZPeerHandleErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_ChanKeySignerDecodeErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_ChanKeySignerDecodeErrorZ CResult_ChanKeySignerDecodeErrorZ_clone(const struct LDKCResult_ChanKeySignerDecodeErrorZ *NONNULL_PTR orig);
-       export function CResult_ChanKeySignerDecodeErrorZ_clone(orig: number): number {
+       // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_clone(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR orig);
+       export function CResult_CVec_u8ZPeerHandleErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_ChanKeySignerDecodeErrorZ_clone(orig);
+               const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_InMemoryChannelKeysDecodeErrorZ CResult_InMemoryChannelKeysDecodeErrorZ_ok(struct LDKInMemoryChannelKeys o);
-       export function CResult_InMemoryChannelKeysDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_ok(void);
+       export function CResult_NonePeerHandleErrorZ_ok(): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_InMemoryChannelKeysDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_ok();
                return nativeResponseValue;
        }
-       // struct LDKCResult_InMemoryChannelKeysDecodeErrorZ CResult_InMemoryChannelKeysDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_InMemoryChannelKeysDecodeErrorZ_err(e: number): number {
+       // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_err(struct LDKPeerHandleError e);
+       export function CResult_NonePeerHandleErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_InMemoryChannelKeysDecodeErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CResult_InMemoryChannelKeysDecodeErrorZ_free(struct LDKCResult_InMemoryChannelKeysDecodeErrorZ _res);
-       export function CResult_InMemoryChannelKeysDecodeErrorZ_free(_res: number): void {
+       // void CResult_NonePeerHandleErrorZ_free(struct LDKCResult_NonePeerHandleErrorZ _res);
+       export function CResult_NonePeerHandleErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_InMemoryChannelKeysDecodeErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_ok(struct LDKTxOut o);
-       export function CResult_TxOutAccessErrorZ_ok(o: number): number {
+       // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_clone(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR orig);
+       export function CResult_NonePeerHandleErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_err(enum LDKAccessError e);
-       export function CResult_TxOutAccessErrorZ_err(e: LDKAccessError): number {
+       // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_ok(bool o);
+       export function CResult_boolPeerHandleErrorZ_ok(o: boolean): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // void CResult_TxOutAccessErrorZ_free(struct LDKCResult_TxOutAccessErrorZ _res);
-       export function CResult_TxOutAccessErrorZ_free(_res: number): void {
-               if(!isWasmInitialized) {
+       // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_err(struct LDKPeerHandleError e);
+       export function CResult_boolPeerHandleErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_boolPeerHandleErrorZ_free(struct LDKCResult_boolPeerHandleErrorZ _res);
+       export function CResult_boolPeerHandleErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_clone(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR orig);
-       export function CResult_TxOutAccessErrorZ_clone(orig: number): number {
+       // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_clone(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR orig);
+       export function CResult_boolPeerHandleErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_clone(orig);
+               const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
-       export function CResult_NoneAPIErrorZ_ok(): number {
+       // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o);
+       export function CResult_InitFeaturesDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_ok();
+               const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e);
-       export function CResult_NoneAPIErrorZ_err(e: number): number {
+       // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_InitFeaturesDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res);
-       export function CResult_NoneAPIErrorZ_free(_res: number): void {
+       // void CResult_InitFeaturesDecodeErrorZ_free(struct LDKCResult_InitFeaturesDecodeErrorZ _res);
+       export function CResult_InitFeaturesDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res);
-       export function CVec_ChannelDetailsZ_free(_res: number[]): void {
+       // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_ok(struct LDKNodeFeatures o);
+       export function CResult_NodeFeaturesDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CVec_ChannelDetailsZ_free(_res);
+               const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_NodeFeaturesDecodeErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_NodeFeaturesDecodeErrorZ_free(struct LDKCResult_NodeFeaturesDecodeErrorZ _res);
+       export function CResult_NodeFeaturesDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void);
-       export function CResult_NonePaymentSendFailureZ_ok(): number {
+       // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_ok(struct LDKChannelFeatures o);
+       export function CResult_ChannelFeaturesDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_ok();
+               const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
-       export function CResult_NonePaymentSendFailureZ_err(e: number): number {
+       // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_ChannelFeaturesDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_err(e);
+               const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CResult_NonePaymentSendFailureZ_free(struct LDKCResult_NonePaymentSendFailureZ _res);
-       export function CResult_NonePaymentSendFailureZ_free(_res: number): void {
+       // void CResult_ChannelFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelFeaturesDecodeErrorZ _res);
+       export function CResult_ChannelFeaturesDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_free(_res);
+               const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_clone(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR orig);
-       export function CResult_NonePaymentSendFailureZ_clone(orig: number): number {
+       // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_ok(struct LDKChannelConfig o);
+       export function CResult_ChannelConfigDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_clone(orig);
+               const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_ChannelConfigDecodeErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_ChannelConfigDecodeErrorZ_free(struct LDKCResult_ChannelConfigDecodeErrorZ _res);
+       export function CResult_ChannelConfigDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_clone(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_ChannelConfigDecodeErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_ok(bool o);
+       export function CResult_boolLightningErrorZ_ok(o: boolean): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_boolLightningErrorZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_err(struct LDKLightningError e);
+       export function CResult_boolLightningErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_boolLightningErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_boolLightningErrorZ_free(struct LDKCResult_boolLightningErrorZ _res);
+       export function CResult_boolLightningErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_boolLightningErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_clone(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR orig);
+       export function CResult_boolLightningErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_boolLightningErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(const struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR orig);
+       export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(struct LDKChannelAnnouncement a, struct LDKChannelUpdate b, struct LDKChannelUpdate c);
+       export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a: number, b: number, c: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a, b, c);
+               return nativeResponseValue;
+       }
+       // void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res);
+       export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res);
+               // debug statements here
+       }
+       // void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res);
+       export function CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res: number[]): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res);
+               // debug statements here
+       }
+       // void CVec_NodeAnnouncementZ_free(struct LDKCVec_NodeAnnouncementZ _res);
+       export function CVec_NodeAnnouncementZ_free(_res: number[]): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CVec_NodeAnnouncementZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void);
+       export function CResult_NoneLightningErrorZ_ok(): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_ok();
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_err(struct LDKLightningError e);
+       export function CResult_NoneLightningErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_NoneLightningErrorZ_free(struct LDKCResult_NoneLightningErrorZ _res);
+       export function CResult_NoneLightningErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_clone(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR orig);
+       export function CResult_NoneLightningErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // void CVec_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res);
+       export function CVec_MessageSendEventZ_free(_res: number[]): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CVec_MessageSendEventZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_ok(struct LDKDirectionalChannelInfo o);
+       export function CResult_DirectionalChannelInfoDecodeErrorZ_ok(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_DirectionalChannelInfoDecodeErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_DirectionalChannelInfoDecodeErrorZ_free(struct LDKCResult_DirectionalChannelInfoDecodeErrorZ _res);
+       export function CResult_DirectionalChannelInfoDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_clone(const struct LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_ok(struct LDKChannelInfo o);
+       export function CResult_ChannelInfoDecodeErrorZ_ok(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_ChannelInfoDecodeErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_ChannelInfoDecodeErrorZ_free(struct LDKCResult_ChannelInfoDecodeErrorZ _res);
+       export function CResult_ChannelInfoDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_ok(struct LDKRoutingFees o);
+       export function CResult_RoutingFeesDecodeErrorZ_ok(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_RoutingFeesDecodeErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_RoutingFeesDecodeErrorZ_free(struct LDKCResult_RoutingFeesDecodeErrorZ _res);
+       export function CResult_RoutingFeesDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_clone(const struct LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_RoutingFeesDecodeErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
        // void CVec_NetAddressZ_free(struct LDKCVec_NetAddressZ _res);
@@ -1960,53 +2302,885 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.CVec_NetAddressZ_free(_res);
                // debug statements here
        }
-       // void CVec_ChannelMonitorZ_free(struct LDKCVec_ChannelMonitorZ _res);
-       export function CVec_ChannelMonitorZ_free(_res: number[]): void {
+       // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_ok(struct LDKNodeAnnouncementInfo o);
+       export function CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_NodeAnnouncementInfoDecodeErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_NodeAnnouncementInfoDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res);
+       export function CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // void CVec_u64Z_free(struct LDKCVec_u64Z _res);
+       export function CVec_u64Z_free(_res: number[]): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CVec_u64Z_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_ok(struct LDKNodeInfo o);
+       export function CResult_NodeInfoDecodeErrorZ_ok(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_NodeInfoDecodeErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_NodeInfoDecodeErrorZ_free(struct LDKCResult_NodeInfoDecodeErrorZ _res);
+       export function CResult_NodeInfoDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_clone(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_NodeInfoDecodeErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_ok(struct LDKNetworkGraph o);
+       export function CResult_NetworkGraphDecodeErrorZ_ok(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_NetworkGraphDecodeErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res);
+       export function CResult_NetworkGraphDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b);
+       export function C2Tuple_usizeTransactionZ_new(a: number, b: Uint8Array): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_new(a, encodeArray(b));
+               return nativeResponseValue;
+       }
+       // void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res);
+       export function C2Tuple_usizeTransactionZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_free(_res);
+               // debug statements here
+       }
+       // void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res);
+       export function CVec_C2Tuple_usizeTransactionZZ_free(_res: number[]): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CVec_C2Tuple_usizeTransactionZZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void);
+       export function CResult_NoneChannelMonitorUpdateErrZ_ok(): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_ok();
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e);
+       export function CResult_NoneChannelMonitorUpdateErrZ_err(e: LDKChannelMonitorUpdateErr): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res);
+       export function CResult_NoneChannelMonitorUpdateErrZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_clone(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR orig);
+       export function CResult_NoneChannelMonitorUpdateErrZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
+       export function CVec_MonitorEventZ_free(_res: number[]): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CVec_MonitorEventZ_free(_res);
+               // debug statements here
+       }
+       // void CVec_EventZ_free(struct LDKCVec_EventZ _res);
+       export function CVec_EventZ_free(_res: number[]): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CVec_EventZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_ok(struct LDKOutPoint o);
+       export function CResult_OutPointDecodeErrorZ_ok(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_OutPointDecodeErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_OutPointDecodeErrorZ_free(struct LDKCResult_OutPointDecodeErrorZ _res);
+       export function CResult_OutPointDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_clone(const struct LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_OutPointDecodeErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_ok(struct LDKChannelMonitorUpdate o);
+       export function CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_ChannelMonitorUpdateDecodeErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_ChannelMonitorUpdateDecodeErrorZ_free(struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res);
+       export function CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_ok(struct LDKHTLCUpdate o);
+       export function CResult_HTLCUpdateDecodeErrorZ_ok(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_HTLCUpdateDecodeErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_HTLCUpdateDecodeErrorZ_free(struct LDKCResult_HTLCUpdateDecodeErrorZ _res);
+       export function CResult_HTLCUpdateDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_clone(const struct LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_HTLCUpdateDecodeErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_ok(void);
+       export function CResult_NoneMonitorUpdateErrorZ_ok(): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_ok();
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_err(struct LDKMonitorUpdateError e);
+       export function CResult_NoneMonitorUpdateErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_NoneMonitorUpdateErrorZ_free(struct LDKCResult_NoneMonitorUpdateErrorZ _res);
+       export function CResult_NoneMonitorUpdateErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_clone(const struct LDKCResult_NoneMonitorUpdateErrorZ *NONNULL_PTR orig);
+       export function CResult_NoneMonitorUpdateErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_clone(const struct LDKC2Tuple_OutPointScriptZ *NONNULL_PTR orig);
+       export function C2Tuple_OutPointScriptZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b);
+       export function C2Tuple_OutPointScriptZ_new(a: number, b: Uint8Array): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_new(a, encodeArray(b));
+               return nativeResponseValue;
+       }
+       // void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res);
+       export function C2Tuple_OutPointScriptZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_free(_res);
+               // debug statements here
+       }
+       // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res);
+       export function CVec_TransactionZ_free(_res: Uint8Array[]): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CVec_TransactionZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_clone(const struct LDKC2Tuple_u32TxOutZ *NONNULL_PTR orig);
+       export function C2Tuple_u32TxOutZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_new(uint32_t a, struct LDKTxOut b);
+       export function C2Tuple_u32TxOutZ_new(a: number, b: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_new(a, b);
+               return nativeResponseValue;
+       }
+       // void C2Tuple_u32TxOutZ_free(struct LDKC2Tuple_u32TxOutZ _res);
+       export function C2Tuple_u32TxOutZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_free(_res);
+               // debug statements here
+       }
+       // void CVec_C2Tuple_u32TxOutZZ_free(struct LDKCVec_C2Tuple_u32TxOutZZ _res);
+       export function CVec_C2Tuple_u32TxOutZZ_free(_res: number[]): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CVec_C2Tuple_u32TxOutZZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b);
+       export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a: Uint8Array, b: number[]): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(encodeArray(a), b);
+               return nativeResponseValue;
+       }
+       // void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res);
+       export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res);
+               // debug statements here
+       }
+       // void CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ _res);
+       export function CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res: number[]): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
+       export function C2Tuple_BlockHashChannelMonitorZ_new(a: Uint8Array, b: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_new(encodeArray(a), b);
+               return nativeResponseValue;
+       }
+       // void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res);
+       export function C2Tuple_BlockHashChannelMonitorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelMonitorZ o);
+       export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res);
+       export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res);
+               // debug statements here
+       }
+       // void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res);
+       export function CVec_SpendableOutputDescriptorZ_free(_res: number[]): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CVec_SpendableOutputDescriptorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_ok(struct LDKTxOut o);
+       export function CResult_TxOutAccessErrorZ_ok(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_err(enum LDKAccessError e);
+       export function CResult_TxOutAccessErrorZ_err(e: LDKAccessError): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_TxOutAccessErrorZ_free(struct LDKCResult_TxOutAccessErrorZ _res);
+       export function CResult_TxOutAccessErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_clone(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR orig);
+       export function CResult_TxOutAccessErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
+       export function CResult_NoneAPIErrorZ_ok(): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_ok();
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e);
+       export function CResult_NoneAPIErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res);
+       export function CResult_NoneAPIErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_clone(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR orig);
+       export function CResult_NoneAPIErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res);
+       export function CVec_ChannelDetailsZ_free(_res: number[]): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CVec_ChannelDetailsZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void);
+       export function CResult_NonePaymentSendFailureZ_ok(): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_ok();
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
+       export function CResult_NonePaymentSendFailureZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_NonePaymentSendFailureZ_free(struct LDKCResult_NonePaymentSendFailureZ _res);
+       export function CResult_NonePaymentSendFailureZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_clone(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR orig);
+       export function CResult_NonePaymentSendFailureZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // void CVec_ChannelMonitorZ_free(struct LDKCVec_ChannelMonitorZ _res);
+       export function CVec_ChannelMonitorZ_free(_res: number[]): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CVec_ChannelMonitorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b);
+       export function C2Tuple_BlockHashChannelManagerZ_new(a: Uint8Array, b: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_new(encodeArray(a), b);
+               return nativeResponseValue;
+       }
+       // void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res);
+       export function C2Tuple_BlockHashChannelManagerZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelManagerZ o);
+       export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res);
+       export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKC2Tuple_u64u64Z C2Tuple_u64u64Z_clone(const struct LDKC2Tuple_u64u64Z *NONNULL_PTR orig);
+       export function C2Tuple_u64u64Z_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_u64u64Z_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKC2Tuple_u64u64Z C2Tuple_u64u64Z_new(uint64_t a, uint64_t b);
+       export function C2Tuple_u64u64Z_new(a: number, b: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_u64u64Z_new(a, b);
+               return nativeResponseValue;
+       }
+       // void C2Tuple_u64u64Z_free(struct LDKC2Tuple_u64u64Z _res);
+       export function C2Tuple_u64u64Z_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_u64u64Z_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o);
+       export function CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_SpendableOutputDescriptorDecodeErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res);
+       export function CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_clone(const struct LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR orig);
+       export function C2Tuple_SignatureCVec_SignatureZZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b);
+       export function C2Tuple_SignatureCVec_SignatureZZ_new(a: Uint8Array, b: Uint8Array[]): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_new(encodeArray(a), b);
+               return nativeResponseValue;
+       }
+       // void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res);
+       export function C2Tuple_SignatureCVec_SignatureZZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o);
+       export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void);
+       export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
+               return nativeResponseValue;
+       }
+       // void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ _res);
+       export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR orig);
+       export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_ok(struct LDKSignature o);
+       export function CResult_SignatureNoneZ_ok(o: Uint8Array): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_SignatureNoneZ_ok(encodeArray(o));
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_err(void);
+       export function CResult_SignatureNoneZ_err(): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_SignatureNoneZ_err();
+               return nativeResponseValue;
+       }
+       // void CResult_SignatureNoneZ_free(struct LDKCResult_SignatureNoneZ _res);
+       export function CResult_SignatureNoneZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_SignatureNoneZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_clone(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR orig);
+       export function CResult_SignatureNoneZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_SignatureNoneZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_ChannelKeysDecodeErrorZ CResult_ChannelKeysDecodeErrorZ_ok(struct LDKChannelKeys o);
+       export function CResult_ChannelKeysDecodeErrorZ_ok(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_ChannelKeysDecodeErrorZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_ChannelKeysDecodeErrorZ CResult_ChannelKeysDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_ChannelKeysDecodeErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_ChannelKeysDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_ChannelKeysDecodeErrorZ_free(struct LDKCResult_ChannelKeysDecodeErrorZ _res);
+       export function CResult_ChannelKeysDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_ChannelKeysDecodeErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_ChannelKeysDecodeErrorZ CResult_ChannelKeysDecodeErrorZ_clone(const struct LDKCResult_ChannelKeysDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_ChannelKeysDecodeErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_ChannelKeysDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_InMemoryChannelKeysDecodeErrorZ CResult_InMemoryChannelKeysDecodeErrorZ_ok(struct LDKInMemoryChannelKeys o);
+       export function CResult_InMemoryChannelKeysDecodeErrorZ_ok(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_InMemoryChannelKeysDecodeErrorZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_InMemoryChannelKeysDecodeErrorZ CResult_InMemoryChannelKeysDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_InMemoryChannelKeysDecodeErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_InMemoryChannelKeysDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_InMemoryChannelKeysDecodeErrorZ_free(struct LDKCResult_InMemoryChannelKeysDecodeErrorZ _res);
+       export function CResult_InMemoryChannelKeysDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_InMemoryChannelKeysDecodeErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_InMemoryChannelKeysDecodeErrorZ CResult_InMemoryChannelKeysDecodeErrorZ_clone(const struct LDKCResult_InMemoryChannelKeysDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_InMemoryChannelKeysDecodeErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_InMemoryChannelKeysDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res);
+       export function CVec_RouteHopZ_free(_res: number[]): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CVec_RouteHopZ_free(_res);
+               // debug statements here
+       }
+       // void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res);
+       export function CVec_CVec_RouteHopZZ_free(_res: number[][]): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CVec_CVec_RouteHopZZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_ok(struct LDKRoute o);
+       export function CResult_RouteDecodeErrorZ_ok(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_RouteDecodeErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_RouteDecodeErrorZ_free(struct LDKCResult_RouteDecodeErrorZ _res);
+       export function CResult_RouteDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_clone(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_RouteDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CVec_ChannelMonitorZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
        }
-       // void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res);
-       export function C2Tuple_BlockHashChannelManagerZ_free(_res: number): void {
+       // void CVec_RouteHintZ_free(struct LDKCVec_RouteHintZ _res);
+       export function CVec_RouteHintZ_free(_res: number[]): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_free(_res);
+               const nativeResponseValue = wasm.CVec_RouteHintZ_free(_res);
                // debug statements here
        }
-       // struct LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b);
-       export function C2Tuple_BlockHashChannelManagerZ_new(a: Uint8Array, b: number): number {
+       // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_ok(struct LDKRoute o);
+       export function CResult_RouteLightningErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_new(encodeArray(a), b);
+               const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelManagerZ o);
-       export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_err(struct LDKLightningError e);
+       export function CResult_RouteLightningErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_err(e);
                return nativeResponseValue;
        }
-       // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e: number): number {
+       // void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _res);
+       export function CResult_RouteLightningErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_free(_res);
+               // debug statements here
        }
-       // void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res);
-       export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res: number): void {
+       // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_clone(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR orig);
+       export function CResult_RouteLightningErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_clone(orig);
+               return nativeResponseValue;
        }
        // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_ok(struct LDKNetAddress o);
        export function CResult_NetAddressu8Z_ok(o: number): number {
@@ -2064,13 +3238,13 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // void CVec_u64Z_free(struct LDKCVec_u64Z _res);
-       export function CVec_u64Z_free(_res: number[]): void {
+       // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(const struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CVec_u64Z_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
        }
        // void CVec_UpdateAddHTLCZ_free(struct LDKCVec_UpdateAddHTLCZ _res);
        export function CVec_UpdateAddHTLCZ_free(_res: number[]): void {
@@ -2104,838 +3278,998 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.CVec_UpdateFailMalformedHTLCZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_ok(bool o);
-       export function CResult_boolLightningErrorZ_ok(o: boolean): number {
+       // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_ok(struct LDKAcceptChannel o);
+       export function CResult_AcceptChannelDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_boolLightningErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_err(struct LDKLightningError e);
-       export function CResult_boolLightningErrorZ_err(e: number): number {
+       // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_AcceptChannelDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_boolLightningErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CResult_boolLightningErrorZ_free(struct LDKCResult_boolLightningErrorZ _res);
-       export function CResult_boolLightningErrorZ_free(_res: number): void {
+       // void CResult_AcceptChannelDecodeErrorZ_free(struct LDKCResult_AcceptChannelDecodeErrorZ _res);
+       export function CResult_AcceptChannelDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_boolLightningErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_clone(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR orig);
-       export function CResult_boolLightningErrorZ_clone(orig: number): number {
+       // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_clone(const struct LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_AcceptChannelDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_boolLightningErrorZ_clone(orig);
+               const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res);
-       export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res: number): void {
+       // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_ok(struct LDKAnnouncementSignatures o);
+       export function CResult_AnnouncementSignaturesDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_ok(o);
+               return nativeResponseValue;
        }
-       // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(struct LDKChannelAnnouncement a, struct LDKChannelUpdate b, struct LDKChannelUpdate c);
-       export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a: number, b: number, c: number): number {
+       // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_AnnouncementSignaturesDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a, b, c);
+               const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res);
-       export function CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res: number[]): void {
+       // void CResult_AnnouncementSignaturesDecodeErrorZ_free(struct LDKCResult_AnnouncementSignaturesDecodeErrorZ _res);
+       export function CResult_AnnouncementSignaturesDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res);
+               const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // void CVec_NodeAnnouncementZ_free(struct LDKCVec_NodeAnnouncementZ _res);
-       export function CVec_NodeAnnouncementZ_free(_res: number[]): void {
+       // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_clone(const struct LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CVec_NodeAnnouncementZ_free(_res);
+               const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_ok(struct LDKChannelReestablish o);
+       export function CResult_ChannelReestablishDecodeErrorZ_ok(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_ChannelReestablishDecodeErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_ChannelReestablishDecodeErrorZ_free(struct LDKCResult_ChannelReestablishDecodeErrorZ _res);
+       export function CResult_ChannelReestablishDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void);
-       export function CResult_NoneLightningErrorZ_ok(): number {
+       // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_clone(const struct LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_ChannelReestablishDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_ok();
+               const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_err(struct LDKLightningError e);
-       export function CResult_NoneLightningErrorZ_err(e: number): number {
+       // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_ok(struct LDKClosingSigned o);
+       export function CResult_ClosingSignedDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // void CResult_NoneLightningErrorZ_free(struct LDKCResult_NoneLightningErrorZ _res);
-       export function CResult_NoneLightningErrorZ_free(_res: number): void {
+       // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_ClosingSignedDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_ClosingSignedDecodeErrorZ_free(struct LDKCResult_ClosingSignedDecodeErrorZ _res);
+       export function CResult_ClosingSignedDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_clone(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR orig);
-       export function CResult_NoneLightningErrorZ_clone(orig: number): number {
+       // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_ClosingSignedDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_clone(orig);
+               const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_ok(struct LDKChannelReestablish o);
-       export function CResult_ChannelReestablishDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_ok(struct LDKCommitmentSigned o);
+       export function CResult_CommitmentSignedDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_ChannelReestablishDecodeErrorZ_err(e: number): number {
+       // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_CommitmentSignedDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CResult_ChannelReestablishDecodeErrorZ_free(struct LDKCResult_ChannelReestablishDecodeErrorZ _res);
-       export function CResult_ChannelReestablishDecodeErrorZ_free(_res: number): void {
+       // void CResult_CommitmentSignedDecodeErrorZ_free(struct LDKCResult_CommitmentSignedDecodeErrorZ _res);
+       export function CResult_CommitmentSignedDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_ok(struct LDKInit o);
-       export function CResult_InitDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_clone(const struct LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_CommitmentSignedDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_InitDecodeErrorZ_err(e: number): number {
+       // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_ok(struct LDKFundingCreated o);
+       export function CResult_FundingCreatedDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // void CResult_InitDecodeErrorZ_free(struct LDKCResult_InitDecodeErrorZ _res);
-       export function CResult_InitDecodeErrorZ_free(_res: number): void {
+       // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_FundingCreatedDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_FundingCreatedDecodeErrorZ_free(struct LDKCResult_FundingCreatedDecodeErrorZ _res);
+       export function CResult_FundingCreatedDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_ok(struct LDKPing o);
-       export function CResult_PingDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_clone(const struct LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_FundingCreatedDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_PingDecodeErrorZ_err(e: number): number {
+       // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_ok(struct LDKFundingSigned o);
+       export function CResult_FundingSignedDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // void CResult_PingDecodeErrorZ_free(struct LDKCResult_PingDecodeErrorZ _res);
-       export function CResult_PingDecodeErrorZ_free(_res: number): void {
+       // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_FundingSignedDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_FundingSignedDecodeErrorZ_free(struct LDKCResult_FundingSignedDecodeErrorZ _res);
+       export function CResult_FundingSignedDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_ok(struct LDKPong o);
-       export function CResult_PongDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_clone(const struct LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_FundingSignedDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_PongDecodeErrorZ_err(e: number): number {
+       // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_ok(struct LDKFundingLocked o);
+       export function CResult_FundingLockedDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // void CResult_PongDecodeErrorZ_free(struct LDKCResult_PongDecodeErrorZ _res);
-       export function CResult_PongDecodeErrorZ_free(_res: number): void {
+       // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_FundingLockedDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_FundingLockedDecodeErrorZ_free(struct LDKCResult_FundingLockedDecodeErrorZ _res);
+       export function CResult_FundingLockedDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(struct LDKUnsignedChannelAnnouncement o);
-       export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_clone(const struct LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_FundingLockedDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e: number): number {
+       // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_ok(struct LDKInit o);
+       export function CResult_InitDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // void CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res);
-       export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res: number): void {
+       // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_InitDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_InitDecodeErrorZ_free(struct LDKCResult_InitDecodeErrorZ _res);
+       export function CResult_InitDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_ok(struct LDKUnsignedChannelUpdate o);
-       export function CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_clone(const struct LDKCResult_InitDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_InitDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_UnsignedChannelUpdateDecodeErrorZ_err(e: number): number {
+       // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_ok(struct LDKOpenChannel o);
+       export function CResult_OpenChannelDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // void CResult_UnsignedChannelUpdateDecodeErrorZ_free(struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res);
-       export function CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res: number): void {
+       // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_OpenChannelDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_OpenChannelDecodeErrorZ_free(struct LDKCResult_OpenChannelDecodeErrorZ _res);
+       export function CResult_OpenChannelDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_ok(struct LDKErrorMessage o);
-       export function CResult_ErrorMessageDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_clone(const struct LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_OpenChannelDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_ErrorMessageDecodeErrorZ_err(e: number): number {
+       // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_ok(struct LDKRevokeAndACK o);
+       export function CResult_RevokeAndACKDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // void CResult_ErrorMessageDecodeErrorZ_free(struct LDKCResult_ErrorMessageDecodeErrorZ _res);
-       export function CResult_ErrorMessageDecodeErrorZ_free(_res: number): void {
+       // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_RevokeAndACKDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_RevokeAndACKDecodeErrorZ_free(struct LDKCResult_RevokeAndACKDecodeErrorZ _res);
+       export function CResult_RevokeAndACKDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(struct LDKUnsignedNodeAnnouncement o);
-       export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_clone(const struct LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_RevokeAndACKDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e: number): number {
+       // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_ok(struct LDKShutdown o);
+       export function CResult_ShutdownDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res);
-       export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res: number): void {
+       // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_ShutdownDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_ShutdownDecodeErrorZ_free(struct LDKCResult_ShutdownDecodeErrorZ _res);
+       export function CResult_ShutdownDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_ok(struct LDKQueryShortChannelIds o);
-       export function CResult_QueryShortChannelIdsDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_clone(const struct LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_ShutdownDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_QueryShortChannelIdsDecodeErrorZ_err(e: number): number {
+       // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_ok(struct LDKUpdateFailHTLC o);
+       export function CResult_UpdateFailHTLCDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // void CResult_QueryShortChannelIdsDecodeErrorZ_free(struct LDKCResult_QueryShortChannelIdsDecodeErrorZ _res);
-       export function CResult_QueryShortChannelIdsDecodeErrorZ_free(_res: number): void {
+       // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_UpdateFailHTLCDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_UpdateFailHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailHTLCDecodeErrorZ _res);
+       export function CResult_UpdateFailHTLCDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(struct LDKReplyShortChannelIdsEnd o);
-       export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_UpdateFailHTLCDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e: number): number {
+       // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(struct LDKUpdateFailMalformedHTLC o);
+       export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ _res);
+       export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res);
-       export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res: number): void {
+       // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_ok(struct LDKUpdateFee o);
+       export function CResult_UpdateFeeDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_ok(o);
+               return nativeResponseValue;
        }
-       // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_ok(struct LDKQueryChannelRange o);
-       export function CResult_QueryChannelRangeDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_UpdateFeeDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_QueryChannelRangeDecodeErrorZ_err(e: number): number {
+       // void CResult_UpdateFeeDecodeErrorZ_free(struct LDKCResult_UpdateFeeDecodeErrorZ _res);
+       export function CResult_UpdateFeeDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_err(e);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_free(_res);
+               // debug statements here
        }
-       // void CResult_QueryChannelRangeDecodeErrorZ_free(struct LDKCResult_QueryChannelRangeDecodeErrorZ _res);
-       export function CResult_QueryChannelRangeDecodeErrorZ_free(_res: number): void {
+       // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_clone(const struct LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_UpdateFeeDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_ok(struct LDKReplyChannelRange o);
-       export function CResult_ReplyChannelRangeDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_ok(struct LDKUpdateFulfillHTLC o);
+       export function CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_ReplyChannelRangeDecodeErrorZ_err(e: number): number {
+       // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_UpdateFulfillHTLCDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CResult_ReplyChannelRangeDecodeErrorZ_free(struct LDKCResult_ReplyChannelRangeDecodeErrorZ _res);
-       export function CResult_ReplyChannelRangeDecodeErrorZ_free(_res: number): void {
+       // void CResult_UpdateFulfillHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ _res);
+       export function CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_ok(struct LDKGossipTimestampFilter o);
-       export function CResult_GossipTimestampFilterDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_GossipTimestampFilterDecodeErrorZ_err(e: number): number {
+       // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_ok(struct LDKUpdateAddHTLC o);
+       export function CResult_UpdateAddHTLCDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // void CResult_GossipTimestampFilterDecodeErrorZ_free(struct LDKCResult_GossipTimestampFilterDecodeErrorZ _res);
-       export function CResult_GossipTimestampFilterDecodeErrorZ_free(_res: number): void {
+       // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_UpdateAddHTLCDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_err(e);
+               return nativeResponseValue;
        }
-       // void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res);
-       export function CVec_PublicKeyZ_free(_res: Uint8Array[]): void {
+       // void CResult_UpdateAddHTLCDecodeErrorZ_free(struct LDKCResult_UpdateAddHTLCDecodeErrorZ _res);
+       export function CResult_UpdateAddHTLCDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CVec_PublicKeyZ_free(_res);
+               const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // void CVec_u8Z_free(struct LDKCVec_u8Z _res);
-       export function CVec_u8Z_free(_res: Uint8Array): void {
+       // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_UpdateAddHTLCDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CVec_u8Z_free(encodeArray(_res));
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o);
-       export function CResult_CVec_u8ZPeerHandleErrorZ_ok(o: Uint8Array): number {
+       // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_ok(struct LDKPing o);
+       export function CResult_PingDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_ok(encodeArray(o));
+               const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_err(struct LDKPeerHandleError e);
-       export function CResult_CVec_u8ZPeerHandleErrorZ_err(e: number): number {
+       // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_PingDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CResult_CVec_u8ZPeerHandleErrorZ_free(struct LDKCResult_CVec_u8ZPeerHandleErrorZ _res);
-       export function CResult_CVec_u8ZPeerHandleErrorZ_free(_res: number): void {
+       // void CResult_PingDecodeErrorZ_free(struct LDKCResult_PingDecodeErrorZ _res);
+       export function CResult_PingDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_clone(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR orig);
-       export function CResult_CVec_u8ZPeerHandleErrorZ_clone(orig: number): number {
+       // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_clone(const struct LDKCResult_PingDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_PingDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_clone(orig);
+               const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_ok(void);
-       export function CResult_NonePeerHandleErrorZ_ok(): number {
+       // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_ok(struct LDKPong o);
+       export function CResult_PongDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_ok();
+               const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_err(struct LDKPeerHandleError e);
-       export function CResult_NonePeerHandleErrorZ_err(e: number): number {
+       // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_PongDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CResult_NonePeerHandleErrorZ_free(struct LDKCResult_NonePeerHandleErrorZ _res);
-       export function CResult_NonePeerHandleErrorZ_free(_res: number): void {
+       // void CResult_PongDecodeErrorZ_free(struct LDKCResult_PongDecodeErrorZ _res);
+       export function CResult_PongDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_clone(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR orig);
-       export function CResult_NonePeerHandleErrorZ_clone(orig: number): number {
+       // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_clone(const struct LDKCResult_PongDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_PongDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_clone(orig);
+               const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_ok(bool o);
-       export function CResult_boolPeerHandleErrorZ_ok(o: boolean): number {
+       // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(struct LDKUnsignedChannelAnnouncement o);
+       export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_err(struct LDKPeerHandleError e);
-       export function CResult_boolPeerHandleErrorZ_err(e: number): number {
+       // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CResult_boolPeerHandleErrorZ_free(struct LDKCResult_boolPeerHandleErrorZ _res);
-       export function CResult_boolPeerHandleErrorZ_free(_res: number): void {
+       // void CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res);
+       export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_clone(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR orig);
-       export function CResult_boolPeerHandleErrorZ_clone(orig: number): number {
+       // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_clone(orig);
+               const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_SecretKeySecpErrorZ CResult_SecretKeySecpErrorZ_ok(struct LDKSecretKey o);
-       export function CResult_SecretKeySecpErrorZ_ok(o: Uint8Array): number {
+       // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_ok(struct LDKChannelAnnouncement o);
+       export function CResult_ChannelAnnouncementDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_SecretKeySecpErrorZ_ok(encodeArray(o));
+               const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_SecretKeySecpErrorZ CResult_SecretKeySecpErrorZ_err(enum LDKSecp256k1Error e);
-       export function CResult_SecretKeySecpErrorZ_err(e: LDKSecp256k1Error): number {
+       // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_ChannelAnnouncementDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_SecretKeySecpErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CResult_SecretKeySecpErrorZ_free(struct LDKCResult_SecretKeySecpErrorZ _res);
-       export function CResult_SecretKeySecpErrorZ_free(_res: number): void {
+       // void CResult_ChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_ChannelAnnouncementDecodeErrorZ _res);
+       export function CResult_ChannelAnnouncementDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_SecretKeySecpErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_PublicKeySecpErrorZ CResult_PublicKeySecpErrorZ_ok(struct LDKPublicKey o);
-       export function CResult_PublicKeySecpErrorZ_ok(o: Uint8Array): number {
+       // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_ChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_ok(struct LDKUnsignedChannelUpdate o);
+       export function CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_PublicKeySecpErrorZ_ok(encodeArray(o));
+               const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_PublicKeySecpErrorZ CResult_PublicKeySecpErrorZ_err(enum LDKSecp256k1Error e);
-       export function CResult_PublicKeySecpErrorZ_err(e: LDKSecp256k1Error): number {
+       // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_UnsignedChannelUpdateDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_PublicKeySecpErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CResult_PublicKeySecpErrorZ_free(struct LDKCResult_PublicKeySecpErrorZ _res);
-       export function CResult_PublicKeySecpErrorZ_free(_res: number): void {
+       // void CResult_UnsignedChannelUpdateDecodeErrorZ_free(struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res);
+       export function CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_PublicKeySecpErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_TxCreationKeysSecpErrorZ CResult_TxCreationKeysSecpErrorZ_ok(struct LDKTxCreationKeys o);
-       export function CResult_TxCreationKeysSecpErrorZ_ok(o: number): number {
+       // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_ok(struct LDKChannelUpdate o);
+       export function CResult_ChannelUpdateDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_TxCreationKeysSecpErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_TxCreationKeysSecpErrorZ CResult_TxCreationKeysSecpErrorZ_err(enum LDKSecp256k1Error e);
-       export function CResult_TxCreationKeysSecpErrorZ_err(e: LDKSecp256k1Error): number {
+       // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_ChannelUpdateDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_TxCreationKeysSecpErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CResult_TxCreationKeysSecpErrorZ_free(struct LDKCResult_TxCreationKeysSecpErrorZ _res);
-       export function CResult_TxCreationKeysSecpErrorZ_free(_res: number): void {
+       // void CResult_ChannelUpdateDecodeErrorZ_free(struct LDKCResult_ChannelUpdateDecodeErrorZ _res);
+       export function CResult_ChannelUpdateDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_TxCreationKeysSecpErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_ok(struct LDKTrustedCommitmentTransaction o);
-       export function CResult_TrustedCommitmentTransactionNoneZ_ok(o: number): number {
+       // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_ChannelUpdateDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_ok(o);
+               const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_err(void);
-       export function CResult_TrustedCommitmentTransactionNoneZ_err(): number {
+       // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_ok(struct LDKErrorMessage o);
+       export function CResult_ErrorMessageDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_err();
+               const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // void CResult_TrustedCommitmentTransactionNoneZ_free(struct LDKCResult_TrustedCommitmentTransactionNoneZ _res);
-       export function CResult_TrustedCommitmentTransactionNoneZ_free(_res: number): void {
+       // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_ErrorMessageDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_err(e);
+               return nativeResponseValue;
        }
-       // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_ok(struct LDKCVec_SignatureZ o);
-       export function CResult_CVec_SignatureZNoneZ_ok(o: Uint8Array[]): number {
+       // void CResult_ErrorMessageDecodeErrorZ_free(struct LDKCResult_ErrorMessageDecodeErrorZ _res);
+       export function CResult_ErrorMessageDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_ok(o);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_free(_res);
+               // debug statements here
        }
-       // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_err(void);
-       export function CResult_CVec_SignatureZNoneZ_err(): number {
+       // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_clone(const struct LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_ErrorMessageDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_err();
+               const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res);
-       export function CResult_CVec_SignatureZNoneZ_free(_res: number): void {
+       // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(struct LDKUnsignedNodeAnnouncement o);
+       export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o);
+               return nativeResponseValue;
        }
-       // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_clone(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR orig);
-       export function CResult_CVec_SignatureZNoneZ_clone(orig: number): number {
+       // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_clone(orig);
+               const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res);
-       export function CVec_RouteHopZ_free(_res: number[]): void {
+       // void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res);
+       export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CVec_RouteHopZ_free(_res);
+               const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res);
-       export function CVec_CVec_RouteHopZZ_free(_res: number[][]): void {
+       // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CVec_CVec_RouteHopZZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_ok(struct LDKRoute o);
-       export function CResult_RouteDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_ok(struct LDKNodeAnnouncement o);
+       export function CResult_NodeAnnouncementDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_RouteDecodeErrorZ_err(e: number): number {
+       // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_NodeAnnouncementDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CResult_RouteDecodeErrorZ_free(struct LDKCResult_RouteDecodeErrorZ _res);
-       export function CResult_RouteDecodeErrorZ_free(_res: number): void {
+       // void CResult_NodeAnnouncementDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementDecodeErrorZ _res);
+       export function CResult_NodeAnnouncementDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // void CVec_RouteHintZ_free(struct LDKCVec_RouteHintZ _res);
-       export function CVec_RouteHintZ_free(_res: number[]): void {
+       // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_NodeAnnouncementDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CVec_RouteHintZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_ok(struct LDKRoute o);
-       export function CResult_RouteLightningErrorZ_ok(o: number): number {
+       // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_ok(struct LDKQueryShortChannelIds o);
+       export function CResult_QueryShortChannelIdsDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_err(struct LDKLightningError e);
-       export function CResult_RouteLightningErrorZ_err(e: number): number {
+       // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_QueryShortChannelIdsDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _res);
-       export function CResult_RouteLightningErrorZ_free(_res: number): void {
+       // void CResult_QueryShortChannelIdsDecodeErrorZ_free(struct LDKCResult_QueryShortChannelIdsDecodeErrorZ _res);
+       export function CResult_QueryShortChannelIdsDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_ok(struct LDKRoutingFees o);
-       export function CResult_RoutingFeesDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_clone(const struct LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_RoutingFeesDecodeErrorZ_err(e: number): number {
+       // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(struct LDKReplyShortChannelIdsEnd o);
+       export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // void CResult_RoutingFeesDecodeErrorZ_free(struct LDKCResult_RoutingFeesDecodeErrorZ _res);
-       export function CResult_RoutingFeesDecodeErrorZ_free(_res: number): void {
+       // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res);
+       export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_ok(struct LDKNodeAnnouncementInfo o);
-       export function CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(const struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_NodeAnnouncementInfoDecodeErrorZ_err(e: number): number {
+       // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_ok(struct LDKQueryChannelRange o);
+       export function CResult_QueryChannelRangeDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // void CResult_NodeAnnouncementInfoDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res);
-       export function CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res: number): void {
+       // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_QueryChannelRangeDecodeErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_QueryChannelRangeDecodeErrorZ_free(struct LDKCResult_QueryChannelRangeDecodeErrorZ _res);
+       export function CResult_QueryChannelRangeDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR orig);
-       export function CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig: number): number {
+       // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_clone(const struct LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_QueryChannelRangeDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig);
+               const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_ok(struct LDKNodeInfo o);
-       export function CResult_NodeInfoDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_ok(struct LDKReplyChannelRange o);
+       export function CResult_ReplyChannelRangeDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_NodeInfoDecodeErrorZ_err(e: number): number {
+       // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_ReplyChannelRangeDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CResult_NodeInfoDecodeErrorZ_free(struct LDKCResult_NodeInfoDecodeErrorZ _res);
-       export function CResult_NodeInfoDecodeErrorZ_free(_res: number): void {
+       // void CResult_ReplyChannelRangeDecodeErrorZ_free(struct LDKCResult_ReplyChannelRangeDecodeErrorZ _res);
+       export function CResult_ReplyChannelRangeDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_clone(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR orig);
-       export function CResult_NodeInfoDecodeErrorZ_clone(orig: number): number {
+       // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_clone(const struct LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_ReplyChannelRangeDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_clone(orig);
+               const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_ok(struct LDKNetworkGraph o);
-       export function CResult_NetworkGraphDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_ok(struct LDKGossipTimestampFilter o);
+       export function CResult_GossipTimestampFilterDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_NetworkGraphDecodeErrorZ_err(e: number): number {
+       // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_GossipTimestampFilterDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res);
-       export function CResult_NetworkGraphDecodeErrorZ_free(_res: number): void {
+       // void CResult_GossipTimestampFilterDecodeErrorZ_free(struct LDKCResult_GossipTimestampFilterDecodeErrorZ _res);
+       export function CResult_GossipTimestampFilterDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_free(_res);
                // debug statements here
        }
+       // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_clone(const struct LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_GossipTimestampFilterDecodeErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
        // void Event_free(struct LDKEvent this_ptr);
        export function Event_free(this_ptr: number): void {
                if(!isWasmInitialized) {
@@ -3040,14 +4374,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelHandshakeConfig_free(this_ptr);
                // debug statements here
        }
-       // struct LDKChannelHandshakeConfig ChannelHandshakeConfig_clone(const struct LDKChannelHandshakeConfig *NONNULL_PTR orig);
-       export function ChannelHandshakeConfig_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.ChannelHandshakeConfig_clone(orig);
-               return nativeResponseValue;
-       }
        // uint32_t ChannelHandshakeConfig_get_minimum_depth(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
        export function ChannelHandshakeConfig_get_minimum_depth(this_ptr: number): number {
                if(!isWasmInitialized) {
@@ -3104,6 +4430,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg);
                return nativeResponseValue;
        }
+       // struct LDKChannelHandshakeConfig ChannelHandshakeConfig_clone(const struct LDKChannelHandshakeConfig *NONNULL_PTR orig);
+       export function ChannelHandshakeConfig_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.ChannelHandshakeConfig_clone(orig);
+               return nativeResponseValue;
+       }
        // MUST_USE_RES struct LDKChannelHandshakeConfig ChannelHandshakeConfig_default(void);
        export function ChannelHandshakeConfig_default(): number {
                if(!isWasmInitialized) {
@@ -3120,14 +4454,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelHandshakeLimits_free(this_ptr);
                // debug statements here
        }
-       // struct LDKChannelHandshakeLimits ChannelHandshakeLimits_clone(const struct LDKChannelHandshakeLimits *NONNULL_PTR orig);
-       export function ChannelHandshakeLimits_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.ChannelHandshakeLimits_clone(orig);
-               return nativeResponseValue;
-       }
        // uint64_t ChannelHandshakeLimits_get_min_funding_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
        export function ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr: number): number {
                if(!isWasmInitialized) {
@@ -3296,6 +4622,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelHandshakeLimits_new(min_funding_satoshis_arg, max_htlc_minimum_msat_arg, min_max_htlc_value_in_flight_msat_arg, max_channel_reserve_satoshis_arg, min_max_accepted_htlcs_arg, min_dust_limit_satoshis_arg, max_dust_limit_satoshis_arg, max_minimum_depth_arg, force_announced_channel_preference_arg, their_to_self_delay_arg);
                return nativeResponseValue;
        }
+       // struct LDKChannelHandshakeLimits ChannelHandshakeLimits_clone(const struct LDKChannelHandshakeLimits *NONNULL_PTR orig);
+       export function ChannelHandshakeLimits_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.ChannelHandshakeLimits_clone(orig);
+               return nativeResponseValue;
+       }
        // MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_default(void);
        export function ChannelHandshakeLimits_default(): number {
                if(!isWasmInitialized) {
@@ -3312,14 +4646,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelConfig_free(this_ptr);
                // debug statements here
        }
-       // struct LDKChannelConfig ChannelConfig_clone(const struct LDKChannelConfig *NONNULL_PTR orig);
-       export function ChannelConfig_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.ChannelConfig_clone(orig);
-               return nativeResponseValue;
-       }
        // uint32_t ChannelConfig_get_fee_proportional_millionths(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
        export function ChannelConfig_get_fee_proportional_millionths(this_ptr: number): number {
                if(!isWasmInitialized) {
@@ -3376,6 +4702,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelConfig_new(fee_proportional_millionths_arg, announced_channel_arg, commit_upfront_shutdown_pubkey_arg);
                return nativeResponseValue;
        }
+       // struct LDKChannelConfig ChannelConfig_clone(const struct LDKChannelConfig *NONNULL_PTR orig);
+       export function ChannelConfig_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.ChannelConfig_clone(orig);
+               return nativeResponseValue;
+       }
        // MUST_USE_RES struct LDKChannelConfig ChannelConfig_default(void);
        export function ChannelConfig_default(): number {
                if(!isWasmInitialized) {
@@ -3392,7 +4726,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelConfig_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKChannelConfig ChannelConfig_read(struct LDKu8slice ser);
+       // struct LDKCResult_ChannelConfigDecodeErrorZ ChannelConfig_read(struct LDKu8slice ser);
        export function ChannelConfig_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -3408,14 +4742,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.UserConfig_free(this_ptr);
                // debug statements here
        }
-       // struct LDKUserConfig UserConfig_clone(const struct LDKUserConfig *NONNULL_PTR orig);
-       export function UserConfig_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.UserConfig_clone(orig);
-               return nativeResponseValue;
-       }
        // struct LDKChannelHandshakeConfig UserConfig_get_own_channel_config(const struct LDKUserConfig *NONNULL_PTR this_ptr);
        export function UserConfig_get_own_channel_config(this_ptr: number): number {
                if(!isWasmInitialized) {
@@ -3472,6 +4798,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.UserConfig_new(own_channel_config_arg, peer_channel_config_limits_arg, channel_options_arg);
                return nativeResponseValue;
        }
+       // struct LDKUserConfig UserConfig_clone(const struct LDKUserConfig *NONNULL_PTR orig);
+       export function UserConfig_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.UserConfig_clone(orig);
+               return nativeResponseValue;
+       }
        // MUST_USE_RES struct LDKUserConfig UserConfig_default(void);
        export function UserConfig_default(): number {
                if(!isWasmInitialized) {
@@ -3592,14 +4926,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelMonitorUpdate_free(this_ptr);
                // debug statements here
        }
-       // struct LDKChannelMonitorUpdate ChannelMonitorUpdate_clone(const struct LDKChannelMonitorUpdate *NONNULL_PTR orig);
-       export function ChannelMonitorUpdate_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.ChannelMonitorUpdate_clone(orig);
-               return nativeResponseValue;
-       }
        // uint64_t ChannelMonitorUpdate_get_update_id(const struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr);
        export function ChannelMonitorUpdate_get_update_id(this_ptr: number): number {
                if(!isWasmInitialized) {
@@ -3616,6 +4942,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelMonitorUpdate_set_update_id(this_ptr, val);
                // debug statements here
        }
+       // struct LDKChannelMonitorUpdate ChannelMonitorUpdate_clone(const struct LDKChannelMonitorUpdate *NONNULL_PTR orig);
+       export function ChannelMonitorUpdate_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.ChannelMonitorUpdate_clone(orig);
+               return nativeResponseValue;
+       }
        // struct LDKCVec_u8Z ChannelMonitorUpdate_write(const struct LDKChannelMonitorUpdate *NONNULL_PTR obj);
        export function ChannelMonitorUpdate_write(obj: number): Uint8Array {
                if(!isWasmInitialized) {
@@ -3696,7 +5030,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.HTLCUpdate_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKHTLCUpdate HTLCUpdate_read(struct LDKu8slice ser);
+       // struct LDKCResult_HTLCUpdateDecodeErrorZ HTLCUpdate_read(struct LDKu8slice ser);
        export function HTLCUpdate_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -3816,14 +5150,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.OutPoint_free(this_ptr);
                // debug statements here
        }
-       // struct LDKOutPoint OutPoint_clone(const struct LDKOutPoint *NONNULL_PTR orig);
-       export function OutPoint_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.OutPoint_clone(orig);
-               return nativeResponseValue;
-       }
        // const uint8_t (*OutPoint_get_txid(const struct LDKOutPoint *NONNULL_PTR this_ptr))[32];
        export function OutPoint_get_txid(this_ptr: number): Uint8Array {
                if(!isWasmInitialized) {
@@ -3864,6 +5190,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.OutPoint_new(encodeArray(txid_arg), index_arg);
                return nativeResponseValue;
        }
+       // struct LDKOutPoint OutPoint_clone(const struct LDKOutPoint *NONNULL_PTR orig);
+       export function OutPoint_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.OutPoint_clone(orig);
+               return nativeResponseValue;
+       }
        // MUST_USE_RES struct LDKThirtyTwoBytes OutPoint_to_channel_id(const struct LDKOutPoint *NONNULL_PTR this_arg);
        export function OutPoint_to_channel_id(this_arg: number): Uint8Array {
                if(!isWasmInitialized) {
@@ -3880,7 +5214,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.OutPoint_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKOutPoint OutPoint_read(struct LDKu8slice ser);
+       // struct LDKCResult_OutPointDecodeErrorZ OutPoint_read(struct LDKu8slice ser);
        export function OutPoint_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -3952,14 +5286,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.InMemoryChannelKeys_free(this_ptr);
                // debug statements here
        }
-       // struct LDKInMemoryChannelKeys InMemoryChannelKeys_clone(const struct LDKInMemoryChannelKeys *NONNULL_PTR orig);
-       export function InMemoryChannelKeys_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.InMemoryChannelKeys_clone(orig);
-               return nativeResponseValue;
-       }
        // const uint8_t (*InMemoryChannelKeys_get_funding_key(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr))[32];
        export function InMemoryChannelKeys_get_funding_key(this_ptr: number): Uint8Array {
                if(!isWasmInitialized) {
@@ -4056,6 +5382,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.InMemoryChannelKeys_set_commitment_seed(this_ptr, encodeArray(val));
                // debug statements here
        }
+       // struct LDKInMemoryChannelKeys InMemoryChannelKeys_clone(const struct LDKInMemoryChannelKeys *NONNULL_PTR orig);
+       export function InMemoryChannelKeys_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.InMemoryChannelKeys_clone(orig);
+               return nativeResponseValue;
+       }
        // MUST_USE_RES struct LDKInMemoryChannelKeys InMemoryChannelKeys_new(struct LDKSecretKey funding_key, struct LDKSecretKey revocation_base_key, struct LDKSecretKey payment_key, struct LDKSecretKey delayed_payment_base_key, struct LDKSecretKey htlc_base_key, struct LDKThirtyTwoBytes commitment_seed, uint64_t channel_value_satoshis, struct LDKC2Tuple_u64u64Z key_derivation_params);
        export function InMemoryChannelKeys_new(funding_key: Uint8Array, revocation_base_key: Uint8Array, payment_key: Uint8Array, delayed_payment_base_key: Uint8Array, htlc_base_key: Uint8Array, commitment_seed: Uint8Array, channel_value_satoshis: number, key_derivation_params: number): number {
                if(!isWasmInitialized) {
@@ -4184,14 +5518,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelDetails_free(this_ptr);
                // debug statements here
        }
-       // struct LDKChannelDetails ChannelDetails_clone(const struct LDKChannelDetails *NONNULL_PTR orig);
-       export function ChannelDetails_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.ChannelDetails_clone(orig);
-               return nativeResponseValue;
-       }
        // const uint8_t (*ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr))[32];
        export function ChannelDetails_get_channel_id(this_ptr: number): Uint8Array {
                if(!isWasmInitialized) {
@@ -4320,6 +5646,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelDetails_set_is_live(this_ptr, val);
                // debug statements here
        }
+       // struct LDKChannelDetails ChannelDetails_clone(const struct LDKChannelDetails *NONNULL_PTR orig);
+       export function ChannelDetails_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.ChannelDetails_clone(orig);
+               return nativeResponseValue;
+       }
        // void PaymentSendFailure_free(struct LDKPaymentSendFailure this_ptr);
        export function PaymentSendFailure_free(this_ptr: number): void {
                if(!isWasmInitialized) {
@@ -4672,14 +6006,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ErrorMessage_free(this_ptr);
                // debug statements here
        }
-       // struct LDKErrorMessage ErrorMessage_clone(const struct LDKErrorMessage *NONNULL_PTR orig);
-       export function ErrorMessage_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.ErrorMessage_clone(orig);
-               return nativeResponseValue;
-       }
        // const uint8_t (*ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr))[32];
        export function ErrorMessage_get_channel_id(this_ptr: number): Uint8Array {
                if(!isWasmInitialized) {
@@ -4720,21 +6046,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ErrorMessage_new(encodeArray(channel_id_arg), encodeArray(data_arg));
                return nativeResponseValue;
        }
-       // void Ping_free(struct LDKPing this_ptr);
-       export function Ping_free(this_ptr: number): void {
+       // struct LDKErrorMessage ErrorMessage_clone(const struct LDKErrorMessage *NONNULL_PTR orig);
+       export function ErrorMessage_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.Ping_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.ErrorMessage_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKPing Ping_clone(const struct LDKPing *NONNULL_PTR orig);
-       export function Ping_clone(orig: number): number {
+       // void Ping_free(struct LDKPing this_ptr);
+       export function Ping_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.Ping_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.Ping_free(this_ptr);
+               // debug statements here
        }
        // uint16_t Ping_get_ponglen(const struct LDKPing *NONNULL_PTR this_ptr);
        export function Ping_get_ponglen(this_ptr: number): number {
@@ -4776,21 +6102,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.Ping_new(ponglen_arg, byteslen_arg);
                return nativeResponseValue;
        }
-       // void Pong_free(struct LDKPong this_ptr);
-       export function Pong_free(this_ptr: number): void {
+       // struct LDKPing Ping_clone(const struct LDKPing *NONNULL_PTR orig);
+       export function Ping_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.Pong_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.Ping_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKPong Pong_clone(const struct LDKPong *NONNULL_PTR orig);
-       export function Pong_clone(orig: number): number {
+       // void Pong_free(struct LDKPong this_ptr);
+       export function Pong_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.Pong_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.Pong_free(this_ptr);
+               // debug statements here
        }
        // uint16_t Pong_get_byteslen(const struct LDKPong *NONNULL_PTR this_ptr);
        export function Pong_get_byteslen(this_ptr: number): number {
@@ -4816,21 +6142,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.Pong_new(byteslen_arg);
                return nativeResponseValue;
        }
-       // void OpenChannel_free(struct LDKOpenChannel this_ptr);
-       export function OpenChannel_free(this_ptr: number): void {
+       // struct LDKPong Pong_clone(const struct LDKPong *NONNULL_PTR orig);
+       export function Pong_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.OpenChannel_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.Pong_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig);
-       export function OpenChannel_clone(orig: number): number {
+       // void OpenChannel_free(struct LDKOpenChannel this_ptr);
+       export function OpenChannel_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.OpenChannel_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.OpenChannel_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*OpenChannel_get_chain_hash(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
        export function OpenChannel_get_chain_hash(this_ptr: number): Uint8Array {
@@ -5120,21 +6446,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.OpenChannel_set_channel_flags(this_ptr, val);
                // debug statements here
        }
-       // void AcceptChannel_free(struct LDKAcceptChannel this_ptr);
-       export function AcceptChannel_free(this_ptr: number): void {
+       // struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig);
+       export function OpenChannel_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.AcceptChannel_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.OpenChannel_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig);
-       export function AcceptChannel_clone(orig: number): number {
+       // void AcceptChannel_free(struct LDKAcceptChannel this_ptr);
+       export function AcceptChannel_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.AcceptChannel_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.AcceptChannel_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*AcceptChannel_get_temporary_channel_id(const struct LDKAcceptChannel *NONNULL_PTR this_ptr))[32];
        export function AcceptChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
@@ -5360,6 +6686,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.AcceptChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
                // debug statements here
        }
+       // struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig);
+       export function AcceptChannel_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.AcceptChannel_clone(orig);
+               return nativeResponseValue;
+       }
        // void FundingCreated_free(struct LDKFundingCreated this_ptr);
        export function FundingCreated_free(this_ptr: number): void {
                if(!isWasmInitialized) {
@@ -5368,14 +6702,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.FundingCreated_free(this_ptr);
                // debug statements here
        }
-       // struct LDKFundingCreated FundingCreated_clone(const struct LDKFundingCreated *NONNULL_PTR orig);
-       export function FundingCreated_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.FundingCreated_clone(orig);
-               return nativeResponseValue;
-       }
        // const uint8_t (*FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
        export function FundingCreated_get_temporary_channel_id(this_ptr: number): Uint8Array {
                if(!isWasmInitialized) {
@@ -5448,21 +6774,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.FundingCreated_new(encodeArray(temporary_channel_id_arg), encodeArray(funding_txid_arg), funding_output_index_arg, encodeArray(signature_arg));
                return nativeResponseValue;
        }
-       // void FundingSigned_free(struct LDKFundingSigned this_ptr);
-       export function FundingSigned_free(this_ptr: number): void {
+       // struct LDKFundingCreated FundingCreated_clone(const struct LDKFundingCreated *NONNULL_PTR orig);
+       export function FundingCreated_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.FundingSigned_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.FundingCreated_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKFundingSigned FundingSigned_clone(const struct LDKFundingSigned *NONNULL_PTR orig);
-       export function FundingSigned_clone(orig: number): number {
+       // void FundingSigned_free(struct LDKFundingSigned this_ptr);
+       export function FundingSigned_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.FundingSigned_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.FundingSigned_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr))[32];
        export function FundingSigned_get_channel_id(this_ptr: number): Uint8Array {
@@ -5504,21 +6830,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.FundingSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg));
                return nativeResponseValue;
        }
-       // void FundingLocked_free(struct LDKFundingLocked this_ptr);
-       export function FundingLocked_free(this_ptr: number): void {
+       // struct LDKFundingSigned FundingSigned_clone(const struct LDKFundingSigned *NONNULL_PTR orig);
+       export function FundingSigned_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.FundingLocked_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.FundingSigned_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKFundingLocked FundingLocked_clone(const struct LDKFundingLocked *NONNULL_PTR orig);
-       export function FundingLocked_clone(orig: number): number {
+       // void FundingLocked_free(struct LDKFundingLocked this_ptr);
+       export function FundingLocked_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.FundingLocked_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.FundingLocked_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*FundingLocked_get_channel_id(const struct LDKFundingLocked *NONNULL_PTR this_ptr))[32];
        export function FundingLocked_get_channel_id(this_ptr: number): Uint8Array {
@@ -5560,21 +6886,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.FundingLocked_new(encodeArray(channel_id_arg), encodeArray(next_per_commitment_point_arg));
                return nativeResponseValue;
        }
-       // void Shutdown_free(struct LDKShutdown this_ptr);
-       export function Shutdown_free(this_ptr: number): void {
+       // struct LDKFundingLocked FundingLocked_clone(const struct LDKFundingLocked *NONNULL_PTR orig);
+       export function FundingLocked_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.Shutdown_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.FundingLocked_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKShutdown Shutdown_clone(const struct LDKShutdown *NONNULL_PTR orig);
-       export function Shutdown_clone(orig: number): number {
+       // void Shutdown_free(struct LDKShutdown this_ptr);
+       export function Shutdown_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.Shutdown_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.Shutdown_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr))[32];
        export function Shutdown_get_channel_id(this_ptr: number): Uint8Array {
@@ -5616,21 +6942,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.Shutdown_new(encodeArray(channel_id_arg), encodeArray(scriptpubkey_arg));
                return nativeResponseValue;
        }
-       // void ClosingSigned_free(struct LDKClosingSigned this_ptr);
-       export function ClosingSigned_free(this_ptr: number): void {
+       // struct LDKShutdown Shutdown_clone(const struct LDKShutdown *NONNULL_PTR orig);
+       export function Shutdown_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ClosingSigned_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.Shutdown_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKClosingSigned ClosingSigned_clone(const struct LDKClosingSigned *NONNULL_PTR orig);
-       export function ClosingSigned_clone(orig: number): number {
+       // void ClosingSigned_free(struct LDKClosingSigned this_ptr);
+       export function ClosingSigned_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ClosingSigned_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.ClosingSigned_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr))[32];
        export function ClosingSigned_get_channel_id(this_ptr: number): Uint8Array {
@@ -5688,21 +7014,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ClosingSigned_new(encodeArray(channel_id_arg), fee_satoshis_arg, encodeArray(signature_arg));
                return nativeResponseValue;
        }
-       // void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_ptr);
-       export function UpdateAddHTLC_free(this_ptr: number): void {
+       // struct LDKClosingSigned ClosingSigned_clone(const struct LDKClosingSigned *NONNULL_PTR orig);
+       export function ClosingSigned_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.UpdateAddHTLC_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.ClosingSigned_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKUpdateAddHTLC UpdateAddHTLC_clone(const struct LDKUpdateAddHTLC *NONNULL_PTR orig);
-       export function UpdateAddHTLC_clone(orig: number): number {
+       // void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_ptr);
+       export function UpdateAddHTLC_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.UpdateAddHTLC_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.UpdateAddHTLC_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
        export function UpdateAddHTLC_get_channel_id(this_ptr: number): Uint8Array {
@@ -5784,21 +7110,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.UpdateAddHTLC_set_cltv_expiry(this_ptr, val);
                // debug statements here
        }
-       // void UpdateFulfillHTLC_free(struct LDKUpdateFulfillHTLC this_ptr);
-       export function UpdateFulfillHTLC_free(this_ptr: number): void {
+       // struct LDKUpdateAddHTLC UpdateAddHTLC_clone(const struct LDKUpdateAddHTLC *NONNULL_PTR orig);
+       export function UpdateAddHTLC_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.UpdateFulfillHTLC_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.UpdateAddHTLC_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const struct LDKUpdateFulfillHTLC *NONNULL_PTR orig);
-       export function UpdateFulfillHTLC_clone(orig: number): number {
+       // void UpdateFulfillHTLC_free(struct LDKUpdateFulfillHTLC this_ptr);
+       export function UpdateFulfillHTLC_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.UpdateFulfillHTLC_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.UpdateFulfillHTLC_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
        export function UpdateFulfillHTLC_get_channel_id(this_ptr: number): Uint8Array {
@@ -5856,21 +7182,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.UpdateFulfillHTLC_new(encodeArray(channel_id_arg), htlc_id_arg, encodeArray(payment_preimage_arg));
                return nativeResponseValue;
        }
-       // void UpdateFailHTLC_free(struct LDKUpdateFailHTLC this_ptr);
-       export function UpdateFailHTLC_free(this_ptr: number): void {
+       // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const struct LDKUpdateFulfillHTLC *NONNULL_PTR orig);
+       export function UpdateFulfillHTLC_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.UpdateFailHTLC_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.UpdateFulfillHTLC_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKUpdateFailHTLC UpdateFailHTLC_clone(const struct LDKUpdateFailHTLC *NONNULL_PTR orig);
-       export function UpdateFailHTLC_clone(orig: number): number {
+       // void UpdateFailHTLC_free(struct LDKUpdateFailHTLC this_ptr);
+       export function UpdateFailHTLC_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.UpdateFailHTLC_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.UpdateFailHTLC_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr))[32];
        export function UpdateFailHTLC_get_channel_id(this_ptr: number): Uint8Array {
@@ -5904,21 +7230,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.UpdateFailHTLC_set_htlc_id(this_ptr, val);
                // debug statements here
        }
-       // void UpdateFailMalformedHTLC_free(struct LDKUpdateFailMalformedHTLC this_ptr);
-       export function UpdateFailMalformedHTLC_free(this_ptr: number): void {
+       // struct LDKUpdateFailHTLC UpdateFailHTLC_clone(const struct LDKUpdateFailHTLC *NONNULL_PTR orig);
+       export function UpdateFailHTLC_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.UpdateFailMalformedHTLC_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.UpdateFailHTLC_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_clone(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR orig);
-       export function UpdateFailMalformedHTLC_clone(orig: number): number {
+       // void UpdateFailMalformedHTLC_free(struct LDKUpdateFailMalformedHTLC this_ptr);
+       export function UpdateFailMalformedHTLC_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.UpdateFailMalformedHTLC_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.UpdateFailMalformedHTLC_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr))[32];
        export function UpdateFailMalformedHTLC_get_channel_id(this_ptr: number): Uint8Array {
@@ -5968,21 +7294,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_failure_code(this_ptr, val);
                // debug statements here
        }
-       // void CommitmentSigned_free(struct LDKCommitmentSigned this_ptr);
-       export function CommitmentSigned_free(this_ptr: number): void {
+       // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_clone(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR orig);
+       export function UpdateFailMalformedHTLC_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CommitmentSigned_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.UpdateFailMalformedHTLC_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKCommitmentSigned CommitmentSigned_clone(const struct LDKCommitmentSigned *NONNULL_PTR orig);
-       export function CommitmentSigned_clone(orig: number): number {
+       // void CommitmentSigned_free(struct LDKCommitmentSigned this_ptr);
+       export function CommitmentSigned_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CommitmentSigned_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.CommitmentSigned_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr))[32];
        export function CommitmentSigned_get_channel_id(this_ptr: number): Uint8Array {
@@ -6032,21 +7358,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.CommitmentSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg), htlc_signatures_arg);
                return nativeResponseValue;
        }
-       // void RevokeAndACK_free(struct LDKRevokeAndACK this_ptr);
-       export function RevokeAndACK_free(this_ptr: number): void {
+       // struct LDKCommitmentSigned CommitmentSigned_clone(const struct LDKCommitmentSigned *NONNULL_PTR orig);
+       export function CommitmentSigned_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.RevokeAndACK_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.CommitmentSigned_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKRevokeAndACK RevokeAndACK_clone(const struct LDKRevokeAndACK *NONNULL_PTR orig);
-       export function RevokeAndACK_clone(orig: number): number {
+       // void RevokeAndACK_free(struct LDKRevokeAndACK this_ptr);
+       export function RevokeAndACK_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.RevokeAndACK_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.RevokeAndACK_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
        export function RevokeAndACK_get_channel_id(this_ptr: number): Uint8Array {
@@ -6104,21 +7430,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.RevokeAndACK_new(encodeArray(channel_id_arg), encodeArray(per_commitment_secret_arg), encodeArray(next_per_commitment_point_arg));
                return nativeResponseValue;
        }
-       // void UpdateFee_free(struct LDKUpdateFee this_ptr);
-       export function UpdateFee_free(this_ptr: number): void {
+       // struct LDKRevokeAndACK RevokeAndACK_clone(const struct LDKRevokeAndACK *NONNULL_PTR orig);
+       export function RevokeAndACK_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.UpdateFee_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.RevokeAndACK_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKUpdateFee UpdateFee_clone(const struct LDKUpdateFee *NONNULL_PTR orig);
-       export function UpdateFee_clone(orig: number): number {
+       // void UpdateFee_free(struct LDKUpdateFee this_ptr);
+       export function UpdateFee_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.UpdateFee_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.UpdateFee_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr))[32];
        export function UpdateFee_get_channel_id(this_ptr: number): Uint8Array {
@@ -6160,21 +7486,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.UpdateFee_new(encodeArray(channel_id_arg), feerate_per_kw_arg);
                return nativeResponseValue;
        }
-       // void DataLossProtect_free(struct LDKDataLossProtect this_ptr);
-       export function DataLossProtect_free(this_ptr: number): void {
+       // struct LDKUpdateFee UpdateFee_clone(const struct LDKUpdateFee *NONNULL_PTR orig);
+       export function UpdateFee_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.DataLossProtect_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.UpdateFee_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKDataLossProtect DataLossProtect_clone(const struct LDKDataLossProtect *NONNULL_PTR orig);
-       export function DataLossProtect_clone(orig: number): number {
+       // void DataLossProtect_free(struct LDKDataLossProtect this_ptr);
+       export function DataLossProtect_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.DataLossProtect_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.DataLossProtect_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*DataLossProtect_get_your_last_per_commitment_secret(const struct LDKDataLossProtect *NONNULL_PTR this_ptr))[32];
        export function DataLossProtect_get_your_last_per_commitment_secret(this_ptr: number): Uint8Array {
@@ -6216,21 +7542,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.DataLossProtect_new(encodeArray(your_last_per_commitment_secret_arg), encodeArray(my_current_per_commitment_point_arg));
                return nativeResponseValue;
        }
-       // void ChannelReestablish_free(struct LDKChannelReestablish this_ptr);
-       export function ChannelReestablish_free(this_ptr: number): void {
+       // struct LDKDataLossProtect DataLossProtect_clone(const struct LDKDataLossProtect *NONNULL_PTR orig);
+       export function DataLossProtect_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ChannelReestablish_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.DataLossProtect_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKChannelReestablish ChannelReestablish_clone(const struct LDKChannelReestablish *NONNULL_PTR orig);
-       export function ChannelReestablish_clone(orig: number): number {
+       // void ChannelReestablish_free(struct LDKChannelReestablish this_ptr);
+       export function ChannelReestablish_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ChannelReestablish_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.ChannelReestablish_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr))[32];
        export function ChannelReestablish_get_channel_id(this_ptr: number): Uint8Array {
@@ -6280,21 +7606,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelReestablish_set_next_remote_commitment_number(this_ptr, val);
                // debug statements here
        }
-       // void AnnouncementSignatures_free(struct LDKAnnouncementSignatures this_ptr);
-       export function AnnouncementSignatures_free(this_ptr: number): void {
+       // struct LDKChannelReestablish ChannelReestablish_clone(const struct LDKChannelReestablish *NONNULL_PTR orig);
+       export function ChannelReestablish_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.AnnouncementSignatures_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.ChannelReestablish_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKAnnouncementSignatures AnnouncementSignatures_clone(const struct LDKAnnouncementSignatures *NONNULL_PTR orig);
-       export function AnnouncementSignatures_clone(orig: number): number {
+       // void AnnouncementSignatures_free(struct LDKAnnouncementSignatures this_ptr);
+       export function AnnouncementSignatures_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.AnnouncementSignatures_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.AnnouncementSignatures_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr))[32];
        export function AnnouncementSignatures_get_channel_id(this_ptr: number): Uint8Array {
@@ -6368,6 +7694,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.AnnouncementSignatures_new(encodeArray(channel_id_arg), short_channel_id_arg, encodeArray(node_signature_arg), encodeArray(bitcoin_signature_arg));
                return nativeResponseValue;
        }
+       // struct LDKAnnouncementSignatures AnnouncementSignatures_clone(const struct LDKAnnouncementSignatures *NONNULL_PTR orig);
+       export function AnnouncementSignatures_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.AnnouncementSignatures_clone(orig);
+               return nativeResponseValue;
+       }
        // void NetAddress_free(struct LDKNetAddress this_ptr);
        export function NetAddress_free(this_ptr: number): void {
                if(!isWasmInitialized) {
@@ -6408,14 +7742,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.UnsignedNodeAnnouncement_free(this_ptr);
                // debug statements here
        }
-       // struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR orig);
-       export function UnsignedNodeAnnouncement_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.UnsignedNodeAnnouncement_clone(orig);
-               return nativeResponseValue;
-       }
        // struct LDKNodeFeatures UnsignedNodeAnnouncement_get_features(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
        export function UnsignedNodeAnnouncement_get_features(this_ptr: number): number {
                if(!isWasmInitialized) {
@@ -6504,6 +7830,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_addresses(this_ptr, val);
                // debug statements here
        }
+       // struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR orig);
+       export function UnsignedNodeAnnouncement_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.UnsignedNodeAnnouncement_clone(orig);
+               return nativeResponseValue;
+       }
        // void NodeAnnouncement_free(struct LDKNodeAnnouncement this_ptr);
        export function NodeAnnouncement_free(this_ptr: number): void {
                if(!isWasmInitialized) {
@@ -6512,14 +7846,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.NodeAnnouncement_free(this_ptr);
                // debug statements here
        }
-       // struct LDKNodeAnnouncement NodeAnnouncement_clone(const struct LDKNodeAnnouncement *NONNULL_PTR orig);
-       export function NodeAnnouncement_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.NodeAnnouncement_clone(orig);
-               return nativeResponseValue;
-       }
        // struct LDKSignature NodeAnnouncement_get_signature(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
        export function NodeAnnouncement_get_signature(this_ptr: number): Uint8Array {
                if(!isWasmInitialized) {
@@ -6560,21 +7886,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.NodeAnnouncement_new(encodeArray(signature_arg), contents_arg);
                return nativeResponseValue;
        }
-       // void UnsignedChannelAnnouncement_free(struct LDKUnsignedChannelAnnouncement this_ptr);
-       export function UnsignedChannelAnnouncement_free(this_ptr: number): void {
+       // struct LDKNodeAnnouncement NodeAnnouncement_clone(const struct LDKNodeAnnouncement *NONNULL_PTR orig);
+       export function NodeAnnouncement_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.UnsignedChannelAnnouncement_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.NodeAnnouncement_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_clone(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR orig);
-       export function UnsignedChannelAnnouncement_clone(orig: number): number {
+       // void UnsignedChannelAnnouncement_free(struct LDKUnsignedChannelAnnouncement this_ptr);
+       export function UnsignedChannelAnnouncement_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.UnsignedChannelAnnouncement_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.UnsignedChannelAnnouncement_free(this_ptr);
+               // debug statements here
        }
        // struct LDKChannelFeatures UnsignedChannelAnnouncement_get_features(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
        export function UnsignedChannelAnnouncement_get_features(this_ptr: number): number {
@@ -6688,21 +8014,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr, encodeArray(val));
                // debug statements here
        }
-       // void ChannelAnnouncement_free(struct LDKChannelAnnouncement this_ptr);
-       export function ChannelAnnouncement_free(this_ptr: number): void {
+       // struct LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_clone(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR orig);
+       export function UnsignedChannelAnnouncement_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ChannelAnnouncement_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.UnsignedChannelAnnouncement_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKChannelAnnouncement ChannelAnnouncement_clone(const struct LDKChannelAnnouncement *NONNULL_PTR orig);
-       export function ChannelAnnouncement_clone(orig: number): number {
+       // void ChannelAnnouncement_free(struct LDKChannelAnnouncement this_ptr);
+       export function ChannelAnnouncement_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ChannelAnnouncement_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.ChannelAnnouncement_free(this_ptr);
+               // debug statements here
        }
        // struct LDKSignature ChannelAnnouncement_get_node_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
        export function ChannelAnnouncement_get_node_signature_1(this_ptr: number): Uint8Array {
@@ -6792,21 +8118,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelAnnouncement_new(encodeArray(node_signature_1_arg), encodeArray(node_signature_2_arg), encodeArray(bitcoin_signature_1_arg), encodeArray(bitcoin_signature_2_arg), contents_arg);
                return nativeResponseValue;
        }
-       // void UnsignedChannelUpdate_free(struct LDKUnsignedChannelUpdate this_ptr);
-       export function UnsignedChannelUpdate_free(this_ptr: number): void {
+       // struct LDKChannelAnnouncement ChannelAnnouncement_clone(const struct LDKChannelAnnouncement *NONNULL_PTR orig);
+       export function ChannelAnnouncement_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.UnsignedChannelUpdate_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.ChannelAnnouncement_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_clone(const struct LDKUnsignedChannelUpdate *NONNULL_PTR orig);
-       export function UnsignedChannelUpdate_clone(orig: number): number {
+       // void UnsignedChannelUpdate_free(struct LDKUnsignedChannelUpdate this_ptr);
+       export function UnsignedChannelUpdate_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.UnsignedChannelUpdate_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.UnsignedChannelUpdate_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*UnsignedChannelUpdate_get_chain_hash(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr))[32];
        export function UnsignedChannelUpdate_get_chain_hash(this_ptr: number): Uint8Array {
@@ -6936,21 +8262,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr, val);
                // debug statements here
        }
-       // void ChannelUpdate_free(struct LDKChannelUpdate this_ptr);
-       export function ChannelUpdate_free(this_ptr: number): void {
+       // struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_clone(const struct LDKUnsignedChannelUpdate *NONNULL_PTR orig);
+       export function UnsignedChannelUpdate_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ChannelUpdate_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.UnsignedChannelUpdate_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKChannelUpdate ChannelUpdate_clone(const struct LDKChannelUpdate *NONNULL_PTR orig);
-       export function ChannelUpdate_clone(orig: number): number {
+       // void ChannelUpdate_free(struct LDKChannelUpdate this_ptr);
+       export function ChannelUpdate_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ChannelUpdate_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.ChannelUpdate_free(this_ptr);
+               // debug statements here
        }
        // struct LDKSignature ChannelUpdate_get_signature(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
        export function ChannelUpdate_get_signature(this_ptr: number): Uint8Array {
@@ -6992,21 +8318,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelUpdate_new(encodeArray(signature_arg), contents_arg);
                return nativeResponseValue;
        }
-       // void QueryChannelRange_free(struct LDKQueryChannelRange this_ptr);
-       export function QueryChannelRange_free(this_ptr: number): void {
+       // struct LDKChannelUpdate ChannelUpdate_clone(const struct LDKChannelUpdate *NONNULL_PTR orig);
+       export function ChannelUpdate_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.QueryChannelRange_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.ChannelUpdate_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKQueryChannelRange QueryChannelRange_clone(const struct LDKQueryChannelRange *NONNULL_PTR orig);
-       export function QueryChannelRange_clone(orig: number): number {
+       // void QueryChannelRange_free(struct LDKQueryChannelRange this_ptr);
+       export function QueryChannelRange_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.QueryChannelRange_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.QueryChannelRange_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*QueryChannelRange_get_chain_hash(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr))[32];
        export function QueryChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
@@ -7064,21 +8390,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.QueryChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg);
                return nativeResponseValue;
        }
-       // void ReplyChannelRange_free(struct LDKReplyChannelRange this_ptr);
-       export function ReplyChannelRange_free(this_ptr: number): void {
+       // struct LDKQueryChannelRange QueryChannelRange_clone(const struct LDKQueryChannelRange *NONNULL_PTR orig);
+       export function QueryChannelRange_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ReplyChannelRange_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.QueryChannelRange_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKReplyChannelRange ReplyChannelRange_clone(const struct LDKReplyChannelRange *NONNULL_PTR orig);
-       export function ReplyChannelRange_clone(orig: number): number {
+       // void ReplyChannelRange_free(struct LDKReplyChannelRange this_ptr);
+       export function ReplyChannelRange_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ReplyChannelRange_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.ReplyChannelRange_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*ReplyChannelRange_get_chain_hash(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr))[32];
        export function ReplyChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
@@ -7128,20 +8454,20 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ReplyChannelRange_set_number_of_blocks(this_ptr, val);
                // debug statements here
        }
-       // bool ReplyChannelRange_get_full_information(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
-       export function ReplyChannelRange_get_full_information(this_ptr: number): boolean {
+       // bool ReplyChannelRange_get_sync_complete(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
+       export function ReplyChannelRange_get_sync_complete(this_ptr: number): boolean {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ReplyChannelRange_get_full_information(this_ptr);
+               const nativeResponseValue = wasm.ReplyChannelRange_get_sync_complete(this_ptr);
                return nativeResponseValue;
        }
-       // void ReplyChannelRange_set_full_information(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, bool val);
-       export function ReplyChannelRange_set_full_information(this_ptr: number, val: boolean): void {
+       // void ReplyChannelRange_set_sync_complete(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, bool val);
+       export function ReplyChannelRange_set_sync_complete(this_ptr: number, val: boolean): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ReplyChannelRange_set_full_information(this_ptr, val);
+               const nativeResponseValue = wasm.ReplyChannelRange_set_sync_complete(this_ptr, val);
                // debug statements here
        }
        // void ReplyChannelRange_set_short_channel_ids(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
@@ -7152,29 +8478,29 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ReplyChannelRange_set_short_channel_ids(this_ptr, val);
                // debug statements here
        }
-       // MUST_USE_RES struct LDKReplyChannelRange ReplyChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg, bool full_information_arg, struct LDKCVec_u64Z short_channel_ids_arg);
-       export function ReplyChannelRange_new(chain_hash_arg: Uint8Array, first_blocknum_arg: number, number_of_blocks_arg: number, full_information_arg: boolean, short_channel_ids_arg: number[]): number {
+       // MUST_USE_RES struct LDKReplyChannelRange ReplyChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg, bool sync_complete_arg, struct LDKCVec_u64Z short_channel_ids_arg);
+       export function ReplyChannelRange_new(chain_hash_arg: Uint8Array, first_blocknum_arg: number, number_of_blocks_arg: number, sync_complete_arg: boolean, short_channel_ids_arg: number[]): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ReplyChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg, full_information_arg, short_channel_ids_arg);
+               const nativeResponseValue = wasm.ReplyChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg, sync_complete_arg, short_channel_ids_arg);
                return nativeResponseValue;
        }
-       // void QueryShortChannelIds_free(struct LDKQueryShortChannelIds this_ptr);
-       export function QueryShortChannelIds_free(this_ptr: number): void {
+       // struct LDKReplyChannelRange ReplyChannelRange_clone(const struct LDKReplyChannelRange *NONNULL_PTR orig);
+       export function ReplyChannelRange_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.QueryShortChannelIds_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.ReplyChannelRange_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKQueryShortChannelIds QueryShortChannelIds_clone(const struct LDKQueryShortChannelIds *NONNULL_PTR orig);
-       export function QueryShortChannelIds_clone(orig: number): number {
+       // void QueryShortChannelIds_free(struct LDKQueryShortChannelIds this_ptr);
+       export function QueryShortChannelIds_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.QueryShortChannelIds_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.QueryShortChannelIds_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*QueryShortChannelIds_get_chain_hash(const struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr))[32];
        export function QueryShortChannelIds_get_chain_hash(this_ptr: number): Uint8Array {
@@ -7208,21 +8534,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.QueryShortChannelIds_new(encodeArray(chain_hash_arg), short_channel_ids_arg);
                return nativeResponseValue;
        }
-       // void ReplyShortChannelIdsEnd_free(struct LDKReplyShortChannelIdsEnd this_ptr);
-       export function ReplyShortChannelIdsEnd_free(this_ptr: number): void {
+       // struct LDKQueryShortChannelIds QueryShortChannelIds_clone(const struct LDKQueryShortChannelIds *NONNULL_PTR orig);
+       export function QueryShortChannelIds_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.QueryShortChannelIds_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_clone(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR orig);
-       export function ReplyShortChannelIdsEnd_clone(orig: number): number {
+       // void ReplyShortChannelIdsEnd_free(struct LDKReplyShortChannelIdsEnd this_ptr);
+       export function ReplyShortChannelIdsEnd_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*ReplyShortChannelIdsEnd_get_chain_hash(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr))[32];
        export function ReplyShortChannelIdsEnd_get_chain_hash(this_ptr: number): Uint8Array {
@@ -7264,21 +8590,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_new(encodeArray(chain_hash_arg), full_information_arg);
                return nativeResponseValue;
        }
-       // void GossipTimestampFilter_free(struct LDKGossipTimestampFilter this_ptr);
-       export function GossipTimestampFilter_free(this_ptr: number): void {
+       // struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_clone(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR orig);
+       export function ReplyShortChannelIdsEnd_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.GossipTimestampFilter_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKGossipTimestampFilter GossipTimestampFilter_clone(const struct LDKGossipTimestampFilter *NONNULL_PTR orig);
-       export function GossipTimestampFilter_clone(orig: number): number {
+       // void GossipTimestampFilter_free(struct LDKGossipTimestampFilter this_ptr);
+       export function GossipTimestampFilter_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.GossipTimestampFilter_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.GossipTimestampFilter_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*GossipTimestampFilter_get_chain_hash(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr))[32];
        export function GossipTimestampFilter_get_chain_hash(this_ptr: number): Uint8Array {
@@ -7336,6 +8662,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.GossipTimestampFilter_new(encodeArray(chain_hash_arg), first_timestamp_arg, timestamp_range_arg);
                return nativeResponseValue;
        }
+       // struct LDKGossipTimestampFilter GossipTimestampFilter_clone(const struct LDKGossipTimestampFilter *NONNULL_PTR orig);
+       export function GossipTimestampFilter_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.GossipTimestampFilter_clone(orig);
+               return nativeResponseValue;
+       }
        // void ErrorAction_free(struct LDKErrorAction this_ptr);
        export function ErrorAction_free(this_ptr: number): void {
                if(!isWasmInitialized) {
@@ -7360,14 +8694,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.LightningError_free(this_ptr);
                // debug statements here
        }
-       // struct LDKLightningError LightningError_clone(const struct LDKLightningError *NONNULL_PTR orig);
-       export function LightningError_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.LightningError_clone(orig);
-               return nativeResponseValue;
-       }
        // struct LDKStr LightningError_get_err(const struct LDKLightningError *NONNULL_PTR this_ptr);
        export function LightningError_get_err(this_ptr: number): String {
                if(!isWasmInitialized) {
@@ -7408,21 +8734,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.LightningError_new(encodeArray(err_arg), action_arg);
                return nativeResponseValue;
        }
-       // void CommitmentUpdate_free(struct LDKCommitmentUpdate this_ptr);
-       export function CommitmentUpdate_free(this_ptr: number): void {
+       // struct LDKLightningError LightningError_clone(const struct LDKLightningError *NONNULL_PTR orig);
+       export function LightningError_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CommitmentUpdate_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.LightningError_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKCommitmentUpdate CommitmentUpdate_clone(const struct LDKCommitmentUpdate *NONNULL_PTR orig);
-       export function CommitmentUpdate_clone(orig: number): number {
+       // void CommitmentUpdate_free(struct LDKCommitmentUpdate this_ptr);
+       export function CommitmentUpdate_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CommitmentUpdate_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.CommitmentUpdate_free(this_ptr);
+               // debug statements here
        }
        // void CommitmentUpdate_set_update_add_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateAddHTLCZ val);
        export function CommitmentUpdate_set_update_add_htlcs(this_ptr: number, val: number[]): void {
@@ -7496,6 +8822,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.CommitmentUpdate_new(update_add_htlcs_arg, update_fulfill_htlcs_arg, update_fail_htlcs_arg, update_fail_malformed_htlcs_arg, update_fee_arg, commitment_signed_arg);
                return nativeResponseValue;
        }
+       // struct LDKCommitmentUpdate CommitmentUpdate_clone(const struct LDKCommitmentUpdate *NONNULL_PTR orig);
+       export function CommitmentUpdate_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CommitmentUpdate_clone(orig);
+               return nativeResponseValue;
+       }
        // void HTLCFailChannelUpdate_free(struct LDKHTLCFailChannelUpdate this_ptr);
        export function HTLCFailChannelUpdate_free(this_ptr: number): void {
                if(!isWasmInitialized) {
@@ -7536,7 +8870,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.AcceptChannel_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKAcceptChannel AcceptChannel_read(struct LDKu8slice ser);
+       // struct LDKCResult_AcceptChannelDecodeErrorZ AcceptChannel_read(struct LDKu8slice ser);
        export function AcceptChannel_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -7552,7 +8886,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.AnnouncementSignatures_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKAnnouncementSignatures AnnouncementSignatures_read(struct LDKu8slice ser);
+       // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ AnnouncementSignatures_read(struct LDKu8slice ser);
        export function AnnouncementSignatures_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -7584,7 +8918,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ClosingSigned_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKClosingSigned ClosingSigned_read(struct LDKu8slice ser);
+       // struct LDKCResult_ClosingSignedDecodeErrorZ ClosingSigned_read(struct LDKu8slice ser);
        export function ClosingSigned_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -7600,7 +8934,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.CommitmentSigned_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKCommitmentSigned CommitmentSigned_read(struct LDKu8slice ser);
+       // struct LDKCResult_CommitmentSignedDecodeErrorZ CommitmentSigned_read(struct LDKu8slice ser);
        export function CommitmentSigned_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -7616,7 +8950,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.FundingCreated_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKFundingCreated FundingCreated_read(struct LDKu8slice ser);
+       // struct LDKCResult_FundingCreatedDecodeErrorZ FundingCreated_read(struct LDKu8slice ser);
        export function FundingCreated_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -7632,7 +8966,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.FundingSigned_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKFundingSigned FundingSigned_read(struct LDKu8slice ser);
+       // struct LDKCResult_FundingSignedDecodeErrorZ FundingSigned_read(struct LDKu8slice ser);
        export function FundingSigned_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -7648,7 +8982,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.FundingLocked_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKFundingLocked FundingLocked_read(struct LDKu8slice ser);
+       // struct LDKCResult_FundingLockedDecodeErrorZ FundingLocked_read(struct LDKu8slice ser);
        export function FundingLocked_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -7680,7 +9014,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.OpenChannel_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKOpenChannel OpenChannel_read(struct LDKu8slice ser);
+       // struct LDKCResult_OpenChannelDecodeErrorZ OpenChannel_read(struct LDKu8slice ser);
        export function OpenChannel_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -7696,7 +9030,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.RevokeAndACK_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKRevokeAndACK RevokeAndACK_read(struct LDKu8slice ser);
+       // struct LDKCResult_RevokeAndACKDecodeErrorZ RevokeAndACK_read(struct LDKu8slice ser);
        export function RevokeAndACK_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -7712,7 +9046,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.Shutdown_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKShutdown Shutdown_read(struct LDKu8slice ser);
+       // struct LDKCResult_ShutdownDecodeErrorZ Shutdown_read(struct LDKu8slice ser);
        export function Shutdown_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -7728,7 +9062,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.UpdateFailHTLC_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKUpdateFailHTLC UpdateFailHTLC_read(struct LDKu8slice ser);
+       // struct LDKCResult_UpdateFailHTLCDecodeErrorZ UpdateFailHTLC_read(struct LDKu8slice ser);
        export function UpdateFailHTLC_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -7744,7 +9078,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.UpdateFailMalformedHTLC_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_read(struct LDKu8slice ser);
+       // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ UpdateFailMalformedHTLC_read(struct LDKu8slice ser);
        export function UpdateFailMalformedHTLC_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -7760,7 +9094,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.UpdateFee_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKUpdateFee UpdateFee_read(struct LDKu8slice ser);
+       // struct LDKCResult_UpdateFeeDecodeErrorZ UpdateFee_read(struct LDKu8slice ser);
        export function UpdateFee_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -7776,7 +9110,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.UpdateFulfillHTLC_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_read(struct LDKu8slice ser);
+       // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ UpdateFulfillHTLC_read(struct LDKu8slice ser);
        export function UpdateFulfillHTLC_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -7792,7 +9126,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.UpdateAddHTLC_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKUpdateAddHTLC UpdateAddHTLC_read(struct LDKu8slice ser);
+       // struct LDKCResult_UpdateAddHTLCDecodeErrorZ UpdateAddHTLC_read(struct LDKu8slice ser);
        export function UpdateAddHTLC_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -7856,7 +9190,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelAnnouncement_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKChannelAnnouncement ChannelAnnouncement_read(struct LDKu8slice ser);
+       // struct LDKCResult_ChannelAnnouncementDecodeErrorZ ChannelAnnouncement_read(struct LDKu8slice ser);
        export function ChannelAnnouncement_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -7888,7 +9222,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelUpdate_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKChannelUpdate ChannelUpdate_read(struct LDKu8slice ser);
+       // struct LDKCResult_ChannelUpdateDecodeErrorZ ChannelUpdate_read(struct LDKu8slice ser);
        export function ChannelUpdate_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -7936,7 +9270,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.NodeAnnouncement_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKNodeAnnouncement NodeAnnouncement_read(struct LDKu8slice ser);
+       // struct LDKCResult_NodeAnnouncementDecodeErrorZ NodeAnnouncement_read(struct LDKu8slice ser);
        export function NodeAnnouncement_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -8096,14 +9430,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.PeerHandleError_free(this_ptr);
                // debug statements here
        }
-       // struct LDKPeerHandleError PeerHandleError_clone(const struct LDKPeerHandleError *NONNULL_PTR orig);
-       export function PeerHandleError_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.PeerHandleError_clone(orig);
-               return nativeResponseValue;
-       }
        // bool PeerHandleError_get_no_connection_possible(const struct LDKPeerHandleError *NONNULL_PTR this_ptr);
        export function PeerHandleError_get_no_connection_possible(this_ptr: number): boolean {
                if(!isWasmInitialized) {
@@ -8128,6 +9454,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.PeerHandleError_new(no_connection_possible_arg);
                return nativeResponseValue;
        }
+       // struct LDKPeerHandleError PeerHandleError_clone(const struct LDKPeerHandleError *NONNULL_PTR orig);
+       export function PeerHandleError_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.PeerHandleError_clone(orig);
+               return nativeResponseValue;
+       }
        // void PeerManager_free(struct LDKPeerManager this_ptr);
        export function PeerManager_free(this_ptr: number): void {
                if(!isWasmInitialized) {
@@ -8224,7 +9558,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.build_commitment_secret(encodeArray(commitment_seed), idx);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKCResult_SecretKeySecpErrorZ derive_private_key(struct LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]);
+       // struct LDKCResult_SecretKeyErrorZ derive_private_key(struct LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]);
        export function derive_private_key(per_commitment_point: Uint8Array, base_secret: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -8232,7 +9566,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.derive_private_key(encodeArray(per_commitment_point), encodeArray(base_secret));
                return nativeResponseValue;
        }
-       // struct LDKCResult_PublicKeySecpErrorZ derive_public_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey base_point);
+       // struct LDKCResult_PublicKeyErrorZ derive_public_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey base_point);
        export function derive_public_key(per_commitment_point: Uint8Array, base_point: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -8240,7 +9574,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.derive_public_key(encodeArray(per_commitment_point), encodeArray(base_point));
                return nativeResponseValue;
        }
-       // struct LDKCResult_SecretKeySecpErrorZ derive_private_revocation_key(const uint8_t (*per_commitment_secret)[32], const uint8_t (*countersignatory_revocation_base_secret)[32]);
+       // struct LDKCResult_SecretKeyErrorZ derive_private_revocation_key(const uint8_t (*per_commitment_secret)[32], const uint8_t (*countersignatory_revocation_base_secret)[32]);
        export function derive_private_revocation_key(per_commitment_secret: Uint8Array, countersignatory_revocation_base_secret: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -8248,7 +9582,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.derive_private_revocation_key(encodeArray(per_commitment_secret), encodeArray(countersignatory_revocation_base_secret));
                return nativeResponseValue;
        }
-       // struct LDKCResult_PublicKeySecpErrorZ derive_public_revocation_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey countersignatory_revocation_base_point);
+       // struct LDKCResult_PublicKeyErrorZ derive_public_revocation_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey countersignatory_revocation_base_point);
        export function derive_public_revocation_key(per_commitment_point: Uint8Array, countersignatory_revocation_base_point: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -8264,14 +9598,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.TxCreationKeys_free(this_ptr);
                // debug statements here
        }
-       // struct LDKTxCreationKeys TxCreationKeys_clone(const struct LDKTxCreationKeys *NONNULL_PTR orig);
-       export function TxCreationKeys_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.TxCreationKeys_clone(orig);
-               return nativeResponseValue;
-       }
        // struct LDKPublicKey TxCreationKeys_get_per_commitment_point(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
        export function TxCreationKeys_get_per_commitment_point(this_ptr: number): Uint8Array {
                if(!isWasmInitialized) {
@@ -8360,6 +9686,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.TxCreationKeys_new(encodeArray(per_commitment_point_arg), encodeArray(revocation_key_arg), encodeArray(broadcaster_htlc_key_arg), encodeArray(countersignatory_htlc_key_arg), encodeArray(broadcaster_delayed_payment_key_arg));
                return nativeResponseValue;
        }
+       // struct LDKTxCreationKeys TxCreationKeys_clone(const struct LDKTxCreationKeys *NONNULL_PTR orig);
+       export function TxCreationKeys_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.TxCreationKeys_clone(orig);
+               return nativeResponseValue;
+       }
        // struct LDKCVec_u8Z TxCreationKeys_write(const struct LDKTxCreationKeys *NONNULL_PTR obj);
        export function TxCreationKeys_write(obj: number): Uint8Array {
                if(!isWasmInitialized) {
@@ -8368,7 +9702,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.TxCreationKeys_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKTxCreationKeys TxCreationKeys_read(struct LDKu8slice ser);
+       // struct LDKCResult_TxCreationKeysDecodeErrorZ TxCreationKeys_read(struct LDKu8slice ser);
        export function TxCreationKeys_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -8384,14 +9718,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelPublicKeys_free(this_ptr);
                // debug statements here
        }
-       // struct LDKChannelPublicKeys ChannelPublicKeys_clone(const struct LDKChannelPublicKeys *NONNULL_PTR orig);
-       export function ChannelPublicKeys_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.ChannelPublicKeys_clone(orig);
-               return nativeResponseValue;
-       }
        // struct LDKPublicKey ChannelPublicKeys_get_funding_pubkey(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
        export function ChannelPublicKeys_get_funding_pubkey(this_ptr: number): Uint8Array {
                if(!isWasmInitialized) {
@@ -8480,6 +9806,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelPublicKeys_new(encodeArray(funding_pubkey_arg), encodeArray(revocation_basepoint_arg), encodeArray(payment_point_arg), encodeArray(delayed_payment_basepoint_arg), encodeArray(htlc_basepoint_arg));
                return nativeResponseValue;
        }
+       // struct LDKChannelPublicKeys ChannelPublicKeys_clone(const struct LDKChannelPublicKeys *NONNULL_PTR orig);
+       export function ChannelPublicKeys_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.ChannelPublicKeys_clone(orig);
+               return nativeResponseValue;
+       }
        // struct LDKCVec_u8Z ChannelPublicKeys_write(const struct LDKChannelPublicKeys *NONNULL_PTR obj);
        export function ChannelPublicKeys_write(obj: number): Uint8Array {
                if(!isWasmInitialized) {
@@ -8488,7 +9822,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelPublicKeys_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKChannelPublicKeys ChannelPublicKeys_read(struct LDKu8slice ser);
+       // struct LDKCResult_ChannelPublicKeysDecodeErrorZ ChannelPublicKeys_read(struct LDKu8slice ser);
        export function ChannelPublicKeys_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -8496,7 +9830,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelPublicKeys_read(encodeArray(ser));
                return nativeResponseValue;
        }
-       // MUST_USE_RES struct LDKCResult_TxCreationKeysSecpErrorZ TxCreationKeys_derive_new(struct LDKPublicKey per_commitment_point, struct LDKPublicKey broadcaster_delayed_payment_base, struct LDKPublicKey broadcaster_htlc_base, struct LDKPublicKey countersignatory_revocation_base, struct LDKPublicKey countersignatory_htlc_base);
+       // MUST_USE_RES struct LDKCResult_TxCreationKeysErrorZ TxCreationKeys_derive_new(struct LDKPublicKey per_commitment_point, struct LDKPublicKey broadcaster_delayed_payment_base, struct LDKPublicKey broadcaster_htlc_base, struct LDKPublicKey countersignatory_revocation_base, struct LDKPublicKey countersignatory_htlc_base);
        export function TxCreationKeys_derive_new(per_commitment_point: Uint8Array, broadcaster_delayed_payment_base: Uint8Array, broadcaster_htlc_base: Uint8Array, countersignatory_revocation_base: Uint8Array, countersignatory_htlc_base: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -8504,7 +9838,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.TxCreationKeys_derive_new(encodeArray(per_commitment_point), encodeArray(broadcaster_delayed_payment_base), encodeArray(broadcaster_htlc_base), encodeArray(countersignatory_revocation_base), encodeArray(countersignatory_htlc_base));
                return nativeResponseValue;
        }
-       // MUST_USE_RES struct LDKCResult_TxCreationKeysSecpErrorZ TxCreationKeys_from_channel_static_keys(struct LDKPublicKey per_commitment_point, const struct LDKChannelPublicKeys *NONNULL_PTR broadcaster_keys, const struct LDKChannelPublicKeys *NONNULL_PTR countersignatory_keys);
+       // MUST_USE_RES struct LDKCResult_TxCreationKeysErrorZ TxCreationKeys_from_channel_static_keys(struct LDKPublicKey per_commitment_point, const struct LDKChannelPublicKeys *NONNULL_PTR broadcaster_keys, const struct LDKChannelPublicKeys *NONNULL_PTR countersignatory_keys);
        export function TxCreationKeys_from_channel_static_keys(per_commitment_point: Uint8Array, broadcaster_keys: number, countersignatory_keys: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -8528,14 +9862,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.HTLCOutputInCommitment_free(this_ptr);
                // debug statements here
        }
-       // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const struct LDKHTLCOutputInCommitment *NONNULL_PTR orig);
-       export function HTLCOutputInCommitment_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.HTLCOutputInCommitment_clone(orig);
-               return nativeResponseValue;
-       }
        // bool HTLCOutputInCommitment_get_offered(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
        export function HTLCOutputInCommitment_get_offered(this_ptr: number): boolean {
                if(!isWasmInitialized) {
@@ -8597,8 +9923,16 @@ public static native long new_empty_slice_vec();
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.HTLCOutputInCommitment_set_payment_hash(this_ptr, encodeArray(val));
-               // debug statements here
+               const nativeResponseValue = wasm.HTLCOutputInCommitment_set_payment_hash(this_ptr, encodeArray(val));
+               // debug statements here
+       }
+       // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const struct LDKHTLCOutputInCommitment *NONNULL_PTR orig);
+       export function HTLCOutputInCommitment_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.HTLCOutputInCommitment_clone(orig);
+               return nativeResponseValue;
        }
        // struct LDKCVec_u8Z HTLCOutputInCommitment_write(const struct LDKHTLCOutputInCommitment *NONNULL_PTR obj);
        export function HTLCOutputInCommitment_write(obj: number): Uint8Array {
@@ -8608,7 +9942,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.HTLCOutputInCommitment_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_read(struct LDKu8slice ser);
+       // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ HTLCOutputInCommitment_read(struct LDKu8slice ser);
        export function HTLCOutputInCommitment_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -8648,14 +9982,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelTransactionParameters_free(this_ptr);
                // debug statements here
        }
-       // struct LDKChannelTransactionParameters ChannelTransactionParameters_clone(const struct LDKChannelTransactionParameters *NONNULL_PTR orig);
-       export function ChannelTransactionParameters_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.ChannelTransactionParameters_clone(orig);
-               return nativeResponseValue;
-       }
        // struct LDKChannelPublicKeys ChannelTransactionParameters_get_holder_pubkeys(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
        export function ChannelTransactionParameters_get_holder_pubkeys(this_ptr: number): number {
                if(!isWasmInitialized) {
@@ -8744,21 +10070,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelTransactionParameters_new(holder_pubkeys_arg, holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg, funding_outpoint_arg);
                return nativeResponseValue;
        }
-       // void CounterpartyChannelTransactionParameters_free(struct LDKCounterpartyChannelTransactionParameters this_ptr);
-       export function CounterpartyChannelTransactionParameters_free(this_ptr: number): void {
+       // struct LDKChannelTransactionParameters ChannelTransactionParameters_clone(const struct LDKChannelTransactionParameters *NONNULL_PTR orig);
+       export function ChannelTransactionParameters_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.ChannelTransactionParameters_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_clone(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR orig);
-       export function CounterpartyChannelTransactionParameters_clone(orig: number): number {
+       // void CounterpartyChannelTransactionParameters_free(struct LDKCounterpartyChannelTransactionParameters this_ptr);
+       export function CounterpartyChannelTransactionParameters_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_free(this_ptr);
+               // debug statements here
        }
        // struct LDKChannelPublicKeys CounterpartyChannelTransactionParameters_get_pubkeys(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
        export function CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr: number): number {
@@ -8800,6 +10126,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_new(pubkeys_arg, selected_contest_delay_arg);
                return nativeResponseValue;
        }
+       // struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_clone(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR orig);
+       export function CounterpartyChannelTransactionParameters_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_clone(orig);
+               return nativeResponseValue;
+       }
        // MUST_USE_RES bool ChannelTransactionParameters_is_populated(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
        export function ChannelTransactionParameters_is_populated(this_arg: number): boolean {
                if(!isWasmInitialized) {
@@ -8832,7 +10166,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_read(struct LDKu8slice ser);
+       // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CounterpartyChannelTransactionParameters_read(struct LDKu8slice ser);
        export function CounterpartyChannelTransactionParameters_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -8848,7 +10182,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelTransactionParameters_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKChannelTransactionParameters ChannelTransactionParameters_read(struct LDKu8slice ser);
+       // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ ChannelTransactionParameters_read(struct LDKu8slice ser);
        export function ChannelTransactionParameters_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -8912,14 +10246,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.HolderCommitmentTransaction_free(this_ptr);
                // debug statements here
        }
-       // struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_clone(const struct LDKHolderCommitmentTransaction *NONNULL_PTR orig);
-       export function HolderCommitmentTransaction_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.HolderCommitmentTransaction_clone(orig);
-               return nativeResponseValue;
-       }
        // struct LDKSignature HolderCommitmentTransaction_get_counterparty_sig(const struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr);
        export function HolderCommitmentTransaction_get_counterparty_sig(this_ptr: number): Uint8Array {
                if(!isWasmInitialized) {
@@ -8944,6 +10270,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr, val);
                // debug statements here
        }
+       // struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_clone(const struct LDKHolderCommitmentTransaction *NONNULL_PTR orig);
+       export function HolderCommitmentTransaction_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.HolderCommitmentTransaction_clone(orig);
+               return nativeResponseValue;
+       }
        // struct LDKCVec_u8Z HolderCommitmentTransaction_write(const struct LDKHolderCommitmentTransaction *NONNULL_PTR obj);
        export function HolderCommitmentTransaction_write(obj: number): Uint8Array {
                if(!isWasmInitialized) {
@@ -8952,7 +10286,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.HolderCommitmentTransaction_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_read(struct LDKu8slice ser);
+       // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ HolderCommitmentTransaction_read(struct LDKu8slice ser);
        export function HolderCommitmentTransaction_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -8976,14 +10310,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.BuiltCommitmentTransaction_free(this_ptr);
                // debug statements here
        }
-       // struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_clone(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR orig);
-       export function BuiltCommitmentTransaction_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.BuiltCommitmentTransaction_clone(orig);
-               return nativeResponseValue;
-       }
        // struct LDKTransaction BuiltCommitmentTransaction_get_transaction(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr);
        export function BuiltCommitmentTransaction_get_transaction(this_ptr: number): Uint8Array {
                if(!isWasmInitialized) {
@@ -9024,6 +10350,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.BuiltCommitmentTransaction_new(encodeArray(transaction_arg), encodeArray(txid_arg));
                return nativeResponseValue;
        }
+       // struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_clone(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR orig);
+       export function BuiltCommitmentTransaction_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.BuiltCommitmentTransaction_clone(orig);
+               return nativeResponseValue;
+       }
        // struct LDKCVec_u8Z BuiltCommitmentTransaction_write(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR obj);
        export function BuiltCommitmentTransaction_write(obj: number): Uint8Array {
                if(!isWasmInitialized) {
@@ -9032,7 +10366,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.BuiltCommitmentTransaction_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_read(struct LDKu8slice ser);
+       // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ BuiltCommitmentTransaction_read(struct LDKu8slice ser);
        export function BuiltCommitmentTransaction_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -9080,7 +10414,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.CommitmentTransaction_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKCommitmentTransaction CommitmentTransaction_read(struct LDKu8slice ser);
+       // struct LDKCResult_CommitmentTransactionDecodeErrorZ CommitmentTransaction_read(struct LDKu8slice ser);
        export function CommitmentTransaction_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -9184,6 +10518,30 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.get_commitment_transaction_number_obscure_factor(encodeArray(broadcaster_payment_basepoint), encodeArray(countersignatory_payment_basepoint), outbound_from_broadcaster);
                return nativeResponseValue;
        }
+       // struct LDKInitFeatures InitFeatures_clone(const struct LDKInitFeatures *NONNULL_PTR orig);
+       export function InitFeatures_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.InitFeatures_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKNodeFeatures NodeFeatures_clone(const struct LDKNodeFeatures *NONNULL_PTR orig);
+       export function NodeFeatures_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.NodeFeatures_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKChannelFeatures ChannelFeatures_clone(const struct LDKChannelFeatures *NONNULL_PTR orig);
+       export function ChannelFeatures_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.ChannelFeatures_clone(orig);
+               return nativeResponseValue;
+       }
        // void InitFeatures_free(struct LDKInitFeatures this_ptr);
        export function InitFeatures_free(this_ptr: number): void {
                if(!isWasmInitialized) {
@@ -9208,22 +10566,110 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelFeatures_free(this_ptr);
                // debug statements here
        }
-       // void RouteHop_free(struct LDKRouteHop this_ptr);
-       export function RouteHop_free(this_ptr: number): void {
+       // MUST_USE_RES struct LDKInitFeatures InitFeatures_empty(void);
+       export function InitFeatures_empty(): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.RouteHop_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.InitFeatures_empty();
+               return nativeResponseValue;
        }
-       // struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig);
-       export function RouteHop_clone(orig: number): number {
+       // MUST_USE_RES struct LDKInitFeatures InitFeatures_known(void);
+       export function InitFeatures_known(): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.RouteHop_clone(orig);
+               const nativeResponseValue = wasm.InitFeatures_known();
+               return nativeResponseValue;
+       }
+       // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_empty(void);
+       export function NodeFeatures_empty(): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.NodeFeatures_empty();
+               return nativeResponseValue;
+       }
+       // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_known(void);
+       export function NodeFeatures_known(): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.NodeFeatures_known();
+               return nativeResponseValue;
+       }
+       // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_empty(void);
+       export function ChannelFeatures_empty(): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.ChannelFeatures_empty();
+               return nativeResponseValue;
+       }
+       // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_known(void);
+       export function ChannelFeatures_known(): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.ChannelFeatures_known();
+               return nativeResponseValue;
+       }
+       // struct LDKCVec_u8Z InitFeatures_write(const struct LDKInitFeatures *NONNULL_PTR obj);
+       export function InitFeatures_write(obj: number): Uint8Array {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.InitFeatures_write(obj);
+               return decodeArray(nativeResponseValue);
+       }
+       // struct LDKCVec_u8Z NodeFeatures_write(const struct LDKNodeFeatures *NONNULL_PTR obj);
+       export function NodeFeatures_write(obj: number): Uint8Array {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.NodeFeatures_write(obj);
+               return decodeArray(nativeResponseValue);
+       }
+       // struct LDKCVec_u8Z ChannelFeatures_write(const struct LDKChannelFeatures *NONNULL_PTR obj);
+       export function ChannelFeatures_write(obj: number): Uint8Array {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.ChannelFeatures_write(obj);
+               return decodeArray(nativeResponseValue);
+       }
+       // struct LDKCResult_InitFeaturesDecodeErrorZ InitFeatures_read(struct LDKu8slice ser);
+       export function InitFeatures_read(ser: Uint8Array): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.InitFeatures_read(encodeArray(ser));
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_NodeFeaturesDecodeErrorZ NodeFeatures_read(struct LDKu8slice ser);
+       export function NodeFeatures_read(ser: Uint8Array): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.NodeFeatures_read(encodeArray(ser));
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_ChannelFeaturesDecodeErrorZ ChannelFeatures_read(struct LDKu8slice ser);
+       export function ChannelFeatures_read(ser: Uint8Array): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.ChannelFeatures_read(encodeArray(ser));
                return nativeResponseValue;
        }
+       // void RouteHop_free(struct LDKRouteHop this_ptr);
+       export function RouteHop_free(this_ptr: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.RouteHop_free(this_ptr);
+               // debug statements here
+       }
        // struct LDKPublicKey RouteHop_get_pubkey(const struct LDKRouteHop *NONNULL_PTR this_ptr);
        export function RouteHop_get_pubkey(this_ptr: number): Uint8Array {
                if(!isWasmInitialized) {
@@ -9328,21 +10774,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.RouteHop_new(encodeArray(pubkey_arg), node_features_arg, short_channel_id_arg, channel_features_arg, fee_msat_arg, cltv_expiry_delta_arg);
                return nativeResponseValue;
        }
-       // void Route_free(struct LDKRoute this_ptr);
-       export function Route_free(this_ptr: number): void {
+       // struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig);
+       export function RouteHop_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.Route_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.RouteHop_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKRoute Route_clone(const struct LDKRoute *NONNULL_PTR orig);
-       export function Route_clone(orig: number): number {
+       // void Route_free(struct LDKRoute this_ptr);
+       export function Route_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.Route_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.Route_free(this_ptr);
+               // debug statements here
        }
        // void Route_set_paths(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKCVec_CVec_RouteHopZZ val);
        export function Route_set_paths(this_ptr: number, val: number[][]): void {
@@ -9360,6 +10806,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.Route_new(paths_arg);
                return nativeResponseValue;
        }
+       // struct LDKRoute Route_clone(const struct LDKRoute *NONNULL_PTR orig);
+       export function Route_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.Route_clone(orig);
+               return nativeResponseValue;
+       }
        // struct LDKCVec_u8Z Route_write(const struct LDKRoute *NONNULL_PTR obj);
        export function Route_write(obj: number): Uint8Array {
                if(!isWasmInitialized) {
@@ -9384,14 +10838,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.RouteHint_free(this_ptr);
                // debug statements here
        }
-       // struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
-       export function RouteHint_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.RouteHint_clone(orig);
-               return nativeResponseValue;
-       }
        // struct LDKPublicKey RouteHint_get_src_node_id(const struct LDKRouteHint *NONNULL_PTR this_ptr);
        export function RouteHint_get_src_node_id(this_ptr: number): Uint8Array {
                if(!isWasmInitialized) {
@@ -9480,6 +10926,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.RouteHint_new(encodeArray(src_node_id_arg), short_channel_id_arg, fees_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg);
                return nativeResponseValue;
        }
+       // struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
+       export function RouteHint_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.RouteHint_clone(orig);
+               return nativeResponseValue;
+       }
        // struct LDKCResult_RouteLightningErrorZ get_route(struct LDKPublicKey our_node_id, const struct LDKNetworkGraph *NONNULL_PTR network, struct LDKPublicKey target, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKCVec_RouteHintZ last_hops, uint64_t final_value_msat, uint32_t final_cltv, struct LDKLogger logger);
        export function get_route(our_node_id: Uint8Array, network: number, target: Uint8Array, first_hops: number[], last_hops: number[], final_value_msat: number, final_cltv: number, logger: number): number {
                if(!isWasmInitialized) {
@@ -9568,14 +11022,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.DirectionalChannelInfo_free(this_ptr);
                // debug statements here
        }
-       // struct LDKDirectionalChannelInfo DirectionalChannelInfo_clone(const struct LDKDirectionalChannelInfo *NONNULL_PTR orig);
-       export function DirectionalChannelInfo_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.DirectionalChannelInfo_clone(orig);
-               return nativeResponseValue;
-       }
        // uint32_t DirectionalChannelInfo_get_last_update(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
        export function DirectionalChannelInfo_get_last_update(this_ptr: number): number {
                if(!isWasmInitialized) {
@@ -9672,6 +11118,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update_message(this_ptr, val);
                // debug statements here
        }
+       // struct LDKDirectionalChannelInfo DirectionalChannelInfo_clone(const struct LDKDirectionalChannelInfo *NONNULL_PTR orig);
+       export function DirectionalChannelInfo_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.DirectionalChannelInfo_clone(orig);
+               return nativeResponseValue;
+       }
        // struct LDKCVec_u8Z DirectionalChannelInfo_write(const struct LDKDirectionalChannelInfo *NONNULL_PTR obj);
        export function DirectionalChannelInfo_write(obj: number): Uint8Array {
                if(!isWasmInitialized) {
@@ -9680,7 +11134,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.DirectionalChannelInfo_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKDirectionalChannelInfo DirectionalChannelInfo_read(struct LDKu8slice ser);
+       // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ DirectionalChannelInfo_read(struct LDKu8slice ser);
        export function DirectionalChannelInfo_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -9800,7 +11254,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelInfo_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKChannelInfo ChannelInfo_read(struct LDKu8slice ser);
+       // struct LDKCResult_ChannelInfoDecodeErrorZ ChannelInfo_read(struct LDKu8slice ser);
        export function ChannelInfo_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -9816,14 +11270,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.RoutingFees_free(this_ptr);
                // debug statements here
        }
-       // struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig);
-       export function RoutingFees_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.RoutingFees_clone(orig);
-               return nativeResponseValue;
-       }
        // uint32_t RoutingFees_get_base_msat(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
        export function RoutingFees_get_base_msat(this_ptr: number): number {
                if(!isWasmInitialized) {
@@ -9864,6 +11310,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.RoutingFees_new(base_msat_arg, proportional_millionths_arg);
                return nativeResponseValue;
        }
+       // struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig);
+       export function RoutingFees_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.RoutingFees_clone(orig);
+               return nativeResponseValue;
+       }
        // struct LDKCResult_RoutingFeesDecodeErrorZ RoutingFees_read(struct LDKu8slice ser);
        export function RoutingFees_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
@@ -9888,14 +11342,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.NodeAnnouncementInfo_free(this_ptr);
                // debug statements here
        }
-       // struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_clone(const struct LDKNodeAnnouncementInfo *NONNULL_PTR orig);
-       export function NodeAnnouncementInfo_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.NodeAnnouncementInfo_clone(orig);
-               return nativeResponseValue;
-       }
        // struct LDKNodeFeatures NodeAnnouncementInfo_get_features(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
        export function NodeAnnouncementInfo_get_features(this_ptr: number): number {
                if(!isWasmInitialized) {
@@ -9992,6 +11438,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.NodeAnnouncementInfo_new(features_arg, last_update_arg, encodeArray(rgb_arg), encodeArray(alias_arg), addresses_arg, announcement_message_arg);
                return nativeResponseValue;
        }
+       // struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_clone(const struct LDKNodeAnnouncementInfo *NONNULL_PTR orig);
+       export function NodeAnnouncementInfo_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.NodeAnnouncementInfo_clone(orig);
+               return nativeResponseValue;
+       }
        // struct LDKCVec_u8Z NodeAnnouncementInfo_write(const struct LDKNodeAnnouncementInfo *NONNULL_PTR obj);
        export function NodeAnnouncementInfo_write(obj: number): Uint8Array {
                if(!isWasmInitialized) {
@@ -10016,14 +11470,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.NodeInfo_free(this_ptr);
                // debug statements here
        }
-       // struct LDKNodeInfo NodeInfo_clone(const struct LDKNodeInfo *NONNULL_PTR orig);
-       export function NodeInfo_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.NodeInfo_clone(orig);
-               return nativeResponseValue;
-       }
        // void NodeInfo_set_channels(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
        export function NodeInfo_set_channels(this_ptr: number, val: number[]): void {
                if(!isWasmInitialized) {
@@ -10072,6 +11518,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.NodeInfo_new(channels_arg, lowest_inbound_channel_fees_arg, announcement_info_arg);
                return nativeResponseValue;
        }
+       // struct LDKNodeInfo NodeInfo_clone(const struct LDKNodeInfo *NONNULL_PTR orig);
+       export function NodeInfo_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.NodeInfo_clone(orig);
+               return nativeResponseValue;
+       }
        // struct LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *NONNULL_PTR obj);
        export function NodeInfo_write(obj: number): Uint8Array {
                if(!isWasmInitialized) {
index e9719e48e7f96741cc26c17f7265badf62c07185..ba21a7ca7b1beb3acf852db9591f71d00bb86630 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.AcceptChannel_free(this.ptr);
                     }
                 }
-       public AcceptChannel clone() {
-               number ret = bindings.AcceptChannel_clone(this.ptr);
-               const ret_hu_conv: AcceptChannel = new AcceptChannel(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_temporary_channel_id() {
                Uint8Array ret = bindings.AcceptChannel_get_temporary_channel_id(this.ptr);
                return ret;
@@ -151,15 +144,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                bindings.AcceptChannel_set_first_per_commitment_point(this.ptr, val);
        }
 
+       public AcceptChannel clone() {
+               number ret = bindings.AcceptChannel_clone(this.ptr);
+               const ret_hu_conv: AcceptChannel = new AcceptChannel(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.AcceptChannel_write(this.ptr);
                return ret;
        }
 
-       public static AcceptChannel constructor_read(Uint8Array ser) {
+       public static Result_AcceptChannelDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.AcceptChannel_read(ser);
-               const ret_hu_conv: AcceptChannel = new AcceptChannel(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_AcceptChannelDecodeErrorZ ret_hu_conv = Result_AcceptChannelDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 85625d72b52e0a4d5945b9d3bea5d9fcf91298de..78905ec3afc5b4936acb101d5c914329c01e82cc 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.AnnouncementSignatures_free(this.ptr);
                     }
                 }
-       public AnnouncementSignatures clone() {
-               number ret = bindings.AnnouncementSignatures_clone(this.ptr);
-               const ret_hu_conv: AnnouncementSignatures = new AnnouncementSignatures(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_channel_id() {
                Uint8Array ret = bindings.AnnouncementSignatures_get_channel_id(this.ptr);
                return ret;
@@ -68,15 +61,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public AnnouncementSignatures clone() {
+               number ret = bindings.AnnouncementSignatures_clone(this.ptr);
+               const ret_hu_conv: AnnouncementSignatures = new AnnouncementSignatures(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.AnnouncementSignatures_write(this.ptr);
                return ret;
        }
 
-       public static AnnouncementSignatures constructor_read(Uint8Array ser) {
+       public static Result_AnnouncementSignaturesDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.AnnouncementSignatures_read(ser);
-               const ret_hu_conv: AnnouncementSignatures = new AnnouncementSignatures(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_AnnouncementSignaturesDecodeErrorZ ret_hu_conv = Result_AnnouncementSignaturesDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 56f9977848cfd9374656f6b676dd593d1df2d143..7d2e387c6cf2cb8e85d4c3d29c3024767e5e5ed2 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.BuiltCommitmentTransaction_free(this.ptr);
                     }
                 }
-       public BuiltCommitmentTransaction clone() {
-               number ret = bindings.BuiltCommitmentTransaction_clone(this.ptr);
-               const ret_hu_conv: BuiltCommitmentTransaction = new BuiltCommitmentTransaction(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_transaction() {
                Uint8Array ret = bindings.BuiltCommitmentTransaction_get_transaction(this.ptr);
                return ret;
@@ -50,15 +43,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public BuiltCommitmentTransaction clone() {
+               number ret = bindings.BuiltCommitmentTransaction_clone(this.ptr);
+               const ret_hu_conv: BuiltCommitmentTransaction = new BuiltCommitmentTransaction(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.BuiltCommitmentTransaction_write(this.ptr);
                return ret;
        }
 
-       public static BuiltCommitmentTransaction constructor_read(Uint8Array ser) {
+       public static Result_BuiltCommitmentTransactionDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.BuiltCommitmentTransaction_read(ser);
-               const ret_hu_conv: BuiltCommitmentTransaction = new BuiltCommitmentTransaction(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_BuiltCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_BuiltCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index a8312b90c213dab9349da25a2857f5b1cb933c82..2493880475a26c40350ccedda4ac70a7a0ac9e24 100644 (file)
@@ -19,7 +19,7 @@ import * as bindings from '../bindings' // TODO: figure out location
                     }
                 }
        public void block_connected(Uint8Array header, TwoTuple<Number, Uint8Array>[] txdata, number height) {
-               bindings.ChainMonitor_block_connected(this.ptr, header, (number[])Arrays.stream(txdata).map(arr_conv_30 -> bindings.C2Tuple_usizeTransactionZ_new(arr_conv_30.a, arr_conv_30.b)).toArray(), height);
+               bindings.ChainMonitor_block_connected(this.ptr, header, Arrays.stream(txdata).map(arr_conv_30 -> bindings.C2Tuple_usizeTransactionZ_new(arr_conv_30.a, arr_conv_30.b)).toArray(number[]::new), height);
                /* TODO 2 TwoTuple<Number, Uint8Array>  */;
        }
 
index 0ab592e29cf1be95791d9aa80c59e3f348c32acd..5111590e05a1cc65d3403ba6496ea873aec00b14 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.ChannelAnnouncement_free(this.ptr);
                     }
                 }
-       public ChannelAnnouncement clone() {
-               number ret = bindings.ChannelAnnouncement_clone(this.ptr);
-               const ret_hu_conv: ChannelAnnouncement = new ChannelAnnouncement(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_node_signature_1() {
                Uint8Array ret = bindings.ChannelAnnouncement_get_node_signature_1(this.ptr);
                return ret;
@@ -81,15 +74,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public ChannelAnnouncement clone() {
+               number ret = bindings.ChannelAnnouncement_clone(this.ptr);
+               const ret_hu_conv: ChannelAnnouncement = new ChannelAnnouncement(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.ChannelAnnouncement_write(this.ptr);
                return ret;
        }
 
-       public static ChannelAnnouncement constructor_read(Uint8Array ser) {
+       public static Result_ChannelAnnouncementDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.ChannelAnnouncement_read(ser);
-               const ret_hu_conv: ChannelAnnouncement = new ChannelAnnouncement(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_ChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_ChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 85d0fa73ceacdf290f3009cb742e7b7e2477b2e7..9bdf48c6b42df8cd7ea18f4d0d1532d5b6c5c6af 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.ChannelConfig_free(this.ptr);
                     }
                 }
-       public ChannelConfig clone() {
-               number ret = bindings.ChannelConfig_clone(this.ptr);
-               const ret_hu_conv: ChannelConfig = new ChannelConfig(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public number get_fee_proportional_millionths() {
                number ret = bindings.ChannelConfig_get_fee_proportional_millionths(this.ptr);
                return ret;
@@ -59,6 +52,13 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public ChannelConfig clone() {
+               number ret = bindings.ChannelConfig_clone(this.ptr);
+               const ret_hu_conv: ChannelConfig = new ChannelConfig(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public static ChannelConfig constructor_default() {
                number ret = bindings.ChannelConfig_default();
                const ret_hu_conv: ChannelConfig = new ChannelConfig(null, ret);
@@ -71,10 +71,9 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret;
        }
 
-       public static ChannelConfig constructor_read(Uint8Array ser) {
+       public static Result_ChannelConfigDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.ChannelConfig_read(ser);
-               const ret_hu_conv: ChannelConfig = new ChannelConfig(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_ChannelConfigDecodeErrorZ ret_hu_conv = Result_ChannelConfigDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 5e8c88a20fcfd3e28d452c802a7e40f626d6d734..b7ef907c228ba112e9f4a6d9b4353ce7965cf024 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.ChannelDetails_free(this.ptr);
                     }
                 }
-       public ChannelDetails clone() {
-               number ret = bindings.ChannelDetails_clone(this.ptr);
-               const ret_hu_conv: ChannelDetails = new ChannelDetails(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_channel_id() {
                Uint8Array ret = bindings.ChannelDetails_get_channel_id(this.ptr);
                return ret;
@@ -53,14 +46,6 @@ import * as bindings from '../bindings' // TODO: figure out location
        public void set_counterparty_features(InitFeatures val) {
                bindings.ChannelDetails_set_counterparty_features(this.ptr, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(val);
-               // Due to rust's strict-ownership memory model, in some cases we need to "move"
-               // an object to pass exclusive ownership to the function being called.
-               // In most cases, we avoid this being visible in GC'd languages by cloning the object
-               // at the FFI layer, creating a new object which Rust can claim ownership of
-               // However, in some cases (eg here), there is no way to clone an object, and thus
-               // we actually have to pass full ownership to Rust.
-               // Thus, after this call, val is reset to null and is now a dummy object.
-               val.ptr = 0;
        }
 
        public number get_channel_value_satoshis() {
@@ -108,4 +93,11 @@ import * as bindings from '../bindings' // TODO: figure out location
                bindings.ChannelDetails_set_is_live(this.ptr, val);
        }
 
+       public ChannelDetails clone() {
+               number ret = bindings.ChannelDetails_clone(this.ptr);
+               const ret_hu_conv: ChannelDetails = new ChannelDetails(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
 }
index c0be3bbad2c18daa8c3b20a82448ad614d04aab8..1b6dd141a278d76e001a56a62116ba64db01843b 100644 (file)
@@ -18,4 +18,36 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.ChannelFeatures_free(this.ptr);
                     }
                 }
+       public ChannelFeatures clone() {
+               number ret = bindings.ChannelFeatures_clone(this.ptr);
+               const ret_hu_conv: ChannelFeatures = new ChannelFeatures(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public static ChannelFeatures constructor_empty() {
+               number ret = bindings.ChannelFeatures_empty();
+               const ret_hu_conv: ChannelFeatures = new ChannelFeatures(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       public static ChannelFeatures constructor_known() {
+               number ret = bindings.ChannelFeatures_known();
+               const ret_hu_conv: ChannelFeatures = new ChannelFeatures(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       public Uint8Array write() {
+               Uint8Array ret = bindings.ChannelFeatures_write(this.ptr);
+               return ret;
+       }
+
+       public static Result_ChannelFeaturesDecodeErrorZ constructor_read(Uint8Array ser) {
+               number ret = bindings.ChannelFeatures_read(ser);
+               Result_ChannelFeaturesDecodeErrorZ ret_hu_conv = Result_ChannelFeaturesDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index e199a1e30f95f44647ddcd60f1e1911d33919d0b..1db4cd89ff8a59ea8900e43206260a603e865e2c 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.ChannelHandshakeConfig_free(this.ptr);
                     }
                 }
-       public ChannelHandshakeConfig clone() {
-               number ret = bindings.ChannelHandshakeConfig_clone(this.ptr);
-               const ret_hu_conv: ChannelHandshakeConfig = new ChannelHandshakeConfig(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public number get_minimum_depth() {
                number ret = bindings.ChannelHandshakeConfig_get_minimum_depth(this.ptr);
                return ret;
@@ -59,6 +52,13 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public ChannelHandshakeConfig clone() {
+               number ret = bindings.ChannelHandshakeConfig_clone(this.ptr);
+               const ret_hu_conv: ChannelHandshakeConfig = new ChannelHandshakeConfig(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public static ChannelHandshakeConfig constructor_default() {
                number ret = bindings.ChannelHandshakeConfig_default();
                const ret_hu_conv: ChannelHandshakeConfig = new ChannelHandshakeConfig(null, ret);
index f0c549ba18375e19f1ed8f9680a47ef6737554a4..3dfab3912f94deae28a611ab18ccd8b6fba559e4 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.ChannelHandshakeLimits_free(this.ptr);
                     }
                 }
-       public ChannelHandshakeLimits clone() {
-               number ret = bindings.ChannelHandshakeLimits_clone(this.ptr);
-               const ret_hu_conv: ChannelHandshakeLimits = new ChannelHandshakeLimits(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public number get_min_funding_satoshis() {
                number ret = bindings.ChannelHandshakeLimits_get_min_funding_satoshis(this.ptr);
                return ret;
@@ -122,6 +115,13 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public ChannelHandshakeLimits clone() {
+               number ret = bindings.ChannelHandshakeLimits_clone(this.ptr);
+               const ret_hu_conv: ChannelHandshakeLimits = new ChannelHandshakeLimits(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public static ChannelHandshakeLimits constructor_default() {
                number ret = bindings.ChannelHandshakeLimits_default();
                const ret_hu_conv: ChannelHandshakeLimits = new ChannelHandshakeLimits(null, ret);
index b99fd456af0890c858f1bafd247cd8a476d95d17..6ea880e41cc267bc7f1fd3b9e2540d4d3266a5d7 100644 (file)
@@ -28,14 +28,6 @@ import * as bindings from '../bindings' // TODO: figure out location
        public void set_features(ChannelFeatures val) {
                bindings.ChannelInfo_set_features(this.ptr, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(val);
-               // Due to rust's strict-ownership memory model, in some cases we need to "move"
-               // an object to pass exclusive ownership to the function being called.
-               // In most cases, we avoid this being visible in GC'd languages by cloning the object
-               // at the FFI layer, creating a new object which Rust can claim ownership of
-               // However, in some cases (eg here), there is no way to clone an object, and thus
-               // we actually have to pass full ownership to Rust.
-               // Thus, after this call, val is reset to null and is now a dummy object.
-               val.ptr = 0;
        }
 
        public Uint8Array get_node_one() {
@@ -97,10 +89,9 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret;
        }
 
-       public static ChannelInfo constructor_read(Uint8Array ser) {
+       public static Result_ChannelInfoDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.ChannelInfo_read(ser);
-               const ret_hu_conv: ChannelInfo = new ChannelInfo(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_ChannelInfoDecodeErrorZ ret_hu_conv = Result_ChannelInfoDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 27570f00cb3b08e657ceacfe97ddd04b8528346d..3d50c5864c037fcfd449d9b83274ca4fb737afe6 100644 (file)
@@ -91,7 +91,7 @@ import * as bindings from '../bindings' // TODO: figure out location
        }
 
        public void broadcast_node_announcement(Uint8Array rgb, Uint8Array alias, NetAddress[] addresses) {
-               bindings.ChannelManager_broadcast_node_announcement(this.ptr, rgb, alias, (number[])Arrays.stream(addresses).map(arr_conv_12 -> arr_conv_12.ptr).toArray());
+               bindings.ChannelManager_broadcast_node_announcement(this.ptr, rgb, alias, Arrays.stream(addresses).map(arr_conv_12 -> arr_conv_12.ptr).toArray(number[]::new));
                /* TODO 2 NetAddress  */;
        }
 
@@ -138,7 +138,7 @@ import * as bindings from '../bindings' // TODO: figure out location
        }
 
        public void block_connected(Uint8Array header, TwoTuple<Number, Uint8Array>[] txdata, number height) {
-               bindings.ChannelManager_block_connected(this.ptr, header, (number[])Arrays.stream(txdata).map(arr_conv_30 -> bindings.C2Tuple_usizeTransactionZ_new(arr_conv_30.a, arr_conv_30.b)).toArray(), height);
+               bindings.ChannelManager_block_connected(this.ptr, header, Arrays.stream(txdata).map(arr_conv_30 -> bindings.C2Tuple_usizeTransactionZ_new(arr_conv_30.a, arr_conv_30.b)).toArray(number[]::new), height);
                /* TODO 2 TwoTuple<Number, Uint8Array>  */;
        }
 
index ff9865e9bba1fa2745518c235ab89778351c481b..7db1a875e8524f3f4e68844c45b24cb5400c4d21 100644 (file)
@@ -91,7 +91,7 @@ import * as bindings from '../bindings' // TODO: figure out location
        }
 
        public static ChannelManagerReadArgs constructor_new(KeysInterface keys_manager, FeeEstimator fee_estimator, Watch chain_monitor, BroadcasterInterface tx_broadcaster, Logger logger, UserConfig default_config, ChannelMonitor[] channel_monitors) {
-               number ret = bindings.ChannelManagerReadArgs_new(keys_manager == null ? 0 : keys_manager.ptr, fee_estimator == null ? 0 : fee_estimator.ptr, chain_monitor == null ? 0 : chain_monitor.ptr, tx_broadcaster == null ? 0 : tx_broadcaster.ptr, logger == null ? 0 : logger.ptr, default_config == null ? 0 : default_config.ptr & ~1, (number[])Arrays.stream(channel_monitors).map(arr_conv_16 -> arr_conv_16 == null ? 0 : arr_conv_16.ptr & ~1).toArray());
+               number ret = bindings.ChannelManagerReadArgs_new(keys_manager == null ? 0 : keys_manager.ptr, fee_estimator == null ? 0 : fee_estimator.ptr, chain_monitor == null ? 0 : chain_monitor.ptr, tx_broadcaster == null ? 0 : tx_broadcaster.ptr, logger == null ? 0 : logger.ptr, default_config == null ? 0 : default_config.ptr & ~1, Arrays.stream(channel_monitors).map(arr_conv_16 -> arr_conv_16 == null ? 0 : arr_conv_16.ptr & ~1).toArray(number[]::new));
                const ret_hu_conv: ChannelManagerReadArgs = new ChannelManagerReadArgs(null, ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                ret_hu_conv.ptrs_to.add(keys_manager);
index aff48916deda48b9c2066749c8e5c582d5f1e814..7b1654f5b92416e7b9e4e694a366a829a54a784f 100644 (file)
@@ -166,28 +166,12 @@ import * as bindings from '../bindings' // TODO: figure out location
        public void handle_open_channel(Uint8Array their_node_id, InitFeatures their_features, OpenChannel msg) {
                bindings.ChannelMessageHandler_handle_open_channel(this.ptr, their_node_id, their_features == null ? 0 : their_features.ptr & ~1, msg == null ? 0 : msg.ptr & ~1);
                this.ptrs_to.add(their_features);
-               // Due to rust's strict-ownership memory model, in some cases we need to "move"
-               // an object to pass exclusive ownership to the function being called.
-               // In most cases, we avoid this being visible in GC'd languages by cloning the object
-               // at the FFI layer, creating a new object which Rust can claim ownership of
-               // However, in some cases (eg here), there is no way to clone an object, and thus
-               // we actually have to pass full ownership to Rust.
-               // Thus, after this call, their_features is reset to null and is now a dummy object.
-               their_features.ptr = 0;
                this.ptrs_to.add(msg);
        }
 
        public void handle_accept_channel(Uint8Array their_node_id, InitFeatures their_features, AcceptChannel msg) {
                bindings.ChannelMessageHandler_handle_accept_channel(this.ptr, their_node_id, their_features == null ? 0 : their_features.ptr & ~1, msg == null ? 0 : msg.ptr & ~1);
                this.ptrs_to.add(their_features);
-               // Due to rust's strict-ownership memory model, in some cases we need to "move"
-               // an object to pass exclusive ownership to the function being called.
-               // In most cases, we avoid this being visible in GC'd languages by cloning the object
-               // at the FFI layer, creating a new object which Rust can claim ownership of
-               // However, in some cases (eg here), there is no way to clone an object, and thus
-               // we actually have to pass full ownership to Rust.
-               // Thus, after this call, their_features is reset to null and is now a dummy object.
-               their_features.ptr = 0;
                this.ptrs_to.add(msg);
        }
 
index ff746a206aa4d6710141f5d54ecf94f242e4c55e..0d9ad3966158dc22cb2955ad1256e9387bbd4636 100644 (file)
@@ -89,7 +89,7 @@ import * as bindings from '../bindings' // TODO: figure out location
        }
 
        public TwoTuple<Uint8Array, TwoTuple<Number, TxOut>[]>[] block_connected(Uint8Array header, TwoTuple<Number, Uint8Array>[] txdata, number height, BroadcasterInterface broadcaster, FeeEstimator fee_estimator, Logger logger) {
-               number[] ret = bindings.ChannelMonitor_block_connected(this.ptr, header, (number[])Arrays.stream(txdata).map(arr_conv_30 -> bindings.C2Tuple_usizeTransactionZ_new(arr_conv_30.a, arr_conv_30.b)).toArray(), height, broadcaster == null ? 0 : broadcaster.ptr, fee_estimator == null ? 0 : fee_estimator.ptr, logger == null ? 0 : logger.ptr);
+               number[] ret = bindings.ChannelMonitor_block_connected(this.ptr, header, Arrays.stream(txdata).map(arr_conv_30 -> bindings.C2Tuple_usizeTransactionZ_new(arr_conv_30.a, arr_conv_30.b)).toArray(number[]::new), height, broadcaster == null ? 0 : broadcaster.ptr, fee_estimator == null ? 0 : fee_estimator.ptr, logger == null ? 0 : logger.ptr);
                TwoTuple<Uint8Array, TwoTuple<Number, TxOut>[]>[] arr_conv_49_arr = new TwoTuple[ret.length];
                for (int x = 0; x < ret.length; x++) {
                        number arr_conv_49 = ret[x];
index 3217804ef0ae7b04ea8bb4e02aab064edf124a95..80e11cd18b1aaddac9b3b8a6d8455e905b565bdd 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.ChannelMonitorUpdate_free(this.ptr);
                     }
                 }
-       public ChannelMonitorUpdate clone() {
-               number ret = bindings.ChannelMonitorUpdate_clone(this.ptr);
-               const ret_hu_conv: ChannelMonitorUpdate = new ChannelMonitorUpdate(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public number get_update_id() {
                number ret = bindings.ChannelMonitorUpdate_get_update_id(this.ptr);
                return ret;
@@ -34,6 +27,13 @@ import * as bindings from '../bindings' // TODO: figure out location
                bindings.ChannelMonitorUpdate_set_update_id(this.ptr, val);
        }
 
+       public ChannelMonitorUpdate clone() {
+               number ret = bindings.ChannelMonitorUpdate_clone(this.ptr);
+               const ret_hu_conv: ChannelMonitorUpdate = new ChannelMonitorUpdate(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.ChannelMonitorUpdate_write(this.ptr);
                return ret;
index 572c44caa70bfe825f887eed164d038fd252783b..758d809bf41da02d13ab8d3e9171d20d4af481da 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.ChannelPublicKeys_free(this.ptr);
                     }
                 }
-       public ChannelPublicKeys clone() {
-               number ret = bindings.ChannelPublicKeys_clone(this.ptr);
-               const ret_hu_conv: ChannelPublicKeys = new ChannelPublicKeys(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_funding_pubkey() {
                Uint8Array ret = bindings.ChannelPublicKeys_get_funding_pubkey(this.ptr);
                return ret;
@@ -77,15 +70,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public ChannelPublicKeys clone() {
+               number ret = bindings.ChannelPublicKeys_clone(this.ptr);
+               const ret_hu_conv: ChannelPublicKeys = new ChannelPublicKeys(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.ChannelPublicKeys_write(this.ptr);
                return ret;
        }
 
-       public static ChannelPublicKeys constructor_read(Uint8Array ser) {
+       public static Result_ChannelPublicKeysDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.ChannelPublicKeys_read(ser);
-               const ret_hu_conv: ChannelPublicKeys = new ChannelPublicKeys(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_ChannelPublicKeysDecodeErrorZ ret_hu_conv = Result_ChannelPublicKeysDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 9dfd0976da6af50161282452c6eb44b873e37c60..0be4b49dc82ccda0e51e6ed8860bf735258f7128 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.ChannelReestablish_free(this.ptr);
                     }
                 }
-       public ChannelReestablish clone() {
-               number ret = bindings.ChannelReestablish_clone(this.ptr);
-               const ret_hu_conv: ChannelReestablish = new ChannelReestablish(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_channel_id() {
                Uint8Array ret = bindings.ChannelReestablish_get_channel_id(this.ptr);
                return ret;
@@ -52,6 +45,13 @@ import * as bindings from '../bindings' // TODO: figure out location
                bindings.ChannelReestablish_set_next_remote_commitment_number(this.ptr, val);
        }
 
+       public ChannelReestablish clone() {
+               number ret = bindings.ChannelReestablish_clone(this.ptr);
+               const ret_hu_conv: ChannelReestablish = new ChannelReestablish(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.ChannelReestablish_write(this.ptr);
                return ret;
index 3a9d901671094b34bd2aba6154c1ae0baf56d6d9..1877ccee35f4f87c164155f1141ac5a0d227a7ad 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.ChannelTransactionParameters_free(this.ptr);
                     }
                 }
-       public ChannelTransactionParameters clone() {
-               number ret = bindings.ChannelTransactionParameters_clone(this.ptr);
-               const ret_hu_conv: ChannelTransactionParameters = new ChannelTransactionParameters(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public ChannelPublicKeys get_holder_pubkeys() {
                number ret = bindings.ChannelTransactionParameters_get_holder_pubkeys(this.ptr);
                const ret_hu_conv: ChannelPublicKeys = new ChannelPublicKeys(null, ret);
@@ -89,6 +82,13 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public ChannelTransactionParameters clone() {
+               number ret = bindings.ChannelTransactionParameters_clone(this.ptr);
+               const ret_hu_conv: ChannelTransactionParameters = new ChannelTransactionParameters(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public boolean is_populated() {
                boolean ret = bindings.ChannelTransactionParameters_is_populated(this.ptr);
                return ret;
@@ -113,10 +113,9 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret;
        }
 
-       public static ChannelTransactionParameters constructor_read(Uint8Array ser) {
+       public static Result_ChannelTransactionParametersDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.ChannelTransactionParameters_read(ser);
-               const ret_hu_conv: ChannelTransactionParameters = new ChannelTransactionParameters(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_ChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_ChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 524e9a54caf166981771b46f9071ff4cc5d2ef55..61c2af4eb5f55718f99037bba7a198e460dcfded 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.ChannelUpdate_free(this.ptr);
                     }
                 }
-       public ChannelUpdate clone() {
-               number ret = bindings.ChannelUpdate_clone(this.ptr);
-               const ret_hu_conv: ChannelUpdate = new ChannelUpdate(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_signature() {
                Uint8Array ret = bindings.ChannelUpdate_get_signature(this.ptr);
                return ret;
@@ -54,15 +47,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public ChannelUpdate clone() {
+               number ret = bindings.ChannelUpdate_clone(this.ptr);
+               const ret_hu_conv: ChannelUpdate = new ChannelUpdate(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.ChannelUpdate_write(this.ptr);
                return ret;
        }
 
-       public static ChannelUpdate constructor_read(Uint8Array ser) {
+       public static Result_ChannelUpdateDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.ChannelUpdate_read(ser);
-               const ret_hu_conv: ChannelUpdate = new ChannelUpdate(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_ChannelUpdateDecodeErrorZ ret_hu_conv = Result_ChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index cd6eb15b0123fb12eb85d80e51a0ecba873a1a20..5056beda5b43841fc2d1ed7ef36e0c17a4b99faf 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.ClosingSigned_free(this.ptr);
                     }
                 }
-       public ClosingSigned clone() {
-               number ret = bindings.ClosingSigned_clone(this.ptr);
-               const ret_hu_conv: ClosingSigned = new ClosingSigned(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_channel_id() {
                Uint8Array ret = bindings.ClosingSigned_get_channel_id(this.ptr);
                return ret;
@@ -59,15 +52,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public ClosingSigned clone() {
+               number ret = bindings.ClosingSigned_clone(this.ptr);
+               const ret_hu_conv: ClosingSigned = new ClosingSigned(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.ClosingSigned_write(this.ptr);
                return ret;
        }
 
-       public static ClosingSigned constructor_read(Uint8Array ser) {
+       public static Result_ClosingSignedDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.ClosingSigned_read(ser);
-               const ret_hu_conv: ClosingSigned = new ClosingSigned(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_ClosingSignedDecodeErrorZ ret_hu_conv = Result_ClosingSignedDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 58089b3baf3cd9d5c1b7c36e1b1354b3c7a0a171..0c99e819c20c70da84243ca6d84f0be36375a83a 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.CommitmentSigned_free(this.ptr);
                     }
                 }
-       public CommitmentSigned clone() {
-               number ret = bindings.CommitmentSigned_clone(this.ptr);
-               const ret_hu_conv: CommitmentSigned = new CommitmentSigned(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_channel_id() {
                Uint8Array ret = bindings.CommitmentSigned_get_channel_id(this.ptr);
                return ret;
@@ -54,15 +47,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public CommitmentSigned clone() {
+               number ret = bindings.CommitmentSigned_clone(this.ptr);
+               const ret_hu_conv: CommitmentSigned = new CommitmentSigned(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.CommitmentSigned_write(this.ptr);
                return ret;
        }
 
-       public static CommitmentSigned constructor_read(Uint8Array ser) {
+       public static Result_CommitmentSignedDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.CommitmentSigned_read(ser);
-               const ret_hu_conv: CommitmentSigned = new CommitmentSigned(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_CommitmentSignedDecodeErrorZ ret_hu_conv = Result_CommitmentSignedDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 4d13ed9a8f18d56cf6eaf63e26209c351cb8d72f..97c85a9f858d269c18042b7b32dece1e321ae344 100644 (file)
@@ -30,10 +30,9 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret;
        }
 
-       public static CommitmentTransaction constructor_read(Uint8Array ser) {
+       public static Result_CommitmentTransactionDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.CommitmentTransaction_read(ser);
-               const ret_hu_conv: CommitmentTransaction = new CommitmentTransaction(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_CommitmentTransactionDecodeErrorZ ret_hu_conv = Result_CommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 3564c6991a4a57d9a242869fc852c2c082a0542d..685dee865052d3c52041620e7732418252d92e4d 100644 (file)
@@ -18,30 +18,23 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.CommitmentUpdate_free(this.ptr);
                     }
                 }
-       public CommitmentUpdate clone() {
-               number ret = bindings.CommitmentUpdate_clone(this.ptr);
-               const ret_hu_conv: CommitmentUpdate = new CommitmentUpdate(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public void set_update_add_htlcs(UpdateAddHTLC[] val) {
-               bindings.CommitmentUpdate_set_update_add_htlcs(this.ptr, (number[])Arrays.stream(val).map(arr_conv_15 -> arr_conv_15 == null ? 0 : arr_conv_15.ptr & ~1).toArray());
+               bindings.CommitmentUpdate_set_update_add_htlcs(this.ptr, Arrays.stream(val).map(arr_conv_15 -> arr_conv_15 == null ? 0 : arr_conv_15.ptr & ~1).toArray(number[]::new));
                /* TODO 2 UpdateAddHTLC  */;
        }
 
        public void set_update_fulfill_htlcs(UpdateFulfillHTLC[] val) {
-               bindings.CommitmentUpdate_set_update_fulfill_htlcs(this.ptr, (number[])Arrays.stream(val).map(arr_conv_19 -> arr_conv_19 == null ? 0 : arr_conv_19.ptr & ~1).toArray());
+               bindings.CommitmentUpdate_set_update_fulfill_htlcs(this.ptr, Arrays.stream(val).map(arr_conv_19 -> arr_conv_19 == null ? 0 : arr_conv_19.ptr & ~1).toArray(number[]::new));
                /* TODO 2 UpdateFulfillHTLC  */;
        }
 
        public void set_update_fail_htlcs(UpdateFailHTLC[] val) {
-               bindings.CommitmentUpdate_set_update_fail_htlcs(this.ptr, (number[])Arrays.stream(val).map(arr_conv_16 -> arr_conv_16 == null ? 0 : arr_conv_16.ptr & ~1).toArray());
+               bindings.CommitmentUpdate_set_update_fail_htlcs(this.ptr, Arrays.stream(val).map(arr_conv_16 -> arr_conv_16 == null ? 0 : arr_conv_16.ptr & ~1).toArray(number[]::new));
                /* TODO 2 UpdateFailHTLC  */;
        }
 
        public void set_update_fail_malformed_htlcs(UpdateFailMalformedHTLC[] val) {
-               bindings.CommitmentUpdate_set_update_fail_malformed_htlcs(this.ptr, (number[])Arrays.stream(val).map(arr_conv_25 -> arr_conv_25 == null ? 0 : arr_conv_25.ptr & ~1).toArray());
+               bindings.CommitmentUpdate_set_update_fail_malformed_htlcs(this.ptr, Arrays.stream(val).map(arr_conv_25 -> arr_conv_25 == null ? 0 : arr_conv_25.ptr & ~1).toArray(number[]::new));
                /* TODO 2 UpdateFailMalformedHTLC  */;
        }
 
@@ -70,7 +63,7 @@ import * as bindings from '../bindings' // TODO: figure out location
        }
 
        public static CommitmentUpdate constructor_new(UpdateAddHTLC[] update_add_htlcs_arg, UpdateFulfillHTLC[] update_fulfill_htlcs_arg, UpdateFailHTLC[] update_fail_htlcs_arg, UpdateFailMalformedHTLC[] update_fail_malformed_htlcs_arg, UpdateFee update_fee_arg, CommitmentSigned commitment_signed_arg) {
-               number ret = bindings.CommitmentUpdate_new((number[])Arrays.stream(update_add_htlcs_arg).map(arr_conv_15 -> arr_conv_15 == null ? 0 : arr_conv_15.ptr & ~1).toArray(), (number[])Arrays.stream(update_fulfill_htlcs_arg).map(arr_conv_19 -> arr_conv_19 == null ? 0 : arr_conv_19.ptr & ~1).toArray(), (number[])Arrays.stream(update_fail_htlcs_arg).map(arr_conv_16 -> arr_conv_16 == null ? 0 : arr_conv_16.ptr & ~1).toArray(), (number[])Arrays.stream(update_fail_malformed_htlcs_arg).map(arr_conv_25 -> arr_conv_25 == null ? 0 : arr_conv_25.ptr & ~1).toArray(), update_fee_arg == null ? 0 : update_fee_arg.ptr & ~1, commitment_signed_arg == null ? 0 : commitment_signed_arg.ptr & ~1);
+               number ret = bindings.CommitmentUpdate_new(Arrays.stream(update_add_htlcs_arg).map(arr_conv_15 -> arr_conv_15 == null ? 0 : arr_conv_15.ptr & ~1).toArray(number[]::new), Arrays.stream(update_fulfill_htlcs_arg).map(arr_conv_19 -> arr_conv_19 == null ? 0 : arr_conv_19.ptr & ~1).toArray(number[]::new), Arrays.stream(update_fail_htlcs_arg).map(arr_conv_16 -> arr_conv_16 == null ? 0 : arr_conv_16.ptr & ~1).toArray(number[]::new), Arrays.stream(update_fail_malformed_htlcs_arg).map(arr_conv_25 -> arr_conv_25 == null ? 0 : arr_conv_25.ptr & ~1).toArray(number[]::new), update_fee_arg == null ? 0 : update_fee_arg.ptr & ~1, commitment_signed_arg == null ? 0 : commitment_signed_arg.ptr & ~1);
                const ret_hu_conv: CommitmentUpdate = new CommitmentUpdate(null, ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                /* TODO 2 UpdateAddHTLC  */;
@@ -82,4 +75,11 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public CommitmentUpdate clone() {
+               number ret = bindings.CommitmentUpdate_clone(this.ptr);
+               const ret_hu_conv: CommitmentUpdate = new CommitmentUpdate(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
 }
index de6a67b8318b215bb6ad705c68d1d734297cb6c0..c30efd9689edd9b82fbff88886eaf35c3be8b3cd 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.CounterpartyChannelTransactionParameters_free(this.ptr);
                     }
                 }
-       public CounterpartyChannelTransactionParameters clone() {
-               number ret = bindings.CounterpartyChannelTransactionParameters_clone(this.ptr);
-               const ret_hu_conv: CounterpartyChannelTransactionParameters = new CounterpartyChannelTransactionParameters(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public ChannelPublicKeys get_pubkeys() {
                number ret = bindings.CounterpartyChannelTransactionParameters_get_pubkeys(this.ptr);
                const ret_hu_conv: ChannelPublicKeys = new ChannelPublicKeys(null, ret);
@@ -54,15 +47,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public CounterpartyChannelTransactionParameters clone() {
+               number ret = bindings.CounterpartyChannelTransactionParameters_clone(this.ptr);
+               const ret_hu_conv: CounterpartyChannelTransactionParameters = new CounterpartyChannelTransactionParameters(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.CounterpartyChannelTransactionParameters_write(this.ptr);
                return ret;
        }
 
-       public static CounterpartyChannelTransactionParameters constructor_read(Uint8Array ser) {
+       public static Result_CounterpartyChannelTransactionParametersDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.CounterpartyChannelTransactionParameters_read(ser);
-               const ret_hu_conv: CounterpartyChannelTransactionParameters = new CounterpartyChannelTransactionParameters(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_CounterpartyChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_CounterpartyChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index a08c831a6c1edbbf3459496b74900005c24721ad..4f9bd46a084424fc1d1f784d542147c342075b4c 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.DataLossProtect_free(this.ptr);
                     }
                 }
-       public DataLossProtect clone() {
-               number ret = bindings.DataLossProtect_clone(this.ptr);
-               const ret_hu_conv: DataLossProtect = new DataLossProtect(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_your_last_per_commitment_secret() {
                Uint8Array ret = bindings.DataLossProtect_get_your_last_per_commitment_secret(this.ptr);
                return ret;
@@ -50,4 +43,11 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public DataLossProtect clone() {
+               number ret = bindings.DataLossProtect_clone(this.ptr);
+               const ret_hu_conv: DataLossProtect = new DataLossProtect(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
 }
index 5866e91333e19ba91f17515091c8a821c153e807..903e56ecf2d4cb64b25fffad37b6cf2d64099542 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.DirectionalChannelInfo_free(this.ptr);
                     }
                 }
-       public DirectionalChannelInfo clone() {
-               number ret = bindings.DirectionalChannelInfo_clone(this.ptr);
-               const ret_hu_conv: DirectionalChannelInfo = new DirectionalChannelInfo(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public number get_last_update() {
                number ret = bindings.DirectionalChannelInfo_get_last_update(this.ptr);
                return ret;
@@ -85,15 +78,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                this.ptrs_to.add(val);
        }
 
+       public DirectionalChannelInfo clone() {
+               number ret = bindings.DirectionalChannelInfo_clone(this.ptr);
+               const ret_hu_conv: DirectionalChannelInfo = new DirectionalChannelInfo(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.DirectionalChannelInfo_write(this.ptr);
                return ret;
        }
 
-       public static DirectionalChannelInfo constructor_read(Uint8Array ser) {
+       public static Result_DirectionalChannelInfoDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.DirectionalChannelInfo_read(ser);
-               const ret_hu_conv: DirectionalChannelInfo = new DirectionalChannelInfo(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_DirectionalChannelInfoDecodeErrorZ ret_hu_conv = Result_DirectionalChannelInfoDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 4ad554f5a5305dd9cd7114e882b769a287106579..b3b05b1cb28dfc819a35da8981898360c0d94235 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.ErrorMessage_free(this.ptr);
                     }
                 }
-       public ErrorMessage clone() {
-               number ret = bindings.ErrorMessage_clone(this.ptr);
-               const ret_hu_conv: ErrorMessage = new ErrorMessage(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_channel_id() {
                Uint8Array ret = bindings.ErrorMessage_get_channel_id(this.ptr);
                return ret;
@@ -50,6 +43,13 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public ErrorMessage clone() {
+               number ret = bindings.ErrorMessage_clone(this.ptr);
+               const ret_hu_conv: ErrorMessage = new ErrorMessage(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.ErrorMessage_write(this.ptr);
                return ret;
index 111c2a5b9cb8d5ad5c5455b868f6fb5857ef25e0..d33cf1ed41eff24b99982b30b2400a9cd93bc499 100644 (file)
@@ -34,7 +34,7 @@ import * as bindings from '../bindings' // TODO: figure out location
                         // todo: in-line interface filling
                         get_and_clear_pending_events (): number[] {
                                                        Event[] ret = arg.get_and_clear_pending_events();
-                               result: number[] = (number[])Arrays.stream(ret).map(arr_conv_7 -> arr_conv_7.ptr).toArray();
+                               result: number[] = Arrays.stream(ret).map(arr_conv_7 -> arr_conv_7.ptr).toArray(number[]::new);
                                /* TODO 2 Event  */;
                                return result;
                                                },
index 118811fde7f08eec1562deb9f292b937690b2ecd..a04f078135553e9ac28d51e7a767f90df36b63d3 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.FundingCreated_free(this.ptr);
                     }
                 }
-       public FundingCreated clone() {
-               number ret = bindings.FundingCreated_clone(this.ptr);
-               const ret_hu_conv: FundingCreated = new FundingCreated(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_temporary_channel_id() {
                Uint8Array ret = bindings.FundingCreated_get_temporary_channel_id(this.ptr);
                return ret;
@@ -68,15 +61,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public FundingCreated clone() {
+               number ret = bindings.FundingCreated_clone(this.ptr);
+               const ret_hu_conv: FundingCreated = new FundingCreated(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.FundingCreated_write(this.ptr);
                return ret;
        }
 
-       public static FundingCreated constructor_read(Uint8Array ser) {
+       public static Result_FundingCreatedDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.FundingCreated_read(ser);
-               const ret_hu_conv: FundingCreated = new FundingCreated(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_FundingCreatedDecodeErrorZ ret_hu_conv = Result_FundingCreatedDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index b298b222e54da9ac1b911cae8adabd23d07a50bc..e03acf3e3dff529d69fa34b31ee4e25e1f6219c8 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.FundingLocked_free(this.ptr);
                     }
                 }
-       public FundingLocked clone() {
-               number ret = bindings.FundingLocked_clone(this.ptr);
-               const ret_hu_conv: FundingLocked = new FundingLocked(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_channel_id() {
                Uint8Array ret = bindings.FundingLocked_get_channel_id(this.ptr);
                return ret;
@@ -50,15 +43,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public FundingLocked clone() {
+               number ret = bindings.FundingLocked_clone(this.ptr);
+               const ret_hu_conv: FundingLocked = new FundingLocked(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.FundingLocked_write(this.ptr);
                return ret;
        }
 
-       public static FundingLocked constructor_read(Uint8Array ser) {
+       public static Result_FundingLockedDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.FundingLocked_read(ser);
-               const ret_hu_conv: FundingLocked = new FundingLocked(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_FundingLockedDecodeErrorZ ret_hu_conv = Result_FundingLockedDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 76fc8ad29620d3d44ee6889fbe40fad4be2ba0a9..a0271f1a7a70c90be695b51ed288ae9b681c069e 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.FundingSigned_free(this.ptr);
                     }
                 }
-       public FundingSigned clone() {
-               number ret = bindings.FundingSigned_clone(this.ptr);
-               const ret_hu_conv: FundingSigned = new FundingSigned(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_channel_id() {
                Uint8Array ret = bindings.FundingSigned_get_channel_id(this.ptr);
                return ret;
@@ -50,15 +43,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public FundingSigned clone() {
+               number ret = bindings.FundingSigned_clone(this.ptr);
+               const ret_hu_conv: FundingSigned = new FundingSigned(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.FundingSigned_write(this.ptr);
                return ret;
        }
 
-       public static FundingSigned constructor_read(Uint8Array ser) {
+       public static Result_FundingSignedDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.FundingSigned_read(ser);
-               const ret_hu_conv: FundingSigned = new FundingSigned(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_FundingSignedDecodeErrorZ ret_hu_conv = Result_FundingSignedDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 8b2e3320594928a1aa4cd9d91034e7859a26cb27..a6557572b42bc6e890d81fdf9583f3ec9e887e86 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.GossipTimestampFilter_free(this.ptr);
                     }
                 }
-       public GossipTimestampFilter clone() {
-               number ret = bindings.GossipTimestampFilter_clone(this.ptr);
-               const ret_hu_conv: GossipTimestampFilter = new GossipTimestampFilter(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_chain_hash() {
                Uint8Array ret = bindings.GossipTimestampFilter_get_chain_hash(this.ptr);
                return ret;
@@ -59,6 +52,13 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public GossipTimestampFilter clone() {
+               number ret = bindings.GossipTimestampFilter_clone(this.ptr);
+               const ret_hu_conv: GossipTimestampFilter = new GossipTimestampFilter(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public static Result_GossipTimestampFilterDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.GossipTimestampFilter_read(ser);
                Result_GossipTimestampFilterDecodeErrorZ ret_hu_conv = Result_GossipTimestampFilterDecodeErrorZ.constr_from_ptr(ret);
index 545685e5aaf153ee4a370aa2731e12b230a3a25e..42c2eccff62474343a4c46935a713f66b71336ff 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.HTLCOutputInCommitment_free(this.ptr);
                     }
                 }
-       public HTLCOutputInCommitment clone() {
-               number ret = bindings.HTLCOutputInCommitment_clone(this.ptr);
-               const ret_hu_conv: HTLCOutputInCommitment = new HTLCOutputInCommitment(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public boolean get_offered() {
                boolean ret = bindings.HTLCOutputInCommitment_get_offered(this.ptr);
                return ret;
@@ -61,15 +54,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                bindings.HTLCOutputInCommitment_set_payment_hash(this.ptr, val);
        }
 
+       public HTLCOutputInCommitment clone() {
+               number ret = bindings.HTLCOutputInCommitment_clone(this.ptr);
+               const ret_hu_conv: HTLCOutputInCommitment = new HTLCOutputInCommitment(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.HTLCOutputInCommitment_write(this.ptr);
                return ret;
        }
 
-       public static HTLCOutputInCommitment constructor_read(Uint8Array ser) {
+       public static Result_HTLCOutputInCommitmentDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.HTLCOutputInCommitment_read(ser);
-               const ret_hu_conv: HTLCOutputInCommitment = new HTLCOutputInCommitment(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_HTLCOutputInCommitmentDecodeErrorZ ret_hu_conv = Result_HTLCOutputInCommitmentDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 075dc2db1e94d13708282a58907ef2a7883245a0..3eaef5532f1a26052442c082f54cff93ddcd4ca3 100644 (file)
@@ -30,10 +30,9 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret;
        }
 
-       public static HTLCUpdate constructor_read(Uint8Array ser) {
+       public static Result_HTLCUpdateDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.HTLCUpdate_read(ser);
-               const ret_hu_conv: HTLCUpdate = new HTLCUpdate(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_HTLCUpdateDecodeErrorZ ret_hu_conv = Result_HTLCUpdateDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 4014c3a2a54fa1e4e12e88614266c443458da44a..15ce4e0028ec73bc03f48c7801415e7d4560fc58 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.HolderCommitmentTransaction_free(this.ptr);
                     }
                 }
-       public HolderCommitmentTransaction clone() {
-               number ret = bindings.HolderCommitmentTransaction_clone(this.ptr);
-               const ret_hu_conv: HolderCommitmentTransaction = new HolderCommitmentTransaction(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_counterparty_sig() {
                Uint8Array ret = bindings.HolderCommitmentTransaction_get_counterparty_sig(this.ptr);
                return ret;
@@ -38,15 +31,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                bindings.HolderCommitmentTransaction_set_counterparty_htlc_sigs(this.ptr, val);
        }
 
+       public HolderCommitmentTransaction clone() {
+               number ret = bindings.HolderCommitmentTransaction_clone(this.ptr);
+               const ret_hu_conv: HolderCommitmentTransaction = new HolderCommitmentTransaction(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.HolderCommitmentTransaction_write(this.ptr);
                return ret;
        }
 
-       public static HolderCommitmentTransaction constructor_read(Uint8Array ser) {
+       public static Result_HolderCommitmentTransactionDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.HolderCommitmentTransaction_read(ser);
-               const ret_hu_conv: HolderCommitmentTransaction = new HolderCommitmentTransaction(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_HolderCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_HolderCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 11321cb6cee1f40479b8afc46909119af6f593fa..4fc7fcdca282f73cc1fff84bc175480fee5631cb 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.InMemoryChannelKeys_free(this.ptr);
                     }
                 }
-       public InMemoryChannelKeys clone() {
-               number ret = bindings.InMemoryChannelKeys_clone(this.ptr);
-               const ret_hu_conv: InMemoryChannelKeys = new InMemoryChannelKeys(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_funding_key() {
                Uint8Array ret = bindings.InMemoryChannelKeys_get_funding_key(this.ptr);
                return ret;
@@ -79,6 +72,13 @@ import * as bindings from '../bindings' // TODO: figure out location
                bindings.InMemoryChannelKeys_set_commitment_seed(this.ptr, val);
        }
 
+       public InMemoryChannelKeys clone() {
+               number ret = bindings.InMemoryChannelKeys_clone(this.ptr);
+               const ret_hu_conv: InMemoryChannelKeys = new InMemoryChannelKeys(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public static InMemoryChannelKeys constructor_new(Uint8Array funding_key, Uint8Array revocation_base_key, Uint8Array payment_key, Uint8Array delayed_payment_base_key, Uint8Array htlc_base_key, Uint8Array commitment_seed, number channel_value_satoshis, TwoTuple<Number, Number> key_derivation_params) {
                number ret = bindings.InMemoryChannelKeys_new(funding_key, revocation_base_key, payment_key, delayed_payment_base_key, htlc_base_key, commitment_seed, channel_value_satoshis, bindings.C2Tuple_u64u64Z_new(key_derivation_params.a, key_derivation_params.b));
                const ret_hu_conv: InMemoryChannelKeys = new InMemoryChannelKeys(null, ret);
index e38641d2b125df40d1480d203ab87d4b6080d0da..a1dee177b6f29e323198b89d3717e89e5386b955 100644 (file)
@@ -18,4 +18,36 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.InitFeatures_free(this.ptr);
                     }
                 }
+       public InitFeatures clone() {
+               number ret = bindings.InitFeatures_clone(this.ptr);
+               const ret_hu_conv: InitFeatures = new InitFeatures(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public static InitFeatures constructor_empty() {
+               number ret = bindings.InitFeatures_empty();
+               const ret_hu_conv: InitFeatures = new InitFeatures(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       public static InitFeatures constructor_known() {
+               number ret = bindings.InitFeatures_known();
+               const ret_hu_conv: InitFeatures = new InitFeatures(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       public Uint8Array write() {
+               Uint8Array ret = bindings.InitFeatures_write(this.ptr);
+               return ret;
+       }
+
+       public static Result_InitFeaturesDecodeErrorZ constructor_read(Uint8Array ser) {
+               number ret = bindings.InitFeatures_read(ser);
+               Result_InitFeaturesDecodeErrorZ ret_hu_conv = Result_InitFeaturesDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index c51f0b8b59d2aa323f2fa0936afaf86805a5a271..e9a689be522106aae525e8e491ec4b58db36d808 100644 (file)
@@ -60,7 +60,7 @@ import * as bindings from '../bindings' // TODO: figure out location
                                                },
 
                                                read_chan_signer (reader: Uint8Array): number {
-                                                       Result_ChanKeySignerDecodeErrorZ ret = arg.read_chan_signer(reader);
+                                                       Result_ChannelKeysDecodeErrorZ ret = arg.read_chan_signer(reader);
                                result: number = ret != null ? ret.ptr : 0;
                                return result;
                                                },
@@ -77,7 +77,7 @@ import * as bindings from '../bindings' // TODO: figure out location
                                get_shutdown_pubkey(): Uint8Array;
                                get_channel_keys(inbound: boolean, channel_value_satoshis: number): ChannelKeys;
                                get_secure_random_bytes(): Uint8Array;
-                               read_chan_signer(reader: Uint8Array): Result_ChanKeySignerDecodeErrorZ;
+                               read_chan_signer(reader: Uint8Array): Result_ChannelKeysDecodeErrorZ;
                                
             }
 
@@ -111,9 +111,9 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret;
        }
 
-       public Result_ChanKeySignerDecodeErrorZ read_chan_signer(Uint8Array reader) {
+       public Result_ChannelKeysDecodeErrorZ read_chan_signer(Uint8Array reader) {
                number ret = bindings.KeysInterface_read_chan_signer(this.ptr, reader);
-               Result_ChanKeySignerDecodeErrorZ ret_hu_conv = Result_ChanKeySignerDecodeErrorZ.constr_from_ptr(ret);
+               Result_ChannelKeysDecodeErrorZ ret_hu_conv = Result_ChannelKeysDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 74b3a586df3cdca31fab736ea032b03ed6660460..8e38be1a8f903408733286f4782bf57fe3de2845 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.LightningError_free(this.ptr);
                     }
                 }
-       public LightningError clone() {
-               number ret = bindings.LightningError_clone(this.ptr);
-               const ret_hu_conv: LightningError = new LightningError(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public String get_err() {
                String ret = bindings.LightningError_get_err(this.ptr);
                return ret;
@@ -52,4 +45,11 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public LightningError clone() {
+               number ret = bindings.LightningError_clone(this.ptr);
+               const ret_hu_conv: LightningError = new LightningError(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
 }
index 3c05318c081556c21210a3bdfa639e9628231e3b..fdd165b89d45dcdb128137ca6ddb0d5a31228977 100644 (file)
@@ -34,7 +34,7 @@ import * as bindings from '../bindings' // TODO: figure out location
                         // todo: in-line interface filling
                         get_and_clear_pending_msg_events (): number[] {
                                                        MessageSendEvent[] ret = arg.get_and_clear_pending_msg_events();
-                               result: number[] = (number[])Arrays.stream(ret).map(arr_conv_18 -> arr_conv_18.ptr).toArray();
+                               result: number[] = Arrays.stream(ret).map(arr_conv_18 -> arr_conv_18.ptr).toArray(number[]::new);
                                /* TODO 2 MessageSendEvent  */;
                                return result;
                                                },
index 38520e1a781ed57b3d44cb98a94500ff328533c6..bf2a6612556fb6eb2242c88cbd95a408c1bab44c 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.NodeAnnouncement_free(this.ptr);
                     }
                 }
-       public NodeAnnouncement clone() {
-               number ret = bindings.NodeAnnouncement_clone(this.ptr);
-               const ret_hu_conv: NodeAnnouncement = new NodeAnnouncement(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_signature() {
                Uint8Array ret = bindings.NodeAnnouncement_get_signature(this.ptr);
                return ret;
@@ -54,15 +47,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public NodeAnnouncement clone() {
+               number ret = bindings.NodeAnnouncement_clone(this.ptr);
+               const ret_hu_conv: NodeAnnouncement = new NodeAnnouncement(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.NodeAnnouncement_write(this.ptr);
                return ret;
        }
 
-       public static NodeAnnouncement constructor_read(Uint8Array ser) {
+       public static Result_NodeAnnouncementDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.NodeAnnouncement_read(ser);
-               const ret_hu_conv: NodeAnnouncement = new NodeAnnouncement(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_NodeAnnouncementDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 2fa86c39952535472a92783954cb99ef765cb2e8..161b93b35202ad30022346f593e87dd65c4f6861 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.NodeAnnouncementInfo_free(this.ptr);
                     }
                 }
-       public NodeAnnouncementInfo clone() {
-               number ret = bindings.NodeAnnouncementInfo_clone(this.ptr);
-               const ret_hu_conv: NodeAnnouncementInfo = new NodeAnnouncementInfo(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public NodeFeatures get_features() {
                number ret = bindings.NodeAnnouncementInfo_get_features(this.ptr);
                const ret_hu_conv: NodeFeatures = new NodeFeatures(null, ret);
@@ -35,14 +28,6 @@ import * as bindings from '../bindings' // TODO: figure out location
        public void set_features(NodeFeatures val) {
                bindings.NodeAnnouncementInfo_set_features(this.ptr, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(val);
-               // Due to rust's strict-ownership memory model, in some cases we need to "move"
-               // an object to pass exclusive ownership to the function being called.
-               // In most cases, we avoid this being visible in GC'd languages by cloning the object
-               // at the FFI layer, creating a new object which Rust can claim ownership of
-               // However, in some cases (eg here), there is no way to clone an object, and thus
-               // we actually have to pass full ownership to Rust.
-               // Thus, after this call, val is reset to null and is now a dummy object.
-               val.ptr = 0;
        }
 
        public number get_last_update() {
@@ -73,7 +58,7 @@ import * as bindings from '../bindings' // TODO: figure out location
        }
 
        public void set_addresses(NetAddress[] val) {
-               bindings.NodeAnnouncementInfo_set_addresses(this.ptr, (number[])Arrays.stream(val).map(arr_conv_12 -> arr_conv_12.ptr).toArray());
+               bindings.NodeAnnouncementInfo_set_addresses(this.ptr, Arrays.stream(val).map(arr_conv_12 -> arr_conv_12.ptr).toArray(number[]::new));
                /* TODO 2 NetAddress  */;
        }
 
@@ -90,23 +75,22 @@ import * as bindings from '../bindings' // TODO: figure out location
        }
 
        public static NodeAnnouncementInfo constructor_new(NodeFeatures features_arg, number last_update_arg, Uint8Array rgb_arg, Uint8Array alias_arg, NetAddress[] addresses_arg, NodeAnnouncement announcement_message_arg) {
-               number ret = bindings.NodeAnnouncementInfo_new(features_arg == null ? 0 : features_arg.ptr & ~1, last_update_arg, rgb_arg, alias_arg, (number[])Arrays.stream(addresses_arg).map(arr_conv_12 -> arr_conv_12.ptr).toArray(), announcement_message_arg == null ? 0 : announcement_message_arg.ptr & ~1);
+               number ret = bindings.NodeAnnouncementInfo_new(features_arg == null ? 0 : features_arg.ptr & ~1, last_update_arg, rgb_arg, alias_arg, Arrays.stream(addresses_arg).map(arr_conv_12 -> arr_conv_12.ptr).toArray(number[]::new), announcement_message_arg == null ? 0 : announcement_message_arg.ptr & ~1);
                const ret_hu_conv: NodeAnnouncementInfo = new NodeAnnouncementInfo(null, ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                ret_hu_conv.ptrs_to.add(features_arg);
-               // Due to rust's strict-ownership memory model, in some cases we need to "move"
-               // an object to pass exclusive ownership to the function being called.
-               // In most cases, we avoid ret_hu_conv being visible in GC'd languages by cloning the object
-               // at the FFI layer, creating a new object which Rust can claim ownership of
-               // However, in some cases (eg here), there is no way to clone an object, and thus
-               // we actually have to pass full ownership to Rust.
-               // Thus, after ret_hu_conv call, features_arg is reset to null and is now a dummy object.
-               features_arg.ptr = 0;
                /* TODO 2 NetAddress  */;
                ret_hu_conv.ptrs_to.add(announcement_message_arg);
                return ret_hu_conv;
        }
 
+       public NodeAnnouncementInfo clone() {
+               number ret = bindings.NodeAnnouncementInfo_clone(this.ptr);
+               const ret_hu_conv: NodeAnnouncementInfo = new NodeAnnouncementInfo(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.NodeAnnouncementInfo_write(this.ptr);
                return ret;
index d091079f895c994131b7457427ed1c2e2ee713c0..13652f14d720313d86d2b5443342e64ec9770bf6 100644 (file)
@@ -18,4 +18,36 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.NodeFeatures_free(this.ptr);
                     }
                 }
+       public NodeFeatures clone() {
+               number ret = bindings.NodeFeatures_clone(this.ptr);
+               const ret_hu_conv: NodeFeatures = new NodeFeatures(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public static NodeFeatures constructor_empty() {
+               number ret = bindings.NodeFeatures_empty();
+               const ret_hu_conv: NodeFeatures = new NodeFeatures(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       public static NodeFeatures constructor_known() {
+               number ret = bindings.NodeFeatures_known();
+               const ret_hu_conv: NodeFeatures = new NodeFeatures(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       public Uint8Array write() {
+               Uint8Array ret = bindings.NodeFeatures_write(this.ptr);
+               return ret;
+       }
+
+       public static Result_NodeFeaturesDecodeErrorZ constructor_read(Uint8Array ser) {
+               number ret = bindings.NodeFeatures_read(ser);
+               Result_NodeFeaturesDecodeErrorZ ret_hu_conv = Result_NodeFeaturesDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 0fd77a145007b4aae145fe896540263d67c9d009..f848b0860f601f1650b446e21a334285bc6748ff 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.NodeInfo_free(this.ptr);
                     }
                 }
-       public NodeInfo clone() {
-               number ret = bindings.NodeInfo_clone(this.ptr);
-               const ret_hu_conv: NodeInfo = new NodeInfo(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public void set_channels(number[] val) {
                bindings.NodeInfo_set_channels(this.ptr, val);
        }
@@ -62,6 +55,13 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public NodeInfo clone() {
+               number ret = bindings.NodeInfo_clone(this.ptr);
+               const ret_hu_conv: NodeInfo = new NodeInfo(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.NodeInfo_write(this.ptr);
                return ret;
index 62485309903da3d06760129a3330def31e62cae5..cbdaf307b0e85c2c02c24d32b72e494e4cc26f03 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.OpenChannel_free(this.ptr);
                     }
                 }
-       public OpenChannel clone() {
-               number ret = bindings.OpenChannel_clone(this.ptr);
-               const ret_hu_conv: OpenChannel = new OpenChannel(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_chain_hash() {
                Uint8Array ret = bindings.OpenChannel_get_chain_hash(this.ptr);
                return ret;
@@ -187,15 +180,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                bindings.OpenChannel_set_channel_flags(this.ptr, val);
        }
 
+       public OpenChannel clone() {
+               number ret = bindings.OpenChannel_clone(this.ptr);
+               const ret_hu_conv: OpenChannel = new OpenChannel(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.OpenChannel_write(this.ptr);
                return ret;
        }
 
-       public static OpenChannel constructor_read(Uint8Array ser) {
+       public static Result_OpenChannelDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.OpenChannel_read(ser);
-               const ret_hu_conv: OpenChannel = new OpenChannel(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_OpenChannelDecodeErrorZ ret_hu_conv = Result_OpenChannelDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index decbf7b744897d63ce403fff6ea7fbb392b066e8..508f2e13f162b7067031a4b9e20bb39bbd20758a 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.OutPoint_free(this.ptr);
                     }
                 }
-       public OutPoint clone() {
-               number ret = bindings.OutPoint_clone(this.ptr);
-               const ret_hu_conv: OutPoint = new OutPoint(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_txid() {
                Uint8Array ret = bindings.OutPoint_get_txid(this.ptr);
                return ret;
@@ -50,6 +43,13 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public OutPoint clone() {
+               number ret = bindings.OutPoint_clone(this.ptr);
+               const ret_hu_conv: OutPoint = new OutPoint(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array to_channel_id() {
                Uint8Array ret = bindings.OutPoint_to_channel_id(this.ptr);
                return ret;
@@ -60,10 +60,9 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret;
        }
 
-       public static OutPoint constructor_read(Uint8Array ser) {
+       public static Result_OutPointDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.OutPoint_read(ser);
-               const ret_hu_conv: OutPoint = new OutPoint(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_OutPointDecodeErrorZ ret_hu_conv = Result_OutPointDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 2bae7bb77170e6aa96cc347a18c3a663bfbcdf08..52504971e59ec71a14abaa95c3bb5ada4a63f782 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.PeerHandleError_free(this.ptr);
                     }
                 }
-       public PeerHandleError clone() {
-               number ret = bindings.PeerHandleError_clone(this.ptr);
-               const ret_hu_conv: PeerHandleError = new PeerHandleError(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public boolean get_no_connection_possible() {
                boolean ret = bindings.PeerHandleError_get_no_connection_possible(this.ptr);
                return ret;
@@ -41,4 +34,11 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public PeerHandleError clone() {
+               number ret = bindings.PeerHandleError_clone(this.ptr);
+               const ret_hu_conv: PeerHandleError = new PeerHandleError(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
 }
index 2cc1a913f6ea09dec8fd5849b68a3e35dc76f55c..f7054fe012ae08e2ec003add20f46ebc69e91716 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.Ping_free(this.ptr);
                     }
                 }
-       public Ping clone() {
-               number ret = bindings.Ping_clone(this.ptr);
-               const ret_hu_conv: Ping = new Ping(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public number get_ponglen() {
                number ret = bindings.Ping_get_ponglen(this.ptr);
                return ret;
@@ -50,6 +43,13 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public Ping clone() {
+               number ret = bindings.Ping_clone(this.ptr);
+               const ret_hu_conv: Ping = new Ping(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.Ping_write(this.ptr);
                return ret;
index 63379926273f973d2bfc6cfb346a819abee8c5c0..58be169f8d101530f3d3079658feebe15c26c260 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.Pong_free(this.ptr);
                     }
                 }
-       public Pong clone() {
-               number ret = bindings.Pong_clone(this.ptr);
-               const ret_hu_conv: Pong = new Pong(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public number get_byteslen() {
                number ret = bindings.Pong_get_byteslen(this.ptr);
                return ret;
@@ -41,6 +34,13 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public Pong clone() {
+               number ret = bindings.Pong_clone(this.ptr);
+               const ret_hu_conv: Pong = new Pong(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.Pong_write(this.ptr);
                return ret;
index 8b26591c2069fa455071f9bad1850aed88350d36..4a4a6e22dd17013af439d6f5ca2d8721b4524061 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.QueryChannelRange_free(this.ptr);
                     }
                 }
-       public QueryChannelRange clone() {
-               number ret = bindings.QueryChannelRange_clone(this.ptr);
-               const ret_hu_conv: QueryChannelRange = new QueryChannelRange(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_chain_hash() {
                Uint8Array ret = bindings.QueryChannelRange_get_chain_hash(this.ptr);
                return ret;
@@ -59,6 +52,13 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public QueryChannelRange clone() {
+               number ret = bindings.QueryChannelRange_clone(this.ptr);
+               const ret_hu_conv: QueryChannelRange = new QueryChannelRange(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public static Result_QueryChannelRangeDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.QueryChannelRange_read(ser);
                Result_QueryChannelRangeDecodeErrorZ ret_hu_conv = Result_QueryChannelRangeDecodeErrorZ.constr_from_ptr(ret);
index 58643a72d147a5cbe96f93300f88fc9f211a971b..fe6f93f900dbb907008d793b0f79ac0b9aae808b 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.QueryShortChannelIds_free(this.ptr);
                     }
                 }
-       public QueryShortChannelIds clone() {
-               number ret = bindings.QueryShortChannelIds_clone(this.ptr);
-               const ret_hu_conv: QueryShortChannelIds = new QueryShortChannelIds(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_chain_hash() {
                Uint8Array ret = bindings.QueryShortChannelIds_get_chain_hash(this.ptr);
                return ret;
@@ -45,6 +38,13 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public QueryShortChannelIds clone() {
+               number ret = bindings.QueryShortChannelIds_clone(this.ptr);
+               const ret_hu_conv: QueryShortChannelIds = new QueryShortChannelIds(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public static Result_QueryShortChannelIdsDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.QueryShortChannelIds_read(ser);
                Result_QueryShortChannelIdsDecodeErrorZ ret_hu_conv = Result_QueryShortChannelIdsDecodeErrorZ.constr_from_ptr(ret);
index 3d2ef1784797bcfc9ed88c6d9946f56bb3272803..bbf199e3ba561afddfcf15dc3b2e33469c2f149b 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.ReplyChannelRange_free(this.ptr);
                     }
                 }
-       public ReplyChannelRange clone() {
-               number ret = bindings.ReplyChannelRange_clone(this.ptr);
-               const ret_hu_conv: ReplyChannelRange = new ReplyChannelRange(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_chain_hash() {
                Uint8Array ret = bindings.ReplyChannelRange_get_chain_hash(this.ptr);
                return ret;
@@ -52,26 +45,33 @@ import * as bindings from '../bindings' // TODO: figure out location
                bindings.ReplyChannelRange_set_number_of_blocks(this.ptr, val);
        }
 
-       public boolean get_full_information() {
-               boolean ret = bindings.ReplyChannelRange_get_full_information(this.ptr);
+       public boolean get_sync_complete() {
+               boolean ret = bindings.ReplyChannelRange_get_sync_complete(this.ptr);
                return ret;
        }
 
-       public void set_full_information(boolean val) {
-               bindings.ReplyChannelRange_set_full_information(this.ptr, val);
+       public void set_sync_complete(boolean val) {
+               bindings.ReplyChannelRange_set_sync_complete(this.ptr, val);
        }
 
        public void set_short_channel_ids(number[] val) {
                bindings.ReplyChannelRange_set_short_channel_ids(this.ptr, val);
        }
 
-       public static ReplyChannelRange constructor_new(Uint8Array chain_hash_arg, number first_blocknum_arg, number number_of_blocks_arg, boolean full_information_arg, number[] short_channel_ids_arg) {
-               number ret = bindings.ReplyChannelRange_new(chain_hash_arg, first_blocknum_arg, number_of_blocks_arg, full_information_arg, short_channel_ids_arg);
+       public static ReplyChannelRange constructor_new(Uint8Array chain_hash_arg, number first_blocknum_arg, number number_of_blocks_arg, boolean sync_complete_arg, number[] short_channel_ids_arg) {
+               number ret = bindings.ReplyChannelRange_new(chain_hash_arg, first_blocknum_arg, number_of_blocks_arg, sync_complete_arg, short_channel_ids_arg);
                const ret_hu_conv: ReplyChannelRange = new ReplyChannelRange(null, ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                return ret_hu_conv;
        }
 
+       public ReplyChannelRange clone() {
+               number ret = bindings.ReplyChannelRange_clone(this.ptr);
+               const ret_hu_conv: ReplyChannelRange = new ReplyChannelRange(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public static Result_ReplyChannelRangeDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.ReplyChannelRange_read(ser);
                Result_ReplyChannelRangeDecodeErrorZ ret_hu_conv = Result_ReplyChannelRangeDecodeErrorZ.constr_from_ptr(ret);
index 6b2a21016f83168f97ea214e4195c145f802f98c..ebcb2914a57f061e169eceefff9917aea6c7c5a7 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.ReplyShortChannelIdsEnd_free(this.ptr);
                     }
                 }
-       public ReplyShortChannelIdsEnd clone() {
-               number ret = bindings.ReplyShortChannelIdsEnd_clone(this.ptr);
-               const ret_hu_conv: ReplyShortChannelIdsEnd = new ReplyShortChannelIdsEnd(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_chain_hash() {
                Uint8Array ret = bindings.ReplyShortChannelIdsEnd_get_chain_hash(this.ptr);
                return ret;
@@ -50,6 +43,13 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public ReplyShortChannelIdsEnd clone() {
+               number ret = bindings.ReplyShortChannelIdsEnd_clone(this.ptr);
+               const ret_hu_conv: ReplyShortChannelIdsEnd = new ReplyShortChannelIdsEnd(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public static Result_ReplyShortChannelIdsEndDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.ReplyShortChannelIdsEnd_read(ser);
                Result_ReplyShortChannelIdsEndDecodeErrorZ ret_hu_conv = Result_ReplyShortChannelIdsEndDecodeErrorZ.constr_from_ptr(ret);
diff --git a/ts/structs/Result_ChanKeySignerDecodeErrorZ.ts b/ts/structs/Result_ChanKeySignerDecodeErrorZ.ts
deleted file mode 100644 (file)
index c8e6041..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-
-import CommonBase from './CommonBase';
-import * as bindings from '../bindings' // TODO: figure out location
-
-public class Result_ChanKeySignerDecodeErrorZ extends CommonBase {
-       private Result_ChanKeySignerDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
-       protected void finalize() throws Throwable {
-               if (ptr != 0) { bindings.CResult_ChanKeySignerDecodeErrorZ_free(ptr); } super.finalize();
-       }
-
-       static Result_ChanKeySignerDecodeErrorZ constr_from_ptr(long ptr) {
-               if (bindings.LDKCResult_ChanKeySignerDecodeErrorZ_result_ok(ptr)) {
-                       return new Result_ChanKeySignerDecodeErrorZ_OK(null, ptr);
-               } else {
-                       return new Result_ChanKeySignerDecodeErrorZ_Err(null, ptr);
-               }
-       }
-       public static final class Result_ChanKeySignerDecodeErrorZ_OK extends Result_ChanKeySignerDecodeErrorZ {
-               public final ChannelKeys res;
-               private Result_ChanKeySignerDecodeErrorZ_OK(Object _dummy, long ptr) {
-                       super(_dummy, ptr);
-                       number res = bindings.LDKCResult_ChanKeySignerDecodeErrorZ_get_ok(ptr);
-                       ChannelKeys ret_hu_conv = new ChannelKeys(null, res);
-                       ret_hu_conv.ptrs_to.add(this);
-                       this.res = ret_hu_conv;
-               }
-               public Result_ChanKeySignerDecodeErrorZ_OK(ChannelKeys res) {
-                       this(null, bindings.CResult_ChanKeySignerDecodeErrorZ_ok(res == null ? 0 : res.ptr));
-                       this.ptrs_to.add(res);
-               }
-       }
-
-       public static final class Result_ChanKeySignerDecodeErrorZ_Err extends Result_ChanKeySignerDecodeErrorZ {
-               public final DecodeError err;
-               private Result_ChanKeySignerDecodeErrorZ_Err(Object _dummy, long ptr) {
-                       super(_dummy, ptr);
-                       number err = bindings.LDKCResult_ChanKeySignerDecodeErrorZ_get_err(ptr);
-                       const err_hu_conv: DecodeError = new DecodeError(null, err);
-                       err_hu_conv.ptrs_to.add(this);
-                       this.err = err_hu_conv;
-               }
-               public Result_ChanKeySignerDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_ChanKeySignerDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
-       }
-}
diff --git a/ts/structs/Result_PublicKeySecpErrorZ.ts b/ts/structs/Result_PublicKeySecpErrorZ.ts
deleted file mode 100644 (file)
index bf427c7..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-
-import CommonBase from './CommonBase';
-import * as bindings from '../bindings' // TODO: figure out location
-
-public class Result_PublicKeySecpErrorZ extends CommonBase {
-       private Result_PublicKeySecpErrorZ(Object _dummy, long ptr) { super(ptr); }
-       protected void finalize() throws Throwable {
-               if (ptr != 0) { bindings.CResult_PublicKeySecpErrorZ_free(ptr); } super.finalize();
-       }
-
-       static Result_PublicKeySecpErrorZ constr_from_ptr(long ptr) {
-               if (bindings.LDKCResult_PublicKeySecpErrorZ_result_ok(ptr)) {
-                       return new Result_PublicKeySecpErrorZ_OK(null, ptr);
-               } else {
-                       return new Result_PublicKeySecpErrorZ_Err(null, ptr);
-               }
-       }
-       public static final class Result_PublicKeySecpErrorZ_OK extends Result_PublicKeySecpErrorZ {
-               public final Uint8Array res;
-               private Result_PublicKeySecpErrorZ_OK(Object _dummy, long ptr) {
-                       super(_dummy, ptr);
-                       this.res = bindings.LDKCResult_PublicKeySecpErrorZ_get_ok(ptr);
-               }
-               public Result_PublicKeySecpErrorZ_OK(Uint8Array res) {
-                       this(null, bindings.CResult_PublicKeySecpErrorZ_ok(res));
-               }
-       }
-
-       public static final class Result_PublicKeySecpErrorZ_Err extends Result_PublicKeySecpErrorZ {
-               public final LDKSecp256k1Error err;
-               private Result_PublicKeySecpErrorZ_Err(Object _dummy, long ptr) {
-                       super(_dummy, ptr);
-                       this.err = bindings.LDKCResult_PublicKeySecpErrorZ_get_err(ptr);
-               }
-               public Result_PublicKeySecpErrorZ_Err(LDKSecp256k1Error err) {
-                       this(null, bindings.CResult_PublicKeySecpErrorZ_err(err));
-               }
-       }
-}
diff --git a/ts/structs/Result_SecretKeySecpErrorZ.ts b/ts/structs/Result_SecretKeySecpErrorZ.ts
deleted file mode 100644 (file)
index 5ebf99c..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-
-import CommonBase from './CommonBase';
-import * as bindings from '../bindings' // TODO: figure out location
-
-public class Result_SecretKeySecpErrorZ extends CommonBase {
-       private Result_SecretKeySecpErrorZ(Object _dummy, long ptr) { super(ptr); }
-       protected void finalize() throws Throwable {
-               if (ptr != 0) { bindings.CResult_SecretKeySecpErrorZ_free(ptr); } super.finalize();
-       }
-
-       static Result_SecretKeySecpErrorZ constr_from_ptr(long ptr) {
-               if (bindings.LDKCResult_SecretKeySecpErrorZ_result_ok(ptr)) {
-                       return new Result_SecretKeySecpErrorZ_OK(null, ptr);
-               } else {
-                       return new Result_SecretKeySecpErrorZ_Err(null, ptr);
-               }
-       }
-       public static final class Result_SecretKeySecpErrorZ_OK extends Result_SecretKeySecpErrorZ {
-               public final Uint8Array res;
-               private Result_SecretKeySecpErrorZ_OK(Object _dummy, long ptr) {
-                       super(_dummy, ptr);
-                       this.res = bindings.LDKCResult_SecretKeySecpErrorZ_get_ok(ptr);
-               }
-               public Result_SecretKeySecpErrorZ_OK(Uint8Array res) {
-                       this(null, bindings.CResult_SecretKeySecpErrorZ_ok(res));
-               }
-       }
-
-       public static final class Result_SecretKeySecpErrorZ_Err extends Result_SecretKeySecpErrorZ {
-               public final LDKSecp256k1Error err;
-               private Result_SecretKeySecpErrorZ_Err(Object _dummy, long ptr) {
-                       super(_dummy, ptr);
-                       this.err = bindings.LDKCResult_SecretKeySecpErrorZ_get_err(ptr);
-               }
-               public Result_SecretKeySecpErrorZ_Err(LDKSecp256k1Error err) {
-                       this(null, bindings.CResult_SecretKeySecpErrorZ_err(err));
-               }
-       }
-}
diff --git a/ts/structs/Result_TxCreationKeysSecpErrorZ.ts b/ts/structs/Result_TxCreationKeysSecpErrorZ.ts
deleted file mode 100644 (file)
index fa385e1..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-
-import CommonBase from './CommonBase';
-import * as bindings from '../bindings' // TODO: figure out location
-
-public class Result_TxCreationKeysSecpErrorZ extends CommonBase {
-       private Result_TxCreationKeysSecpErrorZ(Object _dummy, long ptr) { super(ptr); }
-       protected void finalize() throws Throwable {
-               if (ptr != 0) { bindings.CResult_TxCreationKeysSecpErrorZ_free(ptr); } super.finalize();
-       }
-
-       static Result_TxCreationKeysSecpErrorZ constr_from_ptr(long ptr) {
-               if (bindings.LDKCResult_TxCreationKeysSecpErrorZ_result_ok(ptr)) {
-                       return new Result_TxCreationKeysSecpErrorZ_OK(null, ptr);
-               } else {
-                       return new Result_TxCreationKeysSecpErrorZ_Err(null, ptr);
-               }
-       }
-       public static final class Result_TxCreationKeysSecpErrorZ_OK extends Result_TxCreationKeysSecpErrorZ {
-               public final TxCreationKeys res;
-               private Result_TxCreationKeysSecpErrorZ_OK(Object _dummy, long ptr) {
-                       super(_dummy, ptr);
-                       number res = bindings.LDKCResult_TxCreationKeysSecpErrorZ_get_ok(ptr);
-                       const res_hu_conv: TxCreationKeys = new TxCreationKeys(null, res);
-                       res_hu_conv.ptrs_to.add(this);
-                       this.res = res_hu_conv;
-               }
-               public Result_TxCreationKeysSecpErrorZ_OK(TxCreationKeys res) {
-                       this(null, bindings.CResult_TxCreationKeysSecpErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
-       }
-
-       public static final class Result_TxCreationKeysSecpErrorZ_Err extends Result_TxCreationKeysSecpErrorZ {
-               public final LDKSecp256k1Error err;
-               private Result_TxCreationKeysSecpErrorZ_Err(Object _dummy, long ptr) {
-                       super(_dummy, ptr);
-                       this.err = bindings.LDKCResult_TxCreationKeysSecpErrorZ_get_err(ptr);
-               }
-               public Result_TxCreationKeysSecpErrorZ_Err(LDKSecp256k1Error err) {
-                       this(null, bindings.CResult_TxCreationKeysSecpErrorZ_err(err));
-               }
-       }
-}
index 15b9945b58350c9bcfe9bb4061cc528b817a952e..d521246952e6f179e61e07076dab1efe544ba542 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.RevokeAndACK_free(this.ptr);
                     }
                 }
-       public RevokeAndACK clone() {
-               number ret = bindings.RevokeAndACK_clone(this.ptr);
-               const ret_hu_conv: RevokeAndACK = new RevokeAndACK(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_channel_id() {
                Uint8Array ret = bindings.RevokeAndACK_get_channel_id(this.ptr);
                return ret;
@@ -59,15 +52,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public RevokeAndACK clone() {
+               number ret = bindings.RevokeAndACK_clone(this.ptr);
+               const ret_hu_conv: RevokeAndACK = new RevokeAndACK(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.RevokeAndACK_write(this.ptr);
                return ret;
        }
 
-       public static RevokeAndACK constructor_read(Uint8Array ser) {
+       public static Result_RevokeAndACKDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.RevokeAndACK_read(ser);
-               const ret_hu_conv: RevokeAndACK = new RevokeAndACK(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_RevokeAndACKDecodeErrorZ ret_hu_conv = Result_RevokeAndACKDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index e8d32809419fc467438833f22a9cbf6da29d564a..f6d7e14af3caa24292b875d1b7a85ee74b5b7995 100644 (file)
@@ -18,26 +18,26 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.Route_free(this.ptr);
                     }
                 }
-       public Route clone() {
-               number ret = bindings.Route_clone(this.ptr);
-               const ret_hu_conv: Route = new Route(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public void set_paths(RouteHop[][] val) {
-               bindings.Route_set_paths(this.ptr, (number[][])Arrays.stream(val).map(arr_conv_12 -> (number[])Arrays.stream(arr_conv_12).map(arr_conv_10 -> arr_conv_10 == null ? 0 : arr_conv_10.ptr & ~1).toArray()).toArray());
+               bindings.Route_set_paths(this.ptr, Arrays.stream(val).map(arr_conv_12 -> Arrays.stream(arr_conv_12).map(arr_conv_10 -> arr_conv_10 == null ? 0 : arr_conv_10.ptr & ~1).toArray(number[]::new)).toArray(number[][]::new));
                /* TODO 2 RouteHop[]  */;
        }
 
        public static Route constructor_new(RouteHop[][] paths_arg) {
-               number ret = bindings.Route_new((number[][])Arrays.stream(paths_arg).map(arr_conv_12 -> (number[])Arrays.stream(arr_conv_12).map(arr_conv_10 -> arr_conv_10 == null ? 0 : arr_conv_10.ptr & ~1).toArray()).toArray());
+               number ret = bindings.Route_new(Arrays.stream(paths_arg).map(arr_conv_12 -> Arrays.stream(arr_conv_12).map(arr_conv_10 -> arr_conv_10 == null ? 0 : arr_conv_10.ptr & ~1).toArray(number[]::new)).toArray(number[][]::new));
                const ret_hu_conv: Route = new Route(null, ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                /* TODO 2 RouteHop[]  */;
                return ret_hu_conv;
        }
 
+       public Route clone() {
+               number ret = bindings.Route_clone(this.ptr);
+               const ret_hu_conv: Route = new Route(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.Route_write(this.ptr);
                return ret;
index a5e312e95ae591eccc5ea4c801a8904754fbfcfd..4f338da840fae6f5c04c19f91b97c85d800d34fd 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.RouteHint_free(this.ptr);
                     }
                 }
-       public RouteHint clone() {
-               number ret = bindings.RouteHint_clone(this.ptr);
-               const ret_hu_conv: RouteHint = new RouteHint(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_src_node_id() {
                Uint8Array ret = bindings.RouteHint_get_src_node_id(this.ptr);
                return ret;
@@ -81,4 +74,11 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public RouteHint clone() {
+               number ret = bindings.RouteHint_clone(this.ptr);
+               const ret_hu_conv: RouteHint = new RouteHint(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
 }
index f03f698946c28badb6ab6702ea519b94eee9c016..3d9e3386c2603688842128fb542778444e23a85c 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.RouteHop_free(this.ptr);
                     }
                 }
-       public RouteHop clone() {
-               number ret = bindings.RouteHop_clone(this.ptr);
-               const ret_hu_conv: RouteHop = new RouteHop(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_pubkey() {
                Uint8Array ret = bindings.RouteHop_get_pubkey(this.ptr);
                return ret;
@@ -44,14 +37,6 @@ import * as bindings from '../bindings' // TODO: figure out location
        public void set_node_features(NodeFeatures val) {
                bindings.RouteHop_set_node_features(this.ptr, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(val);
-               // Due to rust's strict-ownership memory model, in some cases we need to "move"
-               // an object to pass exclusive ownership to the function being called.
-               // In most cases, we avoid this being visible in GC'd languages by cloning the object
-               // at the FFI layer, creating a new object which Rust can claim ownership of
-               // However, in some cases (eg here), there is no way to clone an object, and thus
-               // we actually have to pass full ownership to Rust.
-               // Thus, after this call, val is reset to null and is now a dummy object.
-               val.ptr = 0;
        }
 
        public number get_short_channel_id() {
@@ -73,14 +58,6 @@ import * as bindings from '../bindings' // TODO: figure out location
        public void set_channel_features(ChannelFeatures val) {
                bindings.RouteHop_set_channel_features(this.ptr, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(val);
-               // Due to rust's strict-ownership memory model, in some cases we need to "move"
-               // an object to pass exclusive ownership to the function being called.
-               // In most cases, we avoid this being visible in GC'd languages by cloning the object
-               // at the FFI layer, creating a new object which Rust can claim ownership of
-               // However, in some cases (eg here), there is no way to clone an object, and thus
-               // we actually have to pass full ownership to Rust.
-               // Thus, after this call, val is reset to null and is now a dummy object.
-               val.ptr = 0;
        }
 
        public number get_fee_msat() {
@@ -106,23 +83,14 @@ import * as bindings from '../bindings' // TODO: figure out location
                const ret_hu_conv: RouteHop = new RouteHop(null, ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                ret_hu_conv.ptrs_to.add(node_features_arg);
-               // Due to rust's strict-ownership memory model, in some cases we need to "move"
-               // an object to pass exclusive ownership to the function being called.
-               // In most cases, we avoid ret_hu_conv being visible in GC'd languages by cloning the object
-               // at the FFI layer, creating a new object which Rust can claim ownership of
-               // However, in some cases (eg here), there is no way to clone an object, and thus
-               // we actually have to pass full ownership to Rust.
-               // Thus, after ret_hu_conv call, node_features_arg is reset to null and is now a dummy object.
-               node_features_arg.ptr = 0;
                ret_hu_conv.ptrs_to.add(channel_features_arg);
-               // Due to rust's strict-ownership memory model, in some cases we need to "move"
-               // an object to pass exclusive ownership to the function being called.
-               // In most cases, we avoid ret_hu_conv being visible in GC'd languages by cloning the object
-               // at the FFI layer, creating a new object which Rust can claim ownership of
-               // However, in some cases (eg here), there is no way to clone an object, and thus
-               // we actually have to pass full ownership to Rust.
-               // Thus, after ret_hu_conv call, channel_features_arg is reset to null and is now a dummy object.
-               channel_features_arg.ptr = 0;
+               return ret_hu_conv;
+       }
+
+       public RouteHop clone() {
+               number ret = bindings.RouteHop_clone(this.ptr);
+               const ret_hu_conv: RouteHop = new RouteHop(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
 
index f71fd081fb6e6bb8ebfa874503250fa21e9a4234..e046cbe5851781485bc2bccc68aee51581a5200f 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.RoutingFees_free(this.ptr);
                     }
                 }
-       public RoutingFees clone() {
-               number ret = bindings.RoutingFees_clone(this.ptr);
-               const ret_hu_conv: RoutingFees = new RoutingFees(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public number get_base_msat() {
                number ret = bindings.RoutingFees_get_base_msat(this.ptr);
                return ret;
@@ -50,6 +43,13 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public RoutingFees clone() {
+               number ret = bindings.RoutingFees_clone(this.ptr);
+               const ret_hu_conv: RoutingFees = new RoutingFees(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public static Result_RoutingFeesDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.RoutingFees_read(ser);
                Result_RoutingFeesDecodeErrorZ ret_hu_conv = Result_RoutingFeesDecodeErrorZ.constr_from_ptr(ret);
index 28552c66dbc37ce7a9742597c4e6a3bd5faffe09..7d352482e77806bf86c189174105dca98c014380 100644 (file)
@@ -61,14 +61,14 @@ import * as bindings from '../bindings' // TODO: figure out location
 
                                                get_next_channel_announcements (starting_point: number, batch_amount: number): number[] {
                                                        ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate>[] ret = arg.get_next_channel_announcements(starting_point, batch_amount);
-                               result: number[] = (number[])Arrays.stream(ret).map(arr_conv_63 -> bindings.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(arr_conv_63.a == null ? 0 : arr_conv_63.a.ptr & ~1, arr_conv_63.b == null ? 0 : arr_conv_63.b.ptr & ~1, arr_conv_63.c == null ? 0 : arr_conv_63.c.ptr & ~1)).toArray();
+                               result: number[] = Arrays.stream(ret).map(arr_conv_63 -> bindings.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(arr_conv_63.a == null ? 0 : arr_conv_63.a.ptr & ~1, arr_conv_63.b == null ? 0 : arr_conv_63.b.ptr & ~1, arr_conv_63.c == null ? 0 : arr_conv_63.c.ptr & ~1)).toArray(number[]::new);
                                /* TODO 2 ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate>  */;
                                return result;
                                                },
 
                                                get_next_node_announcements (starting_point: Uint8Array, batch_amount: number): number[] {
                                                        NodeAnnouncement[] ret = arg.get_next_node_announcements(starting_point, batch_amount);
-                               result: number[] = (number[])Arrays.stream(ret).map(arr_conv_18 -> arr_conv_18 == null ? 0 : arr_conv_18.ptr & ~1).toArray();
+                               result: number[] = Arrays.stream(ret).map(arr_conv_18 -> arr_conv_18 == null ? 0 : arr_conv_18.ptr & ~1).toArray(number[]::new);
                                /* TODO 2 NodeAnnouncement  */;
                                return result;
                                                },
index 0301af6b6890d0ecc899bd2255389e1be56d8bb5..3c50548ba8afbd06d5b0d9b4fff813073b330f98 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.Shutdown_free(this.ptr);
                     }
                 }
-       public Shutdown clone() {
-               number ret = bindings.Shutdown_clone(this.ptr);
-               const ret_hu_conv: Shutdown = new Shutdown(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_channel_id() {
                Uint8Array ret = bindings.Shutdown_get_channel_id(this.ptr);
                return ret;
@@ -50,15 +43,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public Shutdown clone() {
+               number ret = bindings.Shutdown_clone(this.ptr);
+               const ret_hu_conv: Shutdown = new Shutdown(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.Shutdown_write(this.ptr);
                return ret;
        }
 
-       public static Shutdown constructor_read(Uint8Array ser) {
+       public static Result_ShutdownDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.Shutdown_read(ser);
-               const ret_hu_conv: Shutdown = new Shutdown(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_ShutdownDecodeErrorZ ret_hu_conv = Result_ShutdownDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 1b8b616b6d6baae060312549783f511b044f6e44..e6af3f27352c5cd6aed0d518cc6595ff797cba9f 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.TxCreationKeys_free(this.ptr);
                     }
                 }
-       public TxCreationKeys clone() {
-               number ret = bindings.TxCreationKeys_clone(this.ptr);
-               const ret_hu_conv: TxCreationKeys = new TxCreationKeys(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_per_commitment_point() {
                Uint8Array ret = bindings.TxCreationKeys_get_per_commitment_point(this.ptr);
                return ret;
@@ -77,27 +70,33 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public TxCreationKeys clone() {
+               number ret = bindings.TxCreationKeys_clone(this.ptr);
+               const ret_hu_conv: TxCreationKeys = new TxCreationKeys(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.TxCreationKeys_write(this.ptr);
                return ret;
        }
 
-       public static TxCreationKeys constructor_read(Uint8Array ser) {
+       public static Result_TxCreationKeysDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.TxCreationKeys_read(ser);
-               const ret_hu_conv: TxCreationKeys = new TxCreationKeys(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_TxCreationKeysDecodeErrorZ ret_hu_conv = Result_TxCreationKeysDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static Result_TxCreationKeysSecpErrorZ constructor_derive_new(Uint8Array per_commitment_point, Uint8Array broadcaster_delayed_payment_base, Uint8Array broadcaster_htlc_base, Uint8Array countersignatory_revocation_base, Uint8Array countersignatory_htlc_base) {
+       public static Result_TxCreationKeysErrorZ constructor_derive_new(Uint8Array per_commitment_point, Uint8Array broadcaster_delayed_payment_base, Uint8Array broadcaster_htlc_base, Uint8Array countersignatory_revocation_base, Uint8Array countersignatory_htlc_base) {
                number ret = bindings.TxCreationKeys_derive_new(per_commitment_point, broadcaster_delayed_payment_base, broadcaster_htlc_base, countersignatory_revocation_base, countersignatory_htlc_base);
-               Result_TxCreationKeysSecpErrorZ ret_hu_conv = Result_TxCreationKeysSecpErrorZ.constr_from_ptr(ret);
+               Result_TxCreationKeysErrorZ ret_hu_conv = Result_TxCreationKeysErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static Result_TxCreationKeysSecpErrorZ constructor_from_channel_static_keys(Uint8Array per_commitment_point, ChannelPublicKeys broadcaster_keys, ChannelPublicKeys countersignatory_keys) {
+       public static Result_TxCreationKeysErrorZ constructor_from_channel_static_keys(Uint8Array per_commitment_point, ChannelPublicKeys broadcaster_keys, ChannelPublicKeys countersignatory_keys) {
                number ret = bindings.TxCreationKeys_from_channel_static_keys(per_commitment_point, broadcaster_keys == null ? 0 : broadcaster_keys.ptr & ~1, countersignatory_keys == null ? 0 : countersignatory_keys.ptr & ~1);
-               Result_TxCreationKeysSecpErrorZ ret_hu_conv = Result_TxCreationKeysSecpErrorZ.constr_from_ptr(ret);
+               Result_TxCreationKeysErrorZ ret_hu_conv = Result_TxCreationKeysErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(broadcaster_keys);
                ret_hu_conv.ptrs_to.add(countersignatory_keys);
                return ret_hu_conv;
index 84b2ca7f7b0f075fd07cb1606ebdbae39fc11eab..3966cb206b6ca37d92f5c83ce7b9ba8a870c6f14 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.UnsignedChannelAnnouncement_free(this.ptr);
                     }
                 }
-       public UnsignedChannelAnnouncement clone() {
-               number ret = bindings.UnsignedChannelAnnouncement_clone(this.ptr);
-               const ret_hu_conv: UnsignedChannelAnnouncement = new UnsignedChannelAnnouncement(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public ChannelFeatures get_features() {
                number ret = bindings.UnsignedChannelAnnouncement_get_features(this.ptr);
                const ret_hu_conv: ChannelFeatures = new ChannelFeatures(null, ret);
@@ -35,14 +28,6 @@ import * as bindings from '../bindings' // TODO: figure out location
        public void set_features(ChannelFeatures val) {
                bindings.UnsignedChannelAnnouncement_set_features(this.ptr, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(val);
-               // Due to rust's strict-ownership memory model, in some cases we need to "move"
-               // an object to pass exclusive ownership to the function being called.
-               // In most cases, we avoid this being visible in GC'd languages by cloning the object
-               // at the FFI layer, creating a new object which Rust can claim ownership of
-               // However, in some cases (eg here), there is no way to clone an object, and thus
-               // we actually have to pass full ownership to Rust.
-               // Thus, after this call, val is reset to null and is now a dummy object.
-               val.ptr = 0;
        }
 
        public Uint8Array get_chain_hash() {
@@ -99,6 +84,13 @@ import * as bindings from '../bindings' // TODO: figure out location
                bindings.UnsignedChannelAnnouncement_set_bitcoin_key_2(this.ptr, val);
        }
 
+       public UnsignedChannelAnnouncement clone() {
+               number ret = bindings.UnsignedChannelAnnouncement_clone(this.ptr);
+               const ret_hu_conv: UnsignedChannelAnnouncement = new UnsignedChannelAnnouncement(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.UnsignedChannelAnnouncement_write(this.ptr);
                return ret;
index 133bc91f19d878843afb9d80fd01b06a91a2a4d7..4accac621135cd9494a3118abf0a0abfef5e4522 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.UnsignedChannelUpdate_free(this.ptr);
                     }
                 }
-       public UnsignedChannelUpdate clone() {
-               number ret = bindings.UnsignedChannelUpdate_clone(this.ptr);
-               const ret_hu_conv: UnsignedChannelUpdate = new UnsignedChannelUpdate(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_chain_hash() {
                Uint8Array ret = bindings.UnsignedChannelUpdate_get_chain_hash(this.ptr);
                return ret;
@@ -97,6 +90,13 @@ import * as bindings from '../bindings' // TODO: figure out location
                bindings.UnsignedChannelUpdate_set_fee_proportional_millionths(this.ptr, val);
        }
 
+       public UnsignedChannelUpdate clone() {
+               number ret = bindings.UnsignedChannelUpdate_clone(this.ptr);
+               const ret_hu_conv: UnsignedChannelUpdate = new UnsignedChannelUpdate(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.UnsignedChannelUpdate_write(this.ptr);
                return ret;
index c874fc3be00e7297de7591cc485d372a67158739..bffe475a67e65f75b3252c1d375a5ad7ca8e6d25 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.UnsignedNodeAnnouncement_free(this.ptr);
                     }
                 }
-       public UnsignedNodeAnnouncement clone() {
-               number ret = bindings.UnsignedNodeAnnouncement_clone(this.ptr);
-               const ret_hu_conv: UnsignedNodeAnnouncement = new UnsignedNodeAnnouncement(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public NodeFeatures get_features() {
                number ret = bindings.UnsignedNodeAnnouncement_get_features(this.ptr);
                const ret_hu_conv: NodeFeatures = new NodeFeatures(null, ret);
@@ -35,14 +28,6 @@ import * as bindings from '../bindings' // TODO: figure out location
        public void set_features(NodeFeatures val) {
                bindings.UnsignedNodeAnnouncement_set_features(this.ptr, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(val);
-               // Due to rust's strict-ownership memory model, in some cases we need to "move"
-               // an object to pass exclusive ownership to the function being called.
-               // In most cases, we avoid this being visible in GC'd languages by cloning the object
-               // at the FFI layer, creating a new object which Rust can claim ownership of
-               // However, in some cases (eg here), there is no way to clone an object, and thus
-               // we actually have to pass full ownership to Rust.
-               // Thus, after this call, val is reset to null and is now a dummy object.
-               val.ptr = 0;
        }
 
        public number get_timestamp() {
@@ -82,10 +67,17 @@ import * as bindings from '../bindings' // TODO: figure out location
        }
 
        public void set_addresses(NetAddress[] val) {
-               bindings.UnsignedNodeAnnouncement_set_addresses(this.ptr, (number[])Arrays.stream(val).map(arr_conv_12 -> arr_conv_12.ptr).toArray());
+               bindings.UnsignedNodeAnnouncement_set_addresses(this.ptr, Arrays.stream(val).map(arr_conv_12 -> arr_conv_12.ptr).toArray(number[]::new));
                /* TODO 2 NetAddress  */;
        }
 
+       public UnsignedNodeAnnouncement clone() {
+               number ret = bindings.UnsignedNodeAnnouncement_clone(this.ptr);
+               const ret_hu_conv: UnsignedNodeAnnouncement = new UnsignedNodeAnnouncement(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.UnsignedNodeAnnouncement_write(this.ptr);
                return ret;
index 862a8763a093dc86e854521cdaf8293ad9f67c05..e4506a6b64a8f55d648596d2645217154cf97988 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.UpdateAddHTLC_free(this.ptr);
                     }
                 }
-       public UpdateAddHTLC clone() {
-               number ret = bindings.UpdateAddHTLC_clone(this.ptr);
-               const ret_hu_conv: UpdateAddHTLC = new UpdateAddHTLC(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_channel_id() {
                Uint8Array ret = bindings.UpdateAddHTLC_get_channel_id(this.ptr);
                return ret;
@@ -70,15 +63,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                bindings.UpdateAddHTLC_set_cltv_expiry(this.ptr, val);
        }
 
+       public UpdateAddHTLC clone() {
+               number ret = bindings.UpdateAddHTLC_clone(this.ptr);
+               const ret_hu_conv: UpdateAddHTLC = new UpdateAddHTLC(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.UpdateAddHTLC_write(this.ptr);
                return ret;
        }
 
-       public static UpdateAddHTLC constructor_read(Uint8Array ser) {
+       public static Result_UpdateAddHTLCDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.UpdateAddHTLC_read(ser);
-               const ret_hu_conv: UpdateAddHTLC = new UpdateAddHTLC(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_UpdateAddHTLCDecodeErrorZ ret_hu_conv = Result_UpdateAddHTLCDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index bf4a4763688188e7f05917c6ffa48df315b8bea9..fcca5e86a87c30815c153bdc5c732793b6f474d7 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.UpdateFailHTLC_free(this.ptr);
                     }
                 }
-       public UpdateFailHTLC clone() {
-               number ret = bindings.UpdateFailHTLC_clone(this.ptr);
-               const ret_hu_conv: UpdateFailHTLC = new UpdateFailHTLC(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_channel_id() {
                Uint8Array ret = bindings.UpdateFailHTLC_get_channel_id(this.ptr);
                return ret;
@@ -43,15 +36,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                bindings.UpdateFailHTLC_set_htlc_id(this.ptr, val);
        }
 
+       public UpdateFailHTLC clone() {
+               number ret = bindings.UpdateFailHTLC_clone(this.ptr);
+               const ret_hu_conv: UpdateFailHTLC = new UpdateFailHTLC(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.UpdateFailHTLC_write(this.ptr);
                return ret;
        }
 
-       public static UpdateFailHTLC constructor_read(Uint8Array ser) {
+       public static Result_UpdateFailHTLCDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.UpdateFailHTLC_read(ser);
-               const ret_hu_conv: UpdateFailHTLC = new UpdateFailHTLC(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_UpdateFailHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailHTLCDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 52b6a71d572b4caddfedd18c11f841d4db8342e1..6068882e57f1a79c7a80ccedb45c5b49401e780c 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.UpdateFailMalformedHTLC_free(this.ptr);
                     }
                 }
-       public UpdateFailMalformedHTLC clone() {
-               number ret = bindings.UpdateFailMalformedHTLC_clone(this.ptr);
-               const ret_hu_conv: UpdateFailMalformedHTLC = new UpdateFailMalformedHTLC(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_channel_id() {
                Uint8Array ret = bindings.UpdateFailMalformedHTLC_get_channel_id(this.ptr);
                return ret;
@@ -52,15 +45,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                bindings.UpdateFailMalformedHTLC_set_failure_code(this.ptr, val);
        }
 
+       public UpdateFailMalformedHTLC clone() {
+               number ret = bindings.UpdateFailMalformedHTLC_clone(this.ptr);
+               const ret_hu_conv: UpdateFailMalformedHTLC = new UpdateFailMalformedHTLC(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.UpdateFailMalformedHTLC_write(this.ptr);
                return ret;
        }
 
-       public static UpdateFailMalformedHTLC constructor_read(Uint8Array ser) {
+       public static Result_UpdateFailMalformedHTLCDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.UpdateFailMalformedHTLC_read(ser);
-               const ret_hu_conv: UpdateFailMalformedHTLC = new UpdateFailMalformedHTLC(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_UpdateFailMalformedHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailMalformedHTLCDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index b6b189ba7a1cb9bfb7b373e91bddb905d0e1275e..6ffed4250b308f36bc532ed7654690273649e462 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.UpdateFee_free(this.ptr);
                     }
                 }
-       public UpdateFee clone() {
-               number ret = bindings.UpdateFee_clone(this.ptr);
-               const ret_hu_conv: UpdateFee = new UpdateFee(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_channel_id() {
                Uint8Array ret = bindings.UpdateFee_get_channel_id(this.ptr);
                return ret;
@@ -50,15 +43,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public UpdateFee clone() {
+               number ret = bindings.UpdateFee_clone(this.ptr);
+               const ret_hu_conv: UpdateFee = new UpdateFee(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.UpdateFee_write(this.ptr);
                return ret;
        }
 
-       public static UpdateFee constructor_read(Uint8Array ser) {
+       public static Result_UpdateFeeDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.UpdateFee_read(ser);
-               const ret_hu_conv: UpdateFee = new UpdateFee(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_UpdateFeeDecodeErrorZ ret_hu_conv = Result_UpdateFeeDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 9e030d62da0edeb6b972fe4231d8cedd4638e680..02a0a7a5a588260416ddcc867186f2232c5c5fee 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.UpdateFulfillHTLC_free(this.ptr);
                     }
                 }
-       public UpdateFulfillHTLC clone() {
-               number ret = bindings.UpdateFulfillHTLC_clone(this.ptr);
-               const ret_hu_conv: UpdateFulfillHTLC = new UpdateFulfillHTLC(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_channel_id() {
                Uint8Array ret = bindings.UpdateFulfillHTLC_get_channel_id(this.ptr);
                return ret;
@@ -59,15 +52,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public UpdateFulfillHTLC clone() {
+               number ret = bindings.UpdateFulfillHTLC_clone(this.ptr);
+               const ret_hu_conv: UpdateFulfillHTLC = new UpdateFulfillHTLC(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.UpdateFulfillHTLC_write(this.ptr);
                return ret;
        }
 
-       public static UpdateFulfillHTLC constructor_read(Uint8Array ser) {
+       public static Result_UpdateFulfillHTLCDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.UpdateFulfillHTLC_read(ser);
-               const ret_hu_conv: UpdateFulfillHTLC = new UpdateFulfillHTLC(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_UpdateFulfillHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFulfillHTLCDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index a4cd7e8ce75a07a268ef7ce7dff1f3e789ef91bf..31f28d330d4fc832b971d4cc587157d8521ac7d7 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.UserConfig_free(this.ptr);
                     }
                 }
-       public UserConfig clone() {
-               number ret = bindings.UserConfig_clone(this.ptr);
-               const ret_hu_conv: UserConfig = new UserConfig(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public ChannelHandshakeConfig get_own_channel_config() {
                number ret = bindings.UserConfig_get_own_channel_config(this.ptr);
                const ret_hu_conv: ChannelHandshakeConfig = new ChannelHandshakeConfig(null, ret);
@@ -71,6 +64,13 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public UserConfig clone() {
+               number ret = bindings.UserConfig_clone(this.ptr);
+               const ret_hu_conv: UserConfig = new UserConfig(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public static UserConfig constructor_default() {
                number ret = bindings.UserConfig_default();
                const ret_hu_conv: UserConfig = new UserConfig(null, ret);
index aa56072770a3968c46421da01a17608c64def131..58c79b0438e0f010a436e9d7de46360ed0d1a6f8 100644 (file)
@@ -6,7 +6,7 @@
        }
 
        public static Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ constructor_BlockHashChannelManagerZ_read(Uint8Array ser, KeysInterface arg_keys_manager, FeeEstimator arg_fee_estimator, Watch arg_chain_monitor, BroadcasterInterface arg_tx_broadcaster, Logger arg_logger, UserConfig arg_default_config, ChannelMonitor[] arg_channel_monitors) {
-               number ret = bindings.C2Tuple_BlockHashChannelManagerZ_read(ser, bindings.ChannelManagerReadArgs_new(arg_keys_manager == null ? 0 : arg_keys_manager.ptr, arg_fee_estimator == null ? 0 : arg_fee_estimator.ptr, arg_chain_monitor == null ? 0 : arg_chain_monitor.ptr, arg_tx_broadcaster == null ? 0 : arg_tx_broadcaster.ptr, arg_logger == null ? 0 : arg_logger.ptr, arg_default_config == null ? 0 : arg_default_config.ptr & ~1, (number[])Arrays.stream(arg_channel_monitors).map(arr_conv_16 -> arr_conv_16 == null ? 0 : arr_conv_16.ptr & ~1).toArray()));
+               number ret = bindings.C2Tuple_BlockHashChannelManagerZ_read(ser, bindings.ChannelManagerReadArgs_new(arg_keys_manager == null ? 0 : arg_keys_manager.ptr, arg_fee_estimator == null ? 0 : arg_fee_estimator.ptr, arg_chain_monitor == null ? 0 : arg_chain_monitor.ptr, arg_tx_broadcaster == null ? 0 : arg_tx_broadcaster.ptr, arg_logger == null ? 0 : arg_logger.ptr, arg_default_config == null ? 0 : arg_default_config.ptr & ~1, Arrays.stream(arg_channel_monitors).map(arr_conv_16 -> arr_conv_16 == null ? 0 : arr_conv_16.ptr & ~1).toArray(number[]::new)));
                Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(arg_keys_manager);
                ret_hu_conv.ptrs_to.add(arg_fee_estimator);
index 269905b0a0b926e5668dd0faff44e0a8dd386033..34555536253a08e72017feab484d3b9fb7a2c95d 100644 (file)
@@ -54,7 +54,7 @@ import * as bindings from '../bindings' // TODO: figure out location
 
                                                release_pending_monitor_events (): number[] {
                                                        MonitorEvent[] ret = arg.release_pending_monitor_events();
-                               result: number[] = (number[])Arrays.stream(ret).map(arr_conv_14 -> arr_conv_14 == null ? 0 : arr_conv_14.ptr & ~1).toArray();
+                               result: number[] = Arrays.stream(ret).map(arr_conv_14 -> arr_conv_14 == null ? 0 : arr_conv_14.ptr & ~1).toArray(number[]::new);
                                /* TODO 2 MonitorEvent  */;
                                return result;
                                                },