]> git.bitcoin.ninja Git - ldk-java/commitdiff
Update auto-generated bindings
authorMatt Corallo <git@bluematt.me>
Mon, 27 Sep 2021 00:20:44 +0000 (00:20 +0000)
committerMatt Corallo <git@bluematt.me>
Mon, 27 Sep 2021 05:22:38 +0000 (05:22 +0000)
Memory leaks during tests are now:
    193 allocations remained for 1136846 bytes.

174 files changed:
src/main/java/org/ldk/impl/bindings.java
src/main/java/org/ldk/impl/version.class [new file with mode: 0644]
src/main/java/org/ldk/structs/ChannelManager.java
src/main/java/org/ldk/structs/ChannelMonitor.java
src/main/java/org/ldk/structs/Confirm.java
src/main/java/org/ldk/structs/CustomMessageHandler.java
src/main/java/org/ldk/structs/NetGraphMsgHandler.java
src/main/java/org/ldk/structs/NetworkGraph.java
src/main/java/org/ldk/structs/Option_C2Tuple_usizeTransactionZZ.java
src/main/java/org/ldk/structs/Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.java
src/main/java/org/ldk/structs/Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ.java
src/main/java/org/ldk/structs/Result_NetworkGraphDecodeErrorZ.java
src/main/java/org/ldk/structs/RoutingMessageHandler.java
src/main/java/org/ldk/structs/SignedRawInvoice.java
src/main/java/org/ldk/structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/ThreeTuple_RawInvoice_u832InvoiceSignatureZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/TwoTuple_BlockHashChannelManagerZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/TwoTuple_BlockHashChannelMonitorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/TwoTuple_OutPointScriptZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/TwoTuple_PaymentHashPaymentSecretZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/TwoTuple_PublicKeyTypeZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/TwoTuple_SignatureCVec_SignatureZZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/TwoTuple_u32ScriptZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/TwoTuple_u32TxOutZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/TwoTuple_usizeTransactionZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/UtilMethods.java
src/main/jni/bindings.c
src/main/jni/bindings.c.body
src/main/jni/org_ldk_impl_bindings.h
ts/bindings.c
ts/bindings.c.body
ts/bindings.ts
ts/structs/ChannelManager.ts
ts/structs/ChannelMonitor.ts
ts/structs/Confirm.ts
ts/structs/CustomMessageHandler.ts
ts/structs/NetGraphMsgHandler.ts
ts/structs/NetworkGraph.ts
ts/structs/Option_AccessZ.ts
ts/structs/Option_C2Tuple_usizeTransactionZZ.ts
ts/structs/Option_FilterZ.ts
ts/structs/Option_NetworkUpdateZ.ts
ts/structs/Option_TypeZ.ts
ts/structs/Option_u16Z.ts
ts/structs/Option_u32Z.ts
ts/structs/Option_u64Z.ts
ts/structs/Result_AcceptChannelDecodeErrorZ.ts
ts/structs/Result_AnnouncementSignaturesDecodeErrorZ.ts
ts/structs/Result_BuiltCommitmentTransactionDecodeErrorZ.ts
ts/structs/Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.ts
ts/structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.ts
ts/structs/Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.ts
ts/structs/Result_COption_TypeZDecodeErrorZ.ts
ts/structs/Result_CResult_NetAddressu8ZDecodeErrorZ.ts
ts/structs/Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ.ts
ts/structs/Result_CVec_CVec_u8ZZNoneZ.ts
ts/structs/Result_CVec_SignatureZNoneZ.ts
ts/structs/Result_CVec_u8ZPeerHandleErrorZ.ts
ts/structs/Result_ChannelAnnouncementDecodeErrorZ.ts
ts/structs/Result_ChannelConfigDecodeErrorZ.ts
ts/structs/Result_ChannelFeaturesDecodeErrorZ.ts
ts/structs/Result_ChannelInfoDecodeErrorZ.ts
ts/structs/Result_ChannelMonitorUpdateDecodeErrorZ.ts
ts/structs/Result_ChannelPublicKeysDecodeErrorZ.ts
ts/structs/Result_ChannelReestablishDecodeErrorZ.ts
ts/structs/Result_ChannelTransactionParametersDecodeErrorZ.ts
ts/structs/Result_ChannelUpdateDecodeErrorZ.ts
ts/structs/Result_ClosingSignedDecodeErrorZ.ts
ts/structs/Result_ClosingSignedFeeRangeDecodeErrorZ.ts
ts/structs/Result_CommitmentSignedDecodeErrorZ.ts
ts/structs/Result_CommitmentTransactionDecodeErrorZ.ts
ts/structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.ts
ts/structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.ts
ts/structs/Result_DescriptionCreationErrorZ.ts
ts/structs/Result_DirectionalChannelInfoDecodeErrorZ.ts
ts/structs/Result_ErrorMessageDecodeErrorZ.ts
ts/structs/Result_ExpiryTimeCreationErrorZ.ts
ts/structs/Result_FundingCreatedDecodeErrorZ.ts
ts/structs/Result_FundingLockedDecodeErrorZ.ts
ts/structs/Result_FundingSignedDecodeErrorZ.ts
ts/structs/Result_GossipTimestampFilterDecodeErrorZ.ts
ts/structs/Result_HTLCOutputInCommitmentDecodeErrorZ.ts
ts/structs/Result_HTLCUpdateDecodeErrorZ.ts
ts/structs/Result_HolderCommitmentTransactionDecodeErrorZ.ts
ts/structs/Result_InMemorySignerDecodeErrorZ.ts
ts/structs/Result_InitDecodeErrorZ.ts
ts/structs/Result_InitFeaturesDecodeErrorZ.ts
ts/structs/Result_InvoiceFeaturesDecodeErrorZ.ts
ts/structs/Result_InvoiceNoneZ.ts
ts/structs/Result_InvoiceSemanticErrorZ.ts
ts/structs/Result_InvoiceSignOrCreationErrorZ.ts
ts/structs/Result_NetAddressDecodeErrorZ.ts
ts/structs/Result_NetAddressu8Z.ts
ts/structs/Result_NetworkGraphDecodeErrorZ.ts
ts/structs/Result_NodeAnnouncementDecodeErrorZ.ts
ts/structs/Result_NodeAnnouncementInfoDecodeErrorZ.ts
ts/structs/Result_NodeFeaturesDecodeErrorZ.ts
ts/structs/Result_NodeInfoDecodeErrorZ.ts
ts/structs/Result_NoneAPIErrorZ.ts
ts/structs/Result_NoneChannelMonitorUpdateErrZ.ts
ts/structs/Result_NoneErrorZ.ts
ts/structs/Result_NoneLightningErrorZ.ts
ts/structs/Result_NoneMonitorUpdateErrorZ.ts
ts/structs/Result_NoneNoneZ.ts
ts/structs/Result_NonePaymentSendFailureZ.ts
ts/structs/Result_NonePeerHandleErrorZ.ts
ts/structs/Result_NoneSemanticErrorZ.ts
ts/structs/Result_OpenChannelDecodeErrorZ.ts
ts/structs/Result_OutPointDecodeErrorZ.ts
ts/structs/Result_PayeePubKeyErrorZ.ts
ts/structs/Result_PaymentHashPaymentSendFailureZ.ts
ts/structs/Result_PaymentSecretAPIErrorZ.ts
ts/structs/Result_PingDecodeErrorZ.ts
ts/structs/Result_PongDecodeErrorZ.ts
ts/structs/Result_PositiveTimestampCreationErrorZ.ts
ts/structs/Result_PrivateRouteCreationErrorZ.ts
ts/structs/Result_PublicKeyErrorZ.ts
ts/structs/Result_QueryChannelRangeDecodeErrorZ.ts
ts/structs/Result_QueryShortChannelIdsDecodeErrorZ.ts
ts/structs/Result_RecoverableSignatureNoneZ.ts
ts/structs/Result_ReplyChannelRangeDecodeErrorZ.ts
ts/structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.ts
ts/structs/Result_RevokeAndACKDecodeErrorZ.ts
ts/structs/Result_RouteDecodeErrorZ.ts
ts/structs/Result_RouteHopDecodeErrorZ.ts
ts/structs/Result_RouteLightningErrorZ.ts
ts/structs/Result_RoutingFeesDecodeErrorZ.ts
ts/structs/Result_SecretKeyErrorZ.ts
ts/structs/Result_ShutdownDecodeErrorZ.ts
ts/structs/Result_ShutdownScriptDecodeErrorZ.ts
ts/structs/Result_ShutdownScriptInvalidShutdownScriptZ.ts
ts/structs/Result_SiPrefixNoneZ.ts
ts/structs/Result_SignDecodeErrorZ.ts
ts/structs/Result_SignatureNoneZ.ts
ts/structs/Result_SignedRawInvoiceNoneZ.ts
ts/structs/Result_SpendableOutputDescriptorDecodeErrorZ.ts
ts/structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.ts
ts/structs/Result_StringErrorZ.ts
ts/structs/Result_TransactionNoneZ.ts
ts/structs/Result_TrustedClosingTransactionNoneZ.ts
ts/structs/Result_TrustedCommitmentTransactionNoneZ.ts
ts/structs/Result_TxCreationKeysDecodeErrorZ.ts
ts/structs/Result_TxCreationKeysErrorZ.ts
ts/structs/Result_TxOutAccessErrorZ.ts
ts/structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.ts
ts/structs/Result_UnsignedChannelUpdateDecodeErrorZ.ts
ts/structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.ts
ts/structs/Result_UpdateAddHTLCDecodeErrorZ.ts
ts/structs/Result_UpdateFailHTLCDecodeErrorZ.ts
ts/structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.ts
ts/structs/Result_UpdateFeeDecodeErrorZ.ts
ts/structs/Result_UpdateFulfillHTLCDecodeErrorZ.ts
ts/structs/Result_boolLightningErrorZ.ts
ts/structs/Result_boolPeerHandleErrorZ.ts
ts/structs/RoutingMessageHandler.ts
ts/structs/SignedRawInvoice.ts
ts/structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.ts [new file with mode: 0644]
ts/structs/ThreeTuple_RawInvoice_u832InvoiceSignatureZ.ts [new file with mode: 0644]
ts/structs/TwoTuple_BlockHashChannelManagerZ.ts [new file with mode: 0644]
ts/structs/TwoTuple_BlockHashChannelMonitorZ.ts [new file with mode: 0644]
ts/structs/TwoTuple_OutPointScriptZ.ts [new file with mode: 0644]
ts/structs/TwoTuple_PaymentHashPaymentSecretZ.ts [new file with mode: 0644]
ts/structs/TwoTuple_PublicKeyTypeZ.ts [new file with mode: 0644]
ts/structs/TwoTuple_SignatureCVec_SignatureZZ.ts [new file with mode: 0644]
ts/structs/TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ.ts [new file with mode: 0644]
ts/structs/TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ.ts [new file with mode: 0644]
ts/structs/TwoTuple_u32ScriptZ.ts [new file with mode: 0644]
ts/structs/TwoTuple_u32TxOutZ.ts [new file with mode: 0644]
ts/structs/TwoTuple_usizeTransactionZ.ts [new file with mode: 0644]
ts/structs/UtilMethods.ts

index bf41b875855cd9c42f6b0f7ee7a673264b148f54..0f53e68690a57f451d84b53f37ab41c45597176a 100644 (file)
@@ -1,5 +1,6 @@
 package org.ldk.impl;
 import org.ldk.enums.*;
+import org.ldk.impl.version;
 import java.io.File;
 import java.io.InputStream;
 import java.io.IOException;
@@ -31,7 +32,7 @@ public class bindings {
                                Path libpath = new File(tmpdir.toPath().toString(), "liblightningjni.so").toPath();
                                Files.copy(is, libpath, StandardCopyOption.REPLACE_EXISTING);
                                Runtime.getRuntime().load(libpath.toString());
-                       } catch (IOException e) {
+                       } catch (Exception e) {
                                System.err.println("Failed to load LDK native library.");
                                System.err.println("System LDK native library load failed with: " + system_load_err);
                                System.err.println("Resource-based LDK native library load failed with: " + e);
@@ -40,7 +41,7 @@ public class bindings {
                }
                init(java.lang.Enum.class, VecOrSliceDef.class);
                init_class_cache();
-               if (!get_lib_version_string().equals(get_ldk_java_bindings_version()))
+               if (!get_lib_version_string().equals(version.get_ldk_java_bindings_version()))
                        throw new IllegalArgumentException("Compiled LDK library and LDK class failes do not match");
                // Fetching the LDK versions from C also checks that the header and binaries match
                get_ldk_c_bindings_version();
@@ -50,9 +51,6 @@ public class bindings {
        static native void init_class_cache();
        static native String get_lib_version_string();
 
-       public static String get_ldk_java_bindings_version() {
-               return "v0.0.101.0";
-       }
        public static native String get_ldk_c_bindings_version();
        public static native String get_ldk_version();
 
@@ -177,8 +175,10 @@ public class bindings {
        public static native long LDKCResult_TxOutAccessErrorZ_get_ok(long arg);
        public static native AccessError LDKCResult_TxOutAccessErrorZ_get_err(long arg);
        public static native long LDKC2Tuple_usizeTransactionZ_new(long a, byte[] b);
-       public static native long LDKC2Tuple_usizeTransactionZ_get_a(long ptr);
-       public static native byte[] LDKC2Tuple_usizeTransactionZ_get_b(long ptr);
+       // uintptr_t C2Tuple_usizeTransactionZ_get_a(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR tuple);
+       public static native long C2Tuple_usizeTransactionZ_get_a(long tuple);
+       // struct LDKTransaction C2Tuple_usizeTransactionZ_get_b(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR tuple);
+       public static native byte[] C2Tuple_usizeTransactionZ_get_b(long tuple);
        public static native long LDKCVec_C2Tuple_usizeTransactionZZ_new(long[] elems);
        public static native boolean LDKCResult_NoneChannelMonitorUpdateErrZ_result_ok(long arg);
        public static native void LDKCResult_NoneChannelMonitorUpdateErrZ_get_ok(long arg);
@@ -410,8 +410,10 @@ public class bindings {
        public static native void LDKCResult_NoneNoneZ_get_ok(long arg);
        public static native void LDKCResult_NoneNoneZ_get_err(long arg);
        public static native long LDKC2Tuple_SignatureCVec_SignatureZZ_new(byte[] a, byte[][] b);
-       public static native byte[] LDKC2Tuple_SignatureCVec_SignatureZZ_get_a(long ptr);
-       public static native byte[][] LDKC2Tuple_SignatureCVec_SignatureZZ_get_b(long ptr);
+       // struct LDKSignature C2Tuple_SignatureCVec_SignatureZZ_get_a(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR tuple);
+       public static native byte[] C2Tuple_SignatureCVec_SignatureZZ_get_a(long tuple);
+       // struct LDKCVec_SignatureZ C2Tuple_SignatureCVec_SignatureZZ_get_b(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR tuple);
+       public static native byte[][] C2Tuple_SignatureCVec_SignatureZZ_get_b(long tuple);
        public static native boolean LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_result_ok(long arg);
        public static native long LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(long arg);
        public static native void LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(long arg);
@@ -486,8 +488,10 @@ public class bindings {
        public static native byte[] LDKCResult_TransactionNoneZ_get_ok(long arg);
        public static native void LDKCResult_TransactionNoneZ_get_err(long arg);
        public static native long LDKC2Tuple_BlockHashChannelMonitorZ_new(byte[] a, long b);
-       public static native byte[] LDKC2Tuple_BlockHashChannelMonitorZ_get_a(long ptr);
-       public static native long LDKC2Tuple_BlockHashChannelMonitorZ_get_b(long ptr);
+       // struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelMonitorZ_get_a(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR tuple);
+       public static native byte[] C2Tuple_BlockHashChannelMonitorZ_get_a(long tuple);
+       // struct LDKChannelMonitor C2Tuple_BlockHashChannelMonitorZ_get_b(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR tuple);
+       public static native long C2Tuple_BlockHashChannelMonitorZ_get_b(long tuple);
        public static native long LDKCVec_C2Tuple_BlockHashChannelMonitorZZ_new(long[] elems);
        public static native boolean LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_result_ok(long arg);
        public static native long[] LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_ok(long arg);
@@ -598,8 +602,10 @@ public class bindings {
        public static native LDKNetAddress LDKNetAddress_ref_from_ptr(long ptr);
        public static native long LDKCVec_NetAddressZ_new(long[] elems);
        public static native long LDKC2Tuple_PaymentHashPaymentSecretZ_new(byte[] a, byte[] b);
-       public static native byte[] LDKC2Tuple_PaymentHashPaymentSecretZ_get_a(long ptr);
-       public static native byte[] LDKC2Tuple_PaymentHashPaymentSecretZ_get_b(long ptr);
+       // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_a(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR tuple);
+       public static native byte[] C2Tuple_PaymentHashPaymentSecretZ_get_a(long tuple);
+       // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_b(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR tuple);
+       public static native byte[] C2Tuple_PaymentHashPaymentSecretZ_get_b(long tuple);
        public static native boolean LDKCResult_PaymentSecretAPIErrorZ_result_ok(long arg);
        public static native byte[] LDKCResult_PaymentSecretAPIErrorZ_get_ok(long arg);
        public static native long LDKCResult_PaymentSecretAPIErrorZ_get_err(long arg);
@@ -657,8 +663,10 @@ public class bindings {
        }
        public static native long LDKLogger_new(LDKLogger impl);
        public static native long LDKC2Tuple_BlockHashChannelManagerZ_new(byte[] a, long b);
-       public static native byte[] LDKC2Tuple_BlockHashChannelManagerZ_get_a(long ptr);
-       public static native long LDKC2Tuple_BlockHashChannelManagerZ_get_b(long ptr);
+       // struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelManagerZ_get_a(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR tuple);
+       public static native byte[] C2Tuple_BlockHashChannelManagerZ_get_a(long tuple);
+       // struct LDKChannelManager *C2Tuple_BlockHashChannelManagerZ_get_b(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR tuple);
+       public static native long C2Tuple_BlockHashChannelManagerZ_get_b(long tuple);
        public static native boolean LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_result_ok(long arg);
        public static native long LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(long arg);
        public static native long LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(long arg);
@@ -706,9 +714,12 @@ public class bindings {
        public static native long LDKCResult_SignedRawInvoiceNoneZ_get_ok(long arg);
        public static native void LDKCResult_SignedRawInvoiceNoneZ_get_err(long arg);
        public static native long LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_new(long a, byte[] b, long c);
-       public static native long LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(long ptr);
-       public static native byte[] LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(long ptr);
-       public static native long LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(long ptr);
+       // struct LDKRawInvoice C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple);
+       public static native long C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(long tuple);
+       // struct LDKThirtyTwoBytes C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple);
+       public static native byte[] C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(long tuple);
+       // struct LDKInvoiceSignature C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple);
+       public static native long C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(long tuple);
        public static native boolean LDKCResult_PayeePubKeyErrorZ_result_ok(long arg);
        public static native long LDKCResult_PayeePubKeyErrorZ_get_ok(long arg);
        public static native Secp256k1Error LDKCResult_PayeePubKeyErrorZ_get_err(long arg);
@@ -744,15 +755,21 @@ public class bindings {
        public static native void LDKCResult_NoneMonitorUpdateErrorZ_get_ok(long arg);
        public static native long LDKCResult_NoneMonitorUpdateErrorZ_get_err(long arg);
        public static native long LDKC2Tuple_OutPointScriptZ_new(long a, byte[] b);
-       public static native long LDKC2Tuple_OutPointScriptZ_get_a(long ptr);
-       public static native byte[] LDKC2Tuple_OutPointScriptZ_get_b(long ptr);
+       // struct LDKOutPoint C2Tuple_OutPointScriptZ_get_a(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR tuple);
+       public static native long C2Tuple_OutPointScriptZ_get_a(long tuple);
+       // struct LDKCVec_u8Z C2Tuple_OutPointScriptZ_get_b(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR tuple);
+       public static native byte[] C2Tuple_OutPointScriptZ_get_b(long tuple);
        public static native long LDKC2Tuple_u32ScriptZ_new(int a, byte[] b);
-       public static native int LDKC2Tuple_u32ScriptZ_get_a(long ptr);
-       public static native byte[] LDKC2Tuple_u32ScriptZ_get_b(long ptr);
+       // uint32_t C2Tuple_u32ScriptZ_get_a(LDKC2Tuple_u32ScriptZ *NONNULL_PTR tuple);
+       public static native int C2Tuple_u32ScriptZ_get_a(long tuple);
+       // struct LDKCVec_u8Z C2Tuple_u32ScriptZ_get_b(LDKC2Tuple_u32ScriptZ *NONNULL_PTR tuple);
+       public static native byte[] C2Tuple_u32ScriptZ_get_b(long tuple);
        public static native long LDKCVec_C2Tuple_u32ScriptZZ_new(long[] elems);
        public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(byte[] a, long[] b);
-       public static native byte[] LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(long ptr);
-       public static native long[] LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(long ptr);
+       // struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR tuple);
+       public static native byte[] C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(long tuple);
+       // struct LDKCVec_C2Tuple_u32ScriptZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR tuple);
+       public static native long[] C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(long tuple);
        public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_new(long[] elems);
        public static class LDKPaymentPurpose {
                private LDKPaymentPurpose() {}
@@ -850,12 +867,16 @@ public class bindings {
        public static native LDKEvent LDKEvent_ref_from_ptr(long ptr);
        public static native long LDKCVec_EventZ_new(long[] elems);
        public static native long LDKC2Tuple_u32TxOutZ_new(int a, long b);
-       public static native int LDKC2Tuple_u32TxOutZ_get_a(long ptr);
-       public static native long LDKC2Tuple_u32TxOutZ_get_b(long ptr);
+       // uint32_t C2Tuple_u32TxOutZ_get_a(LDKC2Tuple_u32TxOutZ *NONNULL_PTR tuple);
+       public static native int C2Tuple_u32TxOutZ_get_a(long tuple);
+       // struct LDKTxOut C2Tuple_u32TxOutZ_get_b(LDKC2Tuple_u32TxOutZ *NONNULL_PTR tuple);
+       public static native long C2Tuple_u32TxOutZ_get_b(long tuple);
        public static native long LDKCVec_C2Tuple_u32TxOutZZ_new(long[] elems);
        public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(byte[] a, long[] b);
-       public static native byte[] LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(long ptr);
-       public static native long[] LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(long ptr);
+       // struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR tuple);
+       public static native byte[] C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(long tuple);
+       // struct LDKCVec_C2Tuple_u32TxOutZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR tuple);
+       public static native long[] C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(long tuple);
        public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_new(long[] elems);
        public static class LDKBalance {
                private LDKBalance() {}
@@ -890,16 +911,21 @@ public class bindings {
        public static native void LDKCResult_NoneLightningErrorZ_get_ok(long arg);
        public static native long LDKCResult_NoneLightningErrorZ_get_err(long arg);
        public static native long LDKC2Tuple_PublicKeyTypeZ_new(byte[] a, long b);
-       public static native byte[] LDKC2Tuple_PublicKeyTypeZ_get_a(long ptr);
-       public static native long LDKC2Tuple_PublicKeyTypeZ_get_b(long ptr);
+       // struct LDKPublicKey C2Tuple_PublicKeyTypeZ_get_a(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR tuple);
+       public static native byte[] C2Tuple_PublicKeyTypeZ_get_a(long tuple);
+       // struct LDKType C2Tuple_PublicKeyTypeZ_get_b(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR tuple);
+       public static native long C2Tuple_PublicKeyTypeZ_get_b(long tuple);
        public static native long LDKCVec_C2Tuple_PublicKeyTypeZZ_new(long[] elems);
        public static native boolean LDKCResult_boolLightningErrorZ_result_ok(long arg);
        public static native boolean LDKCResult_boolLightningErrorZ_get_ok(long arg);
        public static native long LDKCResult_boolLightningErrorZ_get_err(long arg);
        public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(long a, long b, long c);
-       public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(long ptr);
-       public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(long ptr);
-       public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(long ptr);
+       // struct LDKChannelAnnouncement C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple);
+       public static native long C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(long tuple);
+       // struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple);
+       public static native long C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(long tuple);
+       // struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple);
+       public static native long C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(long tuple);
        public static native long LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new(long[] elems);
        public static native long LDKCVec_NodeAnnouncementZ_new(long[] elems);
        public static native boolean LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok(long arg);
@@ -1663,6 +1689,8 @@ public class bindings {
        public static native void CResult_TransactionNoneZ_free(long _res);
        // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_clone(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR orig);
        public static native long CResult_TransactionNoneZ_clone(long orig);
+       // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_clone(const struct LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR orig);
+       public static native long C2Tuple_BlockHashChannelMonitorZ_clone(long orig);
        // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
        public static native long C2Tuple_BlockHashChannelMonitorZ_new(byte[] a, long b);
        // void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res);
@@ -1675,6 +1703,8 @@ public class bindings {
        public static native long CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(IOError e);
        // void CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ _res);
        public static native void CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(long _res);
+       // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(const struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ *NONNULL_PTR orig);
+       public static native long CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(long orig);
        // struct LDKCOption_u16Z COption_u16Z_some(uint16_t o);
        public static native long COption_u16Z_some(short o);
        // struct LDKCOption_u16Z COption_u16Z_none(void);
@@ -1939,6 +1969,8 @@ public class bindings {
        public static native long CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(long e);
        // void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res);
        public static native void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(long _res);
+       // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(const struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(long orig);
        // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void);
        public static native long CResult_NoneLightningErrorZ_ok();
        // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_err(struct LDKLightningError e);
@@ -2053,6 +2085,8 @@ public class bindings {
        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 LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_clone(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_NetworkGraphDecodeErrorZ_clone(long orig);
        // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_ok(struct LDKNetAddress o);
        public static native long CResult_NetAddressu8Z_ok(long o);
        // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_err(uint8_t e);
@@ -4643,6 +4677,8 @@ public class bindings {
        public static native long get_route(byte[] our_node_id, long network, byte[] payee, long payee_features, long[] first_hops, long[] last_hops, long final_value_msat, int final_cltv, long logger);
        // void NetworkGraph_free(struct LDKNetworkGraph this_obj);
        public static native void NetworkGraph_free(long this_obj);
+       // struct LDKNetworkGraph NetworkGraph_clone(const struct LDKNetworkGraph *NONNULL_PTR orig);
+       public static native long NetworkGraph_clone(long orig);
        // void ReadOnlyNetworkGraph_free(struct LDKReadOnlyNetworkGraph this_obj);
        public static native void ReadOnlyNetworkGraph_free(long this_obj);
        // void NetworkUpdate_free(struct LDKNetworkUpdate this_ptr);
diff --git a/src/main/java/org/ldk/impl/version.class b/src/main/java/org/ldk/impl/version.class
new file mode 100644 (file)
index 0000000..412902e
Binary files /dev/null and b/src/main/java/org/ldk/impl/version.class differ
index 6f5e447ecef0482a84a5bb4860cebe280407a38b..8edf767a255ae9c9d53643d665247a3fb3a97f02 100644 (file)
@@ -473,15 +473,12 @@ public class ChannelManager extends CommonBase {
         * [`PaymentReceived::payment_preimage`]: events::Event::PaymentReceived::payment_preimage
         * [`create_inbound_payment_for_hash`]: Self::create_inbound_payment_for_hash
         */
-       public TwoTuple<byte[], byte[]> create_inbound_payment(Option_u64Z min_value_msat, int invoice_expiry_delta_secs, long user_payment_id) {
+       public TwoTuple_PaymentHashPaymentSecretZ create_inbound_payment(Option_u64Z min_value_msat, int invoice_expiry_delta_secs, long user_payment_id) {
                long ret = bindings.ChannelManager_create_inbound_payment(this.ptr, min_value_msat.ptr, invoice_expiry_delta_secs, user_payment_id);
                if (ret < 1024) { return null; }
-               byte[] ret_a = bindings.LDKC2Tuple_PaymentHashPaymentSecretZ_get_a(ret);
-               byte[] ret_b = bindings.LDKC2Tuple_PaymentHashPaymentSecretZ_get_b(ret);
-               TwoTuple<byte[], byte[]> ret_conv = new TwoTuple<byte[], byte[]>(ret_a, ret_b, () -> {
-                       bindings.C2Tuple_PaymentHashPaymentSecretZ_free(ret);
-               });
-               return ret_conv;
+               TwoTuple_PaymentHashPaymentSecretZ ret_hu_conv = new TwoTuple_PaymentHashPaymentSecretZ(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
        }
 
        /**
index df8456c3bdb2b9f092775ddff8b7cb305d146fad..eff5feb9bf8faa49ad29e3b8940a842b5804a7a2 100644 (file)
@@ -82,46 +82,28 @@ public class ChannelMonitor extends CommonBase {
        /**
         * Gets the funding transaction outpoint of the channel this ChannelMonitor is monitoring for.
         */
-       public TwoTuple<OutPoint, byte[]> get_funding_txo() {
+       public TwoTuple_OutPointScriptZ get_funding_txo() {
                long ret = bindings.ChannelMonitor_get_funding_txo(this.ptr);
                if (ret < 1024) { return null; }
-               long ret_a = bindings.LDKC2Tuple_OutPointScriptZ_get_a(ret);
-               OutPoint ret_a_hu_conv = new OutPoint(null, ret_a);
-               ret_a_hu_conv.ptrs_to.add(this);;
-               byte[] ret_b = bindings.LDKC2Tuple_OutPointScriptZ_get_b(ret);
-               TwoTuple<OutPoint, byte[]> ret_conv = new TwoTuple<OutPoint, byte[]>(ret_a_hu_conv, ret_b, () -> {
-                       bindings.C2Tuple_OutPointScriptZ_free(ret);
-               });
-               ret_a_hu_conv.ptrs_to.add(ret_conv);
-               return ret_conv;
+               TwoTuple_OutPointScriptZ ret_hu_conv = new TwoTuple_OutPointScriptZ(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
        }
 
        /**
         * Gets a list of txids, with their output scripts (in the order they appear in the
         * transaction), which we must learn about spends of via block_connected().
         */
-       public TwoTuple<byte[], TwoTuple<Integer, byte[]>[]>[] get_outputs_to_watch() {
+       public TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ[] get_outputs_to_watch() {
                long[] ret = bindings.ChannelMonitor_get_outputs_to_watch(this.ptr);
-               TwoTuple<byte[], TwoTuple<Integer, byte[]>[]>[] ret_conv_47_arr = new TwoTuple[ret.length];
-               for (int v = 0; v < ret.length; v++) {
-                       long ret_conv_47 = ret[v];
-                       byte[] ret_conv_47_a = bindings.LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(ret_conv_47);
-                       long[] ret_conv_47_b = bindings.LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(ret_conv_47);
-                       TwoTuple<Integer, byte[]>[] ret_conv_47_b_conv_27_arr = new TwoTuple[ret_conv_47_b.length];
-                       for (int b = 0; b < ret_conv_47_b.length; b++) {
-                               long ret_conv_47_b_conv_27 = ret_conv_47_b[b];
-                               int ret_conv_47_b_conv_27_a = bindings.LDKC2Tuple_u32ScriptZ_get_a(ret_conv_47_b_conv_27);
-                               byte[] ret_conv_47_b_conv_27_b = bindings.LDKC2Tuple_u32ScriptZ_get_b(ret_conv_47_b_conv_27);
-                               TwoTuple<Integer, byte[]> ret_conv_47_b_conv_27_conv = new TwoTuple<Integer, byte[]>(ret_conv_47_b_conv_27_a, ret_conv_47_b_conv_27_b, () -> {
-                                       bindings.C2Tuple_u32ScriptZ_free(ret_conv_47_b_conv_27);
-                               });
-                               ret_conv_47_b_conv_27_arr[b] = ret_conv_47_b_conv_27_conv;
-                       };
-                       TwoTuple<byte[], TwoTuple<Integer, byte[]>[]> ret_conv_47_conv = new TwoTuple<byte[], TwoTuple<Integer, byte[]>[]>(ret_conv_47_a, ret_conv_47_b_conv_27_arr);
-                       // Warning: We may not free the C tuple object!
-                       ret_conv_47_arr[v] = ret_conv_47_conv;
+               TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ[] ret_conv_40_arr = new TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ[ret.length];
+               for (int o = 0; o < ret.length; o++) {
+                       long ret_conv_40 = ret[o];
+                       TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ ret_conv_40_hu_conv = new TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ(null, ret_conv_40);
+                       ret_conv_40_hu_conv.ptrs_to.add(this);
+                       ret_conv_40_arr[o] = ret_conv_40_hu_conv;
                }
-               return ret_conv_47_arr;
+               return ret_conv_40_arr;
        }
 
        /**
@@ -200,33 +182,19 @@ public class ChannelMonitor extends CommonBase {
         * 
         * [`get_outputs_to_watch`]: #method.get_outputs_to_watch
         */
-       public TwoTuple<byte[], TwoTuple<Integer, TxOut>[]>[] block_connected(byte[] header, TwoTuple<Long, byte[]>[] txdata, int height, BroadcasterInterface broadcaster, FeeEstimator fee_estimator, Logger logger) {
-               long[] ret = bindings.ChannelMonitor_block_connected(this.ptr, header, txdata != null ? Arrays.stream(txdata).mapToLong(txdata_conv_24 -> bindings.C2Tuple_usizeTransactionZ_new(txdata_conv_24.a, txdata_conv_24.b)).toArray() : null, height, broadcaster == null ? 0 : broadcaster.ptr, fee_estimator == null ? 0 : fee_estimator.ptr, logger == null ? 0 : logger.ptr);
-               TwoTuple<byte[], TwoTuple<Integer, TxOut>[]>[] ret_conv_46_arr = new TwoTuple[ret.length];
-               for (int u = 0; u < ret.length; u++) {
-                       long ret_conv_46 = ret[u];
-                       byte[] ret_conv_46_a = bindings.LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(ret_conv_46);
-                       long[] ret_conv_46_b = bindings.LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(ret_conv_46);
-                       TwoTuple<Integer, TxOut>[] ret_conv_46_b_conv_26_arr = new TwoTuple[ret_conv_46_b.length];
-                       for (int a = 0; a < ret_conv_46_b.length; a++) {
-                               long ret_conv_46_b_conv_26 = ret_conv_46_b[a];
-                               int ret_conv_46_b_conv_26_a = bindings.LDKC2Tuple_u32TxOutZ_get_a(ret_conv_46_b_conv_26);
-                               long ret_conv_46_b_conv_26_b = bindings.TxOut_clone(bindings.LDKC2Tuple_u32TxOutZ_get_b(ret_conv_46_b_conv_26));
-                               TxOut ret_conv_46_b_conv_26_b_conv = new TxOut(null, ret_conv_46_b_conv_26_b);;
-                               TwoTuple<Integer, TxOut> ret_conv_46_b_conv_26_conv = new TwoTuple<Integer, TxOut>(ret_conv_46_b_conv_26_a, ret_conv_46_b_conv_26_b_conv, () -> {
-                                       bindings.C2Tuple_u32TxOutZ_free(ret_conv_46_b_conv_26);
-                               });
-                               ret_conv_46_b_conv_26_b_conv.ptrs_to.add(ret_conv_46_b_conv_26_conv);
-                               ret_conv_46_b_conv_26_arr[a] = ret_conv_46_b_conv_26_conv;
-                       };
-                       TwoTuple<byte[], TwoTuple<Integer, TxOut>[]> ret_conv_46_conv = new TwoTuple<byte[], TwoTuple<Integer, TxOut>[]>(ret_conv_46_a, ret_conv_46_b_conv_26_arr);
-                       // Warning: We may not free the C tuple object!
-                       ret_conv_46_arr[u] = ret_conv_46_conv;
+       public TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ[] block_connected(byte[] header, TwoTuple_usizeTransactionZ[] txdata, int height, BroadcasterInterface broadcaster, FeeEstimator fee_estimator, Logger logger) {
+               long[] ret = bindings.ChannelMonitor_block_connected(this.ptr, header, txdata != null ? Arrays.stream(txdata).mapToLong(txdata_conv_28 -> txdata_conv_28 != null ? txdata_conv_28.ptr : 0).toArray() : null, height, broadcaster == null ? 0 : broadcaster.ptr, fee_estimator == null ? 0 : fee_estimator.ptr, logger == null ? 0 : logger.ptr);
+               TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ[] ret_conv_39_arr = new TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ[ret.length];
+               for (int n = 0; n < ret.length; n++) {
+                       long ret_conv_39 = ret[n];
+                       TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ ret_conv_39_hu_conv = new TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ(null, ret_conv_39);
+                       ret_conv_39_hu_conv.ptrs_to.add(this);
+                       ret_conv_39_arr[n] = ret_conv_39_hu_conv;
                }
                this.ptrs_to.add(broadcaster);
                this.ptrs_to.add(fee_estimator);
                this.ptrs_to.add(logger);
-               return ret_conv_46_arr;
+               return ret_conv_39_arr;
        }
 
        /**
@@ -249,33 +217,19 @@ public class ChannelMonitor extends CommonBase {
         * 
         * [`block_connected`]: Self::block_connected
         */
-       public TwoTuple<byte[], TwoTuple<Integer, TxOut>[]>[] transactions_confirmed(byte[] header, TwoTuple<Long, byte[]>[] txdata, int height, BroadcasterInterface broadcaster, FeeEstimator fee_estimator, Logger logger) {
-               long[] ret = bindings.ChannelMonitor_transactions_confirmed(this.ptr, header, txdata != null ? Arrays.stream(txdata).mapToLong(txdata_conv_24 -> bindings.C2Tuple_usizeTransactionZ_new(txdata_conv_24.a, txdata_conv_24.b)).toArray() : null, height, broadcaster == null ? 0 : broadcaster.ptr, fee_estimator == null ? 0 : fee_estimator.ptr, logger == null ? 0 : logger.ptr);
-               TwoTuple<byte[], TwoTuple<Integer, TxOut>[]>[] ret_conv_46_arr = new TwoTuple[ret.length];
-               for (int u = 0; u < ret.length; u++) {
-                       long ret_conv_46 = ret[u];
-                       byte[] ret_conv_46_a = bindings.LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(ret_conv_46);
-                       long[] ret_conv_46_b = bindings.LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(ret_conv_46);
-                       TwoTuple<Integer, TxOut>[] ret_conv_46_b_conv_26_arr = new TwoTuple[ret_conv_46_b.length];
-                       for (int a = 0; a < ret_conv_46_b.length; a++) {
-                               long ret_conv_46_b_conv_26 = ret_conv_46_b[a];
-                               int ret_conv_46_b_conv_26_a = bindings.LDKC2Tuple_u32TxOutZ_get_a(ret_conv_46_b_conv_26);
-                               long ret_conv_46_b_conv_26_b = bindings.TxOut_clone(bindings.LDKC2Tuple_u32TxOutZ_get_b(ret_conv_46_b_conv_26));
-                               TxOut ret_conv_46_b_conv_26_b_conv = new TxOut(null, ret_conv_46_b_conv_26_b);;
-                               TwoTuple<Integer, TxOut> ret_conv_46_b_conv_26_conv = new TwoTuple<Integer, TxOut>(ret_conv_46_b_conv_26_a, ret_conv_46_b_conv_26_b_conv, () -> {
-                                       bindings.C2Tuple_u32TxOutZ_free(ret_conv_46_b_conv_26);
-                               });
-                               ret_conv_46_b_conv_26_b_conv.ptrs_to.add(ret_conv_46_b_conv_26_conv);
-                               ret_conv_46_b_conv_26_arr[a] = ret_conv_46_b_conv_26_conv;
-                       };
-                       TwoTuple<byte[], TwoTuple<Integer, TxOut>[]> ret_conv_46_conv = new TwoTuple<byte[], TwoTuple<Integer, TxOut>[]>(ret_conv_46_a, ret_conv_46_b_conv_26_arr);
-                       // Warning: We may not free the C tuple object!
-                       ret_conv_46_arr[u] = ret_conv_46_conv;
+       public TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ[] transactions_confirmed(byte[] header, TwoTuple_usizeTransactionZ[] txdata, int height, BroadcasterInterface broadcaster, FeeEstimator fee_estimator, Logger logger) {
+               long[] ret = bindings.ChannelMonitor_transactions_confirmed(this.ptr, header, txdata != null ? Arrays.stream(txdata).mapToLong(txdata_conv_28 -> txdata_conv_28 != null ? txdata_conv_28.ptr : 0).toArray() : null, height, broadcaster == null ? 0 : broadcaster.ptr, fee_estimator == null ? 0 : fee_estimator.ptr, logger == null ? 0 : logger.ptr);
+               TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ[] ret_conv_39_arr = new TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ[ret.length];
+               for (int n = 0; n < ret.length; n++) {
+                       long ret_conv_39 = ret[n];
+                       TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ ret_conv_39_hu_conv = new TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ(null, ret_conv_39);
+                       ret_conv_39_hu_conv.ptrs_to.add(this);
+                       ret_conv_39_arr[n] = ret_conv_39_hu_conv;
                }
                this.ptrs_to.add(broadcaster);
                this.ptrs_to.add(fee_estimator);
                this.ptrs_to.add(logger);
-               return ret_conv_46_arr;
+               return ret_conv_39_arr;
        }
 
        /**
@@ -302,33 +256,19 @@ public class ChannelMonitor extends CommonBase {
         * 
         * [`block_connected`]: Self::block_connected
         */
-       public TwoTuple<byte[], TwoTuple<Integer, TxOut>[]>[] best_block_updated(byte[] header, int height, BroadcasterInterface broadcaster, FeeEstimator fee_estimator, Logger logger) {
+       public TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ[] best_block_updated(byte[] header, int height, BroadcasterInterface broadcaster, FeeEstimator fee_estimator, Logger logger) {
                long[] ret = bindings.ChannelMonitor_best_block_updated(this.ptr, header, height, broadcaster == null ? 0 : broadcaster.ptr, fee_estimator == null ? 0 : fee_estimator.ptr, logger == null ? 0 : logger.ptr);
-               TwoTuple<byte[], TwoTuple<Integer, TxOut>[]>[] ret_conv_46_arr = new TwoTuple[ret.length];
-               for (int u = 0; u < ret.length; u++) {
-                       long ret_conv_46 = ret[u];
-                       byte[] ret_conv_46_a = bindings.LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(ret_conv_46);
-                       long[] ret_conv_46_b = bindings.LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(ret_conv_46);
-                       TwoTuple<Integer, TxOut>[] ret_conv_46_b_conv_26_arr = new TwoTuple[ret_conv_46_b.length];
-                       for (int a = 0; a < ret_conv_46_b.length; a++) {
-                               long ret_conv_46_b_conv_26 = ret_conv_46_b[a];
-                               int ret_conv_46_b_conv_26_a = bindings.LDKC2Tuple_u32TxOutZ_get_a(ret_conv_46_b_conv_26);
-                               long ret_conv_46_b_conv_26_b = bindings.TxOut_clone(bindings.LDKC2Tuple_u32TxOutZ_get_b(ret_conv_46_b_conv_26));
-                               TxOut ret_conv_46_b_conv_26_b_conv = new TxOut(null, ret_conv_46_b_conv_26_b);;
-                               TwoTuple<Integer, TxOut> ret_conv_46_b_conv_26_conv = new TwoTuple<Integer, TxOut>(ret_conv_46_b_conv_26_a, ret_conv_46_b_conv_26_b_conv, () -> {
-                                       bindings.C2Tuple_u32TxOutZ_free(ret_conv_46_b_conv_26);
-                               });
-                               ret_conv_46_b_conv_26_b_conv.ptrs_to.add(ret_conv_46_b_conv_26_conv);
-                               ret_conv_46_b_conv_26_arr[a] = ret_conv_46_b_conv_26_conv;
-                       };
-                       TwoTuple<byte[], TwoTuple<Integer, TxOut>[]> ret_conv_46_conv = new TwoTuple<byte[], TwoTuple<Integer, TxOut>[]>(ret_conv_46_a, ret_conv_46_b_conv_26_arr);
-                       // Warning: We may not free the C tuple object!
-                       ret_conv_46_arr[u] = ret_conv_46_conv;
+               TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ[] ret_conv_39_arr = new TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ[ret.length];
+               for (int n = 0; n < ret.length; n++) {
+                       long ret_conv_39 = ret[n];
+                       TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ ret_conv_39_hu_conv = new TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ(null, ret_conv_39);
+                       ret_conv_39_hu_conv.ptrs_to.add(this);
+                       ret_conv_39_arr[n] = ret_conv_39_hu_conv;
                }
                this.ptrs_to.add(broadcaster);
                this.ptrs_to.add(fee_estimator);
                this.ptrs_to.add(logger);
-               return ret_conv_46_arr;
+               return ret_conv_39_arr;
        }
 
        /**
index fed45b0e396174ade795a32251bea65df082b4e7..6f1ab54441b0a4c9385275c634b84c2f7cd79edf 100644 (file)
@@ -70,7 +70,7 @@ public class Confirm extends CommonBase {
                 * [chain order]: Confirm#Order
                 * [`best_block_updated`]: Self::best_block_updated
                 */
-               void transactions_confirmed(byte[] header, TwoTuple<Long, byte[]>[] txdata, int height);
+               void transactions_confirmed(byte[] header, TwoTuple_usizeTransactionZ[] txdata, int height);
                /**
                 * Processes a transaction that is no longer confirmed as result of a chain reorganization.
                 * 
@@ -111,17 +111,14 @@ public class Confirm extends CommonBase {
                final LDKConfirmHolder impl_holder = new LDKConfirmHolder();
                impl_holder.held = new Confirm(new bindings.LDKConfirm() {
                        @Override public void transactions_confirmed(byte[] header, long[] txdata, int height) {
-                               TwoTuple<Long, byte[]>[] txdata_conv_24_arr = new TwoTuple[txdata.length];
-                               for (int y = 0; y < txdata.length; y++) {
-                                       long txdata_conv_24 = txdata[y];
-                                       long txdata_conv_24_a = bindings.LDKC2Tuple_usizeTransactionZ_get_a(txdata_conv_24);
-                                       byte[] txdata_conv_24_b = bindings.LDKC2Tuple_usizeTransactionZ_get_b(txdata_conv_24);
-                                       TwoTuple<Long, byte[]> txdata_conv_24_conv = new TwoTuple<Long, byte[]>(txdata_conv_24_a, txdata_conv_24_b, () -> {
-                                               bindings.C2Tuple_usizeTransactionZ_free(txdata_conv_24);
-                                       });
-                                       txdata_conv_24_arr[y] = txdata_conv_24_conv;
+                               TwoTuple_usizeTransactionZ[] txdata_conv_28_arr = new TwoTuple_usizeTransactionZ[txdata.length];
+                               for (int c = 0; c < txdata.length; c++) {
+                                       long txdata_conv_28 = txdata[c];
+                                       TwoTuple_usizeTransactionZ txdata_conv_28_hu_conv = new TwoTuple_usizeTransactionZ(null, txdata_conv_28);
+                                       txdata_conv_28_hu_conv.ptrs_to.add(this);
+                                       txdata_conv_28_arr[c] = txdata_conv_28_hu_conv;
                                }
-                               arg.transactions_confirmed(header, txdata_conv_24_arr, height);
+                               arg.transactions_confirmed(header, txdata_conv_28_arr, height);
                        }
                        @Override public void transaction_unconfirmed(byte[] txid) {
                                arg.transaction_unconfirmed(txid);
@@ -151,8 +148,8 @@ public class Confirm extends CommonBase {
         * [chain order]: Confirm#Order
         * [`best_block_updated`]: Self::best_block_updated
         */
-       public void transactions_confirmed(byte[] header, TwoTuple<Long, byte[]>[] txdata, int height) {
-               bindings.Confirm_transactions_confirmed(this.ptr, header, txdata != null ? Arrays.stream(txdata).mapToLong(txdata_conv_24 -> bindings.C2Tuple_usizeTransactionZ_new(txdata_conv_24.a, txdata_conv_24.b)).toArray() : null, height);
+       public void transactions_confirmed(byte[] header, TwoTuple_usizeTransactionZ[] txdata, int height) {
+               bindings.Confirm_transactions_confirmed(this.ptr, header, txdata != null ? Arrays.stream(txdata).mapToLong(txdata_conv_28 -> txdata_conv_28 != null ? txdata_conv_28.ptr : 0).toArray() : null, height);
        }
 
        /**
index fe1a2bb1e752ca85d473e411ea26c59e83006041..5c1a4fab9159258dac2db9db6753faa189d73649 100644 (file)
@@ -36,7 +36,7 @@ public class CustomMessageHandler extends CommonBase {
                 * correspond to the intended recipients node ids. If no connection to one of the
                 * specified node does not exist, the message is simply not sent to it.
                 */
-               TwoTuple<byte[], Type>[] get_and_clear_pending_msg();
+               TwoTuple_PublicKeyTypeZ[] get_and_clear_pending_msg();
        }
        private static class LDKCustomMessageHandlerHolder { CustomMessageHandler held; }
        public static CustomMessageHandler new_impl(CustomMessageHandlerInterface arg, CustomMessageReader.CustomMessageReaderInterface CustomMessageReader_impl) {
@@ -50,9 +50,8 @@ public class CustomMessageHandler extends CommonBase {
                                return result;
                        }
                        @Override public long[] get_and_clear_pending_msg() {
-                               TwoTuple<byte[], Type>[] ret = arg.get_and_clear_pending_msg();
-                               long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_24 -> bindings.C2Tuple_PublicKeyTypeZ_new(ret_conv_24.a, ret_conv_24.b == null ? 0 : ret_conv_24.b.ptr)).toArray() : null;
-                               for (TwoTuple<byte[], Type> ret_conv_24: ret) { impl_holder.held.ptrs_to.add(ret_conv_24.b); };
+                               TwoTuple_PublicKeyTypeZ[] ret = arg.get_and_clear_pending_msg();
+                               long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_25 -> ret_conv_25 != null ? ret_conv_25.ptr : 0).toArray() : null;
                                return result;
                        }
                }, CustomMessageReader.new_impl(CustomMessageReader_impl).bindings_instance);
@@ -86,22 +85,16 @@ public class CustomMessageHandler extends CommonBase {
         * correspond to the intended recipients node ids. If no connection to one of the
         * specified node does not exist, the message is simply not sent to it.
         */
-       public TwoTuple<byte[], Type>[] get_and_clear_pending_msg() {
+       public TwoTuple_PublicKeyTypeZ[] get_and_clear_pending_msg() {
                long[] ret = bindings.CustomMessageHandler_get_and_clear_pending_msg(this.ptr);
-               TwoTuple<byte[], Type>[] ret_conv_24_arr = new TwoTuple[ret.length];
-               for (int y = 0; y < ret.length; y++) {
-                       long ret_conv_24 = ret[y];
-                       byte[] ret_conv_24_a = bindings.LDKC2Tuple_PublicKeyTypeZ_get_a(ret_conv_24);
-                       long ret_conv_24_b = bindings.LDKC2Tuple_PublicKeyTypeZ_get_b(ret_conv_24);
-                       Type ret_hu_conv = new Type(null, ret_conv_24_b);
-                       ret_hu_conv.ptrs_to.add(this);;
-                       TwoTuple<byte[], Type> ret_conv_24_conv = new TwoTuple<byte[], Type>(ret_conv_24_a, ret_hu_conv, () -> {
-                               bindings.C2Tuple_PublicKeyTypeZ_free(ret_conv_24);
-                       });
-                       ret_hu_conv.ptrs_to.add(ret_conv_24_conv);
-                       ret_conv_24_arr[y] = ret_conv_24_conv;
+               TwoTuple_PublicKeyTypeZ[] ret_conv_25_arr = new TwoTuple_PublicKeyTypeZ[ret.length];
+               for (int z = 0; z < ret.length; z++) {
+                       long ret_conv_25 = ret[z];
+                       TwoTuple_PublicKeyTypeZ ret_conv_25_hu_conv = new TwoTuple_PublicKeyTypeZ(null, ret_conv_25);
+                       ret_conv_25_hu_conv.ptrs_to.add(this);
+                       ret_conv_25_arr[z] = ret_conv_25_hu_conv;
                }
-               return ret_conv_24_arr;
+               return ret_conv_25_arr;
        }
 
 }
index cb2d2c519a75ffa656d5549fe45e590161b89e59..90b342c0076b4d841e29ffb29bf3571d066b038b 100644 (file)
@@ -52,8 +52,9 @@ public class NetGraphMsgHandler extends CommonBase {
        /**
         * Representation of the payment channel network
         */
-       public void set_network_graph(byte[] val_genesis_hash) {
-               bindings.NetGraphMsgHandler_set_network_graph(this.ptr, bindings.NetworkGraph_new(val_genesis_hash));
+       public void set_network_graph(NetworkGraph val) {
+               bindings.NetGraphMsgHandler_set_network_graph(this.ptr, val == null ? 0 : val.ptr & ~1);
+               this.ptrs_to.add(val);
        }
 
        /**
@@ -63,11 +64,12 @@ public class NetGraphMsgHandler extends CommonBase {
         * channel data is correct, and that the announcement is signed with
         * channel owners' keys.
         */
-       public static NetGraphMsgHandler of(byte[] network_graph_genesis_hash, Option_AccessZ chain_access, Logger logger) {
-               long ret = bindings.NetGraphMsgHandler_new(bindings.NetworkGraph_new(network_graph_genesis_hash), chain_access.ptr, logger == null ? 0 : logger.ptr);
+       public static NetGraphMsgHandler of(NetworkGraph network_graph, Option_AccessZ chain_access, Logger logger) {
+               long ret = bindings.NetGraphMsgHandler_new(network_graph == null ? 0 : network_graph.ptr & ~1, chain_access.ptr, logger == null ? 0 : logger.ptr);
                if (ret < 1024) { return null; }
                NetGraphMsgHandler ret_hu_conv = new NetGraphMsgHandler(null, ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               ret_hu_conv.ptrs_to.add(network_graph);
                ret_hu_conv.ptrs_to.add(logger);
                return ret_hu_conv;
        }
index 70e666fd5646e07bab67c122cb36f64eb82b0fe3..98c99609e77a7417cc23a36b5f3fd6e0aa723539 100644 (file)
@@ -19,6 +19,17 @@ public class NetworkGraph extends CommonBase {
                if (ptr != 0) { bindings.NetworkGraph_free(ptr); }
        }
 
+       /**
+        * Creates a copy of the NetworkGraph
+        */
+       public NetworkGraph clone() {
+               long ret = bindings.NetworkGraph_clone(this.ptr);
+               if (ret < 1024) { return null; }
+               NetworkGraph ret_hu_conv = new NetworkGraph(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        /**
         * Serialize the NetworkGraph object into a byte array which can be read by NetworkGraph_read
         */
index 0cb6c0a1ed8f82c92f50e3bdd282996c40c82fc8..518a85ddbc5bc4dd4a77a5fe2735f9202c31e9cb 100644 (file)
@@ -30,16 +30,13 @@ public class Option_C2Tuple_usizeTransactionZZ extends CommonBase {
        }
 
        public final static class Some extends Option_C2Tuple_usizeTransactionZZ {
-               public final TwoTuple<Long, byte[]> some;
+               public final TwoTuple_usizeTransactionZ some;
                private Some(long ptr, bindings.LDKCOption_C2Tuple_usizeTransactionZZ.Some obj) {
                        super(null, ptr);
                        long some = obj.some;
-                       long some_a = bindings.LDKC2Tuple_usizeTransactionZ_get_a(some);
-                       byte[] some_b = bindings.LDKC2Tuple_usizeTransactionZ_get_b(some);
-                       TwoTuple<Long, byte[]> some_conv = new TwoTuple<Long, byte[]>(some_a, some_b, () -> {
-                               bindings.C2Tuple_usizeTransactionZ_free(some);
-                       });
-                       this.some = some_conv;
+                       TwoTuple_usizeTransactionZ some_hu_conv = new TwoTuple_usizeTransactionZ(null, some);
+                       some_hu_conv.ptrs_to.add(this);
+                       this.some = some_hu_conv;
                }
        }
        public final static class None extends Option_C2Tuple_usizeTransactionZZ {
@@ -50,8 +47,8 @@ public class Option_C2Tuple_usizeTransactionZZ extends CommonBase {
        /**
         * Constructs a new COption_C2Tuple_usizeTransactionZZ containing a crate::c_types::derived::C2Tuple_usizeTransactionZ
         */
-       public static Option_C2Tuple_usizeTransactionZZ some(TwoTuple<Long, byte[]> o) {
-               long ret = bindings.COption_C2Tuple_usizeTransactionZZ_some(bindings.C2Tuple_usizeTransactionZ_new(o.a, o.b));
+       public static Option_C2Tuple_usizeTransactionZZ some(TwoTuple_usizeTransactionZ o) {
+               long ret = bindings.COption_C2Tuple_usizeTransactionZZ_some(o != null ? o.ptr : 0);
                if (ret < 1024) { return null; }
                Option_C2Tuple_usizeTransactionZZ ret_hu_conv = Option_C2Tuple_usizeTransactionZZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
index fe4f27343f280cfc1a9691a50d17a000579a2cf0..14c3f284ea3f97f1833a32b530a455db305edbac 100644 (file)
@@ -20,19 +20,13 @@ public class Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ extends CommonB
                }
        }
        public static final class Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_OK extends Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ {
-               public final TwoTuple<byte[], ChannelManager> res;
+               public final TwoTuple_BlockHashChannelManagerZ res;
                private Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_OK(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long res = bindings.LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(ptr);
-                       byte[] res_a = bindings.LDKC2Tuple_BlockHashChannelManagerZ_get_a(res);
-                       long res_b = bindings.LDKC2Tuple_BlockHashChannelManagerZ_get_b(res);
-                       ChannelManager res_b_hu_conv = new ChannelManager(null, res_b);
-                       res_b_hu_conv.ptrs_to.add(this);;
-                       TwoTuple<byte[], ChannelManager> res_conv = new TwoTuple<byte[], ChannelManager>(res_a, res_b_hu_conv, () -> {
-                               bindings.C2Tuple_BlockHashChannelManagerZ_free(res);
-                       });
-                       res_b_hu_conv.ptrs_to.add(res_conv);
-                       this.res = res_conv;
+                       TwoTuple_BlockHashChannelManagerZ res_hu_conv = new TwoTuple_BlockHashChannelManagerZ(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
                }
        }
 
@@ -50,19 +44,10 @@ public class Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ extends CommonB
        /**
         * Creates a new CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ in the success state.
         */
-       public static Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ ok(TwoTuple<byte[], ChannelManager> o) {
-               long ret = bindings.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(bindings.C2Tuple_BlockHashChannelManagerZ_new(o.a, o.b == null ? 0 : o.b.ptr & ~1));
+       public static Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ ok(TwoTuple_BlockHashChannelManagerZ o) {
+               long ret = bindings.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o != null ? o.ptr : 0);
                if (ret < 1024) { return null; }
                Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.constr_from_ptr(ret);
-               ret_hu_conv.ptrs_to.add(o.b);
-               // 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, o.b is reset to null and is now a dummy object.
-               o.b.ptr = 0;
                return ret_hu_conv;
        }
 
index 8a7392f2eea1049e48d683c02c60a2774571d691..ef6f4ba64e7d6da9d66516f7016c5569ade479e6 100644 (file)
@@ -20,19 +20,13 @@ public class Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ extends CommonB
                }
        }
        public static final class Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_OK extends Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ {
-               public final TwoTuple<byte[], ChannelMonitor> res;
+               public final TwoTuple_BlockHashChannelMonitorZ res;
                private Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_OK(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long res = bindings.LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(ptr);
-                       byte[] res_a = bindings.LDKC2Tuple_BlockHashChannelMonitorZ_get_a(res);
-                       long res_b = bindings.LDKC2Tuple_BlockHashChannelMonitorZ_get_b(res);
-                       ChannelMonitor res_b_hu_conv = new ChannelMonitor(null, res_b);
-                       res_b_hu_conv.ptrs_to.add(this);;
-                       TwoTuple<byte[], ChannelMonitor> res_conv = new TwoTuple<byte[], ChannelMonitor>(res_a, res_b_hu_conv, () -> {
-                               bindings.C2Tuple_BlockHashChannelMonitorZ_free(res);
-                       });
-                       res_b_hu_conv.ptrs_to.add(res_conv);
-                       this.res = res_conv;
+                       TwoTuple_BlockHashChannelMonitorZ res_hu_conv = new TwoTuple_BlockHashChannelMonitorZ(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
                }
        }
 
@@ -50,11 +44,10 @@ public class Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ extends CommonB
        /**
         * Creates a new CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ in the success state.
         */
-       public static Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ ok(TwoTuple<byte[], ChannelMonitor> o) {
-               long ret = bindings.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(bindings.C2Tuple_BlockHashChannelMonitorZ_new(o.a, o.b == null ? 0 : o.b.ptr & ~1));
+       public static Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ ok(TwoTuple_BlockHashChannelMonitorZ o) {
+               long ret = bindings.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o != null ? o.ptr : 0);
                if (ret < 1024) { return null; }
                Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.constr_from_ptr(ret);
-               ret_hu_conv.ptrs_to.add(o.b);
                return ret_hu_conv;
        }
 
@@ -69,4 +62,15 @@ public class Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ extends CommonB
                return ret_hu_conv;
        }
 
+       /**
+        * Creates a new CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ clone() {
+               long ret = bindings.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(this.ptr);
+               if (ret < 1024) { return null; }
+               Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 85fbf4eb6728d0ca5ec6b136f993bdcd5c2c6af2..cd08d347c5c5929784b7e4812c3f3a0b7bb5efd0 100644 (file)
@@ -20,16 +20,13 @@ public class Result_C2Tuple_SignatureCVec_SignatureZZNoneZ extends CommonBase {
                }
        }
        public static final class Result_C2Tuple_SignatureCVec_SignatureZZNoneZ_OK extends Result_C2Tuple_SignatureCVec_SignatureZZNoneZ {
-               public final TwoTuple<byte[], byte[][]> res;
+               public final TwoTuple_SignatureCVec_SignatureZZ res;
                private Result_C2Tuple_SignatureCVec_SignatureZZNoneZ_OK(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long res = bindings.LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(ptr);
-                       byte[] res_a = bindings.LDKC2Tuple_SignatureCVec_SignatureZZ_get_a(res);
-                       byte[][] res_b = bindings.LDKC2Tuple_SignatureCVec_SignatureZZ_get_b(res);
-                       TwoTuple<byte[], byte[][]> res_conv = new TwoTuple<byte[], byte[][]>(res_a, res_b, () -> {
-                               bindings.C2Tuple_SignatureCVec_SignatureZZ_free(res);
-                       });
-                       this.res = res_conv;
+                       TwoTuple_SignatureCVec_SignatureZZ res_hu_conv = new TwoTuple_SignatureCVec_SignatureZZ(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
                }
        }
 
@@ -42,8 +39,8 @@ public class Result_C2Tuple_SignatureCVec_SignatureZZNoneZ extends CommonBase {
        /**
         * Creates a new CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ in the success state.
         */
-       public static Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ok(TwoTuple<byte[], byte[][]> o) {
-               long ret = bindings.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(bindings.C2Tuple_SignatureCVec_SignatureZZ_new(o.a, o.b));
+       public static Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ok(TwoTuple_SignatureCVec_SignatureZZ o) {
+               long ret = bindings.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o != null ? o.ptr : 0);
                if (ret < 1024) { return null; }
                Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_hu_conv = Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.constr_from_ptr(ret);
                return ret_hu_conv;
index ecb812ab4d17d5f12c1f9df406e67cd3ffbd6894..16f5c8ceef4bf1e7d1cb595fed3036d79e795037 100644 (file)
@@ -20,24 +20,18 @@ public class Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ extends CommonB
                }
        }
        public static final class Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_OK extends Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ {
-               public final TwoTuple<byte[], ChannelMonitor>[] res;
+               public final TwoTuple_BlockHashChannelMonitorZ[] res;
                private Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_OK(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long[] res = bindings.LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_ok(ptr);
-                       TwoTuple<byte[], ChannelMonitor>[] res_conv_34_arr = new TwoTuple[res.length];
-                       for (int i = 0; i < res.length; i++) {
-                               long res_conv_34 = res[i];
-                               byte[] res_conv_34_a = bindings.LDKC2Tuple_BlockHashChannelMonitorZ_get_a(res_conv_34);
-                               long res_conv_34_b = bindings.LDKC2Tuple_BlockHashChannelMonitorZ_get_b(res_conv_34);
-                               ChannelMonitor res_conv_34_b_hu_conv = new ChannelMonitor(null, res_conv_34_b);
-                               res_conv_34_b_hu_conv.ptrs_to.add(this);;
-                               TwoTuple<byte[], ChannelMonitor> res_conv_34_conv = new TwoTuple<byte[], ChannelMonitor>(res_conv_34_a, res_conv_34_b_hu_conv, () -> {
-                                       bindings.C2Tuple_BlockHashChannelMonitorZ_free(res_conv_34);
-                               });
-                               res_conv_34_b_hu_conv.ptrs_to.add(res_conv_34_conv);
-                               res_conv_34_arr[i] = res_conv_34_conv;
+                       TwoTuple_BlockHashChannelMonitorZ[] res_conv_35_arr = new TwoTuple_BlockHashChannelMonitorZ[res.length];
+                       for (int j = 0; j < res.length; j++) {
+                               long res_conv_35 = res[j];
+                               TwoTuple_BlockHashChannelMonitorZ res_conv_35_hu_conv = new TwoTuple_BlockHashChannelMonitorZ(null, res_conv_35);
+                               res_conv_35_hu_conv.ptrs_to.add(this);
+                               res_conv_35_arr[j] = res_conv_35_hu_conv;
                        }
-                       this.res = res_conv_34_arr;
+                       this.res = res_conv_35_arr;
                }
        }
 
@@ -52,11 +46,10 @@ public class Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ extends CommonB
        /**
         * Creates a new CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ in the success state.
         */
-       public static Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ ok(TwoTuple<byte[], ChannelMonitor>[] o) {
-               long ret = bindings.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(o != null ? Arrays.stream(o).mapToLong(o_conv_34 -> bindings.C2Tuple_BlockHashChannelMonitorZ_new(o_conv_34.a, o_conv_34.b == null ? 0 : o_conv_34.b.ptr & ~1)).toArray() : null);
+       public static Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ ok(TwoTuple_BlockHashChannelMonitorZ[] o) {
+               long ret = bindings.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(o != null ? Arrays.stream(o).mapToLong(o_conv_35 -> o_conv_35 != null ? o_conv_35.ptr : 0).toArray() : null);
                if (ret < 1024) { return null; }
                Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ ret_hu_conv = Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ.constr_from_ptr(ret);
-               for (TwoTuple<byte[], ChannelMonitor> o_conv_34: o) { ret_hu_conv.ptrs_to.add(o_conv_34.b); };
                return ret_hu_conv;
        }
 
@@ -70,4 +63,15 @@ public class Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ extends CommonB
                return ret_hu_conv;
        }
 
+       /**
+        * Creates a new CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ clone() {
+               long ret = bindings.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(this.ptr);
+               if (ret < 1024) { return null; }
+               Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ ret_hu_conv = Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index cc81f5ce7fdf3f3fed79a754eadd79571001db48..ee85fbc3f62b410ddfa6b909a196f7a62b67981d 100644 (file)
@@ -44,10 +44,11 @@ public class Result_NetworkGraphDecodeErrorZ extends CommonBase {
        /**
         * Creates a new CResult_NetworkGraphDecodeErrorZ in the success state.
         */
-       public static Result_NetworkGraphDecodeErrorZ ok(byte[] o_genesis_hash) {
-               long ret = bindings.CResult_NetworkGraphDecodeErrorZ_ok(bindings.NetworkGraph_new(o_genesis_hash));
+       public static Result_NetworkGraphDecodeErrorZ ok(NetworkGraph o) {
+               long ret = bindings.CResult_NetworkGraphDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                if (ret < 1024) { return null; }
                Result_NetworkGraphDecodeErrorZ ret_hu_conv = Result_NetworkGraphDecodeErrorZ.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
@@ -62,4 +63,15 @@ public class Result_NetworkGraphDecodeErrorZ extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Creates a new CResult_NetworkGraphDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_NetworkGraphDecodeErrorZ clone() {
+               long ret = bindings.CResult_NetworkGraphDecodeErrorZ_clone(this.ptr);
+               if (ret < 1024) { return null; }
+               Result_NetworkGraphDecodeErrorZ ret_hu_conv = Result_NetworkGraphDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 358644dd2398bf3ddea44e8ce52b4b4b25cf08cd..fc7b1281e9ef528a0a774c56f2d11f375ad6d66b 100644 (file)
@@ -51,7 +51,7 @@ public class RoutingMessageHandler extends CommonBase {
                 * to a remote node, starting at the short_channel_id indicated by starting_point and
                 * including the batch_amount entries immediately higher in numerical value than starting_point.
                 */
-               ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate>[] get_next_channel_announcements(long starting_point, byte batch_amount);
+               ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ[] get_next_channel_announcements(long starting_point, byte batch_amount);
                /**
                 * Gets a subset of the node announcements required to dump our routing table to a remote node,
                 * starting at the node *after* the provided publickey and including batch_amount entries
@@ -114,9 +114,8 @@ public class RoutingMessageHandler extends CommonBase {
                                return result;
                        }
                        @Override public long[] get_next_channel_announcements(long starting_point, byte batch_amount) {
-                               ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate>[] ret = arg.get_next_channel_announcements(starting_point, batch_amount);
-                               long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_63 -> bindings.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(ret_conv_63.a == null ? 0 : ret_conv_63.a.ptr & ~1, ret_conv_63.b == null ? 0 : ret_conv_63.b.ptr & ~1, ret_conv_63.c == null ? 0 : ret_conv_63.c.ptr & ~1)).toArray() : null;
-                               for (ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate> ret_conv_63: ret) { impl_holder.held.ptrs_to.add(ret_conv_63.a); impl_holder.held.ptrs_to.add(ret_conv_63.b); impl_holder.held.ptrs_to.add(ret_conv_63.c); };
+                               ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ[] ret = arg.get_next_channel_announcements(starting_point, batch_amount);
+                               long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_59 -> ret_conv_59 != null ? ret_conv_59.ptr : 0).toArray() : null;
                                return result;
                        }
                        @Override public long[] get_next_node_announcements(byte[] starting_point, byte batch_amount) {
@@ -211,29 +210,16 @@ public class RoutingMessageHandler extends CommonBase {
         * to a remote node, starting at the short_channel_id indicated by starting_point and
         * including the batch_amount entries immediately higher in numerical value than starting_point.
         */
-       public ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate>[] get_next_channel_announcements(long starting_point, byte batch_amount) {
+       public ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ[] get_next_channel_announcements(long starting_point, byte batch_amount) {
                long[] ret = bindings.RoutingMessageHandler_get_next_channel_announcements(this.ptr, starting_point, batch_amount);
-               ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate>[] ret_conv_63_arr = new ThreeTuple[ret.length];
-               for (int l = 0; l < ret.length; l++) {
-                       long ret_conv_63 = ret[l];
-                       long ret_conv_63_a = bindings.LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(ret_conv_63);
-                       ChannelAnnouncement ret_conv_63_a_hu_conv = new ChannelAnnouncement(null, ret_conv_63_a);
-                       ret_conv_63_a_hu_conv.ptrs_to.add(this);;
-                       long ret_conv_63_b = bindings.LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(ret_conv_63);
-                       ChannelUpdate ret_conv_63_b_hu_conv = new ChannelUpdate(null, ret_conv_63_b);
-                       ret_conv_63_b_hu_conv.ptrs_to.add(this);;
-                       long ret_conv_63_c = bindings.LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(ret_conv_63);
-                       ChannelUpdate ret_conv_63_c_hu_conv = new ChannelUpdate(null, ret_conv_63_c);
-                       ret_conv_63_c_hu_conv.ptrs_to.add(this);;
-                       ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate> ret_conv_63_conv = new ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate>(ret_conv_63_a_hu_conv, ret_conv_63_b_hu_conv, ret_conv_63_c_hu_conv, () -> {
-                               bindings.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(ret_conv_63);
-                       });
-                       ret_conv_63_a_hu_conv.ptrs_to.add(ret_conv_63_conv);
-                       ret_conv_63_b_hu_conv.ptrs_to.add(ret_conv_63_conv);
-                       ret_conv_63_c_hu_conv.ptrs_to.add(ret_conv_63_conv);
-                       ret_conv_63_arr[l] = ret_conv_63_conv;
+               ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ[] ret_conv_59_arr = new ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ[ret.length];
+               for (int h = 0; h < ret.length; h++) {
+                       long ret_conv_59 = ret[h];
+                       ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ ret_conv_59_hu_conv = new ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ(null, ret_conv_59);
+                       ret_conv_59_hu_conv.ptrs_to.add(this);
+                       ret_conv_59_arr[h] = ret_conv_59_hu_conv;
                }
-               return ret_conv_63_arr;
+               return ret_conv_59_arr;
        }
 
        /**
index c097c202990ba3dc555f508ed9c15df641c3edfe..c6bf94a5609742746742e9d021f79c0901d6d77d 100644 (file)
@@ -51,23 +51,13 @@ public class SignedRawInvoice extends CommonBase {
         * 2. hash of the raw invoice
         * 3. signature
         */
-       public ThreeTuple<RawInvoice, byte[], InvoiceSignature> into_parts() {
+       public ThreeTuple_RawInvoice_u832InvoiceSignatureZ into_parts() {
                long ret = bindings.SignedRawInvoice_into_parts(this.ptr);
                if (ret < 1024) { return null; }
-               long ret_a = bindings.LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(ret);
-               RawInvoice ret_a_hu_conv = new RawInvoice(null, ret_a);
-               ret_a_hu_conv.ptrs_to.add(this);;
-               byte[] ret_b = bindings.LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(ret);
-               long ret_c = bindings.LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(ret);
-               InvoiceSignature ret_c_hu_conv = new InvoiceSignature(null, ret_c);
-               ret_c_hu_conv.ptrs_to.add(this);;
-               ThreeTuple<RawInvoice, byte[], InvoiceSignature> ret_conv = new ThreeTuple<RawInvoice, byte[], InvoiceSignature>(ret_a_hu_conv, ret_b, ret_c_hu_conv, () -> {
-                       bindings.C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(ret);
-               });
-               ret_a_hu_conv.ptrs_to.add(ret_conv);
-               ret_c_hu_conv.ptrs_to.add(ret_conv);
+               ThreeTuple_RawInvoice_u832InvoiceSignatureZ ret_hu_conv = new ThreeTuple_RawInvoice_u832InvoiceSignatureZ(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
                this.ptrs_to.add(this);
-               return ret_conv;
+               return ret_hu_conv;
        }
 
        /**
diff --git a/src/main/java/org/ldk/structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.java b/src/main/java/org/ldk/structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.java
new file mode 100644 (file)
index 0000000..0153885
--- /dev/null
@@ -0,0 +1,22 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import javax.annotation.Nullable;
+
+
+/**
+ * A Tuple
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ extends CommonBase {
+       ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(ptr); }
+       }
+
+}
diff --git a/src/main/java/org/ldk/structs/ThreeTuple_RawInvoice_u832InvoiceSignatureZ.java b/src/main/java/org/ldk/structs/ThreeTuple_RawInvoice_u832InvoiceSignatureZ.java
new file mode 100644 (file)
index 0000000..b0b3a91
--- /dev/null
@@ -0,0 +1,22 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import javax.annotation.Nullable;
+
+
+/**
+ * A Tuple
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class ThreeTuple_RawInvoice_u832InvoiceSignatureZ extends CommonBase {
+       ThreeTuple_RawInvoice_u832InvoiceSignatureZ(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(ptr); }
+       }
+
+}
diff --git a/src/main/java/org/ldk/structs/TwoTuple_BlockHashChannelManagerZ.java b/src/main/java/org/ldk/structs/TwoTuple_BlockHashChannelManagerZ.java
new file mode 100644 (file)
index 0000000..38761c9
--- /dev/null
@@ -0,0 +1,59 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import javax.annotation.Nullable;
+
+
+/**
+ * A Tuple
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class TwoTuple_BlockHashChannelManagerZ extends CommonBase {
+       TwoTuple_BlockHashChannelManagerZ(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.C2Tuple_BlockHashChannelManagerZ_free(ptr); }
+       }
+
+       /**
+        * 
+        */
+       public byte[] get_a() {
+               byte[] ret = bindings.C2Tuple_BlockHashChannelManagerZ_get_a(this.ptr);
+               return ret;
+       }
+
+       /**
+        * 
+        */
+       public ChannelManager get_b() {
+               long ret = bindings.C2Tuple_BlockHashChannelManagerZ_get_b(this.ptr);
+               if (ret < 1024) { return null; }
+               ChannelManager ret_hu_conv = new ChannelManager(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new C2Tuple_BlockHashChannelManagerZ from the contained elements.
+        */
+       public static TwoTuple_BlockHashChannelManagerZ of(byte[] a, FeeEstimator b_fee_est, Watch b_chain_monitor, BroadcasterInterface b_tx_broadcaster, Logger b_logger, KeysInterface b_keys_manager, UserConfig b_config, ChainParameters b_params) {
+               long ret = bindings.C2Tuple_BlockHashChannelManagerZ_new(a, bindings.ChannelManager_new(b_fee_est == null ? 0 : b_fee_est.ptr, b_chain_monitor == null ? 0 : b_chain_monitor.ptr, b_tx_broadcaster == null ? 0 : b_tx_broadcaster.ptr, b_logger == null ? 0 : b_logger.ptr, b_keys_manager == null ? 0 : b_keys_manager.ptr, b_config == null ? 0 : b_config.ptr & ~1, b_params == null ? 0 : b_params.ptr & ~1));
+               if (ret < 1024) { return null; }
+               TwoTuple_BlockHashChannelManagerZ ret_hu_conv = new TwoTuple_BlockHashChannelManagerZ(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               ret_hu_conv.ptrs_to.add(b_fee_est);
+               ret_hu_conv.ptrs_to.add(b_chain_monitor);
+               ret_hu_conv.ptrs_to.add(b_tx_broadcaster);
+               ret_hu_conv.ptrs_to.add(b_logger);
+               ret_hu_conv.ptrs_to.add(b_keys_manager);
+               ret_hu_conv.ptrs_to.add(b_config);
+               ret_hu_conv.ptrs_to.add(b_params);
+               return ret_hu_conv;
+       }
+
+}
diff --git a/src/main/java/org/ldk/structs/TwoTuple_BlockHashChannelMonitorZ.java b/src/main/java/org/ldk/structs/TwoTuple_BlockHashChannelMonitorZ.java
new file mode 100644 (file)
index 0000000..5b994aa
--- /dev/null
@@ -0,0 +1,65 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import javax.annotation.Nullable;
+
+
+/**
+ * A Tuple
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class TwoTuple_BlockHashChannelMonitorZ extends CommonBase {
+       TwoTuple_BlockHashChannelMonitorZ(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.C2Tuple_BlockHashChannelMonitorZ_free(ptr); }
+       }
+
+       /**
+        * 
+        */
+       public byte[] get_a() {
+               byte[] ret = bindings.C2Tuple_BlockHashChannelMonitorZ_get_a(this.ptr);
+               return ret;
+       }
+
+       /**
+        * 
+        */
+       public ChannelMonitor get_b() {
+               long ret = bindings.C2Tuple_BlockHashChannelMonitorZ_get_b(this.ptr);
+               if (ret < 1024) { return null; }
+               ChannelMonitor ret_hu_conv = new ChannelMonitor(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new tuple which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public TwoTuple_BlockHashChannelMonitorZ clone() {
+               long ret = bindings.C2Tuple_BlockHashChannelMonitorZ_clone(this.ptr);
+               if (ret < 1024) { return null; }
+               TwoTuple_BlockHashChannelMonitorZ ret_hu_conv = new TwoTuple_BlockHashChannelMonitorZ(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new C2Tuple_BlockHashChannelMonitorZ from the contained elements.
+        */
+       public static TwoTuple_BlockHashChannelMonitorZ of(byte[] a, ChannelMonitor b) {
+               long ret = bindings.C2Tuple_BlockHashChannelMonitorZ_new(a, b == null ? 0 : b.ptr & ~1);
+               if (ret < 1024) { return null; }
+               TwoTuple_BlockHashChannelMonitorZ ret_hu_conv = new TwoTuple_BlockHashChannelMonitorZ(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               ret_hu_conv.ptrs_to.add(b);
+               return ret_hu_conv;
+       }
+
+}
diff --git a/src/main/java/org/ldk/structs/TwoTuple_OutPointScriptZ.java b/src/main/java/org/ldk/structs/TwoTuple_OutPointScriptZ.java
new file mode 100644 (file)
index 0000000..b128384
--- /dev/null
@@ -0,0 +1,65 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import javax.annotation.Nullable;
+
+
+/**
+ * A Tuple
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class TwoTuple_OutPointScriptZ extends CommonBase {
+       TwoTuple_OutPointScriptZ(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.C2Tuple_OutPointScriptZ_free(ptr); }
+       }
+
+       /**
+        * 
+        */
+       public OutPoint get_a() {
+               long ret = bindings.C2Tuple_OutPointScriptZ_get_a(this.ptr);
+               if (ret < 1024) { return null; }
+               OutPoint ret_hu_conv = new OutPoint(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       /**
+        * 
+        */
+       public byte[] get_b() {
+               byte[] ret = bindings.C2Tuple_OutPointScriptZ_get_b(this.ptr);
+               return ret;
+       }
+
+       /**
+        * Creates a new tuple which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public TwoTuple_OutPointScriptZ clone() {
+               long ret = bindings.C2Tuple_OutPointScriptZ_clone(this.ptr);
+               if (ret < 1024) { return null; }
+               TwoTuple_OutPointScriptZ ret_hu_conv = new TwoTuple_OutPointScriptZ(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new C2Tuple_OutPointScriptZ from the contained elements.
+        */
+       public static TwoTuple_OutPointScriptZ of(OutPoint a, byte[] b) {
+               long ret = bindings.C2Tuple_OutPointScriptZ_new(a == null ? 0 : a.ptr & ~1, b);
+               if (ret < 1024) { return null; }
+               TwoTuple_OutPointScriptZ ret_hu_conv = new TwoTuple_OutPointScriptZ(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               ret_hu_conv.ptrs_to.add(a);
+               return ret_hu_conv;
+       }
+
+}
diff --git a/src/main/java/org/ldk/structs/TwoTuple_PaymentHashPaymentSecretZ.java b/src/main/java/org/ldk/structs/TwoTuple_PaymentHashPaymentSecretZ.java
new file mode 100644 (file)
index 0000000..d845359
--- /dev/null
@@ -0,0 +1,61 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import javax.annotation.Nullable;
+
+
+/**
+ * A Tuple
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class TwoTuple_PaymentHashPaymentSecretZ extends CommonBase {
+       TwoTuple_PaymentHashPaymentSecretZ(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.C2Tuple_PaymentHashPaymentSecretZ_free(ptr); }
+       }
+
+       /**
+        * 
+        */
+       public byte[] get_a() {
+               byte[] ret = bindings.C2Tuple_PaymentHashPaymentSecretZ_get_a(this.ptr);
+               return ret;
+       }
+
+       /**
+        * 
+        */
+       public byte[] get_b() {
+               byte[] ret = bindings.C2Tuple_PaymentHashPaymentSecretZ_get_b(this.ptr);
+               return ret;
+       }
+
+       /**
+        * Creates a new tuple which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public TwoTuple_PaymentHashPaymentSecretZ clone() {
+               long ret = bindings.C2Tuple_PaymentHashPaymentSecretZ_clone(this.ptr);
+               if (ret < 1024) { return null; }
+               TwoTuple_PaymentHashPaymentSecretZ ret_hu_conv = new TwoTuple_PaymentHashPaymentSecretZ(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new C2Tuple_PaymentHashPaymentSecretZ from the contained elements.
+        */
+       public static TwoTuple_PaymentHashPaymentSecretZ of(byte[] a, byte[] b) {
+               long ret = bindings.C2Tuple_PaymentHashPaymentSecretZ_new(a, b);
+               if (ret < 1024) { return null; }
+               TwoTuple_PaymentHashPaymentSecretZ ret_hu_conv = new TwoTuple_PaymentHashPaymentSecretZ(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+}
diff --git a/src/main/java/org/ldk/structs/TwoTuple_PublicKeyTypeZ.java b/src/main/java/org/ldk/structs/TwoTuple_PublicKeyTypeZ.java
new file mode 100644 (file)
index 0000000..2da8905
--- /dev/null
@@ -0,0 +1,65 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import javax.annotation.Nullable;
+
+
+/**
+ * A Tuple
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class TwoTuple_PublicKeyTypeZ extends CommonBase {
+       TwoTuple_PublicKeyTypeZ(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.C2Tuple_PublicKeyTypeZ_free(ptr); }
+       }
+
+       /**
+        * 
+        */
+       public byte[] get_a() {
+               byte[] ret = bindings.C2Tuple_PublicKeyTypeZ_get_a(this.ptr);
+               return ret;
+       }
+
+       /**
+        * 
+        */
+       public Type get_b() {
+               long ret = bindings.C2Tuple_PublicKeyTypeZ_get_b(this.ptr);
+               if (ret < 1024) { return null; }
+               Type ret_hu_conv = new Type(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new tuple which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public TwoTuple_PublicKeyTypeZ clone() {
+               long ret = bindings.C2Tuple_PublicKeyTypeZ_clone(this.ptr);
+               if (ret < 1024) { return null; }
+               TwoTuple_PublicKeyTypeZ ret_hu_conv = new TwoTuple_PublicKeyTypeZ(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new C2Tuple_PublicKeyTypeZ from the contained elements.
+        */
+       public static TwoTuple_PublicKeyTypeZ of(byte[] a, Type b) {
+               long ret = bindings.C2Tuple_PublicKeyTypeZ_new(a, b == null ? 0 : b.ptr);
+               if (ret < 1024) { return null; }
+               TwoTuple_PublicKeyTypeZ ret_hu_conv = new TwoTuple_PublicKeyTypeZ(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               ret_hu_conv.ptrs_to.add(b);
+               return ret_hu_conv;
+       }
+
+}
diff --git a/src/main/java/org/ldk/structs/TwoTuple_SignatureCVec_SignatureZZ.java b/src/main/java/org/ldk/structs/TwoTuple_SignatureCVec_SignatureZZ.java
new file mode 100644 (file)
index 0000000..f4cc14f
--- /dev/null
@@ -0,0 +1,61 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import javax.annotation.Nullable;
+
+
+/**
+ * A Tuple
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class TwoTuple_SignatureCVec_SignatureZZ extends CommonBase {
+       TwoTuple_SignatureCVec_SignatureZZ(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.C2Tuple_SignatureCVec_SignatureZZ_free(ptr); }
+       }
+
+       /**
+        * 
+        */
+       public byte[] get_a() {
+               byte[] ret = bindings.C2Tuple_SignatureCVec_SignatureZZ_get_a(this.ptr);
+               return ret;
+       }
+
+       /**
+        * 
+        */
+       public byte[][] get_b() {
+               byte[][] ret = bindings.C2Tuple_SignatureCVec_SignatureZZ_get_b(this.ptr);
+               return ret;
+       }
+
+       /**
+        * Creates a new tuple which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public TwoTuple_SignatureCVec_SignatureZZ clone() {
+               long ret = bindings.C2Tuple_SignatureCVec_SignatureZZ_clone(this.ptr);
+               if (ret < 1024) { return null; }
+               TwoTuple_SignatureCVec_SignatureZZ ret_hu_conv = new TwoTuple_SignatureCVec_SignatureZZ(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new C2Tuple_SignatureCVec_SignatureZZ from the contained elements.
+        */
+       public static TwoTuple_SignatureCVec_SignatureZZ of(byte[] a, byte[][] b) {
+               long ret = bindings.C2Tuple_SignatureCVec_SignatureZZ_new(a, b);
+               if (ret < 1024) { return null; }
+               TwoTuple_SignatureCVec_SignatureZZ ret_hu_conv = new TwoTuple_SignatureCVec_SignatureZZ(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+}
diff --git a/src/main/java/org/ldk/structs/TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ.java b/src/main/java/org/ldk/structs/TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ.java
new file mode 100644 (file)
index 0000000..671f446
--- /dev/null
@@ -0,0 +1,68 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import javax.annotation.Nullable;
+
+
+/**
+ * A Tuple
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ extends CommonBase {
+       TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(ptr); }
+       }
+
+       /**
+        * 
+        */
+       public byte[] get_a() {
+               byte[] ret = bindings.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(this.ptr);
+               return ret;
+       }
+
+       /**
+        * 
+        */
+       public TwoTuple_u32ScriptZ[] get_b() {
+               long[] ret = bindings.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(this.ptr);
+               TwoTuple_u32ScriptZ[] ret_conv_21_arr = new TwoTuple_u32ScriptZ[ret.length];
+               for (int v = 0; v < ret.length; v++) {
+                       long ret_conv_21 = ret[v];
+                       TwoTuple_u32ScriptZ ret_conv_21_hu_conv = new TwoTuple_u32ScriptZ(null, ret_conv_21);
+                       ret_conv_21_hu_conv.ptrs_to.add(this);
+                       ret_conv_21_arr[v] = ret_conv_21_hu_conv;
+               }
+               return ret_conv_21_arr;
+       }
+
+       /**
+        * Creates a new tuple which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ clone() {
+               long ret = bindings.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(this.ptr);
+               if (ret < 1024) { return null; }
+               TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ ret_hu_conv = new TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ from the contained elements.
+        */
+       public static TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ of(byte[] a, TwoTuple_u32ScriptZ[] b) {
+               long ret = bindings.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a, b != null ? Arrays.stream(b).mapToLong(b_conv_21 -> b_conv_21 != null ? b_conv_21.ptr : 0).toArray() : null);
+               if (ret < 1024) { return null; }
+               TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ ret_hu_conv = new TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+}
diff --git a/src/main/java/org/ldk/structs/TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ.java b/src/main/java/org/ldk/structs/TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ.java
new file mode 100644 (file)
index 0000000..4a4149f
--- /dev/null
@@ -0,0 +1,68 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import javax.annotation.Nullable;
+
+
+/**
+ * A Tuple
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ extends CommonBase {
+       TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(ptr); }
+       }
+
+       /**
+        * 
+        */
+       public byte[] get_a() {
+               byte[] ret = bindings.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(this.ptr);
+               return ret;
+       }
+
+       /**
+        * 
+        */
+       public TwoTuple_u32TxOutZ[] get_b() {
+               long[] ret = bindings.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(this.ptr);
+               TwoTuple_u32TxOutZ[] ret_conv_20_arr = new TwoTuple_u32TxOutZ[ret.length];
+               for (int u = 0; u < ret.length; u++) {
+                       long ret_conv_20 = ret[u];
+                       TwoTuple_u32TxOutZ ret_conv_20_hu_conv = new TwoTuple_u32TxOutZ(null, ret_conv_20);
+                       ret_conv_20_hu_conv.ptrs_to.add(this);
+                       ret_conv_20_arr[u] = ret_conv_20_hu_conv;
+               }
+               return ret_conv_20_arr;
+       }
+
+       /**
+        * Creates a new tuple which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ clone() {
+               long ret = bindings.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(this.ptr);
+               if (ret < 1024) { return null; }
+               TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ ret_hu_conv = new TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ from the contained elements.
+        */
+       public static TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ of(byte[] a, TwoTuple_u32TxOutZ[] b) {
+               long ret = bindings.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a, b != null ? Arrays.stream(b).mapToLong(b_conv_20 -> b_conv_20 != null ? b_conv_20.ptr : 0).toArray() : null);
+               if (ret < 1024) { return null; }
+               TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ ret_hu_conv = new TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+}
diff --git a/src/main/java/org/ldk/structs/TwoTuple_u32ScriptZ.java b/src/main/java/org/ldk/structs/TwoTuple_u32ScriptZ.java
new file mode 100644 (file)
index 0000000..7188134
--- /dev/null
@@ -0,0 +1,61 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import javax.annotation.Nullable;
+
+
+/**
+ * A Tuple
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class TwoTuple_u32ScriptZ extends CommonBase {
+       TwoTuple_u32ScriptZ(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.C2Tuple_u32ScriptZ_free(ptr); }
+       }
+
+       /**
+        * 
+        */
+       public int get_a() {
+               int ret = bindings.C2Tuple_u32ScriptZ_get_a(this.ptr);
+               return ret;
+       }
+
+       /**
+        * 
+        */
+       public byte[] get_b() {
+               byte[] ret = bindings.C2Tuple_u32ScriptZ_get_b(this.ptr);
+               return ret;
+       }
+
+       /**
+        * Creates a new tuple which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public TwoTuple_u32ScriptZ clone() {
+               long ret = bindings.C2Tuple_u32ScriptZ_clone(this.ptr);
+               if (ret < 1024) { return null; }
+               TwoTuple_u32ScriptZ ret_hu_conv = new TwoTuple_u32ScriptZ(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new C2Tuple_u32ScriptZ from the contained elements.
+        */
+       public static TwoTuple_u32ScriptZ of(int a, byte[] b) {
+               long ret = bindings.C2Tuple_u32ScriptZ_new(a, b);
+               if (ret < 1024) { return null; }
+               TwoTuple_u32ScriptZ ret_hu_conv = new TwoTuple_u32ScriptZ(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+}
diff --git a/src/main/java/org/ldk/structs/TwoTuple_u32TxOutZ.java b/src/main/java/org/ldk/structs/TwoTuple_u32TxOutZ.java
new file mode 100644 (file)
index 0000000..7af2388
--- /dev/null
@@ -0,0 +1,63 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import javax.annotation.Nullable;
+
+
+/**
+ * A Tuple
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class TwoTuple_u32TxOutZ extends CommonBase {
+       TwoTuple_u32TxOutZ(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.C2Tuple_u32TxOutZ_free(ptr); }
+       }
+
+       /**
+        * 
+        */
+       public int get_a() {
+               int ret = bindings.C2Tuple_u32TxOutZ_get_a(this.ptr);
+               return ret;
+       }
+
+       /**
+        * 
+        */
+       public TxOut get_b() {
+               long ret = bindings.C2Tuple_u32TxOutZ_get_b(this.ptr);
+               if (ret < 1024) { return null; }
+               TxOut ret_conv = new TxOut(null, ret);
+               return ret_conv;
+       }
+
+       /**
+        * Creates a new tuple which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public TwoTuple_u32TxOutZ clone() {
+               long ret = bindings.C2Tuple_u32TxOutZ_clone(this.ptr);
+               if (ret < 1024) { return null; }
+               TwoTuple_u32TxOutZ ret_hu_conv = new TwoTuple_u32TxOutZ(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new C2Tuple_u32TxOutZ from the contained elements.
+        */
+       public static TwoTuple_u32TxOutZ of(int a, TxOut b) {
+               long ret = bindings.C2Tuple_u32TxOutZ_new(a, b.ptr);
+               if (ret < 1024) { return null; }
+               TwoTuple_u32TxOutZ ret_hu_conv = new TwoTuple_u32TxOutZ(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+}
diff --git a/src/main/java/org/ldk/structs/TwoTuple_usizeTransactionZ.java b/src/main/java/org/ldk/structs/TwoTuple_usizeTransactionZ.java
new file mode 100644 (file)
index 0000000..54b5a64
--- /dev/null
@@ -0,0 +1,61 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import javax.annotation.Nullable;
+
+
+/**
+ * A Tuple
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class TwoTuple_usizeTransactionZ extends CommonBase {
+       TwoTuple_usizeTransactionZ(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.C2Tuple_usizeTransactionZ_free(ptr); }
+       }
+
+       /**
+        * 
+        */
+       public long get_a() {
+               long ret = bindings.C2Tuple_usizeTransactionZ_get_a(this.ptr);
+               return ret;
+       }
+
+       /**
+        * 
+        */
+       public byte[] get_b() {
+               byte[] ret = bindings.C2Tuple_usizeTransactionZ_get_b(this.ptr);
+               return ret;
+       }
+
+       /**
+        * Creates a new tuple which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public TwoTuple_usizeTransactionZ clone() {
+               long ret = bindings.C2Tuple_usizeTransactionZ_clone(this.ptr);
+               if (ret < 1024) { return null; }
+               TwoTuple_usizeTransactionZ ret_hu_conv = new TwoTuple_usizeTransactionZ(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new C2Tuple_usizeTransactionZ from the contained elements.
+        */
+       public static TwoTuple_usizeTransactionZ of(long a, byte[] b) {
+               long ret = bindings.C2Tuple_usizeTransactionZ_new(a, b);
+               if (ret < 1024) { return null; }
+               TwoTuple_usizeTransactionZ ret_hu_conv = new TwoTuple_usizeTransactionZ(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+}
index 863cce7f79d882e70623665cbe3ed1db378aeec6..d2fb44384eaf1feb25d8cc49cb7560236b6451cd 100644 (file)
@@ -39,7 +39,7 @@ public class UtilMethods {
        /**
         * Read a C2Tuple_BlockHashChannelMonitorZ from a byte array, created by C2Tuple_BlockHashChannelMonitorZ_write
         */
-       public static Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ BlockHashChannelMonitorZ_read(byte[] ser, KeysInterface arg) {
+       public static Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ C2Tuple_BlockHashChannelMonitorZ_read(byte[] ser, KeysInterface arg) {
                long ret = bindings.C2Tuple_BlockHashChannelMonitorZ_read(ser, arg == null ? 0 : arg.ptr);
                if (ret < 1024) { return null; }
                Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.constr_from_ptr(ret);
@@ -50,7 +50,7 @@ public class UtilMethods {
        /**
         * Read a C2Tuple_BlockHashChannelManagerZ from a byte array, created by C2Tuple_BlockHashChannelManagerZ_write
         */
-       public static Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ BlockHashChannelManagerZ_read(byte[] 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) {
+       public static Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ C2Tuple_BlockHashChannelManagerZ_read(byte[] 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) {
                long 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, arg_channel_monitors != null ? Arrays.stream(arg_channel_monitors).mapToLong(arg_channel_monitors_conv_16 -> arg_channel_monitors_conv_16 == null ? 0 : arg_channel_monitors_conv_16.ptr & ~1).toArray() : null));
                if (ret < 1024) { return null; }
                Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.constr_from_ptr(ret);
index 9e11672d18b86fc02cf8ebdb15ac01e7ccfdd168..19cad0eb59cbc8067e5c2e0e7f1f6c1b8ef80e2c 100644 (file)
@@ -132,15 +132,13 @@ static inline LDKStr java_to_owned_str(JNIEnv *env, jstring str) {
        return res;
 }
 
-JNIEXPORT jstring JNICALL Java_org_ldk_impl_bindings_get_1lib_1version_1string(JNIEnv *env, jclass _c) {
-       return str_ref_to_java(env, "v0.0.101.0", strlen("v0.0.101.0"));
-}
 JNIEXPORT jstring JNICALL Java_org_ldk_impl_bindings_get_1ldk_1c_1bindings_1version(JNIEnv *env, jclass _c) {
        return str_ref_to_java(env, check_get_ldk_bindings_version(), strlen(check_get_ldk_bindings_version()));
 }
 JNIEXPORT jstring JNICALL Java_org_ldk_impl_bindings_get_1ldk_1version(JNIEnv *env, jclass _c) {
        return str_ref_to_java(env, check_get_ldk_version(), strlen(check_get_ldk_version()));
 }
+#include "version.c"
 static jclass arr_of_B_clz = NULL;
 static jclass arr_of_J_clz = NULL;
 JNIEXPORT void Java_org_ldk_impl_bindings_init_1class_1cache(JNIEnv * env, jclass clz) {
@@ -1321,17 +1319,27 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1usizeTransactio
        ret->b = b_ref;
        return (uint64_t)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);
+static inline uintptr_t C2Tuple_usizeTransactionZ_get_a(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR tuple){
        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_C2Tuple_1usizeTransactionZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_usizeTransactionZ* tuple_conv = (LDKC2Tuple_usizeTransactionZ*)(tuple & ~1);
+       int64_t ret_val = C2Tuple_usizeTransactionZ_get_a(tuple_conv);
+       return ret_val;
+}
+
+static inline struct LDKTransaction C2Tuple_usizeTransactionZ_get_b(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR tuple){
+       return tuple->b;
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_usizeTransactionZ* tuple_conv = (LDKC2Tuple_usizeTransactionZ*)(tuple & ~1);
+       LDKTransaction ret_var = C2Tuple_usizeTransactionZ_get_b(tuple_conv);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+       Transaction_free(ret_var);
+       return ret_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);
@@ -1459,8 +1467,10 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1C2Tuple_1usizeT
        LDKCOption_C2Tuple_usizeTransactionZZ *obj = (LDKCOption_C2Tuple_usizeTransactionZZ*)(ptr & ~1);
        switch(obj->tag) {
                case LDKCOption_C2Tuple_usizeTransactionZZ_Some: {
-                       uint64_t some_ref = (uint64_t)(&obj->some) | 1;
-                       return (*env)->NewObject(env, LDKCOption_C2Tuple_usizeTransactionZZ_Some_class, LDKCOption_C2Tuple_usizeTransactionZZ_Some_meth, some_ref);
+                       LDKC2Tuple_usizeTransactionZ* some_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
+                       *some_conv = obj->some;
+                       *some_conv = C2Tuple_usizeTransactionZ_clone(some_conv);
+                       return (*env)->NewObject(env, LDKCOption_C2Tuple_usizeTransactionZZ_Some_class, LDKCOption_C2Tuple_usizeTransactionZZ_Some_meth, ((uint64_t)some_conv));
                }
                case LDKCOption_C2Tuple_usizeTransactionZZ_None: {
                        return (*env)->NewObject(env, LDKCOption_C2Tuple_usizeTransactionZZ_None_class, LDKCOption_C2Tuple_usizeTransactionZZ_None_meth);
@@ -2185,32 +2195,43 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1SignatureCVec_1
        ret->b = b_constr;
        return (uint64_t)ret;
 }
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1SignatureCVec_1SignatureZZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_SignatureCVec_SignatureZZ *tuple = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(ptr & ~1);
-       int8_tArray a_arr = (*env)->NewByteArray(env, 64);
-       (*env)->SetByteArrayRegion(env, a_arr, 0, 64, tuple->a.compact_form);
-       return a_arr;
+static inline struct LDKSignature C2Tuple_SignatureCVec_SignatureZZ_get_a(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR tuple){
+       return tuple->a;
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_SignatureCVec_SignatureZZ* tuple_conv = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(tuple & ~1);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 64);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, C2Tuple_SignatureCVec_SignatureZZ_get_a(tuple_conv).compact_form);
+       return ret_arr;
+}
+
+static inline struct LDKCVec_SignatureZ C2Tuple_SignatureCVec_SignatureZZ_get_b(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR tuple){
+       return tuple->b;
 }
-JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1SignatureCVec_1SignatureZZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_SignatureCVec_SignatureZZ *tuple = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(ptr & ~1);
-       LDKCVec_SignatureZ b_var = tuple->b;
-       jobjectArray b_arr = (*env)->NewObjectArray(env, b_var.datalen, arr_of_B_clz, NULL);
+JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_SignatureCVec_SignatureZZ* tuple_conv = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(tuple & ~1);
+       LDKCVec_SignatureZ ret_var = C2Tuple_SignatureCVec_SignatureZZ_get_b(tuple_conv);
+       jobjectArray ret_arr = (*env)->NewObjectArray(env, ret_var.datalen, arr_of_B_clz, NULL);
        ;
-       for (size_t i = 0; i < b_var.datalen; i++) {
-               int8_tArray b_conv_8_arr = (*env)->NewByteArray(env, 64);
-               (*env)->SetByteArrayRegion(env, b_conv_8_arr, 0, 64, b_var.data[i].compact_form);
-               (*env)->SetObjectArrayElement(env, b_arr, i, b_conv_8_arr);
+       for (size_t i = 0; i < ret_var.datalen; i++) {
+               int8_tArray ret_conv_8_arr = (*env)->NewByteArray(env, 64);
+               (*env)->SetByteArrayRegion(env, ret_conv_8_arr, 0, 64, ret_var.data[i].compact_form);
+               (*env)->SetObjectArrayElement(env, ret_arr, i, ret_conv_8_arr);
        }
-       return b_arr;
+       FREE(ret_var.data);
+       return ret_arr;
 }
+
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
        return ((LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)arg)->result_ok;
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
        LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *val = (LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(arg & ~1);
        CHECK(val->result_ok);
-       uint64_t res_ref = (uint64_t)(&(*val->contents.result)) | 1;
-       return res_ref;
+       LDKC2Tuple_SignatureCVec_SignatureZZ* res_conv = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
+       *res_conv = (*val->contents.result);
+       *res_conv = C2Tuple_SignatureCVec_SignatureZZ_clone(res_conv);
+       return ((uint64_t)res_conv);
 }
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
        LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *val = (LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(arg & ~1);
@@ -3112,20 +3133,31 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChanne
        ret->b = b_conv;
        return (uint64_t)ret;
 }
-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;
+static inline struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelMonitorZ_get_a(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR tuple){
+       return ThirtyTwoBytes_clone(&tuple->a);
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMonitorZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_BlockHashChannelMonitorZ* tuple_conv = (LDKC2Tuple_BlockHashChannelMonitorZ*)(tuple & ~1);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C2Tuple_BlockHashChannelMonitorZ_get_a(tuple_conv).data);
+       return ret_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((((uint64_t)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((uint64_t)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       uint64_t b_ref = (uint64_t)b_var.inner & ~1;
-       return b_ref;
+
+static inline struct LDKChannelMonitor C2Tuple_BlockHashChannelMonitorZ_get_b(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR tuple){
+       return ChannelMonitor_clone(&tuple->b);
 }
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMonitorZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_BlockHashChannelMonitorZ* tuple_conv = (LDKC2Tuple_BlockHashChannelMonitorZ*)(tuple & ~1);
+       LDKChannelMonitor ret_var = C2Tuple_BlockHashChannelMonitorZ_get_b(tuple_conv);
+       CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       uint64_t ret_ref = (uint64_t)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1BlockHashChannelMonitorZZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
        LDKCVec_C2Tuple_BlockHashChannelMonitorZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_BlockHashChannelMonitorZZ), "LDKCVec_C2Tuple_BlockHashChannelMonitorZZ");
        ret->datalen = (*env)->GetArrayLength(env, elems);
@@ -3137,13 +3169,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1BlockHash
                for (size_t i = 0; i < ret->datalen; i++) {
                        int64_t arr_elem = java_elems[i];
                        LDKC2Tuple_BlockHashChannelMonitorZ arr_elem_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)arr_elem) & ~1);
-                       // Warning: we may need a move here but no clone is available for LDKC2Tuple_BlockHashChannelMonitorZ
+                       arr_elem_conv = C2Tuple_BlockHashChannelMonitorZ_clone((LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)arr_elem) & ~1));
                        ret->data[i] = arr_elem_conv;
                }
                (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
        }
        return (uint64_t)ret;
 }
+static inline LDKCVec_C2Tuple_BlockHashChannelMonitorZZ CVec_C2Tuple_BlockHashChannelMonitorZZ_clone(const LDKCVec_C2Tuple_BlockHashChannelMonitorZZ *orig) {
+       LDKCVec_C2Tuple_BlockHashChannelMonitorZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ) * orig->datalen, "LDKCVec_C2Tuple_BlockHashChannelMonitorZZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = C2Tuple_BlockHashChannelMonitorZ_clone(&orig->data[i]);
+       }
+       return ret;
+}
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1C2Tuple_1BlockHashChannelMonitorZZErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
        return ((LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ*)arg)->result_ok;
 }
@@ -3153,9 +3192,11 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1C2Tu
        LDKCVec_C2Tuple_BlockHashChannelMonitorZZ res_var = (*val->contents.result);
        int64_tArray res_arr = (*env)->NewLongArray(env, res_var.datalen);
        int64_t *res_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, res_arr, NULL);
-       for (size_t i = 0; i < res_var.datalen; i++) {
-               uint64_t res_conv_34_ref = (uint64_t)(&res_var.data[i]) | 1;
-               res_arr_ptr[i] = res_conv_34_ref;
+       for (size_t j = 0; j < res_var.datalen; j++) {
+               LDKC2Tuple_BlockHashChannelMonitorZ* res_conv_35_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
+               *res_conv_35_conv = res_var.data[j];
+               *res_conv_35_conv = C2Tuple_BlockHashChannelMonitorZ_clone(res_conv_35_conv);
+               res_arr_ptr[j] = ((uint64_t)res_conv_35_conv);
        }
        (*env)->ReleasePrimitiveArrayCritical(env, res_arr, res_arr_ptr, 0);
        return res_arr;
@@ -3538,18 +3579,26 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1PaymentHashPaym
        ret->b = b_ref;
        return (uint64_t)ret;
 }
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1PaymentHashPaymentSecretZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_PaymentHashPaymentSecretZ *tuple = (LDKC2Tuple_PaymentHashPaymentSecretZ*)(ptr & ~1);
-       int8_tArray a_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, a_arr, 0, 32, tuple->a.data);
-       return a_arr;
+static inline struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_a(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR tuple){
+       return ThirtyTwoBytes_clone(&tuple->a);
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PaymentHashPaymentSecretZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_PaymentHashPaymentSecretZ* tuple_conv = (LDKC2Tuple_PaymentHashPaymentSecretZ*)(tuple & ~1);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C2Tuple_PaymentHashPaymentSecretZ_get_a(tuple_conv).data);
+       return ret_arr;
+}
+
+static inline struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_b(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR tuple){
+       return ThirtyTwoBytes_clone(&tuple->b);
 }
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1PaymentHashPaymentSecretZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_PaymentHashPaymentSecretZ *tuple = (LDKC2Tuple_PaymentHashPaymentSecretZ*)(ptr & ~1);
-       int8_tArray b_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, b_arr, 0, 32, tuple->b.data);
-       return b_arr;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PaymentHashPaymentSecretZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_PaymentHashPaymentSecretZ* tuple_conv = (LDKC2Tuple_PaymentHashPaymentSecretZ*)(tuple & ~1);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C2Tuple_PaymentHashPaymentSecretZ_get_b(tuple_conv).data);
+       return ret_arr;
 }
+
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PaymentSecretAPIErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
        return ((LDKCResult_PaymentSecretAPIErrorZ*)arg)->result_ok;
 }
@@ -4361,28 +4410,38 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChanne
        ret->b = b_conv;
        return (uint64_t)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;
+static inline struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelManagerZ_get_a(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR tuple){
+       return ThirtyTwoBytes_clone(&tuple->a);
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelManagerZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_BlockHashChannelManagerZ* tuple_conv = (LDKC2Tuple_BlockHashChannelManagerZ*)(tuple & ~1);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C2Tuple_BlockHashChannelManagerZ_get_a(tuple_conv).data);
+       return ret_arr;
+}
+
+static inline struct LDKChannelManager *C2Tuple_BlockHashChannelManagerZ_get_b(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR tuple){
+       return &tuple->b;
 }
-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((((uint64_t)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((uint64_t)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       uint64_t b_ref = (uint64_t)b_var.inner & ~1;
-       return b_ref;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelManagerZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_BlockHashChannelManagerZ* tuple_conv = (LDKC2Tuple_BlockHashChannelManagerZ*)(tuple & ~1);
+       LDKChannelManager ret_var = *C2Tuple_BlockHashChannelManagerZ_get_b(tuple_conv);
+       CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       uint64_t ret_ref = (uint64_t)ret_var.inner & ~1;
+       return ret_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);
-       uint64_t res_ref = (uint64_t)(&(*val->contents.result)) | 1;
-       return res_ref;
+       LDKC2Tuple_BlockHashChannelManagerZ* res_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelManagerZ), "LDKC2Tuple_BlockHashChannelManagerZ");
+       *res_conv = (*val->contents.result);
+       // Warning: we really need to clone here, but no clone is available for LDKC2Tuple_BlockHashChannelManagerZ
+       return ((uint64_t)res_conv) | 1;
 }
 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);
@@ -4698,28 +4757,46 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1RawInvoice_1u83
        ret->c = c_conv;
        return (uint64_t)ret;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *tuple = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(ptr & ~1);
-       LDKRawInvoice a_var = tuple->a;
-       CHECK((((uint64_t)a_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((uint64_t)&a_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       uint64_t a_ref = (uint64_t)a_var.inner & ~1;
-       return a_ref;
-}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *tuple = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(ptr & ~1);
-       int8_tArray b_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, b_arr, 0, 32, tuple->b.data);
-       return b_arr;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1get_1c(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *tuple = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(ptr & ~1);
-       LDKInvoiceSignature c_var = tuple->c;
-       CHECK((((uint64_t)c_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((uint64_t)&c_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       uint64_t c_ref = (uint64_t)c_var.inner & ~1;
-       return c_ref;
+static inline struct LDKRawInvoice C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple){
+       return RawInvoice_clone(&tuple->a);
 }
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* tuple_conv = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(tuple & ~1);
+       LDKRawInvoice ret_var = C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(tuple_conv);
+       CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       uint64_t ret_ref = (uint64_t)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+static inline struct LDKThirtyTwoBytes C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple){
+       return ThirtyTwoBytes_clone(&tuple->b);
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* tuple_conv = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(tuple & ~1);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(tuple_conv).data);
+       return ret_arr;
+}
+
+static inline struct LDKInvoiceSignature C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple){
+       return InvoiceSignature_clone(&tuple->c);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1get_1c(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* tuple_conv = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(tuple & ~1);
+       LDKInvoiceSignature ret_var = C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(tuple_conv);
+       CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       uint64_t ret_ref = (uint64_t)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PayeePubKeyErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
        return ((LDKCResult_PayeePubKeyErrorZ*)arg)->result_ok;
 }
@@ -4958,21 +5035,33 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1OutPointScriptZ
        ret->b = b_ref;
        return (uint64_t)ret;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1OutPointScriptZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_OutPointScriptZ *tuple = (LDKC2Tuple_OutPointScriptZ*)(ptr & ~1);
-       LDKOutPoint a_var = tuple->a;
-       CHECK((((uint64_t)a_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((uint64_t)&a_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       uint64_t a_ref = (uint64_t)a_var.inner & ~1;
-       return a_ref;
-}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1OutPointScriptZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_OutPointScriptZ *tuple = (LDKC2Tuple_OutPointScriptZ*)(ptr & ~1);
-       LDKCVec_u8Z 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;
+static inline struct LDKOutPoint C2Tuple_OutPointScriptZ_get_a(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR tuple){
+       return OutPoint_clone(&tuple->a);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_OutPointScriptZ* tuple_conv = (LDKC2Tuple_OutPointScriptZ*)(tuple & ~1);
+       LDKOutPoint ret_var = C2Tuple_OutPointScriptZ_get_a(tuple_conv);
+       CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       uint64_t ret_ref = (uint64_t)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+static inline struct LDKCVec_u8Z C2Tuple_OutPointScriptZ_get_b(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR tuple){
+       return CVec_u8Z_clone(&tuple->b);
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_OutPointScriptZ* tuple_conv = (LDKC2Tuple_OutPointScriptZ*)(tuple & ~1);
+       LDKCVec_u8Z ret_var = C2Tuple_OutPointScriptZ_get_b(tuple_conv);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32ScriptZ_1new(JNIEnv *env, jclass clz, int32_t a, int8_tArray b) {
        LDKC2Tuple_u32ScriptZ* ret = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
        ret->a = a;
@@ -4983,17 +5072,27 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32ScriptZ_1new
        ret->b = b_ref;
        return (uint64_t)ret;
 }
-JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32ScriptZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_u32ScriptZ *tuple = (LDKC2Tuple_u32ScriptZ*)(ptr & ~1);
+static inline uint32_t C2Tuple_u32ScriptZ_get_a(LDKC2Tuple_u32ScriptZ *NONNULL_PTR tuple){
        return tuple->a;
 }
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32ScriptZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_u32ScriptZ *tuple = (LDKC2Tuple_u32ScriptZ*)(ptr & ~1);
-       LDKCVec_u8Z 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 int32_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32ScriptZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_u32ScriptZ* tuple_conv = (LDKC2Tuple_u32ScriptZ*)(tuple & ~1);
+       int32_t ret_val = C2Tuple_u32ScriptZ_get_a(tuple_conv);
+       return ret_val;
+}
+
+static inline struct LDKCVec_u8Z C2Tuple_u32ScriptZ_get_b(LDKC2Tuple_u32ScriptZ *NONNULL_PTR tuple){
+       return CVec_u8Z_clone(&tuple->b);
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32ScriptZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_u32ScriptZ* tuple_conv = (LDKC2Tuple_u32ScriptZ*)(tuple & ~1);
+       LDKCVec_u8Z ret_var = C2Tuple_u32ScriptZ_get_b(tuple_conv);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1u32ScriptZZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
        LDKCVec_C2Tuple_u32ScriptZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_u32ScriptZZ), "LDKCVec_C2Tuple_u32ScriptZZ");
        ret->datalen = (*env)->GetArrayLength(env, elems);
@@ -5032,34 +5131,44 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tup
        else
                b_constr.data = NULL;
        int64_t* b_vals = (*env)->GetLongArrayElements (env, b, NULL);
-       for (size_t b = 0; b < b_constr.datalen; b++) {
-               int64_t b_conv_27 = b_vals[b];
-               LDKC2Tuple_u32ScriptZ b_conv_27_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_27) & ~1);
-               b_conv_27_conv = C2Tuple_u32ScriptZ_clone((LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_27) & ~1));
-               b_constr.data[b] = b_conv_27_conv;
+       for (size_t v = 0; v < b_constr.datalen; v++) {
+               int64_t b_conv_21 = b_vals[v];
+               LDKC2Tuple_u32ScriptZ b_conv_21_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_21) & ~1);
+               b_conv_21_conv = C2Tuple_u32ScriptZ_clone((LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_21) & ~1));
+               b_constr.data[v] = b_conv_21_conv;
        }
        (*env)->ReleaseLongArrayElements(env, b, b_vals, 0);
        ret->b = b_constr;
        return (uint64_t)ret;
 }
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple_1u32ScriptZZZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *tuple = (LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(ptr & ~1);
-       int8_tArray a_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, a_arr, 0, 32, tuple->a.data);
-       return a_arr;
+static inline struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR tuple){
+       return ThirtyTwoBytes_clone(&tuple->a);
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32ScriptZZZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* tuple_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(tuple & ~1);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(tuple_conv).data);
+       return ret_arr;
+}
+
+static inline struct LDKCVec_C2Tuple_u32ScriptZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR tuple){
+       return CVec_C2Tuple_u32ScriptZZ_clone(&tuple->b);
 }
-JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple_1u32ScriptZZZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *tuple = (LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(ptr & ~1);
-       LDKCVec_C2Tuple_u32ScriptZZ b_var = tuple->b;
-       int64_tArray b_arr = (*env)->NewLongArray(env, b_var.datalen);
-       int64_t *b_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, b_arr, NULL);
-       for (size_t b = 0; b < b_var.datalen; b++) {
-               uint64_t b_conv_27_ref = (uint64_t)(&b_var.data[b]) | 1;
-               b_arr_ptr[b] = b_conv_27_ref;
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32ScriptZZZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* tuple_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(tuple & ~1);
+       LDKCVec_C2Tuple_u32ScriptZZ ret_var = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(tuple_conv);
+       int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
+       int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
+       for (size_t v = 0; v < ret_var.datalen; v++) {
+               LDKC2Tuple_u32ScriptZ* ret_conv_21_conv = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
+               *ret_conv_21_conv = ret_var.data[v];
+               ret_arr_ptr[v] = ((uint64_t)ret_conv_21_conv);
        }
-       (*env)->ReleasePrimitiveArrayCritical(env, b_arr, b_arr_ptr, 0);
-       return b_arr;
+       (*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_LDKCVec_1C2Tuple_1TxidCVec_1C2Tuple_1u32ScriptZZZZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
        LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ), "LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ");
        ret->datalen = (*env)->GetArrayLength(env, elems);
@@ -5358,15 +5467,25 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32TxOutZ_1new(
        ret->b = b_conv;
        return (uint64_t)ret;
 }
-JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32TxOutZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_u32TxOutZ *tuple = (LDKC2Tuple_u32TxOutZ*)(ptr & ~1);
+static inline uint32_t C2Tuple_u32TxOutZ_get_a(LDKC2Tuple_u32TxOutZ *NONNULL_PTR tuple){
        return tuple->a;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32TxOutZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_u32TxOutZ *tuple = (LDKC2Tuple_u32TxOutZ*)(ptr & ~1);
-       uint64_t b_ref = ((uint64_t)&tuple->b) | 1;
-       return (uint64_t)b_ref;
+JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32TxOutZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_u32TxOutZ* tuple_conv = (LDKC2Tuple_u32TxOutZ*)(tuple & ~1);
+       int32_t ret_val = C2Tuple_u32TxOutZ_get_a(tuple_conv);
+       return ret_val;
+}
+
+static inline struct LDKTxOut C2Tuple_u32TxOutZ_get_b(LDKC2Tuple_u32TxOutZ *NONNULL_PTR tuple){
+       return TxOut_clone(&tuple->b);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32TxOutZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_u32TxOutZ* tuple_conv = (LDKC2Tuple_u32TxOutZ*)(tuple & ~1);
+       LDKTxOut* ret_ref = MALLOC(sizeof(LDKTxOut), "LDKTxOut");
+       *ret_ref = C2Tuple_u32TxOutZ_get_b(tuple_conv);
+       return (uint64_t)ret_ref;
 }
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1u32TxOutZZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
        LDKCVec_C2Tuple_u32TxOutZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_u32TxOutZZ), "LDKCVec_C2Tuple_u32TxOutZZ");
        ret->datalen = (*env)->GetArrayLength(env, elems);
@@ -5405,34 +5524,44 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tup
        else
                b_constr.data = NULL;
        int64_t* b_vals = (*env)->GetLongArrayElements (env, b, NULL);
-       for (size_t a = 0; a < b_constr.datalen; a++) {
-               int64_t b_conv_26 = b_vals[a];
-               LDKC2Tuple_u32TxOutZ b_conv_26_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_26) & ~1);
-               b_conv_26_conv = C2Tuple_u32TxOutZ_clone((LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_26) & ~1));
-               b_constr.data[a] = b_conv_26_conv;
+       for (size_t u = 0; u < b_constr.datalen; u++) {
+               int64_t b_conv_20 = b_vals[u];
+               LDKC2Tuple_u32TxOutZ b_conv_20_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_20) & ~1);
+               b_conv_20_conv = C2Tuple_u32TxOutZ_clone((LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_20) & ~1));
+               b_constr.data[u] = b_conv_20_conv;
        }
        (*env)->ReleaseLongArrayElements(env, b, b_vals, 0);
        ret->b = b_constr;
        return (uint64_t)ret;
 }
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *tuple = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(ptr & ~1);
-       int8_tArray a_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, a_arr, 0, 32, tuple->a.data);
-       return a_arr;
+static inline struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR tuple){
+       return ThirtyTwoBytes_clone(&tuple->a);
 }
-JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *tuple = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(ptr & ~1);
-       LDKCVec_C2Tuple_u32TxOutZZ b_var = tuple->b;
-       int64_tArray b_arr = (*env)->NewLongArray(env, b_var.datalen);
-       int64_t *b_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, b_arr, NULL);
-       for (size_t a = 0; a < b_var.datalen; a++) {
-               uint64_t b_conv_26_ref = (uint64_t)(&b_var.data[a]) | 1;
-               b_arr_ptr[a] = b_conv_26_ref;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* tuple_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(tuple & ~1);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(tuple_conv).data);
+       return ret_arr;
+}
+
+static inline struct LDKCVec_C2Tuple_u32TxOutZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR tuple){
+       return CVec_C2Tuple_u32TxOutZZ_clone(&tuple->b);
+}
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* tuple_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(tuple & ~1);
+       LDKCVec_C2Tuple_u32TxOutZZ ret_var = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(tuple_conv);
+       int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
+       int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
+       for (size_t u = 0; u < ret_var.datalen; u++) {
+               LDKC2Tuple_u32TxOutZ* ret_conv_20_conv = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
+               *ret_conv_20_conv = ret_var.data[u];
+               ret_arr_ptr[u] = ((uint64_t)ret_conv_20_conv);
        }
-       (*env)->ReleasePrimitiveArrayCritical(env, b_arr, b_arr_ptr, 0);
-       return b_arr;
+       (*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_LDKCVec_1C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
        LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ), "LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ");
        ret->datalen = (*env)->GetArrayLength(env, elems);
@@ -5537,8 +5666,10 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1Block
 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);
-       uint64_t res_ref = (uint64_t)(&(*val->contents.result)) | 1;
-       return res_ref;
+       LDKC2Tuple_BlockHashChannelMonitorZ* res_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
+       *res_conv = (*val->contents.result);
+       *res_conv = C2Tuple_BlockHashChannelMonitorZ_clone(res_conv);
+       return ((uint64_t)res_conv);
 }
 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);
@@ -5577,18 +5708,26 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1PublicKeyTypeZ_
        ret->b = b_conv;
        return (uint64_t)ret;
 }
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1PublicKeyTypeZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_PublicKeyTypeZ *tuple = (LDKC2Tuple_PublicKeyTypeZ*)(ptr & ~1);
-       int8_tArray a_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, a_arr, 0, 33, tuple->a.compressed_form);
-       return a_arr;
+static inline struct LDKPublicKey C2Tuple_PublicKeyTypeZ_get_a(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR tuple){
+       return tuple->a;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1PublicKeyTypeZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_PublicKeyTypeZ *tuple = (LDKC2Tuple_PublicKeyTypeZ*)(ptr & ~1);
-       LDKType* b_ret =MALLOC(sizeof(LDKType), "LDKType");
-       *b_ret = Type_clone(&tuple->b);
-       return (uint64_t)b_ret;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyTypeZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_PublicKeyTypeZ* tuple_conv = (LDKC2Tuple_PublicKeyTypeZ*)(tuple & ~1);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, C2Tuple_PublicKeyTypeZ_get_a(tuple_conv).compressed_form);
+       return ret_arr;
 }
+
+static inline struct LDKType C2Tuple_PublicKeyTypeZ_get_b(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR tuple){
+       return Type_clone(&tuple->b);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyTypeZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_PublicKeyTypeZ* tuple_conv = (LDKC2Tuple_PublicKeyTypeZ*)(tuple & ~1);
+       LDKType* ret_ret =MALLOC(sizeof(LDKType), "LDKType");
+       *ret_ret = C2Tuple_PublicKeyTypeZ_get_b(tuple_conv);
+       return (uint64_t)ret_ret;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1PublicKeyTypeZZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
        LDKCVec_C2Tuple_PublicKeyTypeZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_PublicKeyTypeZZ), "LDKCVec_C2Tuple_PublicKeyTypeZZ");
        ret->datalen = (*env)->GetArrayLength(env, elems);
@@ -5650,30 +5789,51 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnounce
        ret->c = c_conv;
        return (uint64_t)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((((uint64_t)a_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((uint64_t)&a_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       uint64_t a_ref = (uint64_t)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((((uint64_t)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((uint64_t)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       uint64_t b_ref = (uint64_t)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((((uint64_t)c_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((uint64_t)&c_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       uint64_t c_ref = (uint64_t)c_var.inner & ~1;
-       return c_ref;
+static inline struct LDKChannelAnnouncement C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple){
+       return ChannelAnnouncement_clone(&tuple->a);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* tuple_conv = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(tuple & ~1);
+       LDKChannelAnnouncement ret_var = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(tuple_conv);
+       CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       uint64_t ret_ref = (uint64_t)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+static inline struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple){
+       return ChannelUpdate_clone(&tuple->b);
 }
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* tuple_conv = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(tuple & ~1);
+       LDKChannelUpdate ret_var = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(tuple_conv);
+       CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       uint64_t ret_ref = (uint64_t)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+static inline struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple){
+       return ChannelUpdate_clone(&tuple->c);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1c(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* tuple_conv = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(tuple & ~1);
+       LDKChannelUpdate ret_var = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(tuple_conv);
+       CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       uint64_t ret_ref = (uint64_t)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_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);
@@ -7507,10 +7667,10 @@ void transactions_confirmed_LDKConfirm_jcall(const void* this_arg, const uint8_t
        LDKCVec_C2Tuple_usizeTransactionZZ txdata_var = txdata;
        int64_tArray txdata_arr = (*env)->NewLongArray(env, txdata_var.datalen);
        int64_t *txdata_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, txdata_arr, NULL);
-       for (size_t y = 0; y < txdata_var.datalen; y++) {
-               LDKC2Tuple_usizeTransactionZ* txdata_conv_24_ref = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
-               *txdata_conv_24_ref = txdata_var.data[y];
-               txdata_arr_ptr[y] = (uint64_t)txdata_conv_24_ref;
+       for (size_t c = 0; c < txdata_var.datalen; c++) {
+               LDKC2Tuple_usizeTransactionZ* txdata_conv_28_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
+               *txdata_conv_28_conv = txdata_var.data[c];
+               txdata_arr_ptr[c] = ((uint64_t)txdata_conv_28_conv);
        }
        (*env)->ReleasePrimitiveArrayCritical(env, txdata_arr, txdata_arr_ptr, 0);
        FREE(txdata_var.data);
@@ -7651,11 +7811,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Confirm_1transactions_1confirm
        else
                txdata_constr.data = NULL;
        int64_t* txdata_vals = (*env)->GetLongArrayElements (env, txdata, NULL);
-       for (size_t y = 0; y < txdata_constr.datalen; y++) {
-               int64_t txdata_conv_24 = txdata_vals[y];
-               LDKC2Tuple_usizeTransactionZ txdata_conv_24_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_24) & ~1);
-               txdata_conv_24_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_24) & ~1));
-               txdata_constr.data[y] = txdata_conv_24_conv;
+       for (size_t c = 0; c < txdata_constr.datalen; c++) {
+               int64_t txdata_conv_28 = txdata_vals[c];
+               LDKC2Tuple_usizeTransactionZ txdata_conv_28_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1);
+               txdata_conv_28_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1));
+               txdata_constr.data[c] = txdata_conv_28_conv;
        }
        (*env)->ReleaseLongArrayElements(env, txdata, txdata_vals, 0);
        (this_arg_conv->transactions_confirmed)(this_arg_conv->this_arg, header_ref, txdata_constr, height);
@@ -8987,11 +9147,11 @@ LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ get_next_channel
        else
                ret_constr.data = NULL;
        int64_t* ret_vals = (*env)->GetLongArrayElements (env, ret, NULL);
-       for (size_t l = 0; l < ret_constr.datalen; l++) {
-               int64_t ret_conv_63 = ret_vals[l];
-               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ ret_conv_63_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)ret_conv_63) & ~1);
-               ret_conv_63_conv = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone((LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)ret_conv_63) & ~1));
-               ret_constr.data[l] = ret_conv_63_conv;
+       for (size_t h = 0; h < ret_constr.datalen; h++) {
+               int64_t ret_conv_59 = ret_vals[h];
+               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ ret_conv_59_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)ret_conv_59) & ~1);
+               ret_conv_59_conv = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone((LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)ret_conv_59) & ~1));
+               ret_constr.data[h] = ret_conv_59_conv;
        }
        (*env)->ReleaseLongArrayElements(env, ret, ret_vals, 0);
        if (get_jenv_res == JNI_EDETACHED) {
@@ -9293,10 +9453,10 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_
        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* ret_conv_63_ref = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
-               *ret_conv_63_ref = ret_var.data[l];
-               ret_arr_ptr[l] = (uint64_t)ret_conv_63_ref;
+       for (size_t h = 0; h < ret_var.datalen; h++) {
+               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_conv_59_conv = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
+               *ret_conv_59_conv = ret_var.data[h];
+               ret_arr_ptr[h] = ((uint64_t)ret_conv_59_conv);
        }
        (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
        FREE(ret_var.data);
@@ -9554,11 +9714,11 @@ LDKCVec_C2Tuple_PublicKeyTypeZZ get_and_clear_pending_msg_LDKCustomMessageHandle
        else
                ret_constr.data = NULL;
        int64_t* ret_vals = (*env)->GetLongArrayElements (env, ret, NULL);
-       for (size_t y = 0; y < ret_constr.datalen; y++) {
-               int64_t ret_conv_24 = ret_vals[y];
-               LDKC2Tuple_PublicKeyTypeZ ret_conv_24_conv = *(LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)ret_conv_24) & ~1);
-               ret_conv_24_conv = C2Tuple_PublicKeyTypeZ_clone((LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)ret_conv_24) & ~1));
-               ret_constr.data[y] = ret_conv_24_conv;
+       for (size_t z = 0; z < ret_constr.datalen; z++) {
+               int64_t ret_conv_25 = ret_vals[z];
+               LDKC2Tuple_PublicKeyTypeZ ret_conv_25_conv = *(LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)ret_conv_25) & ~1);
+               ret_conv_25_conv = C2Tuple_PublicKeyTypeZ_clone((LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)ret_conv_25) & ~1));
+               ret_constr.data[z] = ret_conv_25_conv;
        }
        (*env)->ReleaseLongArrayElements(env, ret, ret_vals, 0);
        if (get_jenv_res == JNI_EDETACHED) {
@@ -9624,10 +9784,10 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_CustomMessageHandler_1
        LDKCVec_C2Tuple_PublicKeyTypeZZ ret_var = (this_arg_conv->get_and_clear_pending_msg)(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 y = 0; y < ret_var.datalen; y++) {
-               LDKC2Tuple_PublicKeyTypeZ* ret_conv_24_ref = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
-               *ret_conv_24_ref = ret_var.data[y];
-               ret_arr_ptr[y] = (uint64_t)ret_conv_24_ref;
+       for (size_t z = 0; z < ret_var.datalen; z++) {
+               LDKC2Tuple_PublicKeyTypeZ* ret_conv_25_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
+               *ret_conv_25_conv = ret_var.data[z];
+               ret_arr_ptr[z] = ((uint64_t)ret_conv_25_conv);
        }
        (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
        FREE(ret_var.data);
@@ -10816,9 +10976,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
        LDKC2Tuple_usizeTransactionZ* orig_conv = (LDKC2Tuple_usizeTransactionZ*)(orig & ~1);
-       LDKC2Tuple_usizeTransactionZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
-       *ret_ref = C2Tuple_usizeTransactionZ_clone(orig_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_usizeTransactionZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
+       *ret_conv = C2Tuple_usizeTransactionZ_clone(orig_conv);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1new(JNIEnv *env, jclass clz, int64_t a, int8_tArray b) {
@@ -10827,9 +10987,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_
        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 = true;
-       LDKC2Tuple_usizeTransactionZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
-       *ret_ref = C2Tuple_usizeTransactionZ_new(a, b_ref);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_usizeTransactionZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
+       *ret_conv = C2Tuple_usizeTransactionZ_new(a, b_ref);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
@@ -10847,11 +11007,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1usizeTransactio
        else
                _res_constr.data = NULL;
        int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
-       for (size_t y = 0; y < _res_constr.datalen; y++) {
-               int64_t _res_conv_24 = _res_vals[y];
-               LDKC2Tuple_usizeTransactionZ _res_conv_24_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)_res_conv_24) & ~1);
-               FREE((void*)_res_conv_24);
-               _res_constr.data[y] = _res_conv_24_conv;
+       for (size_t c = 0; c < _res_constr.datalen; c++) {
+               int64_t _res_conv_28 = _res_vals[c];
+               LDKC2Tuple_usizeTransactionZ _res_conv_28_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)_res_conv_28) & ~1);
+               FREE((void*)_res_conv_28);
+               _res_constr.data[c] = _res_conv_28_conv;
        }
        (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
        CVec_C2Tuple_usizeTransactionZZ_free(_res_constr);
@@ -11253,9 +11413,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneNoneZ_1clone(J
 
 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");
-       *ret_ref = C2Tuple_SignatureCVec_SignatureZZ_clone(orig_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_SignatureCVec_SignatureZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
+       *ret_conv = C2Tuple_SignatureCVec_SignatureZZ_clone(orig_conv);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1new(JNIEnv *env, jclass clz, int8_tArray a, jobjectArray b) {
@@ -11275,9 +11435,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1Sig
                (*env)->GetByteArrayRegion(env, b_conv_8, 0, 64, b_conv_8_ref.compact_form);
                b_constr.data[i] = b_conv_8_ref;
        }
-       LDKC2Tuple_SignatureCVec_SignatureZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
-       *ret_ref = C2Tuple_SignatureCVec_SignatureZZ_new(a_ref, b_constr);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_SignatureCVec_SignatureZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
+       *ret_conv = C2Tuple_SignatureCVec_SignatureZZ_new(a_ref, b_constr);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
@@ -11557,6 +11717,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1
        return (uint64_t)ret_conv;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMonitorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKC2Tuple_BlockHashChannelMonitorZ* orig_conv = (LDKC2Tuple_BlockHashChannelMonitorZ*)(orig & ~1);
+       LDKC2Tuple_BlockHashChannelMonitorZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
+       *ret_conv = C2Tuple_BlockHashChannelMonitorZ_clone(orig_conv);
+       return ((uint64_t)ret_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);
@@ -11565,9 +11732,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMo
        b_conv.inner = (void*)(b & (~1));
        b_conv.is_owned = (b & 1) || (b == 0);
        b_conv = ChannelMonitor_clone(&b_conv);
-       LDKC2Tuple_BlockHashChannelMonitorZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
-       *ret_ref = C2Tuple_BlockHashChannelMonitorZ_new(a_ref, b_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_BlockHashChannelMonitorZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
+       *ret_conv = C2Tuple_BlockHashChannelMonitorZ_new(a_ref, b_conv);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMonitorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
@@ -11585,11 +11752,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1BlockHashChanne
        else
                _res_constr.data = NULL;
        int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
-       for (size_t i = 0; i < _res_constr.datalen; i++) {
-               int64_t _res_conv_34 = _res_vals[i];
-               LDKC2Tuple_BlockHashChannelMonitorZ _res_conv_34_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)_res_conv_34) & ~1);
-               FREE((void*)_res_conv_34);
-               _res_constr.data[i] = _res_conv_34_conv;
+       for (size_t j = 0; j < _res_constr.datalen; j++) {
+               int64_t _res_conv_35 = _res_vals[j];
+               LDKC2Tuple_BlockHashChannelMonitorZ _res_conv_35_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)_res_conv_35) & ~1);
+               FREE((void*)_res_conv_35);
+               _res_constr.data[j] = _res_conv_35_conv;
        }
        (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
        CVec_C2Tuple_BlockHashChannelMonitorZZ_free(_res_constr);
@@ -11603,11 +11770,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1C2Tuple_1Blo
        else
                o_constr.data = NULL;
        int64_t* o_vals = (*env)->GetLongArrayElements (env, o, NULL);
-       for (size_t i = 0; i < o_constr.datalen; i++) {
-               int64_t o_conv_34 = o_vals[i];
-               LDKC2Tuple_BlockHashChannelMonitorZ o_conv_34_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o_conv_34) & ~1);
-               // Warning: we may need a move here but no clone is available for LDKC2Tuple_BlockHashChannelMonitorZ
-               o_constr.data[i] = o_conv_34_conv;
+       for (size_t j = 0; j < o_constr.datalen; j++) {
+               int64_t o_conv_35 = o_vals[j];
+               LDKC2Tuple_BlockHashChannelMonitorZ o_conv_35_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o_conv_35) & ~1);
+               o_conv_35_conv = C2Tuple_BlockHashChannelMonitorZ_clone((LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o_conv_35) & ~1));
+               o_constr.data[j] = o_conv_35_conv;
        }
        (*env)->ReleaseLongArrayElements(env, o, o_vals, 0);
        LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ), "LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ");
@@ -11629,6 +11796,13 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1C2Tuple_1BlockH
        CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(_res_conv);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1C2Tuple_1BlockHashChannelMonitorZZErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ* orig_conv = (LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ*)(orig & ~1);
+       LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ), "LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ");
+       *ret_conv = CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(orig_conv);
+       return (uint64_t)ret_conv;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1u16Z_1some(JNIEnv *env, jclass clz, int16_t o) {
        LDKCOption_u16Z *ret_copy = MALLOC(sizeof(LDKCOption_u16Z), "LDKCOption_u16Z");
        *ret_copy = COption_u16Z_some(o);
@@ -11801,9 +11975,9 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1NetAddressZ_1free(JNIEnv
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PaymentHashPaymentSecretZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
        LDKC2Tuple_PaymentHashPaymentSecretZ* orig_conv = (LDKC2Tuple_PaymentHashPaymentSecretZ*)(orig & ~1);
-       LDKC2Tuple_PaymentHashPaymentSecretZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
-       *ret_ref = C2Tuple_PaymentHashPaymentSecretZ_clone(orig_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_PaymentHashPaymentSecretZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
+       *ret_conv = C2Tuple_PaymentHashPaymentSecretZ_clone(orig_conv);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PaymentHashPaymentSecretZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int8_tArray b) {
@@ -11813,9 +11987,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PaymentHashPayment
        LDKThirtyTwoBytes b_ref;
        CHECK((*env)->GetArrayLength(env, b) == 32);
        (*env)->GetByteArrayRegion(env, b, 0, 32, b_ref.data);
-       LDKC2Tuple_PaymentHashPaymentSecretZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
-       *ret_ref = C2Tuple_PaymentHashPaymentSecretZ_new(a_ref, b_ref);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_PaymentHashPaymentSecretZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
+       *ret_conv = C2Tuple_PaymentHashPaymentSecretZ_new(a_ref, b_ref);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PaymentHashPaymentSecretZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
@@ -11883,9 +12057,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMa
        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 (uint64_t)ret_ref;
+       LDKC2Tuple_BlockHashChannelManagerZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelManagerZ), "LDKC2Tuple_BlockHashChannelManagerZ");
+       *ret_conv = C2Tuple_BlockHashChannelManagerZ_new(a_ref, b_conv);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelManagerZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
@@ -12143,9 +12317,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SignedRawInvoiceNo
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
        LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* orig_conv = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(orig & ~1);
-       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
-       *ret_ref = C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(orig_conv);
-       return (uint64_t)ret_ref;
+       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
+       *ret_conv = C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(orig_conv);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1new(JNIEnv *env, jclass clz, int64_t a, int8_tArray b, int64_t c) {
@@ -12160,9 +12334,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1RawInvoice_1u832In
        c_conv.inner = (void*)(c & (~1));
        c_conv.is_owned = (c & 1) || (c == 0);
        c_conv = InvoiceSignature_clone(&c_conv);
-       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
-       *ret_ref = C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(a_conv, b_ref, c_conv);
-       return (uint64_t)ret_ref;
+       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
+       *ret_conv = C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(a_conv, b_ref, c_conv);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
@@ -12525,9 +12699,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateE
 
 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 (uint64_t)ret_ref;
+       LDKC2Tuple_OutPointScriptZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
+       *ret_conv = C2Tuple_OutPointScriptZ_clone(orig_conv);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1new(JNIEnv *env, jclass clz, int64_t a, int8_tArray b) {
@@ -12539,9 +12713,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1n
        b_ref.datalen = (*env)->GetArrayLength(env, b);
        b_ref.data = MALLOC(b_ref.datalen, "LDKCVec_u8Z Bytes");
        (*env)->GetByteArrayRegion(env, b, 0, b_ref.datalen, b_ref.data);
-       LDKC2Tuple_OutPointScriptZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
-       *ret_ref = C2Tuple_OutPointScriptZ_new(a_conv, b_ref);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_OutPointScriptZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
+       *ret_conv = C2Tuple_OutPointScriptZ_new(a_conv, b_ref);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
@@ -12553,9 +12727,9 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1free
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32ScriptZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
        LDKC2Tuple_u32ScriptZ* orig_conv = (LDKC2Tuple_u32ScriptZ*)(orig & ~1);
-       LDKC2Tuple_u32ScriptZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
-       *ret_ref = C2Tuple_u32ScriptZ_clone(orig_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_u32ScriptZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
+       *ret_conv = C2Tuple_u32ScriptZ_clone(orig_conv);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32ScriptZ_1new(JNIEnv *env, jclass clz, int32_t a, int8_tArray b) {
@@ -12563,9 +12737,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32ScriptZ_1new(JN
        b_ref.datalen = (*env)->GetArrayLength(env, b);
        b_ref.data = MALLOC(b_ref.datalen, "LDKCVec_u8Z Bytes");
        (*env)->GetByteArrayRegion(env, b, 0, b_ref.datalen, b_ref.data);
-       LDKC2Tuple_u32ScriptZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
-       *ret_ref = C2Tuple_u32ScriptZ_new(a, b_ref);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_u32ScriptZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
+       *ret_conv = C2Tuple_u32ScriptZ_new(a, b_ref);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32ScriptZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
@@ -12583,11 +12757,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1u32ScriptZZ_1fr
        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 _res_conv_27 = _res_vals[b];
-               LDKC2Tuple_u32ScriptZ _res_conv_27_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)_res_conv_27) & ~1);
-               FREE((void*)_res_conv_27);
-               _res_constr.data[b] = _res_conv_27_conv;
+       for (size_t v = 0; v < _res_constr.datalen; v++) {
+               int64_t _res_conv_21 = _res_vals[v];
+               LDKC2Tuple_u32ScriptZ _res_conv_21_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)_res_conv_21) & ~1);
+               FREE((void*)_res_conv_21);
+               _res_constr.data[v] = _res_conv_21_conv;
        }
        (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
        CVec_C2Tuple_u32ScriptZZ_free(_res_constr);
@@ -12595,9 +12769,9 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1u32ScriptZZ_1fr
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32ScriptZZZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
        LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* orig_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(orig & ~1);
-       LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
-       *ret_ref = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(orig_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
+       *ret_conv = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(orig_conv);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32ScriptZZZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int64_tArray b) {
@@ -12611,16 +12785,16 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_
        else
                b_constr.data = NULL;
        int64_t* b_vals = (*env)->GetLongArrayElements (env, b, NULL);
-       for (size_t b = 0; b < b_constr.datalen; b++) {
-               int64_t b_conv_27 = b_vals[b];
-               LDKC2Tuple_u32ScriptZ b_conv_27_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_27) & ~1);
-               b_conv_27_conv = C2Tuple_u32ScriptZ_clone((LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_27) & ~1));
-               b_constr.data[b] = b_conv_27_conv;
+       for (size_t v = 0; v < b_constr.datalen; v++) {
+               int64_t b_conv_21 = b_vals[v];
+               LDKC2Tuple_u32ScriptZ b_conv_21_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_21) & ~1);
+               b_conv_21_conv = C2Tuple_u32ScriptZ_clone((LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_21) & ~1));
+               b_constr.data[v] = b_conv_21_conv;
        }
        (*env)->ReleaseLongArrayElements(env, b, b_vals, 0);
-       LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
-       *ret_ref = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a_ref, b_constr);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
+       *ret_conv = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a_ref, b_constr);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32ScriptZZZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
@@ -12638,11 +12812,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1TxidCVec_1C2Tup
        else
                _res_constr.data = NULL;
        int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
-       for (size_t v = 0; v < _res_constr.datalen; v++) {
-               int64_t _res_conv_47 = _res_vals[v];
-               LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res_conv_47_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(((uint64_t)_res_conv_47) & ~1);
-               FREE((void*)_res_conv_47);
-               _res_constr.data[v] = _res_conv_47_conv;
+       for (size_t o = 0; o < _res_constr.datalen; o++) {
+               int64_t _res_conv_40 = _res_vals[o];
+               LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res_conv_40_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(((uint64_t)_res_conv_40) & ~1);
+               FREE((void*)_res_conv_40);
+               _res_constr.data[o] = _res_conv_40_conv;
        }
        (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
        CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res_constr);
@@ -12687,17 +12861,17 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TransactionZ_1free(JNIEn
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32TxOutZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
        LDKC2Tuple_u32TxOutZ* orig_conv = (LDKC2Tuple_u32TxOutZ*)(orig & ~1);
-       LDKC2Tuple_u32TxOutZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
-       *ret_ref = C2Tuple_u32TxOutZ_clone(orig_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_u32TxOutZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
+       *ret_conv = C2Tuple_u32TxOutZ_clone(orig_conv);
+       return ((uint64_t)ret_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);
        b_conv = TxOut_clone((LDKTxOut*)(((uint64_t)b) & ~1));
-       LDKC2Tuple_u32TxOutZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
-       *ret_ref = C2Tuple_u32TxOutZ_new(a, b_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_u32TxOutZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
+       *ret_conv = C2Tuple_u32TxOutZ_new(a, b_conv);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32TxOutZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
@@ -12715,11 +12889,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1u32TxOutZZ_1fre
        else
                _res_constr.data = NULL;
        int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
-       for (size_t a = 0; a < _res_constr.datalen; a++) {
-               int64_t _res_conv_26 = _res_vals[a];
-               LDKC2Tuple_u32TxOutZ _res_conv_26_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)_res_conv_26) & ~1);
-               FREE((void*)_res_conv_26);
-               _res_constr.data[a] = _res_conv_26_conv;
+       for (size_t u = 0; u < _res_constr.datalen; u++) {
+               int64_t _res_conv_20 = _res_vals[u];
+               LDKC2Tuple_u32TxOutZ _res_conv_20_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)_res_conv_20) & ~1);
+               FREE((void*)_res_conv_20);
+               _res_constr.data[u] = _res_conv_20_conv;
        }
        (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
        CVec_C2Tuple_u32TxOutZZ_free(_res_constr);
@@ -12727,9 +12901,9 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1u32TxOutZZ_1fre
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
        LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* orig_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(orig & ~1);
-       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
-       *ret_ref = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+       *ret_conv = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig_conv);
+       return ((uint64_t)ret_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) {
@@ -12743,16 +12917,16 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_
        else
                b_constr.data = NULL;
        int64_t* b_vals = (*env)->GetLongArrayElements (env, b, NULL);
-       for (size_t a = 0; a < b_constr.datalen; a++) {
-               int64_t b_conv_26 = b_vals[a];
-               LDKC2Tuple_u32TxOutZ b_conv_26_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_26) & ~1);
-               b_conv_26_conv = C2Tuple_u32TxOutZ_clone((LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_26) & ~1));
-               b_constr.data[a] = b_conv_26_conv;
+       for (size_t u = 0; u < b_constr.datalen; u++) {
+               int64_t b_conv_20 = b_vals[u];
+               LDKC2Tuple_u32TxOutZ b_conv_20_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_20) & ~1);
+               b_conv_20_conv = C2Tuple_u32TxOutZ_clone((LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_20) & ~1));
+               b_constr.data[u] = b_conv_20_conv;
        }
        (*env)->ReleaseLongArrayElements(env, b, b_vals, 0);
-       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
-       *ret_ref = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a_ref, b_constr);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+       *ret_conv = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a_ref, b_constr);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
@@ -12770,11 +12944,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1TxidCVec_1C2Tup
        else
                _res_constr.data = NULL;
        int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
-       for (size_t u = 0; u < _res_constr.datalen; u++) {
-               int64_t _res_conv_46 = _res_vals[u];
-               LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res_conv_46_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(((uint64_t)_res_conv_46) & ~1);
-               FREE((void*)_res_conv_46);
-               _res_constr.data[u] = _res_conv_46_conv;
+       for (size_t n = 0; n < _res_constr.datalen; n++) {
+               int64_t _res_conv_39 = _res_vals[n];
+               LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res_conv_39_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(((uint64_t)_res_conv_39) & ~1);
+               FREE((void*)_res_conv_39);
+               _res_constr.data[n] = _res_conv_39_conv;
        }
        (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
        CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res_constr);
@@ -12800,7 +12974,7 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1BalanceZ_1free(JNIEnv *e
 
 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);
-       // Warning: we may need a move here but no clone is available for LDKC2Tuple_BlockHashChannelMonitorZ
+       o_conv = C2Tuple_BlockHashChannelMonitorZ_clone((LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o) & ~1));
        LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ");
        *ret_conv = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o_conv);
        return (uint64_t)ret_conv;
@@ -12823,6 +12997,13 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashCha
        CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res_conv);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* orig_conv = (LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)(orig & ~1);
+       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ");
+       *ret_conv = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(orig_conv);
+       return (uint64_t)ret_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 = CResult_NoneLightningErrorZ_ok();
@@ -12855,9 +13036,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneLightningError
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyTypeZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
        LDKC2Tuple_PublicKeyTypeZ* orig_conv = (LDKC2Tuple_PublicKeyTypeZ*)(orig & ~1);
-       LDKC2Tuple_PublicKeyTypeZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
-       *ret_ref = C2Tuple_PublicKeyTypeZ_clone(orig_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_PublicKeyTypeZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
+       *ret_conv = C2Tuple_PublicKeyTypeZ_clone(orig_conv);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyTypeZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int64_t b) {
@@ -12869,9 +13050,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyTypeZ_1ne
                // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
                LDKType_JCalls_cloned(&b_conv);
        }
-       LDKC2Tuple_PublicKeyTypeZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
-       *ret_ref = C2Tuple_PublicKeyTypeZ_new(a_ref, b_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_PublicKeyTypeZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
+       *ret_conv = C2Tuple_PublicKeyTypeZ_new(a_ref, b_conv);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyTypeZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
@@ -12889,11 +13070,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1PublicKeyTypeZZ
        else
                _res_constr.data = NULL;
        int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
-       for (size_t y = 0; y < _res_constr.datalen; y++) {
-               int64_t _res_conv_24 = _res_vals[y];
-               LDKC2Tuple_PublicKeyTypeZ _res_conv_24_conv = *(LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)_res_conv_24) & ~1);
-               FREE((void*)_res_conv_24);
-               _res_constr.data[y] = _res_conv_24_conv;
+       for (size_t z = 0; z < _res_constr.datalen; z++) {
+               int64_t _res_conv_25 = _res_vals[z];
+               LDKC2Tuple_PublicKeyTypeZ _res_conv_25_conv = *(LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)_res_conv_25) & ~1);
+               FREE((void*)_res_conv_25);
+               _res_constr.data[z] = _res_conv_25_conv;
        }
        (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
        CVec_C2Tuple_PublicKeyTypeZZ_free(_res_constr);
@@ -12931,9 +13112,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningError
 
 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 (uint64_t)ret_ref;
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
+       *ret_conv = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig_conv);
+       return ((uint64_t)ret_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) {
@@ -12949,9 +13130,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncemen
        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 (uint64_t)ret_ref;
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
+       *ret_conv = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a_conv, b_conv, c_conv);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
@@ -12969,11 +13150,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C3Tuple_1ChannelAnnounce
        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 _res_conv_63 = _res_vals[l];
-               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res_conv_63_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)_res_conv_63) & ~1);
-               FREE((void*)_res_conv_63);
-               _res_constr.data[l] = _res_conv_63_conv;
+       for (size_t h = 0; h < _res_constr.datalen; h++) {
+               int64_t _res_conv_59 = _res_vals[h];
+               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res_conv_59_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)_res_conv_59) & ~1);
+               FREE((void*)_res_conv_59);
+               _res_constr.data[h] = _res_conv_59_conv;
        }
        (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
        CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res_constr);
@@ -13325,7 +13506,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecode
        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
+       o_conv = NetworkGraph_clone(&o_conv);
        LDKCResult_NetworkGraphDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetworkGraphDecodeErrorZ), "LDKCResult_NetworkGraphDecodeErrorZ");
        *ret_conv = CResult_NetworkGraphDecodeErrorZ_ok(o_conv);
        return (uint64_t)ret_conv;
@@ -13348,6 +13529,13 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecodeErr
        CResult_NetworkGraphDecodeErrorZ_free(_res_conv);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_NetworkGraphDecodeErrorZ* orig_conv = (LDKCResult_NetworkGraphDecodeErrorZ*)(orig & ~1);
+       LDKCResult_NetworkGraphDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetworkGraphDecodeErrorZ), "LDKCResult_NetworkGraphDecodeErrorZ");
+       *ret_conv = CResult_NetworkGraphDecodeErrorZ_clone(orig_conv);
+       return (uint64_t)ret_conv;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NetAddressu8Z_1ok(JNIEnv *env, jclass clz, int64_t o) {
        LDKNetAddress o_conv = *(LDKNetAddress*)(((uint64_t)o) & ~1);
        o_conv = NetAddress_clone((LDKNetAddress*)(((uint64_t)o) & ~1));
@@ -16603,9 +16791,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1fundin
        LDKChannelMonitor this_arg_conv;
        this_arg_conv.inner = (void*)(this_arg & (~1));
        this_arg_conv.is_owned = false;
-       LDKC2Tuple_OutPointScriptZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
-       *ret_ref = ChannelMonitor_get_funding_txo(&this_arg_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_OutPointScriptZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
+       *ret_conv = ChannelMonitor_get_funding_txo(&this_arg_conv);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1outputs_1to_1watch(JNIEnv *env, jclass clz, int64_t this_arg) {
@@ -16615,10 +16803,10 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1o
        LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ ret_var = ChannelMonitor_get_outputs_to_watch(&this_arg_conv);
        int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
        int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
-       for (size_t v = 0; v < ret_var.datalen; v++) {
-               LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_conv_47_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
-               *ret_conv_47_ref = ret_var.data[v];
-               ret_arr_ptr[v] = (uint64_t)ret_conv_47_ref;
+       for (size_t o = 0; o < ret_var.datalen; o++) {
+               LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_conv_40_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
+               *ret_conv_40_conv = ret_var.data[o];
+               ret_arr_ptr[o] = ((uint64_t)ret_conv_40_conv);
        }
        (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
        FREE(ret_var.data);
@@ -16703,11 +16891,11 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1block_
        else
                txdata_constr.data = NULL;
        int64_t* txdata_vals = (*env)->GetLongArrayElements (env, txdata, NULL);
-       for (size_t y = 0; y < txdata_constr.datalen; y++) {
-               int64_t txdata_conv_24 = txdata_vals[y];
-               LDKC2Tuple_usizeTransactionZ txdata_conv_24_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_24) & ~1);
-               txdata_conv_24_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_24) & ~1));
-               txdata_constr.data[y] = txdata_conv_24_conv;
+       for (size_t c = 0; c < txdata_constr.datalen; c++) {
+               int64_t txdata_conv_28 = txdata_vals[c];
+               LDKC2Tuple_usizeTransactionZ txdata_conv_28_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1);
+               txdata_conv_28_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1));
+               txdata_constr.data[c] = txdata_conv_28_conv;
        }
        (*env)->ReleaseLongArrayElements(env, txdata, txdata_vals, 0);
        LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(((uint64_t)broadcaster) & ~1);
@@ -16728,10 +16916,10 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1block_
        LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ret_var = ChannelMonitor_block_connected(&this_arg_conv, header_ref, txdata_constr, height, broadcaster_conv, fee_estimator_conv, logger_conv);
        int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
        int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
-       for (size_t u = 0; u < ret_var.datalen; u++) {
-               LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_46_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
-               *ret_conv_46_ref = ret_var.data[u];
-               ret_arr_ptr[u] = (uint64_t)ret_conv_46_ref;
+       for (size_t n = 0; n < ret_var.datalen; n++) {
+               LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_39_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+               *ret_conv_39_conv = ret_var.data[n];
+               ret_arr_ptr[n] = ((uint64_t)ret_conv_39_conv);
        }
        (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
        FREE(ret_var.data);
@@ -16779,11 +16967,11 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1transa
        else
                txdata_constr.data = NULL;
        int64_t* txdata_vals = (*env)->GetLongArrayElements (env, txdata, NULL);
-       for (size_t y = 0; y < txdata_constr.datalen; y++) {
-               int64_t txdata_conv_24 = txdata_vals[y];
-               LDKC2Tuple_usizeTransactionZ txdata_conv_24_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_24) & ~1);
-               txdata_conv_24_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_24) & ~1));
-               txdata_constr.data[y] = txdata_conv_24_conv;
+       for (size_t c = 0; c < txdata_constr.datalen; c++) {
+               int64_t txdata_conv_28 = txdata_vals[c];
+               LDKC2Tuple_usizeTransactionZ txdata_conv_28_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1);
+               txdata_conv_28_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1));
+               txdata_constr.data[c] = txdata_conv_28_conv;
        }
        (*env)->ReleaseLongArrayElements(env, txdata, txdata_vals, 0);
        LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(((uint64_t)broadcaster) & ~1);
@@ -16804,10 +16992,10 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1transa
        LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ret_var = ChannelMonitor_transactions_confirmed(&this_arg_conv, header_ref, txdata_constr, height, broadcaster_conv, fee_estimator_conv, logger_conv);
        int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
        int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
-       for (size_t u = 0; u < ret_var.datalen; u++) {
-               LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_46_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
-               *ret_conv_46_ref = ret_var.data[u];
-               ret_arr_ptr[u] = (uint64_t)ret_conv_46_ref;
+       for (size_t n = 0; n < ret_var.datalen; n++) {
+               LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_39_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+               *ret_conv_39_conv = ret_var.data[n];
+               ret_arr_ptr[n] = ((uint64_t)ret_conv_39_conv);
        }
        (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
        FREE(ret_var.data);
@@ -16866,10 +17054,10 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1best_1
        LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ret_var = ChannelMonitor_best_block_updated(&this_arg_conv, header_ref, height, broadcaster_conv, fee_estimator_conv, logger_conv);
        int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
        int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
-       for (size_t u = 0; u < ret_var.datalen; u++) {
-               LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_46_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
-               *ret_conv_46_ref = ret_var.data[u];
-               ret_arr_ptr[u] = (uint64_t)ret_conv_46_ref;
+       for (size_t n = 0; n < ret_var.datalen; n++) {
+               LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_39_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+               *ret_conv_39_conv = ret_var.data[n];
+               ret_arr_ptr[n] = ((uint64_t)ret_conv_39_conv);
        }
        (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
        FREE(ret_var.data);
@@ -18866,9 +19054,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1create_1inb
        this_arg_conv.is_owned = false;
        LDKCOption_u64Z min_value_msat_conv = *(LDKCOption_u64Z*)(((uint64_t)min_value_msat) & ~1);
        min_value_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)(((uint64_t)min_value_msat) & ~1));
-       LDKC2Tuple_PaymentHashPaymentSecretZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
-       *ret_ref = ChannelManager_create_inbound_payment(&this_arg_conv, min_value_msat_conv, invoice_expiry_delta_secs, user_payment_id);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_PaymentHashPaymentSecretZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
+       *ret_conv = ChannelManager_create_inbound_payment(&this_arg_conv, min_value_msat_conv, invoice_expiry_delta_secs, user_payment_id);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1create_1inbound_1payment_1for_1hash(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray payment_hash, int64_t min_value_msat, int32_t invoice_expiry_delta_secs, int64_t user_payment_id) {
@@ -27067,6 +27255,20 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1free(JNIEnv *env
        NetworkGraph_free(this_obj_conv);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKNetworkGraph orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKNetworkGraph ret_var = NetworkGraph_clone(&orig_conv);
+       CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       uint64_t ret_ref = (uint64_t)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReadOnlyNetworkGraph_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKReadOnlyNetworkGraph this_obj_conv;
        this_obj_conv.inner = (void*)(this_obj & (~1));
@@ -27163,7 +27365,7 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetGraphMsgHandler_1set_1netwo
        LDKNetworkGraph 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 LDKNetworkGraph
+       val_conv = NetworkGraph_clone(&val_conv);
        NetGraphMsgHandler_set_network_graph(&this_ptr_conv, val_conv);
 }
 
@@ -27171,7 +27373,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NetGraphMsgHandler_1new(JNI
        LDKNetworkGraph network_graph_conv;
        network_graph_conv.inner = (void*)(network_graph & (~1));
        network_graph_conv.is_owned = (network_graph & 1) || (network_graph == 0);
-       // Warning: we need a move here but no clone is available for LDKNetworkGraph
+       network_graph_conv = NetworkGraph_clone(&network_graph_conv);
        LDKCOption_AccessZ chain_access_conv = *(LDKCOption_AccessZ*)(((uint64_t)chain_access) & ~1);
        // Warning: we may need a move here but no clone is available for LDKCOption_AccessZ
        if (chain_access_conv.tag == LDKCOption_AccessZ_Some) {
@@ -29028,9 +29230,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SignedRawInvoice_1into_1par
        this_arg_conv.inner = (void*)(this_arg & (~1));
        this_arg_conv.is_owned = (this_arg & 1) || (this_arg == 0);
        this_arg_conv = SignedRawInvoice_clone(&this_arg_conv);
-       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
-       *ret_ref = SignedRawInvoice_into_parts(this_arg_conv);
-       return (uint64_t)ret_ref;
+       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
+       *ret_conv = SignedRawInvoice_into_parts(this_arg_conv);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SignedRawInvoice_1raw_1invoice(JNIEnv *env, jclass clz, int64_t this_arg) {
index ed316a86aa09ba42c0ca3ab4c47b99d49f1d4848..531fa8e0a50d13a9f5c19cfe0e9f30778f4bba22 100644 (file)
@@ -130,15 +130,13 @@ static inline LDKStr java_to_owned_str(JNIEnv *env, jstring str) {
        return res;
 }
 
-JNIEXPORT jstring JNICALL Java_org_ldk_impl_bindings_get_1lib_1version_1string(JNIEnv *env, jclass _c) {
-       return str_ref_to_java(env, "v0.0.101.0", strlen("v0.0.101.0"));
-}
 JNIEXPORT jstring JNICALL Java_org_ldk_impl_bindings_get_1ldk_1c_1bindings_1version(JNIEnv *env, jclass _c) {
        return str_ref_to_java(env, check_get_ldk_bindings_version(), strlen(check_get_ldk_bindings_version()));
 }
 JNIEXPORT jstring JNICALL Java_org_ldk_impl_bindings_get_1ldk_1version(JNIEnv *env, jclass _c) {
        return str_ref_to_java(env, check_get_ldk_version(), strlen(check_get_ldk_version()));
 }
+#include "version.c"
 static jclass arr_of_B_clz = NULL;
 static jclass arr_of_J_clz = NULL;
 JNIEXPORT void Java_org_ldk_impl_bindings_init_1class_1cache(JNIEnv * env, jclass clz) {
@@ -1319,17 +1317,27 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1usizeTransactio
        ret->b = b_ref;
        return (uint64_t)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);
+static inline uintptr_t C2Tuple_usizeTransactionZ_get_a(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR tuple){
        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_C2Tuple_1usizeTransactionZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_usizeTransactionZ* tuple_conv = (LDKC2Tuple_usizeTransactionZ*)(tuple & ~1);
+       int64_t ret_val = C2Tuple_usizeTransactionZ_get_a(tuple_conv);
+       return ret_val;
+}
+
+static inline struct LDKTransaction C2Tuple_usizeTransactionZ_get_b(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR tuple){
+       return tuple->b;
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_usizeTransactionZ* tuple_conv = (LDKC2Tuple_usizeTransactionZ*)(tuple & ~1);
+       LDKTransaction ret_var = C2Tuple_usizeTransactionZ_get_b(tuple_conv);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+       Transaction_free(ret_var);
+       return ret_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);
@@ -1457,8 +1465,10 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1C2Tuple_1usizeT
        LDKCOption_C2Tuple_usizeTransactionZZ *obj = (LDKCOption_C2Tuple_usizeTransactionZZ*)(ptr & ~1);
        switch(obj->tag) {
                case LDKCOption_C2Tuple_usizeTransactionZZ_Some: {
-                       uint64_t some_ref = (uint64_t)(&obj->some) | 1;
-                       return (*env)->NewObject(env, LDKCOption_C2Tuple_usizeTransactionZZ_Some_class, LDKCOption_C2Tuple_usizeTransactionZZ_Some_meth, some_ref);
+                       LDKC2Tuple_usizeTransactionZ* some_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
+                       *some_conv = obj->some;
+                       *some_conv = C2Tuple_usizeTransactionZ_clone(some_conv);
+                       return (*env)->NewObject(env, LDKCOption_C2Tuple_usizeTransactionZZ_Some_class, LDKCOption_C2Tuple_usizeTransactionZZ_Some_meth, ((uint64_t)some_conv));
                }
                case LDKCOption_C2Tuple_usizeTransactionZZ_None: {
                        return (*env)->NewObject(env, LDKCOption_C2Tuple_usizeTransactionZZ_None_class, LDKCOption_C2Tuple_usizeTransactionZZ_None_meth);
@@ -2183,32 +2193,43 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1SignatureCVec_1
        ret->b = b_constr;
        return (uint64_t)ret;
 }
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1SignatureCVec_1SignatureZZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_SignatureCVec_SignatureZZ *tuple = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(ptr & ~1);
-       int8_tArray a_arr = (*env)->NewByteArray(env, 64);
-       (*env)->SetByteArrayRegion(env, a_arr, 0, 64, tuple->a.compact_form);
-       return a_arr;
+static inline struct LDKSignature C2Tuple_SignatureCVec_SignatureZZ_get_a(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR tuple){
+       return tuple->a;
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_SignatureCVec_SignatureZZ* tuple_conv = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(tuple & ~1);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 64);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, C2Tuple_SignatureCVec_SignatureZZ_get_a(tuple_conv).compact_form);
+       return ret_arr;
+}
+
+static inline struct LDKCVec_SignatureZ C2Tuple_SignatureCVec_SignatureZZ_get_b(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR tuple){
+       return tuple->b;
 }
-JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1SignatureCVec_1SignatureZZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_SignatureCVec_SignatureZZ *tuple = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(ptr & ~1);
-       LDKCVec_SignatureZ b_var = tuple->b;
-       jobjectArray b_arr = (*env)->NewObjectArray(env, b_var.datalen, arr_of_B_clz, NULL);
+JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_SignatureCVec_SignatureZZ* tuple_conv = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(tuple & ~1);
+       LDKCVec_SignatureZ ret_var = C2Tuple_SignatureCVec_SignatureZZ_get_b(tuple_conv);
+       jobjectArray ret_arr = (*env)->NewObjectArray(env, ret_var.datalen, arr_of_B_clz, NULL);
        ;
-       for (size_t i = 0; i < b_var.datalen; i++) {
-               int8_tArray b_conv_8_arr = (*env)->NewByteArray(env, 64);
-               (*env)->SetByteArrayRegion(env, b_conv_8_arr, 0, 64, b_var.data[i].compact_form);
-               (*env)->SetObjectArrayElement(env, b_arr, i, b_conv_8_arr);
+       for (size_t i = 0; i < ret_var.datalen; i++) {
+               int8_tArray ret_conv_8_arr = (*env)->NewByteArray(env, 64);
+               (*env)->SetByteArrayRegion(env, ret_conv_8_arr, 0, 64, ret_var.data[i].compact_form);
+               (*env)->SetObjectArrayElement(env, ret_arr, i, ret_conv_8_arr);
        }
-       return b_arr;
+       FREE(ret_var.data);
+       return ret_arr;
 }
+
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
        return ((LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)arg)->result_ok;
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
        LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *val = (LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(arg & ~1);
        CHECK(val->result_ok);
-       uint64_t res_ref = (uint64_t)(&(*val->contents.result)) | 1;
-       return res_ref;
+       LDKC2Tuple_SignatureCVec_SignatureZZ* res_conv = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
+       *res_conv = (*val->contents.result);
+       *res_conv = C2Tuple_SignatureCVec_SignatureZZ_clone(res_conv);
+       return ((uint64_t)res_conv);
 }
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
        LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *val = (LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(arg & ~1);
@@ -3110,20 +3131,31 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChanne
        ret->b = b_conv;
        return (uint64_t)ret;
 }
-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;
+static inline struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelMonitorZ_get_a(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR tuple){
+       return ThirtyTwoBytes_clone(&tuple->a);
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMonitorZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_BlockHashChannelMonitorZ* tuple_conv = (LDKC2Tuple_BlockHashChannelMonitorZ*)(tuple & ~1);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C2Tuple_BlockHashChannelMonitorZ_get_a(tuple_conv).data);
+       return ret_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((((uint64_t)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((uint64_t)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       uint64_t b_ref = (uint64_t)b_var.inner & ~1;
-       return b_ref;
+
+static inline struct LDKChannelMonitor C2Tuple_BlockHashChannelMonitorZ_get_b(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR tuple){
+       return ChannelMonitor_clone(&tuple->b);
 }
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMonitorZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_BlockHashChannelMonitorZ* tuple_conv = (LDKC2Tuple_BlockHashChannelMonitorZ*)(tuple & ~1);
+       LDKChannelMonitor ret_var = C2Tuple_BlockHashChannelMonitorZ_get_b(tuple_conv);
+       CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       uint64_t ret_ref = (uint64_t)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1BlockHashChannelMonitorZZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
        LDKCVec_C2Tuple_BlockHashChannelMonitorZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_BlockHashChannelMonitorZZ), "LDKCVec_C2Tuple_BlockHashChannelMonitorZZ");
        ret->datalen = (*env)->GetArrayLength(env, elems);
@@ -3135,13 +3167,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1BlockHash
                for (size_t i = 0; i < ret->datalen; i++) {
                        int64_t arr_elem = java_elems[i];
                        LDKC2Tuple_BlockHashChannelMonitorZ arr_elem_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)arr_elem) & ~1);
-                       // Warning: we may need a move here but no clone is available for LDKC2Tuple_BlockHashChannelMonitorZ
+                       arr_elem_conv = C2Tuple_BlockHashChannelMonitorZ_clone((LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)arr_elem) & ~1));
                        ret->data[i] = arr_elem_conv;
                }
                (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
        }
        return (uint64_t)ret;
 }
+static inline LDKCVec_C2Tuple_BlockHashChannelMonitorZZ CVec_C2Tuple_BlockHashChannelMonitorZZ_clone(const LDKCVec_C2Tuple_BlockHashChannelMonitorZZ *orig) {
+       LDKCVec_C2Tuple_BlockHashChannelMonitorZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ) * orig->datalen, "LDKCVec_C2Tuple_BlockHashChannelMonitorZZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = C2Tuple_BlockHashChannelMonitorZ_clone(&orig->data[i]);
+       }
+       return ret;
+}
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1C2Tuple_1BlockHashChannelMonitorZZErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
        return ((LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ*)arg)->result_ok;
 }
@@ -3151,9 +3190,11 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1C2Tu
        LDKCVec_C2Tuple_BlockHashChannelMonitorZZ res_var = (*val->contents.result);
        int64_tArray res_arr = (*env)->NewLongArray(env, res_var.datalen);
        int64_t *res_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, res_arr, NULL);
-       for (size_t i = 0; i < res_var.datalen; i++) {
-               uint64_t res_conv_34_ref = (uint64_t)(&res_var.data[i]) | 1;
-               res_arr_ptr[i] = res_conv_34_ref;
+       for (size_t j = 0; j < res_var.datalen; j++) {
+               LDKC2Tuple_BlockHashChannelMonitorZ* res_conv_35_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
+               *res_conv_35_conv = res_var.data[j];
+               *res_conv_35_conv = C2Tuple_BlockHashChannelMonitorZ_clone(res_conv_35_conv);
+               res_arr_ptr[j] = ((uint64_t)res_conv_35_conv);
        }
        (*env)->ReleasePrimitiveArrayCritical(env, res_arr, res_arr_ptr, 0);
        return res_arr;
@@ -3536,18 +3577,26 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1PaymentHashPaym
        ret->b = b_ref;
        return (uint64_t)ret;
 }
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1PaymentHashPaymentSecretZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_PaymentHashPaymentSecretZ *tuple = (LDKC2Tuple_PaymentHashPaymentSecretZ*)(ptr & ~1);
-       int8_tArray a_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, a_arr, 0, 32, tuple->a.data);
-       return a_arr;
+static inline struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_a(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR tuple){
+       return ThirtyTwoBytes_clone(&tuple->a);
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PaymentHashPaymentSecretZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_PaymentHashPaymentSecretZ* tuple_conv = (LDKC2Tuple_PaymentHashPaymentSecretZ*)(tuple & ~1);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C2Tuple_PaymentHashPaymentSecretZ_get_a(tuple_conv).data);
+       return ret_arr;
+}
+
+static inline struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_b(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR tuple){
+       return ThirtyTwoBytes_clone(&tuple->b);
 }
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1PaymentHashPaymentSecretZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_PaymentHashPaymentSecretZ *tuple = (LDKC2Tuple_PaymentHashPaymentSecretZ*)(ptr & ~1);
-       int8_tArray b_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, b_arr, 0, 32, tuple->b.data);
-       return b_arr;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PaymentHashPaymentSecretZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_PaymentHashPaymentSecretZ* tuple_conv = (LDKC2Tuple_PaymentHashPaymentSecretZ*)(tuple & ~1);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C2Tuple_PaymentHashPaymentSecretZ_get_b(tuple_conv).data);
+       return ret_arr;
 }
+
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PaymentSecretAPIErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
        return ((LDKCResult_PaymentSecretAPIErrorZ*)arg)->result_ok;
 }
@@ -4359,28 +4408,38 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChanne
        ret->b = b_conv;
        return (uint64_t)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;
+static inline struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelManagerZ_get_a(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR tuple){
+       return ThirtyTwoBytes_clone(&tuple->a);
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelManagerZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_BlockHashChannelManagerZ* tuple_conv = (LDKC2Tuple_BlockHashChannelManagerZ*)(tuple & ~1);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C2Tuple_BlockHashChannelManagerZ_get_a(tuple_conv).data);
+       return ret_arr;
+}
+
+static inline struct LDKChannelManager *C2Tuple_BlockHashChannelManagerZ_get_b(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR tuple){
+       return &tuple->b;
 }
-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((((uint64_t)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((uint64_t)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       uint64_t b_ref = (uint64_t)b_var.inner & ~1;
-       return b_ref;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelManagerZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_BlockHashChannelManagerZ* tuple_conv = (LDKC2Tuple_BlockHashChannelManagerZ*)(tuple & ~1);
+       LDKChannelManager ret_var = *C2Tuple_BlockHashChannelManagerZ_get_b(tuple_conv);
+       CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       uint64_t ret_ref = (uint64_t)ret_var.inner & ~1;
+       return ret_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);
-       uint64_t res_ref = (uint64_t)(&(*val->contents.result)) | 1;
-       return res_ref;
+       LDKC2Tuple_BlockHashChannelManagerZ* res_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelManagerZ), "LDKC2Tuple_BlockHashChannelManagerZ");
+       *res_conv = (*val->contents.result);
+       // Warning: we really need to clone here, but no clone is available for LDKC2Tuple_BlockHashChannelManagerZ
+       return ((uint64_t)res_conv) | 1;
 }
 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);
@@ -4696,28 +4755,46 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1RawInvoice_1u83
        ret->c = c_conv;
        return (uint64_t)ret;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *tuple = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(ptr & ~1);
-       LDKRawInvoice a_var = tuple->a;
-       CHECK((((uint64_t)a_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((uint64_t)&a_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       uint64_t a_ref = (uint64_t)a_var.inner & ~1;
-       return a_ref;
-}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *tuple = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(ptr & ~1);
-       int8_tArray b_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, b_arr, 0, 32, tuple->b.data);
-       return b_arr;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1get_1c(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *tuple = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(ptr & ~1);
-       LDKInvoiceSignature c_var = tuple->c;
-       CHECK((((uint64_t)c_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((uint64_t)&c_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       uint64_t c_ref = (uint64_t)c_var.inner & ~1;
-       return c_ref;
+static inline struct LDKRawInvoice C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple){
+       return RawInvoice_clone(&tuple->a);
 }
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* tuple_conv = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(tuple & ~1);
+       LDKRawInvoice ret_var = C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(tuple_conv);
+       CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       uint64_t ret_ref = (uint64_t)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+static inline struct LDKThirtyTwoBytes C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple){
+       return ThirtyTwoBytes_clone(&tuple->b);
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* tuple_conv = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(tuple & ~1);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(tuple_conv).data);
+       return ret_arr;
+}
+
+static inline struct LDKInvoiceSignature C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple){
+       return InvoiceSignature_clone(&tuple->c);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1get_1c(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* tuple_conv = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(tuple & ~1);
+       LDKInvoiceSignature ret_var = C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(tuple_conv);
+       CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       uint64_t ret_ref = (uint64_t)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PayeePubKeyErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
        return ((LDKCResult_PayeePubKeyErrorZ*)arg)->result_ok;
 }
@@ -4956,21 +5033,33 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1OutPointScriptZ
        ret->b = b_ref;
        return (uint64_t)ret;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1OutPointScriptZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_OutPointScriptZ *tuple = (LDKC2Tuple_OutPointScriptZ*)(ptr & ~1);
-       LDKOutPoint a_var = tuple->a;
-       CHECK((((uint64_t)a_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((uint64_t)&a_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       uint64_t a_ref = (uint64_t)a_var.inner & ~1;
-       return a_ref;
-}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1OutPointScriptZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_OutPointScriptZ *tuple = (LDKC2Tuple_OutPointScriptZ*)(ptr & ~1);
-       LDKCVec_u8Z 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;
+static inline struct LDKOutPoint C2Tuple_OutPointScriptZ_get_a(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR tuple){
+       return OutPoint_clone(&tuple->a);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_OutPointScriptZ* tuple_conv = (LDKC2Tuple_OutPointScriptZ*)(tuple & ~1);
+       LDKOutPoint ret_var = C2Tuple_OutPointScriptZ_get_a(tuple_conv);
+       CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       uint64_t ret_ref = (uint64_t)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+static inline struct LDKCVec_u8Z C2Tuple_OutPointScriptZ_get_b(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR tuple){
+       return CVec_u8Z_clone(&tuple->b);
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_OutPointScriptZ* tuple_conv = (LDKC2Tuple_OutPointScriptZ*)(tuple & ~1);
+       LDKCVec_u8Z ret_var = C2Tuple_OutPointScriptZ_get_b(tuple_conv);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32ScriptZ_1new(JNIEnv *env, jclass clz, int32_t a, int8_tArray b) {
        LDKC2Tuple_u32ScriptZ* ret = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
        ret->a = a;
@@ -4981,17 +5070,27 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32ScriptZ_1new
        ret->b = b_ref;
        return (uint64_t)ret;
 }
-JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32ScriptZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_u32ScriptZ *tuple = (LDKC2Tuple_u32ScriptZ*)(ptr & ~1);
+static inline uint32_t C2Tuple_u32ScriptZ_get_a(LDKC2Tuple_u32ScriptZ *NONNULL_PTR tuple){
        return tuple->a;
 }
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32ScriptZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_u32ScriptZ *tuple = (LDKC2Tuple_u32ScriptZ*)(ptr & ~1);
-       LDKCVec_u8Z 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 int32_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32ScriptZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_u32ScriptZ* tuple_conv = (LDKC2Tuple_u32ScriptZ*)(tuple & ~1);
+       int32_t ret_val = C2Tuple_u32ScriptZ_get_a(tuple_conv);
+       return ret_val;
+}
+
+static inline struct LDKCVec_u8Z C2Tuple_u32ScriptZ_get_b(LDKC2Tuple_u32ScriptZ *NONNULL_PTR tuple){
+       return CVec_u8Z_clone(&tuple->b);
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32ScriptZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_u32ScriptZ* tuple_conv = (LDKC2Tuple_u32ScriptZ*)(tuple & ~1);
+       LDKCVec_u8Z ret_var = C2Tuple_u32ScriptZ_get_b(tuple_conv);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1u32ScriptZZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
        LDKCVec_C2Tuple_u32ScriptZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_u32ScriptZZ), "LDKCVec_C2Tuple_u32ScriptZZ");
        ret->datalen = (*env)->GetArrayLength(env, elems);
@@ -5030,34 +5129,44 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tup
        else
                b_constr.data = NULL;
        int64_t* b_vals = (*env)->GetLongArrayElements (env, b, NULL);
-       for (size_t b = 0; b < b_constr.datalen; b++) {
-               int64_t b_conv_27 = b_vals[b];
-               LDKC2Tuple_u32ScriptZ b_conv_27_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_27) & ~1);
-               b_conv_27_conv = C2Tuple_u32ScriptZ_clone((LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_27) & ~1));
-               b_constr.data[b] = b_conv_27_conv;
+       for (size_t v = 0; v < b_constr.datalen; v++) {
+               int64_t b_conv_21 = b_vals[v];
+               LDKC2Tuple_u32ScriptZ b_conv_21_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_21) & ~1);
+               b_conv_21_conv = C2Tuple_u32ScriptZ_clone((LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_21) & ~1));
+               b_constr.data[v] = b_conv_21_conv;
        }
        (*env)->ReleaseLongArrayElements(env, b, b_vals, 0);
        ret->b = b_constr;
        return (uint64_t)ret;
 }
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple_1u32ScriptZZZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *tuple = (LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(ptr & ~1);
-       int8_tArray a_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, a_arr, 0, 32, tuple->a.data);
-       return a_arr;
+static inline struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR tuple){
+       return ThirtyTwoBytes_clone(&tuple->a);
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32ScriptZZZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* tuple_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(tuple & ~1);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(tuple_conv).data);
+       return ret_arr;
+}
+
+static inline struct LDKCVec_C2Tuple_u32ScriptZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR tuple){
+       return CVec_C2Tuple_u32ScriptZZ_clone(&tuple->b);
 }
-JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple_1u32ScriptZZZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *tuple = (LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(ptr & ~1);
-       LDKCVec_C2Tuple_u32ScriptZZ b_var = tuple->b;
-       int64_tArray b_arr = (*env)->NewLongArray(env, b_var.datalen);
-       int64_t *b_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, b_arr, NULL);
-       for (size_t b = 0; b < b_var.datalen; b++) {
-               uint64_t b_conv_27_ref = (uint64_t)(&b_var.data[b]) | 1;
-               b_arr_ptr[b] = b_conv_27_ref;
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32ScriptZZZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* tuple_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(tuple & ~1);
+       LDKCVec_C2Tuple_u32ScriptZZ ret_var = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(tuple_conv);
+       int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
+       int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
+       for (size_t v = 0; v < ret_var.datalen; v++) {
+               LDKC2Tuple_u32ScriptZ* ret_conv_21_conv = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
+               *ret_conv_21_conv = ret_var.data[v];
+               ret_arr_ptr[v] = ((uint64_t)ret_conv_21_conv);
        }
-       (*env)->ReleasePrimitiveArrayCritical(env, b_arr, b_arr_ptr, 0);
-       return b_arr;
+       (*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_LDKCVec_1C2Tuple_1TxidCVec_1C2Tuple_1u32ScriptZZZZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
        LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ), "LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ");
        ret->datalen = (*env)->GetArrayLength(env, elems);
@@ -5356,15 +5465,25 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32TxOutZ_1new(
        ret->b = b_conv;
        return (uint64_t)ret;
 }
-JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32TxOutZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_u32TxOutZ *tuple = (LDKC2Tuple_u32TxOutZ*)(ptr & ~1);
+static inline uint32_t C2Tuple_u32TxOutZ_get_a(LDKC2Tuple_u32TxOutZ *NONNULL_PTR tuple){
        return tuple->a;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32TxOutZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_u32TxOutZ *tuple = (LDKC2Tuple_u32TxOutZ*)(ptr & ~1);
-       uint64_t b_ref = ((uint64_t)&tuple->b) | 1;
-       return (uint64_t)b_ref;
+JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32TxOutZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_u32TxOutZ* tuple_conv = (LDKC2Tuple_u32TxOutZ*)(tuple & ~1);
+       int32_t ret_val = C2Tuple_u32TxOutZ_get_a(tuple_conv);
+       return ret_val;
+}
+
+static inline struct LDKTxOut C2Tuple_u32TxOutZ_get_b(LDKC2Tuple_u32TxOutZ *NONNULL_PTR tuple){
+       return TxOut_clone(&tuple->b);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32TxOutZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_u32TxOutZ* tuple_conv = (LDKC2Tuple_u32TxOutZ*)(tuple & ~1);
+       LDKTxOut* ret_ref = MALLOC(sizeof(LDKTxOut), "LDKTxOut");
+       *ret_ref = C2Tuple_u32TxOutZ_get_b(tuple_conv);
+       return (uint64_t)ret_ref;
 }
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1u32TxOutZZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
        LDKCVec_C2Tuple_u32TxOutZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_u32TxOutZZ), "LDKCVec_C2Tuple_u32TxOutZZ");
        ret->datalen = (*env)->GetArrayLength(env, elems);
@@ -5403,34 +5522,44 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tup
        else
                b_constr.data = NULL;
        int64_t* b_vals = (*env)->GetLongArrayElements (env, b, NULL);
-       for (size_t a = 0; a < b_constr.datalen; a++) {
-               int64_t b_conv_26 = b_vals[a];
-               LDKC2Tuple_u32TxOutZ b_conv_26_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_26) & ~1);
-               b_conv_26_conv = C2Tuple_u32TxOutZ_clone((LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_26) & ~1));
-               b_constr.data[a] = b_conv_26_conv;
+       for (size_t u = 0; u < b_constr.datalen; u++) {
+               int64_t b_conv_20 = b_vals[u];
+               LDKC2Tuple_u32TxOutZ b_conv_20_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_20) & ~1);
+               b_conv_20_conv = C2Tuple_u32TxOutZ_clone((LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_20) & ~1));
+               b_constr.data[u] = b_conv_20_conv;
        }
        (*env)->ReleaseLongArrayElements(env, b, b_vals, 0);
        ret->b = b_constr;
        return (uint64_t)ret;
 }
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *tuple = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(ptr & ~1);
-       int8_tArray a_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, a_arr, 0, 32, tuple->a.data);
-       return a_arr;
+static inline struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR tuple){
+       return ThirtyTwoBytes_clone(&tuple->a);
 }
-JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *tuple = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(ptr & ~1);
-       LDKCVec_C2Tuple_u32TxOutZZ b_var = tuple->b;
-       int64_tArray b_arr = (*env)->NewLongArray(env, b_var.datalen);
-       int64_t *b_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, b_arr, NULL);
-       for (size_t a = 0; a < b_var.datalen; a++) {
-               uint64_t b_conv_26_ref = (uint64_t)(&b_var.data[a]) | 1;
-               b_arr_ptr[a] = b_conv_26_ref;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* tuple_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(tuple & ~1);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(tuple_conv).data);
+       return ret_arr;
+}
+
+static inline struct LDKCVec_C2Tuple_u32TxOutZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR tuple){
+       return CVec_C2Tuple_u32TxOutZZ_clone(&tuple->b);
+}
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* tuple_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(tuple & ~1);
+       LDKCVec_C2Tuple_u32TxOutZZ ret_var = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(tuple_conv);
+       int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
+       int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
+       for (size_t u = 0; u < ret_var.datalen; u++) {
+               LDKC2Tuple_u32TxOutZ* ret_conv_20_conv = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
+               *ret_conv_20_conv = ret_var.data[u];
+               ret_arr_ptr[u] = ((uint64_t)ret_conv_20_conv);
        }
-       (*env)->ReleasePrimitiveArrayCritical(env, b_arr, b_arr_ptr, 0);
-       return b_arr;
+       (*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_LDKCVec_1C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
        LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ), "LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ");
        ret->datalen = (*env)->GetArrayLength(env, elems);
@@ -5535,8 +5664,10 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1Block
 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);
-       uint64_t res_ref = (uint64_t)(&(*val->contents.result)) | 1;
-       return res_ref;
+       LDKC2Tuple_BlockHashChannelMonitorZ* res_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
+       *res_conv = (*val->contents.result);
+       *res_conv = C2Tuple_BlockHashChannelMonitorZ_clone(res_conv);
+       return ((uint64_t)res_conv);
 }
 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);
@@ -5575,18 +5706,26 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1PublicKeyTypeZ_
        ret->b = b_conv;
        return (uint64_t)ret;
 }
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1PublicKeyTypeZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_PublicKeyTypeZ *tuple = (LDKC2Tuple_PublicKeyTypeZ*)(ptr & ~1);
-       int8_tArray a_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, a_arr, 0, 33, tuple->a.compressed_form);
-       return a_arr;
+static inline struct LDKPublicKey C2Tuple_PublicKeyTypeZ_get_a(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR tuple){
+       return tuple->a;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1PublicKeyTypeZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_PublicKeyTypeZ *tuple = (LDKC2Tuple_PublicKeyTypeZ*)(ptr & ~1);
-       LDKType* b_ret =MALLOC(sizeof(LDKType), "LDKType");
-       *b_ret = Type_clone(&tuple->b);
-       return (uint64_t)b_ret;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyTypeZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_PublicKeyTypeZ* tuple_conv = (LDKC2Tuple_PublicKeyTypeZ*)(tuple & ~1);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, C2Tuple_PublicKeyTypeZ_get_a(tuple_conv).compressed_form);
+       return ret_arr;
 }
+
+static inline struct LDKType C2Tuple_PublicKeyTypeZ_get_b(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR tuple){
+       return Type_clone(&tuple->b);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyTypeZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC2Tuple_PublicKeyTypeZ* tuple_conv = (LDKC2Tuple_PublicKeyTypeZ*)(tuple & ~1);
+       LDKType* ret_ret =MALLOC(sizeof(LDKType), "LDKType");
+       *ret_ret = C2Tuple_PublicKeyTypeZ_get_b(tuple_conv);
+       return (uint64_t)ret_ret;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1PublicKeyTypeZZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
        LDKCVec_C2Tuple_PublicKeyTypeZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_PublicKeyTypeZZ), "LDKCVec_C2Tuple_PublicKeyTypeZZ");
        ret->datalen = (*env)->GetArrayLength(env, elems);
@@ -5648,30 +5787,51 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnounce
        ret->c = c_conv;
        return (uint64_t)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((((uint64_t)a_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((uint64_t)&a_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       uint64_t a_ref = (uint64_t)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((((uint64_t)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((uint64_t)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       uint64_t b_ref = (uint64_t)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((((uint64_t)c_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((uint64_t)&c_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       uint64_t c_ref = (uint64_t)c_var.inner & ~1;
-       return c_ref;
+static inline struct LDKChannelAnnouncement C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple){
+       return ChannelAnnouncement_clone(&tuple->a);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* tuple_conv = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(tuple & ~1);
+       LDKChannelAnnouncement ret_var = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(tuple_conv);
+       CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       uint64_t ret_ref = (uint64_t)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+static inline struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple){
+       return ChannelUpdate_clone(&tuple->b);
 }
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* tuple_conv = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(tuple & ~1);
+       LDKChannelUpdate ret_var = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(tuple_conv);
+       CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       uint64_t ret_ref = (uint64_t)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+static inline struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple){
+       return ChannelUpdate_clone(&tuple->c);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1c(JNIEnv *env, jclass clz, int64_t tuple) {
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* tuple_conv = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(tuple & ~1);
+       LDKChannelUpdate ret_var = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(tuple_conv);
+       CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       uint64_t ret_ref = (uint64_t)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_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);
@@ -7505,10 +7665,10 @@ void transactions_confirmed_LDKConfirm_jcall(const void* this_arg, const uint8_t
        LDKCVec_C2Tuple_usizeTransactionZZ txdata_var = txdata;
        int64_tArray txdata_arr = (*env)->NewLongArray(env, txdata_var.datalen);
        int64_t *txdata_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, txdata_arr, NULL);
-       for (size_t y = 0; y < txdata_var.datalen; y++) {
-               LDKC2Tuple_usizeTransactionZ* txdata_conv_24_ref = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
-               *txdata_conv_24_ref = txdata_var.data[y];
-               txdata_arr_ptr[y] = (uint64_t)txdata_conv_24_ref;
+       for (size_t c = 0; c < txdata_var.datalen; c++) {
+               LDKC2Tuple_usizeTransactionZ* txdata_conv_28_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
+               *txdata_conv_28_conv = txdata_var.data[c];
+               txdata_arr_ptr[c] = ((uint64_t)txdata_conv_28_conv);
        }
        (*env)->ReleasePrimitiveArrayCritical(env, txdata_arr, txdata_arr_ptr, 0);
        FREE(txdata_var.data);
@@ -7649,11 +7809,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Confirm_1transactions_1confirm
        else
                txdata_constr.data = NULL;
        int64_t* txdata_vals = (*env)->GetLongArrayElements (env, txdata, NULL);
-       for (size_t y = 0; y < txdata_constr.datalen; y++) {
-               int64_t txdata_conv_24 = txdata_vals[y];
-               LDKC2Tuple_usizeTransactionZ txdata_conv_24_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_24) & ~1);
-               txdata_conv_24_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_24) & ~1));
-               txdata_constr.data[y] = txdata_conv_24_conv;
+       for (size_t c = 0; c < txdata_constr.datalen; c++) {
+               int64_t txdata_conv_28 = txdata_vals[c];
+               LDKC2Tuple_usizeTransactionZ txdata_conv_28_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1);
+               txdata_conv_28_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1));
+               txdata_constr.data[c] = txdata_conv_28_conv;
        }
        (*env)->ReleaseLongArrayElements(env, txdata, txdata_vals, 0);
        (this_arg_conv->transactions_confirmed)(this_arg_conv->this_arg, header_ref, txdata_constr, height);
@@ -8985,11 +9145,11 @@ LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ get_next_channel
        else
                ret_constr.data = NULL;
        int64_t* ret_vals = (*env)->GetLongArrayElements (env, ret, NULL);
-       for (size_t l = 0; l < ret_constr.datalen; l++) {
-               int64_t ret_conv_63 = ret_vals[l];
-               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ ret_conv_63_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)ret_conv_63) & ~1);
-               ret_conv_63_conv = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone((LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)ret_conv_63) & ~1));
-               ret_constr.data[l] = ret_conv_63_conv;
+       for (size_t h = 0; h < ret_constr.datalen; h++) {
+               int64_t ret_conv_59 = ret_vals[h];
+               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ ret_conv_59_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)ret_conv_59) & ~1);
+               ret_conv_59_conv = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone((LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)ret_conv_59) & ~1));
+               ret_constr.data[h] = ret_conv_59_conv;
        }
        (*env)->ReleaseLongArrayElements(env, ret, ret_vals, 0);
        if (get_jenv_res == JNI_EDETACHED) {
@@ -9291,10 +9451,10 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_
        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* ret_conv_63_ref = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
-               *ret_conv_63_ref = ret_var.data[l];
-               ret_arr_ptr[l] = (uint64_t)ret_conv_63_ref;
+       for (size_t h = 0; h < ret_var.datalen; h++) {
+               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_conv_59_conv = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
+               *ret_conv_59_conv = ret_var.data[h];
+               ret_arr_ptr[h] = ((uint64_t)ret_conv_59_conv);
        }
        (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
        FREE(ret_var.data);
@@ -9552,11 +9712,11 @@ LDKCVec_C2Tuple_PublicKeyTypeZZ get_and_clear_pending_msg_LDKCustomMessageHandle
        else
                ret_constr.data = NULL;
        int64_t* ret_vals = (*env)->GetLongArrayElements (env, ret, NULL);
-       for (size_t y = 0; y < ret_constr.datalen; y++) {
-               int64_t ret_conv_24 = ret_vals[y];
-               LDKC2Tuple_PublicKeyTypeZ ret_conv_24_conv = *(LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)ret_conv_24) & ~1);
-               ret_conv_24_conv = C2Tuple_PublicKeyTypeZ_clone((LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)ret_conv_24) & ~1));
-               ret_constr.data[y] = ret_conv_24_conv;
+       for (size_t z = 0; z < ret_constr.datalen; z++) {
+               int64_t ret_conv_25 = ret_vals[z];
+               LDKC2Tuple_PublicKeyTypeZ ret_conv_25_conv = *(LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)ret_conv_25) & ~1);
+               ret_conv_25_conv = C2Tuple_PublicKeyTypeZ_clone((LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)ret_conv_25) & ~1));
+               ret_constr.data[z] = ret_conv_25_conv;
        }
        (*env)->ReleaseLongArrayElements(env, ret, ret_vals, 0);
        if (get_jenv_res == JNI_EDETACHED) {
@@ -9622,10 +9782,10 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_CustomMessageHandler_1
        LDKCVec_C2Tuple_PublicKeyTypeZZ ret_var = (this_arg_conv->get_and_clear_pending_msg)(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 y = 0; y < ret_var.datalen; y++) {
-               LDKC2Tuple_PublicKeyTypeZ* ret_conv_24_ref = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
-               *ret_conv_24_ref = ret_var.data[y];
-               ret_arr_ptr[y] = (uint64_t)ret_conv_24_ref;
+       for (size_t z = 0; z < ret_var.datalen; z++) {
+               LDKC2Tuple_PublicKeyTypeZ* ret_conv_25_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
+               *ret_conv_25_conv = ret_var.data[z];
+               ret_arr_ptr[z] = ((uint64_t)ret_conv_25_conv);
        }
        (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
        FREE(ret_var.data);
@@ -10814,9 +10974,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
        LDKC2Tuple_usizeTransactionZ* orig_conv = (LDKC2Tuple_usizeTransactionZ*)(orig & ~1);
-       LDKC2Tuple_usizeTransactionZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
-       *ret_ref = C2Tuple_usizeTransactionZ_clone(orig_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_usizeTransactionZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
+       *ret_conv = C2Tuple_usizeTransactionZ_clone(orig_conv);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1new(JNIEnv *env, jclass clz, int64_t a, int8_tArray b) {
@@ -10825,9 +10985,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_
        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 = true;
-       LDKC2Tuple_usizeTransactionZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
-       *ret_ref = C2Tuple_usizeTransactionZ_new(a, b_ref);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_usizeTransactionZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
+       *ret_conv = C2Tuple_usizeTransactionZ_new(a, b_ref);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
@@ -10845,11 +11005,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1usizeTransactio
        else
                _res_constr.data = NULL;
        int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
-       for (size_t y = 0; y < _res_constr.datalen; y++) {
-               int64_t _res_conv_24 = _res_vals[y];
-               LDKC2Tuple_usizeTransactionZ _res_conv_24_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)_res_conv_24) & ~1);
-               FREE((void*)_res_conv_24);
-               _res_constr.data[y] = _res_conv_24_conv;
+       for (size_t c = 0; c < _res_constr.datalen; c++) {
+               int64_t _res_conv_28 = _res_vals[c];
+               LDKC2Tuple_usizeTransactionZ _res_conv_28_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)_res_conv_28) & ~1);
+               FREE((void*)_res_conv_28);
+               _res_constr.data[c] = _res_conv_28_conv;
        }
        (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
        CVec_C2Tuple_usizeTransactionZZ_free(_res_constr);
@@ -11251,9 +11411,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneNoneZ_1clone(J
 
 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");
-       *ret_ref = C2Tuple_SignatureCVec_SignatureZZ_clone(orig_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_SignatureCVec_SignatureZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
+       *ret_conv = C2Tuple_SignatureCVec_SignatureZZ_clone(orig_conv);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1new(JNIEnv *env, jclass clz, int8_tArray a, jobjectArray b) {
@@ -11273,9 +11433,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1Sig
                (*env)->GetByteArrayRegion(env, b_conv_8, 0, 64, b_conv_8_ref.compact_form);
                b_constr.data[i] = b_conv_8_ref;
        }
-       LDKC2Tuple_SignatureCVec_SignatureZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
-       *ret_ref = C2Tuple_SignatureCVec_SignatureZZ_new(a_ref, b_constr);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_SignatureCVec_SignatureZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
+       *ret_conv = C2Tuple_SignatureCVec_SignatureZZ_new(a_ref, b_constr);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
@@ -11555,6 +11715,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1
        return (uint64_t)ret_conv;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMonitorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKC2Tuple_BlockHashChannelMonitorZ* orig_conv = (LDKC2Tuple_BlockHashChannelMonitorZ*)(orig & ~1);
+       LDKC2Tuple_BlockHashChannelMonitorZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
+       *ret_conv = C2Tuple_BlockHashChannelMonitorZ_clone(orig_conv);
+       return ((uint64_t)ret_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);
@@ -11563,9 +11730,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMo
        b_conv.inner = (void*)(b & (~1));
        b_conv.is_owned = (b & 1) || (b == 0);
        b_conv = ChannelMonitor_clone(&b_conv);
-       LDKC2Tuple_BlockHashChannelMonitorZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
-       *ret_ref = C2Tuple_BlockHashChannelMonitorZ_new(a_ref, b_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_BlockHashChannelMonitorZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
+       *ret_conv = C2Tuple_BlockHashChannelMonitorZ_new(a_ref, b_conv);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMonitorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
@@ -11583,11 +11750,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1BlockHashChanne
        else
                _res_constr.data = NULL;
        int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
-       for (size_t i = 0; i < _res_constr.datalen; i++) {
-               int64_t _res_conv_34 = _res_vals[i];
-               LDKC2Tuple_BlockHashChannelMonitorZ _res_conv_34_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)_res_conv_34) & ~1);
-               FREE((void*)_res_conv_34);
-               _res_constr.data[i] = _res_conv_34_conv;
+       for (size_t j = 0; j < _res_constr.datalen; j++) {
+               int64_t _res_conv_35 = _res_vals[j];
+               LDKC2Tuple_BlockHashChannelMonitorZ _res_conv_35_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)_res_conv_35) & ~1);
+               FREE((void*)_res_conv_35);
+               _res_constr.data[j] = _res_conv_35_conv;
        }
        (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
        CVec_C2Tuple_BlockHashChannelMonitorZZ_free(_res_constr);
@@ -11601,11 +11768,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1C2Tuple_1Blo
        else
                o_constr.data = NULL;
        int64_t* o_vals = (*env)->GetLongArrayElements (env, o, NULL);
-       for (size_t i = 0; i < o_constr.datalen; i++) {
-               int64_t o_conv_34 = o_vals[i];
-               LDKC2Tuple_BlockHashChannelMonitorZ o_conv_34_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o_conv_34) & ~1);
-               // Warning: we may need a move here but no clone is available for LDKC2Tuple_BlockHashChannelMonitorZ
-               o_constr.data[i] = o_conv_34_conv;
+       for (size_t j = 0; j < o_constr.datalen; j++) {
+               int64_t o_conv_35 = o_vals[j];
+               LDKC2Tuple_BlockHashChannelMonitorZ o_conv_35_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o_conv_35) & ~1);
+               o_conv_35_conv = C2Tuple_BlockHashChannelMonitorZ_clone((LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o_conv_35) & ~1));
+               o_constr.data[j] = o_conv_35_conv;
        }
        (*env)->ReleaseLongArrayElements(env, o, o_vals, 0);
        LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ), "LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ");
@@ -11627,6 +11794,13 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1C2Tuple_1BlockH
        CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(_res_conv);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1C2Tuple_1BlockHashChannelMonitorZZErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ* orig_conv = (LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ*)(orig & ~1);
+       LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ), "LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ");
+       *ret_conv = CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(orig_conv);
+       return (uint64_t)ret_conv;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1u16Z_1some(JNIEnv *env, jclass clz, int16_t o) {
        LDKCOption_u16Z *ret_copy = MALLOC(sizeof(LDKCOption_u16Z), "LDKCOption_u16Z");
        *ret_copy = COption_u16Z_some(o);
@@ -11799,9 +11973,9 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1NetAddressZ_1free(JNIEnv
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PaymentHashPaymentSecretZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
        LDKC2Tuple_PaymentHashPaymentSecretZ* orig_conv = (LDKC2Tuple_PaymentHashPaymentSecretZ*)(orig & ~1);
-       LDKC2Tuple_PaymentHashPaymentSecretZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
-       *ret_ref = C2Tuple_PaymentHashPaymentSecretZ_clone(orig_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_PaymentHashPaymentSecretZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
+       *ret_conv = C2Tuple_PaymentHashPaymentSecretZ_clone(orig_conv);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PaymentHashPaymentSecretZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int8_tArray b) {
@@ -11811,9 +11985,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PaymentHashPayment
        LDKThirtyTwoBytes b_ref;
        CHECK((*env)->GetArrayLength(env, b) == 32);
        (*env)->GetByteArrayRegion(env, b, 0, 32, b_ref.data);
-       LDKC2Tuple_PaymentHashPaymentSecretZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
-       *ret_ref = C2Tuple_PaymentHashPaymentSecretZ_new(a_ref, b_ref);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_PaymentHashPaymentSecretZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
+       *ret_conv = C2Tuple_PaymentHashPaymentSecretZ_new(a_ref, b_ref);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PaymentHashPaymentSecretZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
@@ -11881,9 +12055,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMa
        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 (uint64_t)ret_ref;
+       LDKC2Tuple_BlockHashChannelManagerZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelManagerZ), "LDKC2Tuple_BlockHashChannelManagerZ");
+       *ret_conv = C2Tuple_BlockHashChannelManagerZ_new(a_ref, b_conv);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelManagerZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
@@ -12141,9 +12315,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SignedRawInvoiceNo
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
        LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* orig_conv = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(orig & ~1);
-       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
-       *ret_ref = C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(orig_conv);
-       return (uint64_t)ret_ref;
+       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
+       *ret_conv = C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(orig_conv);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1new(JNIEnv *env, jclass clz, int64_t a, int8_tArray b, int64_t c) {
@@ -12158,9 +12332,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1RawInvoice_1u832In
        c_conv.inner = (void*)(c & (~1));
        c_conv.is_owned = (c & 1) || (c == 0);
        c_conv = InvoiceSignature_clone(&c_conv);
-       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
-       *ret_ref = C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(a_conv, b_ref, c_conv);
-       return (uint64_t)ret_ref;
+       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
+       *ret_conv = C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(a_conv, b_ref, c_conv);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
@@ -12523,9 +12697,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateE
 
 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 (uint64_t)ret_ref;
+       LDKC2Tuple_OutPointScriptZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
+       *ret_conv = C2Tuple_OutPointScriptZ_clone(orig_conv);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1new(JNIEnv *env, jclass clz, int64_t a, int8_tArray b) {
@@ -12537,9 +12711,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1n
        b_ref.datalen = (*env)->GetArrayLength(env, b);
        b_ref.data = MALLOC(b_ref.datalen, "LDKCVec_u8Z Bytes");
        (*env)->GetByteArrayRegion(env, b, 0, b_ref.datalen, b_ref.data);
-       LDKC2Tuple_OutPointScriptZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
-       *ret_ref = C2Tuple_OutPointScriptZ_new(a_conv, b_ref);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_OutPointScriptZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
+       *ret_conv = C2Tuple_OutPointScriptZ_new(a_conv, b_ref);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
@@ -12551,9 +12725,9 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1free
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32ScriptZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
        LDKC2Tuple_u32ScriptZ* orig_conv = (LDKC2Tuple_u32ScriptZ*)(orig & ~1);
-       LDKC2Tuple_u32ScriptZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
-       *ret_ref = C2Tuple_u32ScriptZ_clone(orig_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_u32ScriptZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
+       *ret_conv = C2Tuple_u32ScriptZ_clone(orig_conv);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32ScriptZ_1new(JNIEnv *env, jclass clz, int32_t a, int8_tArray b) {
@@ -12561,9 +12735,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32ScriptZ_1new(JN
        b_ref.datalen = (*env)->GetArrayLength(env, b);
        b_ref.data = MALLOC(b_ref.datalen, "LDKCVec_u8Z Bytes");
        (*env)->GetByteArrayRegion(env, b, 0, b_ref.datalen, b_ref.data);
-       LDKC2Tuple_u32ScriptZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
-       *ret_ref = C2Tuple_u32ScriptZ_new(a, b_ref);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_u32ScriptZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
+       *ret_conv = C2Tuple_u32ScriptZ_new(a, b_ref);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32ScriptZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
@@ -12581,11 +12755,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1u32ScriptZZ_1fr
        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 _res_conv_27 = _res_vals[b];
-               LDKC2Tuple_u32ScriptZ _res_conv_27_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)_res_conv_27) & ~1);
-               FREE((void*)_res_conv_27);
-               _res_constr.data[b] = _res_conv_27_conv;
+       for (size_t v = 0; v < _res_constr.datalen; v++) {
+               int64_t _res_conv_21 = _res_vals[v];
+               LDKC2Tuple_u32ScriptZ _res_conv_21_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)_res_conv_21) & ~1);
+               FREE((void*)_res_conv_21);
+               _res_constr.data[v] = _res_conv_21_conv;
        }
        (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
        CVec_C2Tuple_u32ScriptZZ_free(_res_constr);
@@ -12593,9 +12767,9 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1u32ScriptZZ_1fr
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32ScriptZZZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
        LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* orig_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(orig & ~1);
-       LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
-       *ret_ref = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(orig_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
+       *ret_conv = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(orig_conv);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32ScriptZZZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int64_tArray b) {
@@ -12609,16 +12783,16 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_
        else
                b_constr.data = NULL;
        int64_t* b_vals = (*env)->GetLongArrayElements (env, b, NULL);
-       for (size_t b = 0; b < b_constr.datalen; b++) {
-               int64_t b_conv_27 = b_vals[b];
-               LDKC2Tuple_u32ScriptZ b_conv_27_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_27) & ~1);
-               b_conv_27_conv = C2Tuple_u32ScriptZ_clone((LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_27) & ~1));
-               b_constr.data[b] = b_conv_27_conv;
+       for (size_t v = 0; v < b_constr.datalen; v++) {
+               int64_t b_conv_21 = b_vals[v];
+               LDKC2Tuple_u32ScriptZ b_conv_21_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_21) & ~1);
+               b_conv_21_conv = C2Tuple_u32ScriptZ_clone((LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_21) & ~1));
+               b_constr.data[v] = b_conv_21_conv;
        }
        (*env)->ReleaseLongArrayElements(env, b, b_vals, 0);
-       LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
-       *ret_ref = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a_ref, b_constr);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
+       *ret_conv = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a_ref, b_constr);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32ScriptZZZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
@@ -12636,11 +12810,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1TxidCVec_1C2Tup
        else
                _res_constr.data = NULL;
        int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
-       for (size_t v = 0; v < _res_constr.datalen; v++) {
-               int64_t _res_conv_47 = _res_vals[v];
-               LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res_conv_47_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(((uint64_t)_res_conv_47) & ~1);
-               FREE((void*)_res_conv_47);
-               _res_constr.data[v] = _res_conv_47_conv;
+       for (size_t o = 0; o < _res_constr.datalen; o++) {
+               int64_t _res_conv_40 = _res_vals[o];
+               LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res_conv_40_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(((uint64_t)_res_conv_40) & ~1);
+               FREE((void*)_res_conv_40);
+               _res_constr.data[o] = _res_conv_40_conv;
        }
        (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
        CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res_constr);
@@ -12685,17 +12859,17 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TransactionZ_1free(JNIEn
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32TxOutZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
        LDKC2Tuple_u32TxOutZ* orig_conv = (LDKC2Tuple_u32TxOutZ*)(orig & ~1);
-       LDKC2Tuple_u32TxOutZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
-       *ret_ref = C2Tuple_u32TxOutZ_clone(orig_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_u32TxOutZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
+       *ret_conv = C2Tuple_u32TxOutZ_clone(orig_conv);
+       return ((uint64_t)ret_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);
        b_conv = TxOut_clone((LDKTxOut*)(((uint64_t)b) & ~1));
-       LDKC2Tuple_u32TxOutZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
-       *ret_ref = C2Tuple_u32TxOutZ_new(a, b_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_u32TxOutZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
+       *ret_conv = C2Tuple_u32TxOutZ_new(a, b_conv);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32TxOutZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
@@ -12713,11 +12887,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1u32TxOutZZ_1fre
        else
                _res_constr.data = NULL;
        int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
-       for (size_t a = 0; a < _res_constr.datalen; a++) {
-               int64_t _res_conv_26 = _res_vals[a];
-               LDKC2Tuple_u32TxOutZ _res_conv_26_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)_res_conv_26) & ~1);
-               FREE((void*)_res_conv_26);
-               _res_constr.data[a] = _res_conv_26_conv;
+       for (size_t u = 0; u < _res_constr.datalen; u++) {
+               int64_t _res_conv_20 = _res_vals[u];
+               LDKC2Tuple_u32TxOutZ _res_conv_20_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)_res_conv_20) & ~1);
+               FREE((void*)_res_conv_20);
+               _res_constr.data[u] = _res_conv_20_conv;
        }
        (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
        CVec_C2Tuple_u32TxOutZZ_free(_res_constr);
@@ -12725,9 +12899,9 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1u32TxOutZZ_1fre
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
        LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* orig_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(orig & ~1);
-       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
-       *ret_ref = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+       *ret_conv = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig_conv);
+       return ((uint64_t)ret_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) {
@@ -12741,16 +12915,16 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_
        else
                b_constr.data = NULL;
        int64_t* b_vals = (*env)->GetLongArrayElements (env, b, NULL);
-       for (size_t a = 0; a < b_constr.datalen; a++) {
-               int64_t b_conv_26 = b_vals[a];
-               LDKC2Tuple_u32TxOutZ b_conv_26_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_26) & ~1);
-               b_conv_26_conv = C2Tuple_u32TxOutZ_clone((LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_26) & ~1));
-               b_constr.data[a] = b_conv_26_conv;
+       for (size_t u = 0; u < b_constr.datalen; u++) {
+               int64_t b_conv_20 = b_vals[u];
+               LDKC2Tuple_u32TxOutZ b_conv_20_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_20) & ~1);
+               b_conv_20_conv = C2Tuple_u32TxOutZ_clone((LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_20) & ~1));
+               b_constr.data[u] = b_conv_20_conv;
        }
        (*env)->ReleaseLongArrayElements(env, b, b_vals, 0);
-       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
-       *ret_ref = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a_ref, b_constr);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+       *ret_conv = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a_ref, b_constr);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
@@ -12768,11 +12942,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1TxidCVec_1C2Tup
        else
                _res_constr.data = NULL;
        int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
-       for (size_t u = 0; u < _res_constr.datalen; u++) {
-               int64_t _res_conv_46 = _res_vals[u];
-               LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res_conv_46_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(((uint64_t)_res_conv_46) & ~1);
-               FREE((void*)_res_conv_46);
-               _res_constr.data[u] = _res_conv_46_conv;
+       for (size_t n = 0; n < _res_constr.datalen; n++) {
+               int64_t _res_conv_39 = _res_vals[n];
+               LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res_conv_39_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(((uint64_t)_res_conv_39) & ~1);
+               FREE((void*)_res_conv_39);
+               _res_constr.data[n] = _res_conv_39_conv;
        }
        (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
        CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res_constr);
@@ -12798,7 +12972,7 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1BalanceZ_1free(JNIEnv *e
 
 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);
-       // Warning: we may need a move here but no clone is available for LDKC2Tuple_BlockHashChannelMonitorZ
+       o_conv = C2Tuple_BlockHashChannelMonitorZ_clone((LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o) & ~1));
        LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ");
        *ret_conv = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o_conv);
        return (uint64_t)ret_conv;
@@ -12821,6 +12995,13 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashCha
        CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res_conv);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* orig_conv = (LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)(orig & ~1);
+       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ");
+       *ret_conv = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(orig_conv);
+       return (uint64_t)ret_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 = CResult_NoneLightningErrorZ_ok();
@@ -12853,9 +13034,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneLightningError
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyTypeZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
        LDKC2Tuple_PublicKeyTypeZ* orig_conv = (LDKC2Tuple_PublicKeyTypeZ*)(orig & ~1);
-       LDKC2Tuple_PublicKeyTypeZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
-       *ret_ref = C2Tuple_PublicKeyTypeZ_clone(orig_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_PublicKeyTypeZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
+       *ret_conv = C2Tuple_PublicKeyTypeZ_clone(orig_conv);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyTypeZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int64_t b) {
@@ -12867,9 +13048,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyTypeZ_1ne
                // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
                LDKType_JCalls_cloned(&b_conv);
        }
-       LDKC2Tuple_PublicKeyTypeZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
-       *ret_ref = C2Tuple_PublicKeyTypeZ_new(a_ref, b_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_PublicKeyTypeZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
+       *ret_conv = C2Tuple_PublicKeyTypeZ_new(a_ref, b_conv);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyTypeZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
@@ -12887,11 +13068,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1PublicKeyTypeZZ
        else
                _res_constr.data = NULL;
        int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
-       for (size_t y = 0; y < _res_constr.datalen; y++) {
-               int64_t _res_conv_24 = _res_vals[y];
-               LDKC2Tuple_PublicKeyTypeZ _res_conv_24_conv = *(LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)_res_conv_24) & ~1);
-               FREE((void*)_res_conv_24);
-               _res_constr.data[y] = _res_conv_24_conv;
+       for (size_t z = 0; z < _res_constr.datalen; z++) {
+               int64_t _res_conv_25 = _res_vals[z];
+               LDKC2Tuple_PublicKeyTypeZ _res_conv_25_conv = *(LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)_res_conv_25) & ~1);
+               FREE((void*)_res_conv_25);
+               _res_constr.data[z] = _res_conv_25_conv;
        }
        (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
        CVec_C2Tuple_PublicKeyTypeZZ_free(_res_constr);
@@ -12929,9 +13110,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningError
 
 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 (uint64_t)ret_ref;
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
+       *ret_conv = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig_conv);
+       return ((uint64_t)ret_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) {
@@ -12947,9 +13128,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncemen
        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 (uint64_t)ret_ref;
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
+       *ret_conv = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a_conv, b_conv, c_conv);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
@@ -12967,11 +13148,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C3Tuple_1ChannelAnnounce
        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 _res_conv_63 = _res_vals[l];
-               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res_conv_63_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)_res_conv_63) & ~1);
-               FREE((void*)_res_conv_63);
-               _res_constr.data[l] = _res_conv_63_conv;
+       for (size_t h = 0; h < _res_constr.datalen; h++) {
+               int64_t _res_conv_59 = _res_vals[h];
+               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res_conv_59_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)_res_conv_59) & ~1);
+               FREE((void*)_res_conv_59);
+               _res_constr.data[h] = _res_conv_59_conv;
        }
        (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
        CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res_constr);
@@ -13323,7 +13504,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecode
        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
+       o_conv = NetworkGraph_clone(&o_conv);
        LDKCResult_NetworkGraphDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetworkGraphDecodeErrorZ), "LDKCResult_NetworkGraphDecodeErrorZ");
        *ret_conv = CResult_NetworkGraphDecodeErrorZ_ok(o_conv);
        return (uint64_t)ret_conv;
@@ -13346,6 +13527,13 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecodeErr
        CResult_NetworkGraphDecodeErrorZ_free(_res_conv);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_NetworkGraphDecodeErrorZ* orig_conv = (LDKCResult_NetworkGraphDecodeErrorZ*)(orig & ~1);
+       LDKCResult_NetworkGraphDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetworkGraphDecodeErrorZ), "LDKCResult_NetworkGraphDecodeErrorZ");
+       *ret_conv = CResult_NetworkGraphDecodeErrorZ_clone(orig_conv);
+       return (uint64_t)ret_conv;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NetAddressu8Z_1ok(JNIEnv *env, jclass clz, int64_t o) {
        LDKNetAddress o_conv = *(LDKNetAddress*)(((uint64_t)o) & ~1);
        o_conv = NetAddress_clone((LDKNetAddress*)(((uint64_t)o) & ~1));
@@ -16601,9 +16789,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1fundin
        LDKChannelMonitor this_arg_conv;
        this_arg_conv.inner = (void*)(this_arg & (~1));
        this_arg_conv.is_owned = false;
-       LDKC2Tuple_OutPointScriptZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
-       *ret_ref = ChannelMonitor_get_funding_txo(&this_arg_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_OutPointScriptZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
+       *ret_conv = ChannelMonitor_get_funding_txo(&this_arg_conv);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1outputs_1to_1watch(JNIEnv *env, jclass clz, int64_t this_arg) {
@@ -16613,10 +16801,10 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1o
        LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ ret_var = ChannelMonitor_get_outputs_to_watch(&this_arg_conv);
        int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
        int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
-       for (size_t v = 0; v < ret_var.datalen; v++) {
-               LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_conv_47_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
-               *ret_conv_47_ref = ret_var.data[v];
-               ret_arr_ptr[v] = (uint64_t)ret_conv_47_ref;
+       for (size_t o = 0; o < ret_var.datalen; o++) {
+               LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_conv_40_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
+               *ret_conv_40_conv = ret_var.data[o];
+               ret_arr_ptr[o] = ((uint64_t)ret_conv_40_conv);
        }
        (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
        FREE(ret_var.data);
@@ -16701,11 +16889,11 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1block_
        else
                txdata_constr.data = NULL;
        int64_t* txdata_vals = (*env)->GetLongArrayElements (env, txdata, NULL);
-       for (size_t y = 0; y < txdata_constr.datalen; y++) {
-               int64_t txdata_conv_24 = txdata_vals[y];
-               LDKC2Tuple_usizeTransactionZ txdata_conv_24_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_24) & ~1);
-               txdata_conv_24_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_24) & ~1));
-               txdata_constr.data[y] = txdata_conv_24_conv;
+       for (size_t c = 0; c < txdata_constr.datalen; c++) {
+               int64_t txdata_conv_28 = txdata_vals[c];
+               LDKC2Tuple_usizeTransactionZ txdata_conv_28_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1);
+               txdata_conv_28_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1));
+               txdata_constr.data[c] = txdata_conv_28_conv;
        }
        (*env)->ReleaseLongArrayElements(env, txdata, txdata_vals, 0);
        LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(((uint64_t)broadcaster) & ~1);
@@ -16726,10 +16914,10 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1block_
        LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ret_var = ChannelMonitor_block_connected(&this_arg_conv, header_ref, txdata_constr, height, broadcaster_conv, fee_estimator_conv, logger_conv);
        int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
        int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
-       for (size_t u = 0; u < ret_var.datalen; u++) {
-               LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_46_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
-               *ret_conv_46_ref = ret_var.data[u];
-               ret_arr_ptr[u] = (uint64_t)ret_conv_46_ref;
+       for (size_t n = 0; n < ret_var.datalen; n++) {
+               LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_39_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+               *ret_conv_39_conv = ret_var.data[n];
+               ret_arr_ptr[n] = ((uint64_t)ret_conv_39_conv);
        }
        (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
        FREE(ret_var.data);
@@ -16777,11 +16965,11 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1transa
        else
                txdata_constr.data = NULL;
        int64_t* txdata_vals = (*env)->GetLongArrayElements (env, txdata, NULL);
-       for (size_t y = 0; y < txdata_constr.datalen; y++) {
-               int64_t txdata_conv_24 = txdata_vals[y];
-               LDKC2Tuple_usizeTransactionZ txdata_conv_24_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_24) & ~1);
-               txdata_conv_24_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_24) & ~1));
-               txdata_constr.data[y] = txdata_conv_24_conv;
+       for (size_t c = 0; c < txdata_constr.datalen; c++) {
+               int64_t txdata_conv_28 = txdata_vals[c];
+               LDKC2Tuple_usizeTransactionZ txdata_conv_28_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1);
+               txdata_conv_28_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1));
+               txdata_constr.data[c] = txdata_conv_28_conv;
        }
        (*env)->ReleaseLongArrayElements(env, txdata, txdata_vals, 0);
        LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(((uint64_t)broadcaster) & ~1);
@@ -16802,10 +16990,10 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1transa
        LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ret_var = ChannelMonitor_transactions_confirmed(&this_arg_conv, header_ref, txdata_constr, height, broadcaster_conv, fee_estimator_conv, logger_conv);
        int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
        int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
-       for (size_t u = 0; u < ret_var.datalen; u++) {
-               LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_46_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
-               *ret_conv_46_ref = ret_var.data[u];
-               ret_arr_ptr[u] = (uint64_t)ret_conv_46_ref;
+       for (size_t n = 0; n < ret_var.datalen; n++) {
+               LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_39_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+               *ret_conv_39_conv = ret_var.data[n];
+               ret_arr_ptr[n] = ((uint64_t)ret_conv_39_conv);
        }
        (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
        FREE(ret_var.data);
@@ -16864,10 +17052,10 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1best_1
        LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ret_var = ChannelMonitor_best_block_updated(&this_arg_conv, header_ref, height, broadcaster_conv, fee_estimator_conv, logger_conv);
        int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
        int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
-       for (size_t u = 0; u < ret_var.datalen; u++) {
-               LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_46_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
-               *ret_conv_46_ref = ret_var.data[u];
-               ret_arr_ptr[u] = (uint64_t)ret_conv_46_ref;
+       for (size_t n = 0; n < ret_var.datalen; n++) {
+               LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_39_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+               *ret_conv_39_conv = ret_var.data[n];
+               ret_arr_ptr[n] = ((uint64_t)ret_conv_39_conv);
        }
        (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
        FREE(ret_var.data);
@@ -18864,9 +19052,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1create_1inb
        this_arg_conv.is_owned = false;
        LDKCOption_u64Z min_value_msat_conv = *(LDKCOption_u64Z*)(((uint64_t)min_value_msat) & ~1);
        min_value_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)(((uint64_t)min_value_msat) & ~1));
-       LDKC2Tuple_PaymentHashPaymentSecretZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
-       *ret_ref = ChannelManager_create_inbound_payment(&this_arg_conv, min_value_msat_conv, invoice_expiry_delta_secs, user_payment_id);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_PaymentHashPaymentSecretZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
+       *ret_conv = ChannelManager_create_inbound_payment(&this_arg_conv, min_value_msat_conv, invoice_expiry_delta_secs, user_payment_id);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1create_1inbound_1payment_1for_1hash(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray payment_hash, int64_t min_value_msat, int32_t invoice_expiry_delta_secs, int64_t user_payment_id) {
@@ -27065,6 +27253,20 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1free(JNIEnv *env
        NetworkGraph_free(this_obj_conv);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKNetworkGraph orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKNetworkGraph ret_var = NetworkGraph_clone(&orig_conv);
+       CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       uint64_t ret_ref = (uint64_t)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReadOnlyNetworkGraph_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKReadOnlyNetworkGraph this_obj_conv;
        this_obj_conv.inner = (void*)(this_obj & (~1));
@@ -27161,7 +27363,7 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetGraphMsgHandler_1set_1netwo
        LDKNetworkGraph 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 LDKNetworkGraph
+       val_conv = NetworkGraph_clone(&val_conv);
        NetGraphMsgHandler_set_network_graph(&this_ptr_conv, val_conv);
 }
 
@@ -27169,7 +27371,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NetGraphMsgHandler_1new(JNI
        LDKNetworkGraph network_graph_conv;
        network_graph_conv.inner = (void*)(network_graph & (~1));
        network_graph_conv.is_owned = (network_graph & 1) || (network_graph == 0);
-       // Warning: we need a move here but no clone is available for LDKNetworkGraph
+       network_graph_conv = NetworkGraph_clone(&network_graph_conv);
        LDKCOption_AccessZ chain_access_conv = *(LDKCOption_AccessZ*)(((uint64_t)chain_access) & ~1);
        // Warning: we may need a move here but no clone is available for LDKCOption_AccessZ
        if (chain_access_conv.tag == LDKCOption_AccessZ_Some) {
@@ -29026,9 +29228,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SignedRawInvoice_1into_1par
        this_arg_conv.inner = (void*)(this_arg & (~1));
        this_arg_conv.is_owned = (this_arg & 1) || (this_arg == 0);
        this_arg_conv = SignedRawInvoice_clone(&this_arg_conv);
-       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
-       *ret_ref = SignedRawInvoice_into_parts(this_arg_conv);
-       return (uint64_t)ret_ref;
+       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
+       *ret_conv = SignedRawInvoice_into_parts(this_arg_conv);
+       return ((uint64_t)ret_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SignedRawInvoice_1raw_1invoice(JNIEnv *env, jclass clz, int64_t this_arg) {
index df5e0c9c676a38f8c87c6c5fa3937f4dc8a96bab..a2f4c071781fa636f695a33588159260d0b875eb 100644 (file)
@@ -713,18 +713,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1usizeTransactionZ
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_usizeTransactionZ_get_a
+ * Method:    C2Tuple_usizeTransactionZ_get_a
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1usizeTransactionZ_1get_1a
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1get_1a
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_usizeTransactionZ_get_b
+ * Method:    C2Tuple_usizeTransactionZ_get_b
  * Signature: (J)[B
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1usizeTransactionZ_1get_1b
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1get_1b
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -1041,18 +1041,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1SignatureCVec_1Si
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_SignatureCVec_SignatureZZ_get_a
+ * Method:    C2Tuple_SignatureCVec_SignatureZZ_get_a
  * Signature: (J)[B
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1SignatureCVec_1SignatureZZ_1get_1a
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1get_1a
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_SignatureCVec_SignatureZZ_get_b
+ * Method:    C2Tuple_SignatureCVec_SignatureZZ_get_b
  * Signature: (J)[[B
  */
-JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1SignatureCVec_1SignatureZZ_1get_1b
+JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1get_1b
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -1385,18 +1385,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelM
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_BlockHashChannelMonitorZ_get_a
+ * Method:    C2Tuple_BlockHashChannelMonitorZ_get_a
  * Signature: (J)[B
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelMonitorZ_1get_1a
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMonitorZ_1get_1a
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_BlockHashChannelMonitorZ_get_b
+ * Method:    C2Tuple_BlockHashChannelMonitorZ_get_b
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelMonitorZ_1get_1b
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMonitorZ_1get_1b
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -1569,18 +1569,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1PaymentHashPaymen
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_PaymentHashPaymentSecretZ_get_a
+ * Method:    C2Tuple_PaymentHashPaymentSecretZ_get_a
  * Signature: (J)[B
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1PaymentHashPaymentSecretZ_1get_1a
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PaymentHashPaymentSecretZ_1get_1a
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_PaymentHashPaymentSecretZ_get_b
+ * Method:    C2Tuple_PaymentHashPaymentSecretZ_get_b
  * Signature: (J)[B
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1PaymentHashPaymentSecretZ_1get_1b
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PaymentHashPaymentSecretZ_1get_1b
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -1761,18 +1761,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelM
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_BlockHashChannelManagerZ_get_a
+ * Method:    C2Tuple_BlockHashChannelManagerZ_get_a
  * Signature: (J)[B
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelManagerZ_1get_1a
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelManagerZ_1get_1a
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_BlockHashChannelManagerZ_get_b
+ * Method:    C2Tuple_BlockHashChannelManagerZ_get_b
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelManagerZ_1get_1b
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelManagerZ_1get_1b
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -1993,26 +1993,26 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1RawInvoice_1u832I
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a
+ * Method:    C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1get_1a
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1get_1a
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b
+ * Method:    C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b
  * Signature: (J)[B
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1get_1b
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1get_1b
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c
+ * Method:    C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1get_1c
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1get_1c
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -2297,18 +2297,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1OutPointScriptZ_1
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_OutPointScriptZ_get_a
+ * Method:    C2Tuple_OutPointScriptZ_get_a
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1OutPointScriptZ_1get_1a
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1get_1a
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_OutPointScriptZ_get_b
+ * Method:    C2Tuple_OutPointScriptZ_get_b
  * Signature: (J)[B
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1OutPointScriptZ_1get_1b
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1get_1b
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -2321,18 +2321,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32ScriptZ_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_u32ScriptZ_get_a
+ * Method:    C2Tuple_u32ScriptZ_get_a
  * Signature: (J)I
  */
-JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32ScriptZ_1get_1a
+JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32ScriptZ_1get_1a
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_u32ScriptZ_get_b
+ * Method:    C2Tuple_u32ScriptZ_get_b
  * Signature: (J)[B
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32ScriptZ_1get_1b
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32ScriptZ_1get_1b
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -2353,18 +2353,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a
+ * Method:    C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a
  * Signature: (J)[B
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple_1u32ScriptZZZ_1get_1a
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32ScriptZZZ_1get_1a
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b
+ * Method:    C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b
  * Signature: (J)[J
  */
-JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple_1u32ScriptZZZ_1get_1b
+JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32ScriptZZZ_1get_1b
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -2417,18 +2417,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32TxOutZ_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_u32TxOutZ_get_a
+ * Method:    C2Tuple_u32TxOutZ_get_a
  * Signature: (J)I
  */
-JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32TxOutZ_1get_1a
+JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32TxOutZ_1get_1a
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_u32TxOutZ_get_b
+ * Method:    C2Tuple_u32TxOutZ_get_b
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32TxOutZ_1get_1b
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32TxOutZ_1get_1b
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -2449,18 +2449,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a
+ * Method:    C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a
  * Signature: (J)[B
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1get_1a
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1get_1a
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b
+ * Method:    C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b
  * Signature: (J)[J
  */
-JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1get_1b
+JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1get_1b
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -2545,18 +2545,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1PublicKeyTypeZ_1n
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_PublicKeyTypeZ_get_a
+ * Method:    C2Tuple_PublicKeyTypeZ_get_a
  * Signature: (J)[B
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1PublicKeyTypeZ_1get_1a
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyTypeZ_1get_1a
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_PublicKeyTypeZ_get_b
+ * Method:    C2Tuple_PublicKeyTypeZ_get_b
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1PublicKeyTypeZ_1get_1b
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyTypeZ_1get_1b
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -2601,26 +2601,26 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnounceme
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a
+ * Method:    C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1a
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1a
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b
+ * Method:    C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1b
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1b
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c
+ * Method:    C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1c
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1c
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -5791,6 +5791,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1fre
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    C2Tuple_BlockHashChannelMonitorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMonitorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    C2Tuple_BlockHashChannelMonitorZ_new
@@ -5839,6 +5847,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1C2Tuple_1Block
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1C2Tuple_1BlockHashChannelMonitorZZErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1C2Tuple_1BlockHashChannelMonitorZZErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    COption_u16Z_some
@@ -6895,6 +6911,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashCh
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    CResult_NoneLightningErrorZ_ok
@@ -7351,6 +7375,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecodeEr
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NetworkGraphDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    CResult_NetAddressu8Z_ok
@@ -17711,6 +17743,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_get_1route
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1free
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    NetworkGraph_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ReadOnlyNetworkGraph_free
index 1f6be38bf7d1e7a8e392aa173899ff4356012c69..801f4ebdd47ce1698fe537042958e5dae1ad15fe 100644 (file)
@@ -872,17 +872,27 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_usizeTransactionZ
        ret->b = b_ref;
        return (uint64_t)ret;
 }
-int64_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_usizeTransactionZ_get_a(uint32_t ptr) {
-       LDKC2Tuple_usizeTransactionZ *tuple = (LDKC2Tuple_usizeTransactionZ*)(ptr & ~1);
+static inline uintptr_t C2Tuple_usizeTransactionZ_get_a(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR tuple){
        return tuple->a;
 }
-int8_tArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_usizeTransactionZ_get_b(uint32_t ptr) {
-       LDKC2Tuple_usizeTransactionZ *tuple = (LDKC2Tuple_usizeTransactionZ*)(ptr & ~1);
-       LDKTransaction b_var = tuple->b;
-       int8_tArray b_arr = init_arr(b_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(b_arr + 4), b_var.data, b_var.datalen);
-       return b_arr;
+int64_t  __attribute__((visibility("default"))) TS_C2Tuple_usizeTransactionZ_get_a(uint32_t tuple) {
+       LDKC2Tuple_usizeTransactionZ* tuple_conv = (LDKC2Tuple_usizeTransactionZ*)(tuple & ~1);
+       int64_t ret_val = C2Tuple_usizeTransactionZ_get_a(tuple_conv);
+       return ret_val;
+}
+
+static inline struct LDKTransaction C2Tuple_usizeTransactionZ_get_b(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR tuple){
+       return tuple->b;
 }
+int8_tArray  __attribute__((visibility("default"))) TS_C2Tuple_usizeTransactionZ_get_b(uint32_t tuple) {
+       LDKC2Tuple_usizeTransactionZ* tuple_conv = (LDKC2Tuple_usizeTransactionZ*)(tuple & ~1);
+       LDKTransaction ret_var = C2Tuple_usizeTransactionZ_get_b(tuple_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       Transaction_free(ret_var);
+       return ret_arr;
+}
+
 uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_C2Tuple_usizeTransactionZZ_new(uint32_tArray elems) {
        LDKCVec_C2Tuple_usizeTransactionZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_usizeTransactionZZ), "LDKCVec_C2Tuple_usizeTransactionZZ");
        ret->datalen = *((uint32_t*)elems);
@@ -976,8 +986,10 @@ uint32_t __attribute__((visibility("default"))) TS_LDKCOption_C2Tuple_usizeTrans
        LDKCOption_C2Tuple_usizeTransactionZZ *obj = (LDKCOption_C2Tuple_usizeTransactionZZ*)(ptr & ~1);
        switch(obj->tag) {
                case LDKCOption_C2Tuple_usizeTransactionZZ_Some: {
-                       uint64_t some_ref = (uint64_t)(&obj->some) | 1;
-                       return 0 /* LDKCOption_C2Tuple_usizeTransactionZZ - Some */; (void) some_ref;
+                       LDKC2Tuple_usizeTransactionZ* some_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
+                       *some_conv = obj->some;
+                       *some_conv = C2Tuple_usizeTransactionZ_clone(some_conv);
+                       return 0 /* LDKCOption_C2Tuple_usizeTransactionZZ - Some */; (void) ((uint64_t)some_conv);
                }
                case LDKCOption_C2Tuple_usizeTransactionZZ_None: {
                        return 0 /* LDKCOption_C2Tuple_usizeTransactionZZ - None */;
@@ -1474,32 +1486,43 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_SignatureCVec_Sig
        ret->b = b_constr;
        return (uint64_t)ret;
 }
-int8_tArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_SignatureCVec_SignatureZZ_get_a(uint32_t ptr) {
-       LDKC2Tuple_SignatureCVec_SignatureZZ *tuple = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(ptr & ~1);
-       int8_tArray a_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(a_arr + 4), tuple->a.compact_form, 64);
-       return a_arr;
+static inline struct LDKSignature C2Tuple_SignatureCVec_SignatureZZ_get_a(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR tuple){
+       return tuple->a;
+}
+int8_tArray  __attribute__((visibility("default"))) TS_C2Tuple_SignatureCVec_SignatureZZ_get_a(uint32_t tuple) {
+       LDKC2Tuple_SignatureCVec_SignatureZZ* tuple_conv = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(tuple & ~1);
+       int8_tArray ret_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), C2Tuple_SignatureCVec_SignatureZZ_get_a(tuple_conv).compact_form, 64);
+       return ret_arr;
 }
-ptrArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_SignatureCVec_SignatureZZ_get_b(uint32_t ptr) {
-       LDKC2Tuple_SignatureCVec_SignatureZZ *tuple = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(ptr & ~1);
-       LDKCVec_SignatureZ b_var = tuple->b;
-       ptrArray b_arr = init_arr(b_var.datalen, sizeof(uint32_t), "Native ptrArray Bytes");
-       int8_tArray *b_arr_ptr = (int8_tArray*)(b_arr + 4);
-       for (size_t m = 0; m < b_var.datalen; m++) {
-               int8_tArray b_conv_12_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
-               memcpy((uint8_t*)(b_conv_12_arr + 4), b_var.data[m].compact_form, 64);
-               b_arr_ptr[m] = b_conv_12_arr;
+
+static inline struct LDKCVec_SignatureZ C2Tuple_SignatureCVec_SignatureZZ_get_b(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR tuple){
+       return tuple->b;
+}
+ptrArray  __attribute__((visibility("default"))) TS_C2Tuple_SignatureCVec_SignatureZZ_get_b(uint32_t tuple) {
+       LDKC2Tuple_SignatureCVec_SignatureZZ* tuple_conv = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(tuple & ~1);
+       LDKCVec_SignatureZ ret_var = C2Tuple_SignatureCVec_SignatureZZ_get_b(tuple_conv);
+       ptrArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native ptrArray Bytes");
+       int8_tArray *ret_arr_ptr = (int8_tArray*)(ret_arr + 4);
+       for (size_t m = 0; m < ret_var.datalen; m++) {
+               int8_tArray ret_conv_12_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
+               memcpy((uint8_t*)(ret_conv_12_arr + 4), ret_var.data[m].compact_form, 64);
+               ret_arr_ptr[m] = ret_conv_12_arr;
        }
-       return b_arr;
+       FREE(ret_var.data);
+       return ret_arr;
 }
+
 jboolean  __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_result_ok(uint32_t arg) {
        return ((LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)arg)->result_ok;
 }
 uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(uint32_t arg) {
        LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *val = (LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(arg & ~1);
        CHECK(val->result_ok);
-       uint64_t res_ref = (uint64_t)(&(*val->contents.result)) | 1;
-       return res_ref;
+       LDKC2Tuple_SignatureCVec_SignatureZZ* res_conv = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
+       *res_conv = (*val->contents.result);
+       *res_conv = C2Tuple_SignatureCVec_SignatureZZ_clone(res_conv);
+       return ((uint64_t)res_conv);
 }
 void  __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(uint32_t arg) {
        LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *val = (LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(arg & ~1);
@@ -2128,20 +2151,31 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_BlockHashChannelM
        ret->b = b_conv;
        return (uint64_t)ret;
 }
-int8_tArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_BlockHashChannelMonitorZ_get_a(uint32_t ptr) {
-       LDKC2Tuple_BlockHashChannelMonitorZ *tuple = (LDKC2Tuple_BlockHashChannelMonitorZ*)(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;
+static inline struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelMonitorZ_get_a(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR tuple){
+       return ThirtyTwoBytes_clone(&tuple->a);
+}
+int8_tArray  __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelMonitorZ_get_a(uint32_t tuple) {
+       LDKC2Tuple_BlockHashChannelMonitorZ* tuple_conv = (LDKC2Tuple_BlockHashChannelMonitorZ*)(tuple & ~1);
+       int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), C2Tuple_BlockHashChannelMonitorZ_get_a(tuple_conv).data, 32);
+       return ret_arr;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_BlockHashChannelMonitorZ_get_b(uint32_t ptr) {
-       LDKC2Tuple_BlockHashChannelMonitorZ *tuple = (LDKC2Tuple_BlockHashChannelMonitorZ*)(ptr & ~1);
-       LDKChannelMonitor b_var = tuple->b;
-       CHECK((((uint64_t)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((uint64_t)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       uint64_t b_ref = (uint64_t)b_var.inner & ~1;
-       return b_ref;
+
+static inline struct LDKChannelMonitor C2Tuple_BlockHashChannelMonitorZ_get_b(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR tuple){
+       return ChannelMonitor_clone(&tuple->b);
 }
+uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelMonitorZ_get_b(uint32_t tuple) {
+       LDKC2Tuple_BlockHashChannelMonitorZ* tuple_conv = (LDKC2Tuple_BlockHashChannelMonitorZ*)(tuple & ~1);
+       LDKChannelMonitor ret_var = C2Tuple_BlockHashChannelMonitorZ_get_b(tuple_conv);
+       CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       uint64_t ret_ref = (uint64_t)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_C2Tuple_BlockHashChannelMonitorZZ_new(uint32_tArray elems) {
        LDKCVec_C2Tuple_BlockHashChannelMonitorZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_BlockHashChannelMonitorZZ), "LDKCVec_C2Tuple_BlockHashChannelMonitorZZ");
        ret->datalen = *((uint32_t*)elems);
@@ -2153,12 +2187,19 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_C2Tuple_BlockHashCha
                for (size_t i = 0; i < ret->datalen; i++) {
                        uint32_t arr_elem = java_elems[i];
                        LDKC2Tuple_BlockHashChannelMonitorZ arr_elem_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)arr_elem) & ~1);
-                       // Warning: we may need a move here but no clone is available for LDKC2Tuple_BlockHashChannelMonitorZ
+                       arr_elem_conv = C2Tuple_BlockHashChannelMonitorZ_clone((LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)arr_elem) & ~1));
                        ret->data[i] = arr_elem_conv;
                }
        }
        return (uint64_t)ret;
 }
+static inline LDKCVec_C2Tuple_BlockHashChannelMonitorZZ CVec_C2Tuple_BlockHashChannelMonitorZZ_clone(const LDKCVec_C2Tuple_BlockHashChannelMonitorZZ *orig) {
+       LDKCVec_C2Tuple_BlockHashChannelMonitorZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ) * orig->datalen, "LDKCVec_C2Tuple_BlockHashChannelMonitorZZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = C2Tuple_BlockHashChannelMonitorZ_clone(&orig->data[i]);
+       }
+       return ret;
+}
 jboolean  __attribute__((visibility("default"))) TS_LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_result_ok(uint32_t arg) {
        return ((LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ*)arg)->result_ok;
 }
@@ -2168,9 +2209,11 @@ uint32_tArray  __attribute__((visibility("default"))) TS_LDKCResult_CVec_C2Tuple
        LDKCVec_C2Tuple_BlockHashChannelMonitorZZ res_var = (*val->contents.result);
        uint32_tArray res_arr = init_arr(res_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
        uint32_t *res_arr_ptr = (uint32_t*)(res_arr + 4);
-       for (size_t m = 0; m < res_var.datalen; m++) {
-               uint64_t res_conv_38_ref = (uint64_t)(&res_var.data[m]) | 1;
-               res_arr_ptr[m] = res_conv_38_ref;
+       for (size_t j = 0; j < res_var.datalen; j++) {
+               LDKC2Tuple_BlockHashChannelMonitorZ* res_conv_35_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
+               *res_conv_35_conv = res_var.data[j];
+               *res_conv_35_conv = C2Tuple_BlockHashChannelMonitorZ_clone(res_conv_35_conv);
+               res_arr_ptr[j] = ((uint64_t)res_conv_35_conv);
        }
        return res_arr;
 }
@@ -2426,18 +2469,26 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_PaymentHashPaymen
        ret->b = b_ref;
        return (uint64_t)ret;
 }
-int8_tArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_PaymentHashPaymentSecretZ_get_a(uint32_t ptr) {
-       LDKC2Tuple_PaymentHashPaymentSecretZ *tuple = (LDKC2Tuple_PaymentHashPaymentSecretZ*)(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;
+static inline struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_a(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR tuple){
+       return ThirtyTwoBytes_clone(&tuple->a);
+}
+int8_tArray  __attribute__((visibility("default"))) TS_C2Tuple_PaymentHashPaymentSecretZ_get_a(uint32_t tuple) {
+       LDKC2Tuple_PaymentHashPaymentSecretZ* tuple_conv = (LDKC2Tuple_PaymentHashPaymentSecretZ*)(tuple & ~1);
+       int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), C2Tuple_PaymentHashPaymentSecretZ_get_a(tuple_conv).data, 32);
+       return ret_arr;
+}
+
+static inline struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_b(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR tuple){
+       return ThirtyTwoBytes_clone(&tuple->b);
 }
-int8_tArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_PaymentHashPaymentSecretZ_get_b(uint32_t ptr) {
-       LDKC2Tuple_PaymentHashPaymentSecretZ *tuple = (LDKC2Tuple_PaymentHashPaymentSecretZ*)(ptr & ~1);
-       int8_tArray b_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(b_arr + 4), tuple->b.data, 32);
-       return b_arr;
+int8_tArray  __attribute__((visibility("default"))) TS_C2Tuple_PaymentHashPaymentSecretZ_get_b(uint32_t tuple) {
+       LDKC2Tuple_PaymentHashPaymentSecretZ* tuple_conv = (LDKC2Tuple_PaymentHashPaymentSecretZ*)(tuple & ~1);
+       int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), C2Tuple_PaymentHashPaymentSecretZ_get_b(tuple_conv).data, 32);
+       return ret_arr;
 }
+
 jboolean  __attribute__((visibility("default"))) TS_LDKCResult_PaymentSecretAPIErrorZ_result_ok(uint32_t arg) {
        return ((LDKCResult_PaymentSecretAPIErrorZ*)arg)->result_ok;
 }
@@ -2943,28 +2994,38 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_BlockHashChannelM
        ret->b = b_conv;
        return (uint64_t)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;
+static inline struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelManagerZ_get_a(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR tuple){
+       return ThirtyTwoBytes_clone(&tuple->a);
+}
+int8_tArray  __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelManagerZ_get_a(uint32_t tuple) {
+       LDKC2Tuple_BlockHashChannelManagerZ* tuple_conv = (LDKC2Tuple_BlockHashChannelManagerZ*)(tuple & ~1);
+       int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), C2Tuple_BlockHashChannelManagerZ_get_a(tuple_conv).data, 32);
+       return ret_arr;
+}
+
+static inline struct LDKChannelManager *C2Tuple_BlockHashChannelManagerZ_get_b(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR tuple){
+       return &tuple->b;
 }
-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((((uint64_t)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((uint64_t)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       uint64_t b_ref = (uint64_t)b_var.inner & ~1;
-       return b_ref;
+uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelManagerZ_get_b(uint32_t tuple) {
+       LDKC2Tuple_BlockHashChannelManagerZ* tuple_conv = (LDKC2Tuple_BlockHashChannelManagerZ*)(tuple & ~1);
+       LDKChannelManager ret_var = *C2Tuple_BlockHashChannelManagerZ_get_b(tuple_conv);
+       CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       uint64_t ret_ref = (uint64_t)ret_var.inner & ~1;
+       return ret_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);
-       uint64_t res_ref = (uint64_t)(&(*val->contents.result)) | 1;
-       return res_ref;
+       LDKC2Tuple_BlockHashChannelManagerZ* res_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelManagerZ), "LDKC2Tuple_BlockHashChannelManagerZ");
+       *res_conv = (*val->contents.result);
+       // Warning: we really need to clone here, but no clone is available for LDKC2Tuple_BlockHashChannelManagerZ
+       return ((uint64_t)res_conv) | 1;
 }
 uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(uint32_t arg) {
        LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)(arg & ~1);
@@ -3196,28 +3257,46 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKC3Tuple_RawInvoice_u832In
        ret->c = c_conv;
        return (uint64_t)ret;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(uint32_t ptr) {
-       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *tuple = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(ptr & ~1);
-       LDKRawInvoice a_var = tuple->a;
-       CHECK((((uint64_t)a_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((uint64_t)&a_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       uint64_t a_ref = (uint64_t)a_var.inner & ~1;
-       return a_ref;
-}
-int8_tArray  __attribute__((visibility("default"))) TS_LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(uint32_t ptr) {
-       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *tuple = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(ptr & ~1);
-       int8_tArray b_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(b_arr + 4), tuple->b.data, 32);
-       return b_arr;
-}
-uint32_t  __attribute__((visibility("default"))) TS_LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(uint32_t ptr) {
-       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *tuple = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(ptr & ~1);
-       LDKInvoiceSignature c_var = tuple->c;
-       CHECK((((uint64_t)c_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((uint64_t)&c_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       uint64_t c_ref = (uint64_t)c_var.inner & ~1;
-       return c_ref;
+static inline struct LDKRawInvoice C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple){
+       return RawInvoice_clone(&tuple->a);
 }
+uint32_t  __attribute__((visibility("default"))) TS_C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(uint32_t tuple) {
+       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* tuple_conv = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(tuple & ~1);
+       LDKRawInvoice ret_var = C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(tuple_conv);
+       CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       uint64_t ret_ref = (uint64_t)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+static inline struct LDKThirtyTwoBytes C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple){
+       return ThirtyTwoBytes_clone(&tuple->b);
+}
+int8_tArray  __attribute__((visibility("default"))) TS_C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(uint32_t tuple) {
+       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* tuple_conv = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(tuple & ~1);
+       int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(tuple_conv).data, 32);
+       return ret_arr;
+}
+
+static inline struct LDKInvoiceSignature C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple){
+       return InvoiceSignature_clone(&tuple->c);
+}
+uint32_t  __attribute__((visibility("default"))) TS_C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(uint32_t tuple) {
+       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* tuple_conv = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(tuple & ~1);
+       LDKInvoiceSignature ret_var = C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(tuple_conv);
+       CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       uint64_t ret_ref = (uint64_t)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 jboolean  __attribute__((visibility("default"))) TS_LDKCResult_PayeePubKeyErrorZ_result_ok(uint32_t arg) {
        return ((LDKCResult_PayeePubKeyErrorZ*)arg)->result_ok;
 }
@@ -3455,21 +3534,33 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_OutPointScriptZ_n
        ret->b = b_ref;
        return (uint64_t)ret;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_OutPointScriptZ_get_a(uint32_t ptr) {
-       LDKC2Tuple_OutPointScriptZ *tuple = (LDKC2Tuple_OutPointScriptZ*)(ptr & ~1);
-       LDKOutPoint a_var = tuple->a;
-       CHECK((((uint64_t)a_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((uint64_t)&a_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       uint64_t a_ref = (uint64_t)a_var.inner & ~1;
-       return a_ref;
-}
-int8_tArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_OutPointScriptZ_get_b(uint32_t ptr) {
-       LDKC2Tuple_OutPointScriptZ *tuple = (LDKC2Tuple_OutPointScriptZ*)(ptr & ~1);
-       LDKCVec_u8Z b_var = tuple->b;
-       int8_tArray b_arr = init_arr(b_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(b_arr + 4), b_var.data, b_var.datalen);
-       return b_arr;
+static inline struct LDKOutPoint C2Tuple_OutPointScriptZ_get_a(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR tuple){
+       return OutPoint_clone(&tuple->a);
+}
+uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_OutPointScriptZ_get_a(uint32_t tuple) {
+       LDKC2Tuple_OutPointScriptZ* tuple_conv = (LDKC2Tuple_OutPointScriptZ*)(tuple & ~1);
+       LDKOutPoint ret_var = C2Tuple_OutPointScriptZ_get_a(tuple_conv);
+       CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       uint64_t ret_ref = (uint64_t)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+static inline struct LDKCVec_u8Z C2Tuple_OutPointScriptZ_get_b(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR tuple){
+       return CVec_u8Z_clone(&tuple->b);
+}
+int8_tArray  __attribute__((visibility("default"))) TS_C2Tuple_OutPointScriptZ_get_b(uint32_t tuple) {
+       LDKC2Tuple_OutPointScriptZ* tuple_conv = (LDKC2Tuple_OutPointScriptZ*)(tuple & ~1);
+       LDKCVec_u8Z ret_var = C2Tuple_OutPointScriptZ_get_b(tuple_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
+
 uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_u32ScriptZ_new(int32_t a, int8_tArray b) {
        LDKC2Tuple_u32ScriptZ* ret = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
        ret->a = a;
@@ -3480,17 +3571,27 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_u32ScriptZ_new(in
        ret->b = b_ref;
        return (uint64_t)ret;
 }
-int32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_u32ScriptZ_get_a(uint32_t ptr) {
-       LDKC2Tuple_u32ScriptZ *tuple = (LDKC2Tuple_u32ScriptZ*)(ptr & ~1);
+static inline uint32_t C2Tuple_u32ScriptZ_get_a(LDKC2Tuple_u32ScriptZ *NONNULL_PTR tuple){
        return tuple->a;
 }
-int8_tArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_u32ScriptZ_get_b(uint32_t ptr) {
-       LDKC2Tuple_u32ScriptZ *tuple = (LDKC2Tuple_u32ScriptZ*)(ptr & ~1);
-       LDKCVec_u8Z b_var = tuple->b;
-       int8_tArray b_arr = init_arr(b_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(b_arr + 4), b_var.data, b_var.datalen);
-       return b_arr;
+int32_t  __attribute__((visibility("default"))) TS_C2Tuple_u32ScriptZ_get_a(uint32_t tuple) {
+       LDKC2Tuple_u32ScriptZ* tuple_conv = (LDKC2Tuple_u32ScriptZ*)(tuple & ~1);
+       int32_t ret_val = C2Tuple_u32ScriptZ_get_a(tuple_conv);
+       return ret_val;
+}
+
+static inline struct LDKCVec_u8Z C2Tuple_u32ScriptZ_get_b(LDKC2Tuple_u32ScriptZ *NONNULL_PTR tuple){
+       return CVec_u8Z_clone(&tuple->b);
+}
+int8_tArray  __attribute__((visibility("default"))) TS_C2Tuple_u32ScriptZ_get_b(uint32_t tuple) {
+       LDKC2Tuple_u32ScriptZ* tuple_conv = (LDKC2Tuple_u32ScriptZ*)(tuple & ~1);
+       LDKCVec_u8Z ret_var = C2Tuple_u32ScriptZ_get_b(tuple_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
+
 uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_C2Tuple_u32ScriptZZ_new(uint32_tArray elems) {
        LDKCVec_C2Tuple_u32ScriptZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_u32ScriptZZ), "LDKCVec_C2Tuple_u32ScriptZZ");
        ret->datalen = *((uint32_t*)elems);
@@ -3528,32 +3629,42 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_TxidCVec_C2Tuple_
        else
                b_constr.data = NULL;
        uint32_t* b_vals = (uint32_t*)(b + 4);
-       for (size_t e = 0; e < b_constr.datalen; e++) {
-               uint32_t b_conv_30 = b_vals[e];
-               LDKC2Tuple_u32ScriptZ b_conv_30_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_30) & ~1);
-               b_conv_30_conv = C2Tuple_u32ScriptZ_clone((LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_30) & ~1));
-               b_constr.data[e] = b_conv_30_conv;
+       for (size_t v = 0; v < b_constr.datalen; v++) {
+               uint32_t b_conv_21 = b_vals[v];
+               LDKC2Tuple_u32ScriptZ b_conv_21_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_21) & ~1);
+               b_conv_21_conv = C2Tuple_u32ScriptZ_clone((LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_21) & ~1));
+               b_constr.data[v] = b_conv_21_conv;
        }
        ret->b = b_constr;
        return (uint64_t)ret;
 }
-int8_tArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(uint32_t ptr) {
-       LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *tuple = (LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(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;
+static inline struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR tuple){
+       return ThirtyTwoBytes_clone(&tuple->a);
+}
+int8_tArray  __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(uint32_t tuple) {
+       LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* tuple_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(tuple & ~1);
+       int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(tuple_conv).data, 32);
+       return ret_arr;
+}
+
+static inline struct LDKCVec_C2Tuple_u32ScriptZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR tuple){
+       return CVec_C2Tuple_u32ScriptZZ_clone(&tuple->b);
 }
-uint32_tArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(uint32_t ptr) {
-       LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *tuple = (LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(ptr & ~1);
-       LDKCVec_C2Tuple_u32ScriptZZ b_var = tuple->b;
-       uint32_tArray b_arr = init_arr(b_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
-       uint32_t *b_arr_ptr = (uint32_t*)(b_arr + 4);
-       for (size_t e = 0; e < b_var.datalen; e++) {
-               uint64_t b_conv_30_ref = (uint64_t)(&b_var.data[e]) | 1;
-               b_arr_ptr[e] = b_conv_30_ref;
+uint32_tArray  __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(uint32_t tuple) {
+       LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* tuple_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(tuple & ~1);
+       LDKCVec_C2Tuple_u32ScriptZZ ret_var = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(tuple_conv);
+       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 v = 0; v < ret_var.datalen; v++) {
+               LDKC2Tuple_u32ScriptZ* ret_conv_21_conv = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
+               *ret_conv_21_conv = ret_var.data[v];
+               ret_arr_ptr[v] = ((uint64_t)ret_conv_21_conv);
        }
-       return b_arr;
+       FREE(ret_var.data);
+       return ret_arr;
 }
+
 uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_new(uint32_tArray elems) {
        LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ), "LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ");
        ret->datalen = *((uint32_t*)elems);
@@ -3723,15 +3834,25 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_u32TxOutZ_new(int
        ret->b = b_conv;
        return (uint64_t)ret;
 }
-int32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_u32TxOutZ_get_a(uint32_t ptr) {
-       LDKC2Tuple_u32TxOutZ *tuple = (LDKC2Tuple_u32TxOutZ*)(ptr & ~1);
+static inline uint32_t C2Tuple_u32TxOutZ_get_a(LDKC2Tuple_u32TxOutZ *NONNULL_PTR tuple){
        return tuple->a;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_u32TxOutZ_get_b(uint32_t ptr) {
-       LDKC2Tuple_u32TxOutZ *tuple = (LDKC2Tuple_u32TxOutZ*)(ptr & ~1);
-       uint64_t b_ref = ((uint64_t)&tuple->b) | 1;
-       return (uint64_t)b_ref;
+int32_t  __attribute__((visibility("default"))) TS_C2Tuple_u32TxOutZ_get_a(uint32_t tuple) {
+       LDKC2Tuple_u32TxOutZ* tuple_conv = (LDKC2Tuple_u32TxOutZ*)(tuple & ~1);
+       int32_t ret_val = C2Tuple_u32TxOutZ_get_a(tuple_conv);
+       return ret_val;
+}
+
+static inline struct LDKTxOut C2Tuple_u32TxOutZ_get_b(LDKC2Tuple_u32TxOutZ *NONNULL_PTR tuple){
+       return TxOut_clone(&tuple->b);
+}
+uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_u32TxOutZ_get_b(uint32_t tuple) {
+       LDKC2Tuple_u32TxOutZ* tuple_conv = (LDKC2Tuple_u32TxOutZ*)(tuple & ~1);
+       LDKTxOut* ret_ref = MALLOC(sizeof(LDKTxOut), "LDKTxOut");
+       *ret_ref = C2Tuple_u32TxOutZ_get_b(tuple_conv);
+       return (uint64_t)ret_ref;
 }
+
 uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_C2Tuple_u32TxOutZZ_new(uint32_tArray elems) {
        LDKCVec_C2Tuple_u32TxOutZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_u32TxOutZZ), "LDKCVec_C2Tuple_u32TxOutZZ");
        ret->datalen = *((uint32_t*)elems);
@@ -3769,32 +3890,42 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_TxidCVec_C2Tuple_
        else
                b_constr.data = NULL;
        uint32_t* b_vals = (uint32_t*)(b + 4);
-       for (size_t z = 0; z < b_constr.datalen; z++) {
-               uint32_t b_conv_25 = b_vals[z];
-               LDKC2Tuple_u32TxOutZ b_conv_25_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_25) & ~1);
-               b_conv_25_conv = C2Tuple_u32TxOutZ_clone((LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_25) & ~1));
-               b_constr.data[z] = b_conv_25_conv;
+       for (size_t u = 0; u < b_constr.datalen; u++) {
+               uint32_t b_conv_20 = b_vals[u];
+               LDKC2Tuple_u32TxOutZ b_conv_20_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_20) & ~1);
+               b_conv_20_conv = C2Tuple_u32TxOutZ_clone((LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_20) & ~1));
+               b_constr.data[u] = b_conv_20_conv;
        }
        ret->b = b_constr;
        return (uint64_t)ret;
 }
-int8_tArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(uint32_t ptr) {
-       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *tuple = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(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;
+static inline struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR tuple){
+       return ThirtyTwoBytes_clone(&tuple->a);
+}
+int8_tArray  __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(uint32_t tuple) {
+       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* tuple_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(tuple & ~1);
+       int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(tuple_conv).data, 32);
+       return ret_arr;
+}
+
+static inline struct LDKCVec_C2Tuple_u32TxOutZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR tuple){
+       return CVec_C2Tuple_u32TxOutZZ_clone(&tuple->b);
 }
-uint32_tArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(uint32_t ptr) {
-       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *tuple = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(ptr & ~1);
-       LDKCVec_C2Tuple_u32TxOutZZ b_var = tuple->b;
-       uint32_tArray b_arr = init_arr(b_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
-       uint32_t *b_arr_ptr = (uint32_t*)(b_arr + 4);
-       for (size_t z = 0; z < b_var.datalen; z++) {
-               uint64_t b_conv_25_ref = (uint64_t)(&b_var.data[z]) | 1;
-               b_arr_ptr[z] = b_conv_25_ref;
+uint32_tArray  __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(uint32_t tuple) {
+       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* tuple_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(tuple & ~1);
+       LDKCVec_C2Tuple_u32TxOutZZ ret_var = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(tuple_conv);
+       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 u = 0; u < ret_var.datalen; u++) {
+               LDKC2Tuple_u32TxOutZ* ret_conv_20_conv = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
+               *ret_conv_20_conv = ret_var.data[u];
+               ret_arr_ptr[u] = ((uint64_t)ret_conv_20_conv);
        }
-       return b_arr;
+       FREE(ret_var.data);
+       return ret_arr;
 }
+
 uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_new(uint32_tArray elems) {
        LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ), "LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ");
        ret->datalen = *((uint32_t*)elems);
@@ -3867,8 +3998,10 @@ jboolean  __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_BlockHash
 uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(uint32_t arg) {
        LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       uint64_t res_ref = (uint64_t)(&(*val->contents.result)) | 1;
-       return res_ref;
+       LDKC2Tuple_BlockHashChannelMonitorZ* res_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
+       *res_conv = (*val->contents.result);
+       *res_conv = C2Tuple_BlockHashChannelMonitorZ_clone(res_conv);
+       return ((uint64_t)res_conv);
 }
 uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(uint32_t arg) {
        LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)(arg & ~1);
@@ -3907,18 +4040,26 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_PublicKeyTypeZ_ne
        ret->b = b_conv;
        return (uint64_t)ret;
 }
-int8_tArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_PublicKeyTypeZ_get_a(uint32_t ptr) {
-       LDKC2Tuple_PublicKeyTypeZ *tuple = (LDKC2Tuple_PublicKeyTypeZ*)(ptr & ~1);
-       int8_tArray a_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(a_arr + 4), tuple->a.compressed_form, 33);
-       return a_arr;
+static inline struct LDKPublicKey C2Tuple_PublicKeyTypeZ_get_a(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR tuple){
+       return tuple->a;
+}
+int8_tArray  __attribute__((visibility("default"))) TS_C2Tuple_PublicKeyTypeZ_get_a(uint32_t tuple) {
+       LDKC2Tuple_PublicKeyTypeZ* tuple_conv = (LDKC2Tuple_PublicKeyTypeZ*)(tuple & ~1);
+       int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), C2Tuple_PublicKeyTypeZ_get_a(tuple_conv).compressed_form, 33);
+       return ret_arr;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_PublicKeyTypeZ_get_b(uint32_t ptr) {
-       LDKC2Tuple_PublicKeyTypeZ *tuple = (LDKC2Tuple_PublicKeyTypeZ*)(ptr & ~1);
-       LDKType* b_ret =MALLOC(sizeof(LDKType), "LDKType");
-       *b_ret = Type_clone(&tuple->b);
-       return (uint64_t)b_ret;
+
+static inline struct LDKType C2Tuple_PublicKeyTypeZ_get_b(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR tuple){
+       return Type_clone(&tuple->b);
 }
+uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_PublicKeyTypeZ_get_b(uint32_t tuple) {
+       LDKC2Tuple_PublicKeyTypeZ* tuple_conv = (LDKC2Tuple_PublicKeyTypeZ*)(tuple & ~1);
+       LDKType* ret_ret =MALLOC(sizeof(LDKType), "LDKType");
+       *ret_ret = C2Tuple_PublicKeyTypeZ_get_b(tuple_conv);
+       return (uint64_t)ret_ret;
+}
+
 uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_C2Tuple_PublicKeyTypeZZ_new(uint32_tArray elems) {
        LDKCVec_C2Tuple_PublicKeyTypeZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_PublicKeyTypeZZ), "LDKCVec_C2Tuple_PublicKeyTypeZZ");
        ret->datalen = *((uint32_t*)elems);
@@ -3979,30 +4120,51 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKC3Tuple_ChannelAnnounceme
        ret->c = c_conv;
        return (uint64_t)ret;
 }
-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((((uint64_t)a_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((uint64_t)&a_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       uint64_t a_ref = (uint64_t)a_var.inner & ~1;
-       return a_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((((uint64_t)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((uint64_t)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       uint64_t b_ref = (uint64_t)b_var.inner & ~1;
-       return b_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((((uint64_t)c_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((uint64_t)&c_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       uint64_t c_ref = (uint64_t)c_var.inner & ~1;
-       return c_ref;
+static inline struct LDKChannelAnnouncement C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple){
+       return ChannelAnnouncement_clone(&tuple->a);
+}
+uint32_t  __attribute__((visibility("default"))) TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(uint32_t tuple) {
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* tuple_conv = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(tuple & ~1);
+       LDKChannelAnnouncement ret_var = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(tuple_conv);
+       CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       uint64_t ret_ref = (uint64_t)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+static inline struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple){
+       return ChannelUpdate_clone(&tuple->b);
 }
+uint32_t  __attribute__((visibility("default"))) TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(uint32_t tuple) {
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* tuple_conv = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(tuple & ~1);
+       LDKChannelUpdate ret_var = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(tuple_conv);
+       CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       uint64_t ret_ref = (uint64_t)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+static inline struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple){
+       return ChannelUpdate_clone(&tuple->c);
+}
+uint32_t  __attribute__((visibility("default"))) TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(uint32_t tuple) {
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* tuple_conv = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(tuple & ~1);
+       LDKChannelUpdate ret_var = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(tuple_conv);
+       CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       uint64_t ret_ref = (uint64_t)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_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);
@@ -5517,10 +5679,10 @@ void transactions_confirmed_LDKConfirm_jcall(const void* this_arg, const uint8_t
        LDKCVec_C2Tuple_usizeTransactionZZ txdata_var = txdata;
        uint32_tArray txdata_arr = init_arr(txdata_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
        uint32_t *txdata_arr_ptr = (uint32_t*)(txdata_arr + 4);
-       for (size_t e = 0; e < txdata_var.datalen; e++) {
-               LDKC2Tuple_usizeTransactionZ* txdata_conv_30_ref = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
-               *txdata_conv_30_ref = txdata_var.data[e];
-               txdata_arr_ptr[e] = (uint64_t)txdata_conv_30_ref;
+       for (size_t c = 0; c < txdata_var.datalen; c++) {
+               LDKC2Tuple_usizeTransactionZ* txdata_conv_28_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
+               *txdata_conv_28_conv = txdata_var.data[c];
+               txdata_arr_ptr[c] = ((uint64_t)txdata_conv_28_conv);
        }
        FREE(txdata_var.data);
        js_invoke_function_3(j_calls->transactions_confirmed_meth, header_arr, txdata_arr, height);
@@ -5593,11 +5755,11 @@ void  __attribute__((visibility("default"))) TS_Confirm_transactions_confirmed(u
        else
                txdata_constr.data = NULL;
        uint32_t* txdata_vals = (uint32_t*)(txdata + 4);
-       for (size_t e = 0; e < txdata_constr.datalen; e++) {
-               uint32_t txdata_conv_30 = txdata_vals[e];
-               LDKC2Tuple_usizeTransactionZ txdata_conv_30_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_30) & ~1);
-               txdata_conv_30_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_30) & ~1));
-               txdata_constr.data[e] = txdata_conv_30_conv;
+       for (size_t c = 0; c < txdata_constr.datalen; c++) {
+               uint32_t txdata_conv_28 = txdata_vals[c];
+               LDKC2Tuple_usizeTransactionZ txdata_conv_28_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1);
+               txdata_conv_28_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1));
+               txdata_constr.data[c] = txdata_conv_28_conv;
        }
        (this_arg_conv->transactions_confirmed)(this_arg_conv->this_arg, header_ref, txdata_constr, height);
 }
@@ -6452,11 +6614,11 @@ LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ get_next_channel
        else
                ret_constr.data = NULL;
        uint32_t* ret_vals = (uint32_t*)(ret + 4);
-       for (size_t l = 0; l < ret_constr.datalen; l++) {
-               uint32_t ret_conv_63 = ret_vals[l];
-               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ ret_conv_63_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)ret_conv_63) & ~1);
-               ret_conv_63_conv = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone((LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)ret_conv_63) & ~1));
-               ret_constr.data[l] = ret_conv_63_conv;
+       for (size_t h = 0; h < ret_constr.datalen; h++) {
+               uint32_t ret_conv_59 = ret_vals[h];
+               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ ret_conv_59_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)ret_conv_59) & ~1);
+               ret_conv_59_conv = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone((LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)ret_conv_59) & ~1));
+               ret_constr.data[h] = ret_conv_59_conv;
        }
        return ret_constr;
 }
@@ -6628,10 +6790,10 @@ uint32_tArray  __attribute__((visibility("default"))) TS_RoutingMessageHandler_g
        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* ret_conv_63_ref = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
-               *ret_conv_63_ref = ret_var.data[l];
-               ret_arr_ptr[l] = (uint64_t)ret_conv_63_ref;
+       for (size_t h = 0; h < ret_var.datalen; h++) {
+               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_conv_59_conv = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
+               *ret_conv_59_conv = ret_var.data[h];
+               ret_arr_ptr[h] = ((uint64_t)ret_conv_59_conv);
        }
        FREE(ret_var.data);
        return ret_arr;
@@ -6813,11 +6975,11 @@ LDKCVec_C2Tuple_PublicKeyTypeZZ get_and_clear_pending_msg_LDKCustomMessageHandle
        else
                ret_constr.data = NULL;
        uint32_t* ret_vals = (uint32_t*)(ret + 4);
-       for (size_t c = 0; c < ret_constr.datalen; c++) {
-               uint32_t ret_conv_28 = ret_vals[c];
-               LDKC2Tuple_PublicKeyTypeZ ret_conv_28_conv = *(LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)ret_conv_28) & ~1);
-               ret_conv_28_conv = C2Tuple_PublicKeyTypeZ_clone((LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)ret_conv_28) & ~1));
-               ret_constr.data[c] = ret_conv_28_conv;
+       for (size_t z = 0; z < ret_constr.datalen; z++) {
+               uint32_t ret_conv_25 = ret_vals[z];
+               LDKC2Tuple_PublicKeyTypeZ ret_conv_25_conv = *(LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)ret_conv_25) & ~1);
+               ret_conv_25_conv = C2Tuple_PublicKeyTypeZ_clone((LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)ret_conv_25) & ~1));
+               ret_constr.data[z] = ret_conv_25_conv;
        }
        return ret_constr;
 }
@@ -6862,10 +7024,10 @@ uint32_tArray  __attribute__((visibility("default"))) TS_CustomMessageHandler_ge
        LDKCVec_C2Tuple_PublicKeyTypeZZ ret_var = (this_arg_conv->get_and_clear_pending_msg)(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 c = 0; c < ret_var.datalen; c++) {
-               LDKC2Tuple_PublicKeyTypeZ* ret_conv_28_ref = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
-               *ret_conv_28_ref = ret_var.data[c];
-               ret_arr_ptr[c] = (uint64_t)ret_conv_28_ref;
+       for (size_t z = 0; z < ret_var.datalen; z++) {
+               LDKC2Tuple_PublicKeyTypeZ* ret_conv_25_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
+               *ret_conv_25_conv = ret_var.data[z];
+               ret_arr_ptr[z] = ((uint64_t)ret_conv_25_conv);
        }
        FREE(ret_var.data);
        return ret_arr;
@@ -7908,9 +8070,9 @@ uint32_t  __attribute__((visibility("default"))) TS_CResult_TxOutAccessErrorZ_cl
 
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_usizeTransactionZ_clone(uint32_t orig) {
        LDKC2Tuple_usizeTransactionZ* orig_conv = (LDKC2Tuple_usizeTransactionZ*)(orig & ~1);
-       LDKC2Tuple_usizeTransactionZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
-       *ret_ref = C2Tuple_usizeTransactionZ_clone(orig_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_usizeTransactionZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
+       *ret_conv = C2Tuple_usizeTransactionZ_clone(orig_conv);
+       return ((uint64_t)ret_conv);
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_usizeTransactionZ_new(int64_t a, int8_tArray b) {
@@ -7919,9 +8081,9 @@ uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_usizeTransactionZ_ne
        b_ref.data = MALLOC(b_ref.datalen, "LDKTransaction Bytes");
        memcpy(b_ref.data, (uint8_t*)(b + 4), b_ref.datalen);
        b_ref.data_is_owned = true;
-       LDKC2Tuple_usizeTransactionZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
-       *ret_ref = C2Tuple_usizeTransactionZ_new(a, b_ref);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_usizeTransactionZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
+       *ret_conv = C2Tuple_usizeTransactionZ_new(a, b_ref);
+       return ((uint64_t)ret_conv);
 }
 
 void  __attribute__((visibility("default"))) TS_C2Tuple_usizeTransactionZ_free(uint32_t _res) {
@@ -7939,11 +8101,11 @@ void  __attribute__((visibility("default"))) TS_CVec_C2Tuple_usizeTransactionZZ_
        else
                _res_constr.data = NULL;
        uint32_t* _res_vals = (uint32_t*)(_res + 4);
-       for (size_t e = 0; e < _res_constr.datalen; e++) {
-               uint32_t _res_conv_30 = _res_vals[e];
-               LDKC2Tuple_usizeTransactionZ _res_conv_30_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)_res_conv_30) & ~1);
-               FREE((void*)_res_conv_30);
-               _res_constr.data[e] = _res_conv_30_conv;
+       for (size_t c = 0; c < _res_constr.datalen; c++) {
+               uint32_t _res_conv_28 = _res_vals[c];
+               LDKC2Tuple_usizeTransactionZ _res_conv_28_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)_res_conv_28) & ~1);
+               FREE((void*)_res_conv_28);
+               _res_constr.data[c] = _res_conv_28_conv;
        }
        CVec_C2Tuple_usizeTransactionZZ_free(_res_constr);
 }
@@ -8342,9 +8504,9 @@ uint32_t  __attribute__((visibility("default"))) TS_CResult_NoneNoneZ_clone(uint
 
 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");
-       *ret_ref = C2Tuple_SignatureCVec_SignatureZZ_clone(orig_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_SignatureCVec_SignatureZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
+       *ret_conv = C2Tuple_SignatureCVec_SignatureZZ_clone(orig_conv);
+       return ((uint64_t)ret_conv);
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_SignatureCVec_SignatureZZ_new(int8_tArray a, ptrArray b) {
@@ -8365,9 +8527,9 @@ uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_SignatureCVec_Signat
                memcpy(b_conv_12_ref.compact_form, (uint8_t*)(b_conv_12 + 4), 64);
                b_constr.data[m] = b_conv_12_ref;
        }
-       LDKC2Tuple_SignatureCVec_SignatureZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
-       *ret_ref = C2Tuple_SignatureCVec_SignatureZZ_new(a_ref, b_constr);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_SignatureCVec_SignatureZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
+       *ret_conv = C2Tuple_SignatureCVec_SignatureZZ_new(a_ref, b_constr);
+       return ((uint64_t)ret_conv);
 }
 
 void  __attribute__((visibility("default"))) TS_C2Tuple_SignatureCVec_SignatureZZ_free(uint32_t _res) {
@@ -8644,6 +8806,13 @@ uint32_t  __attribute__((visibility("default"))) TS_CResult_TransactionNoneZ_clo
        return (uint64_t)ret_conv;
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelMonitorZ_clone(uint32_t orig) {
+       LDKC2Tuple_BlockHashChannelMonitorZ* orig_conv = (LDKC2Tuple_BlockHashChannelMonitorZ*)(orig & ~1);
+       LDKC2Tuple_BlockHashChannelMonitorZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
+       *ret_conv = C2Tuple_BlockHashChannelMonitorZ_clone(orig_conv);
+       return ((uint64_t)ret_conv);
+}
+
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelMonitorZ_new(int8_tArray a, uint32_t b) {
        LDKThirtyTwoBytes a_ref;
        CHECK(*((uint32_t*)a) == 32);
@@ -8652,9 +8821,9 @@ uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelMoni
        b_conv.inner = (void*)(b & (~1));
        b_conv.is_owned = (b & 1) || (b == 0);
        b_conv = ChannelMonitor_clone(&b_conv);
-       LDKC2Tuple_BlockHashChannelMonitorZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
-       *ret_ref = C2Tuple_BlockHashChannelMonitorZ_new(a_ref, b_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_BlockHashChannelMonitorZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
+       *ret_conv = C2Tuple_BlockHashChannelMonitorZ_new(a_ref, b_conv);
+       return ((uint64_t)ret_conv);
 }
 
 void  __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelMonitorZ_free(uint32_t _res) {
@@ -8672,11 +8841,11 @@ void  __attribute__((visibility("default"))) TS_CVec_C2Tuple_BlockHashChannelMon
        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 _res_conv_38 = _res_vals[m];
-               LDKC2Tuple_BlockHashChannelMonitorZ _res_conv_38_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)_res_conv_38) & ~1);
-               FREE((void*)_res_conv_38);
-               _res_constr.data[m] = _res_conv_38_conv;
+       for (size_t j = 0; j < _res_constr.datalen; j++) {
+               uint32_t _res_conv_35 = _res_vals[j];
+               LDKC2Tuple_BlockHashChannelMonitorZ _res_conv_35_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)_res_conv_35) & ~1);
+               FREE((void*)_res_conv_35);
+               _res_constr.data[j] = _res_conv_35_conv;
        }
        CVec_C2Tuple_BlockHashChannelMonitorZZ_free(_res_constr);
 }
@@ -8689,11 +8858,11 @@ uint32_t  __attribute__((visibility("default"))) TS_CResult_CVec_C2Tuple_BlockHa
        else
                o_constr.data = NULL;
        uint32_t* o_vals = (uint32_t*)(o + 4);
-       for (size_t m = 0; m < o_constr.datalen; m++) {
-               uint32_t o_conv_38 = o_vals[m];
-               LDKC2Tuple_BlockHashChannelMonitorZ o_conv_38_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o_conv_38) & ~1);
-               // Warning: we may need a move here but no clone is available for LDKC2Tuple_BlockHashChannelMonitorZ
-               o_constr.data[m] = o_conv_38_conv;
+       for (size_t j = 0; j < o_constr.datalen; j++) {
+               uint32_t o_conv_35 = o_vals[j];
+               LDKC2Tuple_BlockHashChannelMonitorZ o_conv_35_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o_conv_35) & ~1);
+               o_conv_35_conv = C2Tuple_BlockHashChannelMonitorZ_clone((LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o_conv_35) & ~1));
+               o_constr.data[j] = o_conv_35_conv;
        }
        LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ), "LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ");
        *ret_conv = CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(o_constr);
@@ -8714,6 +8883,13 @@ void  __attribute__((visibility("default"))) TS_CResult_CVec_C2Tuple_BlockHashCh
        CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(_res_conv);
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(uint32_t orig) {
+       LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ* orig_conv = (LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ*)(orig & ~1);
+       LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ), "LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ");
+       *ret_conv = CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(orig_conv);
+       return (uint64_t)ret_conv;
+}
+
 uint32_t  __attribute__((visibility("default"))) TS_COption_u16Z_some(int16_t o) {
        LDKCOption_u16Z *ret_copy = MALLOC(sizeof(LDKCOption_u16Z), "LDKCOption_u16Z");
        *ret_copy = COption_u16Z_some(o);
@@ -8883,9 +9059,9 @@ void  __attribute__((visibility("default"))) TS_CVec_NetAddressZ_free(uint32_tAr
 
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_PaymentHashPaymentSecretZ_clone(uint32_t orig) {
        LDKC2Tuple_PaymentHashPaymentSecretZ* orig_conv = (LDKC2Tuple_PaymentHashPaymentSecretZ*)(orig & ~1);
-       LDKC2Tuple_PaymentHashPaymentSecretZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
-       *ret_ref = C2Tuple_PaymentHashPaymentSecretZ_clone(orig_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_PaymentHashPaymentSecretZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
+       *ret_conv = C2Tuple_PaymentHashPaymentSecretZ_clone(orig_conv);
+       return ((uint64_t)ret_conv);
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_PaymentHashPaymentSecretZ_new(int8_tArray a, int8_tArray b) {
@@ -8895,9 +9071,9 @@ uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_PaymentHashPaymentSe
        LDKThirtyTwoBytes b_ref;
        CHECK(*((uint32_t*)b) == 32);
        memcpy(b_ref.data, (uint8_t*)(b + 4), 32);
-       LDKC2Tuple_PaymentHashPaymentSecretZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
-       *ret_ref = C2Tuple_PaymentHashPaymentSecretZ_new(a_ref, b_ref);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_PaymentHashPaymentSecretZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
+       *ret_conv = C2Tuple_PaymentHashPaymentSecretZ_new(a_ref, b_ref);
+       return ((uint64_t)ret_conv);
 }
 
 void  __attribute__((visibility("default"))) TS_C2Tuple_PaymentHashPaymentSecretZ_free(uint32_t _res) {
@@ -8964,9 +9140,9 @@ uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelMana
        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 (uint64_t)ret_ref;
+       LDKC2Tuple_BlockHashChannelManagerZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelManagerZ), "LDKC2Tuple_BlockHashChannelManagerZ");
+       *ret_conv = C2Tuple_BlockHashChannelManagerZ_new(a_ref, b_conv);
+       return ((uint64_t)ret_conv);
 }
 
 void  __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelManagerZ_free(uint32_t _res) {
@@ -9220,9 +9396,9 @@ uint32_t  __attribute__((visibility("default"))) TS_CResult_SignedRawInvoiceNone
 
 uint32_t  __attribute__((visibility("default"))) TS_C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(uint32_t orig) {
        LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* orig_conv = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(orig & ~1);
-       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
-       *ret_ref = C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(orig_conv);
-       return (uint64_t)ret_ref;
+       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
+       *ret_conv = C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(orig_conv);
+       return ((uint64_t)ret_conv);
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(uint32_t a, int8_tArray b, uint32_t c) {
@@ -9237,9 +9413,9 @@ uint32_t  __attribute__((visibility("default"))) TS_C3Tuple_RawInvoice_u832Invoi
        c_conv.inner = (void*)(c & (~1));
        c_conv.is_owned = (c & 1) || (c == 0);
        c_conv = InvoiceSignature_clone(&c_conv);
-       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
-       *ret_ref = C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(a_conv, b_ref, c_conv);
-       return (uint64_t)ret_ref;
+       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
+       *ret_conv = C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(a_conv, b_ref, c_conv);
+       return ((uint64_t)ret_conv);
 }
 
 void  __attribute__((visibility("default"))) TS_C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(uint32_t _res) {
@@ -9601,9 +9777,9 @@ uint32_t  __attribute__((visibility("default"))) TS_CResult_NoneMonitorUpdateErr
 
 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 (uint64_t)ret_ref;
+       LDKC2Tuple_OutPointScriptZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
+       *ret_conv = C2Tuple_OutPointScriptZ_clone(orig_conv);
+       return ((uint64_t)ret_conv);
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_OutPointScriptZ_new(uint32_t a, int8_tArray b) {
@@ -9615,9 +9791,9 @@ uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_OutPointScriptZ_new(
        b_ref.datalen = *((uint32_t*)b);
        b_ref.data = MALLOC(b_ref.datalen, "LDKCVec_u8Z Bytes");
        memcpy(b_ref.data, (uint8_t*)(b + 4), b_ref.datalen);
-       LDKC2Tuple_OutPointScriptZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
-       *ret_ref = C2Tuple_OutPointScriptZ_new(a_conv, b_ref);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_OutPointScriptZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
+       *ret_conv = C2Tuple_OutPointScriptZ_new(a_conv, b_ref);
+       return ((uint64_t)ret_conv);
 }
 
 void  __attribute__((visibility("default"))) TS_C2Tuple_OutPointScriptZ_free(uint32_t _res) {
@@ -9629,9 +9805,9 @@ void  __attribute__((visibility("default"))) TS_C2Tuple_OutPointScriptZ_free(uin
 
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_u32ScriptZ_clone(uint32_t orig) {
        LDKC2Tuple_u32ScriptZ* orig_conv = (LDKC2Tuple_u32ScriptZ*)(orig & ~1);
-       LDKC2Tuple_u32ScriptZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
-       *ret_ref = C2Tuple_u32ScriptZ_clone(orig_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_u32ScriptZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
+       *ret_conv = C2Tuple_u32ScriptZ_clone(orig_conv);
+       return ((uint64_t)ret_conv);
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_u32ScriptZ_new(int32_t a, int8_tArray b) {
@@ -9639,9 +9815,9 @@ uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_u32ScriptZ_new(int32
        b_ref.datalen = *((uint32_t*)b);
        b_ref.data = MALLOC(b_ref.datalen, "LDKCVec_u8Z Bytes");
        memcpy(b_ref.data, (uint8_t*)(b + 4), b_ref.datalen);
-       LDKC2Tuple_u32ScriptZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
-       *ret_ref = C2Tuple_u32ScriptZ_new(a, b_ref);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_u32ScriptZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
+       *ret_conv = C2Tuple_u32ScriptZ_new(a, b_ref);
+       return ((uint64_t)ret_conv);
 }
 
 void  __attribute__((visibility("default"))) TS_C2Tuple_u32ScriptZ_free(uint32_t _res) {
@@ -9659,20 +9835,20 @@ void  __attribute__((visibility("default"))) TS_CVec_C2Tuple_u32ScriptZZ_free(ui
        else
                _res_constr.data = NULL;
        uint32_t* _res_vals = (uint32_t*)(_res + 4);
-       for (size_t e = 0; e < _res_constr.datalen; e++) {
-               uint32_t _res_conv_30 = _res_vals[e];
-               LDKC2Tuple_u32ScriptZ _res_conv_30_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)_res_conv_30) & ~1);
-               FREE((void*)_res_conv_30);
-               _res_constr.data[e] = _res_conv_30_conv;
+       for (size_t v = 0; v < _res_constr.datalen; v++) {
+               uint32_t _res_conv_21 = _res_vals[v];
+               LDKC2Tuple_u32ScriptZ _res_conv_21_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)_res_conv_21) & ~1);
+               FREE((void*)_res_conv_21);
+               _res_constr.data[v] = _res_conv_21_conv;
        }
        CVec_C2Tuple_u32ScriptZZ_free(_res_constr);
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(uint32_t orig) {
        LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* orig_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(orig & ~1);
-       LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
-       *ret_ref = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(orig_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
+       *ret_conv = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(orig_conv);
+       return ((uint64_t)ret_conv);
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(int8_tArray a, uint32_tArray b) {
@@ -9686,15 +9862,15 @@ uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32
        else
                b_constr.data = NULL;
        uint32_t* b_vals = (uint32_t*)(b + 4);
-       for (size_t e = 0; e < b_constr.datalen; e++) {
-               uint32_t b_conv_30 = b_vals[e];
-               LDKC2Tuple_u32ScriptZ b_conv_30_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_30) & ~1);
-               b_conv_30_conv = C2Tuple_u32ScriptZ_clone((LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_30) & ~1));
-               b_constr.data[e] = b_conv_30_conv;
-       }
-       LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
-       *ret_ref = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a_ref, b_constr);
-       return (uint64_t)ret_ref;
+       for (size_t v = 0; v < b_constr.datalen; v++) {
+               uint32_t b_conv_21 = b_vals[v];
+               LDKC2Tuple_u32ScriptZ b_conv_21_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_21) & ~1);
+               b_conv_21_conv = C2Tuple_u32ScriptZ_clone((LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_21) & ~1));
+               b_constr.data[v] = b_conv_21_conv;
+       }
+       LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
+       *ret_conv = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a_ref, b_constr);
+       return ((uint64_t)ret_conv);
 }
 
 void  __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(uint32_t _res) {
@@ -9712,11 +9888,11 @@ void  __attribute__((visibility("default"))) TS_CVec_C2Tuple_TxidCVec_C2Tuple_u3
        else
                _res_constr.data = NULL;
        uint32_t* _res_vals = (uint32_t*)(_res + 4);
-       for (size_t c = 0; c < _res_constr.datalen; c++) {
-               uint32_t _res_conv_54 = _res_vals[c];
-               LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res_conv_54_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(((uint64_t)_res_conv_54) & ~1);
-               FREE((void*)_res_conv_54);
-               _res_constr.data[c] = _res_conv_54_conv;
+       for (size_t o = 0; o < _res_constr.datalen; o++) {
+               uint32_t _res_conv_40 = _res_vals[o];
+               LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res_conv_40_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(((uint64_t)_res_conv_40) & ~1);
+               FREE((void*)_res_conv_40);
+               _res_constr.data[o] = _res_conv_40_conv;
        }
        CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res_constr);
 }
@@ -9760,17 +9936,17 @@ void  __attribute__((visibility("default"))) TS_CVec_TransactionZ_free(ptrArray
 
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_u32TxOutZ_clone(uint32_t orig) {
        LDKC2Tuple_u32TxOutZ* orig_conv = (LDKC2Tuple_u32TxOutZ*)(orig & ~1);
-       LDKC2Tuple_u32TxOutZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
-       *ret_ref = C2Tuple_u32TxOutZ_clone(orig_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_u32TxOutZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
+       *ret_conv = C2Tuple_u32TxOutZ_clone(orig_conv);
+       return ((uint64_t)ret_conv);
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_u32TxOutZ_new(int32_t a, uint32_t b) {
        LDKTxOut b_conv = *(LDKTxOut*)(((uint64_t)b) & ~1);
        b_conv = TxOut_clone((LDKTxOut*)(((uint64_t)b) & ~1));
-       LDKC2Tuple_u32TxOutZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
-       *ret_ref = C2Tuple_u32TxOutZ_new(a, b_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_u32TxOutZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
+       *ret_conv = C2Tuple_u32TxOutZ_new(a, b_conv);
+       return ((uint64_t)ret_conv);
 }
 
 void  __attribute__((visibility("default"))) TS_C2Tuple_u32TxOutZ_free(uint32_t _res) {
@@ -9788,20 +9964,20 @@ void  __attribute__((visibility("default"))) TS_CVec_C2Tuple_u32TxOutZZ_free(uin
        else
                _res_constr.data = NULL;
        uint32_t* _res_vals = (uint32_t*)(_res + 4);
-       for (size_t z = 0; z < _res_constr.datalen; z++) {
-               uint32_t _res_conv_25 = _res_vals[z];
-               LDKC2Tuple_u32TxOutZ _res_conv_25_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)_res_conv_25) & ~1);
-               FREE((void*)_res_conv_25);
-               _res_constr.data[z] = _res_conv_25_conv;
+       for (size_t u = 0; u < _res_constr.datalen; u++) {
+               uint32_t _res_conv_20 = _res_vals[u];
+               LDKC2Tuple_u32TxOutZ _res_conv_20_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)_res_conv_20) & ~1);
+               FREE((void*)_res_conv_20);
+               _res_constr.data[u] = _res_conv_20_conv;
        }
        CVec_C2Tuple_u32TxOutZZ_free(_res_constr);
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(uint32_t orig) {
        LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* orig_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(orig & ~1);
-       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
-       *ret_ref = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+       *ret_conv = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig_conv);
+       return ((uint64_t)ret_conv);
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(int8_tArray a, uint32_tArray b) {
@@ -9815,15 +9991,15 @@ uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32
        else
                b_constr.data = NULL;
        uint32_t* b_vals = (uint32_t*)(b + 4);
-       for (size_t z = 0; z < b_constr.datalen; z++) {
-               uint32_t b_conv_25 = b_vals[z];
-               LDKC2Tuple_u32TxOutZ b_conv_25_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_25) & ~1);
-               b_conv_25_conv = C2Tuple_u32TxOutZ_clone((LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_25) & ~1));
-               b_constr.data[z] = b_conv_25_conv;
-       }
-       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
-       *ret_ref = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a_ref, b_constr);
-       return (uint64_t)ret_ref;
+       for (size_t u = 0; u < b_constr.datalen; u++) {
+               uint32_t b_conv_20 = b_vals[u];
+               LDKC2Tuple_u32TxOutZ b_conv_20_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_20) & ~1);
+               b_conv_20_conv = C2Tuple_u32TxOutZ_clone((LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_20) & ~1));
+               b_constr.data[u] = b_conv_20_conv;
+       }
+       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+       *ret_conv = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a_ref, b_constr);
+       return ((uint64_t)ret_conv);
 }
 
 void  __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(uint32_t _res) {
@@ -9841,11 +10017,11 @@ void  __attribute__((visibility("default"))) TS_CVec_C2Tuple_TxidCVec_C2Tuple_u3
        else
                _res_constr.data = NULL;
        uint32_t* _res_vals = (uint32_t*)(_res + 4);
-       for (size_t x = 0; x < _res_constr.datalen; x++) {
-               uint32_t _res_conv_49 = _res_vals[x];
-               LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res_conv_49_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(((uint64_t)_res_conv_49) & ~1);
-               FREE((void*)_res_conv_49);
-               _res_constr.data[x] = _res_conv_49_conv;
+       for (size_t n = 0; n < _res_constr.datalen; n++) {
+               uint32_t _res_conv_39 = _res_vals[n];
+               LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res_conv_39_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(((uint64_t)_res_conv_39) & ~1);
+               FREE((void*)_res_conv_39);
+               _res_constr.data[n] = _res_conv_39_conv;
        }
        CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res_constr);
 }
@@ -9869,7 +10045,7 @@ void  __attribute__((visibility("default"))) TS_CVec_BalanceZ_free(uint32_tArray
 
 uint32_t  __attribute__((visibility("default"))) TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(uint32_t o) {
        LDKC2Tuple_BlockHashChannelMonitorZ o_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o) & ~1);
-       // Warning: we may need a move here but no clone is available for LDKC2Tuple_BlockHashChannelMonitorZ
+       o_conv = C2Tuple_BlockHashChannelMonitorZ_clone((LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o) & ~1));
        LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ");
        *ret_conv = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o_conv);
        return (uint64_t)ret_conv;
@@ -9892,6 +10068,13 @@ void  __attribute__((visibility("default"))) TS_CResult_C2Tuple_BlockHashChannel
        CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res_conv);
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* orig_conv = (LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)(orig & ~1);
+       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ");
+       *ret_conv = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(orig_conv);
+       return (uint64_t)ret_conv;
+}
+
 uint32_t  __attribute__((visibility("default"))) TS_CResult_NoneLightningErrorZ_ok() {
        LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
        *ret_conv = CResult_NoneLightningErrorZ_ok();
@@ -9924,9 +10107,9 @@ uint32_t  __attribute__((visibility("default"))) TS_CResult_NoneLightningErrorZ_
 
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_PublicKeyTypeZ_clone(uint32_t orig) {
        LDKC2Tuple_PublicKeyTypeZ* orig_conv = (LDKC2Tuple_PublicKeyTypeZ*)(orig & ~1);
-       LDKC2Tuple_PublicKeyTypeZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
-       *ret_ref = C2Tuple_PublicKeyTypeZ_clone(orig_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_PublicKeyTypeZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
+       *ret_conv = C2Tuple_PublicKeyTypeZ_clone(orig_conv);
+       return ((uint64_t)ret_conv);
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_PublicKeyTypeZ_new(int8_tArray a, uint32_t b) {
@@ -9934,9 +10117,9 @@ uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_PublicKeyTypeZ_new(i
        CHECK(*((uint32_t*)a) == 33);
        memcpy(a_ref.compressed_form, (uint8_t*)(a + 4), 33);
        LDKType b_conv = *(LDKType*)(((uint64_t)b) & ~1);
-       LDKC2Tuple_PublicKeyTypeZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
-       *ret_ref = C2Tuple_PublicKeyTypeZ_new(a_ref, b_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_PublicKeyTypeZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
+       *ret_conv = C2Tuple_PublicKeyTypeZ_new(a_ref, b_conv);
+       return ((uint64_t)ret_conv);
 }
 
 void  __attribute__((visibility("default"))) TS_C2Tuple_PublicKeyTypeZ_free(uint32_t _res) {
@@ -9954,11 +10137,11 @@ void  __attribute__((visibility("default"))) TS_CVec_C2Tuple_PublicKeyTypeZZ_fre
        else
                _res_constr.data = NULL;
        uint32_t* _res_vals = (uint32_t*)(_res + 4);
-       for (size_t c = 0; c < _res_constr.datalen; c++) {
-               uint32_t _res_conv_28 = _res_vals[c];
-               LDKC2Tuple_PublicKeyTypeZ _res_conv_28_conv = *(LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)_res_conv_28) & ~1);
-               FREE((void*)_res_conv_28);
-               _res_constr.data[c] = _res_conv_28_conv;
+       for (size_t z = 0; z < _res_constr.datalen; z++) {
+               uint32_t _res_conv_25 = _res_vals[z];
+               LDKC2Tuple_PublicKeyTypeZ _res_conv_25_conv = *(LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)_res_conv_25) & ~1);
+               FREE((void*)_res_conv_25);
+               _res_constr.data[z] = _res_conv_25_conv;
        }
        CVec_C2Tuple_PublicKeyTypeZZ_free(_res_constr);
 }
@@ -9995,9 +10178,9 @@ uint32_t  __attribute__((visibility("default"))) TS_CResult_boolLightningErrorZ_
 
 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 (uint64_t)ret_ref;
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
+       *ret_conv = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig_conv);
+       return ((uint64_t)ret_conv);
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(uint32_t a, uint32_t b, uint32_t c) {
@@ -10013,9 +10196,9 @@ uint32_t  __attribute__((visibility("default"))) TS_C3Tuple_ChannelAnnouncementC
        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 (uint64_t)ret_ref;
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
+       *ret_conv = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a_conv, b_conv, c_conv);
+       return ((uint64_t)ret_conv);
 }
 
 void  __attribute__((visibility("default"))) TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(uint32_t _res) {
@@ -10033,11 +10216,11 @@ void  __attribute__((visibility("default"))) TS_CVec_C3Tuple_ChannelAnnouncement
        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 _res_conv_63 = _res_vals[l];
-               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res_conv_63_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)_res_conv_63) & ~1);
-               FREE((void*)_res_conv_63);
-               _res_constr.data[l] = _res_conv_63_conv;
+       for (size_t h = 0; h < _res_constr.datalen; h++) {
+               uint32_t _res_conv_59 = _res_vals[h];
+               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res_conv_59_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)_res_conv_59) & ~1);
+               FREE((void*)_res_conv_59);
+               _res_constr.data[h] = _res_conv_59_conv;
        }
        CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res_constr);
 }
@@ -10383,7 +10566,7 @@ uint32_t  __attribute__((visibility("default"))) TS_CResult_NetworkGraphDecodeEr
        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
+       o_conv = NetworkGraph_clone(&o_conv);
        LDKCResult_NetworkGraphDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetworkGraphDecodeErrorZ), "LDKCResult_NetworkGraphDecodeErrorZ");
        *ret_conv = CResult_NetworkGraphDecodeErrorZ_ok(o_conv);
        return (uint64_t)ret_conv;
@@ -10406,6 +10589,13 @@ void  __attribute__((visibility("default"))) TS_CResult_NetworkGraphDecodeErrorZ
        CResult_NetworkGraphDecodeErrorZ_free(_res_conv);
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NetworkGraphDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_NetworkGraphDecodeErrorZ* orig_conv = (LDKCResult_NetworkGraphDecodeErrorZ*)(orig & ~1);
+       LDKCResult_NetworkGraphDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetworkGraphDecodeErrorZ), "LDKCResult_NetworkGraphDecodeErrorZ");
+       *ret_conv = CResult_NetworkGraphDecodeErrorZ_clone(orig_conv);
+       return (uint64_t)ret_conv;
+}
+
 uint32_t  __attribute__((visibility("default"))) TS_CResult_NetAddressu8Z_ok(uint32_t o) {
        LDKNetAddress o_conv = *(LDKNetAddress*)(((uint64_t)o) & ~1);
        o_conv = NetAddress_clone((LDKNetAddress*)(((uint64_t)o) & ~1));
@@ -13623,9 +13813,9 @@ uint32_t  __attribute__((visibility("default"))) TS_ChannelMonitor_get_funding_t
        LDKChannelMonitor this_arg_conv;
        this_arg_conv.inner = (void*)(this_arg & (~1));
        this_arg_conv.is_owned = false;
-       LDKC2Tuple_OutPointScriptZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
-       *ret_ref = ChannelMonitor_get_funding_txo(&this_arg_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_OutPointScriptZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
+       *ret_conv = ChannelMonitor_get_funding_txo(&this_arg_conv);
+       return ((uint64_t)ret_conv);
 }
 
 uint32_tArray  __attribute__((visibility("default"))) TS_ChannelMonitor_get_outputs_to_watch(uint32_t this_arg) {
@@ -13635,10 +13825,10 @@ uint32_tArray  __attribute__((visibility("default"))) TS_ChannelMonitor_get_outp
        LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ ret_var = ChannelMonitor_get_outputs_to_watch(&this_arg_conv);
        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 c = 0; c < ret_var.datalen; c++) {
-               LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_conv_54_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
-               *ret_conv_54_ref = ret_var.data[c];
-               ret_arr_ptr[c] = (uint64_t)ret_conv_54_ref;
+       for (size_t o = 0; o < ret_var.datalen; o++) {
+               LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_conv_40_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
+               *ret_conv_40_conv = ret_var.data[o];
+               ret_arr_ptr[o] = ((uint64_t)ret_conv_40_conv);
        }
        FREE(ret_var.data);
        return ret_arr;
@@ -13720,11 +13910,11 @@ uint32_tArray  __attribute__((visibility("default"))) TS_ChannelMonitor_block_co
        else
                txdata_constr.data = NULL;
        uint32_t* txdata_vals = (uint32_t*)(txdata + 4);
-       for (size_t e = 0; e < txdata_constr.datalen; e++) {
-               uint32_t txdata_conv_30 = txdata_vals[e];
-               LDKC2Tuple_usizeTransactionZ txdata_conv_30_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_30) & ~1);
-               txdata_conv_30_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_30) & ~1));
-               txdata_constr.data[e] = txdata_conv_30_conv;
+       for (size_t c = 0; c < txdata_constr.datalen; c++) {
+               uint32_t txdata_conv_28 = txdata_vals[c];
+               LDKC2Tuple_usizeTransactionZ txdata_conv_28_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1);
+               txdata_conv_28_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1));
+               txdata_constr.data[c] = txdata_conv_28_conv;
        }
        LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(((uint64_t)broadcaster) & ~1);
        LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)(((uint64_t)fee_estimator) & ~1);
@@ -13732,10 +13922,10 @@ uint32_tArray  __attribute__((visibility("default"))) TS_ChannelMonitor_block_co
        LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ret_var = ChannelMonitor_block_connected(&this_arg_conv, header_ref, txdata_constr, height, broadcaster_conv, fee_estimator_conv, logger_conv);
        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 x = 0; x < ret_var.datalen; x++) {
-               LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_49_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
-               *ret_conv_49_ref = ret_var.data[x];
-               ret_arr_ptr[x] = (uint64_t)ret_conv_49_ref;
+       for (size_t n = 0; n < ret_var.datalen; n++) {
+               LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_39_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+               *ret_conv_39_conv = ret_var.data[n];
+               ret_arr_ptr[n] = ((uint64_t)ret_conv_39_conv);
        }
        FREE(ret_var.data);
        return ret_arr;
@@ -13770,11 +13960,11 @@ uint32_tArray  __attribute__((visibility("default"))) TS_ChannelMonitor_transact
        else
                txdata_constr.data = NULL;
        uint32_t* txdata_vals = (uint32_t*)(txdata + 4);
-       for (size_t e = 0; e < txdata_constr.datalen; e++) {
-               uint32_t txdata_conv_30 = txdata_vals[e];
-               LDKC2Tuple_usizeTransactionZ txdata_conv_30_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_30) & ~1);
-               txdata_conv_30_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_30) & ~1));
-               txdata_constr.data[e] = txdata_conv_30_conv;
+       for (size_t c = 0; c < txdata_constr.datalen; c++) {
+               uint32_t txdata_conv_28 = txdata_vals[c];
+               LDKC2Tuple_usizeTransactionZ txdata_conv_28_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1);
+               txdata_conv_28_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1));
+               txdata_constr.data[c] = txdata_conv_28_conv;
        }
        LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(((uint64_t)broadcaster) & ~1);
        LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)(((uint64_t)fee_estimator) & ~1);
@@ -13782,10 +13972,10 @@ uint32_tArray  __attribute__((visibility("default"))) TS_ChannelMonitor_transact
        LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ret_var = ChannelMonitor_transactions_confirmed(&this_arg_conv, header_ref, txdata_constr, height, broadcaster_conv, fee_estimator_conv, logger_conv);
        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 x = 0; x < ret_var.datalen; x++) {
-               LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_49_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
-               *ret_conv_49_ref = ret_var.data[x];
-               ret_arr_ptr[x] = (uint64_t)ret_conv_49_ref;
+       for (size_t n = 0; n < ret_var.datalen; n++) {
+               LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_39_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+               *ret_conv_39_conv = ret_var.data[n];
+               ret_arr_ptr[n] = ((uint64_t)ret_conv_39_conv);
        }
        FREE(ret_var.data);
        return ret_arr;
@@ -13819,10 +14009,10 @@ uint32_tArray  __attribute__((visibility("default"))) TS_ChannelMonitor_best_blo
        LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ret_var = ChannelMonitor_best_block_updated(&this_arg_conv, header_ref, height, broadcaster_conv, fee_estimator_conv, logger_conv);
        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 x = 0; x < ret_var.datalen; x++) {
-               LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_49_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
-               *ret_conv_49_ref = ret_var.data[x];
-               ret_arr_ptr[x] = (uint64_t)ret_conv_49_ref;
+       for (size_t n = 0; n < ret_var.datalen; n++) {
+               LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_39_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+               *ret_conv_39_conv = ret_var.data[n];
+               ret_arr_ptr[n] = ((uint64_t)ret_conv_39_conv);
        }
        FREE(ret_var.data);
        return ret_arr;
@@ -15783,9 +15973,9 @@ uint32_t  __attribute__((visibility("default"))) TS_ChannelManager_create_inboun
        this_arg_conv.is_owned = false;
        LDKCOption_u64Z min_value_msat_conv = *(LDKCOption_u64Z*)(((uint64_t)min_value_msat) & ~1);
        min_value_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)(((uint64_t)min_value_msat) & ~1));
-       LDKC2Tuple_PaymentHashPaymentSecretZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
-       *ret_ref = ChannelManager_create_inbound_payment(&this_arg_conv, min_value_msat_conv, invoice_expiry_delta_secs, user_payment_id);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_PaymentHashPaymentSecretZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
+       *ret_conv = ChannelManager_create_inbound_payment(&this_arg_conv, min_value_msat_conv, invoice_expiry_delta_secs, user_payment_id);
+       return ((uint64_t)ret_conv);
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_ChannelManager_create_inbound_payment_for_hash(uint32_t this_arg, int8_tArray payment_hash, uint32_t min_value_msat, int32_t invoice_expiry_delta_secs, int64_t user_payment_id) {
@@ -23829,6 +24019,20 @@ void  __attribute__((visibility("default"))) TS_NetworkGraph_free(uint32_t this_
        NetworkGraph_free(this_obj_conv);
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_NetworkGraph_clone(uint32_t orig) {
+       LDKNetworkGraph orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKNetworkGraph ret_var = NetworkGraph_clone(&orig_conv);
+       CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       uint64_t ret_ref = (uint64_t)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 void  __attribute__((visibility("default"))) TS_ReadOnlyNetworkGraph_free(uint32_t this_obj) {
        LDKReadOnlyNetworkGraph this_obj_conv;
        this_obj_conv.inner = (void*)(this_obj & (~1));
@@ -23925,7 +24129,7 @@ void  __attribute__((visibility("default"))) TS_NetGraphMsgHandler_set_network_g
        LDKNetworkGraph 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 LDKNetworkGraph
+       val_conv = NetworkGraph_clone(&val_conv);
        NetGraphMsgHandler_set_network_graph(&this_ptr_conv, val_conv);
 }
 
@@ -23933,7 +24137,7 @@ uint32_t  __attribute__((visibility("default"))) TS_NetGraphMsgHandler_new(uint3
        LDKNetworkGraph network_graph_conv;
        network_graph_conv.inner = (void*)(network_graph & (~1));
        network_graph_conv.is_owned = (network_graph & 1) || (network_graph == 0);
-       // Warning: we need a move here but no clone is available for LDKNetworkGraph
+       network_graph_conv = NetworkGraph_clone(&network_graph_conv);
        LDKCOption_AccessZ chain_access_conv = *(LDKCOption_AccessZ*)(((uint64_t)chain_access) & ~1);
        // Warning: we may need a move here but no clone is available for LDKCOption_AccessZ
        if (chain_access_conv.tag == LDKCOption_AccessZ_Some) {
@@ -25744,9 +25948,9 @@ uint32_t  __attribute__((visibility("default"))) TS_SignedRawInvoice_into_parts(
        this_arg_conv.inner = (void*)(this_arg & (~1));
        this_arg_conv.is_owned = (this_arg & 1) || (this_arg == 0);
        this_arg_conv = SignedRawInvoice_clone(&this_arg_conv);
-       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
-       *ret_ref = SignedRawInvoice_into_parts(this_arg_conv);
-       return (uint64_t)ret_ref;
+       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
+       *ret_conv = SignedRawInvoice_into_parts(this_arg_conv);
+       return ((uint64_t)ret_conv);
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_SignedRawInvoice_raw_invoice(uint32_t this_arg) {
index 5661316a1c4733fa26f4e93a4c1d7fe34ba9fb1a..066ba66dcbf0cf7a9df08d3e0fbd36c3bcd8bd61 100644 (file)
@@ -870,17 +870,27 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_usizeTransactionZ
        ret->b = b_ref;
        return (uint64_t)ret;
 }
-int64_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_usizeTransactionZ_get_a(uint32_t ptr) {
-       LDKC2Tuple_usizeTransactionZ *tuple = (LDKC2Tuple_usizeTransactionZ*)(ptr & ~1);
+static inline uintptr_t C2Tuple_usizeTransactionZ_get_a(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR tuple){
        return tuple->a;
 }
-int8_tArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_usizeTransactionZ_get_b(uint32_t ptr) {
-       LDKC2Tuple_usizeTransactionZ *tuple = (LDKC2Tuple_usizeTransactionZ*)(ptr & ~1);
-       LDKTransaction b_var = tuple->b;
-       int8_tArray b_arr = init_arr(b_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(b_arr + 4), b_var.data, b_var.datalen);
-       return b_arr;
+int64_t  __attribute__((visibility("default"))) TS_C2Tuple_usizeTransactionZ_get_a(uint32_t tuple) {
+       LDKC2Tuple_usizeTransactionZ* tuple_conv = (LDKC2Tuple_usizeTransactionZ*)(tuple & ~1);
+       int64_t ret_val = C2Tuple_usizeTransactionZ_get_a(tuple_conv);
+       return ret_val;
+}
+
+static inline struct LDKTransaction C2Tuple_usizeTransactionZ_get_b(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR tuple){
+       return tuple->b;
 }
+int8_tArray  __attribute__((visibility("default"))) TS_C2Tuple_usizeTransactionZ_get_b(uint32_t tuple) {
+       LDKC2Tuple_usizeTransactionZ* tuple_conv = (LDKC2Tuple_usizeTransactionZ*)(tuple & ~1);
+       LDKTransaction ret_var = C2Tuple_usizeTransactionZ_get_b(tuple_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       Transaction_free(ret_var);
+       return ret_arr;
+}
+
 uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_C2Tuple_usizeTransactionZZ_new(uint32_tArray elems) {
        LDKCVec_C2Tuple_usizeTransactionZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_usizeTransactionZZ), "LDKCVec_C2Tuple_usizeTransactionZZ");
        ret->datalen = *((uint32_t*)elems);
@@ -974,8 +984,10 @@ uint32_t __attribute__((visibility("default"))) TS_LDKCOption_C2Tuple_usizeTrans
        LDKCOption_C2Tuple_usizeTransactionZZ *obj = (LDKCOption_C2Tuple_usizeTransactionZZ*)(ptr & ~1);
        switch(obj->tag) {
                case LDKCOption_C2Tuple_usizeTransactionZZ_Some: {
-                       uint64_t some_ref = (uint64_t)(&obj->some) | 1;
-                       return 0 /* LDKCOption_C2Tuple_usizeTransactionZZ - Some */; (void) some_ref;
+                       LDKC2Tuple_usizeTransactionZ* some_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
+                       *some_conv = obj->some;
+                       *some_conv = C2Tuple_usizeTransactionZ_clone(some_conv);
+                       return 0 /* LDKCOption_C2Tuple_usizeTransactionZZ - Some */; (void) ((uint64_t)some_conv);
                }
                case LDKCOption_C2Tuple_usizeTransactionZZ_None: {
                        return 0 /* LDKCOption_C2Tuple_usizeTransactionZZ - None */;
@@ -1472,32 +1484,43 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_SignatureCVec_Sig
        ret->b = b_constr;
        return (uint64_t)ret;
 }
-int8_tArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_SignatureCVec_SignatureZZ_get_a(uint32_t ptr) {
-       LDKC2Tuple_SignatureCVec_SignatureZZ *tuple = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(ptr & ~1);
-       int8_tArray a_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(a_arr + 4), tuple->a.compact_form, 64);
-       return a_arr;
+static inline struct LDKSignature C2Tuple_SignatureCVec_SignatureZZ_get_a(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR tuple){
+       return tuple->a;
+}
+int8_tArray  __attribute__((visibility("default"))) TS_C2Tuple_SignatureCVec_SignatureZZ_get_a(uint32_t tuple) {
+       LDKC2Tuple_SignatureCVec_SignatureZZ* tuple_conv = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(tuple & ~1);
+       int8_tArray ret_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), C2Tuple_SignatureCVec_SignatureZZ_get_a(tuple_conv).compact_form, 64);
+       return ret_arr;
 }
-ptrArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_SignatureCVec_SignatureZZ_get_b(uint32_t ptr) {
-       LDKC2Tuple_SignatureCVec_SignatureZZ *tuple = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(ptr & ~1);
-       LDKCVec_SignatureZ b_var = tuple->b;
-       ptrArray b_arr = init_arr(b_var.datalen, sizeof(uint32_t), "Native ptrArray Bytes");
-       int8_tArray *b_arr_ptr = (int8_tArray*)(b_arr + 4);
-       for (size_t m = 0; m < b_var.datalen; m++) {
-               int8_tArray b_conv_12_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
-               memcpy((uint8_t*)(b_conv_12_arr + 4), b_var.data[m].compact_form, 64);
-               b_arr_ptr[m] = b_conv_12_arr;
+
+static inline struct LDKCVec_SignatureZ C2Tuple_SignatureCVec_SignatureZZ_get_b(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR tuple){
+       return tuple->b;
+}
+ptrArray  __attribute__((visibility("default"))) TS_C2Tuple_SignatureCVec_SignatureZZ_get_b(uint32_t tuple) {
+       LDKC2Tuple_SignatureCVec_SignatureZZ* tuple_conv = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(tuple & ~1);
+       LDKCVec_SignatureZ ret_var = C2Tuple_SignatureCVec_SignatureZZ_get_b(tuple_conv);
+       ptrArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native ptrArray Bytes");
+       int8_tArray *ret_arr_ptr = (int8_tArray*)(ret_arr + 4);
+       for (size_t m = 0; m < ret_var.datalen; m++) {
+               int8_tArray ret_conv_12_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
+               memcpy((uint8_t*)(ret_conv_12_arr + 4), ret_var.data[m].compact_form, 64);
+               ret_arr_ptr[m] = ret_conv_12_arr;
        }
-       return b_arr;
+       FREE(ret_var.data);
+       return ret_arr;
 }
+
 jboolean  __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_result_ok(uint32_t arg) {
        return ((LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)arg)->result_ok;
 }
 uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(uint32_t arg) {
        LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *val = (LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(arg & ~1);
        CHECK(val->result_ok);
-       uint64_t res_ref = (uint64_t)(&(*val->contents.result)) | 1;
-       return res_ref;
+       LDKC2Tuple_SignatureCVec_SignatureZZ* res_conv = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
+       *res_conv = (*val->contents.result);
+       *res_conv = C2Tuple_SignatureCVec_SignatureZZ_clone(res_conv);
+       return ((uint64_t)res_conv);
 }
 void  __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(uint32_t arg) {
        LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *val = (LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(arg & ~1);
@@ -2126,20 +2149,31 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_BlockHashChannelM
        ret->b = b_conv;
        return (uint64_t)ret;
 }
-int8_tArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_BlockHashChannelMonitorZ_get_a(uint32_t ptr) {
-       LDKC2Tuple_BlockHashChannelMonitorZ *tuple = (LDKC2Tuple_BlockHashChannelMonitorZ*)(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;
+static inline struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelMonitorZ_get_a(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR tuple){
+       return ThirtyTwoBytes_clone(&tuple->a);
+}
+int8_tArray  __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelMonitorZ_get_a(uint32_t tuple) {
+       LDKC2Tuple_BlockHashChannelMonitorZ* tuple_conv = (LDKC2Tuple_BlockHashChannelMonitorZ*)(tuple & ~1);
+       int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), C2Tuple_BlockHashChannelMonitorZ_get_a(tuple_conv).data, 32);
+       return ret_arr;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_BlockHashChannelMonitorZ_get_b(uint32_t ptr) {
-       LDKC2Tuple_BlockHashChannelMonitorZ *tuple = (LDKC2Tuple_BlockHashChannelMonitorZ*)(ptr & ~1);
-       LDKChannelMonitor b_var = tuple->b;
-       CHECK((((uint64_t)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((uint64_t)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       uint64_t b_ref = (uint64_t)b_var.inner & ~1;
-       return b_ref;
+
+static inline struct LDKChannelMonitor C2Tuple_BlockHashChannelMonitorZ_get_b(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR tuple){
+       return ChannelMonitor_clone(&tuple->b);
 }
+uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelMonitorZ_get_b(uint32_t tuple) {
+       LDKC2Tuple_BlockHashChannelMonitorZ* tuple_conv = (LDKC2Tuple_BlockHashChannelMonitorZ*)(tuple & ~1);
+       LDKChannelMonitor ret_var = C2Tuple_BlockHashChannelMonitorZ_get_b(tuple_conv);
+       CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       uint64_t ret_ref = (uint64_t)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_C2Tuple_BlockHashChannelMonitorZZ_new(uint32_tArray elems) {
        LDKCVec_C2Tuple_BlockHashChannelMonitorZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_BlockHashChannelMonitorZZ), "LDKCVec_C2Tuple_BlockHashChannelMonitorZZ");
        ret->datalen = *((uint32_t*)elems);
@@ -2151,12 +2185,19 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_C2Tuple_BlockHashCha
                for (size_t i = 0; i < ret->datalen; i++) {
                        uint32_t arr_elem = java_elems[i];
                        LDKC2Tuple_BlockHashChannelMonitorZ arr_elem_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)arr_elem) & ~1);
-                       // Warning: we may need a move here but no clone is available for LDKC2Tuple_BlockHashChannelMonitorZ
+                       arr_elem_conv = C2Tuple_BlockHashChannelMonitorZ_clone((LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)arr_elem) & ~1));
                        ret->data[i] = arr_elem_conv;
                }
        }
        return (uint64_t)ret;
 }
+static inline LDKCVec_C2Tuple_BlockHashChannelMonitorZZ CVec_C2Tuple_BlockHashChannelMonitorZZ_clone(const LDKCVec_C2Tuple_BlockHashChannelMonitorZZ *orig) {
+       LDKCVec_C2Tuple_BlockHashChannelMonitorZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ) * orig->datalen, "LDKCVec_C2Tuple_BlockHashChannelMonitorZZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = C2Tuple_BlockHashChannelMonitorZ_clone(&orig->data[i]);
+       }
+       return ret;
+}
 jboolean  __attribute__((visibility("default"))) TS_LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_result_ok(uint32_t arg) {
        return ((LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ*)arg)->result_ok;
 }
@@ -2166,9 +2207,11 @@ uint32_tArray  __attribute__((visibility("default"))) TS_LDKCResult_CVec_C2Tuple
        LDKCVec_C2Tuple_BlockHashChannelMonitorZZ res_var = (*val->contents.result);
        uint32_tArray res_arr = init_arr(res_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
        uint32_t *res_arr_ptr = (uint32_t*)(res_arr + 4);
-       for (size_t m = 0; m < res_var.datalen; m++) {
-               uint64_t res_conv_38_ref = (uint64_t)(&res_var.data[m]) | 1;
-               res_arr_ptr[m] = res_conv_38_ref;
+       for (size_t j = 0; j < res_var.datalen; j++) {
+               LDKC2Tuple_BlockHashChannelMonitorZ* res_conv_35_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
+               *res_conv_35_conv = res_var.data[j];
+               *res_conv_35_conv = C2Tuple_BlockHashChannelMonitorZ_clone(res_conv_35_conv);
+               res_arr_ptr[j] = ((uint64_t)res_conv_35_conv);
        }
        return res_arr;
 }
@@ -2424,18 +2467,26 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_PaymentHashPaymen
        ret->b = b_ref;
        return (uint64_t)ret;
 }
-int8_tArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_PaymentHashPaymentSecretZ_get_a(uint32_t ptr) {
-       LDKC2Tuple_PaymentHashPaymentSecretZ *tuple = (LDKC2Tuple_PaymentHashPaymentSecretZ*)(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;
+static inline struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_a(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR tuple){
+       return ThirtyTwoBytes_clone(&tuple->a);
+}
+int8_tArray  __attribute__((visibility("default"))) TS_C2Tuple_PaymentHashPaymentSecretZ_get_a(uint32_t tuple) {
+       LDKC2Tuple_PaymentHashPaymentSecretZ* tuple_conv = (LDKC2Tuple_PaymentHashPaymentSecretZ*)(tuple & ~1);
+       int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), C2Tuple_PaymentHashPaymentSecretZ_get_a(tuple_conv).data, 32);
+       return ret_arr;
+}
+
+static inline struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_b(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR tuple){
+       return ThirtyTwoBytes_clone(&tuple->b);
 }
-int8_tArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_PaymentHashPaymentSecretZ_get_b(uint32_t ptr) {
-       LDKC2Tuple_PaymentHashPaymentSecretZ *tuple = (LDKC2Tuple_PaymentHashPaymentSecretZ*)(ptr & ~1);
-       int8_tArray b_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(b_arr + 4), tuple->b.data, 32);
-       return b_arr;
+int8_tArray  __attribute__((visibility("default"))) TS_C2Tuple_PaymentHashPaymentSecretZ_get_b(uint32_t tuple) {
+       LDKC2Tuple_PaymentHashPaymentSecretZ* tuple_conv = (LDKC2Tuple_PaymentHashPaymentSecretZ*)(tuple & ~1);
+       int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), C2Tuple_PaymentHashPaymentSecretZ_get_b(tuple_conv).data, 32);
+       return ret_arr;
 }
+
 jboolean  __attribute__((visibility("default"))) TS_LDKCResult_PaymentSecretAPIErrorZ_result_ok(uint32_t arg) {
        return ((LDKCResult_PaymentSecretAPIErrorZ*)arg)->result_ok;
 }
@@ -2941,28 +2992,38 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_BlockHashChannelM
        ret->b = b_conv;
        return (uint64_t)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;
+static inline struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelManagerZ_get_a(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR tuple){
+       return ThirtyTwoBytes_clone(&tuple->a);
+}
+int8_tArray  __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelManagerZ_get_a(uint32_t tuple) {
+       LDKC2Tuple_BlockHashChannelManagerZ* tuple_conv = (LDKC2Tuple_BlockHashChannelManagerZ*)(tuple & ~1);
+       int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), C2Tuple_BlockHashChannelManagerZ_get_a(tuple_conv).data, 32);
+       return ret_arr;
+}
+
+static inline struct LDKChannelManager *C2Tuple_BlockHashChannelManagerZ_get_b(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR tuple){
+       return &tuple->b;
 }
-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((((uint64_t)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((uint64_t)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       uint64_t b_ref = (uint64_t)b_var.inner & ~1;
-       return b_ref;
+uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelManagerZ_get_b(uint32_t tuple) {
+       LDKC2Tuple_BlockHashChannelManagerZ* tuple_conv = (LDKC2Tuple_BlockHashChannelManagerZ*)(tuple & ~1);
+       LDKChannelManager ret_var = *C2Tuple_BlockHashChannelManagerZ_get_b(tuple_conv);
+       CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       uint64_t ret_ref = (uint64_t)ret_var.inner & ~1;
+       return ret_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);
-       uint64_t res_ref = (uint64_t)(&(*val->contents.result)) | 1;
-       return res_ref;
+       LDKC2Tuple_BlockHashChannelManagerZ* res_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelManagerZ), "LDKC2Tuple_BlockHashChannelManagerZ");
+       *res_conv = (*val->contents.result);
+       // Warning: we really need to clone here, but no clone is available for LDKC2Tuple_BlockHashChannelManagerZ
+       return ((uint64_t)res_conv) | 1;
 }
 uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(uint32_t arg) {
        LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)(arg & ~1);
@@ -3194,28 +3255,46 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKC3Tuple_RawInvoice_u832In
        ret->c = c_conv;
        return (uint64_t)ret;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(uint32_t ptr) {
-       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *tuple = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(ptr & ~1);
-       LDKRawInvoice a_var = tuple->a;
-       CHECK((((uint64_t)a_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((uint64_t)&a_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       uint64_t a_ref = (uint64_t)a_var.inner & ~1;
-       return a_ref;
-}
-int8_tArray  __attribute__((visibility("default"))) TS_LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(uint32_t ptr) {
-       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *tuple = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(ptr & ~1);
-       int8_tArray b_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(b_arr + 4), tuple->b.data, 32);
-       return b_arr;
-}
-uint32_t  __attribute__((visibility("default"))) TS_LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(uint32_t ptr) {
-       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *tuple = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(ptr & ~1);
-       LDKInvoiceSignature c_var = tuple->c;
-       CHECK((((uint64_t)c_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((uint64_t)&c_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       uint64_t c_ref = (uint64_t)c_var.inner & ~1;
-       return c_ref;
+static inline struct LDKRawInvoice C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple){
+       return RawInvoice_clone(&tuple->a);
 }
+uint32_t  __attribute__((visibility("default"))) TS_C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(uint32_t tuple) {
+       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* tuple_conv = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(tuple & ~1);
+       LDKRawInvoice ret_var = C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(tuple_conv);
+       CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       uint64_t ret_ref = (uint64_t)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+static inline struct LDKThirtyTwoBytes C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple){
+       return ThirtyTwoBytes_clone(&tuple->b);
+}
+int8_tArray  __attribute__((visibility("default"))) TS_C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(uint32_t tuple) {
+       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* tuple_conv = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(tuple & ~1);
+       int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(tuple_conv).data, 32);
+       return ret_arr;
+}
+
+static inline struct LDKInvoiceSignature C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple){
+       return InvoiceSignature_clone(&tuple->c);
+}
+uint32_t  __attribute__((visibility("default"))) TS_C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(uint32_t tuple) {
+       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* tuple_conv = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(tuple & ~1);
+       LDKInvoiceSignature ret_var = C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(tuple_conv);
+       CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       uint64_t ret_ref = (uint64_t)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 jboolean  __attribute__((visibility("default"))) TS_LDKCResult_PayeePubKeyErrorZ_result_ok(uint32_t arg) {
        return ((LDKCResult_PayeePubKeyErrorZ*)arg)->result_ok;
 }
@@ -3453,21 +3532,33 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_OutPointScriptZ_n
        ret->b = b_ref;
        return (uint64_t)ret;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_OutPointScriptZ_get_a(uint32_t ptr) {
-       LDKC2Tuple_OutPointScriptZ *tuple = (LDKC2Tuple_OutPointScriptZ*)(ptr & ~1);
-       LDKOutPoint a_var = tuple->a;
-       CHECK((((uint64_t)a_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((uint64_t)&a_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       uint64_t a_ref = (uint64_t)a_var.inner & ~1;
-       return a_ref;
-}
-int8_tArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_OutPointScriptZ_get_b(uint32_t ptr) {
-       LDKC2Tuple_OutPointScriptZ *tuple = (LDKC2Tuple_OutPointScriptZ*)(ptr & ~1);
-       LDKCVec_u8Z b_var = tuple->b;
-       int8_tArray b_arr = init_arr(b_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(b_arr + 4), b_var.data, b_var.datalen);
-       return b_arr;
+static inline struct LDKOutPoint C2Tuple_OutPointScriptZ_get_a(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR tuple){
+       return OutPoint_clone(&tuple->a);
+}
+uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_OutPointScriptZ_get_a(uint32_t tuple) {
+       LDKC2Tuple_OutPointScriptZ* tuple_conv = (LDKC2Tuple_OutPointScriptZ*)(tuple & ~1);
+       LDKOutPoint ret_var = C2Tuple_OutPointScriptZ_get_a(tuple_conv);
+       CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       uint64_t ret_ref = (uint64_t)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+static inline struct LDKCVec_u8Z C2Tuple_OutPointScriptZ_get_b(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR tuple){
+       return CVec_u8Z_clone(&tuple->b);
+}
+int8_tArray  __attribute__((visibility("default"))) TS_C2Tuple_OutPointScriptZ_get_b(uint32_t tuple) {
+       LDKC2Tuple_OutPointScriptZ* tuple_conv = (LDKC2Tuple_OutPointScriptZ*)(tuple & ~1);
+       LDKCVec_u8Z ret_var = C2Tuple_OutPointScriptZ_get_b(tuple_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
+
 uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_u32ScriptZ_new(int32_t a, int8_tArray b) {
        LDKC2Tuple_u32ScriptZ* ret = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
        ret->a = a;
@@ -3478,17 +3569,27 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_u32ScriptZ_new(in
        ret->b = b_ref;
        return (uint64_t)ret;
 }
-int32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_u32ScriptZ_get_a(uint32_t ptr) {
-       LDKC2Tuple_u32ScriptZ *tuple = (LDKC2Tuple_u32ScriptZ*)(ptr & ~1);
+static inline uint32_t C2Tuple_u32ScriptZ_get_a(LDKC2Tuple_u32ScriptZ *NONNULL_PTR tuple){
        return tuple->a;
 }
-int8_tArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_u32ScriptZ_get_b(uint32_t ptr) {
-       LDKC2Tuple_u32ScriptZ *tuple = (LDKC2Tuple_u32ScriptZ*)(ptr & ~1);
-       LDKCVec_u8Z b_var = tuple->b;
-       int8_tArray b_arr = init_arr(b_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(b_arr + 4), b_var.data, b_var.datalen);
-       return b_arr;
+int32_t  __attribute__((visibility("default"))) TS_C2Tuple_u32ScriptZ_get_a(uint32_t tuple) {
+       LDKC2Tuple_u32ScriptZ* tuple_conv = (LDKC2Tuple_u32ScriptZ*)(tuple & ~1);
+       int32_t ret_val = C2Tuple_u32ScriptZ_get_a(tuple_conv);
+       return ret_val;
+}
+
+static inline struct LDKCVec_u8Z C2Tuple_u32ScriptZ_get_b(LDKC2Tuple_u32ScriptZ *NONNULL_PTR tuple){
+       return CVec_u8Z_clone(&tuple->b);
+}
+int8_tArray  __attribute__((visibility("default"))) TS_C2Tuple_u32ScriptZ_get_b(uint32_t tuple) {
+       LDKC2Tuple_u32ScriptZ* tuple_conv = (LDKC2Tuple_u32ScriptZ*)(tuple & ~1);
+       LDKCVec_u8Z ret_var = C2Tuple_u32ScriptZ_get_b(tuple_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
+
 uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_C2Tuple_u32ScriptZZ_new(uint32_tArray elems) {
        LDKCVec_C2Tuple_u32ScriptZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_u32ScriptZZ), "LDKCVec_C2Tuple_u32ScriptZZ");
        ret->datalen = *((uint32_t*)elems);
@@ -3526,32 +3627,42 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_TxidCVec_C2Tuple_
        else
                b_constr.data = NULL;
        uint32_t* b_vals = (uint32_t*)(b + 4);
-       for (size_t e = 0; e < b_constr.datalen; e++) {
-               uint32_t b_conv_30 = b_vals[e];
-               LDKC2Tuple_u32ScriptZ b_conv_30_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_30) & ~1);
-               b_conv_30_conv = C2Tuple_u32ScriptZ_clone((LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_30) & ~1));
-               b_constr.data[e] = b_conv_30_conv;
+       for (size_t v = 0; v < b_constr.datalen; v++) {
+               uint32_t b_conv_21 = b_vals[v];
+               LDKC2Tuple_u32ScriptZ b_conv_21_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_21) & ~1);
+               b_conv_21_conv = C2Tuple_u32ScriptZ_clone((LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_21) & ~1));
+               b_constr.data[v] = b_conv_21_conv;
        }
        ret->b = b_constr;
        return (uint64_t)ret;
 }
-int8_tArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(uint32_t ptr) {
-       LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *tuple = (LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(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;
+static inline struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR tuple){
+       return ThirtyTwoBytes_clone(&tuple->a);
+}
+int8_tArray  __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(uint32_t tuple) {
+       LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* tuple_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(tuple & ~1);
+       int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(tuple_conv).data, 32);
+       return ret_arr;
+}
+
+static inline struct LDKCVec_C2Tuple_u32ScriptZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR tuple){
+       return CVec_C2Tuple_u32ScriptZZ_clone(&tuple->b);
 }
-uint32_tArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(uint32_t ptr) {
-       LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *tuple = (LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(ptr & ~1);
-       LDKCVec_C2Tuple_u32ScriptZZ b_var = tuple->b;
-       uint32_tArray b_arr = init_arr(b_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
-       uint32_t *b_arr_ptr = (uint32_t*)(b_arr + 4);
-       for (size_t e = 0; e < b_var.datalen; e++) {
-               uint64_t b_conv_30_ref = (uint64_t)(&b_var.data[e]) | 1;
-               b_arr_ptr[e] = b_conv_30_ref;
+uint32_tArray  __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(uint32_t tuple) {
+       LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* tuple_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(tuple & ~1);
+       LDKCVec_C2Tuple_u32ScriptZZ ret_var = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(tuple_conv);
+       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 v = 0; v < ret_var.datalen; v++) {
+               LDKC2Tuple_u32ScriptZ* ret_conv_21_conv = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
+               *ret_conv_21_conv = ret_var.data[v];
+               ret_arr_ptr[v] = ((uint64_t)ret_conv_21_conv);
        }
-       return b_arr;
+       FREE(ret_var.data);
+       return ret_arr;
 }
+
 uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_new(uint32_tArray elems) {
        LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ), "LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ");
        ret->datalen = *((uint32_t*)elems);
@@ -3721,15 +3832,25 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_u32TxOutZ_new(int
        ret->b = b_conv;
        return (uint64_t)ret;
 }
-int32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_u32TxOutZ_get_a(uint32_t ptr) {
-       LDKC2Tuple_u32TxOutZ *tuple = (LDKC2Tuple_u32TxOutZ*)(ptr & ~1);
+static inline uint32_t C2Tuple_u32TxOutZ_get_a(LDKC2Tuple_u32TxOutZ *NONNULL_PTR tuple){
        return tuple->a;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_u32TxOutZ_get_b(uint32_t ptr) {
-       LDKC2Tuple_u32TxOutZ *tuple = (LDKC2Tuple_u32TxOutZ*)(ptr & ~1);
-       uint64_t b_ref = ((uint64_t)&tuple->b) | 1;
-       return (uint64_t)b_ref;
+int32_t  __attribute__((visibility("default"))) TS_C2Tuple_u32TxOutZ_get_a(uint32_t tuple) {
+       LDKC2Tuple_u32TxOutZ* tuple_conv = (LDKC2Tuple_u32TxOutZ*)(tuple & ~1);
+       int32_t ret_val = C2Tuple_u32TxOutZ_get_a(tuple_conv);
+       return ret_val;
+}
+
+static inline struct LDKTxOut C2Tuple_u32TxOutZ_get_b(LDKC2Tuple_u32TxOutZ *NONNULL_PTR tuple){
+       return TxOut_clone(&tuple->b);
+}
+uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_u32TxOutZ_get_b(uint32_t tuple) {
+       LDKC2Tuple_u32TxOutZ* tuple_conv = (LDKC2Tuple_u32TxOutZ*)(tuple & ~1);
+       LDKTxOut* ret_ref = MALLOC(sizeof(LDKTxOut), "LDKTxOut");
+       *ret_ref = C2Tuple_u32TxOutZ_get_b(tuple_conv);
+       return (uint64_t)ret_ref;
 }
+
 uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_C2Tuple_u32TxOutZZ_new(uint32_tArray elems) {
        LDKCVec_C2Tuple_u32TxOutZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_u32TxOutZZ), "LDKCVec_C2Tuple_u32TxOutZZ");
        ret->datalen = *((uint32_t*)elems);
@@ -3767,32 +3888,42 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_TxidCVec_C2Tuple_
        else
                b_constr.data = NULL;
        uint32_t* b_vals = (uint32_t*)(b + 4);
-       for (size_t z = 0; z < b_constr.datalen; z++) {
-               uint32_t b_conv_25 = b_vals[z];
-               LDKC2Tuple_u32TxOutZ b_conv_25_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_25) & ~1);
-               b_conv_25_conv = C2Tuple_u32TxOutZ_clone((LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_25) & ~1));
-               b_constr.data[z] = b_conv_25_conv;
+       for (size_t u = 0; u < b_constr.datalen; u++) {
+               uint32_t b_conv_20 = b_vals[u];
+               LDKC2Tuple_u32TxOutZ b_conv_20_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_20) & ~1);
+               b_conv_20_conv = C2Tuple_u32TxOutZ_clone((LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_20) & ~1));
+               b_constr.data[u] = b_conv_20_conv;
        }
        ret->b = b_constr;
        return (uint64_t)ret;
 }
-int8_tArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(uint32_t ptr) {
-       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *tuple = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(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;
+static inline struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR tuple){
+       return ThirtyTwoBytes_clone(&tuple->a);
+}
+int8_tArray  __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(uint32_t tuple) {
+       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* tuple_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(tuple & ~1);
+       int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(tuple_conv).data, 32);
+       return ret_arr;
+}
+
+static inline struct LDKCVec_C2Tuple_u32TxOutZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR tuple){
+       return CVec_C2Tuple_u32TxOutZZ_clone(&tuple->b);
 }
-uint32_tArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(uint32_t ptr) {
-       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *tuple = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(ptr & ~1);
-       LDKCVec_C2Tuple_u32TxOutZZ b_var = tuple->b;
-       uint32_tArray b_arr = init_arr(b_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
-       uint32_t *b_arr_ptr = (uint32_t*)(b_arr + 4);
-       for (size_t z = 0; z < b_var.datalen; z++) {
-               uint64_t b_conv_25_ref = (uint64_t)(&b_var.data[z]) | 1;
-               b_arr_ptr[z] = b_conv_25_ref;
+uint32_tArray  __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(uint32_t tuple) {
+       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* tuple_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(tuple & ~1);
+       LDKCVec_C2Tuple_u32TxOutZZ ret_var = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(tuple_conv);
+       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 u = 0; u < ret_var.datalen; u++) {
+               LDKC2Tuple_u32TxOutZ* ret_conv_20_conv = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
+               *ret_conv_20_conv = ret_var.data[u];
+               ret_arr_ptr[u] = ((uint64_t)ret_conv_20_conv);
        }
-       return b_arr;
+       FREE(ret_var.data);
+       return ret_arr;
 }
+
 uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_new(uint32_tArray elems) {
        LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ), "LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ");
        ret->datalen = *((uint32_t*)elems);
@@ -3865,8 +3996,10 @@ jboolean  __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_BlockHash
 uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(uint32_t arg) {
        LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       uint64_t res_ref = (uint64_t)(&(*val->contents.result)) | 1;
-       return res_ref;
+       LDKC2Tuple_BlockHashChannelMonitorZ* res_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
+       *res_conv = (*val->contents.result);
+       *res_conv = C2Tuple_BlockHashChannelMonitorZ_clone(res_conv);
+       return ((uint64_t)res_conv);
 }
 uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(uint32_t arg) {
        LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)(arg & ~1);
@@ -3905,18 +4038,26 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_PublicKeyTypeZ_ne
        ret->b = b_conv;
        return (uint64_t)ret;
 }
-int8_tArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_PublicKeyTypeZ_get_a(uint32_t ptr) {
-       LDKC2Tuple_PublicKeyTypeZ *tuple = (LDKC2Tuple_PublicKeyTypeZ*)(ptr & ~1);
-       int8_tArray a_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(a_arr + 4), tuple->a.compressed_form, 33);
-       return a_arr;
+static inline struct LDKPublicKey C2Tuple_PublicKeyTypeZ_get_a(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR tuple){
+       return tuple->a;
+}
+int8_tArray  __attribute__((visibility("default"))) TS_C2Tuple_PublicKeyTypeZ_get_a(uint32_t tuple) {
+       LDKC2Tuple_PublicKeyTypeZ* tuple_conv = (LDKC2Tuple_PublicKeyTypeZ*)(tuple & ~1);
+       int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), C2Tuple_PublicKeyTypeZ_get_a(tuple_conv).compressed_form, 33);
+       return ret_arr;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_PublicKeyTypeZ_get_b(uint32_t ptr) {
-       LDKC2Tuple_PublicKeyTypeZ *tuple = (LDKC2Tuple_PublicKeyTypeZ*)(ptr & ~1);
-       LDKType* b_ret =MALLOC(sizeof(LDKType), "LDKType");
-       *b_ret = Type_clone(&tuple->b);
-       return (uint64_t)b_ret;
+
+static inline struct LDKType C2Tuple_PublicKeyTypeZ_get_b(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR tuple){
+       return Type_clone(&tuple->b);
 }
+uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_PublicKeyTypeZ_get_b(uint32_t tuple) {
+       LDKC2Tuple_PublicKeyTypeZ* tuple_conv = (LDKC2Tuple_PublicKeyTypeZ*)(tuple & ~1);
+       LDKType* ret_ret =MALLOC(sizeof(LDKType), "LDKType");
+       *ret_ret = C2Tuple_PublicKeyTypeZ_get_b(tuple_conv);
+       return (uint64_t)ret_ret;
+}
+
 uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_C2Tuple_PublicKeyTypeZZ_new(uint32_tArray elems) {
        LDKCVec_C2Tuple_PublicKeyTypeZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_PublicKeyTypeZZ), "LDKCVec_C2Tuple_PublicKeyTypeZZ");
        ret->datalen = *((uint32_t*)elems);
@@ -3977,30 +4118,51 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKC3Tuple_ChannelAnnounceme
        ret->c = c_conv;
        return (uint64_t)ret;
 }
-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((((uint64_t)a_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((uint64_t)&a_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       uint64_t a_ref = (uint64_t)a_var.inner & ~1;
-       return a_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((((uint64_t)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((uint64_t)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       uint64_t b_ref = (uint64_t)b_var.inner & ~1;
-       return b_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((((uint64_t)c_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((uint64_t)&c_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       uint64_t c_ref = (uint64_t)c_var.inner & ~1;
-       return c_ref;
+static inline struct LDKChannelAnnouncement C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple){
+       return ChannelAnnouncement_clone(&tuple->a);
+}
+uint32_t  __attribute__((visibility("default"))) TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(uint32_t tuple) {
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* tuple_conv = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(tuple & ~1);
+       LDKChannelAnnouncement ret_var = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(tuple_conv);
+       CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       uint64_t ret_ref = (uint64_t)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+static inline struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple){
+       return ChannelUpdate_clone(&tuple->b);
 }
+uint32_t  __attribute__((visibility("default"))) TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(uint32_t tuple) {
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* tuple_conv = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(tuple & ~1);
+       LDKChannelUpdate ret_var = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(tuple_conv);
+       CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       uint64_t ret_ref = (uint64_t)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+static inline struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple){
+       return ChannelUpdate_clone(&tuple->c);
+}
+uint32_t  __attribute__((visibility("default"))) TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(uint32_t tuple) {
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* tuple_conv = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(tuple & ~1);
+       LDKChannelUpdate ret_var = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(tuple_conv);
+       CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       uint64_t ret_ref = (uint64_t)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_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);
@@ -5515,10 +5677,10 @@ void transactions_confirmed_LDKConfirm_jcall(const void* this_arg, const uint8_t
        LDKCVec_C2Tuple_usizeTransactionZZ txdata_var = txdata;
        uint32_tArray txdata_arr = init_arr(txdata_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
        uint32_t *txdata_arr_ptr = (uint32_t*)(txdata_arr + 4);
-       for (size_t e = 0; e < txdata_var.datalen; e++) {
-               LDKC2Tuple_usizeTransactionZ* txdata_conv_30_ref = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
-               *txdata_conv_30_ref = txdata_var.data[e];
-               txdata_arr_ptr[e] = (uint64_t)txdata_conv_30_ref;
+       for (size_t c = 0; c < txdata_var.datalen; c++) {
+               LDKC2Tuple_usizeTransactionZ* txdata_conv_28_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
+               *txdata_conv_28_conv = txdata_var.data[c];
+               txdata_arr_ptr[c] = ((uint64_t)txdata_conv_28_conv);
        }
        FREE(txdata_var.data);
        js_invoke_function_3(j_calls->transactions_confirmed_meth, header_arr, txdata_arr, height);
@@ -5591,11 +5753,11 @@ void  __attribute__((visibility("default"))) TS_Confirm_transactions_confirmed(u
        else
                txdata_constr.data = NULL;
        uint32_t* txdata_vals = (uint32_t*)(txdata + 4);
-       for (size_t e = 0; e < txdata_constr.datalen; e++) {
-               uint32_t txdata_conv_30 = txdata_vals[e];
-               LDKC2Tuple_usizeTransactionZ txdata_conv_30_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_30) & ~1);
-               txdata_conv_30_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_30) & ~1));
-               txdata_constr.data[e] = txdata_conv_30_conv;
+       for (size_t c = 0; c < txdata_constr.datalen; c++) {
+               uint32_t txdata_conv_28 = txdata_vals[c];
+               LDKC2Tuple_usizeTransactionZ txdata_conv_28_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1);
+               txdata_conv_28_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1));
+               txdata_constr.data[c] = txdata_conv_28_conv;
        }
        (this_arg_conv->transactions_confirmed)(this_arg_conv->this_arg, header_ref, txdata_constr, height);
 }
@@ -6450,11 +6612,11 @@ LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ get_next_channel
        else
                ret_constr.data = NULL;
        uint32_t* ret_vals = (uint32_t*)(ret + 4);
-       for (size_t l = 0; l < ret_constr.datalen; l++) {
-               uint32_t ret_conv_63 = ret_vals[l];
-               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ ret_conv_63_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)ret_conv_63) & ~1);
-               ret_conv_63_conv = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone((LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)ret_conv_63) & ~1));
-               ret_constr.data[l] = ret_conv_63_conv;
+       for (size_t h = 0; h < ret_constr.datalen; h++) {
+               uint32_t ret_conv_59 = ret_vals[h];
+               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ ret_conv_59_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)ret_conv_59) & ~1);
+               ret_conv_59_conv = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone((LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)ret_conv_59) & ~1));
+               ret_constr.data[h] = ret_conv_59_conv;
        }
        return ret_constr;
 }
@@ -6626,10 +6788,10 @@ uint32_tArray  __attribute__((visibility("default"))) TS_RoutingMessageHandler_g
        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* ret_conv_63_ref = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
-               *ret_conv_63_ref = ret_var.data[l];
-               ret_arr_ptr[l] = (uint64_t)ret_conv_63_ref;
+       for (size_t h = 0; h < ret_var.datalen; h++) {
+               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_conv_59_conv = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
+               *ret_conv_59_conv = ret_var.data[h];
+               ret_arr_ptr[h] = ((uint64_t)ret_conv_59_conv);
        }
        FREE(ret_var.data);
        return ret_arr;
@@ -6811,11 +6973,11 @@ LDKCVec_C2Tuple_PublicKeyTypeZZ get_and_clear_pending_msg_LDKCustomMessageHandle
        else
                ret_constr.data = NULL;
        uint32_t* ret_vals = (uint32_t*)(ret + 4);
-       for (size_t c = 0; c < ret_constr.datalen; c++) {
-               uint32_t ret_conv_28 = ret_vals[c];
-               LDKC2Tuple_PublicKeyTypeZ ret_conv_28_conv = *(LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)ret_conv_28) & ~1);
-               ret_conv_28_conv = C2Tuple_PublicKeyTypeZ_clone((LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)ret_conv_28) & ~1));
-               ret_constr.data[c] = ret_conv_28_conv;
+       for (size_t z = 0; z < ret_constr.datalen; z++) {
+               uint32_t ret_conv_25 = ret_vals[z];
+               LDKC2Tuple_PublicKeyTypeZ ret_conv_25_conv = *(LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)ret_conv_25) & ~1);
+               ret_conv_25_conv = C2Tuple_PublicKeyTypeZ_clone((LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)ret_conv_25) & ~1));
+               ret_constr.data[z] = ret_conv_25_conv;
        }
        return ret_constr;
 }
@@ -6860,10 +7022,10 @@ uint32_tArray  __attribute__((visibility("default"))) TS_CustomMessageHandler_ge
        LDKCVec_C2Tuple_PublicKeyTypeZZ ret_var = (this_arg_conv->get_and_clear_pending_msg)(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 c = 0; c < ret_var.datalen; c++) {
-               LDKC2Tuple_PublicKeyTypeZ* ret_conv_28_ref = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
-               *ret_conv_28_ref = ret_var.data[c];
-               ret_arr_ptr[c] = (uint64_t)ret_conv_28_ref;
+       for (size_t z = 0; z < ret_var.datalen; z++) {
+               LDKC2Tuple_PublicKeyTypeZ* ret_conv_25_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
+               *ret_conv_25_conv = ret_var.data[z];
+               ret_arr_ptr[z] = ((uint64_t)ret_conv_25_conv);
        }
        FREE(ret_var.data);
        return ret_arr;
@@ -7906,9 +8068,9 @@ uint32_t  __attribute__((visibility("default"))) TS_CResult_TxOutAccessErrorZ_cl
 
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_usizeTransactionZ_clone(uint32_t orig) {
        LDKC2Tuple_usizeTransactionZ* orig_conv = (LDKC2Tuple_usizeTransactionZ*)(orig & ~1);
-       LDKC2Tuple_usizeTransactionZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
-       *ret_ref = C2Tuple_usizeTransactionZ_clone(orig_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_usizeTransactionZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
+       *ret_conv = C2Tuple_usizeTransactionZ_clone(orig_conv);
+       return ((uint64_t)ret_conv);
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_usizeTransactionZ_new(int64_t a, int8_tArray b) {
@@ -7917,9 +8079,9 @@ uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_usizeTransactionZ_ne
        b_ref.data = MALLOC(b_ref.datalen, "LDKTransaction Bytes");
        memcpy(b_ref.data, (uint8_t*)(b + 4), b_ref.datalen);
        b_ref.data_is_owned = true;
-       LDKC2Tuple_usizeTransactionZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
-       *ret_ref = C2Tuple_usizeTransactionZ_new(a, b_ref);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_usizeTransactionZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
+       *ret_conv = C2Tuple_usizeTransactionZ_new(a, b_ref);
+       return ((uint64_t)ret_conv);
 }
 
 void  __attribute__((visibility("default"))) TS_C2Tuple_usizeTransactionZ_free(uint32_t _res) {
@@ -7937,11 +8099,11 @@ void  __attribute__((visibility("default"))) TS_CVec_C2Tuple_usizeTransactionZZ_
        else
                _res_constr.data = NULL;
        uint32_t* _res_vals = (uint32_t*)(_res + 4);
-       for (size_t e = 0; e < _res_constr.datalen; e++) {
-               uint32_t _res_conv_30 = _res_vals[e];
-               LDKC2Tuple_usizeTransactionZ _res_conv_30_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)_res_conv_30) & ~1);
-               FREE((void*)_res_conv_30);
-               _res_constr.data[e] = _res_conv_30_conv;
+       for (size_t c = 0; c < _res_constr.datalen; c++) {
+               uint32_t _res_conv_28 = _res_vals[c];
+               LDKC2Tuple_usizeTransactionZ _res_conv_28_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)_res_conv_28) & ~1);
+               FREE((void*)_res_conv_28);
+               _res_constr.data[c] = _res_conv_28_conv;
        }
        CVec_C2Tuple_usizeTransactionZZ_free(_res_constr);
 }
@@ -8340,9 +8502,9 @@ uint32_t  __attribute__((visibility("default"))) TS_CResult_NoneNoneZ_clone(uint
 
 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");
-       *ret_ref = C2Tuple_SignatureCVec_SignatureZZ_clone(orig_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_SignatureCVec_SignatureZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
+       *ret_conv = C2Tuple_SignatureCVec_SignatureZZ_clone(orig_conv);
+       return ((uint64_t)ret_conv);
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_SignatureCVec_SignatureZZ_new(int8_tArray a, ptrArray b) {
@@ -8363,9 +8525,9 @@ uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_SignatureCVec_Signat
                memcpy(b_conv_12_ref.compact_form, (uint8_t*)(b_conv_12 + 4), 64);
                b_constr.data[m] = b_conv_12_ref;
        }
-       LDKC2Tuple_SignatureCVec_SignatureZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
-       *ret_ref = C2Tuple_SignatureCVec_SignatureZZ_new(a_ref, b_constr);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_SignatureCVec_SignatureZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
+       *ret_conv = C2Tuple_SignatureCVec_SignatureZZ_new(a_ref, b_constr);
+       return ((uint64_t)ret_conv);
 }
 
 void  __attribute__((visibility("default"))) TS_C2Tuple_SignatureCVec_SignatureZZ_free(uint32_t _res) {
@@ -8642,6 +8804,13 @@ uint32_t  __attribute__((visibility("default"))) TS_CResult_TransactionNoneZ_clo
        return (uint64_t)ret_conv;
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelMonitorZ_clone(uint32_t orig) {
+       LDKC2Tuple_BlockHashChannelMonitorZ* orig_conv = (LDKC2Tuple_BlockHashChannelMonitorZ*)(orig & ~1);
+       LDKC2Tuple_BlockHashChannelMonitorZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
+       *ret_conv = C2Tuple_BlockHashChannelMonitorZ_clone(orig_conv);
+       return ((uint64_t)ret_conv);
+}
+
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelMonitorZ_new(int8_tArray a, uint32_t b) {
        LDKThirtyTwoBytes a_ref;
        CHECK(*((uint32_t*)a) == 32);
@@ -8650,9 +8819,9 @@ uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelMoni
        b_conv.inner = (void*)(b & (~1));
        b_conv.is_owned = (b & 1) || (b == 0);
        b_conv = ChannelMonitor_clone(&b_conv);
-       LDKC2Tuple_BlockHashChannelMonitorZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
-       *ret_ref = C2Tuple_BlockHashChannelMonitorZ_new(a_ref, b_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_BlockHashChannelMonitorZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
+       *ret_conv = C2Tuple_BlockHashChannelMonitorZ_new(a_ref, b_conv);
+       return ((uint64_t)ret_conv);
 }
 
 void  __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelMonitorZ_free(uint32_t _res) {
@@ -8670,11 +8839,11 @@ void  __attribute__((visibility("default"))) TS_CVec_C2Tuple_BlockHashChannelMon
        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 _res_conv_38 = _res_vals[m];
-               LDKC2Tuple_BlockHashChannelMonitorZ _res_conv_38_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)_res_conv_38) & ~1);
-               FREE((void*)_res_conv_38);
-               _res_constr.data[m] = _res_conv_38_conv;
+       for (size_t j = 0; j < _res_constr.datalen; j++) {
+               uint32_t _res_conv_35 = _res_vals[j];
+               LDKC2Tuple_BlockHashChannelMonitorZ _res_conv_35_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)_res_conv_35) & ~1);
+               FREE((void*)_res_conv_35);
+               _res_constr.data[j] = _res_conv_35_conv;
        }
        CVec_C2Tuple_BlockHashChannelMonitorZZ_free(_res_constr);
 }
@@ -8687,11 +8856,11 @@ uint32_t  __attribute__((visibility("default"))) TS_CResult_CVec_C2Tuple_BlockHa
        else
                o_constr.data = NULL;
        uint32_t* o_vals = (uint32_t*)(o + 4);
-       for (size_t m = 0; m < o_constr.datalen; m++) {
-               uint32_t o_conv_38 = o_vals[m];
-               LDKC2Tuple_BlockHashChannelMonitorZ o_conv_38_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o_conv_38) & ~1);
-               // Warning: we may need a move here but no clone is available for LDKC2Tuple_BlockHashChannelMonitorZ
-               o_constr.data[m] = o_conv_38_conv;
+       for (size_t j = 0; j < o_constr.datalen; j++) {
+               uint32_t o_conv_35 = o_vals[j];
+               LDKC2Tuple_BlockHashChannelMonitorZ o_conv_35_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o_conv_35) & ~1);
+               o_conv_35_conv = C2Tuple_BlockHashChannelMonitorZ_clone((LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o_conv_35) & ~1));
+               o_constr.data[j] = o_conv_35_conv;
        }
        LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ), "LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ");
        *ret_conv = CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(o_constr);
@@ -8712,6 +8881,13 @@ void  __attribute__((visibility("default"))) TS_CResult_CVec_C2Tuple_BlockHashCh
        CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(_res_conv);
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(uint32_t orig) {
+       LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ* orig_conv = (LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ*)(orig & ~1);
+       LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ), "LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ");
+       *ret_conv = CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(orig_conv);
+       return (uint64_t)ret_conv;
+}
+
 uint32_t  __attribute__((visibility("default"))) TS_COption_u16Z_some(int16_t o) {
        LDKCOption_u16Z *ret_copy = MALLOC(sizeof(LDKCOption_u16Z), "LDKCOption_u16Z");
        *ret_copy = COption_u16Z_some(o);
@@ -8881,9 +9057,9 @@ void  __attribute__((visibility("default"))) TS_CVec_NetAddressZ_free(uint32_tAr
 
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_PaymentHashPaymentSecretZ_clone(uint32_t orig) {
        LDKC2Tuple_PaymentHashPaymentSecretZ* orig_conv = (LDKC2Tuple_PaymentHashPaymentSecretZ*)(orig & ~1);
-       LDKC2Tuple_PaymentHashPaymentSecretZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
-       *ret_ref = C2Tuple_PaymentHashPaymentSecretZ_clone(orig_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_PaymentHashPaymentSecretZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
+       *ret_conv = C2Tuple_PaymentHashPaymentSecretZ_clone(orig_conv);
+       return ((uint64_t)ret_conv);
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_PaymentHashPaymentSecretZ_new(int8_tArray a, int8_tArray b) {
@@ -8893,9 +9069,9 @@ uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_PaymentHashPaymentSe
        LDKThirtyTwoBytes b_ref;
        CHECK(*((uint32_t*)b) == 32);
        memcpy(b_ref.data, (uint8_t*)(b + 4), 32);
-       LDKC2Tuple_PaymentHashPaymentSecretZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
-       *ret_ref = C2Tuple_PaymentHashPaymentSecretZ_new(a_ref, b_ref);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_PaymentHashPaymentSecretZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
+       *ret_conv = C2Tuple_PaymentHashPaymentSecretZ_new(a_ref, b_ref);
+       return ((uint64_t)ret_conv);
 }
 
 void  __attribute__((visibility("default"))) TS_C2Tuple_PaymentHashPaymentSecretZ_free(uint32_t _res) {
@@ -8962,9 +9138,9 @@ uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelMana
        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 (uint64_t)ret_ref;
+       LDKC2Tuple_BlockHashChannelManagerZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelManagerZ), "LDKC2Tuple_BlockHashChannelManagerZ");
+       *ret_conv = C2Tuple_BlockHashChannelManagerZ_new(a_ref, b_conv);
+       return ((uint64_t)ret_conv);
 }
 
 void  __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelManagerZ_free(uint32_t _res) {
@@ -9218,9 +9394,9 @@ uint32_t  __attribute__((visibility("default"))) TS_CResult_SignedRawInvoiceNone
 
 uint32_t  __attribute__((visibility("default"))) TS_C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(uint32_t orig) {
        LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* orig_conv = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(orig & ~1);
-       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
-       *ret_ref = C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(orig_conv);
-       return (uint64_t)ret_ref;
+       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
+       *ret_conv = C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(orig_conv);
+       return ((uint64_t)ret_conv);
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(uint32_t a, int8_tArray b, uint32_t c) {
@@ -9235,9 +9411,9 @@ uint32_t  __attribute__((visibility("default"))) TS_C3Tuple_RawInvoice_u832Invoi
        c_conv.inner = (void*)(c & (~1));
        c_conv.is_owned = (c & 1) || (c == 0);
        c_conv = InvoiceSignature_clone(&c_conv);
-       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
-       *ret_ref = C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(a_conv, b_ref, c_conv);
-       return (uint64_t)ret_ref;
+       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
+       *ret_conv = C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(a_conv, b_ref, c_conv);
+       return ((uint64_t)ret_conv);
 }
 
 void  __attribute__((visibility("default"))) TS_C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(uint32_t _res) {
@@ -9599,9 +9775,9 @@ uint32_t  __attribute__((visibility("default"))) TS_CResult_NoneMonitorUpdateErr
 
 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 (uint64_t)ret_ref;
+       LDKC2Tuple_OutPointScriptZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
+       *ret_conv = C2Tuple_OutPointScriptZ_clone(orig_conv);
+       return ((uint64_t)ret_conv);
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_OutPointScriptZ_new(uint32_t a, int8_tArray b) {
@@ -9613,9 +9789,9 @@ uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_OutPointScriptZ_new(
        b_ref.datalen = *((uint32_t*)b);
        b_ref.data = MALLOC(b_ref.datalen, "LDKCVec_u8Z Bytes");
        memcpy(b_ref.data, (uint8_t*)(b + 4), b_ref.datalen);
-       LDKC2Tuple_OutPointScriptZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
-       *ret_ref = C2Tuple_OutPointScriptZ_new(a_conv, b_ref);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_OutPointScriptZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
+       *ret_conv = C2Tuple_OutPointScriptZ_new(a_conv, b_ref);
+       return ((uint64_t)ret_conv);
 }
 
 void  __attribute__((visibility("default"))) TS_C2Tuple_OutPointScriptZ_free(uint32_t _res) {
@@ -9627,9 +9803,9 @@ void  __attribute__((visibility("default"))) TS_C2Tuple_OutPointScriptZ_free(uin
 
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_u32ScriptZ_clone(uint32_t orig) {
        LDKC2Tuple_u32ScriptZ* orig_conv = (LDKC2Tuple_u32ScriptZ*)(orig & ~1);
-       LDKC2Tuple_u32ScriptZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
-       *ret_ref = C2Tuple_u32ScriptZ_clone(orig_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_u32ScriptZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
+       *ret_conv = C2Tuple_u32ScriptZ_clone(orig_conv);
+       return ((uint64_t)ret_conv);
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_u32ScriptZ_new(int32_t a, int8_tArray b) {
@@ -9637,9 +9813,9 @@ uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_u32ScriptZ_new(int32
        b_ref.datalen = *((uint32_t*)b);
        b_ref.data = MALLOC(b_ref.datalen, "LDKCVec_u8Z Bytes");
        memcpy(b_ref.data, (uint8_t*)(b + 4), b_ref.datalen);
-       LDKC2Tuple_u32ScriptZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
-       *ret_ref = C2Tuple_u32ScriptZ_new(a, b_ref);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_u32ScriptZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
+       *ret_conv = C2Tuple_u32ScriptZ_new(a, b_ref);
+       return ((uint64_t)ret_conv);
 }
 
 void  __attribute__((visibility("default"))) TS_C2Tuple_u32ScriptZ_free(uint32_t _res) {
@@ -9657,20 +9833,20 @@ void  __attribute__((visibility("default"))) TS_CVec_C2Tuple_u32ScriptZZ_free(ui
        else
                _res_constr.data = NULL;
        uint32_t* _res_vals = (uint32_t*)(_res + 4);
-       for (size_t e = 0; e < _res_constr.datalen; e++) {
-               uint32_t _res_conv_30 = _res_vals[e];
-               LDKC2Tuple_u32ScriptZ _res_conv_30_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)_res_conv_30) & ~1);
-               FREE((void*)_res_conv_30);
-               _res_constr.data[e] = _res_conv_30_conv;
+       for (size_t v = 0; v < _res_constr.datalen; v++) {
+               uint32_t _res_conv_21 = _res_vals[v];
+               LDKC2Tuple_u32ScriptZ _res_conv_21_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)_res_conv_21) & ~1);
+               FREE((void*)_res_conv_21);
+               _res_constr.data[v] = _res_conv_21_conv;
        }
        CVec_C2Tuple_u32ScriptZZ_free(_res_constr);
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(uint32_t orig) {
        LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* orig_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(orig & ~1);
-       LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
-       *ret_ref = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(orig_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
+       *ret_conv = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(orig_conv);
+       return ((uint64_t)ret_conv);
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(int8_tArray a, uint32_tArray b) {
@@ -9684,15 +9860,15 @@ uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32
        else
                b_constr.data = NULL;
        uint32_t* b_vals = (uint32_t*)(b + 4);
-       for (size_t e = 0; e < b_constr.datalen; e++) {
-               uint32_t b_conv_30 = b_vals[e];
-               LDKC2Tuple_u32ScriptZ b_conv_30_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_30) & ~1);
-               b_conv_30_conv = C2Tuple_u32ScriptZ_clone((LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_30) & ~1));
-               b_constr.data[e] = b_conv_30_conv;
-       }
-       LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
-       *ret_ref = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a_ref, b_constr);
-       return (uint64_t)ret_ref;
+       for (size_t v = 0; v < b_constr.datalen; v++) {
+               uint32_t b_conv_21 = b_vals[v];
+               LDKC2Tuple_u32ScriptZ b_conv_21_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_21) & ~1);
+               b_conv_21_conv = C2Tuple_u32ScriptZ_clone((LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_21) & ~1));
+               b_constr.data[v] = b_conv_21_conv;
+       }
+       LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
+       *ret_conv = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a_ref, b_constr);
+       return ((uint64_t)ret_conv);
 }
 
 void  __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(uint32_t _res) {
@@ -9710,11 +9886,11 @@ void  __attribute__((visibility("default"))) TS_CVec_C2Tuple_TxidCVec_C2Tuple_u3
        else
                _res_constr.data = NULL;
        uint32_t* _res_vals = (uint32_t*)(_res + 4);
-       for (size_t c = 0; c < _res_constr.datalen; c++) {
-               uint32_t _res_conv_54 = _res_vals[c];
-               LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res_conv_54_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(((uint64_t)_res_conv_54) & ~1);
-               FREE((void*)_res_conv_54);
-               _res_constr.data[c] = _res_conv_54_conv;
+       for (size_t o = 0; o < _res_constr.datalen; o++) {
+               uint32_t _res_conv_40 = _res_vals[o];
+               LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res_conv_40_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(((uint64_t)_res_conv_40) & ~1);
+               FREE((void*)_res_conv_40);
+               _res_constr.data[o] = _res_conv_40_conv;
        }
        CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res_constr);
 }
@@ -9758,17 +9934,17 @@ void  __attribute__((visibility("default"))) TS_CVec_TransactionZ_free(ptrArray
 
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_u32TxOutZ_clone(uint32_t orig) {
        LDKC2Tuple_u32TxOutZ* orig_conv = (LDKC2Tuple_u32TxOutZ*)(orig & ~1);
-       LDKC2Tuple_u32TxOutZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
-       *ret_ref = C2Tuple_u32TxOutZ_clone(orig_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_u32TxOutZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
+       *ret_conv = C2Tuple_u32TxOutZ_clone(orig_conv);
+       return ((uint64_t)ret_conv);
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_u32TxOutZ_new(int32_t a, uint32_t b) {
        LDKTxOut b_conv = *(LDKTxOut*)(((uint64_t)b) & ~1);
        b_conv = TxOut_clone((LDKTxOut*)(((uint64_t)b) & ~1));
-       LDKC2Tuple_u32TxOutZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
-       *ret_ref = C2Tuple_u32TxOutZ_new(a, b_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_u32TxOutZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
+       *ret_conv = C2Tuple_u32TxOutZ_new(a, b_conv);
+       return ((uint64_t)ret_conv);
 }
 
 void  __attribute__((visibility("default"))) TS_C2Tuple_u32TxOutZ_free(uint32_t _res) {
@@ -9786,20 +9962,20 @@ void  __attribute__((visibility("default"))) TS_CVec_C2Tuple_u32TxOutZZ_free(uin
        else
                _res_constr.data = NULL;
        uint32_t* _res_vals = (uint32_t*)(_res + 4);
-       for (size_t z = 0; z < _res_constr.datalen; z++) {
-               uint32_t _res_conv_25 = _res_vals[z];
-               LDKC2Tuple_u32TxOutZ _res_conv_25_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)_res_conv_25) & ~1);
-               FREE((void*)_res_conv_25);
-               _res_constr.data[z] = _res_conv_25_conv;
+       for (size_t u = 0; u < _res_constr.datalen; u++) {
+               uint32_t _res_conv_20 = _res_vals[u];
+               LDKC2Tuple_u32TxOutZ _res_conv_20_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)_res_conv_20) & ~1);
+               FREE((void*)_res_conv_20);
+               _res_constr.data[u] = _res_conv_20_conv;
        }
        CVec_C2Tuple_u32TxOutZZ_free(_res_constr);
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(uint32_t orig) {
        LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* orig_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(orig & ~1);
-       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
-       *ret_ref = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+       *ret_conv = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig_conv);
+       return ((uint64_t)ret_conv);
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(int8_tArray a, uint32_tArray b) {
@@ -9813,15 +9989,15 @@ uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32
        else
                b_constr.data = NULL;
        uint32_t* b_vals = (uint32_t*)(b + 4);
-       for (size_t z = 0; z < b_constr.datalen; z++) {
-               uint32_t b_conv_25 = b_vals[z];
-               LDKC2Tuple_u32TxOutZ b_conv_25_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_25) & ~1);
-               b_conv_25_conv = C2Tuple_u32TxOutZ_clone((LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_25) & ~1));
-               b_constr.data[z] = b_conv_25_conv;
-       }
-       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
-       *ret_ref = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a_ref, b_constr);
-       return (uint64_t)ret_ref;
+       for (size_t u = 0; u < b_constr.datalen; u++) {
+               uint32_t b_conv_20 = b_vals[u];
+               LDKC2Tuple_u32TxOutZ b_conv_20_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_20) & ~1);
+               b_conv_20_conv = C2Tuple_u32TxOutZ_clone((LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_20) & ~1));
+               b_constr.data[u] = b_conv_20_conv;
+       }
+       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+       *ret_conv = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a_ref, b_constr);
+       return ((uint64_t)ret_conv);
 }
 
 void  __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(uint32_t _res) {
@@ -9839,11 +10015,11 @@ void  __attribute__((visibility("default"))) TS_CVec_C2Tuple_TxidCVec_C2Tuple_u3
        else
                _res_constr.data = NULL;
        uint32_t* _res_vals = (uint32_t*)(_res + 4);
-       for (size_t x = 0; x < _res_constr.datalen; x++) {
-               uint32_t _res_conv_49 = _res_vals[x];
-               LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res_conv_49_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(((uint64_t)_res_conv_49) & ~1);
-               FREE((void*)_res_conv_49);
-               _res_constr.data[x] = _res_conv_49_conv;
+       for (size_t n = 0; n < _res_constr.datalen; n++) {
+               uint32_t _res_conv_39 = _res_vals[n];
+               LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res_conv_39_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(((uint64_t)_res_conv_39) & ~1);
+               FREE((void*)_res_conv_39);
+               _res_constr.data[n] = _res_conv_39_conv;
        }
        CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res_constr);
 }
@@ -9867,7 +10043,7 @@ void  __attribute__((visibility("default"))) TS_CVec_BalanceZ_free(uint32_tArray
 
 uint32_t  __attribute__((visibility("default"))) TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(uint32_t o) {
        LDKC2Tuple_BlockHashChannelMonitorZ o_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o) & ~1);
-       // Warning: we may need a move here but no clone is available for LDKC2Tuple_BlockHashChannelMonitorZ
+       o_conv = C2Tuple_BlockHashChannelMonitorZ_clone((LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o) & ~1));
        LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ");
        *ret_conv = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o_conv);
        return (uint64_t)ret_conv;
@@ -9890,6 +10066,13 @@ void  __attribute__((visibility("default"))) TS_CResult_C2Tuple_BlockHashChannel
        CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res_conv);
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* orig_conv = (LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)(orig & ~1);
+       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ");
+       *ret_conv = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(orig_conv);
+       return (uint64_t)ret_conv;
+}
+
 uint32_t  __attribute__((visibility("default"))) TS_CResult_NoneLightningErrorZ_ok() {
        LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
        *ret_conv = CResult_NoneLightningErrorZ_ok();
@@ -9922,9 +10105,9 @@ uint32_t  __attribute__((visibility("default"))) TS_CResult_NoneLightningErrorZ_
 
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_PublicKeyTypeZ_clone(uint32_t orig) {
        LDKC2Tuple_PublicKeyTypeZ* orig_conv = (LDKC2Tuple_PublicKeyTypeZ*)(orig & ~1);
-       LDKC2Tuple_PublicKeyTypeZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
-       *ret_ref = C2Tuple_PublicKeyTypeZ_clone(orig_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_PublicKeyTypeZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
+       *ret_conv = C2Tuple_PublicKeyTypeZ_clone(orig_conv);
+       return ((uint64_t)ret_conv);
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_PublicKeyTypeZ_new(int8_tArray a, uint32_t b) {
@@ -9932,9 +10115,9 @@ uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_PublicKeyTypeZ_new(i
        CHECK(*((uint32_t*)a) == 33);
        memcpy(a_ref.compressed_form, (uint8_t*)(a + 4), 33);
        LDKType b_conv = *(LDKType*)(((uint64_t)b) & ~1);
-       LDKC2Tuple_PublicKeyTypeZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
-       *ret_ref = C2Tuple_PublicKeyTypeZ_new(a_ref, b_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_PublicKeyTypeZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
+       *ret_conv = C2Tuple_PublicKeyTypeZ_new(a_ref, b_conv);
+       return ((uint64_t)ret_conv);
 }
 
 void  __attribute__((visibility("default"))) TS_C2Tuple_PublicKeyTypeZ_free(uint32_t _res) {
@@ -9952,11 +10135,11 @@ void  __attribute__((visibility("default"))) TS_CVec_C2Tuple_PublicKeyTypeZZ_fre
        else
                _res_constr.data = NULL;
        uint32_t* _res_vals = (uint32_t*)(_res + 4);
-       for (size_t c = 0; c < _res_constr.datalen; c++) {
-               uint32_t _res_conv_28 = _res_vals[c];
-               LDKC2Tuple_PublicKeyTypeZ _res_conv_28_conv = *(LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)_res_conv_28) & ~1);
-               FREE((void*)_res_conv_28);
-               _res_constr.data[c] = _res_conv_28_conv;
+       for (size_t z = 0; z < _res_constr.datalen; z++) {
+               uint32_t _res_conv_25 = _res_vals[z];
+               LDKC2Tuple_PublicKeyTypeZ _res_conv_25_conv = *(LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)_res_conv_25) & ~1);
+               FREE((void*)_res_conv_25);
+               _res_constr.data[z] = _res_conv_25_conv;
        }
        CVec_C2Tuple_PublicKeyTypeZZ_free(_res_constr);
 }
@@ -9993,9 +10176,9 @@ uint32_t  __attribute__((visibility("default"))) TS_CResult_boolLightningErrorZ_
 
 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 (uint64_t)ret_ref;
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
+       *ret_conv = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig_conv);
+       return ((uint64_t)ret_conv);
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(uint32_t a, uint32_t b, uint32_t c) {
@@ -10011,9 +10194,9 @@ uint32_t  __attribute__((visibility("default"))) TS_C3Tuple_ChannelAnnouncementC
        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 (uint64_t)ret_ref;
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
+       *ret_conv = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a_conv, b_conv, c_conv);
+       return ((uint64_t)ret_conv);
 }
 
 void  __attribute__((visibility("default"))) TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(uint32_t _res) {
@@ -10031,11 +10214,11 @@ void  __attribute__((visibility("default"))) TS_CVec_C3Tuple_ChannelAnnouncement
        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 _res_conv_63 = _res_vals[l];
-               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res_conv_63_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)_res_conv_63) & ~1);
-               FREE((void*)_res_conv_63);
-               _res_constr.data[l] = _res_conv_63_conv;
+       for (size_t h = 0; h < _res_constr.datalen; h++) {
+               uint32_t _res_conv_59 = _res_vals[h];
+               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res_conv_59_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)_res_conv_59) & ~1);
+               FREE((void*)_res_conv_59);
+               _res_constr.data[h] = _res_conv_59_conv;
        }
        CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res_constr);
 }
@@ -10381,7 +10564,7 @@ uint32_t  __attribute__((visibility("default"))) TS_CResult_NetworkGraphDecodeEr
        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
+       o_conv = NetworkGraph_clone(&o_conv);
        LDKCResult_NetworkGraphDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetworkGraphDecodeErrorZ), "LDKCResult_NetworkGraphDecodeErrorZ");
        *ret_conv = CResult_NetworkGraphDecodeErrorZ_ok(o_conv);
        return (uint64_t)ret_conv;
@@ -10404,6 +10587,13 @@ void  __attribute__((visibility("default"))) TS_CResult_NetworkGraphDecodeErrorZ
        CResult_NetworkGraphDecodeErrorZ_free(_res_conv);
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NetworkGraphDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_NetworkGraphDecodeErrorZ* orig_conv = (LDKCResult_NetworkGraphDecodeErrorZ*)(orig & ~1);
+       LDKCResult_NetworkGraphDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetworkGraphDecodeErrorZ), "LDKCResult_NetworkGraphDecodeErrorZ");
+       *ret_conv = CResult_NetworkGraphDecodeErrorZ_clone(orig_conv);
+       return (uint64_t)ret_conv;
+}
+
 uint32_t  __attribute__((visibility("default"))) TS_CResult_NetAddressu8Z_ok(uint32_t o) {
        LDKNetAddress o_conv = *(LDKNetAddress*)(((uint64_t)o) & ~1);
        o_conv = NetAddress_clone((LDKNetAddress*)(((uint64_t)o) & ~1));
@@ -13621,9 +13811,9 @@ uint32_t  __attribute__((visibility("default"))) TS_ChannelMonitor_get_funding_t
        LDKChannelMonitor this_arg_conv;
        this_arg_conv.inner = (void*)(this_arg & (~1));
        this_arg_conv.is_owned = false;
-       LDKC2Tuple_OutPointScriptZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
-       *ret_ref = ChannelMonitor_get_funding_txo(&this_arg_conv);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_OutPointScriptZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
+       *ret_conv = ChannelMonitor_get_funding_txo(&this_arg_conv);
+       return ((uint64_t)ret_conv);
 }
 
 uint32_tArray  __attribute__((visibility("default"))) TS_ChannelMonitor_get_outputs_to_watch(uint32_t this_arg) {
@@ -13633,10 +13823,10 @@ uint32_tArray  __attribute__((visibility("default"))) TS_ChannelMonitor_get_outp
        LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ ret_var = ChannelMonitor_get_outputs_to_watch(&this_arg_conv);
        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 c = 0; c < ret_var.datalen; c++) {
-               LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_conv_54_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
-               *ret_conv_54_ref = ret_var.data[c];
-               ret_arr_ptr[c] = (uint64_t)ret_conv_54_ref;
+       for (size_t o = 0; o < ret_var.datalen; o++) {
+               LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_conv_40_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
+               *ret_conv_40_conv = ret_var.data[o];
+               ret_arr_ptr[o] = ((uint64_t)ret_conv_40_conv);
        }
        FREE(ret_var.data);
        return ret_arr;
@@ -13718,11 +13908,11 @@ uint32_tArray  __attribute__((visibility("default"))) TS_ChannelMonitor_block_co
        else
                txdata_constr.data = NULL;
        uint32_t* txdata_vals = (uint32_t*)(txdata + 4);
-       for (size_t e = 0; e < txdata_constr.datalen; e++) {
-               uint32_t txdata_conv_30 = txdata_vals[e];
-               LDKC2Tuple_usizeTransactionZ txdata_conv_30_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_30) & ~1);
-               txdata_conv_30_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_30) & ~1));
-               txdata_constr.data[e] = txdata_conv_30_conv;
+       for (size_t c = 0; c < txdata_constr.datalen; c++) {
+               uint32_t txdata_conv_28 = txdata_vals[c];
+               LDKC2Tuple_usizeTransactionZ txdata_conv_28_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1);
+               txdata_conv_28_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1));
+               txdata_constr.data[c] = txdata_conv_28_conv;
        }
        LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(((uint64_t)broadcaster) & ~1);
        LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)(((uint64_t)fee_estimator) & ~1);
@@ -13730,10 +13920,10 @@ uint32_tArray  __attribute__((visibility("default"))) TS_ChannelMonitor_block_co
        LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ret_var = ChannelMonitor_block_connected(&this_arg_conv, header_ref, txdata_constr, height, broadcaster_conv, fee_estimator_conv, logger_conv);
        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 x = 0; x < ret_var.datalen; x++) {
-               LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_49_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
-               *ret_conv_49_ref = ret_var.data[x];
-               ret_arr_ptr[x] = (uint64_t)ret_conv_49_ref;
+       for (size_t n = 0; n < ret_var.datalen; n++) {
+               LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_39_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+               *ret_conv_39_conv = ret_var.data[n];
+               ret_arr_ptr[n] = ((uint64_t)ret_conv_39_conv);
        }
        FREE(ret_var.data);
        return ret_arr;
@@ -13768,11 +13958,11 @@ uint32_tArray  __attribute__((visibility("default"))) TS_ChannelMonitor_transact
        else
                txdata_constr.data = NULL;
        uint32_t* txdata_vals = (uint32_t*)(txdata + 4);
-       for (size_t e = 0; e < txdata_constr.datalen; e++) {
-               uint32_t txdata_conv_30 = txdata_vals[e];
-               LDKC2Tuple_usizeTransactionZ txdata_conv_30_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_30) & ~1);
-               txdata_conv_30_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_30) & ~1));
-               txdata_constr.data[e] = txdata_conv_30_conv;
+       for (size_t c = 0; c < txdata_constr.datalen; c++) {
+               uint32_t txdata_conv_28 = txdata_vals[c];
+               LDKC2Tuple_usizeTransactionZ txdata_conv_28_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1);
+               txdata_conv_28_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1));
+               txdata_constr.data[c] = txdata_conv_28_conv;
        }
        LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(((uint64_t)broadcaster) & ~1);
        LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)(((uint64_t)fee_estimator) & ~1);
@@ -13780,10 +13970,10 @@ uint32_tArray  __attribute__((visibility("default"))) TS_ChannelMonitor_transact
        LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ret_var = ChannelMonitor_transactions_confirmed(&this_arg_conv, header_ref, txdata_constr, height, broadcaster_conv, fee_estimator_conv, logger_conv);
        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 x = 0; x < ret_var.datalen; x++) {
-               LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_49_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
-               *ret_conv_49_ref = ret_var.data[x];
-               ret_arr_ptr[x] = (uint64_t)ret_conv_49_ref;
+       for (size_t n = 0; n < ret_var.datalen; n++) {
+               LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_39_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+               *ret_conv_39_conv = ret_var.data[n];
+               ret_arr_ptr[n] = ((uint64_t)ret_conv_39_conv);
        }
        FREE(ret_var.data);
        return ret_arr;
@@ -13817,10 +14007,10 @@ uint32_tArray  __attribute__((visibility("default"))) TS_ChannelMonitor_best_blo
        LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ret_var = ChannelMonitor_best_block_updated(&this_arg_conv, header_ref, height, broadcaster_conv, fee_estimator_conv, logger_conv);
        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 x = 0; x < ret_var.datalen; x++) {
-               LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_49_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
-               *ret_conv_49_ref = ret_var.data[x];
-               ret_arr_ptr[x] = (uint64_t)ret_conv_49_ref;
+       for (size_t n = 0; n < ret_var.datalen; n++) {
+               LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_39_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+               *ret_conv_39_conv = ret_var.data[n];
+               ret_arr_ptr[n] = ((uint64_t)ret_conv_39_conv);
        }
        FREE(ret_var.data);
        return ret_arr;
@@ -15781,9 +15971,9 @@ uint32_t  __attribute__((visibility("default"))) TS_ChannelManager_create_inboun
        this_arg_conv.is_owned = false;
        LDKCOption_u64Z min_value_msat_conv = *(LDKCOption_u64Z*)(((uint64_t)min_value_msat) & ~1);
        min_value_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)(((uint64_t)min_value_msat) & ~1));
-       LDKC2Tuple_PaymentHashPaymentSecretZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
-       *ret_ref = ChannelManager_create_inbound_payment(&this_arg_conv, min_value_msat_conv, invoice_expiry_delta_secs, user_payment_id);
-       return (uint64_t)ret_ref;
+       LDKC2Tuple_PaymentHashPaymentSecretZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
+       *ret_conv = ChannelManager_create_inbound_payment(&this_arg_conv, min_value_msat_conv, invoice_expiry_delta_secs, user_payment_id);
+       return ((uint64_t)ret_conv);
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_ChannelManager_create_inbound_payment_for_hash(uint32_t this_arg, int8_tArray payment_hash, uint32_t min_value_msat, int32_t invoice_expiry_delta_secs, int64_t user_payment_id) {
@@ -23827,6 +24017,20 @@ void  __attribute__((visibility("default"))) TS_NetworkGraph_free(uint32_t this_
        NetworkGraph_free(this_obj_conv);
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_NetworkGraph_clone(uint32_t orig) {
+       LDKNetworkGraph orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKNetworkGraph ret_var = NetworkGraph_clone(&orig_conv);
+       CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       uint64_t ret_ref = (uint64_t)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 void  __attribute__((visibility("default"))) TS_ReadOnlyNetworkGraph_free(uint32_t this_obj) {
        LDKReadOnlyNetworkGraph this_obj_conv;
        this_obj_conv.inner = (void*)(this_obj & (~1));
@@ -23923,7 +24127,7 @@ void  __attribute__((visibility("default"))) TS_NetGraphMsgHandler_set_network_g
        LDKNetworkGraph 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 LDKNetworkGraph
+       val_conv = NetworkGraph_clone(&val_conv);
        NetGraphMsgHandler_set_network_graph(&this_ptr_conv, val_conv);
 }
 
@@ -23931,7 +24135,7 @@ uint32_t  __attribute__((visibility("default"))) TS_NetGraphMsgHandler_new(uint3
        LDKNetworkGraph network_graph_conv;
        network_graph_conv.inner = (void*)(network_graph & (~1));
        network_graph_conv.is_owned = (network_graph & 1) || (network_graph == 0);
-       // Warning: we need a move here but no clone is available for LDKNetworkGraph
+       network_graph_conv = NetworkGraph_clone(&network_graph_conv);
        LDKCOption_AccessZ chain_access_conv = *(LDKCOption_AccessZ*)(((uint64_t)chain_access) & ~1);
        // Warning: we may need a move here but no clone is available for LDKCOption_AccessZ
        if (chain_access_conv.tag == LDKCOption_AccessZ_Some) {
@@ -25742,9 +25946,9 @@ uint32_t  __attribute__((visibility("default"))) TS_SignedRawInvoice_into_parts(
        this_arg_conv.inner = (void*)(this_arg & (~1));
        this_arg_conv.is_owned = (this_arg & 1) || (this_arg == 0);
        this_arg_conv = SignedRawInvoice_clone(&this_arg_conv);
-       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
-       *ret_ref = SignedRawInvoice_into_parts(this_arg_conv);
-       return (uint64_t)ret_ref;
+       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
+       *ret_conv = SignedRawInvoice_into_parts(this_arg_conv);
+       return ((uint64_t)ret_conv);
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_SignedRawInvoice_raw_invoice(uint32_t this_arg) {
index c13ea9f6a0ad08889b931379de3aad349b2d0ecb..e10bcd84a8ca02e6fbb6d0a781ca5862cc220b37 100644 (file)
@@ -261,8 +261,22 @@ public static native long new_empty_slice_vec();
        public static native number LDKCResult_TxOutAccessErrorZ_get_ok(long arg);
        public static native AccessError LDKCResult_TxOutAccessErrorZ_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);
+       // uintptr_t C2Tuple_usizeTransactionZ_get_a(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR tuple);
+       export function C2Tuple_usizeTransactionZ_get_a(tuple: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_get_a(tuple);
+               return nativeResponseValue;
+       }
+       // struct LDKTransaction C2Tuple_usizeTransactionZ_get_b(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR tuple);
+       export function C2Tuple_usizeTransactionZ_get_b(tuple: number): Uint8Array {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_get_b(tuple);
+               return decodeArray(nativeResponseValue);
+       }
        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);
@@ -494,8 +508,22 @@ public static native long new_empty_slice_vec();
        public static native void LDKCResult_NoneNoneZ_get_ok(long arg);
        public static native void LDKCResult_NoneNoneZ_get_err(long arg);
        public static native long LDKC2Tuple_SignatureCVec_SignatureZZ_new(Uint8Array a, Uint8Array[] b);
-       public static native Uint8Array LDKC2Tuple_SignatureCVec_SignatureZZ_get_a(long ptr);
-       public static native Uint8Array[] LDKC2Tuple_SignatureCVec_SignatureZZ_get_b(long ptr);
+       // struct LDKSignature C2Tuple_SignatureCVec_SignatureZZ_get_a(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR tuple);
+       export function C2Tuple_SignatureCVec_SignatureZZ_get_a(tuple: number): Uint8Array {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_get_a(tuple);
+               return decodeArray(nativeResponseValue);
+       }
+       // struct LDKCVec_SignatureZ C2Tuple_SignatureCVec_SignatureZZ_get_b(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR tuple);
+       export function C2Tuple_SignatureCVec_SignatureZZ_get_b(tuple: number): Uint8Array[] {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_get_b(tuple);
+               return nativeResponseValue;
+       }
        public static native boolean LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_result_ok(long arg);
        public static native number LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(long arg);
        public static native void LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(long arg);
@@ -683,8 +711,22 @@ public static native long new_empty_slice_vec();
        public static native Uint8Array LDKCResult_TransactionNoneZ_get_ok(long arg);
        public static native void LDKCResult_TransactionNoneZ_get_err(long arg);
        public static native long LDKC2Tuple_BlockHashChannelMonitorZ_new(Uint8Array a, number b);
-       public static native Uint8Array LDKC2Tuple_BlockHashChannelMonitorZ_get_a(long ptr);
-       public static native number LDKC2Tuple_BlockHashChannelMonitorZ_get_b(long ptr);
+       // struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelMonitorZ_get_a(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR tuple);
+       export function C2Tuple_BlockHashChannelMonitorZ_get_a(tuple: number): Uint8Array {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_get_a(tuple);
+               return decodeArray(nativeResponseValue);
+       }
+       // struct LDKChannelMonitor C2Tuple_BlockHashChannelMonitorZ_get_b(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR tuple);
+       export function C2Tuple_BlockHashChannelMonitorZ_get_b(tuple: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_get_b(tuple);
+               return nativeResponseValue;
+       }
        public static native long LDKCVec_C2Tuple_BlockHashChannelMonitorZZ_new(number[] elems);
        public static native boolean LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_result_ok(long arg);
        public static native number[] LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_ok(long arg);
@@ -795,8 +837,22 @@ public static native long new_empty_slice_vec();
        public static native LDKNetAddress LDKNetAddress_ref_from_ptr(long ptr);
        public static native long LDKCVec_NetAddressZ_new(number[] elems);
        public static native long LDKC2Tuple_PaymentHashPaymentSecretZ_new(Uint8Array a, Uint8Array b);
-       public static native Uint8Array LDKC2Tuple_PaymentHashPaymentSecretZ_get_a(long ptr);
-       public static native Uint8Array LDKC2Tuple_PaymentHashPaymentSecretZ_get_b(long ptr);
+       // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_a(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR tuple);
+       export function C2Tuple_PaymentHashPaymentSecretZ_get_a(tuple: number): Uint8Array {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_get_a(tuple);
+               return decodeArray(nativeResponseValue);
+       }
+       // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_b(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR tuple);
+       export function C2Tuple_PaymentHashPaymentSecretZ_get_b(tuple: number): Uint8Array {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_get_b(tuple);
+               return decodeArray(nativeResponseValue);
+       }
        public static native boolean LDKCResult_PaymentSecretAPIErrorZ_result_ok(long arg);
        public static native Uint8Array LDKCResult_PaymentSecretAPIErrorZ_get_ok(long arg);
        public static native number LDKCResult_PaymentSecretAPIErrorZ_get_err(long arg);
@@ -986,8 +1042,22 @@ public static native long new_empty_slice_vec();
 
 
        public static native long LDKC2Tuple_BlockHashChannelManagerZ_new(Uint8Array a, number b);
-       public static native Uint8Array LDKC2Tuple_BlockHashChannelManagerZ_get_a(long ptr);
-       public static native number LDKC2Tuple_BlockHashChannelManagerZ_get_b(long ptr);
+       // struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelManagerZ_get_a(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR tuple);
+       export function C2Tuple_BlockHashChannelManagerZ_get_a(tuple: number): Uint8Array {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_get_a(tuple);
+               return decodeArray(nativeResponseValue);
+       }
+       // struct LDKChannelManager *C2Tuple_BlockHashChannelManagerZ_get_b(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR tuple);
+       export function C2Tuple_BlockHashChannelManagerZ_get_b(tuple: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_get_b(tuple);
+               return nativeResponseValue;
+       }
        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);
@@ -1065,9 +1135,30 @@ public static native long new_empty_slice_vec();
        public static native number LDKCResult_SignedRawInvoiceNoneZ_get_ok(long arg);
        public static native void LDKCResult_SignedRawInvoiceNoneZ_get_err(long arg);
        public static native long LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_new(number a, Uint8Array b, number c);
-       public static native number LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(long ptr);
-       public static native Uint8Array LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(long ptr);
-       public static native number LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(long ptr);
+       // struct LDKRawInvoice C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple);
+       export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(tuple: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(tuple);
+               return nativeResponseValue;
+       }
+       // struct LDKThirtyTwoBytes C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple);
+       export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(tuple: number): Uint8Array {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(tuple);
+               return decodeArray(nativeResponseValue);
+       }
+       // struct LDKInvoiceSignature C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple);
+       export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(tuple: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(tuple);
+               return nativeResponseValue;
+       }
        public static native boolean LDKCResult_PayeePubKeyErrorZ_result_ok(long arg);
        public static native number LDKCResult_PayeePubKeyErrorZ_get_ok(long arg);
        public static native Secp256k1Error LDKCResult_PayeePubKeyErrorZ_get_err(long arg);
@@ -1103,15 +1194,57 @@ public static native long new_empty_slice_vec();
        public static native void LDKCResult_NoneMonitorUpdateErrorZ_get_ok(long arg);
        public static native number LDKCResult_NoneMonitorUpdateErrorZ_get_err(long arg);
        public static native long LDKC2Tuple_OutPointScriptZ_new(number a, Uint8Array b);
-       public static native number LDKC2Tuple_OutPointScriptZ_get_a(long ptr);
-       public static native Uint8Array LDKC2Tuple_OutPointScriptZ_get_b(long ptr);
+       // struct LDKOutPoint C2Tuple_OutPointScriptZ_get_a(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR tuple);
+       export function C2Tuple_OutPointScriptZ_get_a(tuple: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_get_a(tuple);
+               return nativeResponseValue;
+       }
+       // struct LDKCVec_u8Z C2Tuple_OutPointScriptZ_get_b(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR tuple);
+       export function C2Tuple_OutPointScriptZ_get_b(tuple: number): Uint8Array {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_get_b(tuple);
+               return decodeArray(nativeResponseValue);
+       }
        public static native long LDKC2Tuple_u32ScriptZ_new(number a, Uint8Array b);
-       public static native number LDKC2Tuple_u32ScriptZ_get_a(long ptr);
-       public static native Uint8Array LDKC2Tuple_u32ScriptZ_get_b(long ptr);
+       // uint32_t C2Tuple_u32ScriptZ_get_a(LDKC2Tuple_u32ScriptZ *NONNULL_PTR tuple);
+       export function C2Tuple_u32ScriptZ_get_a(tuple: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_get_a(tuple);
+               return nativeResponseValue;
+       }
+       // struct LDKCVec_u8Z C2Tuple_u32ScriptZ_get_b(LDKC2Tuple_u32ScriptZ *NONNULL_PTR tuple);
+       export function C2Tuple_u32ScriptZ_get_b(tuple: number): Uint8Array {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_get_b(tuple);
+               return decodeArray(nativeResponseValue);
+       }
        public static native long LDKCVec_C2Tuple_u32ScriptZZ_new(number[] elems);
        public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(Uint8Array a, number[] b);
-       public static native Uint8Array LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(long ptr);
-       public static native number[] LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(long ptr);
+       // struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR tuple);
+       export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(tuple: number): Uint8Array {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(tuple);
+               return decodeArray(nativeResponseValue);
+       }
+       // struct LDKCVec_C2Tuple_u32ScriptZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR tuple);
+       export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(tuple: number): number[] {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(tuple);
+               return nativeResponseValue;
+       }
        public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_new(number[] elems);
        public static class LDKPaymentPurpose {
                private LDKPaymentPurpose() {}
@@ -1209,12 +1342,40 @@ public static native long new_empty_slice_vec();
        public static native LDKEvent LDKEvent_ref_from_ptr(long ptr);
        public static native long LDKCVec_EventZ_new(number[] elems);
        public static native long LDKC2Tuple_u32TxOutZ_new(number a, number b);
-       public static native number LDKC2Tuple_u32TxOutZ_get_a(long ptr);
-       public static native number LDKC2Tuple_u32TxOutZ_get_b(long ptr);
+       // uint32_t C2Tuple_u32TxOutZ_get_a(LDKC2Tuple_u32TxOutZ *NONNULL_PTR tuple);
+       export function C2Tuple_u32TxOutZ_get_a(tuple: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_get_a(tuple);
+               return nativeResponseValue;
+       }
+       // struct LDKTxOut C2Tuple_u32TxOutZ_get_b(LDKC2Tuple_u32TxOutZ *NONNULL_PTR tuple);
+       export function C2Tuple_u32TxOutZ_get_b(tuple: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_get_b(tuple);
+               return nativeResponseValue;
+       }
        public static native long LDKCVec_C2Tuple_u32TxOutZZ_new(number[] elems);
        public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(Uint8Array a, number[] b);
-       public static native Uint8Array LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(long ptr);
-       public static native number[] LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(long ptr);
+       // struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR tuple);
+       export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(tuple: number): Uint8Array {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(tuple);
+               return decodeArray(nativeResponseValue);
+       }
+       // struct LDKCVec_C2Tuple_u32TxOutZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR tuple);
+       export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(tuple: number): number[] {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(tuple);
+               return nativeResponseValue;
+       }
        public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_new(number[] elems);
        public static class LDKBalance {
                private LDKBalance() {}
@@ -1249,16 +1410,51 @@ public static native long new_empty_slice_vec();
        public static native void LDKCResult_NoneLightningErrorZ_get_ok(long arg);
        public static native number LDKCResult_NoneLightningErrorZ_get_err(long arg);
        public static native long LDKC2Tuple_PublicKeyTypeZ_new(Uint8Array a, number b);
-       public static native Uint8Array LDKC2Tuple_PublicKeyTypeZ_get_a(long ptr);
-       public static native number LDKC2Tuple_PublicKeyTypeZ_get_b(long ptr);
+       // struct LDKPublicKey C2Tuple_PublicKeyTypeZ_get_a(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR tuple);
+       export function C2Tuple_PublicKeyTypeZ_get_a(tuple: number): Uint8Array {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_PublicKeyTypeZ_get_a(tuple);
+               return decodeArray(nativeResponseValue);
+       }
+       // struct LDKType C2Tuple_PublicKeyTypeZ_get_b(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR tuple);
+       export function C2Tuple_PublicKeyTypeZ_get_b(tuple: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_PublicKeyTypeZ_get_b(tuple);
+               return nativeResponseValue;
+       }
        public static native long LDKCVec_C2Tuple_PublicKeyTypeZZ_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);
+       // struct LDKChannelAnnouncement C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple);
+       export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(tuple: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(tuple);
+               return nativeResponseValue;
+       }
+       // struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple);
+       export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(tuple: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(tuple);
+               return nativeResponseValue;
+       }
+       // struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple);
+       export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(tuple: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(tuple);
+               return nativeResponseValue;
+       }
        public static native long LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new(number[] elems);
        public static native long LDKCVec_NodeAnnouncementZ_new(number[] elems);
        public static native boolean LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok(long arg);
@@ -3585,6 +3781,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.CResult_TransactionNoneZ_clone(orig);
                return nativeResponseValue;
        }
+       // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_clone(const struct LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR orig);
+       export function C2Tuple_BlockHashChannelMonitorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_clone(orig);
+               return nativeResponseValue;
+       }
        // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
        export function C2Tuple_BlockHashChannelMonitorZ_new(a: Uint8Array, b: number): number {
                if(!isWasmInitialized) {
@@ -3633,6 +3837,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(_res);
                // debug statements here
        }
+       // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(const struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ *NONNULL_PTR orig);
+       export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
        // struct LDKCOption_u16Z COption_u16Z_some(uint16_t o);
        export function COption_u16Z_some(o: number): number {
                if(!isWasmInitialized) {
@@ -4689,6 +4901,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res);
                // debug statements here
        }
+       // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(const struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
        // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void);
        export function CResult_NoneLightningErrorZ_ok(): number {
                if(!isWasmInitialized) {
@@ -5145,6 +5365,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_free(_res);
                // debug statements here
        }
+       // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_clone(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_NetworkGraphDecodeErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
        // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_ok(struct LDKNetAddress o);
        export function CResult_NetAddressu8Z_ok(o: number): number {
                if(!isWasmInitialized) {
@@ -15505,6 +15733,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.NetworkGraph_free(this_obj);
                // debug statements here
        }
+       // struct LDKNetworkGraph NetworkGraph_clone(const struct LDKNetworkGraph *NONNULL_PTR orig);
+       export function NetworkGraph_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.NetworkGraph_clone(orig);
+               return nativeResponseValue;
+       }
        // void ReadOnlyNetworkGraph_free(struct LDKReadOnlyNetworkGraph this_obj);
        export function ReadOnlyNetworkGraph_free(this_obj: number): void {
                if(!isWasmInitialized) {
index b8a04707ec36c44bbb24cfa8463a46d6c8a3c0c7..6aee86ada02dd00f2ef7ab62aaf609efe49326b7 100644 (file)
@@ -144,14 +144,11 @@ import * as bindings from '../bindings' // TODO: figure out location
                this.ptrs_to.add(funding_txo);
        }
 
-       public TwoTuple<Uint8Array, Uint8Array> create_inbound_payment(Option_u64Z min_value_msat, number invoice_expiry_delta_secs, number user_payment_id) {
+       public TwoTuple_PaymentHashPaymentSecretZ create_inbound_payment(Option_u64Z min_value_msat, number invoice_expiry_delta_secs, number user_payment_id) {
                number ret = bindings.ChannelManager_create_inbound_payment(this.ptr, min_value_msat.ptr, invoice_expiry_delta_secs, user_payment_id);
-               Uint8Array ret_a = bindings.LDKC2Tuple_PaymentHashPaymentSecretZ_get_a(ret);
-               Uint8Array ret_b = bindings.LDKC2Tuple_PaymentHashPaymentSecretZ_get_b(ret);
-               TwoTuple<Uint8Array, Uint8Array> ret_conv = new TwoTuple<Uint8Array, Uint8Array>(ret_a, ret_b, () -> {
-                       bindings.C2Tuple_PaymentHashPaymentSecretZ_free(ret);
-               });
-               return ret_conv;
+               TwoTuple_PaymentHashPaymentSecretZ ret_hu_conv = new TwoTuple_PaymentHashPaymentSecretZ(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
        }
 
        public Result_PaymentSecretAPIErrorZ create_inbound_payment_for_hash(Uint8Array payment_hash, Option_u64Z min_value_msat, number invoice_expiry_delta_secs, number user_payment_id) {
index 19dced0664de59f57cdfb9e3d9f17facf6e07f05..1ee3bcb6b86196a3e04e9917312b3d96431b503f 100644 (file)
@@ -45,41 +45,23 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret;
        }
 
-       public TwoTuple<OutPoint, Uint8Array> get_funding_txo() {
+       public TwoTuple_OutPointScriptZ get_funding_txo() {
                number ret = bindings.ChannelMonitor_get_funding_txo(this.ptr);
-               number ret_a = bindings.LDKC2Tuple_OutPointScriptZ_get_a(ret);
-               const ret_a_hu_conv: OutPoint = new OutPoint(null, ret_a);
-               ret_a_hu_conv.ptrs_to.add(this);;
-               Uint8Array ret_b = bindings.LDKC2Tuple_OutPointScriptZ_get_b(ret);
-               TwoTuple<OutPoint, Uint8Array> ret_conv = new TwoTuple<OutPoint, Uint8Array>(ret_a_hu_conv, ret_b, () -> {
-                       bindings.C2Tuple_OutPointScriptZ_free(ret);
-               });
-               ret_a_hu_conv.ptrs_to.add(ret_conv);
-               return ret_conv;
-       }
-
-       public TwoTuple<Uint8Array, TwoTuple<Number, Uint8Array>[]>[] get_outputs_to_watch() {
+               TwoTuple_OutPointScriptZ ret_hu_conv = new TwoTuple_OutPointScriptZ(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ[] get_outputs_to_watch() {
                number[] ret = bindings.ChannelMonitor_get_outputs_to_watch(this.ptr);
-               TwoTuple<Uint8Array, TwoTuple<Number, Uint8Array>[]>[] ret_conv_54_arr = new TwoTuple[ret.length];
-               for (int c = 0; c < ret.length; c++) {
-                       number ret_conv_54 = ret[c];
-                       Uint8Array ret_conv_54_a = bindings.LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(ret_conv_54);
-                       number[] ret_conv_54_b = bindings.LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(ret_conv_54);
-                       TwoTuple<Number, Uint8Array>[] ret_conv_54_b_conv_30_arr = new TwoTuple[ret_conv_54_b.length];
-                       for (int e = 0; e < ret_conv_54_b.length; e++) {
-                               number ret_conv_54_b_conv_30 = ret_conv_54_b[e];
-                               number ret_conv_54_b_conv_30_a = bindings.LDKC2Tuple_u32ScriptZ_get_a(ret_conv_54_b_conv_30);
-                               Uint8Array ret_conv_54_b_conv_30_b = bindings.LDKC2Tuple_u32ScriptZ_get_b(ret_conv_54_b_conv_30);
-                               TwoTuple<Number, Uint8Array> ret_conv_54_b_conv_30_conv = new TwoTuple<Number, Uint8Array>(ret_conv_54_b_conv_30_a, ret_conv_54_b_conv_30_b, () -> {
-                                       bindings.C2Tuple_u32ScriptZ_free(ret_conv_54_b_conv_30);
-                               });
-                               ret_conv_54_b_conv_30_arr[e] = ret_conv_54_b_conv_30_conv;
-                       };
-                       TwoTuple<Uint8Array, TwoTuple<Number, Uint8Array>[]> ret_conv_54_conv = new TwoTuple<Uint8Array, TwoTuple<Number, Uint8Array>[]>(ret_conv_54_a, ret_conv_54_b_conv_30_arr);
-                       // Warning: We may not free the C tuple object!
-                       ret_conv_54_arr[c] = ret_conv_54_conv;
+               TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ[] ret_conv_40_arr = new TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ[ret.length];
+               for (int o = 0; o < ret.length; o++) {
+                       number ret_conv_40 = ret[o];
+                       TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ ret_conv_40_hu_conv = new TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ(null, ret_conv_40);
+                       ret_conv_40_hu_conv.ptrs_to.add(this);
+                       ret_conv_40_arr[o] = ret_conv_40_hu_conv;
                }
-               return ret_conv_54_arr;
+               return ret_conv_40_arr;
        }
 
        public void load_outputs_to_watch(Filter filter) {
@@ -117,33 +99,19 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret;
        }
 
-       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, txdata != null ? Arrays.stream(txdata).map(txdata_conv_30 -> bindings.C2Tuple_usizeTransactionZ_new(txdata_conv_30.a, txdata_conv_30.b)).toArray(number[]::new) : null, height, broadcaster == null ? 0 : broadcaster.ptr, fee_estimator == null ? 0 : fee_estimator.ptr, logger == null ? 0 : logger.ptr);
-               TwoTuple<Uint8Array, TwoTuple<Number, TxOut>[]>[] ret_conv_49_arr = new TwoTuple[ret.length];
-               for (int x = 0; x < ret.length; x++) {
-                       number ret_conv_49 = ret[x];
-                       Uint8Array ret_conv_49_a = bindings.LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(ret_conv_49);
-                       number[] ret_conv_49_b = bindings.LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(ret_conv_49);
-                       TwoTuple<Number, TxOut>[] ret_conv_49_b_conv_25_arr = new TwoTuple[ret_conv_49_b.length];
-                       for (int z = 0; z < ret_conv_49_b.length; z++) {
-                               number ret_conv_49_b_conv_25 = ret_conv_49_b[z];
-                               number ret_conv_49_b_conv_25_a = bindings.LDKC2Tuple_u32TxOutZ_get_a(ret_conv_49_b_conv_25);
-                               number ret_conv_49_b_conv_25_b = bindings.TxOut_clone(bindings.LDKC2Tuple_u32TxOutZ_get_b(ret_conv_49_b_conv_25));
-                               TxOut ret_conv_49_b_conv_25_b_conv = new TxOut(null, ret_conv_49_b_conv_25_b);;
-                               TwoTuple<Number, TxOut> ret_conv_49_b_conv_25_conv = new TwoTuple<Number, TxOut>(ret_conv_49_b_conv_25_a, ret_conv_49_b_conv_25_b_conv, () -> {
-                                       bindings.C2Tuple_u32TxOutZ_free(ret_conv_49_b_conv_25);
-                               });
-                               ret_conv_49_b_conv_25_b_conv.ptrs_to.add(ret_conv_49_b_conv_25_conv);
-                               ret_conv_49_b_conv_25_arr[z] = ret_conv_49_b_conv_25_conv;
-                       };
-                       TwoTuple<Uint8Array, TwoTuple<Number, TxOut>[]> ret_conv_49_conv = new TwoTuple<Uint8Array, TwoTuple<Number, TxOut>[]>(ret_conv_49_a, ret_conv_49_b_conv_25_arr);
-                       // Warning: We may not free the C tuple object!
-                       ret_conv_49_arr[x] = ret_conv_49_conv;
+       public TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ[] block_connected(Uint8Array header, TwoTuple_usizeTransactionZ[] txdata, number height, BroadcasterInterface broadcaster, FeeEstimator fee_estimator, Logger logger) {
+               number[] ret = bindings.ChannelMonitor_block_connected(this.ptr, header, txdata != null ? Arrays.stream(txdata).map(txdata_conv_28 -> txdata_conv_28 != null ? txdata_conv_28.ptr : 0).toArray(number[]::new) : null, height, broadcaster == null ? 0 : broadcaster.ptr, fee_estimator == null ? 0 : fee_estimator.ptr, logger == null ? 0 : logger.ptr);
+               TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ[] ret_conv_39_arr = new TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ[ret.length];
+               for (int n = 0; n < ret.length; n++) {
+                       number ret_conv_39 = ret[n];
+                       TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ ret_conv_39_hu_conv = new TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ(null, ret_conv_39);
+                       ret_conv_39_hu_conv.ptrs_to.add(this);
+                       ret_conv_39_arr[n] = ret_conv_39_hu_conv;
                }
                this.ptrs_to.add(broadcaster);
                this.ptrs_to.add(fee_estimator);
                this.ptrs_to.add(logger);
-               return ret_conv_49_arr;
+               return ret_conv_39_arr;
        }
 
        public void block_disconnected(Uint8Array header, number height, BroadcasterInterface broadcaster, FeeEstimator fee_estimator, Logger logger) {
@@ -153,33 +121,19 @@ import * as bindings from '../bindings' // TODO: figure out location
                this.ptrs_to.add(logger);
        }
 
-       public TwoTuple<Uint8Array, TwoTuple<Number, TxOut>[]>[] transactions_confirmed(Uint8Array header, TwoTuple<Number, Uint8Array>[] txdata, number height, BroadcasterInterface broadcaster, FeeEstimator fee_estimator, Logger logger) {
-               number[] ret = bindings.ChannelMonitor_transactions_confirmed(this.ptr, header, txdata != null ? Arrays.stream(txdata).map(txdata_conv_30 -> bindings.C2Tuple_usizeTransactionZ_new(txdata_conv_30.a, txdata_conv_30.b)).toArray(number[]::new) : null, height, broadcaster == null ? 0 : broadcaster.ptr, fee_estimator == null ? 0 : fee_estimator.ptr, logger == null ? 0 : logger.ptr);
-               TwoTuple<Uint8Array, TwoTuple<Number, TxOut>[]>[] ret_conv_49_arr = new TwoTuple[ret.length];
-               for (int x = 0; x < ret.length; x++) {
-                       number ret_conv_49 = ret[x];
-                       Uint8Array ret_conv_49_a = bindings.LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(ret_conv_49);
-                       number[] ret_conv_49_b = bindings.LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(ret_conv_49);
-                       TwoTuple<Number, TxOut>[] ret_conv_49_b_conv_25_arr = new TwoTuple[ret_conv_49_b.length];
-                       for (int z = 0; z < ret_conv_49_b.length; z++) {
-                               number ret_conv_49_b_conv_25 = ret_conv_49_b[z];
-                               number ret_conv_49_b_conv_25_a = bindings.LDKC2Tuple_u32TxOutZ_get_a(ret_conv_49_b_conv_25);
-                               number ret_conv_49_b_conv_25_b = bindings.TxOut_clone(bindings.LDKC2Tuple_u32TxOutZ_get_b(ret_conv_49_b_conv_25));
-                               TxOut ret_conv_49_b_conv_25_b_conv = new TxOut(null, ret_conv_49_b_conv_25_b);;
-                               TwoTuple<Number, TxOut> ret_conv_49_b_conv_25_conv = new TwoTuple<Number, TxOut>(ret_conv_49_b_conv_25_a, ret_conv_49_b_conv_25_b_conv, () -> {
-                                       bindings.C2Tuple_u32TxOutZ_free(ret_conv_49_b_conv_25);
-                               });
-                               ret_conv_49_b_conv_25_b_conv.ptrs_to.add(ret_conv_49_b_conv_25_conv);
-                               ret_conv_49_b_conv_25_arr[z] = ret_conv_49_b_conv_25_conv;
-                       };
-                       TwoTuple<Uint8Array, TwoTuple<Number, TxOut>[]> ret_conv_49_conv = new TwoTuple<Uint8Array, TwoTuple<Number, TxOut>[]>(ret_conv_49_a, ret_conv_49_b_conv_25_arr);
-                       // Warning: We may not free the C tuple object!
-                       ret_conv_49_arr[x] = ret_conv_49_conv;
+       public TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ[] transactions_confirmed(Uint8Array header, TwoTuple_usizeTransactionZ[] txdata, number height, BroadcasterInterface broadcaster, FeeEstimator fee_estimator, Logger logger) {
+               number[] ret = bindings.ChannelMonitor_transactions_confirmed(this.ptr, header, txdata != null ? Arrays.stream(txdata).map(txdata_conv_28 -> txdata_conv_28 != null ? txdata_conv_28.ptr : 0).toArray(number[]::new) : null, height, broadcaster == null ? 0 : broadcaster.ptr, fee_estimator == null ? 0 : fee_estimator.ptr, logger == null ? 0 : logger.ptr);
+               TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ[] ret_conv_39_arr = new TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ[ret.length];
+               for (int n = 0; n < ret.length; n++) {
+                       number ret_conv_39 = ret[n];
+                       TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ ret_conv_39_hu_conv = new TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ(null, ret_conv_39);
+                       ret_conv_39_hu_conv.ptrs_to.add(this);
+                       ret_conv_39_arr[n] = ret_conv_39_hu_conv;
                }
                this.ptrs_to.add(broadcaster);
                this.ptrs_to.add(fee_estimator);
                this.ptrs_to.add(logger);
-               return ret_conv_49_arr;
+               return ret_conv_39_arr;
        }
 
        public void transaction_unconfirmed(Uint8Array txid, BroadcasterInterface broadcaster, FeeEstimator fee_estimator, Logger logger) {
@@ -189,33 +143,19 @@ import * as bindings from '../bindings' // TODO: figure out location
                this.ptrs_to.add(logger);
        }
 
-       public TwoTuple<Uint8Array, TwoTuple<Number, TxOut>[]>[] best_block_updated(Uint8Array header, number height, BroadcasterInterface broadcaster, FeeEstimator fee_estimator, Logger logger) {
+       public TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ[] best_block_updated(Uint8Array header, number height, BroadcasterInterface broadcaster, FeeEstimator fee_estimator, Logger logger) {
                number[] ret = bindings.ChannelMonitor_best_block_updated(this.ptr, header, height, broadcaster == null ? 0 : broadcaster.ptr, fee_estimator == null ? 0 : fee_estimator.ptr, logger == null ? 0 : logger.ptr);
-               TwoTuple<Uint8Array, TwoTuple<Number, TxOut>[]>[] ret_conv_49_arr = new TwoTuple[ret.length];
-               for (int x = 0; x < ret.length; x++) {
-                       number ret_conv_49 = ret[x];
-                       Uint8Array ret_conv_49_a = bindings.LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(ret_conv_49);
-                       number[] ret_conv_49_b = bindings.LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(ret_conv_49);
-                       TwoTuple<Number, TxOut>[] ret_conv_49_b_conv_25_arr = new TwoTuple[ret_conv_49_b.length];
-                       for (int z = 0; z < ret_conv_49_b.length; z++) {
-                               number ret_conv_49_b_conv_25 = ret_conv_49_b[z];
-                               number ret_conv_49_b_conv_25_a = bindings.LDKC2Tuple_u32TxOutZ_get_a(ret_conv_49_b_conv_25);
-                               number ret_conv_49_b_conv_25_b = bindings.TxOut_clone(bindings.LDKC2Tuple_u32TxOutZ_get_b(ret_conv_49_b_conv_25));
-                               TxOut ret_conv_49_b_conv_25_b_conv = new TxOut(null, ret_conv_49_b_conv_25_b);;
-                               TwoTuple<Number, TxOut> ret_conv_49_b_conv_25_conv = new TwoTuple<Number, TxOut>(ret_conv_49_b_conv_25_a, ret_conv_49_b_conv_25_b_conv, () -> {
-                                       bindings.C2Tuple_u32TxOutZ_free(ret_conv_49_b_conv_25);
-                               });
-                               ret_conv_49_b_conv_25_b_conv.ptrs_to.add(ret_conv_49_b_conv_25_conv);
-                               ret_conv_49_b_conv_25_arr[z] = ret_conv_49_b_conv_25_conv;
-                       };
-                       TwoTuple<Uint8Array, TwoTuple<Number, TxOut>[]> ret_conv_49_conv = new TwoTuple<Uint8Array, TwoTuple<Number, TxOut>[]>(ret_conv_49_a, ret_conv_49_b_conv_25_arr);
-                       // Warning: We may not free the C tuple object!
-                       ret_conv_49_arr[x] = ret_conv_49_conv;
+               TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ[] ret_conv_39_arr = new TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ[ret.length];
+               for (int n = 0; n < ret.length; n++) {
+                       number ret_conv_39 = ret[n];
+                       TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ ret_conv_39_hu_conv = new TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ(null, ret_conv_39);
+                       ret_conv_39_hu_conv.ptrs_to.add(this);
+                       ret_conv_39_arr[n] = ret_conv_39_hu_conv;
                }
                this.ptrs_to.add(broadcaster);
                this.ptrs_to.add(fee_estimator);
                this.ptrs_to.add(logger);
-               return ret_conv_49_arr;
+               return ret_conv_39_arr;
        }
 
        public Uint8Array[] get_relevant_txids() {
index 409068bf29455be66dc3ee6b76aec8bad2d6b8ce..f3b6b27dcd0a3027fdc014c9697f1004757739c1 100644 (file)
@@ -33,17 +33,14 @@ import * as bindings from '../bindings' // TODO: figure out location
                     let structImplementation = <bindings.LDKConfirm>{
                         // todo: in-line interface filling
                         transactions_confirmed (header: Uint8Array, txdata: number[], height: number): void {
-                                                       TwoTuple<Number, Uint8Array>[] txdata_conv_30_arr = new TwoTuple[txdata.length];
-                               for (int e = 0; e < txdata.length; e++) {
-                                       number txdata_conv_30 = txdata[e];
-                                       number txdata_conv_30_a = bindings.LDKC2Tuple_usizeTransactionZ_get_a(txdata_conv_30);
-                                       Uint8Array txdata_conv_30_b = bindings.LDKC2Tuple_usizeTransactionZ_get_b(txdata_conv_30);
-                                       TwoTuple<Number, Uint8Array> txdata_conv_30_conv = new TwoTuple<Number, Uint8Array>(txdata_conv_30_a, txdata_conv_30_b, () -> {
-                                               bindings.C2Tuple_usizeTransactionZ_free(txdata_conv_30);
-                                       });
-                                       txdata_conv_30_arr[e] = txdata_conv_30_conv;
+                                                       TwoTuple_usizeTransactionZ[] txdata_conv_28_arr = new TwoTuple_usizeTransactionZ[txdata.length];
+                               for (int c = 0; c < txdata.length; c++) {
+                                       number txdata_conv_28 = txdata[c];
+                                       TwoTuple_usizeTransactionZ txdata_conv_28_hu_conv = new TwoTuple_usizeTransactionZ(null, txdata_conv_28);
+                                       txdata_conv_28_hu_conv.ptrs_to.add(this);
+                                       txdata_conv_28_arr[c] = txdata_conv_28_hu_conv;
                                }
-                                                       arg.transactions_confirmed(header, txdata_conv_30_arr, height);
+                                                       arg.transactions_confirmed(header, txdata_conv_28_arr, height);
                                                },
 
                                                transaction_unconfirmed (txid: Uint8Array): void {
@@ -66,7 +63,7 @@ import * as bindings from '../bindings' // TODO: figure out location
             }
 
             export interface ConfirmInterface {
-                transactions_confirmed(header: Uint8Array, txdata: TwoTuple<Number, Uint8Array>[], height: number): void;
+                transactions_confirmed(header: Uint8Array, txdata: TwoTuple_usizeTransactionZ[], height: number): void;
                                transaction_unconfirmed(txid: Uint8Array): void;
                                best_block_updated(header: Uint8Array, height: number): void;
                                get_relevant_txids(): Uint8Array[];
@@ -76,8 +73,8 @@ import * as bindings from '../bindings' // TODO: figure out location
             class LDKConfirmHolder {
                 held: Confirm;
             }
-       public void transactions_confirmed(Uint8Array header, TwoTuple<Number, Uint8Array>[] txdata, number height) {
-               bindings.Confirm_transactions_confirmed(this.ptr, header, txdata != null ? Arrays.stream(txdata).map(txdata_conv_30 -> bindings.C2Tuple_usizeTransactionZ_new(txdata_conv_30.a, txdata_conv_30.b)).toArray(number[]::new) : null, height);
+       public void transactions_confirmed(Uint8Array header, TwoTuple_usizeTransactionZ[] txdata, number height) {
+               bindings.Confirm_transactions_confirmed(this.ptr, header, txdata != null ? Arrays.stream(txdata).map(txdata_conv_28 -> txdata_conv_28 != null ? txdata_conv_28.ptr : 0).toArray(number[]::new) : null, height);
        }
 
        public void transaction_unconfirmed(Uint8Array txid) {
index a1efb5587303e5ea521a4de90503ba1ca9f2f788..49c3f96c3544b5fc2b4629870492057fc675a5ba 100644 (file)
@@ -42,9 +42,8 @@ import * as bindings from '../bindings' // TODO: figure out location
                                                },
 
                                                get_and_clear_pending_msg (): number[] {
-                                                       TwoTuple<Uint8Array, Type>[] ret = arg.get_and_clear_pending_msg();
-                               result: number[] = ret != null ? Arrays.stream(ret).map(ret_conv_28 -> bindings.C2Tuple_PublicKeyTypeZ_new(ret_conv_28.a, ret_conv_28.b == null ? 0 : ret_conv_28.b.ptr)).toArray(number[]::new) : null;
-                               for (TwoTuple<Uint8Array, Type> ret_conv_28: ret) { impl_holder.held.ptrs_to.add(ret_conv_28.b); };
+                                                       TwoTuple_PublicKeyTypeZ[] ret = arg.get_and_clear_pending_msg();
+                               result: number[] = ret != null ? Arrays.stream(ret).map(ret_conv_25 -> ret_conv_25 != null ? ret_conv_25.ptr : 0).toArray(number[]::new) : null;
                                return result;
                                                },
 
@@ -56,7 +55,7 @@ import * as bindings from '../bindings' // TODO: figure out location
 
             export interface CustomMessageHandlerInterface {
                 handle_custom_message(msg: Type, sender_node_id: Uint8Array): Result_NoneLightningErrorZ;
-                               get_and_clear_pending_msg(): TwoTuple<Uint8Array, Type>[];
+                               get_and_clear_pending_msg(): TwoTuple_PublicKeyTypeZ[];
                                
             }
 
@@ -70,22 +69,16 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
-       public TwoTuple<Uint8Array, Type>[] get_and_clear_pending_msg() {
+       public TwoTuple_PublicKeyTypeZ[] get_and_clear_pending_msg() {
                number[] ret = bindings.CustomMessageHandler_get_and_clear_pending_msg(this.ptr);
-               TwoTuple<Uint8Array, Type>[] ret_conv_28_arr = new TwoTuple[ret.length];
-               for (int c = 0; c < ret.length; c++) {
-                       number ret_conv_28 = ret[c];
-                       Uint8Array ret_conv_28_a = bindings.LDKC2Tuple_PublicKeyTypeZ_get_a(ret_conv_28);
-                       number ret_conv_28_b = bindings.LDKC2Tuple_PublicKeyTypeZ_get_b(ret_conv_28);
-                       Type ret_hu_conv = new Type(null, ret_conv_28_b);
-                       ret_hu_conv.ptrs_to.add(this);;
-                       TwoTuple<Uint8Array, Type> ret_conv_28_conv = new TwoTuple<Uint8Array, Type>(ret_conv_28_a, ret_hu_conv, () -> {
-                               bindings.C2Tuple_PublicKeyTypeZ_free(ret_conv_28);
-                       });
-                       ret_hu_conv.ptrs_to.add(ret_conv_28_conv);
-                       ret_conv_28_arr[c] = ret_conv_28_conv;
+               TwoTuple_PublicKeyTypeZ[] ret_conv_25_arr = new TwoTuple_PublicKeyTypeZ[ret.length];
+               for (int z = 0; z < ret.length; z++) {
+                       number ret_conv_25 = ret[z];
+                       TwoTuple_PublicKeyTypeZ ret_conv_25_hu_conv = new TwoTuple_PublicKeyTypeZ(null, ret_conv_25);
+                       ret_conv_25_hu_conv.ptrs_to.add(this);
+                       ret_conv_25_arr[z] = ret_conv_25_hu_conv;
                }
-               return ret_conv_28_arr;
+               return ret_conv_25_arr;
        }
 
 }
index 2d6468edb8aadb64f3c61309d8e582ad5ce19d4e..4da3280b9725eeed1210811d10c65d63e1e31776 100644 (file)
@@ -32,14 +32,16 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
-       public void set_network_graph(Uint8Array val_genesis_hash) {
-               bindings.NetGraphMsgHandler_set_network_graph(this.ptr, bindings.NetworkGraph_new(val_genesis_hash));
+       public void set_network_graph(NetworkGraph val) {
+               bindings.NetGraphMsgHandler_set_network_graph(this.ptr, val == null ? 0 : val.ptr & ~1);
+               this.ptrs_to.add(val);
        }
 
-       public static NetGraphMsgHandler constructor_new(Uint8Array network_graph_genesis_hash, Option_AccessZ chain_access, Logger logger) {
-               number ret = bindings.NetGraphMsgHandler_new(bindings.NetworkGraph_new(network_graph_genesis_hash), chain_access.ptr, logger == null ? 0 : logger.ptr);
+       public static NetGraphMsgHandler constructor_new(NetworkGraph network_graph, Option_AccessZ chain_access, Logger logger) {
+               number ret = bindings.NetGraphMsgHandler_new(network_graph == null ? 0 : network_graph.ptr & ~1, chain_access.ptr, logger == null ? 0 : logger.ptr);
                const ret_hu_conv: NetGraphMsgHandler = new NetGraphMsgHandler(null, ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               ret_hu_conv.ptrs_to.add(network_graph);
                ret_hu_conv.ptrs_to.add(logger);
                return ret_hu_conv;
        }
index 58e00cfeaa59c2e4af48d9f96ec7585a5d2cda81..2d96e4c0a2614ecfcfd259941af6106f87020fe8 100644 (file)
@@ -18,6 +18,13 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.NetworkGraph_free(this.ptr);
                     }
                 }
+       public NetworkGraph clone() {
+               number ret = bindings.NetworkGraph_clone(this.ptr);
+               const ret_hu_conv: NetworkGraph = new NetworkGraph(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.NetworkGraph_write(this.ptr);
                return ret;
index 8bc1cde314ec113576399e1bdd7c7ad7edc8578e..4823565e52ea26263db85053c607f334d6104e7f 100644 (file)
@@ -35,7 +35,7 @@ export class None extends COption_AccessZ {
                super(null, ptr);
        }
 }
-       public static Option_AccessZ constructor__some(Access o) {
+       public static Option_AccessZ constructor_some(Access o) {
                number ret = bindings.COption_AccessZ_some(o == null ? 0 : o.ptr);
                Option_AccessZ ret_hu_conv = Option_AccessZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
@@ -43,7 +43,7 @@ export class None extends COption_AccessZ {
                return ret_hu_conv;
        }
 
-       public static Option_AccessZ constructor__none() {
+       public static Option_AccessZ constructor_none() {
                number ret = bindings.COption_AccessZ_none();
                Option_AccessZ ret_hu_conv = Option_AccessZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
index 23fbcdb75ffbb4faf52c50036d06cb449497e219..d9de28ad5b2f992407825dea6f941aad2b3c813b 100644 (file)
@@ -21,16 +21,13 @@ export default class COption_C2Tuple_usizeTransactionZZ extends CommonBase {
 
 }
 export class Some extends COption_C2Tuple_usizeTransactionZZ {
-       public some: TwoTuple<Number, Uint8Array>;
+       public some: TwoTuple_usizeTransactionZ;
        private constructor(ptr: number, obj: bindings.LDKCOption_C2Tuple_usizeTransactionZZ.Some) {
                super(null, ptr);
                const some: number = obj.some;
-               number some_a = bindings.LDKC2Tuple_usizeTransactionZ_get_a(some);
-                       Uint8Array some_b = bindings.LDKC2Tuple_usizeTransactionZ_get_b(some);
-                       TwoTuple<Number, Uint8Array> some_conv = new TwoTuple<Number, Uint8Array>(some_a, some_b, () -> {
-                               bindings.C2Tuple_usizeTransactionZ_free(some);
-                       });
-               this.some = some_conv;
+               TwoTuple_usizeTransactionZ some_hu_conv = new TwoTuple_usizeTransactionZ(null, some);
+                       some_hu_conv.ptrs_to.add(this);
+               this.some = some_hu_conv;
        }
 }
 export class None extends COption_C2Tuple_usizeTransactionZZ {
@@ -38,21 +35,21 @@ export class None extends COption_C2Tuple_usizeTransactionZZ {
                super(null, ptr);
        }
 }
-       public static Option_C2Tuple_usizeTransactionZZ constructor__some(TwoTuple<Number, Uint8Array> o) {
-               number ret = bindings.COption_C2Tuple_usizeTransactionZZ_some(bindings.C2Tuple_usizeTransactionZ_new(o.a, o.b));
+       public static Option_C2Tuple_usizeTransactionZZ constructor_some(TwoTuple_usizeTransactionZ o) {
+               number ret = bindings.COption_C2Tuple_usizeTransactionZZ_some(o != null ? o.ptr : 0);
                Option_C2Tuple_usizeTransactionZZ ret_hu_conv = Option_C2Tuple_usizeTransactionZZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                return ret_hu_conv;
        }
 
-       public static Option_C2Tuple_usizeTransactionZZ constructor__none() {
+       public static Option_C2Tuple_usizeTransactionZZ constructor_none() {
                number ret = bindings.COption_C2Tuple_usizeTransactionZZ_none();
                Option_C2Tuple_usizeTransactionZZ ret_hu_conv = Option_C2Tuple_usizeTransactionZZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                return ret_hu_conv;
        }
 
-       public Option_C2Tuple_usizeTransactionZZ _clone() {
+       public Option_C2Tuple_usizeTransactionZZ clone() {
                number ret = bindings.COption_C2Tuple_usizeTransactionZZ_clone(this.ptr);
                Option_C2Tuple_usizeTransactionZZ ret_hu_conv = Option_C2Tuple_usizeTransactionZZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(this);
index 6082376af87ac69aceb63a6668e53acafafc4e75..a9b76998014439494d491658b6167582461aa65f 100644 (file)
@@ -35,7 +35,7 @@ export class None extends COption_FilterZ {
                super(null, ptr);
        }
 }
-       public static Option_FilterZ constructor__some(Filter o) {
+       public static Option_FilterZ constructor_some(Filter o) {
                number ret = bindings.COption_FilterZ_some(o == null ? 0 : o.ptr);
                Option_FilterZ ret_hu_conv = Option_FilterZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
@@ -43,7 +43,7 @@ export class None extends COption_FilterZ {
                return ret_hu_conv;
        }
 
-       public static Option_FilterZ constructor__none() {
+       public static Option_FilterZ constructor_none() {
                number ret = bindings.COption_FilterZ_none();
                Option_FilterZ ret_hu_conv = Option_FilterZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
index 803b8ea01a791c3249274513017dad447bdb2a91..33af24de3d3a1f1078d9fa6c0994a08dfc318811 100644 (file)
@@ -35,21 +35,21 @@ export class None extends COption_NetworkUpdateZ {
                super(null, ptr);
        }
 }
-       public static Option_NetworkUpdateZ constructor__some(NetworkUpdate o) {
+       public static Option_NetworkUpdateZ constructor_some(NetworkUpdate o) {
                number ret = bindings.COption_NetworkUpdateZ_some(o.ptr);
                Option_NetworkUpdateZ ret_hu_conv = Option_NetworkUpdateZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                return ret_hu_conv;
        }
 
-       public static Option_NetworkUpdateZ constructor__none() {
+       public static Option_NetworkUpdateZ constructor_none() {
                number ret = bindings.COption_NetworkUpdateZ_none();
                Option_NetworkUpdateZ ret_hu_conv = Option_NetworkUpdateZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                return ret_hu_conv;
        }
 
-       public Option_NetworkUpdateZ _clone() {
+       public Option_NetworkUpdateZ clone() {
                number ret = bindings.COption_NetworkUpdateZ_clone(this.ptr);
                Option_NetworkUpdateZ ret_hu_conv = Option_NetworkUpdateZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(this);
index a9919b60b7671f142d21c8b480b42727d0b153ff..a9d05e95c2430b21e0ee1c60d361ebcbacac40cb 100644 (file)
@@ -35,7 +35,7 @@ export class None extends COption_TypeZ {
                super(null, ptr);
        }
 }
-       public static Option_TypeZ constructor__some(Type o) {
+       public static Option_TypeZ constructor_some(Type o) {
                number ret = bindings.COption_TypeZ_some(o == null ? 0 : o.ptr);
                Option_TypeZ ret_hu_conv = Option_TypeZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
@@ -43,14 +43,14 @@ export class None extends COption_TypeZ {
                return ret_hu_conv;
        }
 
-       public static Option_TypeZ constructor__none() {
+       public static Option_TypeZ constructor_none() {
                number ret = bindings.COption_TypeZ_none();
                Option_TypeZ ret_hu_conv = Option_TypeZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                return ret_hu_conv;
        }
 
-       public Option_TypeZ _clone() {
+       public Option_TypeZ clone() {
                number ret = bindings.COption_TypeZ_clone(this.ptr);
                Option_TypeZ ret_hu_conv = Option_TypeZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(this);
index 5d3b56e63c272068dca181d29b4e699a4be74659..e2ccbc90e4ad2505a77ee1a22cabe2fc7ddc151c 100644 (file)
@@ -32,21 +32,21 @@ export class None extends COption_u16Z {
                super(null, ptr);
        }
 }
-       public static Option_u16Z constructor__some(number o) {
+       public static Option_u16Z constructor_some(number o) {
                number ret = bindings.COption_u16Z_some(o);
                Option_u16Z ret_hu_conv = Option_u16Z.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                return ret_hu_conv;
        }
 
-       public static Option_u16Z constructor__none() {
+       public static Option_u16Z constructor_none() {
                number ret = bindings.COption_u16Z_none();
                Option_u16Z ret_hu_conv = Option_u16Z.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                return ret_hu_conv;
        }
 
-       public Option_u16Z _clone() {
+       public Option_u16Z clone() {
                number ret = bindings.COption_u16Z_clone(this.ptr);
                Option_u16Z ret_hu_conv = Option_u16Z.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(this);
index 9d7b9616073dc9dd642c3670ab59b0c6173f6ddb..35daf1ff112cb5c12047e74368552e837942e978 100644 (file)
@@ -32,21 +32,21 @@ export class None extends COption_u32Z {
                super(null, ptr);
        }
 }
-       public static Option_u32Z constructor__some(number o) {
+       public static Option_u32Z constructor_some(number o) {
                number ret = bindings.COption_u32Z_some(o);
                Option_u32Z ret_hu_conv = Option_u32Z.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                return ret_hu_conv;
        }
 
-       public static Option_u32Z constructor__none() {
+       public static Option_u32Z constructor_none() {
                number ret = bindings.COption_u32Z_none();
                Option_u32Z ret_hu_conv = Option_u32Z.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                return ret_hu_conv;
        }
 
-       public Option_u32Z _clone() {
+       public Option_u32Z clone() {
                number ret = bindings.COption_u32Z_clone(this.ptr);
                Option_u32Z ret_hu_conv = Option_u32Z.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(this);
index c23f0895acd1bb4308a3cf90405195321a169048..1e10d8f557ba71fd9eafc814f2b4e8f467d6e040 100644 (file)
@@ -32,21 +32,21 @@ export class None extends COption_u64Z {
                super(null, ptr);
        }
 }
-       public static Option_u64Z constructor__some(number o) {
+       public static Option_u64Z constructor_some(number o) {
                number ret = bindings.COption_u64Z_some(o);
                Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                return ret_hu_conv;
        }
 
-       public static Option_u64Z constructor__none() {
+       public static Option_u64Z constructor_none() {
                number ret = bindings.COption_u64Z_none();
                Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                return ret_hu_conv;
        }
 
-       public Option_u64Z _clone() {
+       public Option_u64Z clone() {
                number ret = bindings.COption_u64Z_clone(this.ptr);
                Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(this);
index 5e24e2fd6c023625ea229bd6331a44f216a97e1f..e4b5494d18ed30b2e9f6ad2726856b267aa3fb9c 100644 (file)
@@ -37,21 +37,21 @@ public class Result_AcceptChannelDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_AcceptChannelDecodeErrorZ constructor__ok(AcceptChannel o) {
+       public static Result_AcceptChannelDecodeErrorZ constructor_ok(AcceptChannel o) {
                number ret = bindings.CResult_AcceptChannelDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_AcceptChannelDecodeErrorZ ret_hu_conv = Result_AcceptChannelDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_AcceptChannelDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_AcceptChannelDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_AcceptChannelDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_AcceptChannelDecodeErrorZ ret_hu_conv = Result_AcceptChannelDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_AcceptChannelDecodeErrorZ _clone() {
+       public Result_AcceptChannelDecodeErrorZ clone() {
                number ret = bindings.CResult_AcceptChannelDecodeErrorZ_clone(this.ptr);
                Result_AcceptChannelDecodeErrorZ ret_hu_conv = Result_AcceptChannelDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 02479d7267c11ec6c3e0c3eb7ecd9a4dafc37655..d4ed58bcf37a7a3323849ab7833d0b3806c7532c 100644 (file)
@@ -37,21 +37,21 @@ public class Result_AnnouncementSignaturesDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_AnnouncementSignaturesDecodeErrorZ constructor__ok(AnnouncementSignatures o) {
+       public static Result_AnnouncementSignaturesDecodeErrorZ constructor_ok(AnnouncementSignatures o) {
                number ret = bindings.CResult_AnnouncementSignaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_AnnouncementSignaturesDecodeErrorZ ret_hu_conv = Result_AnnouncementSignaturesDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_AnnouncementSignaturesDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_AnnouncementSignaturesDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_AnnouncementSignaturesDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_AnnouncementSignaturesDecodeErrorZ ret_hu_conv = Result_AnnouncementSignaturesDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_AnnouncementSignaturesDecodeErrorZ _clone() {
+       public Result_AnnouncementSignaturesDecodeErrorZ clone() {
                number ret = bindings.CResult_AnnouncementSignaturesDecodeErrorZ_clone(this.ptr);
                Result_AnnouncementSignaturesDecodeErrorZ ret_hu_conv = Result_AnnouncementSignaturesDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 7d04d85a33a849940dc13cb162e8534aac913004..6e54924b133637089340f9f63ba46d4e97d65105 100644 (file)
@@ -37,21 +37,21 @@ public class Result_BuiltCommitmentTransactionDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_BuiltCommitmentTransactionDecodeErrorZ constructor__ok(BuiltCommitmentTransaction o) {
+       public static Result_BuiltCommitmentTransactionDecodeErrorZ constructor_ok(BuiltCommitmentTransaction o) {
                number ret = bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_BuiltCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_BuiltCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_BuiltCommitmentTransactionDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_BuiltCommitmentTransactionDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_BuiltCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_BuiltCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_BuiltCommitmentTransactionDecodeErrorZ _clone() {
+       public Result_BuiltCommitmentTransactionDecodeErrorZ clone() {
                number ret = bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(this.ptr);
                Result_BuiltCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_BuiltCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index e3878992dc82fd7e5f5d340957d2da3b15ad45ab..e1bab27531f6ef6a6315ce9d5090e65ed8e4c843 100644 (file)
@@ -16,19 +16,13 @@ public class Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ extends CommonB
                }
        }
        public static final class Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_OK extends Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ {
-               public final TwoTuple<Uint8Array, ChannelManager> res;
+               public final TwoTuple_BlockHashChannelManagerZ res;
                private Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_OK(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        number res = bindings.LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(ptr);
-                       Uint8Array res_a = bindings.LDKC2Tuple_BlockHashChannelManagerZ_get_a(res);
-                       number res_b = bindings.LDKC2Tuple_BlockHashChannelManagerZ_get_b(res);
-                       const res_b_hu_conv: ChannelManager = new ChannelManager(null, res_b);
-                       res_b_hu_conv.ptrs_to.add(this);;
-                       TwoTuple<Uint8Array, ChannelManager> res_conv = new TwoTuple<Uint8Array, ChannelManager>(res_a, res_b_hu_conv, () -> {
-                               bindings.C2Tuple_BlockHashChannelManagerZ_free(res);
-                       });
-                       res_b_hu_conv.ptrs_to.add(res_conv);
-                       this.res = res_conv;
+                       TwoTuple_BlockHashChannelManagerZ res_hu_conv = new TwoTuple_BlockHashChannelManagerZ(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
                }
        }
 
@@ -43,22 +37,13 @@ public class Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ extends CommonB
                }
        }
 
-       public static Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ constructor__ok(TwoTuple<Uint8Array, ChannelManager> o) {
-               number ret = bindings.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(bindings.C2Tuple_BlockHashChannelManagerZ_new(o.a, o.b == null ? 0 : o.b.ptr & ~1));
+       public static Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ constructor_ok(TwoTuple_BlockHashChannelManagerZ o) {
+               number ret = bindings.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o != null ? o.ptr : 0);
                Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.constr_from_ptr(ret);
-               ret_hu_conv.ptrs_to.add(o.b);
-               // 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, o.b is reset to null and is now a dummy object.
-               o.b.ptr = 0;
                return ret_hu_conv;
        }
 
-       public static Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
index 3139b2b68b136edc58218efecce320a9ede2eed6..741c7190253e13637acd54e32c58e73a494af628 100644 (file)
@@ -16,19 +16,13 @@ public class Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ extends CommonB
                }
        }
        public static final class Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_OK extends Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ {
-               public final TwoTuple<Uint8Array, ChannelMonitor> res;
+               public final TwoTuple_BlockHashChannelMonitorZ res;
                private Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_OK(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        number res = bindings.LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(ptr);
-                       Uint8Array res_a = bindings.LDKC2Tuple_BlockHashChannelMonitorZ_get_a(res);
-                       number res_b = bindings.LDKC2Tuple_BlockHashChannelMonitorZ_get_b(res);
-                       const res_b_hu_conv: ChannelMonitor = new ChannelMonitor(null, res_b);
-                       res_b_hu_conv.ptrs_to.add(this);;
-                       TwoTuple<Uint8Array, ChannelMonitor> res_conv = new TwoTuple<Uint8Array, ChannelMonitor>(res_a, res_b_hu_conv, () -> {
-                               bindings.C2Tuple_BlockHashChannelMonitorZ_free(res);
-                       });
-                       res_b_hu_conv.ptrs_to.add(res_conv);
-                       this.res = res_conv;
+                       TwoTuple_BlockHashChannelMonitorZ res_hu_conv = new TwoTuple_BlockHashChannelMonitorZ(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
                }
        }
 
@@ -43,18 +37,23 @@ public class Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ extends CommonB
                }
        }
 
-       public static Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ constructor__ok(TwoTuple<Uint8Array, ChannelMonitor> o) {
-               number ret = bindings.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(bindings.C2Tuple_BlockHashChannelMonitorZ_new(o.a, o.b == null ? 0 : o.b.ptr & ~1));
+       public static Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ constructor_ok(TwoTuple_BlockHashChannelMonitorZ o) {
+               number ret = bindings.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o != null ? o.ptr : 0);
                Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.constr_from_ptr(ret);
-               ret_hu_conv.ptrs_to.add(o.b);
                return ret_hu_conv;
        }
 
-       public static Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
+       public Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ clone() {
+               number ret = bindings.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(this.ptr);
+               Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index bf9ac0502a72d2de40be64a7fcd75760c341132d..b16f58760fbd15f2c3d729bfc4c55d6ec559bb71 100644 (file)
@@ -16,16 +16,13 @@ public class Result_C2Tuple_SignatureCVec_SignatureZZNoneZ extends CommonBase {
                }
        }
        public static final class Result_C2Tuple_SignatureCVec_SignatureZZNoneZ_OK extends Result_C2Tuple_SignatureCVec_SignatureZZNoneZ {
-               public final TwoTuple<Uint8Array, Uint8Array[]> res;
+               public final TwoTuple_SignatureCVec_SignatureZZ res;
                private Result_C2Tuple_SignatureCVec_SignatureZZNoneZ_OK(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        number res = bindings.LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(ptr);
-                       Uint8Array res_a = bindings.LDKC2Tuple_SignatureCVec_SignatureZZ_get_a(res);
-                       Uint8Array[] res_b = bindings.LDKC2Tuple_SignatureCVec_SignatureZZ_get_b(res);
-                       TwoTuple<Uint8Array, Uint8Array[]> res_conv = new TwoTuple<Uint8Array, Uint8Array[]>(res_a, res_b, () -> {
-                               bindings.C2Tuple_SignatureCVec_SignatureZZ_free(res);
-                       });
-                       this.res = res_conv;
+                       TwoTuple_SignatureCVec_SignatureZZ res_hu_conv = new TwoTuple_SignatureCVec_SignatureZZ(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
                }
        }
 
@@ -35,19 +32,19 @@ public class Result_C2Tuple_SignatureCVec_SignatureZZNoneZ extends CommonBase {
                }
        }
 
-       public static Result_C2Tuple_SignatureCVec_SignatureZZNoneZ constructor__ok(TwoTuple<Uint8Array, Uint8Array[]> o) {
-               number ret = bindings.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(bindings.C2Tuple_SignatureCVec_SignatureZZ_new(o.a, o.b));
+       public static Result_C2Tuple_SignatureCVec_SignatureZZNoneZ constructor_ok(TwoTuple_SignatureCVec_SignatureZZ o) {
+               number ret = bindings.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o != null ? o.ptr : 0);
                Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_hu_conv = Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static Result_C2Tuple_SignatureCVec_SignatureZZNoneZ constructor__err() {
+       public static Result_C2Tuple_SignatureCVec_SignatureZZNoneZ constructor_err() {
                number ret = bindings.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
                Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_hu_conv = Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public Result_C2Tuple_SignatureCVec_SignatureZZNoneZ _clone() {
+       public Result_C2Tuple_SignatureCVec_SignatureZZNoneZ clone() {
                number ret = bindings.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(this.ptr);
                Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_hu_conv = Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 10771c7554e2c9ddf5eaaf49be00069bb4f708e8..da40f5db46be88d9e021210c6a7b57c9c7de9aa1 100644 (file)
@@ -37,20 +37,20 @@ public class Result_COption_TypeZDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_COption_TypeZDecodeErrorZ constructor__ok(Option_TypeZ o) {
+       public static Result_COption_TypeZDecodeErrorZ constructor_ok(Option_TypeZ o) {
                number ret = bindings.CResult_COption_TypeZDecodeErrorZ_ok(o.ptr);
                Result_COption_TypeZDecodeErrorZ ret_hu_conv = Result_COption_TypeZDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static Result_COption_TypeZDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_COption_TypeZDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_COption_TypeZDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_COption_TypeZDecodeErrorZ ret_hu_conv = Result_COption_TypeZDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_COption_TypeZDecodeErrorZ _clone() {
+       public Result_COption_TypeZDecodeErrorZ clone() {
                number ret = bindings.CResult_COption_TypeZDecodeErrorZ_clone(this.ptr);
                Result_COption_TypeZDecodeErrorZ ret_hu_conv = Result_COption_TypeZDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index d6dc175e7a08a05fbb52397f0b610d68b0a80d79..a2ec34a1da01bc7df3daf7011dc9051d50c5f7fe 100644 (file)
@@ -36,20 +36,20 @@ public class Result_CResult_NetAddressu8ZDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_CResult_NetAddressu8ZDecodeErrorZ constructor__ok(Result_NetAddressu8Z o) {
+       public static Result_CResult_NetAddressu8ZDecodeErrorZ constructor_ok(Result_NetAddressu8Z o) {
                number ret = bindings.CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o != null ? o.ptr : 0);
                Result_CResult_NetAddressu8ZDecodeErrorZ ret_hu_conv = Result_CResult_NetAddressu8ZDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static Result_CResult_NetAddressu8ZDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_CResult_NetAddressu8ZDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_CResult_NetAddressu8ZDecodeErrorZ ret_hu_conv = Result_CResult_NetAddressu8ZDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_CResult_NetAddressu8ZDecodeErrorZ _clone() {
+       public Result_CResult_NetAddressu8ZDecodeErrorZ clone() {
                number ret = bindings.CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(this.ptr);
                Result_CResult_NetAddressu8ZDecodeErrorZ ret_hu_conv = Result_CResult_NetAddressu8ZDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 7d538844768d0748c22690a54302a00ffd188016..e2153029980c729e429694c718bee75acb699c5c 100644 (file)
@@ -16,24 +16,18 @@ public class Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ extends CommonB
                }
        }
        public static final class Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_OK extends Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ {
-               public final TwoTuple<Uint8Array, ChannelMonitor>[] res;
+               public final TwoTuple_BlockHashChannelMonitorZ[] res;
                private Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_OK(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        number[] res = bindings.LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_ok(ptr);
-                       TwoTuple<Uint8Array, ChannelMonitor>[] res_conv_38_arr = new TwoTuple[res.length];
-                       for (int m = 0; m < res.length; m++) {
-                               number res_conv_38 = res[m];
-                               Uint8Array res_conv_38_a = bindings.LDKC2Tuple_BlockHashChannelMonitorZ_get_a(res_conv_38);
-                               number res_conv_38_b = bindings.LDKC2Tuple_BlockHashChannelMonitorZ_get_b(res_conv_38);
-                               const res_conv_38_b_hu_conv: ChannelMonitor = new ChannelMonitor(null, res_conv_38_b);
-                               res_conv_38_b_hu_conv.ptrs_to.add(this);;
-                               TwoTuple<Uint8Array, ChannelMonitor> res_conv_38_conv = new TwoTuple<Uint8Array, ChannelMonitor>(res_conv_38_a, res_conv_38_b_hu_conv, () -> {
-                                       bindings.C2Tuple_BlockHashChannelMonitorZ_free(res_conv_38);
-                               });
-                               res_conv_38_b_hu_conv.ptrs_to.add(res_conv_38_conv);
-                               res_conv_38_arr[m] = res_conv_38_conv;
+                       TwoTuple_BlockHashChannelMonitorZ[] res_conv_35_arr = new TwoTuple_BlockHashChannelMonitorZ[res.length];
+                       for (int j = 0; j < res.length; j++) {
+                               number res_conv_35 = res[j];
+                               TwoTuple_BlockHashChannelMonitorZ res_conv_35_hu_conv = new TwoTuple_BlockHashChannelMonitorZ(null, res_conv_35);
+                               res_conv_35_hu_conv.ptrs_to.add(this);
+                               res_conv_35_arr[j] = res_conv_35_hu_conv;
                        }
-                       this.res = res_conv_38_arr;
+                       this.res = res_conv_35_arr;
                }
        }
 
@@ -45,17 +39,22 @@ public class Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ extends CommonB
                }
        }
 
-       public static Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ constructor__ok(TwoTuple<Uint8Array, ChannelMonitor>[] o) {
-               number ret = bindings.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(o != null ? Arrays.stream(o).map(o_conv_38 -> bindings.C2Tuple_BlockHashChannelMonitorZ_new(o_conv_38.a, o_conv_38.b == null ? 0 : o_conv_38.b.ptr & ~1)).toArray(number[]::new) : null);
+       public static Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ constructor_ok(TwoTuple_BlockHashChannelMonitorZ[] o) {
+               number ret = bindings.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(o != null ? Arrays.stream(o).map(o_conv_35 -> o_conv_35 != null ? o_conv_35.ptr : 0).toArray(number[]::new) : null);
                Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ ret_hu_conv = Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ.constr_from_ptr(ret);
-               for (TwoTuple<Uint8Array, ChannelMonitor> o_conv_38: o) { ret_hu_conv.ptrs_to.add(o_conv_38.b); };
                return ret_hu_conv;
        }
 
-       public static Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ constructor__err(IOError e) {
+       public static Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ constructor_err(IOError e) {
                number ret = bindings.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(e);
                Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ ret_hu_conv = Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
+       public Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ clone() {
+               number ret = bindings.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(this.ptr);
+               Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ ret_hu_conv = Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 1bf0b6b9f306836aa9ed5027220adce6ff8e0861..52af9438b4907a5e752eba1fc00bc02759e7862e 100644 (file)
@@ -29,19 +29,19 @@ public class Result_CVec_CVec_u8ZZNoneZ extends CommonBase {
                }
        }
 
-       public static Result_CVec_CVec_u8ZZNoneZ constructor__ok(Uint8Array[] o) {
+       public static Result_CVec_CVec_u8ZZNoneZ constructor_ok(Uint8Array[] o) {
                number ret = bindings.CResult_CVec_CVec_u8ZZNoneZ_ok(o);
                Result_CVec_CVec_u8ZZNoneZ ret_hu_conv = Result_CVec_CVec_u8ZZNoneZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static Result_CVec_CVec_u8ZZNoneZ constructor__err() {
+       public static Result_CVec_CVec_u8ZZNoneZ constructor_err() {
                number ret = bindings.CResult_CVec_CVec_u8ZZNoneZ_err();
                Result_CVec_CVec_u8ZZNoneZ ret_hu_conv = Result_CVec_CVec_u8ZZNoneZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public Result_CVec_CVec_u8ZZNoneZ _clone() {
+       public Result_CVec_CVec_u8ZZNoneZ clone() {
                number ret = bindings.CResult_CVec_CVec_u8ZZNoneZ_clone(this.ptr);
                Result_CVec_CVec_u8ZZNoneZ ret_hu_conv = Result_CVec_CVec_u8ZZNoneZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 237f4476291c974c888191ffbeba3e699e1aa879..df61d0339c904b069c4c58699feb3d582c4021ff 100644 (file)
@@ -29,19 +29,19 @@ public class Result_CVec_SignatureZNoneZ extends CommonBase {
                }
        }
 
-       public static Result_CVec_SignatureZNoneZ constructor__ok(Uint8Array[] o) {
+       public static Result_CVec_SignatureZNoneZ constructor_ok(Uint8Array[] o) {
                number ret = bindings.CResult_CVec_SignatureZNoneZ_ok(o);
                Result_CVec_SignatureZNoneZ ret_hu_conv = Result_CVec_SignatureZNoneZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static Result_CVec_SignatureZNoneZ constructor__err() {
+       public static Result_CVec_SignatureZNoneZ constructor_err() {
                number ret = bindings.CResult_CVec_SignatureZNoneZ_err();
                Result_CVec_SignatureZNoneZ ret_hu_conv = Result_CVec_SignatureZNoneZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public Result_CVec_SignatureZNoneZ _clone() {
+       public Result_CVec_SignatureZNoneZ clone() {
                number ret = bindings.CResult_CVec_SignatureZNoneZ_clone(this.ptr);
                Result_CVec_SignatureZNoneZ ret_hu_conv = Result_CVec_SignatureZNoneZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 96c33d3a9fd12f1a10bca85606c568074ac23a8d..5d52288b21e96ab404e962c7c52bf0a8c52273c2 100644 (file)
@@ -34,20 +34,20 @@ public class Result_CVec_u8ZPeerHandleErrorZ extends CommonBase {
                }
        }
 
-       public static Result_CVec_u8ZPeerHandleErrorZ constructor__ok(Uint8Array o) {
+       public static Result_CVec_u8ZPeerHandleErrorZ constructor_ok(Uint8Array o) {
                number ret = bindings.CResult_CVec_u8ZPeerHandleErrorZ_ok(o);
                Result_CVec_u8ZPeerHandleErrorZ ret_hu_conv = Result_CVec_u8ZPeerHandleErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static Result_CVec_u8ZPeerHandleErrorZ constructor__err(PeerHandleError e) {
+       public static Result_CVec_u8ZPeerHandleErrorZ constructor_err(PeerHandleError e) {
                number ret = bindings.CResult_CVec_u8ZPeerHandleErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_CVec_u8ZPeerHandleErrorZ ret_hu_conv = Result_CVec_u8ZPeerHandleErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_CVec_u8ZPeerHandleErrorZ _clone() {
+       public Result_CVec_u8ZPeerHandleErrorZ clone() {
                number ret = bindings.CResult_CVec_u8ZPeerHandleErrorZ_clone(this.ptr);
                Result_CVec_u8ZPeerHandleErrorZ ret_hu_conv = Result_CVec_u8ZPeerHandleErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index a94e2294147862c294e6a35a059fd127781153ce..29991345b59ee75e90771d49e78f18077d3735da 100644 (file)
@@ -37,21 +37,21 @@ public class Result_ChannelAnnouncementDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_ChannelAnnouncementDecodeErrorZ constructor__ok(ChannelAnnouncement o) {
+       public static Result_ChannelAnnouncementDecodeErrorZ constructor_ok(ChannelAnnouncement o) {
                number ret = bindings.CResult_ChannelAnnouncementDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_ChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_ChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_ChannelAnnouncementDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_ChannelAnnouncementDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_ChannelAnnouncementDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_ChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_ChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_ChannelAnnouncementDecodeErrorZ _clone() {
+       public Result_ChannelAnnouncementDecodeErrorZ clone() {
                number ret = bindings.CResult_ChannelAnnouncementDecodeErrorZ_clone(this.ptr);
                Result_ChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_ChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 05146da5d529b0a36697aea15950d84fc13f5dc7..7b626dfc7cfb8a7acb0d8f60b9958d115c9728c5 100644 (file)
@@ -37,21 +37,21 @@ public class Result_ChannelConfigDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_ChannelConfigDecodeErrorZ constructor__ok(ChannelConfig o) {
+       public static Result_ChannelConfigDecodeErrorZ constructor_ok(ChannelConfig o) {
                number ret = bindings.CResult_ChannelConfigDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_ChannelConfigDecodeErrorZ ret_hu_conv = Result_ChannelConfigDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_ChannelConfigDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_ChannelConfigDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_ChannelConfigDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_ChannelConfigDecodeErrorZ ret_hu_conv = Result_ChannelConfigDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_ChannelConfigDecodeErrorZ _clone() {
+       public Result_ChannelConfigDecodeErrorZ clone() {
                number ret = bindings.CResult_ChannelConfigDecodeErrorZ_clone(this.ptr);
                Result_ChannelConfigDecodeErrorZ ret_hu_conv = Result_ChannelConfigDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index af6fcd002e9622364c52c15cdb19fcc9689d3e08..942ff138713551a1169dc5f4450374a29310a2d2 100644 (file)
@@ -37,14 +37,14 @@ public class Result_ChannelFeaturesDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_ChannelFeaturesDecodeErrorZ constructor__ok(ChannelFeatures o) {
+       public static Result_ChannelFeaturesDecodeErrorZ constructor_ok(ChannelFeatures o) {
                number ret = bindings.CResult_ChannelFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_ChannelFeaturesDecodeErrorZ ret_hu_conv = Result_ChannelFeaturesDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_ChannelFeaturesDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_ChannelFeaturesDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_ChannelFeaturesDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_ChannelFeaturesDecodeErrorZ ret_hu_conv = Result_ChannelFeaturesDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
index 79a4a6d51f44b6afd5e8ecd7049a6c780c4a2162..f1f84af2efa57fa98aa050a4239493a3d140f8e4 100644 (file)
@@ -37,21 +37,21 @@ public class Result_ChannelInfoDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_ChannelInfoDecodeErrorZ constructor__ok(ChannelInfo o) {
+       public static Result_ChannelInfoDecodeErrorZ constructor_ok(ChannelInfo o) {
                number ret = bindings.CResult_ChannelInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_ChannelInfoDecodeErrorZ ret_hu_conv = Result_ChannelInfoDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_ChannelInfoDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_ChannelInfoDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_ChannelInfoDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_ChannelInfoDecodeErrorZ ret_hu_conv = Result_ChannelInfoDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_ChannelInfoDecodeErrorZ _clone() {
+       public Result_ChannelInfoDecodeErrorZ clone() {
                number ret = bindings.CResult_ChannelInfoDecodeErrorZ_clone(this.ptr);
                Result_ChannelInfoDecodeErrorZ ret_hu_conv = Result_ChannelInfoDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index ff96b9ad18021355adfaf2a9d62e704df2766d49..5138b2deceb6a88b7a5fea9d284b465cfb399523 100644 (file)
@@ -37,21 +37,21 @@ public class Result_ChannelMonitorUpdateDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_ChannelMonitorUpdateDecodeErrorZ constructor__ok(ChannelMonitorUpdate o) {
+       public static Result_ChannelMonitorUpdateDecodeErrorZ constructor_ok(ChannelMonitorUpdate o) {
                number ret = bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_ChannelMonitorUpdateDecodeErrorZ ret_hu_conv = Result_ChannelMonitorUpdateDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_ChannelMonitorUpdateDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_ChannelMonitorUpdateDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_ChannelMonitorUpdateDecodeErrorZ ret_hu_conv = Result_ChannelMonitorUpdateDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_ChannelMonitorUpdateDecodeErrorZ _clone() {
+       public Result_ChannelMonitorUpdateDecodeErrorZ clone() {
                number ret = bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_clone(this.ptr);
                Result_ChannelMonitorUpdateDecodeErrorZ ret_hu_conv = Result_ChannelMonitorUpdateDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index df516cba5513af3a95c55e588fcfbcfa3a0a8778..b41be8da818bbd0eb5db88c4eaa53ae099e35783 100644 (file)
@@ -37,21 +37,21 @@ public class Result_ChannelPublicKeysDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_ChannelPublicKeysDecodeErrorZ constructor__ok(ChannelPublicKeys o) {
+       public static Result_ChannelPublicKeysDecodeErrorZ constructor_ok(ChannelPublicKeys o) {
                number ret = bindings.CResult_ChannelPublicKeysDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_ChannelPublicKeysDecodeErrorZ ret_hu_conv = Result_ChannelPublicKeysDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_ChannelPublicKeysDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_ChannelPublicKeysDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_ChannelPublicKeysDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_ChannelPublicKeysDecodeErrorZ ret_hu_conv = Result_ChannelPublicKeysDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_ChannelPublicKeysDecodeErrorZ _clone() {
+       public Result_ChannelPublicKeysDecodeErrorZ clone() {
                number ret = bindings.CResult_ChannelPublicKeysDecodeErrorZ_clone(this.ptr);
                Result_ChannelPublicKeysDecodeErrorZ ret_hu_conv = Result_ChannelPublicKeysDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index c4bd01d4399abec82d46becefe5c0b2625525a6b..c3692fb5c71ce5ed5fcee67ba6a4aebdb2a2f0e6 100644 (file)
@@ -37,21 +37,21 @@ public class Result_ChannelReestablishDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_ChannelReestablishDecodeErrorZ constructor__ok(ChannelReestablish o) {
+       public static Result_ChannelReestablishDecodeErrorZ constructor_ok(ChannelReestablish o) {
                number ret = bindings.CResult_ChannelReestablishDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_ChannelReestablishDecodeErrorZ ret_hu_conv = Result_ChannelReestablishDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_ChannelReestablishDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_ChannelReestablishDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_ChannelReestablishDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_ChannelReestablishDecodeErrorZ ret_hu_conv = Result_ChannelReestablishDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_ChannelReestablishDecodeErrorZ _clone() {
+       public Result_ChannelReestablishDecodeErrorZ clone() {
                number ret = bindings.CResult_ChannelReestablishDecodeErrorZ_clone(this.ptr);
                Result_ChannelReestablishDecodeErrorZ ret_hu_conv = Result_ChannelReestablishDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index cc5accfd6425bcf86f216e8bb116fdbe071be4c2..d88227260c0cf9020f4a774273870abf584a28ac 100644 (file)
@@ -37,21 +37,21 @@ public class Result_ChannelTransactionParametersDecodeErrorZ extends CommonBase
                }
        }
 
-       public static Result_ChannelTransactionParametersDecodeErrorZ constructor__ok(ChannelTransactionParameters o) {
+       public static Result_ChannelTransactionParametersDecodeErrorZ constructor_ok(ChannelTransactionParameters o) {
                number ret = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_ChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_ChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_ChannelTransactionParametersDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_ChannelTransactionParametersDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_ChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_ChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_ChannelTransactionParametersDecodeErrorZ _clone() {
+       public Result_ChannelTransactionParametersDecodeErrorZ clone() {
                number ret = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_clone(this.ptr);
                Result_ChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_ChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 9121961825cbfa70003709743df8269204caa51f..ad9c5e19a0c2ade08bbf63f6c4c31d1591ca3501 100644 (file)
@@ -37,21 +37,21 @@ public class Result_ChannelUpdateDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_ChannelUpdateDecodeErrorZ constructor__ok(ChannelUpdate o) {
+       public static Result_ChannelUpdateDecodeErrorZ constructor_ok(ChannelUpdate o) {
                number ret = bindings.CResult_ChannelUpdateDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_ChannelUpdateDecodeErrorZ ret_hu_conv = Result_ChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_ChannelUpdateDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_ChannelUpdateDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_ChannelUpdateDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_ChannelUpdateDecodeErrorZ ret_hu_conv = Result_ChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_ChannelUpdateDecodeErrorZ _clone() {
+       public Result_ChannelUpdateDecodeErrorZ clone() {
                number ret = bindings.CResult_ChannelUpdateDecodeErrorZ_clone(this.ptr);
                Result_ChannelUpdateDecodeErrorZ ret_hu_conv = Result_ChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index a56d732d0367526b25ef40c5ef8f356cd01acf46..7cd4af4fc308089c1a405e733f74147f17a02d46 100644 (file)
@@ -37,21 +37,21 @@ public class Result_ClosingSignedDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_ClosingSignedDecodeErrorZ constructor__ok(ClosingSigned o) {
+       public static Result_ClosingSignedDecodeErrorZ constructor_ok(ClosingSigned o) {
                number ret = bindings.CResult_ClosingSignedDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_ClosingSignedDecodeErrorZ ret_hu_conv = Result_ClosingSignedDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_ClosingSignedDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_ClosingSignedDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_ClosingSignedDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_ClosingSignedDecodeErrorZ ret_hu_conv = Result_ClosingSignedDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_ClosingSignedDecodeErrorZ _clone() {
+       public Result_ClosingSignedDecodeErrorZ clone() {
                number ret = bindings.CResult_ClosingSignedDecodeErrorZ_clone(this.ptr);
                Result_ClosingSignedDecodeErrorZ ret_hu_conv = Result_ClosingSignedDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index b324ff0adc034587f36ad2ca6f8f76cb056c93f8..87a4f9c334f18f33876338980f318291b60eda50 100644 (file)
@@ -37,21 +37,21 @@ public class Result_ClosingSignedFeeRangeDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_ClosingSignedFeeRangeDecodeErrorZ constructor__ok(ClosingSignedFeeRange o) {
+       public static Result_ClosingSignedFeeRangeDecodeErrorZ constructor_ok(ClosingSignedFeeRange o) {
                number ret = bindings.CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_ClosingSignedFeeRangeDecodeErrorZ ret_hu_conv = Result_ClosingSignedFeeRangeDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_ClosingSignedFeeRangeDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_ClosingSignedFeeRangeDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_ClosingSignedFeeRangeDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_ClosingSignedFeeRangeDecodeErrorZ ret_hu_conv = Result_ClosingSignedFeeRangeDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_ClosingSignedFeeRangeDecodeErrorZ _clone() {
+       public Result_ClosingSignedFeeRangeDecodeErrorZ clone() {
                number ret = bindings.CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(this.ptr);
                Result_ClosingSignedFeeRangeDecodeErrorZ ret_hu_conv = Result_ClosingSignedFeeRangeDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index a8e92e725e07ce62b49ac5ec6c49467bcb672b9f..4ba1a373be150d8ab5e9e5c70ef75b0f29c4a790 100644 (file)
@@ -37,21 +37,21 @@ public class Result_CommitmentSignedDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_CommitmentSignedDecodeErrorZ constructor__ok(CommitmentSigned o) {
+       public static Result_CommitmentSignedDecodeErrorZ constructor_ok(CommitmentSigned o) {
                number ret = bindings.CResult_CommitmentSignedDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_CommitmentSignedDecodeErrorZ ret_hu_conv = Result_CommitmentSignedDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_CommitmentSignedDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_CommitmentSignedDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_CommitmentSignedDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_CommitmentSignedDecodeErrorZ ret_hu_conv = Result_CommitmentSignedDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_CommitmentSignedDecodeErrorZ _clone() {
+       public Result_CommitmentSignedDecodeErrorZ clone() {
                number ret = bindings.CResult_CommitmentSignedDecodeErrorZ_clone(this.ptr);
                Result_CommitmentSignedDecodeErrorZ ret_hu_conv = Result_CommitmentSignedDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index cf248fb21eeb677b8af587ad71f2d0c985fed006..ed23d4af5971a8bb49805b46a23c840bacb4f7da 100644 (file)
@@ -37,21 +37,21 @@ public class Result_CommitmentTransactionDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_CommitmentTransactionDecodeErrorZ constructor__ok(CommitmentTransaction o) {
+       public static Result_CommitmentTransactionDecodeErrorZ constructor_ok(CommitmentTransaction o) {
                number ret = bindings.CResult_CommitmentTransactionDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_CommitmentTransactionDecodeErrorZ ret_hu_conv = Result_CommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_CommitmentTransactionDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_CommitmentTransactionDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_CommitmentTransactionDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_CommitmentTransactionDecodeErrorZ ret_hu_conv = Result_CommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_CommitmentTransactionDecodeErrorZ _clone() {
+       public Result_CommitmentTransactionDecodeErrorZ clone() {
                number ret = bindings.CResult_CommitmentTransactionDecodeErrorZ_clone(this.ptr);
                Result_CommitmentTransactionDecodeErrorZ ret_hu_conv = Result_CommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index c96ded5d2a7951ede97e50795b9b9f6fc407b7ea..92076dfe81932f46dce75d898b0a01495b713b54 100644 (file)
@@ -37,21 +37,21 @@ public class Result_CounterpartyChannelTransactionParametersDecodeErrorZ extends
                }
        }
 
-       public static Result_CounterpartyChannelTransactionParametersDecodeErrorZ constructor__ok(CounterpartyChannelTransactionParameters o) {
+       public static Result_CounterpartyChannelTransactionParametersDecodeErrorZ constructor_ok(CounterpartyChannelTransactionParameters o) {
                number ret = bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_CounterpartyChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_CounterpartyChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_CounterpartyChannelTransactionParametersDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_CounterpartyChannelTransactionParametersDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_CounterpartyChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_CounterpartyChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_CounterpartyChannelTransactionParametersDecodeErrorZ _clone() {
+       public Result_CounterpartyChannelTransactionParametersDecodeErrorZ clone() {
                number ret = bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(this.ptr);
                Result_CounterpartyChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_CounterpartyChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 90d5afddce5449674545e769e60a478d252245b7..dafd657559172a0986d0e2d9c82737e3ef6df20b 100644 (file)
@@ -37,21 +37,21 @@ public class Result_DelayedPaymentOutputDescriptorDecodeErrorZ extends CommonBas
                }
        }
 
-       public static Result_DelayedPaymentOutputDescriptorDecodeErrorZ constructor__ok(DelayedPaymentOutputDescriptor o) {
+       public static Result_DelayedPaymentOutputDescriptorDecodeErrorZ constructor_ok(DelayedPaymentOutputDescriptor o) {
                number ret = bindings.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_DelayedPaymentOutputDescriptorDecodeErrorZ ret_hu_conv = Result_DelayedPaymentOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_DelayedPaymentOutputDescriptorDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_DelayedPaymentOutputDescriptorDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_DelayedPaymentOutputDescriptorDecodeErrorZ ret_hu_conv = Result_DelayedPaymentOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_DelayedPaymentOutputDescriptorDecodeErrorZ _clone() {
+       public Result_DelayedPaymentOutputDescriptorDecodeErrorZ clone() {
                number ret = bindings.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(this.ptr);
                Result_DelayedPaymentOutputDescriptorDecodeErrorZ ret_hu_conv = Result_DelayedPaymentOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 3998a84cf7e40d61c45c6394f3737e6575f4d983..03ce1c35288cd82f1c7771d0678dee44e9ebd37b 100644 (file)
@@ -34,20 +34,20 @@ public class Result_DescriptionCreationErrorZ extends CommonBase {
                }
        }
 
-       public static Result_DescriptionCreationErrorZ constructor__ok(Description o) {
+       public static Result_DescriptionCreationErrorZ constructor_ok(Description o) {
                number ret = bindings.CResult_DescriptionCreationErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_DescriptionCreationErrorZ ret_hu_conv = Result_DescriptionCreationErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_DescriptionCreationErrorZ constructor__err(CreationError e) {
+       public static Result_DescriptionCreationErrorZ constructor_err(CreationError e) {
                number ret = bindings.CResult_DescriptionCreationErrorZ_err(e);
                Result_DescriptionCreationErrorZ ret_hu_conv = Result_DescriptionCreationErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public Result_DescriptionCreationErrorZ _clone() {
+       public Result_DescriptionCreationErrorZ clone() {
                number ret = bindings.CResult_DescriptionCreationErrorZ_clone(this.ptr);
                Result_DescriptionCreationErrorZ ret_hu_conv = Result_DescriptionCreationErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 84a6e3827b373c8f4a1a20095b53534dc4631a25..6ca7e36b786ed66aa0d871605fbede3fd87051ec 100644 (file)
@@ -37,21 +37,21 @@ public class Result_DirectionalChannelInfoDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_DirectionalChannelInfoDecodeErrorZ constructor__ok(DirectionalChannelInfo o) {
+       public static Result_DirectionalChannelInfoDecodeErrorZ constructor_ok(DirectionalChannelInfo o) {
                number ret = bindings.CResult_DirectionalChannelInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_DirectionalChannelInfoDecodeErrorZ ret_hu_conv = Result_DirectionalChannelInfoDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_DirectionalChannelInfoDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_DirectionalChannelInfoDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_DirectionalChannelInfoDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_DirectionalChannelInfoDecodeErrorZ ret_hu_conv = Result_DirectionalChannelInfoDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_DirectionalChannelInfoDecodeErrorZ _clone() {
+       public Result_DirectionalChannelInfoDecodeErrorZ clone() {
                number ret = bindings.CResult_DirectionalChannelInfoDecodeErrorZ_clone(this.ptr);
                Result_DirectionalChannelInfoDecodeErrorZ ret_hu_conv = Result_DirectionalChannelInfoDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 40b124b07e2c238108e921887ee7127e065fb627..35b4ccf1785ce483074b73a6c54eb622e48ea5cb 100644 (file)
@@ -37,21 +37,21 @@ public class Result_ErrorMessageDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_ErrorMessageDecodeErrorZ constructor__ok(ErrorMessage o) {
+       public static Result_ErrorMessageDecodeErrorZ constructor_ok(ErrorMessage o) {
                number ret = bindings.CResult_ErrorMessageDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_ErrorMessageDecodeErrorZ ret_hu_conv = Result_ErrorMessageDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_ErrorMessageDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_ErrorMessageDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_ErrorMessageDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_ErrorMessageDecodeErrorZ ret_hu_conv = Result_ErrorMessageDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_ErrorMessageDecodeErrorZ _clone() {
+       public Result_ErrorMessageDecodeErrorZ clone() {
                number ret = bindings.CResult_ErrorMessageDecodeErrorZ_clone(this.ptr);
                Result_ErrorMessageDecodeErrorZ ret_hu_conv = Result_ErrorMessageDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index a14253b6ece3ffedb74240d96d4fd586236b04b3..25763f78828cbaab91d8076c3096a87d8f25854d 100644 (file)
@@ -34,20 +34,20 @@ public class Result_ExpiryTimeCreationErrorZ extends CommonBase {
                }
        }
 
-       public static Result_ExpiryTimeCreationErrorZ constructor__ok(ExpiryTime o) {
+       public static Result_ExpiryTimeCreationErrorZ constructor_ok(ExpiryTime o) {
                number ret = bindings.CResult_ExpiryTimeCreationErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_ExpiryTimeCreationErrorZ ret_hu_conv = Result_ExpiryTimeCreationErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_ExpiryTimeCreationErrorZ constructor__err(CreationError e) {
+       public static Result_ExpiryTimeCreationErrorZ constructor_err(CreationError e) {
                number ret = bindings.CResult_ExpiryTimeCreationErrorZ_err(e);
                Result_ExpiryTimeCreationErrorZ ret_hu_conv = Result_ExpiryTimeCreationErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public Result_ExpiryTimeCreationErrorZ _clone() {
+       public Result_ExpiryTimeCreationErrorZ clone() {
                number ret = bindings.CResult_ExpiryTimeCreationErrorZ_clone(this.ptr);
                Result_ExpiryTimeCreationErrorZ ret_hu_conv = Result_ExpiryTimeCreationErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 758bf5756a546c6f6c05f4c1023c569bba4fc7c1..c9cc229b74ed527d9f0f1ce74f5f1251ef2b1ec0 100644 (file)
@@ -37,21 +37,21 @@ public class Result_FundingCreatedDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_FundingCreatedDecodeErrorZ constructor__ok(FundingCreated o) {
+       public static Result_FundingCreatedDecodeErrorZ constructor_ok(FundingCreated o) {
                number ret = bindings.CResult_FundingCreatedDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_FundingCreatedDecodeErrorZ ret_hu_conv = Result_FundingCreatedDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_FundingCreatedDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_FundingCreatedDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_FundingCreatedDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_FundingCreatedDecodeErrorZ ret_hu_conv = Result_FundingCreatedDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_FundingCreatedDecodeErrorZ _clone() {
+       public Result_FundingCreatedDecodeErrorZ clone() {
                number ret = bindings.CResult_FundingCreatedDecodeErrorZ_clone(this.ptr);
                Result_FundingCreatedDecodeErrorZ ret_hu_conv = Result_FundingCreatedDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 83e5f6b012ec9f93ff1303def1cf25631ca40518..7f48abd160f97629cd3c397015ffbaa15ace47c4 100644 (file)
@@ -37,21 +37,21 @@ public class Result_FundingLockedDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_FundingLockedDecodeErrorZ constructor__ok(FundingLocked o) {
+       public static Result_FundingLockedDecodeErrorZ constructor_ok(FundingLocked o) {
                number ret = bindings.CResult_FundingLockedDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_FundingLockedDecodeErrorZ ret_hu_conv = Result_FundingLockedDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_FundingLockedDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_FundingLockedDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_FundingLockedDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_FundingLockedDecodeErrorZ ret_hu_conv = Result_FundingLockedDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_FundingLockedDecodeErrorZ _clone() {
+       public Result_FundingLockedDecodeErrorZ clone() {
                number ret = bindings.CResult_FundingLockedDecodeErrorZ_clone(this.ptr);
                Result_FundingLockedDecodeErrorZ ret_hu_conv = Result_FundingLockedDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 046c8ede99038957404c782bbc781aead6674c21..720b580c5c7edb42670e0a2aa3175de55633055a 100644 (file)
@@ -37,21 +37,21 @@ public class Result_FundingSignedDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_FundingSignedDecodeErrorZ constructor__ok(FundingSigned o) {
+       public static Result_FundingSignedDecodeErrorZ constructor_ok(FundingSigned o) {
                number ret = bindings.CResult_FundingSignedDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_FundingSignedDecodeErrorZ ret_hu_conv = Result_FundingSignedDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_FundingSignedDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_FundingSignedDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_FundingSignedDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_FundingSignedDecodeErrorZ ret_hu_conv = Result_FundingSignedDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_FundingSignedDecodeErrorZ _clone() {
+       public Result_FundingSignedDecodeErrorZ clone() {
                number ret = bindings.CResult_FundingSignedDecodeErrorZ_clone(this.ptr);
                Result_FundingSignedDecodeErrorZ ret_hu_conv = Result_FundingSignedDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 8a4f07c23b64d2bd2159574fec9b18b976239e0c..7acab10af2bbc2c41cddc0ed3c9efcf659035bcd 100644 (file)
@@ -37,21 +37,21 @@ public class Result_GossipTimestampFilterDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_GossipTimestampFilterDecodeErrorZ constructor__ok(GossipTimestampFilter o) {
+       public static Result_GossipTimestampFilterDecodeErrorZ constructor_ok(GossipTimestampFilter o) {
                number ret = bindings.CResult_GossipTimestampFilterDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_GossipTimestampFilterDecodeErrorZ ret_hu_conv = Result_GossipTimestampFilterDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_GossipTimestampFilterDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_GossipTimestampFilterDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_GossipTimestampFilterDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_GossipTimestampFilterDecodeErrorZ ret_hu_conv = Result_GossipTimestampFilterDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_GossipTimestampFilterDecodeErrorZ _clone() {
+       public Result_GossipTimestampFilterDecodeErrorZ clone() {
                number ret = bindings.CResult_GossipTimestampFilterDecodeErrorZ_clone(this.ptr);
                Result_GossipTimestampFilterDecodeErrorZ ret_hu_conv = Result_GossipTimestampFilterDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 51e04765bee40368f7ca6075f1298857137a63d9..9a1a8ba4d8f5cf03998af535d882703580523c44 100644 (file)
@@ -37,21 +37,21 @@ public class Result_HTLCOutputInCommitmentDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_HTLCOutputInCommitmentDecodeErrorZ constructor__ok(HTLCOutputInCommitment o) {
+       public static Result_HTLCOutputInCommitmentDecodeErrorZ constructor_ok(HTLCOutputInCommitment o) {
                number ret = bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_HTLCOutputInCommitmentDecodeErrorZ ret_hu_conv = Result_HTLCOutputInCommitmentDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_HTLCOutputInCommitmentDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_HTLCOutputInCommitmentDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_HTLCOutputInCommitmentDecodeErrorZ ret_hu_conv = Result_HTLCOutputInCommitmentDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_HTLCOutputInCommitmentDecodeErrorZ _clone() {
+       public Result_HTLCOutputInCommitmentDecodeErrorZ clone() {
                number ret = bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(this.ptr);
                Result_HTLCOutputInCommitmentDecodeErrorZ ret_hu_conv = Result_HTLCOutputInCommitmentDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 14b061e2223415672fd5d4a924ab99e59e7bd341..af8fb9a39061bd8c01dcdaf39593e56c4535be22 100644 (file)
@@ -37,21 +37,21 @@ public class Result_HTLCUpdateDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_HTLCUpdateDecodeErrorZ constructor__ok(HTLCUpdate o) {
+       public static Result_HTLCUpdateDecodeErrorZ constructor_ok(HTLCUpdate o) {
                number ret = bindings.CResult_HTLCUpdateDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_HTLCUpdateDecodeErrorZ ret_hu_conv = Result_HTLCUpdateDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_HTLCUpdateDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_HTLCUpdateDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_HTLCUpdateDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_HTLCUpdateDecodeErrorZ ret_hu_conv = Result_HTLCUpdateDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_HTLCUpdateDecodeErrorZ _clone() {
+       public Result_HTLCUpdateDecodeErrorZ clone() {
                number ret = bindings.CResult_HTLCUpdateDecodeErrorZ_clone(this.ptr);
                Result_HTLCUpdateDecodeErrorZ ret_hu_conv = Result_HTLCUpdateDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index ff8a0ad49ca74533ca64be59a24adf1ae5bfc036..66162fa9a0b7ac7a4ede8db8df34b4462ab97b6b 100644 (file)
@@ -37,21 +37,21 @@ public class Result_HolderCommitmentTransactionDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_HolderCommitmentTransactionDecodeErrorZ constructor__ok(HolderCommitmentTransaction o) {
+       public static Result_HolderCommitmentTransactionDecodeErrorZ constructor_ok(HolderCommitmentTransaction o) {
                number ret = bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_HolderCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_HolderCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_HolderCommitmentTransactionDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_HolderCommitmentTransactionDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_HolderCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_HolderCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_HolderCommitmentTransactionDecodeErrorZ _clone() {
+       public Result_HolderCommitmentTransactionDecodeErrorZ clone() {
                number ret = bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_clone(this.ptr);
                Result_HolderCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_HolderCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index ad24b905fd60edfec24239e8aee626a9c61b0c4f..5bec0ad04de30ee87bad48078f3bfa72979e6a95 100644 (file)
@@ -37,21 +37,21 @@ public class Result_InMemorySignerDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_InMemorySignerDecodeErrorZ constructor__ok(InMemorySigner o) {
+       public static Result_InMemorySignerDecodeErrorZ constructor_ok(InMemorySigner o) {
                number ret = bindings.CResult_InMemorySignerDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_InMemorySignerDecodeErrorZ ret_hu_conv = Result_InMemorySignerDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_InMemorySignerDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_InMemorySignerDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_InMemorySignerDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_InMemorySignerDecodeErrorZ ret_hu_conv = Result_InMemorySignerDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_InMemorySignerDecodeErrorZ _clone() {
+       public Result_InMemorySignerDecodeErrorZ clone() {
                number ret = bindings.CResult_InMemorySignerDecodeErrorZ_clone(this.ptr);
                Result_InMemorySignerDecodeErrorZ ret_hu_conv = Result_InMemorySignerDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 48c57880dc3f98788580ca79b1c8e4f0b1c4f634..fca1945c711a72116cbc7f308a08fc9e16a40834 100644 (file)
@@ -37,21 +37,21 @@ public class Result_InitDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_InitDecodeErrorZ constructor__ok(Init o) {
+       public static Result_InitDecodeErrorZ constructor_ok(Init o) {
                number ret = bindings.CResult_InitDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_InitDecodeErrorZ ret_hu_conv = Result_InitDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_InitDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_InitDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_InitDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_InitDecodeErrorZ ret_hu_conv = Result_InitDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_InitDecodeErrorZ _clone() {
+       public Result_InitDecodeErrorZ clone() {
                number ret = bindings.CResult_InitDecodeErrorZ_clone(this.ptr);
                Result_InitDecodeErrorZ ret_hu_conv = Result_InitDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index a19501071b4d684213bce919532f48a1c1aea43b..8a6e6376235f8e966a38a4494b3e5ed0d23d4f23 100644 (file)
@@ -37,14 +37,14 @@ public class Result_InitFeaturesDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_InitFeaturesDecodeErrorZ constructor__ok(InitFeatures o) {
+       public static Result_InitFeaturesDecodeErrorZ constructor_ok(InitFeatures o) {
                number ret = bindings.CResult_InitFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_InitFeaturesDecodeErrorZ ret_hu_conv = Result_InitFeaturesDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_InitFeaturesDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_InitFeaturesDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_InitFeaturesDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_InitFeaturesDecodeErrorZ ret_hu_conv = Result_InitFeaturesDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
index 9f8baa89ba3a182ea684f3f8e86d17145d393142..134a7c48883b4087615f87d0a8b9378497a5d6d7 100644 (file)
@@ -37,14 +37,14 @@ public class Result_InvoiceFeaturesDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_InvoiceFeaturesDecodeErrorZ constructor__ok(InvoiceFeatures o) {
+       public static Result_InvoiceFeaturesDecodeErrorZ constructor_ok(InvoiceFeatures o) {
                number ret = bindings.CResult_InvoiceFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_InvoiceFeaturesDecodeErrorZ ret_hu_conv = Result_InvoiceFeaturesDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_InvoiceFeaturesDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_InvoiceFeaturesDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_InvoiceFeaturesDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_InvoiceFeaturesDecodeErrorZ ret_hu_conv = Result_InvoiceFeaturesDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
index fca6bf002e317820c9d1d4e214e10b7d9d18dfa6..f968f24239f16f818c448b3e396eeb1945b6112a 100644 (file)
@@ -32,20 +32,20 @@ public class Result_InvoiceNoneZ extends CommonBase {
                }
        }
 
-       public static Result_InvoiceNoneZ constructor__ok(Invoice o) {
+       public static Result_InvoiceNoneZ constructor_ok(Invoice o) {
                number ret = bindings.CResult_InvoiceNoneZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_InvoiceNoneZ ret_hu_conv = Result_InvoiceNoneZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_InvoiceNoneZ constructor__err() {
+       public static Result_InvoiceNoneZ constructor_err() {
                number ret = bindings.CResult_InvoiceNoneZ_err();
                Result_InvoiceNoneZ ret_hu_conv = Result_InvoiceNoneZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public Result_InvoiceNoneZ _clone() {
+       public Result_InvoiceNoneZ clone() {
                number ret = bindings.CResult_InvoiceNoneZ_clone(this.ptr);
                Result_InvoiceNoneZ ret_hu_conv = Result_InvoiceNoneZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 2d60784a4aab56962a39d76501abcd34c35b0a17..413ed95f7ae27e8773130587d8eb0d1967cac93f 100644 (file)
@@ -34,20 +34,20 @@ public class Result_InvoiceSemanticErrorZ extends CommonBase {
                }
        }
 
-       public static Result_InvoiceSemanticErrorZ constructor__ok(Invoice o) {
+       public static Result_InvoiceSemanticErrorZ constructor_ok(Invoice o) {
                number ret = bindings.CResult_InvoiceSemanticErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_InvoiceSemanticErrorZ ret_hu_conv = Result_InvoiceSemanticErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_InvoiceSemanticErrorZ constructor__err(SemanticError e) {
+       public static Result_InvoiceSemanticErrorZ constructor_err(SemanticError e) {
                number ret = bindings.CResult_InvoiceSemanticErrorZ_err(e);
                Result_InvoiceSemanticErrorZ ret_hu_conv = Result_InvoiceSemanticErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public Result_InvoiceSemanticErrorZ _clone() {
+       public Result_InvoiceSemanticErrorZ clone() {
                number ret = bindings.CResult_InvoiceSemanticErrorZ_clone(this.ptr);
                Result_InvoiceSemanticErrorZ ret_hu_conv = Result_InvoiceSemanticErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 1f3c091ab4a6f764b78746837dac4635f5b875d3..29144df7a7e4bf8db3c9edbccc95f47e5d0bfc25 100644 (file)
@@ -37,20 +37,20 @@ public class Result_InvoiceSignOrCreationErrorZ extends CommonBase {
                }
        }
 
-       public static Result_InvoiceSignOrCreationErrorZ constructor__ok(Invoice o) {
+       public static Result_InvoiceSignOrCreationErrorZ constructor_ok(Invoice o) {
                number ret = bindings.CResult_InvoiceSignOrCreationErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_InvoiceSignOrCreationErrorZ ret_hu_conv = Result_InvoiceSignOrCreationErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_InvoiceSignOrCreationErrorZ constructor__err(SignOrCreationError e) {
+       public static Result_InvoiceSignOrCreationErrorZ constructor_err(SignOrCreationError e) {
                number ret = bindings.CResult_InvoiceSignOrCreationErrorZ_err(e.ptr);
                Result_InvoiceSignOrCreationErrorZ ret_hu_conv = Result_InvoiceSignOrCreationErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public Result_InvoiceSignOrCreationErrorZ _clone() {
+       public Result_InvoiceSignOrCreationErrorZ clone() {
                number ret = bindings.CResult_InvoiceSignOrCreationErrorZ_clone(this.ptr);
                Result_InvoiceSignOrCreationErrorZ ret_hu_conv = Result_InvoiceSignOrCreationErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 892d0d0c58687a156c8655cb846df6418fcbb5a8..8cda5d9faba4591e1b332ddc0f590152945b22ba 100644 (file)
@@ -37,20 +37,20 @@ public class Result_NetAddressDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_NetAddressDecodeErrorZ constructor__ok(NetAddress o) {
+       public static Result_NetAddressDecodeErrorZ constructor_ok(NetAddress o) {
                number ret = bindings.CResult_NetAddressDecodeErrorZ_ok(o.ptr);
                Result_NetAddressDecodeErrorZ ret_hu_conv = Result_NetAddressDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static Result_NetAddressDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_NetAddressDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_NetAddressDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_NetAddressDecodeErrorZ ret_hu_conv = Result_NetAddressDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_NetAddressDecodeErrorZ _clone() {
+       public Result_NetAddressDecodeErrorZ clone() {
                number ret = bindings.CResult_NetAddressDecodeErrorZ_clone(this.ptr);
                Result_NetAddressDecodeErrorZ ret_hu_conv = Result_NetAddressDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 17ad93c274000c95885a26de0b6aa45a20dd7b66..54ae9355096d7b2a349d3e1a28210767e75cc1c2 100644 (file)
@@ -34,19 +34,19 @@ public class Result_NetAddressu8Z extends CommonBase {
                }
        }
 
-       public static Result_NetAddressu8Z constructor__ok(NetAddress o) {
+       public static Result_NetAddressu8Z constructor_ok(NetAddress o) {
                number ret = bindings.CResult_NetAddressu8Z_ok(o.ptr);
                Result_NetAddressu8Z ret_hu_conv = Result_NetAddressu8Z.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static Result_NetAddressu8Z constructor__err(number e) {
+       public static Result_NetAddressu8Z constructor_err(number e) {
                number ret = bindings.CResult_NetAddressu8Z_err(e);
                Result_NetAddressu8Z ret_hu_conv = Result_NetAddressu8Z.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public Result_NetAddressu8Z _clone() {
+       public Result_NetAddressu8Z clone() {
                number ret = bindings.CResult_NetAddressu8Z_clone(this.ptr);
                Result_NetAddressu8Z ret_hu_conv = Result_NetAddressu8Z.constr_from_ptr(ret);
                return ret_hu_conv;
index c201f78c2519b323bd4dfcfe8f266e1ee96d139a..1d2977a4b2040bbbf8c878807de750b21d1f566d 100644 (file)
@@ -37,17 +37,24 @@ public class Result_NetworkGraphDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_NetworkGraphDecodeErrorZ constructor__ok(Uint8Array o_genesis_hash) {
-               number ret = bindings.CResult_NetworkGraphDecodeErrorZ_ok(bindings.NetworkGraph_new(o_genesis_hash));
+       public static Result_NetworkGraphDecodeErrorZ constructor_ok(NetworkGraph o) {
+               number ret = bindings.CResult_NetworkGraphDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_NetworkGraphDecodeErrorZ ret_hu_conv = Result_NetworkGraphDecodeErrorZ.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_NetworkGraphDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_NetworkGraphDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_NetworkGraphDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_NetworkGraphDecodeErrorZ ret_hu_conv = Result_NetworkGraphDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
+       public Result_NetworkGraphDecodeErrorZ clone() {
+               number ret = bindings.CResult_NetworkGraphDecodeErrorZ_clone(this.ptr);
+               Result_NetworkGraphDecodeErrorZ ret_hu_conv = Result_NetworkGraphDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 4d02f8d762ca5b98d0fa7859243613f117c154db..06a42d6ccdf4e139d6d500b0a3b29427312aded5 100644 (file)
@@ -37,21 +37,21 @@ public class Result_NodeAnnouncementDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_NodeAnnouncementDecodeErrorZ constructor__ok(NodeAnnouncement o) {
+       public static Result_NodeAnnouncementDecodeErrorZ constructor_ok(NodeAnnouncement o) {
                number ret = bindings.CResult_NodeAnnouncementDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_NodeAnnouncementDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_NodeAnnouncementDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_NodeAnnouncementDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_NodeAnnouncementDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_NodeAnnouncementDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_NodeAnnouncementDecodeErrorZ _clone() {
+       public Result_NodeAnnouncementDecodeErrorZ clone() {
                number ret = bindings.CResult_NodeAnnouncementDecodeErrorZ_clone(this.ptr);
                Result_NodeAnnouncementDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 76c3f85b6852fdc407c3928886a90d2766590a48..9d2efb4f8689531c8898664e85d5d41738e3ad6e 100644 (file)
@@ -37,21 +37,21 @@ public class Result_NodeAnnouncementInfoDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_NodeAnnouncementInfoDecodeErrorZ constructor__ok(NodeAnnouncementInfo o) {
+       public static Result_NodeAnnouncementInfoDecodeErrorZ constructor_ok(NodeAnnouncementInfo o) {
                number ret = bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_NodeAnnouncementInfoDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementInfoDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_NodeAnnouncementInfoDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_NodeAnnouncementInfoDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_NodeAnnouncementInfoDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementInfoDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_NodeAnnouncementInfoDecodeErrorZ _clone() {
+       public Result_NodeAnnouncementInfoDecodeErrorZ clone() {
                number ret = bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_clone(this.ptr);
                Result_NodeAnnouncementInfoDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementInfoDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index c75d721b21b69ff16a15aa6b5ea822500d058fe6..c3b4df5e87cb6adbaf58081ce0c40e49f6854006 100644 (file)
@@ -37,14 +37,14 @@ public class Result_NodeFeaturesDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_NodeFeaturesDecodeErrorZ constructor__ok(NodeFeatures o) {
+       public static Result_NodeFeaturesDecodeErrorZ constructor_ok(NodeFeatures o) {
                number ret = bindings.CResult_NodeFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_NodeFeaturesDecodeErrorZ ret_hu_conv = Result_NodeFeaturesDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_NodeFeaturesDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_NodeFeaturesDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_NodeFeaturesDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_NodeFeaturesDecodeErrorZ ret_hu_conv = Result_NodeFeaturesDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
index 7c40d301ec0360c22e365d4d2850e6fbf76a6a45..73afdf742faf1c791d221ba417bcbf29bcd75d5a 100644 (file)
@@ -37,21 +37,21 @@ public class Result_NodeInfoDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_NodeInfoDecodeErrorZ constructor__ok(NodeInfo o) {
+       public static Result_NodeInfoDecodeErrorZ constructor_ok(NodeInfo o) {
                number ret = bindings.CResult_NodeInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_NodeInfoDecodeErrorZ ret_hu_conv = Result_NodeInfoDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_NodeInfoDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_NodeInfoDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_NodeInfoDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_NodeInfoDecodeErrorZ ret_hu_conv = Result_NodeInfoDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_NodeInfoDecodeErrorZ _clone() {
+       public Result_NodeInfoDecodeErrorZ clone() {
                number ret = bindings.CResult_NodeInfoDecodeErrorZ_clone(this.ptr);
                Result_NodeInfoDecodeErrorZ ret_hu_conv = Result_NodeInfoDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index a90182d55fef377895638917d16240e7f2e0f26f..adc37dd6fc527a3b2af2fd26088eb4486d39049a 100644 (file)
@@ -32,19 +32,19 @@ public class Result_NoneAPIErrorZ extends CommonBase {
                }
        }
 
-       public static Result_NoneAPIErrorZ constructor__ok() {
+       public static Result_NoneAPIErrorZ constructor_ok() {
                number ret = bindings.CResult_NoneAPIErrorZ_ok();
                Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static Result_NoneAPIErrorZ constructor__err(APIError e) {
+       public static Result_NoneAPIErrorZ constructor_err(APIError e) {
                number ret = bindings.CResult_NoneAPIErrorZ_err(e.ptr);
                Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public Result_NoneAPIErrorZ _clone() {
+       public Result_NoneAPIErrorZ clone() {
                number ret = bindings.CResult_NoneAPIErrorZ_clone(this.ptr);
                Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index fb7f42319c2d7476a0a49890e8f2d9b3930cb3c6..b22b36531a6b7be0a88173cfad509da0ebab8b17 100644 (file)
@@ -29,19 +29,19 @@ public class Result_NoneChannelMonitorUpdateErrZ extends CommonBase {
                }
        }
 
-       public static Result_NoneChannelMonitorUpdateErrZ constructor__ok() {
+       public static Result_NoneChannelMonitorUpdateErrZ constructor_ok() {
                number ret = bindings.CResult_NoneChannelMonitorUpdateErrZ_ok();
                Result_NoneChannelMonitorUpdateErrZ ret_hu_conv = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static Result_NoneChannelMonitorUpdateErrZ constructor__err(ChannelMonitorUpdateErr e) {
+       public static Result_NoneChannelMonitorUpdateErrZ constructor_err(ChannelMonitorUpdateErr e) {
                number ret = bindings.CResult_NoneChannelMonitorUpdateErrZ_err(e);
                Result_NoneChannelMonitorUpdateErrZ ret_hu_conv = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public Result_NoneChannelMonitorUpdateErrZ _clone() {
+       public Result_NoneChannelMonitorUpdateErrZ clone() {
                number ret = bindings.CResult_NoneChannelMonitorUpdateErrZ_clone(this.ptr);
                Result_NoneChannelMonitorUpdateErrZ ret_hu_conv = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 0d9c1d98eabfb7a9fbd9ac3d821311ce37384787..5e61813f52384b1c18f1c736e1417e05f003576a 100644 (file)
@@ -29,19 +29,19 @@ public class Result_NoneErrorZ extends CommonBase {
                }
        }
 
-       public static Result_NoneErrorZ constructor__ok() {
+       public static Result_NoneErrorZ constructor_ok() {
                number ret = bindings.CResult_NoneErrorZ_ok();
                Result_NoneErrorZ ret_hu_conv = Result_NoneErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static Result_NoneErrorZ constructor__err(IOError e) {
+       public static Result_NoneErrorZ constructor_err(IOError e) {
                number ret = bindings.CResult_NoneErrorZ_err(e);
                Result_NoneErrorZ ret_hu_conv = Result_NoneErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public Result_NoneErrorZ _clone() {
+       public Result_NoneErrorZ clone() {
                number ret = bindings.CResult_NoneErrorZ_clone(this.ptr);
                Result_NoneErrorZ ret_hu_conv = Result_NoneErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 86718862b9e3f0064f196a474e1720885a9d2a13..ffc9640d323be3e00244ad1214aacc8ce00af825 100644 (file)
@@ -32,20 +32,20 @@ public class Result_NoneLightningErrorZ extends CommonBase {
                }
        }
 
-       public static Result_NoneLightningErrorZ constructor__ok() {
+       public static Result_NoneLightningErrorZ constructor_ok() {
                number ret = bindings.CResult_NoneLightningErrorZ_ok();
                Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static Result_NoneLightningErrorZ constructor__err(LightningError e) {
+       public static Result_NoneLightningErrorZ constructor_err(LightningError e) {
                number ret = bindings.CResult_NoneLightningErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_NoneLightningErrorZ _clone() {
+       public Result_NoneLightningErrorZ clone() {
                number ret = bindings.CResult_NoneLightningErrorZ_clone(this.ptr);
                Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index d0984aece06f0600a52d8d08b49aff1a54530921..3aea907f2fec294d3393f01dc121f7709292237c 100644 (file)
@@ -32,20 +32,20 @@ public class Result_NoneMonitorUpdateErrorZ extends CommonBase {
                }
        }
 
-       public static Result_NoneMonitorUpdateErrorZ constructor__ok() {
+       public static Result_NoneMonitorUpdateErrorZ constructor_ok() {
                number ret = bindings.CResult_NoneMonitorUpdateErrorZ_ok();
                Result_NoneMonitorUpdateErrorZ ret_hu_conv = Result_NoneMonitorUpdateErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static Result_NoneMonitorUpdateErrorZ constructor__err(MonitorUpdateError e) {
+       public static Result_NoneMonitorUpdateErrorZ constructor_err(MonitorUpdateError e) {
                number ret = bindings.CResult_NoneMonitorUpdateErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_NoneMonitorUpdateErrorZ ret_hu_conv = Result_NoneMonitorUpdateErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_NoneMonitorUpdateErrorZ _clone() {
+       public Result_NoneMonitorUpdateErrorZ clone() {
                number ret = bindings.CResult_NoneMonitorUpdateErrorZ_clone(this.ptr);
                Result_NoneMonitorUpdateErrorZ ret_hu_conv = Result_NoneMonitorUpdateErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index ecc8f2cc6ebaf68c5c4444841ce7ba2b5970524d..d7939fa1341d29740d15b4d9c3799cc2e1e6138a 100644 (file)
@@ -27,19 +27,19 @@ public class Result_NoneNoneZ extends CommonBase {
                }
        }
 
-       public static Result_NoneNoneZ constructor__ok() {
+       public static Result_NoneNoneZ constructor_ok() {
                number ret = bindings.CResult_NoneNoneZ_ok();
                Result_NoneNoneZ ret_hu_conv = Result_NoneNoneZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static Result_NoneNoneZ constructor__err() {
+       public static Result_NoneNoneZ constructor_err() {
                number ret = bindings.CResult_NoneNoneZ_err();
                Result_NoneNoneZ ret_hu_conv = Result_NoneNoneZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public Result_NoneNoneZ _clone() {
+       public Result_NoneNoneZ clone() {
                number ret = bindings.CResult_NoneNoneZ_clone(this.ptr);
                Result_NoneNoneZ ret_hu_conv = Result_NoneNoneZ.constr_from_ptr(ret);
                return ret_hu_conv;
index d51a0c5645b0887e4af0fff42a04cf76d9df17a4..69a0ec152546dd433ca1eba998b629f03924d967 100644 (file)
@@ -32,19 +32,19 @@ public class Result_NonePaymentSendFailureZ extends CommonBase {
                }
        }
 
-       public static Result_NonePaymentSendFailureZ constructor__ok() {
+       public static Result_NonePaymentSendFailureZ constructor_ok() {
                number ret = bindings.CResult_NonePaymentSendFailureZ_ok();
                Result_NonePaymentSendFailureZ ret_hu_conv = Result_NonePaymentSendFailureZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static Result_NonePaymentSendFailureZ constructor__err(PaymentSendFailure e) {
+       public static Result_NonePaymentSendFailureZ constructor_err(PaymentSendFailure e) {
                number ret = bindings.CResult_NonePaymentSendFailureZ_err(e.ptr);
                Result_NonePaymentSendFailureZ ret_hu_conv = Result_NonePaymentSendFailureZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public Result_NonePaymentSendFailureZ _clone() {
+       public Result_NonePaymentSendFailureZ clone() {
                number ret = bindings.CResult_NonePaymentSendFailureZ_clone(this.ptr);
                Result_NonePaymentSendFailureZ ret_hu_conv = Result_NonePaymentSendFailureZ.constr_from_ptr(ret);
                return ret_hu_conv;
index c4ba64ef69ebe146379923d63c235c24a33948e2..181e70fb20a4b59b0e677f052e976756436f77a1 100644 (file)
@@ -32,20 +32,20 @@ public class Result_NonePeerHandleErrorZ extends CommonBase {
                }
        }
 
-       public static Result_NonePeerHandleErrorZ constructor__ok() {
+       public static Result_NonePeerHandleErrorZ constructor_ok() {
                number ret = bindings.CResult_NonePeerHandleErrorZ_ok();
                Result_NonePeerHandleErrorZ ret_hu_conv = Result_NonePeerHandleErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static Result_NonePeerHandleErrorZ constructor__err(PeerHandleError e) {
+       public static Result_NonePeerHandleErrorZ constructor_err(PeerHandleError e) {
                number ret = bindings.CResult_NonePeerHandleErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_NonePeerHandleErrorZ ret_hu_conv = Result_NonePeerHandleErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_NonePeerHandleErrorZ _clone() {
+       public Result_NonePeerHandleErrorZ clone() {
                number ret = bindings.CResult_NonePeerHandleErrorZ_clone(this.ptr);
                Result_NonePeerHandleErrorZ ret_hu_conv = Result_NonePeerHandleErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index b53c9621f95ad18fe35284af5ac20704b17ec6f6..b374cfd52001e5a000a2650d9f6f029d67ef2f57 100644 (file)
@@ -29,19 +29,19 @@ public class Result_NoneSemanticErrorZ extends CommonBase {
                }
        }
 
-       public static Result_NoneSemanticErrorZ constructor__ok() {
+       public static Result_NoneSemanticErrorZ constructor_ok() {
                number ret = bindings.CResult_NoneSemanticErrorZ_ok();
                Result_NoneSemanticErrorZ ret_hu_conv = Result_NoneSemanticErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static Result_NoneSemanticErrorZ constructor__err(SemanticError e) {
+       public static Result_NoneSemanticErrorZ constructor_err(SemanticError e) {
                number ret = bindings.CResult_NoneSemanticErrorZ_err(e);
                Result_NoneSemanticErrorZ ret_hu_conv = Result_NoneSemanticErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public Result_NoneSemanticErrorZ _clone() {
+       public Result_NoneSemanticErrorZ clone() {
                number ret = bindings.CResult_NoneSemanticErrorZ_clone(this.ptr);
                Result_NoneSemanticErrorZ ret_hu_conv = Result_NoneSemanticErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 8bce36ee64d066776325405ec9ae3ff2f8de915e..8c8432cd7e927f3eb221db17da313b469b9fe5b8 100644 (file)
@@ -37,21 +37,21 @@ public class Result_OpenChannelDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_OpenChannelDecodeErrorZ constructor__ok(OpenChannel o) {
+       public static Result_OpenChannelDecodeErrorZ constructor_ok(OpenChannel o) {
                number ret = bindings.CResult_OpenChannelDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_OpenChannelDecodeErrorZ ret_hu_conv = Result_OpenChannelDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_OpenChannelDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_OpenChannelDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_OpenChannelDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_OpenChannelDecodeErrorZ ret_hu_conv = Result_OpenChannelDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_OpenChannelDecodeErrorZ _clone() {
+       public Result_OpenChannelDecodeErrorZ clone() {
                number ret = bindings.CResult_OpenChannelDecodeErrorZ_clone(this.ptr);
                Result_OpenChannelDecodeErrorZ ret_hu_conv = Result_OpenChannelDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index bed0290b54b7d56c7f3bddb5accc1026dd8c1fcd..3630f89b3adbb46f8f2bb6b45d080b301e6d00d9 100644 (file)
@@ -37,21 +37,21 @@ public class Result_OutPointDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_OutPointDecodeErrorZ constructor__ok(OutPoint o) {
+       public static Result_OutPointDecodeErrorZ constructor_ok(OutPoint o) {
                number ret = bindings.CResult_OutPointDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_OutPointDecodeErrorZ ret_hu_conv = Result_OutPointDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_OutPointDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_OutPointDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_OutPointDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_OutPointDecodeErrorZ ret_hu_conv = Result_OutPointDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_OutPointDecodeErrorZ _clone() {
+       public Result_OutPointDecodeErrorZ clone() {
                number ret = bindings.CResult_OutPointDecodeErrorZ_clone(this.ptr);
                Result_OutPointDecodeErrorZ ret_hu_conv = Result_OutPointDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index ccb5a5b1d5c78a1ea7d5fe1031e83700cd547cb7..ddb146b9081a7e974d979a789482e216787c5008 100644 (file)
@@ -34,20 +34,20 @@ public class Result_PayeePubKeyErrorZ extends CommonBase {
                }
        }
 
-       public static Result_PayeePubKeyErrorZ constructor__ok(PayeePubKey o) {
+       public static Result_PayeePubKeyErrorZ constructor_ok(PayeePubKey o) {
                number ret = bindings.CResult_PayeePubKeyErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_PayeePubKeyErrorZ ret_hu_conv = Result_PayeePubKeyErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_PayeePubKeyErrorZ constructor__err(Secp256k1Error e) {
+       public static Result_PayeePubKeyErrorZ constructor_err(Secp256k1Error e) {
                number ret = bindings.CResult_PayeePubKeyErrorZ_err(e);
                Result_PayeePubKeyErrorZ ret_hu_conv = Result_PayeePubKeyErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public Result_PayeePubKeyErrorZ _clone() {
+       public Result_PayeePubKeyErrorZ clone() {
                number ret = bindings.CResult_PayeePubKeyErrorZ_clone(this.ptr);
                Result_PayeePubKeyErrorZ ret_hu_conv = Result_PayeePubKeyErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 41052fa50a586b898e7f315581b3670db6e5f112..e1648c3bb4a73cb8be9c59ab4a2e0c20c9bdc880 100644 (file)
@@ -34,19 +34,19 @@ public class Result_PaymentHashPaymentSendFailureZ extends CommonBase {
                }
        }
 
-       public static Result_PaymentHashPaymentSendFailureZ constructor__ok(Uint8Array o) {
+       public static Result_PaymentHashPaymentSendFailureZ constructor_ok(Uint8Array o) {
                number ret = bindings.CResult_PaymentHashPaymentSendFailureZ_ok(o);
                Result_PaymentHashPaymentSendFailureZ ret_hu_conv = Result_PaymentHashPaymentSendFailureZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static Result_PaymentHashPaymentSendFailureZ constructor__err(PaymentSendFailure e) {
+       public static Result_PaymentHashPaymentSendFailureZ constructor_err(PaymentSendFailure e) {
                number ret = bindings.CResult_PaymentHashPaymentSendFailureZ_err(e.ptr);
                Result_PaymentHashPaymentSendFailureZ ret_hu_conv = Result_PaymentHashPaymentSendFailureZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public Result_PaymentHashPaymentSendFailureZ _clone() {
+       public Result_PaymentHashPaymentSendFailureZ clone() {
                number ret = bindings.CResult_PaymentHashPaymentSendFailureZ_clone(this.ptr);
                Result_PaymentHashPaymentSendFailureZ ret_hu_conv = Result_PaymentHashPaymentSendFailureZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 4a9306f766e89b083b2604b8cb1fc7c158b3f48a..bc1caa2e76f47562ededf8d1e044d5f55d603cea 100644 (file)
@@ -34,19 +34,19 @@ public class Result_PaymentSecretAPIErrorZ extends CommonBase {
                }
        }
 
-       public static Result_PaymentSecretAPIErrorZ constructor__ok(Uint8Array o) {
+       public static Result_PaymentSecretAPIErrorZ constructor_ok(Uint8Array o) {
                number ret = bindings.CResult_PaymentSecretAPIErrorZ_ok(o);
                Result_PaymentSecretAPIErrorZ ret_hu_conv = Result_PaymentSecretAPIErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static Result_PaymentSecretAPIErrorZ constructor__err(APIError e) {
+       public static Result_PaymentSecretAPIErrorZ constructor_err(APIError e) {
                number ret = bindings.CResult_PaymentSecretAPIErrorZ_err(e.ptr);
                Result_PaymentSecretAPIErrorZ ret_hu_conv = Result_PaymentSecretAPIErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public Result_PaymentSecretAPIErrorZ _clone() {
+       public Result_PaymentSecretAPIErrorZ clone() {
                number ret = bindings.CResult_PaymentSecretAPIErrorZ_clone(this.ptr);
                Result_PaymentSecretAPIErrorZ ret_hu_conv = Result_PaymentSecretAPIErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index a2ce4415b77dfbac6f792e6107f03cf8eded8d27..11357f3b35bb23fa6a0a11164ac9068e70e0ab3c 100644 (file)
@@ -37,21 +37,21 @@ public class Result_PingDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_PingDecodeErrorZ constructor__ok(Ping o) {
+       public static Result_PingDecodeErrorZ constructor_ok(Ping o) {
                number ret = bindings.CResult_PingDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_PingDecodeErrorZ ret_hu_conv = Result_PingDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_PingDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_PingDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_PingDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_PingDecodeErrorZ ret_hu_conv = Result_PingDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_PingDecodeErrorZ _clone() {
+       public Result_PingDecodeErrorZ clone() {
                number ret = bindings.CResult_PingDecodeErrorZ_clone(this.ptr);
                Result_PingDecodeErrorZ ret_hu_conv = Result_PingDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 3ccbb31d63d35bcf8e73050fa9630cc5b8e724c1..9680b035f4d1278be8b5d744df7db742351c726e 100644 (file)
@@ -37,21 +37,21 @@ public class Result_PongDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_PongDecodeErrorZ constructor__ok(Pong o) {
+       public static Result_PongDecodeErrorZ constructor_ok(Pong o) {
                number ret = bindings.CResult_PongDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_PongDecodeErrorZ ret_hu_conv = Result_PongDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_PongDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_PongDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_PongDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_PongDecodeErrorZ ret_hu_conv = Result_PongDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_PongDecodeErrorZ _clone() {
+       public Result_PongDecodeErrorZ clone() {
                number ret = bindings.CResult_PongDecodeErrorZ_clone(this.ptr);
                Result_PongDecodeErrorZ ret_hu_conv = Result_PongDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 6e2945461a41b28953fe600466e65bf355dece71..39e685c0546cfbbd0552f1b316f27eb7590e0d52 100644 (file)
@@ -34,20 +34,20 @@ public class Result_PositiveTimestampCreationErrorZ extends CommonBase {
                }
        }
 
-       public static Result_PositiveTimestampCreationErrorZ constructor__ok(PositiveTimestamp o) {
+       public static Result_PositiveTimestampCreationErrorZ constructor_ok(PositiveTimestamp o) {
                number ret = bindings.CResult_PositiveTimestampCreationErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_PositiveTimestampCreationErrorZ ret_hu_conv = Result_PositiveTimestampCreationErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_PositiveTimestampCreationErrorZ constructor__err(CreationError e) {
+       public static Result_PositiveTimestampCreationErrorZ constructor_err(CreationError e) {
                number ret = bindings.CResult_PositiveTimestampCreationErrorZ_err(e);
                Result_PositiveTimestampCreationErrorZ ret_hu_conv = Result_PositiveTimestampCreationErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public Result_PositiveTimestampCreationErrorZ _clone() {
+       public Result_PositiveTimestampCreationErrorZ clone() {
                number ret = bindings.CResult_PositiveTimestampCreationErrorZ_clone(this.ptr);
                Result_PositiveTimestampCreationErrorZ ret_hu_conv = Result_PositiveTimestampCreationErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 1ec6b284619684b18450acc2a7051f0e13dc9a92..40e5e99eae07b76b35e2f6b91bba98a3a8b52eff 100644 (file)
@@ -34,20 +34,20 @@ public class Result_PrivateRouteCreationErrorZ extends CommonBase {
                }
        }
 
-       public static Result_PrivateRouteCreationErrorZ constructor__ok(PrivateRoute o) {
+       public static Result_PrivateRouteCreationErrorZ constructor_ok(PrivateRoute o) {
                number ret = bindings.CResult_PrivateRouteCreationErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_PrivateRouteCreationErrorZ ret_hu_conv = Result_PrivateRouteCreationErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_PrivateRouteCreationErrorZ constructor__err(CreationError e) {
+       public static Result_PrivateRouteCreationErrorZ constructor_err(CreationError e) {
                number ret = bindings.CResult_PrivateRouteCreationErrorZ_err(e);
                Result_PrivateRouteCreationErrorZ ret_hu_conv = Result_PrivateRouteCreationErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public Result_PrivateRouteCreationErrorZ _clone() {
+       public Result_PrivateRouteCreationErrorZ clone() {
                number ret = bindings.CResult_PrivateRouteCreationErrorZ_clone(this.ptr);
                Result_PrivateRouteCreationErrorZ ret_hu_conv = Result_PrivateRouteCreationErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 0e0bc78f541c72215500719cc077cc46ebed7d26..288fb3ee670d3debf5a144366dd5a722225b70b3 100644 (file)
@@ -31,19 +31,19 @@ public class Result_PublicKeyErrorZ extends CommonBase {
                }
        }
 
-       public static Result_PublicKeyErrorZ constructor__ok(Uint8Array o) {
+       public static Result_PublicKeyErrorZ constructor_ok(Uint8Array o) {
                number ret = bindings.CResult_PublicKeyErrorZ_ok(o);
                Result_PublicKeyErrorZ ret_hu_conv = Result_PublicKeyErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static Result_PublicKeyErrorZ constructor__err(Secp256k1Error e) {
+       public static Result_PublicKeyErrorZ constructor_err(Secp256k1Error e) {
                number ret = bindings.CResult_PublicKeyErrorZ_err(e);
                Result_PublicKeyErrorZ ret_hu_conv = Result_PublicKeyErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public Result_PublicKeyErrorZ _clone() {
+       public Result_PublicKeyErrorZ clone() {
                number ret = bindings.CResult_PublicKeyErrorZ_clone(this.ptr);
                Result_PublicKeyErrorZ ret_hu_conv = Result_PublicKeyErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 93c5c144beda06b32b9ef264a76db4ec45c86783..026f7962f8e6ce3ea784cecab75792d8dd650c44 100644 (file)
@@ -37,21 +37,21 @@ public class Result_QueryChannelRangeDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_QueryChannelRangeDecodeErrorZ constructor__ok(QueryChannelRange o) {
+       public static Result_QueryChannelRangeDecodeErrorZ constructor_ok(QueryChannelRange o) {
                number ret = bindings.CResult_QueryChannelRangeDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_QueryChannelRangeDecodeErrorZ ret_hu_conv = Result_QueryChannelRangeDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_QueryChannelRangeDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_QueryChannelRangeDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_QueryChannelRangeDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_QueryChannelRangeDecodeErrorZ ret_hu_conv = Result_QueryChannelRangeDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_QueryChannelRangeDecodeErrorZ _clone() {
+       public Result_QueryChannelRangeDecodeErrorZ clone() {
                number ret = bindings.CResult_QueryChannelRangeDecodeErrorZ_clone(this.ptr);
                Result_QueryChannelRangeDecodeErrorZ ret_hu_conv = Result_QueryChannelRangeDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 1f4a84a516a981f88b2a15f8f24b49bd84f5a99d..e3baf6bdb3fb0e3fc15b732f8dfdc75899f11bee 100644 (file)
@@ -37,21 +37,21 @@ public class Result_QueryShortChannelIdsDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_QueryShortChannelIdsDecodeErrorZ constructor__ok(QueryShortChannelIds o) {
+       public static Result_QueryShortChannelIdsDecodeErrorZ constructor_ok(QueryShortChannelIds o) {
                number ret = bindings.CResult_QueryShortChannelIdsDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_QueryShortChannelIdsDecodeErrorZ ret_hu_conv = Result_QueryShortChannelIdsDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_QueryShortChannelIdsDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_QueryShortChannelIdsDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_QueryShortChannelIdsDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_QueryShortChannelIdsDecodeErrorZ ret_hu_conv = Result_QueryShortChannelIdsDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_QueryShortChannelIdsDecodeErrorZ _clone() {
+       public Result_QueryShortChannelIdsDecodeErrorZ clone() {
                number ret = bindings.CResult_QueryShortChannelIdsDecodeErrorZ_clone(this.ptr);
                Result_QueryShortChannelIdsDecodeErrorZ ret_hu_conv = Result_QueryShortChannelIdsDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index c74722f43bfc76c2ce7a6766e13b771526d3fcef..0f03325d87cb8a1e2634c1c1fdb562e0daec8b02 100644 (file)
@@ -29,19 +29,19 @@ public class Result_RecoverableSignatureNoneZ extends CommonBase {
                }
        }
 
-       public static Result_RecoverableSignatureNoneZ constructor__ok(Uint8Array arg) {
+       public static Result_RecoverableSignatureNoneZ constructor_ok(Uint8Array arg) {
                number ret = bindings.CResult_RecoverableSignatureNoneZ_ok(arg);
                Result_RecoverableSignatureNoneZ ret_hu_conv = Result_RecoverableSignatureNoneZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static Result_RecoverableSignatureNoneZ constructor__err() {
+       public static Result_RecoverableSignatureNoneZ constructor_err() {
                number ret = bindings.CResult_RecoverableSignatureNoneZ_err();
                Result_RecoverableSignatureNoneZ ret_hu_conv = Result_RecoverableSignatureNoneZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public Result_RecoverableSignatureNoneZ _clone() {
+       public Result_RecoverableSignatureNoneZ clone() {
                number ret = bindings.CResult_RecoverableSignatureNoneZ_clone(this.ptr);
                Result_RecoverableSignatureNoneZ ret_hu_conv = Result_RecoverableSignatureNoneZ.constr_from_ptr(ret);
                return ret_hu_conv;
index ae17131021a77c10d3f03884f10506074fb39890..79323c14fa712a156a97140df8a65bd59f17702a 100644 (file)
@@ -37,21 +37,21 @@ public class Result_ReplyChannelRangeDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_ReplyChannelRangeDecodeErrorZ constructor__ok(ReplyChannelRange o) {
+       public static Result_ReplyChannelRangeDecodeErrorZ constructor_ok(ReplyChannelRange o) {
                number ret = bindings.CResult_ReplyChannelRangeDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_ReplyChannelRangeDecodeErrorZ ret_hu_conv = Result_ReplyChannelRangeDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_ReplyChannelRangeDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_ReplyChannelRangeDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_ReplyChannelRangeDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_ReplyChannelRangeDecodeErrorZ ret_hu_conv = Result_ReplyChannelRangeDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_ReplyChannelRangeDecodeErrorZ _clone() {
+       public Result_ReplyChannelRangeDecodeErrorZ clone() {
                number ret = bindings.CResult_ReplyChannelRangeDecodeErrorZ_clone(this.ptr);
                Result_ReplyChannelRangeDecodeErrorZ ret_hu_conv = Result_ReplyChannelRangeDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 33ce0ded58e2052c69016930e02d79c47a67482d..eb15da728e60088623fef3bda58c1732307defb9 100644 (file)
@@ -37,21 +37,21 @@ public class Result_ReplyShortChannelIdsEndDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_ReplyShortChannelIdsEndDecodeErrorZ constructor__ok(ReplyShortChannelIdsEnd o) {
+       public static Result_ReplyShortChannelIdsEndDecodeErrorZ constructor_ok(ReplyShortChannelIdsEnd o) {
                number ret = bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_ReplyShortChannelIdsEndDecodeErrorZ ret_hu_conv = Result_ReplyShortChannelIdsEndDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_ReplyShortChannelIdsEndDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_ReplyShortChannelIdsEndDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_ReplyShortChannelIdsEndDecodeErrorZ ret_hu_conv = Result_ReplyShortChannelIdsEndDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_ReplyShortChannelIdsEndDecodeErrorZ _clone() {
+       public Result_ReplyShortChannelIdsEndDecodeErrorZ clone() {
                number ret = bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(this.ptr);
                Result_ReplyShortChannelIdsEndDecodeErrorZ ret_hu_conv = Result_ReplyShortChannelIdsEndDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 9a125b63cd6e48b595e1dd6782df98c2e03f29be..33d03d068d61cb67db1797b04eb4115fa4d87637 100644 (file)
@@ -37,21 +37,21 @@ public class Result_RevokeAndACKDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_RevokeAndACKDecodeErrorZ constructor__ok(RevokeAndACK o) {
+       public static Result_RevokeAndACKDecodeErrorZ constructor_ok(RevokeAndACK o) {
                number ret = bindings.CResult_RevokeAndACKDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_RevokeAndACKDecodeErrorZ ret_hu_conv = Result_RevokeAndACKDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_RevokeAndACKDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_RevokeAndACKDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_RevokeAndACKDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_RevokeAndACKDecodeErrorZ ret_hu_conv = Result_RevokeAndACKDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_RevokeAndACKDecodeErrorZ _clone() {
+       public Result_RevokeAndACKDecodeErrorZ clone() {
                number ret = bindings.CResult_RevokeAndACKDecodeErrorZ_clone(this.ptr);
                Result_RevokeAndACKDecodeErrorZ ret_hu_conv = Result_RevokeAndACKDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 2a34d4498014fa3ad6e2cd2ffaec1f9bf1ae1038..509772505aa29073af3d96fa761da70dbd5bbf96 100644 (file)
@@ -37,21 +37,21 @@ public class Result_RouteDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_RouteDecodeErrorZ constructor__ok(Route o) {
+       public static Result_RouteDecodeErrorZ constructor_ok(Route o) {
                number ret = bindings.CResult_RouteDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_RouteDecodeErrorZ ret_hu_conv = Result_RouteDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_RouteDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_RouteDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_RouteDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_RouteDecodeErrorZ ret_hu_conv = Result_RouteDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_RouteDecodeErrorZ _clone() {
+       public Result_RouteDecodeErrorZ clone() {
                number ret = bindings.CResult_RouteDecodeErrorZ_clone(this.ptr);
                Result_RouteDecodeErrorZ ret_hu_conv = Result_RouteDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index e88d36899173559a93baa4831084b21dfb48b0f9..9ad8c5e917dfab4e384c5edceddd08403ad60de1 100644 (file)
@@ -37,21 +37,21 @@ public class Result_RouteHopDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_RouteHopDecodeErrorZ constructor__ok(RouteHop o) {
+       public static Result_RouteHopDecodeErrorZ constructor_ok(RouteHop o) {
                number ret = bindings.CResult_RouteHopDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_RouteHopDecodeErrorZ ret_hu_conv = Result_RouteHopDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_RouteHopDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_RouteHopDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_RouteHopDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_RouteHopDecodeErrorZ ret_hu_conv = Result_RouteHopDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_RouteHopDecodeErrorZ _clone() {
+       public Result_RouteHopDecodeErrorZ clone() {
                number ret = bindings.CResult_RouteHopDecodeErrorZ_clone(this.ptr);
                Result_RouteHopDecodeErrorZ ret_hu_conv = Result_RouteHopDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 47f961ea5e4671b78731403de444e9040c8c1221..08893bd15405450fad8da4540f2716d1f58f4020 100644 (file)
@@ -37,21 +37,21 @@ public class Result_RouteLightningErrorZ extends CommonBase {
                }
        }
 
-       public static Result_RouteLightningErrorZ constructor__ok(Route o) {
+       public static Result_RouteLightningErrorZ constructor_ok(Route o) {
                number ret = bindings.CResult_RouteLightningErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_RouteLightningErrorZ ret_hu_conv = Result_RouteLightningErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_RouteLightningErrorZ constructor__err(LightningError e) {
+       public static Result_RouteLightningErrorZ constructor_err(LightningError e) {
                number ret = bindings.CResult_RouteLightningErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_RouteLightningErrorZ ret_hu_conv = Result_RouteLightningErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_RouteLightningErrorZ _clone() {
+       public Result_RouteLightningErrorZ clone() {
                number ret = bindings.CResult_RouteLightningErrorZ_clone(this.ptr);
                Result_RouteLightningErrorZ ret_hu_conv = Result_RouteLightningErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 851ef573668c233a52e321ae7894eb1d05e7e578..cdeda046490a6897ff5ea120089a872445c0b0cb 100644 (file)
@@ -37,21 +37,21 @@ public class Result_RoutingFeesDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_RoutingFeesDecodeErrorZ constructor__ok(RoutingFees o) {
+       public static Result_RoutingFeesDecodeErrorZ constructor_ok(RoutingFees o) {
                number ret = bindings.CResult_RoutingFeesDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_RoutingFeesDecodeErrorZ ret_hu_conv = Result_RoutingFeesDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_RoutingFeesDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_RoutingFeesDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_RoutingFeesDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_RoutingFeesDecodeErrorZ ret_hu_conv = Result_RoutingFeesDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_RoutingFeesDecodeErrorZ _clone() {
+       public Result_RoutingFeesDecodeErrorZ clone() {
                number ret = bindings.CResult_RoutingFeesDecodeErrorZ_clone(this.ptr);
                Result_RoutingFeesDecodeErrorZ ret_hu_conv = Result_RoutingFeesDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 29c5729121dfa3c25ed37ad9761294075dd3bf87..817da050efb8f0a326f68da4130f6752f54b3864 100644 (file)
@@ -31,13 +31,13 @@ public class Result_SecretKeyErrorZ extends CommonBase {
                }
        }
 
-       public static Result_SecretKeyErrorZ constructor__ok(Uint8Array o) {
+       public static Result_SecretKeyErrorZ constructor_ok(Uint8Array o) {
                number ret = bindings.CResult_SecretKeyErrorZ_ok(o);
                Result_SecretKeyErrorZ ret_hu_conv = Result_SecretKeyErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static Result_SecretKeyErrorZ constructor__err(Secp256k1Error e) {
+       public static Result_SecretKeyErrorZ constructor_err(Secp256k1Error e) {
                number ret = bindings.CResult_SecretKeyErrorZ_err(e);
                Result_SecretKeyErrorZ ret_hu_conv = Result_SecretKeyErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 1c0c82d6201ed6fe28c63d78b2d1a3e75fc7e5ac..dcc445566cf0018956f593821f6a257f015233d1 100644 (file)
@@ -37,21 +37,21 @@ public class Result_ShutdownDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_ShutdownDecodeErrorZ constructor__ok(Shutdown o) {
+       public static Result_ShutdownDecodeErrorZ constructor_ok(Shutdown o) {
                number ret = bindings.CResult_ShutdownDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_ShutdownDecodeErrorZ ret_hu_conv = Result_ShutdownDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_ShutdownDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_ShutdownDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_ShutdownDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_ShutdownDecodeErrorZ ret_hu_conv = Result_ShutdownDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_ShutdownDecodeErrorZ _clone() {
+       public Result_ShutdownDecodeErrorZ clone() {
                number ret = bindings.CResult_ShutdownDecodeErrorZ_clone(this.ptr);
                Result_ShutdownDecodeErrorZ ret_hu_conv = Result_ShutdownDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index df2202446d99fce6ae213d5d9a0f0b61dc2d9203..8440e13a23a9cd3c8d77bed6b6cb9b13d8f16a48 100644 (file)
@@ -37,21 +37,21 @@ public class Result_ShutdownScriptDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_ShutdownScriptDecodeErrorZ constructor__ok(ShutdownScript o) {
+       public static Result_ShutdownScriptDecodeErrorZ constructor_ok(ShutdownScript o) {
                number ret = bindings.CResult_ShutdownScriptDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_ShutdownScriptDecodeErrorZ ret_hu_conv = Result_ShutdownScriptDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_ShutdownScriptDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_ShutdownScriptDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_ShutdownScriptDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_ShutdownScriptDecodeErrorZ ret_hu_conv = Result_ShutdownScriptDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_ShutdownScriptDecodeErrorZ _clone() {
+       public Result_ShutdownScriptDecodeErrorZ clone() {
                number ret = bindings.CResult_ShutdownScriptDecodeErrorZ_clone(this.ptr);
                Result_ShutdownScriptDecodeErrorZ ret_hu_conv = Result_ShutdownScriptDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 4db137b1d3623f8db5393afad92b455cad1a9ff3..36edfb32403dd514f89b5d1446578b111db914ef 100644 (file)
@@ -37,14 +37,14 @@ public class Result_ShutdownScriptInvalidShutdownScriptZ extends CommonBase {
                }
        }
 
-       public static Result_ShutdownScriptInvalidShutdownScriptZ constructor__ok(ShutdownScript o) {
+       public static Result_ShutdownScriptInvalidShutdownScriptZ constructor_ok(ShutdownScript o) {
                number ret = bindings.CResult_ShutdownScriptInvalidShutdownScriptZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_ShutdownScriptInvalidShutdownScriptZ ret_hu_conv = Result_ShutdownScriptInvalidShutdownScriptZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_ShutdownScriptInvalidShutdownScriptZ constructor__err(Uint8Array e_script_arg) {
+       public static Result_ShutdownScriptInvalidShutdownScriptZ constructor_err(Uint8Array e_script_arg) {
                number ret = bindings.CResult_ShutdownScriptInvalidShutdownScriptZ_err(bindings.InvalidShutdownScript_new(e_script_arg));
                Result_ShutdownScriptInvalidShutdownScriptZ ret_hu_conv = Result_ShutdownScriptInvalidShutdownScriptZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 6ed8e15c31520e98a2170a23e96d58ef449b1dd5..0bb1c2362d47efd2de1e9323a841a1aef569c6cc 100644 (file)
@@ -29,19 +29,19 @@ public class Result_SiPrefixNoneZ extends CommonBase {
                }
        }
 
-       public static Result_SiPrefixNoneZ constructor__ok(SiPrefix o) {
+       public static Result_SiPrefixNoneZ constructor_ok(SiPrefix o) {
                number ret = bindings.CResult_SiPrefixNoneZ_ok(o);
                Result_SiPrefixNoneZ ret_hu_conv = Result_SiPrefixNoneZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static Result_SiPrefixNoneZ constructor__err() {
+       public static Result_SiPrefixNoneZ constructor_err() {
                number ret = bindings.CResult_SiPrefixNoneZ_err();
                Result_SiPrefixNoneZ ret_hu_conv = Result_SiPrefixNoneZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public Result_SiPrefixNoneZ _clone() {
+       public Result_SiPrefixNoneZ clone() {
                number ret = bindings.CResult_SiPrefixNoneZ_clone(this.ptr);
                Result_SiPrefixNoneZ ret_hu_conv = Result_SiPrefixNoneZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 9fa88d158d223c3b662a534bf5fd1fe3f33b2b26..564dd18fe1a53d6368d5d29e5a2bcbb1d0ff65b7 100644 (file)
@@ -37,21 +37,21 @@ public class Result_SignDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_SignDecodeErrorZ constructor__ok(Sign o) {
+       public static Result_SignDecodeErrorZ constructor_ok(Sign o) {
                number ret = bindings.CResult_SignDecodeErrorZ_ok(o == null ? 0 : o.ptr);
                Result_SignDecodeErrorZ ret_hu_conv = Result_SignDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_SignDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_SignDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_SignDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_SignDecodeErrorZ ret_hu_conv = Result_SignDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_SignDecodeErrorZ _clone() {
+       public Result_SignDecodeErrorZ clone() {
                number ret = bindings.CResult_SignDecodeErrorZ_clone(this.ptr);
                Result_SignDecodeErrorZ ret_hu_conv = Result_SignDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 0f884fda9e81777a66bd84d7034c6c0e737c80eb..5297299e7608b83c21eaefa6244d296698799941 100644 (file)
@@ -29,19 +29,19 @@ public class Result_SignatureNoneZ extends CommonBase {
                }
        }
 
-       public static Result_SignatureNoneZ constructor__ok(Uint8Array o) {
+       public static Result_SignatureNoneZ constructor_ok(Uint8Array o) {
                number ret = bindings.CResult_SignatureNoneZ_ok(o);
                Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static Result_SignatureNoneZ constructor__err() {
+       public static Result_SignatureNoneZ constructor_err() {
                number ret = bindings.CResult_SignatureNoneZ_err();
                Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public Result_SignatureNoneZ _clone() {
+       public Result_SignatureNoneZ clone() {
                number ret = bindings.CResult_SignatureNoneZ_clone(this.ptr);
                Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 9db516d476acdb8fcec63e1006db616b5fe7f0e6..4e309b2a0456fdeb89eda824cb7a3d453383b53a 100644 (file)
@@ -32,20 +32,20 @@ public class Result_SignedRawInvoiceNoneZ extends CommonBase {
                }
        }
 
-       public static Result_SignedRawInvoiceNoneZ constructor__ok(SignedRawInvoice o) {
+       public static Result_SignedRawInvoiceNoneZ constructor_ok(SignedRawInvoice o) {
                number ret = bindings.CResult_SignedRawInvoiceNoneZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_SignedRawInvoiceNoneZ ret_hu_conv = Result_SignedRawInvoiceNoneZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_SignedRawInvoiceNoneZ constructor__err() {
+       public static Result_SignedRawInvoiceNoneZ constructor_err() {
                number ret = bindings.CResult_SignedRawInvoiceNoneZ_err();
                Result_SignedRawInvoiceNoneZ ret_hu_conv = Result_SignedRawInvoiceNoneZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public Result_SignedRawInvoiceNoneZ _clone() {
+       public Result_SignedRawInvoiceNoneZ clone() {
                number ret = bindings.CResult_SignedRawInvoiceNoneZ_clone(this.ptr);
                Result_SignedRawInvoiceNoneZ ret_hu_conv = Result_SignedRawInvoiceNoneZ.constr_from_ptr(ret);
                return ret_hu_conv;
index c47948faba8023dc9be155149562c7aeb77d917f..881d85b5205cabfa054be09dfad6d1c2aac3d1f7 100644 (file)
@@ -37,20 +37,20 @@ public class Result_SpendableOutputDescriptorDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_SpendableOutputDescriptorDecodeErrorZ constructor__ok(SpendableOutputDescriptor o) {
+       public static Result_SpendableOutputDescriptorDecodeErrorZ constructor_ok(SpendableOutputDescriptor o) {
                number ret = bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o.ptr);
                Result_SpendableOutputDescriptorDecodeErrorZ ret_hu_conv = Result_SpendableOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static Result_SpendableOutputDescriptorDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_SpendableOutputDescriptorDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_SpendableOutputDescriptorDecodeErrorZ ret_hu_conv = Result_SpendableOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_SpendableOutputDescriptorDecodeErrorZ _clone() {
+       public Result_SpendableOutputDescriptorDecodeErrorZ clone() {
                number ret = bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_clone(this.ptr);
                Result_SpendableOutputDescriptorDecodeErrorZ ret_hu_conv = Result_SpendableOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index ab8974c666693d39767dabaa87ded2079e58f4b3..17eb578a5efa9496d0a0c11c9d55e4fa33cc71d5 100644 (file)
@@ -37,21 +37,21 @@ public class Result_StaticPaymentOutputDescriptorDecodeErrorZ extends CommonBase
                }
        }
 
-       public static Result_StaticPaymentOutputDescriptorDecodeErrorZ constructor__ok(StaticPaymentOutputDescriptor o) {
+       public static Result_StaticPaymentOutputDescriptorDecodeErrorZ constructor_ok(StaticPaymentOutputDescriptor o) {
                number ret = bindings.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_StaticPaymentOutputDescriptorDecodeErrorZ ret_hu_conv = Result_StaticPaymentOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_StaticPaymentOutputDescriptorDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_StaticPaymentOutputDescriptorDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_StaticPaymentOutputDescriptorDecodeErrorZ ret_hu_conv = Result_StaticPaymentOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_StaticPaymentOutputDescriptorDecodeErrorZ _clone() {
+       public Result_StaticPaymentOutputDescriptorDecodeErrorZ clone() {
                number ret = bindings.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(this.ptr);
                Result_StaticPaymentOutputDescriptorDecodeErrorZ ret_hu_conv = Result_StaticPaymentOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 5876b1e3a22b908ebfecaa3a4b0491c2843597df..e5c9da4c70c3bed3355bf0773cb31e31098b40b0 100644 (file)
@@ -31,13 +31,13 @@ public class Result_StringErrorZ extends CommonBase {
                }
        }
 
-       public static Result_StringErrorZ constructor__ok(String o) {
+       public static Result_StringErrorZ constructor_ok(String o) {
                number ret = bindings.CResult_StringErrorZ_ok(o);
                Result_StringErrorZ ret_hu_conv = Result_StringErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static Result_StringErrorZ constructor__err(Secp256k1Error e) {
+       public static Result_StringErrorZ constructor_err(Secp256k1Error e) {
                number ret = bindings.CResult_StringErrorZ_err(e);
                Result_StringErrorZ ret_hu_conv = Result_StringErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index db26096d3a0be39677b6dbc4d09d5b77e9eb11a1..1e51b2e2f639b6c82a5b2860453f443ac94f68dc 100644 (file)
@@ -29,19 +29,19 @@ public class Result_TransactionNoneZ extends CommonBase {
                }
        }
 
-       public static Result_TransactionNoneZ constructor__ok(Uint8Array o) {
+       public static Result_TransactionNoneZ constructor_ok(Uint8Array o) {
                number ret = bindings.CResult_TransactionNoneZ_ok(o);
                Result_TransactionNoneZ ret_hu_conv = Result_TransactionNoneZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static Result_TransactionNoneZ constructor__err() {
+       public static Result_TransactionNoneZ constructor_err() {
                number ret = bindings.CResult_TransactionNoneZ_err();
                Result_TransactionNoneZ ret_hu_conv = Result_TransactionNoneZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public Result_TransactionNoneZ _clone() {
+       public Result_TransactionNoneZ clone() {
                number ret = bindings.CResult_TransactionNoneZ_clone(this.ptr);
                Result_TransactionNoneZ ret_hu_conv = Result_TransactionNoneZ.constr_from_ptr(ret);
                return ret_hu_conv;
index a5d353b81efff8a61d1db7360dbae882f2278187..31a100d1c4f34b9332411920334446c444f2ac57 100644 (file)
@@ -32,7 +32,7 @@ public class Result_TrustedClosingTransactionNoneZ extends CommonBase {
                }
        }
 
-       public static Result_TrustedClosingTransactionNoneZ constructor__ok(TrustedClosingTransaction o) {
+       public static Result_TrustedClosingTransactionNoneZ constructor_ok(TrustedClosingTransaction o) {
                number ret = bindings.CResult_TrustedClosingTransactionNoneZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_TrustedClosingTransactionNoneZ ret_hu_conv = Result_TrustedClosingTransactionNoneZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
@@ -47,7 +47,7 @@ public class Result_TrustedClosingTransactionNoneZ extends CommonBase {
                return ret_hu_conv;
        }
 
-       public static Result_TrustedClosingTransactionNoneZ constructor__err() {
+       public static Result_TrustedClosingTransactionNoneZ constructor_err() {
                number ret = bindings.CResult_TrustedClosingTransactionNoneZ_err();
                Result_TrustedClosingTransactionNoneZ ret_hu_conv = Result_TrustedClosingTransactionNoneZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 641a008f99c595859a9a6c730078072706f0c970..7a29641e5877187afdfeba548bba979a169aa763 100644 (file)
@@ -32,7 +32,7 @@ public class Result_TrustedCommitmentTransactionNoneZ extends CommonBase {
                }
        }
 
-       public static Result_TrustedCommitmentTransactionNoneZ constructor__ok(TrustedCommitmentTransaction o) {
+       public static Result_TrustedCommitmentTransactionNoneZ constructor_ok(TrustedCommitmentTransaction o) {
                number ret = bindings.CResult_TrustedCommitmentTransactionNoneZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_TrustedCommitmentTransactionNoneZ ret_hu_conv = Result_TrustedCommitmentTransactionNoneZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
@@ -47,7 +47,7 @@ public class Result_TrustedCommitmentTransactionNoneZ extends CommonBase {
                return ret_hu_conv;
        }
 
-       public static Result_TrustedCommitmentTransactionNoneZ constructor__err() {
+       public static Result_TrustedCommitmentTransactionNoneZ constructor_err() {
                number ret = bindings.CResult_TrustedCommitmentTransactionNoneZ_err();
                Result_TrustedCommitmentTransactionNoneZ ret_hu_conv = Result_TrustedCommitmentTransactionNoneZ.constr_from_ptr(ret);
                return ret_hu_conv;
index fece556fe6085df23eab8d91f78afff5a0d0a381..0356a8568c79f7f4e07cead740e239d2711b6f59 100644 (file)
@@ -37,21 +37,21 @@ public class Result_TxCreationKeysDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_TxCreationKeysDecodeErrorZ constructor__ok(TxCreationKeys o) {
+       public static Result_TxCreationKeysDecodeErrorZ constructor_ok(TxCreationKeys o) {
                number ret = bindings.CResult_TxCreationKeysDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_TxCreationKeysDecodeErrorZ ret_hu_conv = Result_TxCreationKeysDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_TxCreationKeysDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_TxCreationKeysDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_TxCreationKeysDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_TxCreationKeysDecodeErrorZ ret_hu_conv = Result_TxCreationKeysDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_TxCreationKeysDecodeErrorZ _clone() {
+       public Result_TxCreationKeysDecodeErrorZ clone() {
                number ret = bindings.CResult_TxCreationKeysDecodeErrorZ_clone(this.ptr);
                Result_TxCreationKeysDecodeErrorZ ret_hu_conv = Result_TxCreationKeysDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 095771c37c3801b84b0a01cb6a1038e107df5b38..77fef19bd35532228462562ac1466a0aec0ce530 100644 (file)
@@ -34,20 +34,20 @@ public class Result_TxCreationKeysErrorZ extends CommonBase {
                }
        }
 
-       public static Result_TxCreationKeysErrorZ constructor__ok(TxCreationKeys o) {
+       public static Result_TxCreationKeysErrorZ constructor_ok(TxCreationKeys o) {
                number ret = bindings.CResult_TxCreationKeysErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_TxCreationKeysErrorZ ret_hu_conv = Result_TxCreationKeysErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_TxCreationKeysErrorZ constructor__err(Secp256k1Error e) {
+       public static Result_TxCreationKeysErrorZ constructor_err(Secp256k1Error e) {
                number ret = bindings.CResult_TxCreationKeysErrorZ_err(e);
                Result_TxCreationKeysErrorZ ret_hu_conv = Result_TxCreationKeysErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public Result_TxCreationKeysErrorZ _clone() {
+       public Result_TxCreationKeysErrorZ clone() {
                number ret = bindings.CResult_TxCreationKeysErrorZ_clone(this.ptr);
                Result_TxCreationKeysErrorZ ret_hu_conv = Result_TxCreationKeysErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index ff254c6648182955e7fa883def67e467c63abc6c..f72042f9d698e1b493ebd51cb21a84ca9fbdf0c2 100644 (file)
@@ -33,19 +33,19 @@ public class Result_TxOutAccessErrorZ extends CommonBase {
                }
        }
 
-       public static Result_TxOutAccessErrorZ constructor__ok(TxOut o) {
+       public static Result_TxOutAccessErrorZ constructor_ok(TxOut o) {
                number ret = bindings.CResult_TxOutAccessErrorZ_ok(o.ptr);
                Result_TxOutAccessErrorZ ret_hu_conv = Result_TxOutAccessErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static Result_TxOutAccessErrorZ constructor__err(AccessError e) {
+       public static Result_TxOutAccessErrorZ constructor_err(AccessError e) {
                number ret = bindings.CResult_TxOutAccessErrorZ_err(e);
                Result_TxOutAccessErrorZ ret_hu_conv = Result_TxOutAccessErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public Result_TxOutAccessErrorZ _clone() {
+       public Result_TxOutAccessErrorZ clone() {
                number ret = bindings.CResult_TxOutAccessErrorZ_clone(this.ptr);
                Result_TxOutAccessErrorZ ret_hu_conv = Result_TxOutAccessErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index f0ed63edb9a65078c3dde275b4b90179c456efb0..a7a4011c6526c591a3f2c9967abd59383aa2b6a3 100644 (file)
@@ -37,21 +37,21 @@ public class Result_UnsignedChannelAnnouncementDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_UnsignedChannelAnnouncementDecodeErrorZ constructor__ok(UnsignedChannelAnnouncement o) {
+       public static Result_UnsignedChannelAnnouncementDecodeErrorZ constructor_ok(UnsignedChannelAnnouncement o) {
                number ret = bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_UnsignedChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_UnsignedChannelAnnouncementDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_UnsignedChannelAnnouncementDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_UnsignedChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_UnsignedChannelAnnouncementDecodeErrorZ _clone() {
+       public Result_UnsignedChannelAnnouncementDecodeErrorZ clone() {
                number ret = bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(this.ptr);
                Result_UnsignedChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index a77733fd80521f2bab631d281a86b59f57152174..2e1d34202a34b110a8b87df4d2da411b458a3f35 100644 (file)
@@ -37,21 +37,21 @@ public class Result_UnsignedChannelUpdateDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_UnsignedChannelUpdateDecodeErrorZ constructor__ok(UnsignedChannelUpdate o) {
+       public static Result_UnsignedChannelUpdateDecodeErrorZ constructor_ok(UnsignedChannelUpdate o) {
                number ret = bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_UnsignedChannelUpdateDecodeErrorZ ret_hu_conv = Result_UnsignedChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_UnsignedChannelUpdateDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_UnsignedChannelUpdateDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_UnsignedChannelUpdateDecodeErrorZ ret_hu_conv = Result_UnsignedChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_UnsignedChannelUpdateDecodeErrorZ _clone() {
+       public Result_UnsignedChannelUpdateDecodeErrorZ clone() {
                number ret = bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_clone(this.ptr);
                Result_UnsignedChannelUpdateDecodeErrorZ ret_hu_conv = Result_UnsignedChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 7431e082a00e27b32bad6b60b18296cbcb9f75d4..95bdf2820f8cbd1d4a4991bd2a7661fa21659b0b 100644 (file)
@@ -37,21 +37,21 @@ public class Result_UnsignedNodeAnnouncementDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_UnsignedNodeAnnouncementDecodeErrorZ constructor__ok(UnsignedNodeAnnouncement o) {
+       public static Result_UnsignedNodeAnnouncementDecodeErrorZ constructor_ok(UnsignedNodeAnnouncement o) {
                number ret = bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_UnsignedNodeAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedNodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_UnsignedNodeAnnouncementDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_UnsignedNodeAnnouncementDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_UnsignedNodeAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedNodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_UnsignedNodeAnnouncementDecodeErrorZ _clone() {
+       public Result_UnsignedNodeAnnouncementDecodeErrorZ clone() {
                number ret = bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(this.ptr);
                Result_UnsignedNodeAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedNodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 0f0e7c282f52ba3392e65ca0e1ce3751d9595d4d..a5a53ec5ff72226def32a354203999b9b9ce7619 100644 (file)
@@ -37,21 +37,21 @@ public class Result_UpdateAddHTLCDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_UpdateAddHTLCDecodeErrorZ constructor__ok(UpdateAddHTLC o) {
+       public static Result_UpdateAddHTLCDecodeErrorZ constructor_ok(UpdateAddHTLC o) {
                number ret = bindings.CResult_UpdateAddHTLCDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_UpdateAddHTLCDecodeErrorZ ret_hu_conv = Result_UpdateAddHTLCDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_UpdateAddHTLCDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_UpdateAddHTLCDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_UpdateAddHTLCDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_UpdateAddHTLCDecodeErrorZ ret_hu_conv = Result_UpdateAddHTLCDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_UpdateAddHTLCDecodeErrorZ _clone() {
+       public Result_UpdateAddHTLCDecodeErrorZ clone() {
                number ret = bindings.CResult_UpdateAddHTLCDecodeErrorZ_clone(this.ptr);
                Result_UpdateAddHTLCDecodeErrorZ ret_hu_conv = Result_UpdateAddHTLCDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index b8a0a378e1b24ddda8f705e689725b294b7d216c..c0494e0271cf425c0e2d355849bf54cff2d5d4a3 100644 (file)
@@ -37,21 +37,21 @@ public class Result_UpdateFailHTLCDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_UpdateFailHTLCDecodeErrorZ constructor__ok(UpdateFailHTLC o) {
+       public static Result_UpdateFailHTLCDecodeErrorZ constructor_ok(UpdateFailHTLC o) {
                number ret = bindings.CResult_UpdateFailHTLCDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_UpdateFailHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailHTLCDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_UpdateFailHTLCDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_UpdateFailHTLCDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_UpdateFailHTLCDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_UpdateFailHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailHTLCDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_UpdateFailHTLCDecodeErrorZ _clone() {
+       public Result_UpdateFailHTLCDecodeErrorZ clone() {
                number ret = bindings.CResult_UpdateFailHTLCDecodeErrorZ_clone(this.ptr);
                Result_UpdateFailHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailHTLCDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index b56c04a54a67ed66615e67d2fc8b1c7dfe5459c3..212c1d98e1fd752bd8527987617663452b8c1cb4 100644 (file)
@@ -37,21 +37,21 @@ public class Result_UpdateFailMalformedHTLCDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_UpdateFailMalformedHTLCDecodeErrorZ constructor__ok(UpdateFailMalformedHTLC o) {
+       public static Result_UpdateFailMalformedHTLCDecodeErrorZ constructor_ok(UpdateFailMalformedHTLC o) {
                number ret = bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_UpdateFailMalformedHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailMalformedHTLCDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_UpdateFailMalformedHTLCDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_UpdateFailMalformedHTLCDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_UpdateFailMalformedHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailMalformedHTLCDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_UpdateFailMalformedHTLCDecodeErrorZ _clone() {
+       public Result_UpdateFailMalformedHTLCDecodeErrorZ clone() {
                number ret = bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(this.ptr);
                Result_UpdateFailMalformedHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailMalformedHTLCDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 8f124ba501e86f1cb7d6c18a0293b3fdb714417a..a5ba9a253b9dd3a7b58cbdd04a095e96afac7c60 100644 (file)
@@ -37,21 +37,21 @@ public class Result_UpdateFeeDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_UpdateFeeDecodeErrorZ constructor__ok(UpdateFee o) {
+       public static Result_UpdateFeeDecodeErrorZ constructor_ok(UpdateFee o) {
                number ret = bindings.CResult_UpdateFeeDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_UpdateFeeDecodeErrorZ ret_hu_conv = Result_UpdateFeeDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_UpdateFeeDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_UpdateFeeDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_UpdateFeeDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_UpdateFeeDecodeErrorZ ret_hu_conv = Result_UpdateFeeDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_UpdateFeeDecodeErrorZ _clone() {
+       public Result_UpdateFeeDecodeErrorZ clone() {
                number ret = bindings.CResult_UpdateFeeDecodeErrorZ_clone(this.ptr);
                Result_UpdateFeeDecodeErrorZ ret_hu_conv = Result_UpdateFeeDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 39d38c4e0d7b112290fb4fa43cb6a6c67439c04b..52195d9e710c3cf2e0a45cdfe77c898fdbdcc3a1 100644 (file)
@@ -37,21 +37,21 @@ public class Result_UpdateFulfillHTLCDecodeErrorZ extends CommonBase {
                }
        }
 
-       public static Result_UpdateFulfillHTLCDecodeErrorZ constructor__ok(UpdateFulfillHTLC o) {
+       public static Result_UpdateFulfillHTLCDecodeErrorZ constructor_ok(UpdateFulfillHTLC o) {
                number ret = bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
                Result_UpdateFulfillHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFulfillHTLCDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
-       public static Result_UpdateFulfillHTLCDecodeErrorZ constructor__err(DecodeError e) {
+       public static Result_UpdateFulfillHTLCDecodeErrorZ constructor_err(DecodeError e) {
                number ret = bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_UpdateFulfillHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFulfillHTLCDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_UpdateFulfillHTLCDecodeErrorZ _clone() {
+       public Result_UpdateFulfillHTLCDecodeErrorZ clone() {
                number ret = bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_clone(this.ptr);
                Result_UpdateFulfillHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFulfillHTLCDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 454ecdc6dcd8949dd48550f7f6b85ef36179eb02..449afc5956c7c0e4a42ebcfc4dfa1f715d6e546b 100644 (file)
@@ -34,20 +34,20 @@ public class Result_boolLightningErrorZ extends CommonBase {
                }
        }
 
-       public static Result_boolLightningErrorZ constructor__ok(boolean o) {
+       public static Result_boolLightningErrorZ constructor_ok(boolean o) {
                number ret = bindings.CResult_boolLightningErrorZ_ok(o);
                Result_boolLightningErrorZ ret_hu_conv = Result_boolLightningErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static Result_boolLightningErrorZ constructor__err(LightningError e) {
+       public static Result_boolLightningErrorZ constructor_err(LightningError e) {
                number ret = bindings.CResult_boolLightningErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_boolLightningErrorZ ret_hu_conv = Result_boolLightningErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_boolLightningErrorZ _clone() {
+       public Result_boolLightningErrorZ clone() {
                number ret = bindings.CResult_boolLightningErrorZ_clone(this.ptr);
                Result_boolLightningErrorZ ret_hu_conv = Result_boolLightningErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index e91e237eceb35e5b4e92435802dcdb8fa11d114c..be2f7b91df600da2d464d902877e1e62a908b845 100644 (file)
@@ -34,20 +34,20 @@ public class Result_boolPeerHandleErrorZ extends CommonBase {
                }
        }
 
-       public static Result_boolPeerHandleErrorZ constructor__ok(boolean o) {
+       public static Result_boolPeerHandleErrorZ constructor_ok(boolean o) {
                number ret = bindings.CResult_boolPeerHandleErrorZ_ok(o);
                Result_boolPeerHandleErrorZ ret_hu_conv = Result_boolPeerHandleErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static Result_boolPeerHandleErrorZ constructor__err(PeerHandleError e) {
+       public static Result_boolPeerHandleErrorZ constructor_err(PeerHandleError e) {
                number ret = bindings.CResult_boolPeerHandleErrorZ_err(e == null ? 0 : e.ptr & ~1);
                Result_boolPeerHandleErrorZ ret_hu_conv = Result_boolPeerHandleErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }
 
-       public Result_boolPeerHandleErrorZ _clone() {
+       public Result_boolPeerHandleErrorZ clone() {
                number ret = bindings.CResult_boolPeerHandleErrorZ_clone(this.ptr);
                Result_boolPeerHandleErrorZ ret_hu_conv = Result_boolPeerHandleErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
index 28c867d073290cf19d0ecb451858ef6d231887a6..307db61cc7109dd7a85fe66710a58fc63fa230c9 100644 (file)
@@ -55,9 +55,8 @@ 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[] = ret != null ? Arrays.stream(ret).map(ret_conv_63 -> bindings.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(ret_conv_63.a == null ? 0 : ret_conv_63.a.ptr & ~1, ret_conv_63.b == null ? 0 : ret_conv_63.b.ptr & ~1, ret_conv_63.c == null ? 0 : ret_conv_63.c.ptr & ~1)).toArray(number[]::new) : null;
-                               for (ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate> ret_conv_63: ret) { impl_holder.held.ptrs_to.add(ret_conv_63.a); impl_holder.held.ptrs_to.add(ret_conv_63.b); impl_holder.held.ptrs_to.add(ret_conv_63.c); };
+                                                       ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ[] ret = arg.get_next_channel_announcements(starting_point, batch_amount);
+                               result: number[] = ret != null ? Arrays.stream(ret).map(ret_conv_59 -> ret_conv_59 != null ? ret_conv_59.ptr : 0).toArray(number[]::new) : null;
                                return result;
                                                },
 
@@ -115,7 +114,7 @@ import * as bindings from '../bindings' // TODO: figure out location
                 handle_node_announcement(msg: NodeAnnouncement): Result_boolLightningErrorZ;
                                handle_channel_announcement(msg: ChannelAnnouncement): Result_boolLightningErrorZ;
                                handle_channel_update(msg: ChannelUpdate): Result_boolLightningErrorZ;
-                               get_next_channel_announcements(starting_point: number, batch_amount: number): ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate>[];
+                               get_next_channel_announcements(starting_point: number, batch_amount: number): ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ[];
                                get_next_node_announcements(starting_point: Uint8Array, batch_amount: number): NodeAnnouncement[];
                                sync_routing_table(their_node_id: Uint8Array, init: Init): void;
                                handle_reply_channel_range(their_node_id: Uint8Array, msg: ReplyChannelRange): Result_NoneLightningErrorZ;
@@ -149,29 +148,16 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
-       public ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate>[] get_next_channel_announcements(number starting_point, number batch_amount) {
+       public ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ[] get_next_channel_announcements(number starting_point, number batch_amount) {
                number[] ret = bindings.RoutingMessageHandler_get_next_channel_announcements(this.ptr, starting_point, batch_amount);
-               ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate>[] ret_conv_63_arr = new ThreeTuple[ret.length];
-               for (int l = 0; l < ret.length; l++) {
-                       number ret_conv_63 = ret[l];
-                       number ret_conv_63_a = bindings.LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(ret_conv_63);
-                       const ret_conv_63_a_hu_conv: ChannelAnnouncement = new ChannelAnnouncement(null, ret_conv_63_a);
-                       ret_conv_63_a_hu_conv.ptrs_to.add(this);;
-                       number ret_conv_63_b = bindings.LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(ret_conv_63);
-                       const ret_conv_63_b_hu_conv: ChannelUpdate = new ChannelUpdate(null, ret_conv_63_b);
-                       ret_conv_63_b_hu_conv.ptrs_to.add(this);;
-                       number ret_conv_63_c = bindings.LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(ret_conv_63);
-                       const ret_conv_63_c_hu_conv: ChannelUpdate = new ChannelUpdate(null, ret_conv_63_c);
-                       ret_conv_63_c_hu_conv.ptrs_to.add(this);;
-                       ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate> ret_conv_63_conv = new ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate>(ret_conv_63_a_hu_conv, ret_conv_63_b_hu_conv, ret_conv_63_c_hu_conv, () -> {
-                               bindings.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(ret_conv_63);
-                       });
-                       ret_conv_63_a_hu_conv.ptrs_to.add(ret_conv_63_conv);
-                       ret_conv_63_b_hu_conv.ptrs_to.add(ret_conv_63_conv);
-                       ret_conv_63_c_hu_conv.ptrs_to.add(ret_conv_63_conv);
-                       ret_conv_63_arr[l] = ret_conv_63_conv;
+               ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ[] ret_conv_59_arr = new ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ[ret.length];
+               for (int h = 0; h < ret.length; h++) {
+                       number ret_conv_59 = ret[h];
+                       ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ ret_conv_59_hu_conv = new ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ(null, ret_conv_59);
+                       ret_conv_59_hu_conv.ptrs_to.add(this);
+                       ret_conv_59_arr[h] = ret_conv_59_hu_conv;
                }
-               return ret_conv_63_arr;
+               return ret_conv_59_arr;
        }
 
        public NodeAnnouncement[] get_next_node_announcements(Uint8Array starting_point, number batch_amount) {
index 6fe55351ac0dd840984722264f918b8add9eb4b4..53f73549b0a7169fa13d15b125cd148c4209032c 100644 (file)
@@ -31,21 +31,11 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
-       public ThreeTuple<RawInvoice, Uint8Array, InvoiceSignature> into_parts() {
+       public ThreeTuple_RawInvoice_u832InvoiceSignatureZ into_parts() {
                number ret = bindings.SignedRawInvoice_into_parts(this.ptr);
-               number ret_a = bindings.LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(ret);
-               const ret_a_hu_conv: RawInvoice = new RawInvoice(null, ret_a);
-               ret_a_hu_conv.ptrs_to.add(this);;
-               Uint8Array ret_b = bindings.LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(ret);
-               number ret_c = bindings.LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(ret);
-               const ret_c_hu_conv: InvoiceSignature = new InvoiceSignature(null, ret_c);
-               ret_c_hu_conv.ptrs_to.add(this);;
-               ThreeTuple<RawInvoice, Uint8Array, InvoiceSignature> ret_conv = new ThreeTuple<RawInvoice, Uint8Array, InvoiceSignature>(ret_a_hu_conv, ret_b, ret_c_hu_conv, () -> {
-                       bindings.C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(ret);
-               });
-               ret_a_hu_conv.ptrs_to.add(ret_conv);
-               ret_c_hu_conv.ptrs_to.add(ret_conv);
-               return ret_conv;
+               ThreeTuple_RawInvoice_u832InvoiceSignatureZ ret_hu_conv = new ThreeTuple_RawInvoice_u832InvoiceSignatureZ(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
        }
 
        public RawInvoice raw_invoice() {
diff --git a/ts/structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.ts b/ts/structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.ts
new file mode 100644 (file)
index 0000000..0292294
--- /dev/null
@@ -0,0 +1,21 @@
+
+            
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+
+
+            export default class C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ extends CommonBase {
+                constructor(_dummy: object, ptr: number) {
+                    super(ptr);
+                }
+
+                
+                protected finalize() {
+                    super.finalize();
+
+                    if (this.ptr != 0) {
+                        bindings.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(this.ptr);
+                    }
+                }
+}
diff --git a/ts/structs/ThreeTuple_RawInvoice_u832InvoiceSignatureZ.ts b/ts/structs/ThreeTuple_RawInvoice_u832InvoiceSignatureZ.ts
new file mode 100644 (file)
index 0000000..cdcd147
--- /dev/null
@@ -0,0 +1,21 @@
+
+            
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+
+
+            export default class C3Tuple_RawInvoice_u832InvoiceSignatureZ extends CommonBase {
+                constructor(_dummy: object, ptr: number) {
+                    super(ptr);
+                }
+
+                
+                protected finalize() {
+                    super.finalize();
+
+                    if (this.ptr != 0) {
+                        bindings.C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(this.ptr);
+                    }
+                }
+}
diff --git a/ts/structs/TwoTuple_BlockHashChannelManagerZ.ts b/ts/structs/TwoTuple_BlockHashChannelManagerZ.ts
new file mode 100644 (file)
index 0000000..045ab2e
--- /dev/null
@@ -0,0 +1,47 @@
+
+            
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+
+
+            export default class C2Tuple_BlockHashChannelManagerZ extends CommonBase {
+                constructor(_dummy: object, ptr: number) {
+                    super(ptr);
+                }
+
+                
+                protected finalize() {
+                    super.finalize();
+
+                    if (this.ptr != 0) {
+                        bindings.C2Tuple_BlockHashChannelManagerZ_free(this.ptr);
+                    }
+                }
+       public Uint8Array get_a() {
+               Uint8Array ret = bindings.C2Tuple_BlockHashChannelManagerZ_get_a(this.ptr);
+               return ret;
+       }
+
+       public ChannelManager get_b() {
+               number ret = bindings.C2Tuple_BlockHashChannelManagerZ_get_b(this.ptr);
+               const ret_hu_conv: ChannelManager = new ChannelManager(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public static TwoTuple_BlockHashChannelManagerZ constructor_new(Uint8Array a, FeeEstimator b_fee_est, Watch b_chain_monitor, BroadcasterInterface b_tx_broadcaster, Logger b_logger, KeysInterface b_keys_manager, UserConfig b_config, ChainParameters b_params) {
+               number ret = bindings.C2Tuple_BlockHashChannelManagerZ_new(a, bindings.ChannelManager_new(b_fee_est == null ? 0 : b_fee_est.ptr, b_chain_monitor == null ? 0 : b_chain_monitor.ptr, b_tx_broadcaster == null ? 0 : b_tx_broadcaster.ptr, b_logger == null ? 0 : b_logger.ptr, b_keys_manager == null ? 0 : b_keys_manager.ptr, b_config == null ? 0 : b_config.ptr & ~1, b_params == null ? 0 : b_params.ptr & ~1));
+               TwoTuple_BlockHashChannelManagerZ ret_hu_conv = new TwoTuple_BlockHashChannelManagerZ(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               ret_hu_conv.ptrs_to.add(b_fee_est);
+               ret_hu_conv.ptrs_to.add(b_chain_monitor);
+               ret_hu_conv.ptrs_to.add(b_tx_broadcaster);
+               ret_hu_conv.ptrs_to.add(b_logger);
+               ret_hu_conv.ptrs_to.add(b_keys_manager);
+               ret_hu_conv.ptrs_to.add(b_config);
+               ret_hu_conv.ptrs_to.add(b_params);
+               return ret_hu_conv;
+       }
+
+}
diff --git a/ts/structs/TwoTuple_BlockHashChannelMonitorZ.ts b/ts/structs/TwoTuple_BlockHashChannelMonitorZ.ts
new file mode 100644 (file)
index 0000000..b6eb158
--- /dev/null
@@ -0,0 +1,48 @@
+
+            
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+
+
+            export default class C2Tuple_BlockHashChannelMonitorZ extends CommonBase {
+                constructor(_dummy: object, ptr: number) {
+                    super(ptr);
+                }
+
+                
+                protected finalize() {
+                    super.finalize();
+
+                    if (this.ptr != 0) {
+                        bindings.C2Tuple_BlockHashChannelMonitorZ_free(this.ptr);
+                    }
+                }
+       public Uint8Array get_a() {
+               Uint8Array ret = bindings.C2Tuple_BlockHashChannelMonitorZ_get_a(this.ptr);
+               return ret;
+       }
+
+       public ChannelMonitor get_b() {
+               number ret = bindings.C2Tuple_BlockHashChannelMonitorZ_get_b(this.ptr);
+               const ret_hu_conv: ChannelMonitor = new ChannelMonitor(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public TwoTuple_BlockHashChannelMonitorZ clone() {
+               number ret = bindings.C2Tuple_BlockHashChannelMonitorZ_clone(this.ptr);
+               TwoTuple_BlockHashChannelMonitorZ ret_hu_conv = new TwoTuple_BlockHashChannelMonitorZ(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public static TwoTuple_BlockHashChannelMonitorZ constructor_new(Uint8Array a, ChannelMonitor b) {
+               number ret = bindings.C2Tuple_BlockHashChannelMonitorZ_new(a, b == null ? 0 : b.ptr & ~1);
+               TwoTuple_BlockHashChannelMonitorZ ret_hu_conv = new TwoTuple_BlockHashChannelMonitorZ(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               ret_hu_conv.ptrs_to.add(b);
+               return ret_hu_conv;
+       }
+
+}
diff --git a/ts/structs/TwoTuple_OutPointScriptZ.ts b/ts/structs/TwoTuple_OutPointScriptZ.ts
new file mode 100644 (file)
index 0000000..1a45c6a
--- /dev/null
@@ -0,0 +1,48 @@
+
+            
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+
+
+            export default class C2Tuple_OutPointScriptZ extends CommonBase {
+                constructor(_dummy: object, ptr: number) {
+                    super(ptr);
+                }
+
+                
+                protected finalize() {
+                    super.finalize();
+
+                    if (this.ptr != 0) {
+                        bindings.C2Tuple_OutPointScriptZ_free(this.ptr);
+                    }
+                }
+       public OutPoint get_a() {
+               number ret = bindings.C2Tuple_OutPointScriptZ_get_a(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_b() {
+               Uint8Array ret = bindings.C2Tuple_OutPointScriptZ_get_b(this.ptr);
+               return ret;
+       }
+
+       public TwoTuple_OutPointScriptZ clone() {
+               number ret = bindings.C2Tuple_OutPointScriptZ_clone(this.ptr);
+               TwoTuple_OutPointScriptZ ret_hu_conv = new TwoTuple_OutPointScriptZ(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public static TwoTuple_OutPointScriptZ constructor_new(OutPoint a, Uint8Array b) {
+               number ret = bindings.C2Tuple_OutPointScriptZ_new(a == null ? 0 : a.ptr & ~1, b);
+               TwoTuple_OutPointScriptZ ret_hu_conv = new TwoTuple_OutPointScriptZ(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               ret_hu_conv.ptrs_to.add(a);
+               return ret_hu_conv;
+       }
+
+}
diff --git a/ts/structs/TwoTuple_PaymentHashPaymentSecretZ.ts b/ts/structs/TwoTuple_PaymentHashPaymentSecretZ.ts
new file mode 100644 (file)
index 0000000..0948fad
--- /dev/null
@@ -0,0 +1,45 @@
+
+            
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+
+
+            export default class C2Tuple_PaymentHashPaymentSecretZ extends CommonBase {
+                constructor(_dummy: object, ptr: number) {
+                    super(ptr);
+                }
+
+                
+                protected finalize() {
+                    super.finalize();
+
+                    if (this.ptr != 0) {
+                        bindings.C2Tuple_PaymentHashPaymentSecretZ_free(this.ptr);
+                    }
+                }
+       public Uint8Array get_a() {
+               Uint8Array ret = bindings.C2Tuple_PaymentHashPaymentSecretZ_get_a(this.ptr);
+               return ret;
+       }
+
+       public Uint8Array get_b() {
+               Uint8Array ret = bindings.C2Tuple_PaymentHashPaymentSecretZ_get_b(this.ptr);
+               return ret;
+       }
+
+       public TwoTuple_PaymentHashPaymentSecretZ clone() {
+               number ret = bindings.C2Tuple_PaymentHashPaymentSecretZ_clone(this.ptr);
+               TwoTuple_PaymentHashPaymentSecretZ ret_hu_conv = new TwoTuple_PaymentHashPaymentSecretZ(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public static TwoTuple_PaymentHashPaymentSecretZ constructor_new(Uint8Array a, Uint8Array b) {
+               number ret = bindings.C2Tuple_PaymentHashPaymentSecretZ_new(a, b);
+               TwoTuple_PaymentHashPaymentSecretZ ret_hu_conv = new TwoTuple_PaymentHashPaymentSecretZ(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+}
diff --git a/ts/structs/TwoTuple_PublicKeyTypeZ.ts b/ts/structs/TwoTuple_PublicKeyTypeZ.ts
new file mode 100644 (file)
index 0000000..211fbc1
--- /dev/null
@@ -0,0 +1,48 @@
+
+            
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+
+
+            export default class C2Tuple_PublicKeyTypeZ extends CommonBase {
+                constructor(_dummy: object, ptr: number) {
+                    super(ptr);
+                }
+
+                
+                protected finalize() {
+                    super.finalize();
+
+                    if (this.ptr != 0) {
+                        bindings.C2Tuple_PublicKeyTypeZ_free(this.ptr);
+                    }
+                }
+       public Uint8Array get_a() {
+               Uint8Array ret = bindings.C2Tuple_PublicKeyTypeZ_get_a(this.ptr);
+               return ret;
+       }
+
+       public Type get_b() {
+               number ret = bindings.C2Tuple_PublicKeyTypeZ_get_b(this.ptr);
+               Type ret_hu_conv = new Type(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public TwoTuple_PublicKeyTypeZ clone() {
+               number ret = bindings.C2Tuple_PublicKeyTypeZ_clone(this.ptr);
+               TwoTuple_PublicKeyTypeZ ret_hu_conv = new TwoTuple_PublicKeyTypeZ(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public static TwoTuple_PublicKeyTypeZ constructor_new(Uint8Array a, Type b) {
+               number ret = bindings.C2Tuple_PublicKeyTypeZ_new(a, b == null ? 0 : b.ptr);
+               TwoTuple_PublicKeyTypeZ ret_hu_conv = new TwoTuple_PublicKeyTypeZ(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               ret_hu_conv.ptrs_to.add(b);
+               return ret_hu_conv;
+       }
+
+}
diff --git a/ts/structs/TwoTuple_SignatureCVec_SignatureZZ.ts b/ts/structs/TwoTuple_SignatureCVec_SignatureZZ.ts
new file mode 100644 (file)
index 0000000..40a8a0a
--- /dev/null
@@ -0,0 +1,45 @@
+
+            
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+
+
+            export default class C2Tuple_SignatureCVec_SignatureZZ extends CommonBase {
+                constructor(_dummy: object, ptr: number) {
+                    super(ptr);
+                }
+
+                
+                protected finalize() {
+                    super.finalize();
+
+                    if (this.ptr != 0) {
+                        bindings.C2Tuple_SignatureCVec_SignatureZZ_free(this.ptr);
+                    }
+                }
+       public Uint8Array get_a() {
+               Uint8Array ret = bindings.C2Tuple_SignatureCVec_SignatureZZ_get_a(this.ptr);
+               return ret;
+       }
+
+       public Uint8Array[] get_b() {
+               Uint8Array[] ret = bindings.C2Tuple_SignatureCVec_SignatureZZ_get_b(this.ptr);
+               return ret;
+       }
+
+       public TwoTuple_SignatureCVec_SignatureZZ clone() {
+               number ret = bindings.C2Tuple_SignatureCVec_SignatureZZ_clone(this.ptr);
+               TwoTuple_SignatureCVec_SignatureZZ ret_hu_conv = new TwoTuple_SignatureCVec_SignatureZZ(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public static TwoTuple_SignatureCVec_SignatureZZ constructor_new(Uint8Array a, Uint8Array[] b) {
+               number ret = bindings.C2Tuple_SignatureCVec_SignatureZZ_new(a, b);
+               TwoTuple_SignatureCVec_SignatureZZ ret_hu_conv = new TwoTuple_SignatureCVec_SignatureZZ(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+}
diff --git a/ts/structs/TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ.ts b/ts/structs/TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ.ts
new file mode 100644 (file)
index 0000000..18b2bc6
--- /dev/null
@@ -0,0 +1,52 @@
+
+            
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+
+
+            export default class C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ extends CommonBase {
+                constructor(_dummy: object, ptr: number) {
+                    super(ptr);
+                }
+
+                
+                protected finalize() {
+                    super.finalize();
+
+                    if (this.ptr != 0) {
+                        bindings.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(this.ptr);
+                    }
+                }
+       public Uint8Array get_a() {
+               Uint8Array ret = bindings.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(this.ptr);
+               return ret;
+       }
+
+       public TwoTuple_u32ScriptZ[] get_b() {
+               number[] ret = bindings.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(this.ptr);
+               TwoTuple_u32ScriptZ[] ret_conv_21_arr = new TwoTuple_u32ScriptZ[ret.length];
+               for (int v = 0; v < ret.length; v++) {
+                       number ret_conv_21 = ret[v];
+                       TwoTuple_u32ScriptZ ret_conv_21_hu_conv = new TwoTuple_u32ScriptZ(null, ret_conv_21);
+                       ret_conv_21_hu_conv.ptrs_to.add(this);
+                       ret_conv_21_arr[v] = ret_conv_21_hu_conv;
+               }
+               return ret_conv_21_arr;
+       }
+
+       public TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ clone() {
+               number ret = bindings.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(this.ptr);
+               TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ ret_hu_conv = new TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public static TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ constructor_new(Uint8Array a, TwoTuple_u32ScriptZ[] b) {
+               number ret = bindings.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a, b != null ? Arrays.stream(b).map(b_conv_21 -> b_conv_21 != null ? b_conv_21.ptr : 0).toArray(number[]::new) : null);
+               TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ ret_hu_conv = new TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+}
diff --git a/ts/structs/TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ.ts b/ts/structs/TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ.ts
new file mode 100644 (file)
index 0000000..61c7aec
--- /dev/null
@@ -0,0 +1,52 @@
+
+            
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+
+
+            export default class C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ extends CommonBase {
+                constructor(_dummy: object, ptr: number) {
+                    super(ptr);
+                }
+
+                
+                protected finalize() {
+                    super.finalize();
+
+                    if (this.ptr != 0) {
+                        bindings.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(this.ptr);
+                    }
+                }
+       public Uint8Array get_a() {
+               Uint8Array ret = bindings.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(this.ptr);
+               return ret;
+       }
+
+       public TwoTuple_u32TxOutZ[] get_b() {
+               number[] ret = bindings.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(this.ptr);
+               TwoTuple_u32TxOutZ[] ret_conv_20_arr = new TwoTuple_u32TxOutZ[ret.length];
+               for (int u = 0; u < ret.length; u++) {
+                       number ret_conv_20 = ret[u];
+                       TwoTuple_u32TxOutZ ret_conv_20_hu_conv = new TwoTuple_u32TxOutZ(null, ret_conv_20);
+                       ret_conv_20_hu_conv.ptrs_to.add(this);
+                       ret_conv_20_arr[u] = ret_conv_20_hu_conv;
+               }
+               return ret_conv_20_arr;
+       }
+
+       public TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ clone() {
+               number ret = bindings.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(this.ptr);
+               TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ ret_hu_conv = new TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public static TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ constructor_new(Uint8Array a, TwoTuple_u32TxOutZ[] b) {
+               number ret = bindings.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a, b != null ? Arrays.stream(b).map(b_conv_20 -> b_conv_20 != null ? b_conv_20.ptr : 0).toArray(number[]::new) : null);
+               TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ ret_hu_conv = new TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+}
diff --git a/ts/structs/TwoTuple_u32ScriptZ.ts b/ts/structs/TwoTuple_u32ScriptZ.ts
new file mode 100644 (file)
index 0000000..bc15645
--- /dev/null
@@ -0,0 +1,45 @@
+
+            
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+
+
+            export default class C2Tuple_u32ScriptZ extends CommonBase {
+                constructor(_dummy: object, ptr: number) {
+                    super(ptr);
+                }
+
+                
+                protected finalize() {
+                    super.finalize();
+
+                    if (this.ptr != 0) {
+                        bindings.C2Tuple_u32ScriptZ_free(this.ptr);
+                    }
+                }
+       public number get_a() {
+               number ret = bindings.C2Tuple_u32ScriptZ_get_a(this.ptr);
+               return ret;
+       }
+
+       public Uint8Array get_b() {
+               Uint8Array ret = bindings.C2Tuple_u32ScriptZ_get_b(this.ptr);
+               return ret;
+       }
+
+       public TwoTuple_u32ScriptZ clone() {
+               number ret = bindings.C2Tuple_u32ScriptZ_clone(this.ptr);
+               TwoTuple_u32ScriptZ ret_hu_conv = new TwoTuple_u32ScriptZ(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public static TwoTuple_u32ScriptZ constructor_new(number a, Uint8Array b) {
+               number ret = bindings.C2Tuple_u32ScriptZ_new(a, b);
+               TwoTuple_u32ScriptZ ret_hu_conv = new TwoTuple_u32ScriptZ(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+}
diff --git a/ts/structs/TwoTuple_u32TxOutZ.ts b/ts/structs/TwoTuple_u32TxOutZ.ts
new file mode 100644 (file)
index 0000000..a5bf46a
--- /dev/null
@@ -0,0 +1,46 @@
+
+            
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+
+
+            export default class C2Tuple_u32TxOutZ extends CommonBase {
+                constructor(_dummy: object, ptr: number) {
+                    super(ptr);
+                }
+
+                
+                protected finalize() {
+                    super.finalize();
+
+                    if (this.ptr != 0) {
+                        bindings.C2Tuple_u32TxOutZ_free(this.ptr);
+                    }
+                }
+       public number get_a() {
+               number ret = bindings.C2Tuple_u32TxOutZ_get_a(this.ptr);
+               return ret;
+       }
+
+       public TxOut get_b() {
+               number ret = bindings.C2Tuple_u32TxOutZ_get_b(this.ptr);
+               TxOut ret_conv = new TxOut(null, ret);
+               return ret_conv;
+       }
+
+       public TwoTuple_u32TxOutZ clone() {
+               number ret = bindings.C2Tuple_u32TxOutZ_clone(this.ptr);
+               TwoTuple_u32TxOutZ ret_hu_conv = new TwoTuple_u32TxOutZ(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public static TwoTuple_u32TxOutZ constructor_new(number a, TxOut b) {
+               number ret = bindings.C2Tuple_u32TxOutZ_new(a, b.ptr);
+               TwoTuple_u32TxOutZ ret_hu_conv = new TwoTuple_u32TxOutZ(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+}
diff --git a/ts/structs/TwoTuple_usizeTransactionZ.ts b/ts/structs/TwoTuple_usizeTransactionZ.ts
new file mode 100644 (file)
index 0000000..691679d
--- /dev/null
@@ -0,0 +1,45 @@
+
+            
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+
+
+            export default class C2Tuple_usizeTransactionZ extends CommonBase {
+                constructor(_dummy: object, ptr: number) {
+                    super(ptr);
+                }
+
+                
+                protected finalize() {
+                    super.finalize();
+
+                    if (this.ptr != 0) {
+                        bindings.C2Tuple_usizeTransactionZ_free(this.ptr);
+                    }
+                }
+       public number get_a() {
+               number ret = bindings.C2Tuple_usizeTransactionZ_get_a(this.ptr);
+               return ret;
+       }
+
+       public Uint8Array get_b() {
+               Uint8Array ret = bindings.C2Tuple_usizeTransactionZ_get_b(this.ptr);
+               return ret;
+       }
+
+       public TwoTuple_usizeTransactionZ clone() {
+               number ret = bindings.C2Tuple_usizeTransactionZ_clone(this.ptr);
+               TwoTuple_usizeTransactionZ ret_hu_conv = new TwoTuple_usizeTransactionZ(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public static TwoTuple_usizeTransactionZ constructor_new(number a, Uint8Array b) {
+               number ret = bindings.C2Tuple_usizeTransactionZ_new(a, b);
+               TwoTuple_usizeTransactionZ ret_hu_conv = new TwoTuple_usizeTransactionZ(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+}
index 13b2ab6369af18a591a0483ffb6acd616ff89dc6..984d60f78cdf7a4abe2a8399c8a7dc3ce06a1282 100644 (file)
@@ -1,28 +1,28 @@
-       public static Result_StringErrorZ constructor_ign(Uint8Array msg, Uint8Array sk) {
+       public static Result_StringErrorZ constructor_sign(Uint8Array msg, Uint8Array sk) {
                number ret = bindings.sign(msg, sk);
                Result_StringErrorZ ret_hu_conv = Result_StringErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static Result_PublicKeyErrorZ constructor_ecover_pk(Uint8Array msg, String sig) {
+       public static Result_PublicKeyErrorZ constructor_recover_pk(Uint8Array msg, String sig) {
                number ret = bindings.recover_pk(msg, sig);
                Result_PublicKeyErrorZ ret_hu_conv = Result_PublicKeyErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static boolean constructor_erify(Uint8Array msg, String sig, Uint8Array pk) {
+       public static boolean constructor_verify(Uint8Array msg, String sig, Uint8Array pk) {
                boolean ret = bindings.verify(msg, sig, pk);
                return ret;
        }
 
-       public static Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ constructor_BlockHashChannelMonitorZ_read(Uint8Array ser, KeysInterface arg) {
+       public static Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ constructor_C2Tuple_BlockHashChannelMonitorZ_read(Uint8Array ser, KeysInterface arg) {
                number ret = bindings.C2Tuple_BlockHashChannelMonitorZ_read(ser, arg == null ? 0 : arg.ptr);
                Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(arg);
                return ret_hu_conv;
        }
 
-       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) {
+       public static Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ constructor_C2Tuple_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, arg_channel_monitors != null ? Arrays.stream(arg_channel_monitors).map(arg_channel_monitors_conv_16 -> arg_channel_monitors_conv_16 == null ? 0 : arg_channel_monitors_conv_16.ptr & ~1).toArray(number[]::new) : null));
                Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(arg_keys_manager);
                return ret_hu_conv;
        }
 
-       public static Uint8Array constructor_uild_commitment_secret(Uint8Array commitment_seed, number idx) {
+       public static Uint8Array constructor_build_commitment_secret(Uint8Array commitment_seed, number idx) {
                Uint8Array ret = bindings.build_commitment_secret(commitment_seed, idx);
                return ret;
        }
 
-       public static Uint8Array constructor_uild_closing_transaction(number to_holder_value_sat, number to_counterparty_value_sat, Uint8Array to_holder_script, Uint8Array to_counterparty_script, OutPoint funding_outpoint) {
+       public static Uint8Array constructor_build_closing_transaction(number to_holder_value_sat, number to_counterparty_value_sat, Uint8Array to_holder_script, Uint8Array to_counterparty_script, OutPoint funding_outpoint) {
                Uint8Array ret = bindings.build_closing_transaction(to_holder_value_sat, to_counterparty_value_sat, to_holder_script, to_counterparty_script, funding_outpoint == null ? 0 : funding_outpoint.ptr & ~1);
                // this.ptrs_to.add(funding_outpoint);
                return ret;
        }
 
-       public static Result_SecretKeyErrorZ constructor_erive_private_key(Uint8Array per_commitment_point, Uint8Array base_secret) {
+       public static Result_SecretKeyErrorZ constructor_derive_private_key(Uint8Array per_commitment_point, Uint8Array base_secret) {
                number ret = bindings.derive_private_key(per_commitment_point, base_secret);
                Result_SecretKeyErrorZ ret_hu_conv = Result_SecretKeyErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static Result_PublicKeyErrorZ constructor_erive_public_key(Uint8Array per_commitment_point, Uint8Array base_point) {
+       public static Result_PublicKeyErrorZ constructor_derive_public_key(Uint8Array per_commitment_point, Uint8Array base_point) {
                number ret = bindings.derive_public_key(per_commitment_point, base_point);
                Result_PublicKeyErrorZ ret_hu_conv = Result_PublicKeyErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static Result_SecretKeyErrorZ constructor_erive_private_revocation_key(Uint8Array per_commitment_secret, Uint8Array countersignatory_revocation_base_secret) {
+       public static Result_SecretKeyErrorZ constructor_derive_private_revocation_key(Uint8Array per_commitment_secret, Uint8Array countersignatory_revocation_base_secret) {
                number ret = bindings.derive_private_revocation_key(per_commitment_secret, countersignatory_revocation_base_secret);
                Result_SecretKeyErrorZ ret_hu_conv = Result_SecretKeyErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static Result_PublicKeyErrorZ constructor_erive_public_revocation_key(Uint8Array per_commitment_point, Uint8Array countersignatory_revocation_base_point) {
+       public static Result_PublicKeyErrorZ constructor_derive_public_revocation_key(Uint8Array per_commitment_point, Uint8Array countersignatory_revocation_base_point) {
                number ret = bindings.derive_public_revocation_key(per_commitment_point, countersignatory_revocation_base_point);
                Result_PublicKeyErrorZ ret_hu_conv = Result_PublicKeyErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static Uint8Array constructor_et_revokeable_redeemscript(Uint8Array revocation_key, number contest_delay, Uint8Array broadcaster_delayed_payment_key) {
+       public static Uint8Array constructor_get_revokeable_redeemscript(Uint8Array revocation_key, number contest_delay, Uint8Array broadcaster_delayed_payment_key) {
                Uint8Array ret = bindings.get_revokeable_redeemscript(revocation_key, contest_delay, broadcaster_delayed_payment_key);
                return ret;
        }
 
-       public static Uint8Array constructor_et_htlc_redeemscript(HTLCOutputInCommitment htlc, TxCreationKeys keys) {
+       public static Uint8Array constructor_get_htlc_redeemscript(HTLCOutputInCommitment htlc, TxCreationKeys keys) {
                Uint8Array ret = bindings.get_htlc_redeemscript(htlc == null ? 0 : htlc.ptr & ~1, keys == null ? 0 : keys.ptr & ~1);
                // this.ptrs_to.add(htlc);
                // this.ptrs_to.add(keys);
                return ret;
        }
 
-       public static Uint8Array constructor_ake_funding_redeemscript(Uint8Array broadcaster, Uint8Array countersignatory) {
+       public static Uint8Array constructor_make_funding_redeemscript(Uint8Array broadcaster, Uint8Array countersignatory) {
                Uint8Array ret = bindings.make_funding_redeemscript(broadcaster, countersignatory);
                return ret;
        }
 
-       public static Uint8Array constructor_uild_htlc_transaction(Uint8Array commitment_txid, number feerate_per_kw, number contest_delay, HTLCOutputInCommitment htlc, Uint8Array broadcaster_delayed_payment_key, Uint8Array revocation_key) {
+       public static Uint8Array constructor_build_htlc_transaction(Uint8Array commitment_txid, number feerate_per_kw, number contest_delay, HTLCOutputInCommitment htlc, Uint8Array broadcaster_delayed_payment_key, Uint8Array revocation_key) {
                Uint8Array ret = bindings.build_htlc_transaction(commitment_txid, feerate_per_kw, contest_delay, htlc == null ? 0 : htlc.ptr & ~1, broadcaster_delayed_payment_key, revocation_key);
                // this.ptrs_to.add(htlc);
                return ret;
        }
 
-       public static number constructor_et_commitment_transaction_number_obscure_factor(Uint8Array broadcaster_payment_basepoint, Uint8Array countersignatory_payment_basepoint, boolean outbound_from_broadcaster) {
+       public static number constructor_get_commitment_transaction_number_obscure_factor(Uint8Array broadcaster_payment_basepoint, Uint8Array countersignatory_payment_basepoint, boolean outbound_from_broadcaster) {
                number ret = bindings.get_commitment_transaction_number_obscure_factor(broadcaster_payment_basepoint, countersignatory_payment_basepoint, outbound_from_broadcaster);
                return ret;
        }
 
-       public static Result_RouteLightningErrorZ constructor_et_keysend_route(Uint8Array our_node_id, NetworkGraph network, Uint8Array payee, ChannelDetails[] first_hops, RouteHint[] last_hops, number final_value_msat, number final_cltv, Logger logger) {
+       public static Result_RouteLightningErrorZ constructor_get_keysend_route(Uint8Array our_node_id, NetworkGraph network, Uint8Array payee, ChannelDetails[] first_hops, RouteHint[] last_hops, number final_value_msat, number final_cltv, Logger logger) {
                number ret = bindings.get_keysend_route(our_node_id, network == null ? 0 : network.ptr & ~1, payee, first_hops != null ? Arrays.stream(first_hops).map(first_hops_conv_16 -> first_hops_conv_16 == null ? 0 : first_hops_conv_16.ptr & ~1).toArray(number[]::new) : null, last_hops != null ? Arrays.stream(last_hops).map(last_hops_conv_11 -> last_hops_conv_11 == null ? 0 : last_hops_conv_11.ptr & ~1).toArray(number[]::new) : null, final_value_msat, final_cltv, logger == null ? 0 : logger.ptr);
                Result_RouteLightningErrorZ ret_hu_conv = Result_RouteLightningErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(network);
                return ret_hu_conv;
        }
 
-       public static Result_RouteLightningErrorZ constructor_et_route(Uint8Array our_node_id, NetworkGraph network, Uint8Array payee, InvoiceFeatures payee_features, ChannelDetails[] first_hops, RouteHint[] last_hops, number final_value_msat, number final_cltv, Logger logger) {
+       public static Result_RouteLightningErrorZ constructor_get_route(Uint8Array our_node_id, NetworkGraph network, Uint8Array payee, InvoiceFeatures payee_features, ChannelDetails[] first_hops, RouteHint[] last_hops, number final_value_msat, number final_cltv, Logger logger) {
                number ret = bindings.get_route(our_node_id, network == null ? 0 : network.ptr & ~1, payee, payee_features == null ? 0 : payee_features.ptr & ~1, first_hops != null ? Arrays.stream(first_hops).map(first_hops_conv_16 -> first_hops_conv_16 == null ? 0 : first_hops_conv_16.ptr & ~1).toArray(number[]::new) : null, last_hops != null ? Arrays.stream(last_hops).map(last_hops_conv_11 -> last_hops_conv_11 == null ? 0 : last_hops_conv_11.ptr & ~1).toArray(number[]::new) : null, final_value_msat, final_cltv, logger == null ? 0 : logger.ptr);
                Result_RouteLightningErrorZ ret_hu_conv = Result_RouteLightningErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(network);
                return ret_hu_conv;
        }
 
-       public static Result_NoneErrorZ constructor_ilesystemPersister_persist_manager(String data_dir, ChannelManager manager) {
+       public static Result_NoneErrorZ constructor_FilesystemPersister_persist_manager(String data_dir, ChannelManager manager) {
                number ret = bindings.FilesystemPersister_persist_manager(data_dir, manager == null ? 0 : manager.ptr & ~1);
                Result_NoneErrorZ ret_hu_conv = Result_NoneErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(manager);
                return ret_hu_conv;
        }
 
-       public static Result_InvoiceSignOrCreationErrorZ constructor_reate_invoice_from_channelmanager(ChannelManager channelmanager, KeysInterface keys_manager, Currency network, Option_u64Z amt_msat, String description) {
+       public static Result_InvoiceSignOrCreationErrorZ constructor_create_invoice_from_channelmanager(ChannelManager channelmanager, KeysInterface keys_manager, Currency network, Option_u64Z amt_msat, String description) {
                number ret = bindings.create_invoice_from_channelmanager(channelmanager == null ? 0 : channelmanager.ptr & ~1, keys_manager == null ? 0 : keys_manager.ptr, network, amt_msat.ptr, description);
                Result_InvoiceSignOrCreationErrorZ ret_hu_conv = Result_InvoiceSignOrCreationErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(channelmanager);