]> git.bitcoin.ninja Git - ldk-java/commitdiff
Update auto-generated bindings
authorMatt Corallo <git@bluematt.me>
Tue, 30 Mar 2021 01:58:56 +0000 (21:58 -0400)
committerMatt Corallo <git@bluematt.me>
Tue, 30 Mar 2021 20:01:24 +0000 (16:01 -0400)
212 files changed:
liblightningjni_debug.so
liblightningjni_release.so
src/main/java/org/ldk/enums/LDKNetwork.java
src/main/java/org/ldk/enums/LDKSecp256k1Error.java
src/main/java/org/ldk/impl/bindings.java
src/main/java/org/ldk/structs/APIError.java
src/main/java/org/ldk/structs/ChannelDetails.java
src/main/java/org/ldk/structs/ChannelInfo.java
src/main/java/org/ldk/structs/DirectionalChannelInfo.java
src/main/java/org/ldk/structs/ErrorAction.java
src/main/java/org/ldk/structs/Event.java
src/main/java/org/ldk/structs/Filter.java
src/main/java/org/ldk/structs/HTLCFailChannelUpdate.java
src/main/java/org/ldk/structs/HTLCOutputInCommitment.java
src/main/java/org/ldk/structs/MessageSendEvent.java
src/main/java/org/ldk/structs/MonitorEvent.java
src/main/java/org/ldk/structs/NetAddress.java
src/main/java/org/ldk/structs/Option_C2Tuple_usizeTransactionZZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Option_u32Z.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Option_u64Z.java [new file with mode: 0644]
src/main/java/org/ldk/structs/PaymentSendFailure.java
src/main/java/org/ldk/structs/Result_AcceptChannelDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_AnnouncementSignaturesDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_BuiltCommitmentTransactionDecodeErrorZ.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_CResult_NetAddressu8ZDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_CVec_CVec_u8ZZNoneZ.java
src/main/java/org/ldk/structs/Result_CVec_SignatureZNoneZ.java
src/main/java/org/ldk/structs/Result_CVec_u8ZPeerHandleErrorZ.java
src/main/java/org/ldk/structs/Result_ChannelAnnouncementDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ChannelConfigDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ChannelFeaturesDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ChannelInfoDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ChannelMonitorUpdateDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ChannelPublicKeysDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ChannelReestablishDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ChannelTransactionParametersDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ChannelUpdateDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ClosingSignedDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_CommitmentSignedDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_CommitmentTransactionDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_DirectionalChannelInfoDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ErrorMessageDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_FundingCreatedDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_FundingLockedDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_FundingSignedDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_GossipTimestampFilterDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_HTLCOutputInCommitmentDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_HTLCUpdateDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_HolderCommitmentTransactionDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_InMemorySignerDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_InitDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_InitFeaturesDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_InvoiceFeaturesDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_NetAddressu8Z.java
src/main/java/org/ldk/structs/Result_NetworkGraphDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_NodeAnnouncementDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_NodeAnnouncementInfoDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_NodeFeaturesDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_NodeInfoDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_NoneAPIErrorZ.java
src/main/java/org/ldk/structs/Result_NoneChannelMonitorUpdateErrZ.java
src/main/java/org/ldk/structs/Result_NoneLightningErrorZ.java
src/main/java/org/ldk/structs/Result_NoneMonitorUpdateErrorZ.java
src/main/java/org/ldk/structs/Result_NonePaymentSendFailureZ.java
src/main/java/org/ldk/structs/Result_NonePeerHandleErrorZ.java
src/main/java/org/ldk/structs/Result_OpenChannelDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_OutPointDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_PingDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_PongDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_PublicKeyErrorZ.java
src/main/java/org/ldk/structs/Result_QueryChannelRangeDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_QueryShortChannelIdsDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ReplyChannelRangeDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_RevokeAndACKDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_RouteDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_RouteLightningErrorZ.java
src/main/java/org/ldk/structs/Result_RoutingFeesDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_SecretKeyErrorZ.java
src/main/java/org/ldk/structs/Result_ShutdownDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_SignDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_SignatureNoneZ.java
src/main/java/org/ldk/structs/Result_SpendableOutputDescriptorDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_TransactionNoneZ.java
src/main/java/org/ldk/structs/Result_TrustedCommitmentTransactionNoneZ.java
src/main/java/org/ldk/structs/Result_TxCreationKeysDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_TxCreationKeysErrorZ.java
src/main/java/org/ldk/structs/Result_TxOutAccessErrorZ.java
src/main/java/org/ldk/structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_UnsignedChannelUpdateDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_UpdateAddHTLCDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_UpdateFailHTLCDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_UpdateFeeDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_UpdateFulfillHTLCDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_boolLightningErrorZ.java
src/main/java/org/ldk/structs/Result_boolPeerHandleErrorZ.java
src/main/java/org/ldk/structs/RouteHint.java
src/main/java/org/ldk/structs/SpendableOutputDescriptor.java
src/main/java/org/ldk/structs/WatchedOutput.java [new file with mode: 0644]
src/main/jni/bindings.c
src/main/jni/org_ldk_impl_bindings.h
src/main/jni/org_ldk_impl_bindings_LDKCOption_C2Tuple_usizeTransactionZZ.h [new file with mode: 0644]
src/main/jni/org_ldk_impl_bindings_LDKCOption_u32Z.h [new file with mode: 0644]
src/main/jni/org_ldk_impl_bindings_LDKCOption_u64Z.h [new file with mode: 0644]
ts/bindings.c
ts/bindings.ts
ts/structs/APIError.ts
ts/structs/ChannelDetails.ts
ts/structs/ChannelInfo.ts
ts/structs/DirectionalChannelInfo.ts
ts/structs/ErrorAction.ts
ts/structs/Event.ts
ts/structs/Filter.ts
ts/structs/HTLCFailChannelUpdate.ts
ts/structs/HTLCOutputInCommitment.ts
ts/structs/MessageSendEvent.ts
ts/structs/MonitorEvent.ts
ts/structs/NetAddress.ts
ts/structs/Option_C2Tuple_usizeTransactionZZ.ts [new file with mode: 0644]
ts/structs/Option_u32Z.ts [new file with mode: 0644]
ts/structs/Option_u64Z.ts [new file with mode: 0644]
ts/structs/PaymentSendFailure.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_CResult_NetAddressu8ZDecodeErrorZ.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_CommitmentSignedDecodeErrorZ.ts
ts/structs/Result_CommitmentTransactionDecodeErrorZ.ts
ts/structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.ts
ts/structs/Result_DirectionalChannelInfoDecodeErrorZ.ts
ts/structs/Result_ErrorMessageDecodeErrorZ.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_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_NoneLightningErrorZ.ts
ts/structs/Result_NoneMonitorUpdateErrorZ.ts
ts/structs/Result_NonePaymentSendFailureZ.ts
ts/structs/Result_NonePeerHandleErrorZ.ts
ts/structs/Result_OpenChannelDecodeErrorZ.ts
ts/structs/Result_OutPointDecodeErrorZ.ts
ts/structs/Result_PingDecodeErrorZ.ts
ts/structs/Result_PongDecodeErrorZ.ts
ts/structs/Result_PublicKeyErrorZ.ts
ts/structs/Result_QueryChannelRangeDecodeErrorZ.ts
ts/structs/Result_QueryShortChannelIdsDecodeErrorZ.ts
ts/structs/Result_ReplyChannelRangeDecodeErrorZ.ts
ts/structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.ts
ts/structs/Result_RevokeAndACKDecodeErrorZ.ts
ts/structs/Result_RouteDecodeErrorZ.ts
ts/structs/Result_RouteLightningErrorZ.ts
ts/structs/Result_RoutingFeesDecodeErrorZ.ts
ts/structs/Result_SecretKeyErrorZ.ts
ts/structs/Result_ShutdownDecodeErrorZ.ts
ts/structs/Result_SignDecodeErrorZ.ts
ts/structs/Result_SignatureNoneZ.ts
ts/structs/Result_SpendableOutputDescriptorDecodeErrorZ.ts
ts/structs/Result_TransactionNoneZ.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/RouteHint.ts
ts/structs/SpendableOutputDescriptor.ts
ts/structs/WatchedOutput.ts [new file with mode: 0644]

index bedf57af93615e5d79a95e835835e8633f2157ef..a4c9f01c2a9320c9023dcff21f3b079f358bcfb5 100755 (executable)
Binary files a/liblightningjni_debug.so and b/liblightningjni_debug.so differ
index 695e89d52f6b62f961aa3735dcd71dbf681df4fb..058c989574b1d704ee6a5c17cbac0fbf16a9ecb6 100755 (executable)
Binary files a/liblightningjni_release.so and b/liblightningjni_release.so differ
index f764ed6b42aec2d1d9102a4a16d744d919f71db8..8f78e11f19538e1ac532212f3876bc8080b05750 100644 (file)
@@ -1,5 +1,8 @@
 package org.ldk.enums;
 
+/**
+ * An enum representing the possible Bitcoin or test networks which we can run on
+ */
 public enum LDKNetwork {
        LDKNetwork_Bitcoin,
        LDKNetwork_Testnet,
index 7bfe141532be0da0500b87127a4d291ba140fccf..5ca95793991c1e2975fdb4add3baa738918ff9f8 100644 (file)
@@ -1,5 +1,8 @@
 package org.ldk.enums;
 
+/**
+ * Represents an error returned from libsecp256k1 during validation of some secp256k1 data
+ */
 public enum LDKSecp256k1Error {
        LDKSecp256k1Error_IncorrectSignature,
        LDKSecp256k1Error_InvalidMessage,
index a414060c69c23bc54c82f55443952204aeba8f9e..47752cfb8c392e3b95cc2448721288412847af15 100644 (file)
@@ -52,6 +52,19 @@ public class bindings {
        public static native boolean LDKCResult_TxCreationKeysErrorZ_result_ok(long arg);
        public static native long LDKCResult_TxCreationKeysErrorZ_get_ok(long arg);
        public static native LDKSecp256k1Error LDKCResult_TxCreationKeysErrorZ_get_err(long arg);
+       public static class LDKCOption_u32Z {
+               private LDKCOption_u32Z() {}
+               public final static class Some extends LDKCOption_u32Z {
+                       public int some;
+                       Some(int some) { this.some = some; }
+               }
+               public final static class None extends LDKCOption_u32Z {
+                       None() { }
+               }
+               static native void init();
+       }
+       static { LDKCOption_u32Z.init(); }
+       public static native LDKCOption_u32Z LDKCOption_u32Z_ref_from_ptr(long ptr);
        public static native boolean LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_result_ok(long arg);
        public static native long LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok(long arg);
        public static native long LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(long arg);
@@ -248,6 +261,19 @@ public class bindings {
        public static native boolean LDKCResult_ChannelConfigDecodeErrorZ_result_ok(long arg);
        public static native long LDKCResult_ChannelConfigDecodeErrorZ_get_ok(long arg);
        public static native long LDKCResult_ChannelConfigDecodeErrorZ_get_err(long arg);
+       public static class LDKCOption_u64Z {
+               private LDKCOption_u64Z() {}
+               public final static class Some extends LDKCOption_u64Z {
+                       public long some;
+                       Some(long some) { this.some = some; }
+               }
+               public final static class None extends LDKCOption_u64Z {
+                       None() { }
+               }
+               static native void init();
+       }
+       static { LDKCOption_u64Z.init(); }
+       public static native LDKCOption_u64Z LDKCOption_u64Z_ref_from_ptr(long ptr);
        public static native boolean LDKCResult_DirectionalChannelInfoDecodeErrorZ_result_ok(long arg);
        public static native long LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_ok(long arg);
        public static native long LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_err(long arg);
@@ -306,10 +332,12 @@ public class bindings {
        public static class LDKMonitorEvent {
                private LDKMonitorEvent() {}
                public final static class HTLCEvent extends LDKMonitorEvent {
-                       HTLCEvent() { }
+                       public long htlc_event;
+                       HTLCEvent(long htlc_event) { this.htlc_event = htlc_event; }
                }
                public final static class CommitmentTxBroadcasted extends LDKMonitorEvent {
-                       CommitmentTxBroadcasted() { }
+                       public long commitment_tx_broadcasted;
+                       CommitmentTxBroadcasted(long commitment_tx_broadcasted) { this.commitment_tx_broadcasted = commitment_tx_broadcasted; }
                }
                static native void init();
        }
@@ -324,10 +352,12 @@ public class bindings {
                        StaticOutput(long outpoint, long output) { this.outpoint = outpoint; this.output = output; }
                }
                public final static class DelayedPaymentOutput extends LDKSpendableOutputDescriptor {
-                       DelayedPaymentOutput() { }
+                       public long delayed_payment_output;
+                       DelayedPaymentOutput(long delayed_payment_output) { this.delayed_payment_output = delayed_payment_output; }
                }
                public final static class StaticPaymentOutput extends LDKSpendableOutputDescriptor {
-                       StaticPaymentOutput() { }
+                       public long static_payment_output;
+                       StaticPaymentOutput(long static_payment_output) { this.static_payment_output = static_payment_output; }
                }
                static native void init();
        }
@@ -463,6 +493,19 @@ public class bindings {
        public static native boolean LDKCResult_TxOutAccessErrorZ_result_ok(long arg);
        public static native long LDKCResult_TxOutAccessErrorZ_get_ok(long arg);
        public static native LDKAccessError LDKCResult_TxOutAccessErrorZ_get_err(long arg);
+       public static class LDKCOption_C2Tuple_usizeTransactionZZ {
+               private LDKCOption_C2Tuple_usizeTransactionZZ() {}
+               public final static class Some extends LDKCOption_C2Tuple_usizeTransactionZZ {
+                       public long some;
+                       Some(long some) { this.some = some; }
+               }
+               public final static class None extends LDKCOption_C2Tuple_usizeTransactionZZ {
+                       None() { }
+               }
+               static native void init();
+       }
+       static { LDKCOption_C2Tuple_usizeTransactionZZ.init(); }
+       public static native LDKCOption_C2Tuple_usizeTransactionZZ LDKCOption_C2Tuple_usizeTransactionZZ_ref_from_ptr(long ptr);
        public static class LDKAPIError {
                private LDKAPIError() {}
                public final static class APIMisuseError extends LDKAPIError {
@@ -498,16 +541,20 @@ public class bindings {
        public static class LDKPaymentSendFailure {
                private LDKPaymentSendFailure() {}
                public final static class ParameterError extends LDKPaymentSendFailure {
-                       ParameterError() { }
+                       public long parameter_error;
+                       ParameterError(long parameter_error) { this.parameter_error = parameter_error; }
                }
                public final static class PathParameterError extends LDKPaymentSendFailure {
-                       PathParameterError() { }
+                       public long[] path_parameter_error;
+                       PathParameterError(long[] path_parameter_error) { this.path_parameter_error = path_parameter_error; }
                }
                public final static class AllFailedRetrySafe extends LDKPaymentSendFailure {
-                       AllFailedRetrySafe() { }
+                       public long[] all_failed_retry_safe;
+                       AllFailedRetrySafe(long[] all_failed_retry_safe) { this.all_failed_retry_safe = all_failed_retry_safe; }
                }
                public final static class PartialFailure extends LDKPaymentSendFailure {
-                       PartialFailure() { }
+                       public long[] partial_failure;
+                       PartialFailure(long[] partial_failure) { this.partial_failure = partial_failure; }
                }
                static native void init();
        }
@@ -728,13 +775,13 @@ public class bindings {
        public static native void Listen_block_disconnected(long this_arg, byte[] header, int height);
        public interface LDKFilter {
                 void register_tx(byte[] txid, byte[] script_pubkey);
-                void register_output(long outpoint, byte[] script_pubkey);
+                long register_output(long output);
        }
        public static native long LDKFilter_new(LDKFilter impl);
        // void Filter_register_tx LDKFilter *NONNULL_PTR this_arg, const uint8_t (*txid)[32], struct LDKu8slice script_pubkey
        public static native void Filter_register_tx(long this_arg, byte[] txid, byte[] script_pubkey);
-       // void Filter_register_output LDKFilter *NONNULL_PTR this_arg, const struct LDKOutPoint *NONNULL_PTR outpoint, struct LDKu8slice script_pubkey
-       public static native void Filter_register_output(long this_arg, long outpoint, byte[] script_pubkey);
+       // LDKCOption_C2Tuple_usizeTransactionZZ Filter_register_output LDKFilter *NONNULL_PTR this_arg, struct LDKWatchedOutput output
+       public static native long Filter_register_output(long this_arg, long output);
        public interface LDKPersist {
                 long persist_new_channel(long id, long data);
                 long update_persisted_channel(long id, long update, long data);
@@ -896,6 +943,14 @@ public class bindings {
        public static native long CResult_TxCreationKeysErrorZ_err(LDKSecp256k1Error e);
        // void CResult_TxCreationKeysErrorZ_free(struct LDKCResult_TxCreationKeysErrorZ _res);
        public static native void CResult_TxCreationKeysErrorZ_free(long _res);
+       // struct LDKCOption_u32Z COption_u32Z_some(uint32_t o);
+       public static native long COption_u32Z_some(int o);
+       // struct LDKCOption_u32Z COption_u32Z_none(void);
+       public static native long COption_u32Z_none();
+       // void COption_u32Z_free(struct LDKCOption_u32Z _res);
+       public static native void COption_u32Z_free(long _res);
+       // struct LDKCOption_u32Z COption_u32Z_clone(const struct LDKCOption_u32Z *NONNULL_PTR orig);
+       public static native long COption_u32Z_clone(long orig);
        // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(struct LDKHTLCOutputInCommitment o);
        public static native long CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(long o);
        // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_err(struct LDKDecodeError e);
@@ -1048,6 +1103,14 @@ public class bindings {
        public static native void CResult_ChannelConfigDecodeErrorZ_free(long _res);
        // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_clone(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR orig);
        public static native long CResult_ChannelConfigDecodeErrorZ_clone(long orig);
+       // struct LDKCOption_u64Z COption_u64Z_some(uint64_t o);
+       public static native long COption_u64Z_some(long o);
+       // struct LDKCOption_u64Z COption_u64Z_none(void);
+       public static native long COption_u64Z_none();
+       // void COption_u64Z_free(struct LDKCOption_u64Z _res);
+       public static native void COption_u64Z_free(long _res);
+       // struct LDKCOption_u64Z COption_u64Z_clone(const struct LDKCOption_u64Z *NONNULL_PTR orig);
+       public static native long COption_u64Z_clone(long orig);
        // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_ok(struct LDKDirectionalChannelInfo o);
        public static native long CResult_DirectionalChannelInfoDecodeErrorZ_ok(long o);
        // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
@@ -1206,6 +1269,12 @@ public class bindings {
        public static native void CResult_TxOutAccessErrorZ_free(long _res);
        // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_clone(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR orig);
        public static native long CResult_TxOutAccessErrorZ_clone(long orig);
+       // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_some(struct LDKC2Tuple_usizeTransactionZ o);
+       public static native long COption_C2Tuple_usizeTransactionZZ_some(long o);
+       // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_none(void);
+       public static native long COption_C2Tuple_usizeTransactionZZ_none();
+       // void COption_C2Tuple_usizeTransactionZZ_free(struct LDKCOption_C2Tuple_usizeTransactionZZ _res);
+       public static native void COption_C2Tuple_usizeTransactionZZ_free(long _res);
        // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
        public static native long CResult_NoneAPIErrorZ_ok();
        // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e);
@@ -1748,6 +1817,22 @@ public class bindings {
        public static native void Watch_free(long this_ptr);
        // void Filter_free(struct LDKFilter this_ptr);
        public static native void Filter_free(long this_ptr);
+       // void WatchedOutput_free(struct LDKWatchedOutput this_obj);
+       public static native void WatchedOutput_free(long this_obj);
+       // struct LDKThirtyTwoBytes WatchedOutput_get_block_hash(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
+       public static native byte[] WatchedOutput_get_block_hash(long this_ptr);
+       // void WatchedOutput_set_block_hash(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+       public static native void WatchedOutput_set_block_hash(long this_ptr, byte[] val);
+       // struct LDKOutPoint WatchedOutput_get_outpoint(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
+       public static native long WatchedOutput_get_outpoint(long this_ptr);
+       // void WatchedOutput_set_outpoint(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKOutPoint val);
+       public static native void WatchedOutput_set_outpoint(long this_ptr, long val);
+       // struct LDKu8slice WatchedOutput_get_script_pubkey(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
+       public static native byte[] WatchedOutput_get_script_pubkey(long this_ptr);
+       // void WatchedOutput_set_script_pubkey(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
+       public static native void WatchedOutput_set_script_pubkey(long this_ptr, byte[] val);
+       // MUST_USE_RES struct LDKWatchedOutput WatchedOutput_new(struct LDKThirtyTwoBytes block_hash_arg, struct LDKOutPoint outpoint_arg, struct LDKCVec_u8Z script_pubkey_arg);
+       public static native long WatchedOutput_new(byte[] block_hash_arg, long outpoint_arg, byte[] script_pubkey_arg);
        // void BroadcasterInterface_free(struct LDKBroadcasterInterface this_ptr);
        public static native void BroadcasterInterface_free(long this_ptr);
        // enum LDKConfirmationTarget ConfirmationTarget_clone(const enum LDKConfirmationTarget *NONNULL_PTR orig);
@@ -1998,6 +2083,10 @@ public class bindings {
        public static native byte[] ChannelDetails_get_channel_id(long this_ptr);
        // void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
        public static native void ChannelDetails_set_channel_id(long this_ptr, byte[] val);
+       // struct LDKCOption_u64Z ChannelDetails_get_short_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
+       public static native long ChannelDetails_get_short_channel_id(long this_ptr);
+       // void ChannelDetails_set_short_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+       public static native void ChannelDetails_set_short_channel_id(long this_ptr, long val);
        // struct LDKPublicKey ChannelDetails_get_remote_network_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
        public static native byte[] ChannelDetails_get_remote_network_id(long this_ptr);
        // void ChannelDetails_set_remote_network_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKPublicKey val);
@@ -3124,6 +3213,12 @@ public class bindings {
        public static native byte[] HTLCOutputInCommitment_get_payment_hash(long this_ptr);
        // void HTLCOutputInCommitment_set_payment_hash(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
        public static native void HTLCOutputInCommitment_set_payment_hash(long this_ptr, byte[] val);
+       // struct LDKCOption_u32Z HTLCOutputInCommitment_get_transaction_output_index(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
+       public static native long HTLCOutputInCommitment_get_transaction_output_index(long this_ptr);
+       // void HTLCOutputInCommitment_set_transaction_output_index(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
+       public static native void HTLCOutputInCommitment_set_transaction_output_index(long this_ptr, long val);
+       // MUST_USE_RES struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_new(bool offered_arg, uint64_t amount_msat_arg, uint32_t cltv_expiry_arg, struct LDKThirtyTwoBytes payment_hash_arg, struct LDKCOption_u32Z transaction_output_index_arg);
+       public static native long HTLCOutputInCommitment_new(boolean offered_arg, long amount_msat_arg, int cltv_expiry_arg, byte[] payment_hash_arg, long transaction_output_index_arg);
        // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const struct LDKHTLCOutputInCommitment *NONNULL_PTR orig);
        public static native long HTLCOutputInCommitment_clone(long orig);
        // struct LDKCVec_u8Z HTLCOutputInCommitment_write(const struct LDKHTLCOutputInCommitment *NONNULL_PTR obj);
@@ -3380,6 +3475,16 @@ public class bindings {
        public static native short RouteHint_get_cltv_expiry_delta(long this_ptr);
        // void RouteHint_set_cltv_expiry_delta(struct LDKRouteHint *NONNULL_PTR this_ptr, uint16_t val);
        public static native void RouteHint_set_cltv_expiry_delta(long this_ptr, short val);
+       // struct LDKCOption_u64Z RouteHint_get_htlc_minimum_msat(const struct LDKRouteHint *NONNULL_PTR this_ptr);
+       public static native long RouteHint_get_htlc_minimum_msat(long this_ptr);
+       // void RouteHint_set_htlc_minimum_msat(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+       public static native void RouteHint_set_htlc_minimum_msat(long this_ptr, long val);
+       // struct LDKCOption_u64Z RouteHint_get_htlc_maximum_msat(const struct LDKRouteHint *NONNULL_PTR this_ptr);
+       public static native long RouteHint_get_htlc_maximum_msat(long this_ptr);
+       // void RouteHint_set_htlc_maximum_msat(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+       public static native void RouteHint_set_htlc_maximum_msat(long this_ptr, long val);
+       // MUST_USE_RES struct LDKRouteHint RouteHint_new(struct LDKPublicKey src_node_id_arg, uint64_t short_channel_id_arg, struct LDKRoutingFees fees_arg, uint16_t cltv_expiry_delta_arg, struct LDKCOption_u64Z htlc_minimum_msat_arg, struct LDKCOption_u64Z htlc_maximum_msat_arg);
+       public static native long RouteHint_new(byte[] src_node_id_arg, long short_channel_id_arg, long fees_arg, short cltv_expiry_delta_arg, long htlc_minimum_msat_arg, long htlc_maximum_msat_arg);
        // struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
        public static native long RouteHint_clone(long orig);
        // struct LDKCResult_RouteLightningErrorZ get_route(struct LDKPublicKey our_node_id, const struct LDKNetworkGraph *NONNULL_PTR network, struct LDKPublicKey payee, struct LDKInvoiceFeatures payee_features, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKCVec_RouteHintZ last_hops, uint64_t final_value_msat, uint32_t final_cltv, struct LDKLogger logger);
@@ -3424,6 +3529,10 @@ public class bindings {
        public static native long DirectionalChannelInfo_get_htlc_minimum_msat(long this_ptr);
        // void DirectionalChannelInfo_set_htlc_minimum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint64_t val);
        public static native void DirectionalChannelInfo_set_htlc_minimum_msat(long this_ptr, long val);
+       // struct LDKCOption_u64Z DirectionalChannelInfo_get_htlc_maximum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
+       public static native long DirectionalChannelInfo_get_htlc_maximum_msat(long this_ptr);
+       // void DirectionalChannelInfo_set_htlc_maximum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+       public static native void DirectionalChannelInfo_set_htlc_maximum_msat(long this_ptr, long val);
        // struct LDKRoutingFees DirectionalChannelInfo_get_fees(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
        public static native long DirectionalChannelInfo_get_fees(long this_ptr);
        // void DirectionalChannelInfo_set_fees(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
@@ -3432,6 +3541,8 @@ public class bindings {
        public static native long DirectionalChannelInfo_get_last_update_message(long this_ptr);
        // void DirectionalChannelInfo_set_last_update_message(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelUpdate val);
        public static native void DirectionalChannelInfo_set_last_update_message(long this_ptr, long val);
+       // MUST_USE_RES struct LDKDirectionalChannelInfo DirectionalChannelInfo_new(uint32_t last_update_arg, bool enabled_arg, uint16_t cltv_expiry_delta_arg, uint64_t htlc_minimum_msat_arg, struct LDKCOption_u64Z htlc_maximum_msat_arg, struct LDKRoutingFees fees_arg, struct LDKChannelUpdate last_update_message_arg);
+       public static native long DirectionalChannelInfo_new(int last_update_arg, boolean enabled_arg, short cltv_expiry_delta_arg, long htlc_minimum_msat_arg, long htlc_maximum_msat_arg, long fees_arg, long last_update_message_arg);
        // struct LDKDirectionalChannelInfo DirectionalChannelInfo_clone(const struct LDKDirectionalChannelInfo *NONNULL_PTR orig);
        public static native long DirectionalChannelInfo_clone(long orig);
        // struct LDKCVec_u8Z DirectionalChannelInfo_write(const struct LDKDirectionalChannelInfo *NONNULL_PTR obj);
@@ -3460,10 +3571,16 @@ public class bindings {
        public static native long ChannelInfo_get_two_to_one(long this_ptr);
        // void ChannelInfo_set_two_to_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
        public static native void ChannelInfo_set_two_to_one(long this_ptr, long val);
+       // struct LDKCOption_u64Z ChannelInfo_get_capacity_sats(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
+       public static native long ChannelInfo_get_capacity_sats(long this_ptr);
+       // void ChannelInfo_set_capacity_sats(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+       public static native void ChannelInfo_set_capacity_sats(long this_ptr, long val);
        // struct LDKChannelAnnouncement ChannelInfo_get_announcement_message(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
        public static native long ChannelInfo_get_announcement_message(long this_ptr);
        // void ChannelInfo_set_announcement_message(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelAnnouncement val);
        public static native void ChannelInfo_set_announcement_message(long this_ptr, long val);
+       // MUST_USE_RES struct LDKChannelInfo ChannelInfo_new(struct LDKChannelFeatures features_arg, struct LDKPublicKey node_one_arg, struct LDKDirectionalChannelInfo one_to_two_arg, struct LDKPublicKey node_two_arg, struct LDKDirectionalChannelInfo two_to_one_arg, struct LDKCOption_u64Z capacity_sats_arg, struct LDKChannelAnnouncement announcement_message_arg);
+       public static native long ChannelInfo_new(long features_arg, byte[] node_one_arg, long one_to_two_arg, byte[] node_two_arg, long two_to_one_arg, long capacity_sats_arg, long announcement_message_arg);
        // struct LDKChannelInfo ChannelInfo_clone(const struct LDKChannelInfo *NONNULL_PTR orig);
        public static native long ChannelInfo_clone(long orig);
        // struct LDKCVec_u8Z ChannelInfo_write(const struct LDKChannelInfo *NONNULL_PTR obj);
index 6e760fbb16ddcd51a0ca4747a6340a2b1e422dbe..37478865b4cb00d99211ee72953e2dec91d2da29 100644 (file)
@@ -73,4 +73,14 @@ public class APIError extends CommonBase {
                        super(null, ptr);
                }
        }
+       /**
+        * Creates a copy of the APIError
+        */
+       public APIError clone() {
+               long ret = bindings.APIError_clone(this.ptr);
+               APIError ret_hu_conv = APIError.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
 }
index 2f34454ccda21400ba7c215d01d63398ada02409..0a2fbb4801b7c8ae8acc59f1af9308ee7b39dc43 100644 (file)
@@ -39,6 +39,25 @@ public class ChannelDetails extends CommonBase {
                bindings.ChannelDetails_set_channel_id(this.ptr, val);
        }
 
+       /**
+        * The position of the funding transaction in the chain. None if the funding transaction has
+        * not yet been confirmed and the channel fully opened.
+        */
+       public Option_u64Z get_short_channel_id() {
+               long ret = bindings.ChannelDetails_get_short_channel_id(this.ptr);
+               Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       /**
+        * The position of the funding transaction in the chain. None if the funding transaction has
+        * not yet been confirmed and the channel fully opened.
+        */
+       public void set_short_channel_id(Option_u64Z val) {
+               bindings.ChannelDetails_set_short_channel_id(this.ptr, val.ptr);
+       }
+
        /**
         * The node_id of our counterparty
         */
index 8206d572a63b52e1d1d4ff2d81e8f49350c34fa0..dc995e791035cc919e7207e7c9f67442983ad1a2 100644 (file)
@@ -103,6 +103,23 @@ public class ChannelInfo extends CommonBase {
                this.ptrs_to.add(val);
        }
 
+       /**
+        * The channel capacity as seen on-chain, if chain lookup is available.
+        */
+       public Option_u64Z get_capacity_sats() {
+               long ret = bindings.ChannelInfo_get_capacity_sats(this.ptr);
+               Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       /**
+        * The channel capacity as seen on-chain, if chain lookup is available.
+        */
+       public void set_capacity_sats(Option_u64Z val) {
+               bindings.ChannelInfo_set_capacity_sats(this.ptr, val.ptr);
+       }
+
        /**
         * An initial announcement of the channel
         * Mostly redundant with the data we store in fields explicitly.
@@ -127,6 +144,20 @@ public class ChannelInfo extends CommonBase {
                this.ptrs_to.add(val);
        }
 
+       /**
+        * Constructs a new ChannelInfo given each field
+        */
+       public static ChannelInfo constructor_new(ChannelFeatures features_arg, byte[] node_one_arg, DirectionalChannelInfo one_to_two_arg, byte[] node_two_arg, DirectionalChannelInfo two_to_one_arg, Option_u64Z capacity_sats_arg, ChannelAnnouncement announcement_message_arg) {
+               long ret = bindings.ChannelInfo_new(features_arg == null ? 0 : features_arg.ptr & ~1, node_one_arg, one_to_two_arg == null ? 0 : one_to_two_arg.ptr & ~1, node_two_arg, two_to_one_arg == null ? 0 : two_to_one_arg.ptr & ~1, capacity_sats_arg.ptr, announcement_message_arg == null ? 0 : announcement_message_arg.ptr & ~1);
+               ChannelInfo ret_hu_conv = new ChannelInfo(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               ret_hu_conv.ptrs_to.add(features_arg);
+               ret_hu_conv.ptrs_to.add(one_to_two_arg);
+               ret_hu_conv.ptrs_to.add(two_to_one_arg);
+               ret_hu_conv.ptrs_to.add(announcement_message_arg);
+               return ret_hu_conv;
+       }
+
        /**
         * Creates a copy of the ChannelInfo
         */
index 5610a704c4362e6b1f4a1077296645faa00971a4..7352793e7dc8893c69cf3c610e0ac55be23c09d0 100644 (file)
@@ -81,6 +81,23 @@ public class DirectionalChannelInfo extends CommonBase {
                bindings.DirectionalChannelInfo_set_htlc_minimum_msat(this.ptr, val);
        }
 
+       /**
+        * The maximum value which may be relayed to the next hop via the channel.
+        */
+       public Option_u64Z get_htlc_maximum_msat() {
+               long ret = bindings.DirectionalChannelInfo_get_htlc_maximum_msat(this.ptr);
+               Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       /**
+        * The maximum value which may be relayed to the next hop via the channel.
+        */
+       public void set_htlc_maximum_msat(Option_u64Z val) {
+               bindings.DirectionalChannelInfo_set_htlc_maximum_msat(this.ptr, val.ptr);
+       }
+
        /**
         * Fees charged when the channel is used for routing
         */
@@ -123,6 +140,18 @@ public class DirectionalChannelInfo extends CommonBase {
                this.ptrs_to.add(val);
        }
 
+       /**
+        * Constructs a new DirectionalChannelInfo given each field
+        */
+       public static DirectionalChannelInfo constructor_new(int last_update_arg, boolean enabled_arg, short cltv_expiry_delta_arg, long htlc_minimum_msat_arg, Option_u64Z htlc_maximum_msat_arg, RoutingFees fees_arg, ChannelUpdate last_update_message_arg) {
+               long ret = bindings.DirectionalChannelInfo_new(last_update_arg, enabled_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg.ptr, fees_arg == null ? 0 : fees_arg.ptr & ~1, last_update_message_arg == null ? 0 : last_update_message_arg.ptr & ~1);
+               DirectionalChannelInfo ret_hu_conv = new DirectionalChannelInfo(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               ret_hu_conv.ptrs_to.add(fees_arg);
+               ret_hu_conv.ptrs_to.add(last_update_message_arg);
+               return ret_hu_conv;
+       }
+
        /**
         * Creates a copy of the DirectionalChannelInfo
         */
index 08f79d46b9c69e3783263a86fdacc2823e654bf7..e553c2697d11b560b1c219c4dca764fad913d475 100644 (file)
@@ -56,4 +56,14 @@ public class ErrorAction extends CommonBase {
                        this.msg = msg_hu_conv;
                }
        }
+       /**
+        * Creates a copy of the ErrorAction
+        */
+       public ErrorAction clone() {
+               long ret = bindings.ErrorAction_clone(this.ptr);
+               ErrorAction ret_hu_conv = ErrorAction.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
 }
index 163c7a97d689f9b90c6c160608cb2f8ebbfed270..edfa67cde20e10d46a0f0cab3e8654c510819077 100644 (file)
@@ -121,4 +121,22 @@ public class Event extends CommonBase {
                        this.outputs = outputs_conv_27_arr;
                }
        }
+       /**
+        * Creates a copy of the Event
+        */
+       public Event clone() {
+               long ret = bindings.Event_clone(this.ptr);
+               Event ret_hu_conv = Event.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Serialize the Event object into a byte array which can be read by Event_read
+        */
+       public byte[] write() {
+               byte[] ret = bindings.Event_write(this.ptr);
+               return ret;
+       }
+
 }
index 776d95ede643a5a88fcd065d2bbc1b431a766dd7..9200d9a14311e47e9fb8e5ba4dd49d3bf3651d76 100644 (file)
@@ -48,10 +48,17 @@ public class Filter extends CommonBase {
                 */
                void register_tx(byte[] txid, byte[] script_pubkey);
                /**
-                * Registers interest in spends of a transaction output identified by `outpoint` having
-                * `script_pubkey` as the spending condition.
+                * Registers interest in spends of a transaction output.
+                * 
+                * Optionally, when `output.block_hash` is set, should return any transaction spending the
+                * output that is found in the corresponding block along with its index.
+                * 
+                * This return value is useful for Electrum clients in order to supply in-block descendant
+                * transactions which otherwise were not included. This is not necessary for other clients if
+                * such descendant transactions were already included (e.g., when a BIP 157 client provides the
+                * full block).
                 */
-               void register_output(OutPoint outpoint, byte[] script_pubkey);
+               Option_C2Tuple_usizeTransactionZZ register_output(WatchedOutput output);
        }
        private static class LDKFilterHolder { Filter held; }
        public static Filter new_impl(FilterInterface arg) {
@@ -60,9 +67,12 @@ public class Filter extends CommonBase {
                        @Override public void register_tx(byte[] txid, byte[] script_pubkey) {
                                arg.register_tx(txid, script_pubkey);
                        }
-                       @Override public void register_output(long outpoint, byte[] script_pubkey) {
-                               OutPoint outpoint_hu_conv = new OutPoint(null, outpoint);
-                               arg.register_output(outpoint_hu_conv, script_pubkey);
+                       @Override public long register_output(long output) {
+                               WatchedOutput output_hu_conv = new WatchedOutput(null, output);
+                               output_hu_conv.ptrs_to.add(this);
+                               Option_C2Tuple_usizeTransactionZZ ret = arg.register_output(output_hu_conv);
+                               long result = ret.ptr;
+                               return result;
                        }
                });
                return impl_holder.held;
@@ -76,12 +86,22 @@ public class Filter extends CommonBase {
        }
 
        /**
-        * Registers interest in spends of a transaction output identified by `outpoint` having
-        * `script_pubkey` as the spending condition.
+        * Registers interest in spends of a transaction output.
+        * 
+        * Optionally, when `output.block_hash` is set, should return any transaction spending the
+        * output that is found in the corresponding block along with its index.
+        * 
+        * This return value is useful for Electrum clients in order to supply in-block descendant
+        * transactions which otherwise were not included. This is not necessary for other clients if
+        * such descendant transactions were already included (e.g., when a BIP 157 client provides the
+        * full block).
         */
-       public void register_output(OutPoint outpoint, byte[] script_pubkey) {
-               bindings.Filter_register_output(this.ptr, outpoint == null ? 0 : outpoint.ptr & ~1, script_pubkey);
-               this.ptrs_to.add(outpoint);
+       public Option_C2Tuple_usizeTransactionZZ register_output(byte[] output_block_hash_arg, OutPoint output_outpoint_arg, byte[] output_script_pubkey_arg) {
+               long ret = bindings.Filter_register_output(this.ptr, bindings.WatchedOutput_new(output_block_hash_arg, output_outpoint_arg == null ? 0 : output_outpoint_arg.ptr & ~1, output_script_pubkey_arg));
+               Option_C2Tuple_usizeTransactionZZ ret_hu_conv = Option_C2Tuple_usizeTransactionZZ.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(this);
+               ret_hu_conv.ptrs_to.add(output_outpoint_arg);
+               return ret_hu_conv;
        }
 
 }
index 8638893080efd0bc6c43ea43f20bd1cd63c8c727..7ce939f9613ca9a5663ae75cc84c0b314e668eed 100644 (file)
@@ -61,4 +61,14 @@ public class HTLCFailChannelUpdate extends CommonBase {
                        this.is_permanent = obj.is_permanent;
                }
        }
+       /**
+        * Creates a copy of the HTLCFailChannelUpdate
+        */
+       public HTLCFailChannelUpdate clone() {
+               long ret = bindings.HTLCFailChannelUpdate_clone(this.ptr);
+               HTLCFailChannelUpdate ret_hu_conv = HTLCFailChannelUpdate.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
 }
index 0f47affa2de9ab11b68100ce2eb881dfc3e00482..52dd0caef08b820c635e7a0cd7e881518052f37a 100644 (file)
@@ -86,6 +86,37 @@ public class HTLCOutputInCommitment extends CommonBase {
                bindings.HTLCOutputInCommitment_set_payment_hash(this.ptr, val);
        }
 
+       /**
+        * The position within the commitment transactions' outputs. This may be None if the value is
+        * below the dust limit (in which case no output appears in the commitment transaction and the
+        * value is spent to additional transaction fees).
+        */
+       public Option_u32Z get_transaction_output_index() {
+               long ret = bindings.HTLCOutputInCommitment_get_transaction_output_index(this.ptr);
+               Option_u32Z ret_hu_conv = Option_u32Z.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       /**
+        * The position within the commitment transactions' outputs. This may be None if the value is
+        * below the dust limit (in which case no output appears in the commitment transaction and the
+        * value is spent to additional transaction fees).
+        */
+       public void set_transaction_output_index(Option_u32Z val) {
+               bindings.HTLCOutputInCommitment_set_transaction_output_index(this.ptr, val.ptr);
+       }
+
+       /**
+        * Constructs a new HTLCOutputInCommitment given each field
+        */
+       public static HTLCOutputInCommitment constructor_new(boolean offered_arg, long amount_msat_arg, int cltv_expiry_arg, byte[] payment_hash_arg, Option_u32Z transaction_output_index_arg) {
+               long ret = bindings.HTLCOutputInCommitment_new(offered_arg, amount_msat_arg, cltv_expiry_arg, payment_hash_arg, transaction_output_index_arg.ptr);
+               HTLCOutputInCommitment ret_hu_conv = new HTLCOutputInCommitment(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
        /**
         * Creates a copy of the HTLCOutputInCommitment
         */
index 36e816f8acf257b99440cb6433464cb8cc720d21..e1a703df0a3914ba197cde9ae59e04d7f2b80429 100644 (file)
@@ -306,4 +306,14 @@ public class MessageSendEvent extends CommonBase {
                        this.msg = msg_hu_conv;
                }
        }
+       /**
+        * Creates a copy of the MessageSendEvent
+        */
+       public MessageSendEvent clone() {
+               long ret = bindings.MessageSendEvent_clone(this.ptr);
+               MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
 }
index e3af020d4aa19f68bf098c50ad0925f8232216a2..68421e71b46e7c1b82bdb7ac26004156aa5f008d 100644 (file)
@@ -29,13 +29,33 @@ public class MonitorEvent extends CommonBase {
        }
 
        public final static class HTLCEvent extends MonitorEvent {
+               public final HTLCUpdate htlc_event;
                private HTLCEvent(long ptr, bindings.LDKMonitorEvent.HTLCEvent obj) {
                        super(null, ptr);
+                       long htlc_event = obj.htlc_event;
+                       HTLCUpdate htlc_event_hu_conv = new HTLCUpdate(null, htlc_event);
+                       htlc_event_hu_conv.ptrs_to.add(this);
+                       this.htlc_event = htlc_event_hu_conv;
                }
        }
        public final static class CommitmentTxBroadcasted extends MonitorEvent {
+               public final OutPoint commitment_tx_broadcasted;
                private CommitmentTxBroadcasted(long ptr, bindings.LDKMonitorEvent.CommitmentTxBroadcasted obj) {
                        super(null, ptr);
+                       long commitment_tx_broadcasted = obj.commitment_tx_broadcasted;
+                       OutPoint commitment_tx_broadcasted_hu_conv = new OutPoint(null, commitment_tx_broadcasted);
+                       commitment_tx_broadcasted_hu_conv.ptrs_to.add(this);
+                       this.commitment_tx_broadcasted = commitment_tx_broadcasted_hu_conv;
                }
        }
+       /**
+        * Creates a copy of the MonitorEvent
+        */
+       public MonitorEvent clone() {
+               long ret = bindings.MonitorEvent_clone(this.ptr);
+               MonitorEvent ret_hu_conv = MonitorEvent.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
 }
index 2cde093aac976425f31851696f39fcee166356c5..646489eba079debf0fdb35a3860ef4ca38e2add5 100644 (file)
@@ -74,4 +74,22 @@ public class NetAddress extends CommonBase {
                        this.port = obj.port;
                }
        }
+       /**
+        * Creates a copy of the NetAddress
+        */
+       public NetAddress clone() {
+               long ret = bindings.NetAddress_clone(this.ptr);
+               NetAddress ret_hu_conv = NetAddress.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Serialize the NetAddress object into a byte array which can be read by NetAddress_read
+        */
+       public byte[] write() {
+               byte[] ret = bindings.NetAddress_write(this.ptr);
+               return ret;
+       }
+
 }
diff --git a/src/main/java/org/ldk/structs/Option_C2Tuple_usizeTransactionZZ.java b/src/main/java/org/ldk/structs/Option_C2Tuple_usizeTransactionZZ.java
new file mode 100644 (file)
index 0000000..6437971
--- /dev/null
@@ -0,0 +1,69 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+
+/**
+ * An enum which can either contain a crate::c_types::derived::C2Tuple_usizeTransactionZ or not
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Option_C2Tuple_usizeTransactionZZ extends CommonBase {
+       private Option_C2Tuple_usizeTransactionZZ(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.COption_C2Tuple_usizeTransactionZZ_free(ptr); }
+       }
+       static Option_C2Tuple_usizeTransactionZZ constr_from_ptr(long ptr) {
+               bindings.LDKCOption_C2Tuple_usizeTransactionZZ raw_val = bindings.LDKCOption_C2Tuple_usizeTransactionZZ_ref_from_ptr(ptr);
+               if (raw_val.getClass() == bindings.LDKCOption_C2Tuple_usizeTransactionZZ.Some.class) {
+                       return new Some(ptr, (bindings.LDKCOption_C2Tuple_usizeTransactionZZ.Some)raw_val);
+               }
+               if (raw_val.getClass() == bindings.LDKCOption_C2Tuple_usizeTransactionZZ.None.class) {
+                       return new None(ptr, (bindings.LDKCOption_C2Tuple_usizeTransactionZZ.None)raw_val);
+               }
+               assert false; return null; // Unreachable without extending the (internal) bindings interface
+       }
+
+       public final static class Some extends Option_C2Tuple_usizeTransactionZZ {
+               public final TwoTuple<Long, byte[]> 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;
+               }
+       }
+       public final static class None extends Option_C2Tuple_usizeTransactionZZ {
+               private None(long ptr, bindings.LDKCOption_C2Tuple_usizeTransactionZZ.None obj) {
+                       super(null, ptr);
+               }
+       }
+       /**
+        * Constructs a new COption_C2Tuple_usizeTransactionZZ containing a crate::c_types::derived::C2Tuple_usizeTransactionZ
+        */
+       public static Option_C2Tuple_usizeTransactionZZ constructor_some(TwoTuple<Long, byte[]> o) {
+               long ret = bindings.COption_C2Tuple_usizeTransactionZZ_some(bindings.C2Tuple_usizeTransactionZ_new(o.a, o.b));
+               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;
+       }
+
+       /**
+        * Constructs a new COption_C2Tuple_usizeTransactionZZ containing nothing
+        */
+       public static Option_C2Tuple_usizeTransactionZZ constructor_none() {
+               long 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;
+       }
+
+}
diff --git a/src/main/java/org/ldk/structs/Option_u32Z.java b/src/main/java/org/ldk/structs/Option_u32Z.java
new file mode 100644 (file)
index 0000000..f507498
--- /dev/null
@@ -0,0 +1,74 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+
+/**
+ * An enum which can either contain a u32 or not
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Option_u32Z extends CommonBase {
+       private Option_u32Z(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.COption_u32Z_free(ptr); }
+       }
+       static Option_u32Z constr_from_ptr(long ptr) {
+               bindings.LDKCOption_u32Z raw_val = bindings.LDKCOption_u32Z_ref_from_ptr(ptr);
+               if (raw_val.getClass() == bindings.LDKCOption_u32Z.Some.class) {
+                       return new Some(ptr, (bindings.LDKCOption_u32Z.Some)raw_val);
+               }
+               if (raw_val.getClass() == bindings.LDKCOption_u32Z.None.class) {
+                       return new None(ptr, (bindings.LDKCOption_u32Z.None)raw_val);
+               }
+               assert false; return null; // Unreachable without extending the (internal) bindings interface
+       }
+
+       public final static class Some extends Option_u32Z {
+               public final int some;
+               private Some(long ptr, bindings.LDKCOption_u32Z.Some obj) {
+                       super(null, ptr);
+                       this.some = obj.some;
+               }
+       }
+       public final static class None extends Option_u32Z {
+               private None(long ptr, bindings.LDKCOption_u32Z.None obj) {
+                       super(null, ptr);
+               }
+       }
+       /**
+        * Constructs a new COption_u32Z containing a u32
+        */
+       public static Option_u32Z constructor_some(int o) {
+               long 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;
+       }
+
+       /**
+        * Constructs a new COption_u32Z containing nothing
+        */
+       public static Option_u32Z constructor_none() {
+               long 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;
+       }
+
+       /**
+        * Creates a new COption_u32Z which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Option_u32Z clone() {
+               long 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);
+               return ret_hu_conv;
+       }
+
+}
diff --git a/src/main/java/org/ldk/structs/Option_u64Z.java b/src/main/java/org/ldk/structs/Option_u64Z.java
new file mode 100644 (file)
index 0000000..5bc5b6c
--- /dev/null
@@ -0,0 +1,74 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+
+/**
+ * An enum which can either contain a u64 or not
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Option_u64Z extends CommonBase {
+       private Option_u64Z(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.COption_u64Z_free(ptr); }
+       }
+       static Option_u64Z constr_from_ptr(long ptr) {
+               bindings.LDKCOption_u64Z raw_val = bindings.LDKCOption_u64Z_ref_from_ptr(ptr);
+               if (raw_val.getClass() == bindings.LDKCOption_u64Z.Some.class) {
+                       return new Some(ptr, (bindings.LDKCOption_u64Z.Some)raw_val);
+               }
+               if (raw_val.getClass() == bindings.LDKCOption_u64Z.None.class) {
+                       return new None(ptr, (bindings.LDKCOption_u64Z.None)raw_val);
+               }
+               assert false; return null; // Unreachable without extending the (internal) bindings interface
+       }
+
+       public final static class Some extends Option_u64Z {
+               public final long some;
+               private Some(long ptr, bindings.LDKCOption_u64Z.Some obj) {
+                       super(null, ptr);
+                       this.some = obj.some;
+               }
+       }
+       public final static class None extends Option_u64Z {
+               private None(long ptr, bindings.LDKCOption_u64Z.None obj) {
+                       super(null, ptr);
+               }
+       }
+       /**
+        * Constructs a new COption_u64Z containing a u64
+        */
+       public static Option_u64Z constructor_some(long o) {
+               long 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;
+       }
+
+       /**
+        * Constructs a new COption_u64Z containing nothing
+        */
+       public static Option_u64Z constructor_none() {
+               long 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;
+       }
+
+       /**
+        * Creates a new COption_u64Z which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Option_u64Z clone() {
+               long 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);
+               return ret_hu_conv;
+       }
+
+}
index b329a41387c74fd6246b763791726c2e5b780230..4e9bb14976d3f4eb311dd718187d21dfa27a734f 100644 (file)
@@ -37,23 +37,66 @@ public class PaymentSendFailure extends CommonBase {
        }
 
        public final static class ParameterError extends PaymentSendFailure {
+               public final APIError parameter_error;
                private ParameterError(long ptr, bindings.LDKPaymentSendFailure.ParameterError obj) {
                        super(null, ptr);
+                       long parameter_error = obj.parameter_error;
+                       APIError parameter_error_hu_conv = APIError.constr_from_ptr(parameter_error);
+                       parameter_error_hu_conv.ptrs_to.add(this);
+                       this.parameter_error = parameter_error_hu_conv;
                }
        }
        public final static class PathParameterError extends PaymentSendFailure {
+               public final Result_NoneAPIErrorZ[] path_parameter_error;
                private PathParameterError(long ptr, bindings.LDKPaymentSendFailure.PathParameterError obj) {
                        super(null, ptr);
+                       long[] path_parameter_error = obj.path_parameter_error;
+                       Result_NoneAPIErrorZ[] path_parameter_error_conv_22_arr = new Result_NoneAPIErrorZ[path_parameter_error.length];
+                       for (int w = 0; w < path_parameter_error.length; w++) {
+                               long path_parameter_error_conv_22 = path_parameter_error[w];
+                               Result_NoneAPIErrorZ path_parameter_error_conv_22_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(path_parameter_error_conv_22);
+                               path_parameter_error_conv_22_arr[w] = path_parameter_error_conv_22_hu_conv;
+                       }
+                       this.path_parameter_error = path_parameter_error_conv_22_arr;
                }
        }
        public final static class AllFailedRetrySafe extends PaymentSendFailure {
+               public final APIError[] all_failed_retry_safe;
                private AllFailedRetrySafe(long ptr, bindings.LDKPaymentSendFailure.AllFailedRetrySafe obj) {
                        super(null, ptr);
+                       long[] all_failed_retry_safe = obj.all_failed_retry_safe;
+                       APIError[] all_failed_retry_safe_conv_10_arr = new APIError[all_failed_retry_safe.length];
+                       for (int k = 0; k < all_failed_retry_safe.length; k++) {
+                               long all_failed_retry_safe_conv_10 = all_failed_retry_safe[k];
+                               APIError all_failed_retry_safe_conv_10_hu_conv = APIError.constr_from_ptr(all_failed_retry_safe_conv_10);
+                               all_failed_retry_safe_conv_10_hu_conv.ptrs_to.add(this);
+                               all_failed_retry_safe_conv_10_arr[k] = all_failed_retry_safe_conv_10_hu_conv;
+                       }
+                       this.all_failed_retry_safe = all_failed_retry_safe_conv_10_arr;
                }
        }
        public final static class PartialFailure extends PaymentSendFailure {
+               public final Result_NoneAPIErrorZ[] partial_failure;
                private PartialFailure(long ptr, bindings.LDKPaymentSendFailure.PartialFailure obj) {
                        super(null, ptr);
+                       long[] partial_failure = obj.partial_failure;
+                       Result_NoneAPIErrorZ[] partial_failure_conv_22_arr = new Result_NoneAPIErrorZ[partial_failure.length];
+                       for (int w = 0; w < partial_failure.length; w++) {
+                               long partial_failure_conv_22 = partial_failure[w];
+                               Result_NoneAPIErrorZ partial_failure_conv_22_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(partial_failure_conv_22);
+                               partial_failure_conv_22_arr[w] = partial_failure_conv_22_hu_conv;
+                       }
+                       this.partial_failure = partial_failure_conv_22_arr;
                }
        }
+       /**
+        * Creates a copy of the PaymentSendFailure
+        */
+       public PaymentSendFailure clone() {
+               long ret = bindings.PaymentSendFailure_clone(this.ptr);
+               PaymentSendFailure ret_hu_conv = PaymentSendFailure.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
 }
index 88b43652eadd405279b76bbe7e7846219a060634..e8350c1a00555002970dc7f659dc2f50d25653f4 100644 (file)
@@ -27,10 +27,6 @@ public class Result_AcceptChannelDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_AcceptChannelDecodeErrorZ_OK(AcceptChannel res) {
-                       this(null, bindings.CResult_AcceptChannelDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_AcceptChannelDecodeErrorZ_Err extends Result_AcceptChannelDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_AcceptChannelDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_AcceptChannelDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_AcceptChannelDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_AcceptChannelDecodeErrorZ in the success state.
+        */
+       public static Result_AcceptChannelDecodeErrorZ constructor_ok(AcceptChannel o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_AcceptChannelDecodeErrorZ in the error state.
+        */
+       public static Result_AcceptChannelDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_AcceptChannelDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_AcceptChannelDecodeErrorZ clone() {
+               long ret = bindings.CResult_AcceptChannelDecodeErrorZ_clone(this.ptr);
+               Result_AcceptChannelDecodeErrorZ ret_hu_conv = Result_AcceptChannelDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index ade276c57b17271756e0e5623131c9b0ab7e2f23..005d78f57ae08049173625c9227c17f3227e1e90 100644 (file)
@@ -27,10 +27,6 @@ public class Result_AnnouncementSignaturesDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_AnnouncementSignaturesDecodeErrorZ_OK(AnnouncementSignatures res) {
-                       this(null, bindings.CResult_AnnouncementSignaturesDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_AnnouncementSignaturesDecodeErrorZ_Err extends Result_AnnouncementSignaturesDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_AnnouncementSignaturesDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_AnnouncementSignaturesDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_AnnouncementSignaturesDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_AnnouncementSignaturesDecodeErrorZ in the success state.
+        */
+       public static Result_AnnouncementSignaturesDecodeErrorZ constructor_ok(AnnouncementSignatures o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_AnnouncementSignaturesDecodeErrorZ in the error state.
+        */
+       public static Result_AnnouncementSignaturesDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_AnnouncementSignaturesDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_AnnouncementSignaturesDecodeErrorZ clone() {
+               long ret = bindings.CResult_AnnouncementSignaturesDecodeErrorZ_clone(this.ptr);
+               Result_AnnouncementSignaturesDecodeErrorZ ret_hu_conv = Result_AnnouncementSignaturesDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 67492b6e68f9feee92a4f858709162d32358fe8b..12f9ec7f8cfbf6aabc299c3d814f59982826d0ab 100644 (file)
@@ -27,10 +27,6 @@ public class Result_BuiltCommitmentTransactionDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_BuiltCommitmentTransactionDecodeErrorZ_OK(BuiltCommitmentTransaction res) {
-                       this(null, bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_BuiltCommitmentTransactionDecodeErrorZ_Err extends Result_BuiltCommitmentTransactionDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_BuiltCommitmentTransactionDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_BuiltCommitmentTransactionDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_BuiltCommitmentTransactionDecodeErrorZ in the success state.
+        */
+       public static Result_BuiltCommitmentTransactionDecodeErrorZ constructor_ok(BuiltCommitmentTransaction o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_BuiltCommitmentTransactionDecodeErrorZ in the error state.
+        */
+       public static Result_BuiltCommitmentTransactionDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_BuiltCommitmentTransactionDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_BuiltCommitmentTransactionDecodeErrorZ clone() {
+               long ret = bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(this.ptr);
+               Result_BuiltCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_BuiltCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 7f680d63956bbe60c0275cdb7d402f19a9ab18d2..9bf23f7c8c5ac2dbcd3ed3ed8c56817319a4d017 100644 (file)
@@ -33,18 +33,6 @@ public class Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ extends CommonB
                        res_b_hu_conv.ptrs_to.add(res_conv);
                        this.res = res_conv;
                }
-               public Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_OK(TwoTuple<byte[], ChannelManager> res) {
-                       this(null, bindings.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(bindings.C2Tuple_BlockHashChannelManagerZ_new(res.a, res.b == null ? 0 : res.b.ptr & ~1)));
-                       this.ptrs_to.add(res.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 this being visible in GC'd languages by cloning the object
-                       // at the FFI layer, creating a new object which Rust can claim ownership of
-                       // However, in some cases (eg here), there is no way to clone an object, and thus
-                       // we actually have to pass full ownership to Rust.
-                       // Thus, after this call, res.b is reset to null and is now a dummy object.
-                       res.b.ptr = 0;
-               }
        }
 
        public static final class Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_Err extends Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ {
@@ -56,9 +44,34 @@ public class Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ extends CommonB
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ in the success state.
+        */
+       public static Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ constructor_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));
+               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;
+       }
+
+       /**
+        * Creates a new CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ in the error state.
+        */
+       public static Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ constructor_err(DecodeError e) {
+               long 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);
+               return ret_hu_conv;
+       }
+
 }
index 957c031f6316d02886676dc41590856b5eee98d4..21a808261773095b1acc7f44d368ad0e78821550 100644 (file)
@@ -33,10 +33,6 @@ public class Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ extends CommonB
                        res_b_hu_conv.ptrs_to.add(res_conv);
                        this.res = res_conv;
                }
-               public Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_OK(TwoTuple<byte[], ChannelMonitor> res) {
-                       this(null, bindings.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(bindings.C2Tuple_BlockHashChannelMonitorZ_new(res.a, res.b == null ? 0 : res.b.ptr & ~1)));
-                       this.ptrs_to.add(res.b);
-               }
        }
 
        public static final class Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_Err extends Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ {
@@ -48,9 +44,26 @@ public class Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ extends CommonB
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ in the success state.
+        */
+       public static Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ constructor_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));
+               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;
+       }
+
+       /**
+        * Creates a new CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ in the error state.
+        */
+       public static Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
 }
index 36b1f3568143af5100815e2c6c1abae272bfbcb0..3a328ffd4489e61cdd1e6d2231b6e22edae1caf9 100644 (file)
@@ -30,17 +30,40 @@ public class Result_C2Tuple_SignatureCVec_SignatureZZNoneZ extends CommonBase {
                        });
                        this.res = res_conv;
                }
-               public Result_C2Tuple_SignatureCVec_SignatureZZNoneZ_OK(TwoTuple<byte[], byte[][]> res) {
-                       this(null, bindings.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(bindings.C2Tuple_SignatureCVec_SignatureZZ_new(res.a, res.b)));
-               }
        }
 
        public static final class Result_C2Tuple_SignatureCVec_SignatureZZNoneZ_Err extends Result_C2Tuple_SignatureCVec_SignatureZZNoneZ {
                private Result_C2Tuple_SignatureCVec_SignatureZZNoneZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                }
-               public Result_C2Tuple_SignatureCVec_SignatureZZNoneZ_Err() {
-                       this(null, bindings.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err());
-               }
        }
+
+       /**
+        * Creates a new CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ in the success state.
+        */
+       public static Result_C2Tuple_SignatureCVec_SignatureZZNoneZ constructor_ok(TwoTuple<byte[], byte[][]> o) {
+               long ret = bindings.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(bindings.C2Tuple_SignatureCVec_SignatureZZ_new(o.a, o.b));
+               Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_hu_conv = Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ in the error state.
+        */
+       public static Result_C2Tuple_SignatureCVec_SignatureZZNoneZ constructor_err() {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_C2Tuple_SignatureCVec_SignatureZZNoneZ clone() {
+               long 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 8d9cee24f8014667805c608a3028fc7555fbd888..45e9b3e5675e5275449c99bcdf7cc962c7ca8976 100644 (file)
@@ -26,9 +26,6 @@ public class Result_CResult_NetAddressu8ZDecodeErrorZ extends CommonBase {
                        Result_NetAddressu8Z res_hu_conv = Result_NetAddressu8Z.constr_from_ptr(res);
                        this.res = res_hu_conv;
                }
-               public Result_CResult_NetAddressu8ZDecodeErrorZ_OK(Result_NetAddressu8Z res) {
-                       this(null, bindings.CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(res != null ? res.ptr : 0));
-               }
        }
 
        public static final class Result_CResult_NetAddressu8ZDecodeErrorZ_Err extends Result_CResult_NetAddressu8ZDecodeErrorZ {
@@ -40,9 +37,35 @@ public class Result_CResult_NetAddressu8ZDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_CResult_NetAddressu8ZDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_CResult_NetAddressu8ZDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_CResult_NetAddressu8ZDecodeErrorZ in the success state.
+        */
+       public static Result_CResult_NetAddressu8ZDecodeErrorZ constructor_ok(Result_NetAddressu8Z o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_CResult_NetAddressu8ZDecodeErrorZ in the error state.
+        */
+       public static Result_CResult_NetAddressu8ZDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_CResult_NetAddressu8ZDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_CResult_NetAddressu8ZDecodeErrorZ clone() {
+               long 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 768260be080d222225f931c7a1b775e0445abb94..c76b6396e6b883dbc627ec8488aad5731b363a19 100644 (file)
@@ -24,17 +24,40 @@ public class Result_CVec_CVec_u8ZZNoneZ extends CommonBase {
                        super(_dummy, ptr);
                        this.res = bindings.LDKCResult_CVec_CVec_u8ZZNoneZ_get_ok(ptr);
                }
-               public Result_CVec_CVec_u8ZZNoneZ_OK(byte[][] res) {
-                       this(null, bindings.CResult_CVec_CVec_u8ZZNoneZ_ok(res));
-               }
        }
 
        public static final class Result_CVec_CVec_u8ZZNoneZ_Err extends Result_CVec_CVec_u8ZZNoneZ {
                private Result_CVec_CVec_u8ZZNoneZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                }
-               public Result_CVec_CVec_u8ZZNoneZ_Err() {
-                       this(null, bindings.CResult_CVec_CVec_u8ZZNoneZ_err());
-               }
        }
+
+       /**
+        * Creates a new CResult_CVec_CVec_u8ZZNoneZ in the success state.
+        */
+       public static Result_CVec_CVec_u8ZZNoneZ constructor_ok(byte[][] o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_CVec_CVec_u8ZZNoneZ in the error state.
+        */
+       public static Result_CVec_CVec_u8ZZNoneZ constructor_err() {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_CVec_CVec_u8ZZNoneZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_CVec_CVec_u8ZZNoneZ clone() {
+               long 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 b0b5b5b2446ba376eef806ba9a77b0d2b8a4e7dd..abd6c1890fb1739e2365ae9e7aaa48a591b424a8 100644 (file)
@@ -24,17 +24,40 @@ public class Result_CVec_SignatureZNoneZ extends CommonBase {
                        super(_dummy, ptr);
                        this.res = bindings.LDKCResult_CVec_SignatureZNoneZ_get_ok(ptr);
                }
-               public Result_CVec_SignatureZNoneZ_OK(byte[][] res) {
-                       this(null, bindings.CResult_CVec_SignatureZNoneZ_ok(res));
-               }
        }
 
        public static final class Result_CVec_SignatureZNoneZ_Err extends Result_CVec_SignatureZNoneZ {
                private Result_CVec_SignatureZNoneZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                }
-               public Result_CVec_SignatureZNoneZ_Err() {
-                       this(null, bindings.CResult_CVec_SignatureZNoneZ_err());
-               }
        }
+
+       /**
+        * Creates a new CResult_CVec_SignatureZNoneZ in the success state.
+        */
+       public static Result_CVec_SignatureZNoneZ constructor_ok(byte[][] o) {
+               long ret = bindings.CResult_CVec_SignatureZNoneZ_ok(o);
+               Result_CVec_SignatureZNoneZ ret_hu_conv = Result_CVec_SignatureZNoneZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_CVec_SignatureZNoneZ in the error state.
+        */
+       public static Result_CVec_SignatureZNoneZ constructor_err() {
+               long ret = bindings.CResult_CVec_SignatureZNoneZ_err();
+               Result_CVec_SignatureZNoneZ ret_hu_conv = Result_CVec_SignatureZNoneZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_CVec_SignatureZNoneZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_CVec_SignatureZNoneZ clone() {
+               long 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 f63dc35748a6bd183ac7ff9628b90e0b2eaddd70..e99cccb6badb144b5097c7b11a235e35af15d758 100644 (file)
@@ -24,9 +24,6 @@ public class Result_CVec_u8ZPeerHandleErrorZ extends CommonBase {
                        super(_dummy, ptr);
                        this.res = bindings.LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok(ptr);
                }
-               public Result_CVec_u8ZPeerHandleErrorZ_OK(byte[] res) {
-                       this(null, bindings.CResult_CVec_u8ZPeerHandleErrorZ_ok(res));
-               }
        }
 
        public static final class Result_CVec_u8ZPeerHandleErrorZ_Err extends Result_CVec_u8ZPeerHandleErrorZ {
@@ -38,9 +35,35 @@ public class Result_CVec_u8ZPeerHandleErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_CVec_u8ZPeerHandleErrorZ_Err(PeerHandleError err) {
-                       this(null, bindings.CResult_CVec_u8ZPeerHandleErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_CVec_u8ZPeerHandleErrorZ in the success state.
+        */
+       public static Result_CVec_u8ZPeerHandleErrorZ constructor_ok(byte[] o) {
+               long ret = bindings.CResult_CVec_u8ZPeerHandleErrorZ_ok(o);
+               Result_CVec_u8ZPeerHandleErrorZ ret_hu_conv = Result_CVec_u8ZPeerHandleErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_CVec_u8ZPeerHandleErrorZ in the error state.
+        */
+       public static Result_CVec_u8ZPeerHandleErrorZ constructor_err(PeerHandleError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_CVec_u8ZPeerHandleErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_CVec_u8ZPeerHandleErrorZ clone() {
+               long 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 696d2ab9a4eeccf75b92d7c3b8d6b0a47262bfbb..2ad972832bb753712808036b50ff3e957d9c2418 100644 (file)
@@ -27,10 +27,6 @@ public class Result_ChannelAnnouncementDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_ChannelAnnouncementDecodeErrorZ_OK(ChannelAnnouncement res) {
-                       this(null, bindings.CResult_ChannelAnnouncementDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_ChannelAnnouncementDecodeErrorZ_Err extends Result_ChannelAnnouncementDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_ChannelAnnouncementDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_ChannelAnnouncementDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_ChannelAnnouncementDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_ChannelAnnouncementDecodeErrorZ in the success state.
+        */
+       public static Result_ChannelAnnouncementDecodeErrorZ constructor_ok(ChannelAnnouncement o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_ChannelAnnouncementDecodeErrorZ in the error state.
+        */
+       public static Result_ChannelAnnouncementDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_ChannelAnnouncementDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_ChannelAnnouncementDecodeErrorZ clone() {
+               long ret = bindings.CResult_ChannelAnnouncementDecodeErrorZ_clone(this.ptr);
+               Result_ChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_ChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index d60374a9adfc17e92cbc497408d50a6fd688518f..344753d6bfddfac8c4ab36e0d197849487f24d76 100644 (file)
@@ -27,10 +27,6 @@ public class Result_ChannelConfigDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_ChannelConfigDecodeErrorZ_OK(ChannelConfig res) {
-                       this(null, bindings.CResult_ChannelConfigDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_ChannelConfigDecodeErrorZ_Err extends Result_ChannelConfigDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_ChannelConfigDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_ChannelConfigDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_ChannelConfigDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_ChannelConfigDecodeErrorZ in the success state.
+        */
+       public static Result_ChannelConfigDecodeErrorZ constructor_ok(ChannelConfig o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_ChannelConfigDecodeErrorZ in the error state.
+        */
+       public static Result_ChannelConfigDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_ChannelConfigDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_ChannelConfigDecodeErrorZ clone() {
+               long ret = bindings.CResult_ChannelConfigDecodeErrorZ_clone(this.ptr);
+               Result_ChannelConfigDecodeErrorZ ret_hu_conv = Result_ChannelConfigDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 27c90ecb8cd1aebb5bc704f187cc6e8e2c36ccf6..5b28e95305b62bd0fd3c896fa4019a4da569e2e7 100644 (file)
@@ -27,10 +27,6 @@ public class Result_ChannelFeaturesDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_ChannelFeaturesDecodeErrorZ_OK(ChannelFeatures res) {
-                       this(null, bindings.CResult_ChannelFeaturesDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_ChannelFeaturesDecodeErrorZ_Err extends Result_ChannelFeaturesDecodeErrorZ {
@@ -42,9 +38,26 @@ public class Result_ChannelFeaturesDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_ChannelFeaturesDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_ChannelFeaturesDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_ChannelFeaturesDecodeErrorZ in the success state.
+        */
+       public static Result_ChannelFeaturesDecodeErrorZ constructor_ok(ChannelFeatures o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_ChannelFeaturesDecodeErrorZ in the error state.
+        */
+       public static Result_ChannelFeaturesDecodeErrorZ constructor_err(DecodeError e) {
+               long 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);
+               return ret_hu_conv;
+       }
+
 }
index ad262d1139e9e28a72b3a5716a130d83262c079e..185fed3ddecc0888d2c1a82b7084ff2cf05dbcf7 100644 (file)
@@ -27,10 +27,6 @@ public class Result_ChannelInfoDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_ChannelInfoDecodeErrorZ_OK(ChannelInfo res) {
-                       this(null, bindings.CResult_ChannelInfoDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_ChannelInfoDecodeErrorZ_Err extends Result_ChannelInfoDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_ChannelInfoDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_ChannelInfoDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_ChannelInfoDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_ChannelInfoDecodeErrorZ in the success state.
+        */
+       public static Result_ChannelInfoDecodeErrorZ constructor_ok(ChannelInfo o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_ChannelInfoDecodeErrorZ in the error state.
+        */
+       public static Result_ChannelInfoDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_ChannelInfoDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_ChannelInfoDecodeErrorZ clone() {
+               long ret = bindings.CResult_ChannelInfoDecodeErrorZ_clone(this.ptr);
+               Result_ChannelInfoDecodeErrorZ ret_hu_conv = Result_ChannelInfoDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 3b7b6799b14bffb5d60cebbc28c909c106b3326d..ae5990ef2154986efedbc10b80e8f4fbf325200c 100644 (file)
@@ -27,10 +27,6 @@ public class Result_ChannelMonitorUpdateDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_ChannelMonitorUpdateDecodeErrorZ_OK(ChannelMonitorUpdate res) {
-                       this(null, bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_ChannelMonitorUpdateDecodeErrorZ_Err extends Result_ChannelMonitorUpdateDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_ChannelMonitorUpdateDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_ChannelMonitorUpdateDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_ChannelMonitorUpdateDecodeErrorZ in the success state.
+        */
+       public static Result_ChannelMonitorUpdateDecodeErrorZ constructor_ok(ChannelMonitorUpdate o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_ChannelMonitorUpdateDecodeErrorZ in the error state.
+        */
+       public static Result_ChannelMonitorUpdateDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_ChannelMonitorUpdateDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_ChannelMonitorUpdateDecodeErrorZ clone() {
+               long ret = bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_clone(this.ptr);
+               Result_ChannelMonitorUpdateDecodeErrorZ ret_hu_conv = Result_ChannelMonitorUpdateDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 09020f0d7dbd9baedff49ea8f85fd98dae6d17f7..a237bc893be3a8c0f43e29aa63ec8775b733257a 100644 (file)
@@ -27,10 +27,6 @@ public class Result_ChannelPublicKeysDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_ChannelPublicKeysDecodeErrorZ_OK(ChannelPublicKeys res) {
-                       this(null, bindings.CResult_ChannelPublicKeysDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_ChannelPublicKeysDecodeErrorZ_Err extends Result_ChannelPublicKeysDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_ChannelPublicKeysDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_ChannelPublicKeysDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_ChannelPublicKeysDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_ChannelPublicKeysDecodeErrorZ in the success state.
+        */
+       public static Result_ChannelPublicKeysDecodeErrorZ constructor_ok(ChannelPublicKeys o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_ChannelPublicKeysDecodeErrorZ in the error state.
+        */
+       public static Result_ChannelPublicKeysDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_ChannelPublicKeysDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_ChannelPublicKeysDecodeErrorZ clone() {
+               long ret = bindings.CResult_ChannelPublicKeysDecodeErrorZ_clone(this.ptr);
+               Result_ChannelPublicKeysDecodeErrorZ ret_hu_conv = Result_ChannelPublicKeysDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 3b3101da4ad0a72bf5b522cb07b31ce2d19735d4..2cd999936ab8761e8d6a74c679634ad1ed6eb77b 100644 (file)
@@ -27,10 +27,6 @@ public class Result_ChannelReestablishDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_ChannelReestablishDecodeErrorZ_OK(ChannelReestablish res) {
-                       this(null, bindings.CResult_ChannelReestablishDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_ChannelReestablishDecodeErrorZ_Err extends Result_ChannelReestablishDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_ChannelReestablishDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_ChannelReestablishDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_ChannelReestablishDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_ChannelReestablishDecodeErrorZ in the success state.
+        */
+       public static Result_ChannelReestablishDecodeErrorZ constructor_ok(ChannelReestablish o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_ChannelReestablishDecodeErrorZ in the error state.
+        */
+       public static Result_ChannelReestablishDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_ChannelReestablishDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_ChannelReestablishDecodeErrorZ clone() {
+               long ret = bindings.CResult_ChannelReestablishDecodeErrorZ_clone(this.ptr);
+               Result_ChannelReestablishDecodeErrorZ ret_hu_conv = Result_ChannelReestablishDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index c37b5862e4d3d4bb65797a66ce6717b4c9905e74..d61fb39ffc19f7f5155da5f518e9990e458d2a40 100644 (file)
@@ -27,10 +27,6 @@ public class Result_ChannelTransactionParametersDecodeErrorZ extends CommonBase
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_ChannelTransactionParametersDecodeErrorZ_OK(ChannelTransactionParameters res) {
-                       this(null, bindings.CResult_ChannelTransactionParametersDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_ChannelTransactionParametersDecodeErrorZ_Err extends Result_ChannelTransactionParametersDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_ChannelTransactionParametersDecodeErrorZ extends CommonBase
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_ChannelTransactionParametersDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_ChannelTransactionParametersDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_ChannelTransactionParametersDecodeErrorZ in the success state.
+        */
+       public static Result_ChannelTransactionParametersDecodeErrorZ constructor_ok(ChannelTransactionParameters o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_ChannelTransactionParametersDecodeErrorZ in the error state.
+        */
+       public static Result_ChannelTransactionParametersDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_ChannelTransactionParametersDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_ChannelTransactionParametersDecodeErrorZ clone() {
+               long ret = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_clone(this.ptr);
+               Result_ChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_ChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 1a79368737257591773b7c3a6319e9e57ab23433..c9a36447ed2dca0bc2d1fc5f45462347809c6071 100644 (file)
@@ -27,10 +27,6 @@ public class Result_ChannelUpdateDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_ChannelUpdateDecodeErrorZ_OK(ChannelUpdate res) {
-                       this(null, bindings.CResult_ChannelUpdateDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_ChannelUpdateDecodeErrorZ_Err extends Result_ChannelUpdateDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_ChannelUpdateDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_ChannelUpdateDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_ChannelUpdateDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_ChannelUpdateDecodeErrorZ in the success state.
+        */
+       public static Result_ChannelUpdateDecodeErrorZ constructor_ok(ChannelUpdate o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_ChannelUpdateDecodeErrorZ in the error state.
+        */
+       public static Result_ChannelUpdateDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_ChannelUpdateDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_ChannelUpdateDecodeErrorZ clone() {
+               long ret = bindings.CResult_ChannelUpdateDecodeErrorZ_clone(this.ptr);
+               Result_ChannelUpdateDecodeErrorZ ret_hu_conv = Result_ChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 1487c9f13a16120f19533a46db701dc4ce8f4cae..83d1b2916baa476370ae597bd3a8fac033373f7c 100644 (file)
@@ -27,10 +27,6 @@ public class Result_ClosingSignedDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_ClosingSignedDecodeErrorZ_OK(ClosingSigned res) {
-                       this(null, bindings.CResult_ClosingSignedDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_ClosingSignedDecodeErrorZ_Err extends Result_ClosingSignedDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_ClosingSignedDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_ClosingSignedDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_ClosingSignedDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_ClosingSignedDecodeErrorZ in the success state.
+        */
+       public static Result_ClosingSignedDecodeErrorZ constructor_ok(ClosingSigned o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_ClosingSignedDecodeErrorZ in the error state.
+        */
+       public static Result_ClosingSignedDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_ClosingSignedDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_ClosingSignedDecodeErrorZ clone() {
+               long ret = bindings.CResult_ClosingSignedDecodeErrorZ_clone(this.ptr);
+               Result_ClosingSignedDecodeErrorZ ret_hu_conv = Result_ClosingSignedDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 1bb9e9ddd05e4d85f8bae0701e08665c328c0de0..e1c773c144dbbdfbb47189da12eb1fd28eb66ae2 100644 (file)
@@ -27,10 +27,6 @@ public class Result_CommitmentSignedDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_CommitmentSignedDecodeErrorZ_OK(CommitmentSigned res) {
-                       this(null, bindings.CResult_CommitmentSignedDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_CommitmentSignedDecodeErrorZ_Err extends Result_CommitmentSignedDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_CommitmentSignedDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_CommitmentSignedDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_CommitmentSignedDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_CommitmentSignedDecodeErrorZ in the success state.
+        */
+       public static Result_CommitmentSignedDecodeErrorZ constructor_ok(CommitmentSigned o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_CommitmentSignedDecodeErrorZ in the error state.
+        */
+       public static Result_CommitmentSignedDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_CommitmentSignedDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_CommitmentSignedDecodeErrorZ clone() {
+               long ret = bindings.CResult_CommitmentSignedDecodeErrorZ_clone(this.ptr);
+               Result_CommitmentSignedDecodeErrorZ ret_hu_conv = Result_CommitmentSignedDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 7243885fe6baaffb5bc5cf1ccea4c7ed03f81e5b..16bf650d359dc602d85c77ddb29cda3694e51203 100644 (file)
@@ -27,10 +27,6 @@ public class Result_CommitmentTransactionDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_CommitmentTransactionDecodeErrorZ_OK(CommitmentTransaction res) {
-                       this(null, bindings.CResult_CommitmentTransactionDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_CommitmentTransactionDecodeErrorZ_Err extends Result_CommitmentTransactionDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_CommitmentTransactionDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_CommitmentTransactionDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_CommitmentTransactionDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_CommitmentTransactionDecodeErrorZ in the success state.
+        */
+       public static Result_CommitmentTransactionDecodeErrorZ constructor_ok(CommitmentTransaction o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_CommitmentTransactionDecodeErrorZ in the error state.
+        */
+       public static Result_CommitmentTransactionDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_CommitmentTransactionDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_CommitmentTransactionDecodeErrorZ clone() {
+               long ret = bindings.CResult_CommitmentTransactionDecodeErrorZ_clone(this.ptr);
+               Result_CommitmentTransactionDecodeErrorZ ret_hu_conv = Result_CommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 02c8d680681436b0a255f472e204327cb839dc3f..54ec438ac36fbe1727ddbf83e05c772a7587f99f 100644 (file)
@@ -27,10 +27,6 @@ public class Result_CounterpartyChannelTransactionParametersDecodeErrorZ extends
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_CounterpartyChannelTransactionParametersDecodeErrorZ_OK(CounterpartyChannelTransactionParameters res) {
-                       this(null, bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_CounterpartyChannelTransactionParametersDecodeErrorZ_Err extends Result_CounterpartyChannelTransactionParametersDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_CounterpartyChannelTransactionParametersDecodeErrorZ extends
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_CounterpartyChannelTransactionParametersDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_CounterpartyChannelTransactionParametersDecodeErrorZ in the success state.
+        */
+       public static Result_CounterpartyChannelTransactionParametersDecodeErrorZ constructor_ok(CounterpartyChannelTransactionParameters o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_CounterpartyChannelTransactionParametersDecodeErrorZ in the error state.
+        */
+       public static Result_CounterpartyChannelTransactionParametersDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_CounterpartyChannelTransactionParametersDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_CounterpartyChannelTransactionParametersDecodeErrorZ clone() {
+               long ret = bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(this.ptr);
+               Result_CounterpartyChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_CounterpartyChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 72ec37c70445a63273289abe5dc0e3019ddfc014..46ef11fa69e8d2b357c00ddf645db3209fb3ccaf 100644 (file)
@@ -27,10 +27,6 @@ public class Result_DirectionalChannelInfoDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_DirectionalChannelInfoDecodeErrorZ_OK(DirectionalChannelInfo res) {
-                       this(null, bindings.CResult_DirectionalChannelInfoDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_DirectionalChannelInfoDecodeErrorZ_Err extends Result_DirectionalChannelInfoDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_DirectionalChannelInfoDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_DirectionalChannelInfoDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_DirectionalChannelInfoDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_DirectionalChannelInfoDecodeErrorZ in the success state.
+        */
+       public static Result_DirectionalChannelInfoDecodeErrorZ constructor_ok(DirectionalChannelInfo o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_DirectionalChannelInfoDecodeErrorZ in the error state.
+        */
+       public static Result_DirectionalChannelInfoDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_DirectionalChannelInfoDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_DirectionalChannelInfoDecodeErrorZ clone() {
+               long ret = bindings.CResult_DirectionalChannelInfoDecodeErrorZ_clone(this.ptr);
+               Result_DirectionalChannelInfoDecodeErrorZ ret_hu_conv = Result_DirectionalChannelInfoDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 71efe0fcfc24fbbf29d03f464844c94eff229d55..a9241b73337a8aac31ed53b5c79f3768274afd78 100644 (file)
@@ -27,10 +27,6 @@ public class Result_ErrorMessageDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_ErrorMessageDecodeErrorZ_OK(ErrorMessage res) {
-                       this(null, bindings.CResult_ErrorMessageDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_ErrorMessageDecodeErrorZ_Err extends Result_ErrorMessageDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_ErrorMessageDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_ErrorMessageDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_ErrorMessageDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_ErrorMessageDecodeErrorZ in the success state.
+        */
+       public static Result_ErrorMessageDecodeErrorZ constructor_ok(ErrorMessage o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_ErrorMessageDecodeErrorZ in the error state.
+        */
+       public static Result_ErrorMessageDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_ErrorMessageDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_ErrorMessageDecodeErrorZ clone() {
+               long ret = bindings.CResult_ErrorMessageDecodeErrorZ_clone(this.ptr);
+               Result_ErrorMessageDecodeErrorZ ret_hu_conv = Result_ErrorMessageDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 9c39d4cc71b948e5448ecf1b88b12fe5301a190a..6704ba06f58716dd53e0f649e088730140897926 100644 (file)
@@ -27,10 +27,6 @@ public class Result_FundingCreatedDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_FundingCreatedDecodeErrorZ_OK(FundingCreated res) {
-                       this(null, bindings.CResult_FundingCreatedDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_FundingCreatedDecodeErrorZ_Err extends Result_FundingCreatedDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_FundingCreatedDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_FundingCreatedDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_FundingCreatedDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_FundingCreatedDecodeErrorZ in the success state.
+        */
+       public static Result_FundingCreatedDecodeErrorZ constructor_ok(FundingCreated o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_FundingCreatedDecodeErrorZ in the error state.
+        */
+       public static Result_FundingCreatedDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_FundingCreatedDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_FundingCreatedDecodeErrorZ clone() {
+               long ret = bindings.CResult_FundingCreatedDecodeErrorZ_clone(this.ptr);
+               Result_FundingCreatedDecodeErrorZ ret_hu_conv = Result_FundingCreatedDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 7db0a5404e23484c6aeb164444c528cc606a2eb4..43a4eedeb3745177816a27de50f05f7e848bed29 100644 (file)
@@ -27,10 +27,6 @@ public class Result_FundingLockedDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_FundingLockedDecodeErrorZ_OK(FundingLocked res) {
-                       this(null, bindings.CResult_FundingLockedDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_FundingLockedDecodeErrorZ_Err extends Result_FundingLockedDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_FundingLockedDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_FundingLockedDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_FundingLockedDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_FundingLockedDecodeErrorZ in the success state.
+        */
+       public static Result_FundingLockedDecodeErrorZ constructor_ok(FundingLocked o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_FundingLockedDecodeErrorZ in the error state.
+        */
+       public static Result_FundingLockedDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_FundingLockedDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_FundingLockedDecodeErrorZ clone() {
+               long ret = bindings.CResult_FundingLockedDecodeErrorZ_clone(this.ptr);
+               Result_FundingLockedDecodeErrorZ ret_hu_conv = Result_FundingLockedDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index ec53a85cce4b7a5a4ca0c36cb00652f1f851f10e..78e2e99d1fc91c524689859574c4d45b93e0aeae 100644 (file)
@@ -27,10 +27,6 @@ public class Result_FundingSignedDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_FundingSignedDecodeErrorZ_OK(FundingSigned res) {
-                       this(null, bindings.CResult_FundingSignedDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_FundingSignedDecodeErrorZ_Err extends Result_FundingSignedDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_FundingSignedDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_FundingSignedDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_FundingSignedDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_FundingSignedDecodeErrorZ in the success state.
+        */
+       public static Result_FundingSignedDecodeErrorZ constructor_ok(FundingSigned o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_FundingSignedDecodeErrorZ in the error state.
+        */
+       public static Result_FundingSignedDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_FundingSignedDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_FundingSignedDecodeErrorZ clone() {
+               long ret = bindings.CResult_FundingSignedDecodeErrorZ_clone(this.ptr);
+               Result_FundingSignedDecodeErrorZ ret_hu_conv = Result_FundingSignedDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 0e59d0610503913fb593e644d511b1d764861106..e67c816346a141b94c5aa4a5a50c8219b72c29f3 100644 (file)
@@ -27,10 +27,6 @@ public class Result_GossipTimestampFilterDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_GossipTimestampFilterDecodeErrorZ_OK(GossipTimestampFilter res) {
-                       this(null, bindings.CResult_GossipTimestampFilterDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_GossipTimestampFilterDecodeErrorZ_Err extends Result_GossipTimestampFilterDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_GossipTimestampFilterDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_GossipTimestampFilterDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_GossipTimestampFilterDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_GossipTimestampFilterDecodeErrorZ in the success state.
+        */
+       public static Result_GossipTimestampFilterDecodeErrorZ constructor_ok(GossipTimestampFilter o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_GossipTimestampFilterDecodeErrorZ in the error state.
+        */
+       public static Result_GossipTimestampFilterDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_GossipTimestampFilterDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_GossipTimestampFilterDecodeErrorZ clone() {
+               long ret = bindings.CResult_GossipTimestampFilterDecodeErrorZ_clone(this.ptr);
+               Result_GossipTimestampFilterDecodeErrorZ ret_hu_conv = Result_GossipTimestampFilterDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 4e64e1f72e7ab0d275eaab2d96b066003e3730e6..f4920d20d5767387043f078c804d24cecaadb254 100644 (file)
@@ -27,10 +27,6 @@ public class Result_HTLCOutputInCommitmentDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_HTLCOutputInCommitmentDecodeErrorZ_OK(HTLCOutputInCommitment res) {
-                       this(null, bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_HTLCOutputInCommitmentDecodeErrorZ_Err extends Result_HTLCOutputInCommitmentDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_HTLCOutputInCommitmentDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_HTLCOutputInCommitmentDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_HTLCOutputInCommitmentDecodeErrorZ in the success state.
+        */
+       public static Result_HTLCOutputInCommitmentDecodeErrorZ constructor_ok(HTLCOutputInCommitment o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_HTLCOutputInCommitmentDecodeErrorZ in the error state.
+        */
+       public static Result_HTLCOutputInCommitmentDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_HTLCOutputInCommitmentDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_HTLCOutputInCommitmentDecodeErrorZ clone() {
+               long ret = bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(this.ptr);
+               Result_HTLCOutputInCommitmentDecodeErrorZ ret_hu_conv = Result_HTLCOutputInCommitmentDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 05b4f2a3b0a60880a9f74341803286cc5712feab..1a5cc8cfd4f72a8209ec6a49a6d213cc4d4b311a 100644 (file)
@@ -27,10 +27,6 @@ public class Result_HTLCUpdateDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_HTLCUpdateDecodeErrorZ_OK(HTLCUpdate res) {
-                       this(null, bindings.CResult_HTLCUpdateDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_HTLCUpdateDecodeErrorZ_Err extends Result_HTLCUpdateDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_HTLCUpdateDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_HTLCUpdateDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_HTLCUpdateDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_HTLCUpdateDecodeErrorZ in the success state.
+        */
+       public static Result_HTLCUpdateDecodeErrorZ constructor_ok(HTLCUpdate o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_HTLCUpdateDecodeErrorZ in the error state.
+        */
+       public static Result_HTLCUpdateDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_HTLCUpdateDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_HTLCUpdateDecodeErrorZ clone() {
+               long ret = bindings.CResult_HTLCUpdateDecodeErrorZ_clone(this.ptr);
+               Result_HTLCUpdateDecodeErrorZ ret_hu_conv = Result_HTLCUpdateDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 7794fb958a3eeff869a0883176c90628338cb816..b84829e37e208e61b617572564531efa754aea0b 100644 (file)
@@ -27,10 +27,6 @@ public class Result_HolderCommitmentTransactionDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_HolderCommitmentTransactionDecodeErrorZ_OK(HolderCommitmentTransaction res) {
-                       this(null, bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_HolderCommitmentTransactionDecodeErrorZ_Err extends Result_HolderCommitmentTransactionDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_HolderCommitmentTransactionDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_HolderCommitmentTransactionDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_HolderCommitmentTransactionDecodeErrorZ in the success state.
+        */
+       public static Result_HolderCommitmentTransactionDecodeErrorZ constructor_ok(HolderCommitmentTransaction o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_HolderCommitmentTransactionDecodeErrorZ in the error state.
+        */
+       public static Result_HolderCommitmentTransactionDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_HolderCommitmentTransactionDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_HolderCommitmentTransactionDecodeErrorZ clone() {
+               long ret = bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_clone(this.ptr);
+               Result_HolderCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_HolderCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 9824646496074442ac76993ba4b3c53a38f720bf..4c984b0a3ced5dde0f134dabe5eba3ef5a28d6a3 100644 (file)
@@ -27,10 +27,6 @@ public class Result_InMemorySignerDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_InMemorySignerDecodeErrorZ_OK(InMemorySigner res) {
-                       this(null, bindings.CResult_InMemorySignerDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_InMemorySignerDecodeErrorZ_Err extends Result_InMemorySignerDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_InMemorySignerDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_InMemorySignerDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_InMemorySignerDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_InMemorySignerDecodeErrorZ in the success state.
+        */
+       public static Result_InMemorySignerDecodeErrorZ constructor_ok(InMemorySigner o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_InMemorySignerDecodeErrorZ in the error state.
+        */
+       public static Result_InMemorySignerDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_InMemorySignerDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_InMemorySignerDecodeErrorZ clone() {
+               long ret = bindings.CResult_InMemorySignerDecodeErrorZ_clone(this.ptr);
+               Result_InMemorySignerDecodeErrorZ ret_hu_conv = Result_InMemorySignerDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 77275658e017560a3d2ee5dc7966c6a97262be1e..dce2cceddf8f9bfb69e0fe6393c83790368244ac 100644 (file)
@@ -27,10 +27,6 @@ public class Result_InitDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_InitDecodeErrorZ_OK(Init res) {
-                       this(null, bindings.CResult_InitDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_InitDecodeErrorZ_Err extends Result_InitDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_InitDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_InitDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_InitDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_InitDecodeErrorZ in the success state.
+        */
+       public static Result_InitDecodeErrorZ constructor_ok(Init o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_InitDecodeErrorZ in the error state.
+        */
+       public static Result_InitDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_InitDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_InitDecodeErrorZ clone() {
+               long ret = bindings.CResult_InitDecodeErrorZ_clone(this.ptr);
+               Result_InitDecodeErrorZ ret_hu_conv = Result_InitDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index cee609a349a1e2c709fd6eb60aed34ffc52e2a9d..b5b353e40167b9c26e45a797cb2211c608e2c94f 100644 (file)
@@ -27,10 +27,6 @@ public class Result_InitFeaturesDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_InitFeaturesDecodeErrorZ_OK(InitFeatures res) {
-                       this(null, bindings.CResult_InitFeaturesDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_InitFeaturesDecodeErrorZ_Err extends Result_InitFeaturesDecodeErrorZ {
@@ -42,9 +38,26 @@ public class Result_InitFeaturesDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_InitFeaturesDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_InitFeaturesDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_InitFeaturesDecodeErrorZ in the success state.
+        */
+       public static Result_InitFeaturesDecodeErrorZ constructor_ok(InitFeatures o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_InitFeaturesDecodeErrorZ in the error state.
+        */
+       public static Result_InitFeaturesDecodeErrorZ constructor_err(DecodeError e) {
+               long 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);
+               return ret_hu_conv;
+       }
+
 }
index 0ea078790082c75b7ac276bc23c7367a9096ad73..76e7994bc197beb4faf0f1362839573356ede6b8 100644 (file)
@@ -27,10 +27,6 @@ public class Result_InvoiceFeaturesDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_InvoiceFeaturesDecodeErrorZ_OK(InvoiceFeatures res) {
-                       this(null, bindings.CResult_InvoiceFeaturesDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_InvoiceFeaturesDecodeErrorZ_Err extends Result_InvoiceFeaturesDecodeErrorZ {
@@ -42,9 +38,26 @@ public class Result_InvoiceFeaturesDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_InvoiceFeaturesDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_InvoiceFeaturesDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_InvoiceFeaturesDecodeErrorZ in the success state.
+        */
+       public static Result_InvoiceFeaturesDecodeErrorZ constructor_ok(InvoiceFeatures o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_InvoiceFeaturesDecodeErrorZ in the error state.
+        */
+       public static Result_InvoiceFeaturesDecodeErrorZ constructor_err(DecodeError e) {
+               long 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);
+               return ret_hu_conv;
+       }
+
 }
index 1149eb984fe3a36a84255a1b268eb6c6c9b77dfc..64fe7612fffb30c8972d04a8eefc9b7d551bb067 100644 (file)
@@ -27,9 +27,6 @@ public class Result_NetAddressu8Z extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_NetAddressu8Z_OK(NetAddress res) {
-                       this(null, bindings.CResult_NetAddressu8Z_ok(res.ptr));
-               }
        }
 
        public static final class Result_NetAddressu8Z_Err extends Result_NetAddressu8Z {
@@ -38,8 +35,34 @@ public class Result_NetAddressu8Z extends CommonBase {
                        super(_dummy, ptr);
                        this.err = bindings.LDKCResult_NetAddressu8Z_get_err(ptr);
                }
-               public Result_NetAddressu8Z_Err(byte err) {
-                       this(null, bindings.CResult_NetAddressu8Z_err(err));
-               }
        }
+
+       /**
+        * Creates a new CResult_NetAddressu8Z in the success state.
+        */
+       public static Result_NetAddressu8Z constructor_ok(NetAddress o) {
+               long ret = bindings.CResult_NetAddressu8Z_ok(o.ptr);
+               Result_NetAddressu8Z ret_hu_conv = Result_NetAddressu8Z.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_NetAddressu8Z in the error state.
+        */
+       public static Result_NetAddressu8Z constructor_err(byte e) {
+               long ret = bindings.CResult_NetAddressu8Z_err(e);
+               Result_NetAddressu8Z ret_hu_conv = Result_NetAddressu8Z.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_NetAddressu8Z which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_NetAddressu8Z clone() {
+               long ret = bindings.CResult_NetAddressu8Z_clone(this.ptr);
+               Result_NetAddressu8Z ret_hu_conv = Result_NetAddressu8Z.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index da4e3b6ddedc4db06e4d04815d000670af9167a6..a2dd03c4372429a1d5361cd5207e069dcc913641 100644 (file)
@@ -27,10 +27,6 @@ public class Result_NetworkGraphDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_NetworkGraphDecodeErrorZ_OK(NetworkGraph res) {
-                       this(null, bindings.CResult_NetworkGraphDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_NetworkGraphDecodeErrorZ_Err extends Result_NetworkGraphDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_NetworkGraphDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_NetworkGraphDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_NetworkGraphDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_NetworkGraphDecodeErrorZ in the success state.
+        */
+       public static Result_NetworkGraphDecodeErrorZ constructor_ok(NetworkGraph o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_NetworkGraphDecodeErrorZ in the error state.
+        */
+       public static Result_NetworkGraphDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * 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);
+               Result_NetworkGraphDecodeErrorZ ret_hu_conv = Result_NetworkGraphDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 9fb06a72072f84939140e929ce66a4cfbb2fc200..9293a3114adf6b126f7d899d3bf9cb2b73cf7a91 100644 (file)
@@ -27,10 +27,6 @@ public class Result_NodeAnnouncementDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_NodeAnnouncementDecodeErrorZ_OK(NodeAnnouncement res) {
-                       this(null, bindings.CResult_NodeAnnouncementDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_NodeAnnouncementDecodeErrorZ_Err extends Result_NodeAnnouncementDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_NodeAnnouncementDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_NodeAnnouncementDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_NodeAnnouncementDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_NodeAnnouncementDecodeErrorZ in the success state.
+        */
+       public static Result_NodeAnnouncementDecodeErrorZ constructor_ok(NodeAnnouncement o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_NodeAnnouncementDecodeErrorZ in the error state.
+        */
+       public static Result_NodeAnnouncementDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_NodeAnnouncementDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_NodeAnnouncementDecodeErrorZ clone() {
+               long ret = bindings.CResult_NodeAnnouncementDecodeErrorZ_clone(this.ptr);
+               Result_NodeAnnouncementDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 611d7056af84df940cc9684b5982f4459bd6693e..967d6bde89cd5bc5597c6c1308d3f0a89b1e0532 100644 (file)
@@ -27,10 +27,6 @@ public class Result_NodeAnnouncementInfoDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_NodeAnnouncementInfoDecodeErrorZ_OK(NodeAnnouncementInfo res) {
-                       this(null, bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_NodeAnnouncementInfoDecodeErrorZ_Err extends Result_NodeAnnouncementInfoDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_NodeAnnouncementInfoDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_NodeAnnouncementInfoDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_NodeAnnouncementInfoDecodeErrorZ in the success state.
+        */
+       public static Result_NodeAnnouncementInfoDecodeErrorZ constructor_ok(NodeAnnouncementInfo o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_NodeAnnouncementInfoDecodeErrorZ in the error state.
+        */
+       public static Result_NodeAnnouncementInfoDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_NodeAnnouncementInfoDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_NodeAnnouncementInfoDecodeErrorZ clone() {
+               long ret = bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_clone(this.ptr);
+               Result_NodeAnnouncementInfoDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementInfoDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index ed1d3a27bd9b39df3ebc318fe23ea31fa548603a..74718355a642e70b121787f99d4efbc33ee86df8 100644 (file)
@@ -27,10 +27,6 @@ public class Result_NodeFeaturesDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_NodeFeaturesDecodeErrorZ_OK(NodeFeatures res) {
-                       this(null, bindings.CResult_NodeFeaturesDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_NodeFeaturesDecodeErrorZ_Err extends Result_NodeFeaturesDecodeErrorZ {
@@ -42,9 +38,26 @@ public class Result_NodeFeaturesDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_NodeFeaturesDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_NodeFeaturesDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_NodeFeaturesDecodeErrorZ in the success state.
+        */
+       public static Result_NodeFeaturesDecodeErrorZ constructor_ok(NodeFeatures o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_NodeFeaturesDecodeErrorZ in the error state.
+        */
+       public static Result_NodeFeaturesDecodeErrorZ constructor_err(DecodeError e) {
+               long 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);
+               return ret_hu_conv;
+       }
+
 }
index a6f8fcb9afcf70ce886b4b9dd2bb1857e407e118..737d1383dcb9ae5675499411c37de82fd9dbf699 100644 (file)
@@ -27,10 +27,6 @@ public class Result_NodeInfoDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_NodeInfoDecodeErrorZ_OK(NodeInfo res) {
-                       this(null, bindings.CResult_NodeInfoDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_NodeInfoDecodeErrorZ_Err extends Result_NodeInfoDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_NodeInfoDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_NodeInfoDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_NodeInfoDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_NodeInfoDecodeErrorZ in the success state.
+        */
+       public static Result_NodeInfoDecodeErrorZ constructor_ok(NodeInfo o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_NodeInfoDecodeErrorZ in the error state.
+        */
+       public static Result_NodeInfoDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_NodeInfoDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_NodeInfoDecodeErrorZ clone() {
+               long ret = bindings.CResult_NodeInfoDecodeErrorZ_clone(this.ptr);
+               Result_NodeInfoDecodeErrorZ ret_hu_conv = Result_NodeInfoDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index a296d091a5761ddd4a23ea1fa29419ba1f7707ab..f0ed5da0a54e1a3b2053ece11f990d64ef6a77fb 100644 (file)
@@ -22,9 +22,6 @@ public class Result_NoneAPIErrorZ extends CommonBase {
                private Result_NoneAPIErrorZ_OK(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                }
-               public Result_NoneAPIErrorZ_OK() {
-                       this(null, bindings.CResult_NoneAPIErrorZ_ok());
-               }
        }
 
        public static final class Result_NoneAPIErrorZ_Err extends Result_NoneAPIErrorZ {
@@ -36,8 +33,34 @@ public class Result_NoneAPIErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_NoneAPIErrorZ_Err(APIError err) {
-                       this(null, bindings.CResult_NoneAPIErrorZ_err(err.ptr));
-               }
        }
+
+       /**
+        * Creates a new CResult_NoneAPIErrorZ in the success state.
+        */
+       public static Result_NoneAPIErrorZ constructor_ok() {
+               long ret = bindings.CResult_NoneAPIErrorZ_ok();
+               Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_NoneAPIErrorZ in the error state.
+        */
+       public static Result_NoneAPIErrorZ constructor_err(APIError e) {
+               long ret = bindings.CResult_NoneAPIErrorZ_err(e.ptr);
+               Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_NoneAPIErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_NoneAPIErrorZ clone() {
+               long ret = bindings.CResult_NoneAPIErrorZ_clone(this.ptr);
+               Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 3e9f075baab0c370dda8413b4068500e0ef81556..446857026ac44de7f339b8e0cd5f7cd2d8fe5f53 100644 (file)
@@ -22,9 +22,6 @@ public class Result_NoneChannelMonitorUpdateErrZ extends CommonBase {
                private Result_NoneChannelMonitorUpdateErrZ_OK(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                }
-               public Result_NoneChannelMonitorUpdateErrZ_OK() {
-                       this(null, bindings.CResult_NoneChannelMonitorUpdateErrZ_ok());
-               }
        }
 
        public static final class Result_NoneChannelMonitorUpdateErrZ_Err extends Result_NoneChannelMonitorUpdateErrZ {
@@ -33,8 +30,34 @@ public class Result_NoneChannelMonitorUpdateErrZ extends CommonBase {
                        super(_dummy, ptr);
                        this.err = bindings.LDKCResult_NoneChannelMonitorUpdateErrZ_get_err(ptr);
                }
-               public Result_NoneChannelMonitorUpdateErrZ_Err(LDKChannelMonitorUpdateErr err) {
-                       this(null, bindings.CResult_NoneChannelMonitorUpdateErrZ_err(err));
-               }
        }
+
+       /**
+        * Creates a new CResult_NoneChannelMonitorUpdateErrZ in the success state.
+        */
+       public static Result_NoneChannelMonitorUpdateErrZ constructor_ok() {
+               long ret = bindings.CResult_NoneChannelMonitorUpdateErrZ_ok();
+               Result_NoneChannelMonitorUpdateErrZ ret_hu_conv = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_NoneChannelMonitorUpdateErrZ in the error state.
+        */
+       public static Result_NoneChannelMonitorUpdateErrZ constructor_err(LDKChannelMonitorUpdateErr e) {
+               long ret = bindings.CResult_NoneChannelMonitorUpdateErrZ_err(e);
+               Result_NoneChannelMonitorUpdateErrZ ret_hu_conv = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_NoneChannelMonitorUpdateErrZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_NoneChannelMonitorUpdateErrZ clone() {
+               long ret = bindings.CResult_NoneChannelMonitorUpdateErrZ_clone(this.ptr);
+               Result_NoneChannelMonitorUpdateErrZ ret_hu_conv = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 292df093265704a60ba886512944b203744f2492..7f150a19215bc7238681f16ac3e52c76a54ee492 100644 (file)
@@ -22,9 +22,6 @@ public class Result_NoneLightningErrorZ extends CommonBase {
                private Result_NoneLightningErrorZ_OK(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                }
-               public Result_NoneLightningErrorZ_OK() {
-                       this(null, bindings.CResult_NoneLightningErrorZ_ok());
-               }
        }
 
        public static final class Result_NoneLightningErrorZ_Err extends Result_NoneLightningErrorZ {
@@ -36,9 +33,35 @@ public class Result_NoneLightningErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_NoneLightningErrorZ_Err(LightningError err) {
-                       this(null, bindings.CResult_NoneLightningErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_NoneLightningErrorZ in the success state.
+        */
+       public static Result_NoneLightningErrorZ constructor_ok() {
+               long ret = bindings.CResult_NoneLightningErrorZ_ok();
+               Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_NoneLightningErrorZ in the error state.
+        */
+       public static Result_NoneLightningErrorZ constructor_err(LightningError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_NoneLightningErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_NoneLightningErrorZ clone() {
+               long ret = bindings.CResult_NoneLightningErrorZ_clone(this.ptr);
+               Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 89dce235e494d6a0f73ce6881107957a12848fb1..c63e7569d08e001fa9f8a3ccac5592f9dae85e89 100644 (file)
@@ -22,9 +22,6 @@ public class Result_NoneMonitorUpdateErrorZ extends CommonBase {
                private Result_NoneMonitorUpdateErrorZ_OK(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                }
-               public Result_NoneMonitorUpdateErrorZ_OK() {
-                       this(null, bindings.CResult_NoneMonitorUpdateErrorZ_ok());
-               }
        }
 
        public static final class Result_NoneMonitorUpdateErrorZ_Err extends Result_NoneMonitorUpdateErrorZ {
@@ -36,9 +33,35 @@ public class Result_NoneMonitorUpdateErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_NoneMonitorUpdateErrorZ_Err(MonitorUpdateError err) {
-                       this(null, bindings.CResult_NoneMonitorUpdateErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_NoneMonitorUpdateErrorZ in the success state.
+        */
+       public static Result_NoneMonitorUpdateErrorZ constructor_ok() {
+               long ret = bindings.CResult_NoneMonitorUpdateErrorZ_ok();
+               Result_NoneMonitorUpdateErrorZ ret_hu_conv = Result_NoneMonitorUpdateErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_NoneMonitorUpdateErrorZ in the error state.
+        */
+       public static Result_NoneMonitorUpdateErrorZ constructor_err(MonitorUpdateError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_NoneMonitorUpdateErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_NoneMonitorUpdateErrorZ clone() {
+               long ret = bindings.CResult_NoneMonitorUpdateErrorZ_clone(this.ptr);
+               Result_NoneMonitorUpdateErrorZ ret_hu_conv = Result_NoneMonitorUpdateErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 8f9e933d779d56dfcae05cdf27e1bd5c72833b84..1b9b3f8044a091d17f6de20363faec52ed0e7425 100644 (file)
@@ -22,9 +22,6 @@ public class Result_NonePaymentSendFailureZ extends CommonBase {
                private Result_NonePaymentSendFailureZ_OK(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                }
-               public Result_NonePaymentSendFailureZ_OK() {
-                       this(null, bindings.CResult_NonePaymentSendFailureZ_ok());
-               }
        }
 
        public static final class Result_NonePaymentSendFailureZ_Err extends Result_NonePaymentSendFailureZ {
@@ -36,8 +33,34 @@ public class Result_NonePaymentSendFailureZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_NonePaymentSendFailureZ_Err(PaymentSendFailure err) {
-                       this(null, bindings.CResult_NonePaymentSendFailureZ_err(err.ptr));
-               }
        }
+
+       /**
+        * Creates a new CResult_NonePaymentSendFailureZ in the success state.
+        */
+       public static Result_NonePaymentSendFailureZ constructor_ok() {
+               long ret = bindings.CResult_NonePaymentSendFailureZ_ok();
+               Result_NonePaymentSendFailureZ ret_hu_conv = Result_NonePaymentSendFailureZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_NonePaymentSendFailureZ in the error state.
+        */
+       public static Result_NonePaymentSendFailureZ constructor_err(PaymentSendFailure e) {
+               long ret = bindings.CResult_NonePaymentSendFailureZ_err(e.ptr);
+               Result_NonePaymentSendFailureZ ret_hu_conv = Result_NonePaymentSendFailureZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_NonePaymentSendFailureZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_NonePaymentSendFailureZ clone() {
+               long ret = bindings.CResult_NonePaymentSendFailureZ_clone(this.ptr);
+               Result_NonePaymentSendFailureZ ret_hu_conv = Result_NonePaymentSendFailureZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 3377e161d356ba604ee55b99bc95ba79d6f367c3..ec7ade26daf3dda33b270b15e31a316bb21e37eb 100644 (file)
@@ -22,9 +22,6 @@ public class Result_NonePeerHandleErrorZ extends CommonBase {
                private Result_NonePeerHandleErrorZ_OK(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                }
-               public Result_NonePeerHandleErrorZ_OK() {
-                       this(null, bindings.CResult_NonePeerHandleErrorZ_ok());
-               }
        }
 
        public static final class Result_NonePeerHandleErrorZ_Err extends Result_NonePeerHandleErrorZ {
@@ -36,9 +33,35 @@ public class Result_NonePeerHandleErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_NonePeerHandleErrorZ_Err(PeerHandleError err) {
-                       this(null, bindings.CResult_NonePeerHandleErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_NonePeerHandleErrorZ in the success state.
+        */
+       public static Result_NonePeerHandleErrorZ constructor_ok() {
+               long ret = bindings.CResult_NonePeerHandleErrorZ_ok();
+               Result_NonePeerHandleErrorZ ret_hu_conv = Result_NonePeerHandleErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_NonePeerHandleErrorZ in the error state.
+        */
+       public static Result_NonePeerHandleErrorZ constructor_err(PeerHandleError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_NonePeerHandleErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_NonePeerHandleErrorZ clone() {
+               long ret = bindings.CResult_NonePeerHandleErrorZ_clone(this.ptr);
+               Result_NonePeerHandleErrorZ ret_hu_conv = Result_NonePeerHandleErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 5c6021269789fb13be1a124ca1147c3268be9aeb..f6bad11ffad11c077fa47c421e3a20d3a203ec0d 100644 (file)
@@ -27,10 +27,6 @@ public class Result_OpenChannelDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_OpenChannelDecodeErrorZ_OK(OpenChannel res) {
-                       this(null, bindings.CResult_OpenChannelDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_OpenChannelDecodeErrorZ_Err extends Result_OpenChannelDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_OpenChannelDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_OpenChannelDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_OpenChannelDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_OpenChannelDecodeErrorZ in the success state.
+        */
+       public static Result_OpenChannelDecodeErrorZ constructor_ok(OpenChannel o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_OpenChannelDecodeErrorZ in the error state.
+        */
+       public static Result_OpenChannelDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_OpenChannelDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_OpenChannelDecodeErrorZ clone() {
+               long ret = bindings.CResult_OpenChannelDecodeErrorZ_clone(this.ptr);
+               Result_OpenChannelDecodeErrorZ ret_hu_conv = Result_OpenChannelDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 5eb6d70cf84ca3783dab4604a269ad82405cff8c..1aceb04caf536017215c9c9c9040126f2f549753 100644 (file)
@@ -27,10 +27,6 @@ public class Result_OutPointDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_OutPointDecodeErrorZ_OK(OutPoint res) {
-                       this(null, bindings.CResult_OutPointDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_OutPointDecodeErrorZ_Err extends Result_OutPointDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_OutPointDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_OutPointDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_OutPointDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_OutPointDecodeErrorZ in the success state.
+        */
+       public static Result_OutPointDecodeErrorZ constructor_ok(OutPoint o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_OutPointDecodeErrorZ in the error state.
+        */
+       public static Result_OutPointDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_OutPointDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_OutPointDecodeErrorZ clone() {
+               long ret = bindings.CResult_OutPointDecodeErrorZ_clone(this.ptr);
+               Result_OutPointDecodeErrorZ ret_hu_conv = Result_OutPointDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index df3b1456810321cc2968427f99baf22ba44bc6f2..c91054d5ee0967ff664f320b51ae9150aa625255 100644 (file)
@@ -27,10 +27,6 @@ public class Result_PingDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_PingDecodeErrorZ_OK(Ping res) {
-                       this(null, bindings.CResult_PingDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_PingDecodeErrorZ_Err extends Result_PingDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_PingDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_PingDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_PingDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_PingDecodeErrorZ in the success state.
+        */
+       public static Result_PingDecodeErrorZ constructor_ok(Ping o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_PingDecodeErrorZ in the error state.
+        */
+       public static Result_PingDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_PingDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_PingDecodeErrorZ clone() {
+               long ret = bindings.CResult_PingDecodeErrorZ_clone(this.ptr);
+               Result_PingDecodeErrorZ ret_hu_conv = Result_PingDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 2d33ea87d5ce6f04d9177e6da2d72809cd80fe56..0850f3886ebde509a2de3c68b6dd276e4f1e605a 100644 (file)
@@ -27,10 +27,6 @@ public class Result_PongDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_PongDecodeErrorZ_OK(Pong res) {
-                       this(null, bindings.CResult_PongDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_PongDecodeErrorZ_Err extends Result_PongDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_PongDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_PongDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_PongDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_PongDecodeErrorZ in the success state.
+        */
+       public static Result_PongDecodeErrorZ constructor_ok(Pong o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_PongDecodeErrorZ in the error state.
+        */
+       public static Result_PongDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_PongDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_PongDecodeErrorZ clone() {
+               long ret = bindings.CResult_PongDecodeErrorZ_clone(this.ptr);
+               Result_PongDecodeErrorZ ret_hu_conv = Result_PongDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 3a9df4d2d56f8885977bb3dc3e6e34f2174633e0..60dbc03e044366ae1f887f0d21c168b3d1ad9dae 100644 (file)
@@ -24,9 +24,6 @@ public class Result_PublicKeyErrorZ extends CommonBase {
                        super(_dummy, ptr);
                        this.res = bindings.LDKCResult_PublicKeyErrorZ_get_ok(ptr);
                }
-               public Result_PublicKeyErrorZ_OK(byte[] res) {
-                       this(null, bindings.CResult_PublicKeyErrorZ_ok(res));
-               }
        }
 
        public static final class Result_PublicKeyErrorZ_Err extends Result_PublicKeyErrorZ {
@@ -35,8 +32,24 @@ public class Result_PublicKeyErrorZ extends CommonBase {
                        super(_dummy, ptr);
                        this.err = bindings.LDKCResult_PublicKeyErrorZ_get_err(ptr);
                }
-               public Result_PublicKeyErrorZ_Err(LDKSecp256k1Error err) {
-                       this(null, bindings.CResult_PublicKeyErrorZ_err(err));
-               }
        }
+
+       /**
+        * Creates a new CResult_PublicKeyErrorZ in the success state.
+        */
+       public static Result_PublicKeyErrorZ constructor_ok(byte[] o) {
+               long ret = bindings.CResult_PublicKeyErrorZ_ok(o);
+               Result_PublicKeyErrorZ ret_hu_conv = Result_PublicKeyErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_PublicKeyErrorZ in the error state.
+        */
+       public static Result_PublicKeyErrorZ constructor_err(LDKSecp256k1Error e) {
+               long ret = bindings.CResult_PublicKeyErrorZ_err(e);
+               Result_PublicKeyErrorZ ret_hu_conv = Result_PublicKeyErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index ee14d9526e1150cdef7a57d256be1a48f3011d5e..c2de785d56e1b6b47d776a8f07d6c9d14a0e43fe 100644 (file)
@@ -27,10 +27,6 @@ public class Result_QueryChannelRangeDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_QueryChannelRangeDecodeErrorZ_OK(QueryChannelRange res) {
-                       this(null, bindings.CResult_QueryChannelRangeDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_QueryChannelRangeDecodeErrorZ_Err extends Result_QueryChannelRangeDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_QueryChannelRangeDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_QueryChannelRangeDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_QueryChannelRangeDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_QueryChannelRangeDecodeErrorZ in the success state.
+        */
+       public static Result_QueryChannelRangeDecodeErrorZ constructor_ok(QueryChannelRange o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_QueryChannelRangeDecodeErrorZ in the error state.
+        */
+       public static Result_QueryChannelRangeDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_QueryChannelRangeDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_QueryChannelRangeDecodeErrorZ clone() {
+               long ret = bindings.CResult_QueryChannelRangeDecodeErrorZ_clone(this.ptr);
+               Result_QueryChannelRangeDecodeErrorZ ret_hu_conv = Result_QueryChannelRangeDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 4219737ffbb4a349db27670e1a6a447cd52b7c9d..3cfeff0348026187f017627a54564ecc15fa6a35 100644 (file)
@@ -27,10 +27,6 @@ public class Result_QueryShortChannelIdsDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_QueryShortChannelIdsDecodeErrorZ_OK(QueryShortChannelIds res) {
-                       this(null, bindings.CResult_QueryShortChannelIdsDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_QueryShortChannelIdsDecodeErrorZ_Err extends Result_QueryShortChannelIdsDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_QueryShortChannelIdsDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_QueryShortChannelIdsDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_QueryShortChannelIdsDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_QueryShortChannelIdsDecodeErrorZ in the success state.
+        */
+       public static Result_QueryShortChannelIdsDecodeErrorZ constructor_ok(QueryShortChannelIds o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_QueryShortChannelIdsDecodeErrorZ in the error state.
+        */
+       public static Result_QueryShortChannelIdsDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_QueryShortChannelIdsDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_QueryShortChannelIdsDecodeErrorZ clone() {
+               long ret = bindings.CResult_QueryShortChannelIdsDecodeErrorZ_clone(this.ptr);
+               Result_QueryShortChannelIdsDecodeErrorZ ret_hu_conv = Result_QueryShortChannelIdsDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 1130bb0d717704fc1e11d614a7ada5be26a86b84..df73e8b5d681389b640e6a5f794271be383e7711 100644 (file)
@@ -27,10 +27,6 @@ public class Result_ReplyChannelRangeDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_ReplyChannelRangeDecodeErrorZ_OK(ReplyChannelRange res) {
-                       this(null, bindings.CResult_ReplyChannelRangeDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_ReplyChannelRangeDecodeErrorZ_Err extends Result_ReplyChannelRangeDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_ReplyChannelRangeDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_ReplyChannelRangeDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_ReplyChannelRangeDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_ReplyChannelRangeDecodeErrorZ in the success state.
+        */
+       public static Result_ReplyChannelRangeDecodeErrorZ constructor_ok(ReplyChannelRange o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_ReplyChannelRangeDecodeErrorZ in the error state.
+        */
+       public static Result_ReplyChannelRangeDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_ReplyChannelRangeDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_ReplyChannelRangeDecodeErrorZ clone() {
+               long ret = bindings.CResult_ReplyChannelRangeDecodeErrorZ_clone(this.ptr);
+               Result_ReplyChannelRangeDecodeErrorZ ret_hu_conv = Result_ReplyChannelRangeDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index baf5aab72315b2d83cf3c760d292df3784c74715..90fd1252bddce7c22fb7eb7b225225632b1018e0 100644 (file)
@@ -27,10 +27,6 @@ public class Result_ReplyShortChannelIdsEndDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_ReplyShortChannelIdsEndDecodeErrorZ_OK(ReplyShortChannelIdsEnd res) {
-                       this(null, bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_ReplyShortChannelIdsEndDecodeErrorZ_Err extends Result_ReplyShortChannelIdsEndDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_ReplyShortChannelIdsEndDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_ReplyShortChannelIdsEndDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_ReplyShortChannelIdsEndDecodeErrorZ in the success state.
+        */
+       public static Result_ReplyShortChannelIdsEndDecodeErrorZ constructor_ok(ReplyShortChannelIdsEnd o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_ReplyShortChannelIdsEndDecodeErrorZ in the error state.
+        */
+       public static Result_ReplyShortChannelIdsEndDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_ReplyShortChannelIdsEndDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_ReplyShortChannelIdsEndDecodeErrorZ clone() {
+               long ret = bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(this.ptr);
+               Result_ReplyShortChannelIdsEndDecodeErrorZ ret_hu_conv = Result_ReplyShortChannelIdsEndDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index fd9181c170e351e5f695e49575c13234d2525c42..ed0763a042fcb212d45917ef9861270b5ab699e2 100644 (file)
@@ -27,10 +27,6 @@ public class Result_RevokeAndACKDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_RevokeAndACKDecodeErrorZ_OK(RevokeAndACK res) {
-                       this(null, bindings.CResult_RevokeAndACKDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_RevokeAndACKDecodeErrorZ_Err extends Result_RevokeAndACKDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_RevokeAndACKDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_RevokeAndACKDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_RevokeAndACKDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_RevokeAndACKDecodeErrorZ in the success state.
+        */
+       public static Result_RevokeAndACKDecodeErrorZ constructor_ok(RevokeAndACK o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_RevokeAndACKDecodeErrorZ in the error state.
+        */
+       public static Result_RevokeAndACKDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_RevokeAndACKDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_RevokeAndACKDecodeErrorZ clone() {
+               long ret = bindings.CResult_RevokeAndACKDecodeErrorZ_clone(this.ptr);
+               Result_RevokeAndACKDecodeErrorZ ret_hu_conv = Result_RevokeAndACKDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index d716f532a852d1eb8f998fead01ed3ba19f9a536..9d07eab017363db6263803461594dda0c6558e18 100644 (file)
@@ -27,10 +27,6 @@ public class Result_RouteDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_RouteDecodeErrorZ_OK(Route res) {
-                       this(null, bindings.CResult_RouteDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_RouteDecodeErrorZ_Err extends Result_RouteDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_RouteDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_RouteDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_RouteDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_RouteDecodeErrorZ in the success state.
+        */
+       public static Result_RouteDecodeErrorZ constructor_ok(Route o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_RouteDecodeErrorZ in the error state.
+        */
+       public static Result_RouteDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_RouteDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_RouteDecodeErrorZ clone() {
+               long ret = bindings.CResult_RouteDecodeErrorZ_clone(this.ptr);
+               Result_RouteDecodeErrorZ ret_hu_conv = Result_RouteDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index fa9ab9761d089ee7bed4fb9ec971d502f4f40273..7348c731dcca4a70ad66c0c4229dbd8c5a148124 100644 (file)
@@ -27,10 +27,6 @@ public class Result_RouteLightningErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_RouteLightningErrorZ_OK(Route res) {
-                       this(null, bindings.CResult_RouteLightningErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_RouteLightningErrorZ_Err extends Result_RouteLightningErrorZ {
@@ -42,9 +38,36 @@ public class Result_RouteLightningErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_RouteLightningErrorZ_Err(LightningError err) {
-                       this(null, bindings.CResult_RouteLightningErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_RouteLightningErrorZ in the success state.
+        */
+       public static Result_RouteLightningErrorZ constructor_ok(Route o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_RouteLightningErrorZ in the error state.
+        */
+       public static Result_RouteLightningErrorZ constructor_err(LightningError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_RouteLightningErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_RouteLightningErrorZ clone() {
+               long ret = bindings.CResult_RouteLightningErrorZ_clone(this.ptr);
+               Result_RouteLightningErrorZ ret_hu_conv = Result_RouteLightningErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index f58be065333d72da247bc55094a39ba5ecaaf7ef..01186822248e9c846838a95f32a1d1e49ef3105e 100644 (file)
@@ -27,10 +27,6 @@ public class Result_RoutingFeesDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_RoutingFeesDecodeErrorZ_OK(RoutingFees res) {
-                       this(null, bindings.CResult_RoutingFeesDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_RoutingFeesDecodeErrorZ_Err extends Result_RoutingFeesDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_RoutingFeesDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_RoutingFeesDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_RoutingFeesDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_RoutingFeesDecodeErrorZ in the success state.
+        */
+       public static Result_RoutingFeesDecodeErrorZ constructor_ok(RoutingFees o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_RoutingFeesDecodeErrorZ in the error state.
+        */
+       public static Result_RoutingFeesDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_RoutingFeesDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_RoutingFeesDecodeErrorZ clone() {
+               long ret = bindings.CResult_RoutingFeesDecodeErrorZ_clone(this.ptr);
+               Result_RoutingFeesDecodeErrorZ ret_hu_conv = Result_RoutingFeesDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index f643ad9a4cf3865fd9de221fac3738721c331c55..48f2ae1db20a7ea6bf65bb27cdfa0ea7cd2afac0 100644 (file)
@@ -24,9 +24,6 @@ public class Result_SecretKeyErrorZ extends CommonBase {
                        super(_dummy, ptr);
                        this.res = bindings.LDKCResult_SecretKeyErrorZ_get_ok(ptr);
                }
-               public Result_SecretKeyErrorZ_OK(byte[] res) {
-                       this(null, bindings.CResult_SecretKeyErrorZ_ok(res));
-               }
        }
 
        public static final class Result_SecretKeyErrorZ_Err extends Result_SecretKeyErrorZ {
@@ -35,8 +32,24 @@ public class Result_SecretKeyErrorZ extends CommonBase {
                        super(_dummy, ptr);
                        this.err = bindings.LDKCResult_SecretKeyErrorZ_get_err(ptr);
                }
-               public Result_SecretKeyErrorZ_Err(LDKSecp256k1Error err) {
-                       this(null, bindings.CResult_SecretKeyErrorZ_err(err));
-               }
        }
+
+       /**
+        * Creates a new CResult_SecretKeyErrorZ in the success state.
+        */
+       public static Result_SecretKeyErrorZ constructor_ok(byte[] o) {
+               long ret = bindings.CResult_SecretKeyErrorZ_ok(o);
+               Result_SecretKeyErrorZ ret_hu_conv = Result_SecretKeyErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_SecretKeyErrorZ in the error state.
+        */
+       public static Result_SecretKeyErrorZ constructor_err(LDKSecp256k1Error e) {
+               long ret = bindings.CResult_SecretKeyErrorZ_err(e);
+               Result_SecretKeyErrorZ ret_hu_conv = Result_SecretKeyErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index c71735d60c102a7ad1ecc31797e65319536c80f0..7a2e6baf83dbeb798374fee83c7db4639dc6fbd1 100644 (file)
@@ -27,10 +27,6 @@ public class Result_ShutdownDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_ShutdownDecodeErrorZ_OK(Shutdown res) {
-                       this(null, bindings.CResult_ShutdownDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_ShutdownDecodeErrorZ_Err extends Result_ShutdownDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_ShutdownDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_ShutdownDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_ShutdownDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_ShutdownDecodeErrorZ in the success state.
+        */
+       public static Result_ShutdownDecodeErrorZ constructor_ok(Shutdown o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_ShutdownDecodeErrorZ in the error state.
+        */
+       public static Result_ShutdownDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_ShutdownDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_ShutdownDecodeErrorZ clone() {
+               long ret = bindings.CResult_ShutdownDecodeErrorZ_clone(this.ptr);
+               Result_ShutdownDecodeErrorZ ret_hu_conv = Result_ShutdownDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 652daf48a28b3a979c245df5c915e91c15f7c12d..4aa27cf5e1f098d8464d56c923bce2d521065328 100644 (file)
@@ -27,10 +27,6 @@ public class Result_SignDecodeErrorZ extends CommonBase {
                        ret_hu_conv.ptrs_to.add(this);
                        this.res = ret_hu_conv;
                }
-               public Result_SignDecodeErrorZ_OK(Sign res) {
-                       this(null, bindings.CResult_SignDecodeErrorZ_ok(res == null ? 0 : res.ptr));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_SignDecodeErrorZ_Err extends Result_SignDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_SignDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_SignDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_SignDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_SignDecodeErrorZ in the success state.
+        */
+       public static Result_SignDecodeErrorZ constructor_ok(Sign o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_SignDecodeErrorZ in the error state.
+        */
+       public static Result_SignDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_SignDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_SignDecodeErrorZ clone() {
+               long ret = bindings.CResult_SignDecodeErrorZ_clone(this.ptr);
+               Result_SignDecodeErrorZ ret_hu_conv = Result_SignDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 8e7bb2e051bf60db469c5dd70cd93e1adff1ef72..1ccfcac6fa779fbdfd73f853f6d23711246bf28a 100644 (file)
@@ -24,17 +24,40 @@ public class Result_SignatureNoneZ extends CommonBase {
                        super(_dummy, ptr);
                        this.res = bindings.LDKCResult_SignatureNoneZ_get_ok(ptr);
                }
-               public Result_SignatureNoneZ_OK(byte[] res) {
-                       this(null, bindings.CResult_SignatureNoneZ_ok(res));
-               }
        }
 
        public static final class Result_SignatureNoneZ_Err extends Result_SignatureNoneZ {
                private Result_SignatureNoneZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                }
-               public Result_SignatureNoneZ_Err() {
-                       this(null, bindings.CResult_SignatureNoneZ_err());
-               }
        }
+
+       /**
+        * Creates a new CResult_SignatureNoneZ in the success state.
+        */
+       public static Result_SignatureNoneZ constructor_ok(byte[] o) {
+               long ret = bindings.CResult_SignatureNoneZ_ok(o);
+               Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_SignatureNoneZ in the error state.
+        */
+       public static Result_SignatureNoneZ constructor_err() {
+               long ret = bindings.CResult_SignatureNoneZ_err();
+               Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_SignatureNoneZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_SignatureNoneZ clone() {
+               long ret = bindings.CResult_SignatureNoneZ_clone(this.ptr);
+               Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 3fd3ca6f8243ff95d36a05cd0ec40e22178cd63c..99aff28b8d2c947f5d1c123f1d62cffdb4fba1aa 100644 (file)
@@ -27,9 +27,6 @@ public class Result_SpendableOutputDescriptorDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_SpendableOutputDescriptorDecodeErrorZ_OK(SpendableOutputDescriptor res) {
-                       this(null, bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_ok(res.ptr));
-               }
        }
 
        public static final class Result_SpendableOutputDescriptorDecodeErrorZ_Err extends Result_SpendableOutputDescriptorDecodeErrorZ {
@@ -41,9 +38,35 @@ public class Result_SpendableOutputDescriptorDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_SpendableOutputDescriptorDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_SpendableOutputDescriptorDecodeErrorZ in the success state.
+        */
+       public static Result_SpendableOutputDescriptorDecodeErrorZ constructor_ok(SpendableOutputDescriptor o) {
+               long ret = bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o.ptr);
+               Result_SpendableOutputDescriptorDecodeErrorZ ret_hu_conv = Result_SpendableOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_SpendableOutputDescriptorDecodeErrorZ in the error state.
+        */
+       public static Result_SpendableOutputDescriptorDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_SpendableOutputDescriptorDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_SpendableOutputDescriptorDecodeErrorZ clone() {
+               long ret = bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_clone(this.ptr);
+               Result_SpendableOutputDescriptorDecodeErrorZ ret_hu_conv = Result_SpendableOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index c70799b28a3236a1ff75bffef74b9f5dd0b7f13b..fe70d4a3a6770daf98598dcf49085add4a786ecd 100644 (file)
@@ -24,17 +24,30 @@ public class Result_TransactionNoneZ extends CommonBase {
                        super(_dummy, ptr);
                        this.res = bindings.LDKCResult_TransactionNoneZ_get_ok(ptr);
                }
-               public Result_TransactionNoneZ_OK(byte[] res) {
-                       this(null, bindings.CResult_TransactionNoneZ_ok(res));
-               }
        }
 
        public static final class Result_TransactionNoneZ_Err extends Result_TransactionNoneZ {
                private Result_TransactionNoneZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                }
-               public Result_TransactionNoneZ_Err() {
-                       this(null, bindings.CResult_TransactionNoneZ_err());
-               }
        }
+
+       /**
+        * Creates a new CResult_TransactionNoneZ in the success state.
+        */
+       public static Result_TransactionNoneZ constructor_ok(byte[] o) {
+               long ret = bindings.CResult_TransactionNoneZ_ok(o);
+               Result_TransactionNoneZ ret_hu_conv = Result_TransactionNoneZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_TransactionNoneZ in the error state.
+        */
+       public static Result_TransactionNoneZ constructor_err() {
+               long ret = bindings.CResult_TransactionNoneZ_err();
+               Result_TransactionNoneZ ret_hu_conv = Result_TransactionNoneZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 54375f1aabb74b35ddc9a3f308cf0fa7e689f089..c34404fbda3af5a60ee68f229fb74b208fc1ec0b 100644 (file)
@@ -27,26 +27,39 @@ public class Result_TrustedCommitmentTransactionNoneZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_TrustedCommitmentTransactionNoneZ_OK(TrustedCommitmentTransaction res) {
-                       this(null, bindings.CResult_TrustedCommitmentTransactionNoneZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-                       // Due to rust's strict-ownership memory model, in some cases we need to "move"
-                       // an object to pass exclusive ownership to the function being called.
-                       // In most cases, we avoid this being visible in GC'd languages by cloning the object
-                       // at the FFI layer, creating a new object which Rust can claim ownership of
-                       // However, in some cases (eg here), there is no way to clone an object, and thus
-                       // we actually have to pass full ownership to Rust.
-                       // Thus, after this call, res is reset to null and is now a dummy object.
-                       res.ptr = 0;
-               }
        }
 
        public static final class Result_TrustedCommitmentTransactionNoneZ_Err extends Result_TrustedCommitmentTransactionNoneZ {
                private Result_TrustedCommitmentTransactionNoneZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                }
-               public Result_TrustedCommitmentTransactionNoneZ_Err() {
-                       this(null, bindings.CResult_TrustedCommitmentTransactionNoneZ_err());
-               }
        }
+
+       /**
+        * Creates a new CResult_TrustedCommitmentTransactionNoneZ in the success state.
+        */
+       public static Result_TrustedCommitmentTransactionNoneZ constructor_ok(TrustedCommitmentTransaction o) {
+               long 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);
+               // 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 is reset to null and is now a dummy object.
+               o.ptr = 0;
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_TrustedCommitmentTransactionNoneZ in the error state.
+        */
+       public static Result_TrustedCommitmentTransactionNoneZ constructor_err() {
+               long ret = bindings.CResult_TrustedCommitmentTransactionNoneZ_err();
+               Result_TrustedCommitmentTransactionNoneZ ret_hu_conv = Result_TrustedCommitmentTransactionNoneZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 5f181b4574f0728ef6ff610929e587c4772cfb82..b23757e564ac83a36b99b78bec9a9afd1b81760c 100644 (file)
@@ -27,10 +27,6 @@ public class Result_TxCreationKeysDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_TxCreationKeysDecodeErrorZ_OK(TxCreationKeys res) {
-                       this(null, bindings.CResult_TxCreationKeysDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_TxCreationKeysDecodeErrorZ_Err extends Result_TxCreationKeysDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_TxCreationKeysDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_TxCreationKeysDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_TxCreationKeysDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_TxCreationKeysDecodeErrorZ in the success state.
+        */
+       public static Result_TxCreationKeysDecodeErrorZ constructor_ok(TxCreationKeys o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_TxCreationKeysDecodeErrorZ in the error state.
+        */
+       public static Result_TxCreationKeysDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_TxCreationKeysDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_TxCreationKeysDecodeErrorZ clone() {
+               long ret = bindings.CResult_TxCreationKeysDecodeErrorZ_clone(this.ptr);
+               Result_TxCreationKeysDecodeErrorZ ret_hu_conv = Result_TxCreationKeysDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 3c33cd4229f0b431e3296b9a8d5f58dbb25068fc..f0f46ff839a81311519fdc11bf552f71c5664f61 100644 (file)
@@ -27,10 +27,6 @@ public class Result_TxCreationKeysErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_TxCreationKeysErrorZ_OK(TxCreationKeys res) {
-                       this(null, bindings.CResult_TxCreationKeysErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_TxCreationKeysErrorZ_Err extends Result_TxCreationKeysErrorZ {
@@ -39,8 +35,25 @@ public class Result_TxCreationKeysErrorZ extends CommonBase {
                        super(_dummy, ptr);
                        this.err = bindings.LDKCResult_TxCreationKeysErrorZ_get_err(ptr);
                }
-               public Result_TxCreationKeysErrorZ_Err(LDKSecp256k1Error err) {
-                       this(null, bindings.CResult_TxCreationKeysErrorZ_err(err));
-               }
        }
+
+       /**
+        * Creates a new CResult_TxCreationKeysErrorZ in the success state.
+        */
+       public static Result_TxCreationKeysErrorZ constructor_ok(TxCreationKeys o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_TxCreationKeysErrorZ in the error state.
+        */
+       public static Result_TxCreationKeysErrorZ constructor_err(LDKSecp256k1Error e) {
+               long ret = bindings.CResult_TxCreationKeysErrorZ_err(e);
+               Result_TxCreationKeysErrorZ ret_hu_conv = Result_TxCreationKeysErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 84965342573d8f9473830f8861093652f5189633..42f88334a6e9526d6ab7b0c24ed6b99e60177288 100644 (file)
@@ -26,9 +26,6 @@ public class Result_TxOutAccessErrorZ extends CommonBase {
                        TxOut res_conv = new TxOut(null, res);
                        this.res = res_conv;
                }
-               public Result_TxOutAccessErrorZ_OK(TxOut res) {
-                       this(null, bindings.CResult_TxOutAccessErrorZ_ok(res.ptr));
-               }
        }
 
        public static final class Result_TxOutAccessErrorZ_Err extends Result_TxOutAccessErrorZ {
@@ -37,8 +34,34 @@ public class Result_TxOutAccessErrorZ extends CommonBase {
                        super(_dummy, ptr);
                        this.err = bindings.LDKCResult_TxOutAccessErrorZ_get_err(ptr);
                }
-               public Result_TxOutAccessErrorZ_Err(LDKAccessError err) {
-                       this(null, bindings.CResult_TxOutAccessErrorZ_err(err));
-               }
        }
+
+       /**
+        * Creates a new CResult_TxOutAccessErrorZ in the success state.
+        */
+       public static Result_TxOutAccessErrorZ constructor_ok(TxOut o) {
+               long ret = bindings.CResult_TxOutAccessErrorZ_ok(o.ptr);
+               Result_TxOutAccessErrorZ ret_hu_conv = Result_TxOutAccessErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_TxOutAccessErrorZ in the error state.
+        */
+       public static Result_TxOutAccessErrorZ constructor_err(LDKAccessError e) {
+               long ret = bindings.CResult_TxOutAccessErrorZ_err(e);
+               Result_TxOutAccessErrorZ ret_hu_conv = Result_TxOutAccessErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_TxOutAccessErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_TxOutAccessErrorZ clone() {
+               long ret = bindings.CResult_TxOutAccessErrorZ_clone(this.ptr);
+               Result_TxOutAccessErrorZ ret_hu_conv = Result_TxOutAccessErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index a8b2d9f8d973b7f71a126ec4d7abf4ac00f36a00..f6f59dbc7eb18a871f12336ae1f802a2cc6fbaf4 100644 (file)
@@ -27,10 +27,6 @@ public class Result_UnsignedChannelAnnouncementDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_UnsignedChannelAnnouncementDecodeErrorZ_OK(UnsignedChannelAnnouncement res) {
-                       this(null, bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_UnsignedChannelAnnouncementDecodeErrorZ_Err extends Result_UnsignedChannelAnnouncementDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_UnsignedChannelAnnouncementDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_UnsignedChannelAnnouncementDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_UnsignedChannelAnnouncementDecodeErrorZ in the success state.
+        */
+       public static Result_UnsignedChannelAnnouncementDecodeErrorZ constructor_ok(UnsignedChannelAnnouncement o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_UnsignedChannelAnnouncementDecodeErrorZ in the error state.
+        */
+       public static Result_UnsignedChannelAnnouncementDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_UnsignedChannelAnnouncementDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_UnsignedChannelAnnouncementDecodeErrorZ clone() {
+               long ret = bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(this.ptr);
+               Result_UnsignedChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 23a6f102654f01680a2fb337dc35facdb189136b..9b3a7e2fe6b4756555a3856e1183494a2f4740fa 100644 (file)
@@ -27,10 +27,6 @@ public class Result_UnsignedChannelUpdateDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_UnsignedChannelUpdateDecodeErrorZ_OK(UnsignedChannelUpdate res) {
-                       this(null, bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_UnsignedChannelUpdateDecodeErrorZ_Err extends Result_UnsignedChannelUpdateDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_UnsignedChannelUpdateDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_UnsignedChannelUpdateDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_UnsignedChannelUpdateDecodeErrorZ in the success state.
+        */
+       public static Result_UnsignedChannelUpdateDecodeErrorZ constructor_ok(UnsignedChannelUpdate o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_UnsignedChannelUpdateDecodeErrorZ in the error state.
+        */
+       public static Result_UnsignedChannelUpdateDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_UnsignedChannelUpdateDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_UnsignedChannelUpdateDecodeErrorZ clone() {
+               long ret = bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_clone(this.ptr);
+               Result_UnsignedChannelUpdateDecodeErrorZ ret_hu_conv = Result_UnsignedChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 9512afc752273bb736d8d9709cc62f7aab71cea8..67f69dfcc9e379cbb3ab813836ccc766b487f503 100644 (file)
@@ -27,10 +27,6 @@ public class Result_UnsignedNodeAnnouncementDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_UnsignedNodeAnnouncementDecodeErrorZ_OK(UnsignedNodeAnnouncement res) {
-                       this(null, bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_UnsignedNodeAnnouncementDecodeErrorZ_Err extends Result_UnsignedNodeAnnouncementDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_UnsignedNodeAnnouncementDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_UnsignedNodeAnnouncementDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_UnsignedNodeAnnouncementDecodeErrorZ in the success state.
+        */
+       public static Result_UnsignedNodeAnnouncementDecodeErrorZ constructor_ok(UnsignedNodeAnnouncement o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_UnsignedNodeAnnouncementDecodeErrorZ in the error state.
+        */
+       public static Result_UnsignedNodeAnnouncementDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_UnsignedNodeAnnouncementDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_UnsignedNodeAnnouncementDecodeErrorZ clone() {
+               long ret = bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(this.ptr);
+               Result_UnsignedNodeAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedNodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 8fb56e96c1cea69efeca7683ab5a28c613032c67..d2ba04f6b4ee7b5e6933fc8a9cd84ef4d7ec4ef2 100644 (file)
@@ -27,10 +27,6 @@ public class Result_UpdateAddHTLCDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_UpdateAddHTLCDecodeErrorZ_OK(UpdateAddHTLC res) {
-                       this(null, bindings.CResult_UpdateAddHTLCDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_UpdateAddHTLCDecodeErrorZ_Err extends Result_UpdateAddHTLCDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_UpdateAddHTLCDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_UpdateAddHTLCDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_UpdateAddHTLCDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_UpdateAddHTLCDecodeErrorZ in the success state.
+        */
+       public static Result_UpdateAddHTLCDecodeErrorZ constructor_ok(UpdateAddHTLC o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_UpdateAddHTLCDecodeErrorZ in the error state.
+        */
+       public static Result_UpdateAddHTLCDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_UpdateAddHTLCDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_UpdateAddHTLCDecodeErrorZ clone() {
+               long ret = bindings.CResult_UpdateAddHTLCDecodeErrorZ_clone(this.ptr);
+               Result_UpdateAddHTLCDecodeErrorZ ret_hu_conv = Result_UpdateAddHTLCDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 42d393896eea8c1256bcd28ab3dcb409a6047405..2bd574d1c107a1dc9777b478f7aedc01eb510e75 100644 (file)
@@ -27,10 +27,6 @@ public class Result_UpdateFailHTLCDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_UpdateFailHTLCDecodeErrorZ_OK(UpdateFailHTLC res) {
-                       this(null, bindings.CResult_UpdateFailHTLCDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_UpdateFailHTLCDecodeErrorZ_Err extends Result_UpdateFailHTLCDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_UpdateFailHTLCDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_UpdateFailHTLCDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_UpdateFailHTLCDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_UpdateFailHTLCDecodeErrorZ in the success state.
+        */
+       public static Result_UpdateFailHTLCDecodeErrorZ constructor_ok(UpdateFailHTLC o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_UpdateFailHTLCDecodeErrorZ in the error state.
+        */
+       public static Result_UpdateFailHTLCDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_UpdateFailHTLCDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_UpdateFailHTLCDecodeErrorZ clone() {
+               long ret = bindings.CResult_UpdateFailHTLCDecodeErrorZ_clone(this.ptr);
+               Result_UpdateFailHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailHTLCDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index b1194604cc815104d92d4e355b37e940aeafb3e5..e379e3996a451c3c6d23116e3c4cbe88ccccf231 100644 (file)
@@ -27,10 +27,6 @@ public class Result_UpdateFailMalformedHTLCDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_UpdateFailMalformedHTLCDecodeErrorZ_OK(UpdateFailMalformedHTLC res) {
-                       this(null, bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_UpdateFailMalformedHTLCDecodeErrorZ_Err extends Result_UpdateFailMalformedHTLCDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_UpdateFailMalformedHTLCDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_UpdateFailMalformedHTLCDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_UpdateFailMalformedHTLCDecodeErrorZ in the success state.
+        */
+       public static Result_UpdateFailMalformedHTLCDecodeErrorZ constructor_ok(UpdateFailMalformedHTLC o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_UpdateFailMalformedHTLCDecodeErrorZ in the error state.
+        */
+       public static Result_UpdateFailMalformedHTLCDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_UpdateFailMalformedHTLCDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_UpdateFailMalformedHTLCDecodeErrorZ clone() {
+               long ret = bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(this.ptr);
+               Result_UpdateFailMalformedHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailMalformedHTLCDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index c023933b5895d636cdd969632676e758849df150..e3663d2824a224c269cb0d05921eaf922a3677d9 100644 (file)
@@ -27,10 +27,6 @@ public class Result_UpdateFeeDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_UpdateFeeDecodeErrorZ_OK(UpdateFee res) {
-                       this(null, bindings.CResult_UpdateFeeDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_UpdateFeeDecodeErrorZ_Err extends Result_UpdateFeeDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_UpdateFeeDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_UpdateFeeDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_UpdateFeeDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_UpdateFeeDecodeErrorZ in the success state.
+        */
+       public static Result_UpdateFeeDecodeErrorZ constructor_ok(UpdateFee o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_UpdateFeeDecodeErrorZ in the error state.
+        */
+       public static Result_UpdateFeeDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_UpdateFeeDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_UpdateFeeDecodeErrorZ clone() {
+               long ret = bindings.CResult_UpdateFeeDecodeErrorZ_clone(this.ptr);
+               Result_UpdateFeeDecodeErrorZ ret_hu_conv = Result_UpdateFeeDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 364d732e9694babe3749947344920784cfe6f180..8525cfa3cf6a67b9fe5a69f725bf9104532f1026 100644 (file)
@@ -27,10 +27,6 @@ public class Result_UpdateFulfillHTLCDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_UpdateFulfillHTLCDecodeErrorZ_OK(UpdateFulfillHTLC res) {
-                       this(null, bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_UpdateFulfillHTLCDecodeErrorZ_Err extends Result_UpdateFulfillHTLCDecodeErrorZ {
@@ -42,9 +38,36 @@ public class Result_UpdateFulfillHTLCDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_UpdateFulfillHTLCDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_UpdateFulfillHTLCDecodeErrorZ in the success state.
+        */
+       public static Result_UpdateFulfillHTLCDecodeErrorZ constructor_ok(UpdateFulfillHTLC o) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_UpdateFulfillHTLCDecodeErrorZ in the error state.
+        */
+       public static Result_UpdateFulfillHTLCDecodeErrorZ constructor_err(DecodeError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_UpdateFulfillHTLCDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_UpdateFulfillHTLCDecodeErrorZ clone() {
+               long ret = bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_clone(this.ptr);
+               Result_UpdateFulfillHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFulfillHTLCDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index c3aab0c69f3592c4b0e18f71d9660c1ef2d25bd7..c41c37b2582f29e9126c438e8da7ba657484134d 100644 (file)
@@ -24,9 +24,6 @@ public class Result_boolLightningErrorZ extends CommonBase {
                        super(_dummy, ptr);
                        this.res = bindings.LDKCResult_boolLightningErrorZ_get_ok(ptr);
                }
-               public Result_boolLightningErrorZ_OK(boolean res) {
-                       this(null, bindings.CResult_boolLightningErrorZ_ok(res));
-               }
        }
 
        public static final class Result_boolLightningErrorZ_Err extends Result_boolLightningErrorZ {
@@ -38,9 +35,35 @@ public class Result_boolLightningErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_boolLightningErrorZ_Err(LightningError err) {
-                       this(null, bindings.CResult_boolLightningErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_boolLightningErrorZ in the success state.
+        */
+       public static Result_boolLightningErrorZ constructor_ok(boolean o) {
+               long ret = bindings.CResult_boolLightningErrorZ_ok(o);
+               Result_boolLightningErrorZ ret_hu_conv = Result_boolLightningErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_boolLightningErrorZ in the error state.
+        */
+       public static Result_boolLightningErrorZ constructor_err(LightningError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_boolLightningErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_boolLightningErrorZ clone() {
+               long ret = bindings.CResult_boolLightningErrorZ_clone(this.ptr);
+               Result_boolLightningErrorZ ret_hu_conv = Result_boolLightningErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 461cbad7236d198187314e6afb05181bbe5fdf4b..e104977440b5d6c884e9078a2140fcefe58c9046 100644 (file)
@@ -24,9 +24,6 @@ public class Result_boolPeerHandleErrorZ extends CommonBase {
                        super(_dummy, ptr);
                        this.res = bindings.LDKCResult_boolPeerHandleErrorZ_get_ok(ptr);
                }
-               public Result_boolPeerHandleErrorZ_OK(boolean res) {
-                       this(null, bindings.CResult_boolPeerHandleErrorZ_ok(res));
-               }
        }
 
        public static final class Result_boolPeerHandleErrorZ_Err extends Result_boolPeerHandleErrorZ {
@@ -38,9 +35,35 @@ public class Result_boolPeerHandleErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_boolPeerHandleErrorZ_Err(PeerHandleError err) {
-                       this(null, bindings.CResult_boolPeerHandleErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       /**
+        * Creates a new CResult_boolPeerHandleErrorZ in the success state.
+        */
+       public static Result_boolPeerHandleErrorZ constructor_ok(boolean o) {
+               long ret = bindings.CResult_boolPeerHandleErrorZ_ok(o);
+               Result_boolPeerHandleErrorZ ret_hu_conv = Result_boolPeerHandleErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_boolPeerHandleErrorZ in the error state.
+        */
+       public static Result_boolPeerHandleErrorZ constructor_err(PeerHandleError e) {
+               long 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;
+       }
+
+       /**
+        * Creates a new CResult_boolPeerHandleErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_boolPeerHandleErrorZ clone() {
+               long ret = bindings.CResult_boolPeerHandleErrorZ_clone(this.ptr);
+               Result_boolPeerHandleErrorZ ret_hu_conv = Result_boolPeerHandleErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index d2bc2616a08456a2426ea66498cff0bcb26d4070..02c9758c9701c36b8775f0974b9828d4aa2ec6fb 100644 (file)
@@ -81,6 +81,51 @@ public class RouteHint extends CommonBase {
                bindings.RouteHint_set_cltv_expiry_delta(this.ptr, val);
        }
 
+       /**
+        * The minimum value, in msat, which must be relayed to the next hop.
+        */
+       public Option_u64Z get_htlc_minimum_msat() {
+               long ret = bindings.RouteHint_get_htlc_minimum_msat(this.ptr);
+               Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       /**
+        * The minimum value, in msat, which must be relayed to the next hop.
+        */
+       public void set_htlc_minimum_msat(Option_u64Z val) {
+               bindings.RouteHint_set_htlc_minimum_msat(this.ptr, val.ptr);
+       }
+
+       /**
+        * The maximum value in msat available for routing with a single HTLC.
+        */
+       public Option_u64Z get_htlc_maximum_msat() {
+               long ret = bindings.RouteHint_get_htlc_maximum_msat(this.ptr);
+               Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       /**
+        * The maximum value in msat available for routing with a single HTLC.
+        */
+       public void set_htlc_maximum_msat(Option_u64Z val) {
+               bindings.RouteHint_set_htlc_maximum_msat(this.ptr, val.ptr);
+       }
+
+       /**
+        * Constructs a new RouteHint given each field
+        */
+       public static RouteHint constructor_new(byte[] src_node_id_arg, long short_channel_id_arg, RoutingFees fees_arg, short cltv_expiry_delta_arg, Option_u64Z htlc_minimum_msat_arg, Option_u64Z htlc_maximum_msat_arg) {
+               long ret = bindings.RouteHint_new(src_node_id_arg, short_channel_id_arg, fees_arg == null ? 0 : fees_arg.ptr & ~1, cltv_expiry_delta_arg, htlc_minimum_msat_arg.ptr, htlc_maximum_msat_arg.ptr);
+               RouteHint ret_hu_conv = new RouteHint(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               ret_hu_conv.ptrs_to.add(fees_arg);
+               return ret_hu_conv;
+       }
+
        /**
         * Creates a copy of the RouteHint
         */
index a02d2379a92aeb767d1c6cf00f43771a5ad706ae..5d6c5ae8519105bedb7562d456e98cba8649f0ee 100644 (file)
@@ -50,13 +50,50 @@ public class SpendableOutputDescriptor extends CommonBase {
                }
        }
        public final static class DelayedPaymentOutput extends SpendableOutputDescriptor {
+               public final DelayedPaymentOutputDescriptor delayed_payment_output;
                private DelayedPaymentOutput(long ptr, bindings.LDKSpendableOutputDescriptor.DelayedPaymentOutput obj) {
                        super(null, ptr);
+                       long delayed_payment_output = obj.delayed_payment_output;
+                       DelayedPaymentOutputDescriptor delayed_payment_output_hu_conv = new DelayedPaymentOutputDescriptor(null, delayed_payment_output);
+                       delayed_payment_output_hu_conv.ptrs_to.add(this);
+                       this.delayed_payment_output = delayed_payment_output_hu_conv;
                }
        }
        public final static class StaticPaymentOutput extends SpendableOutputDescriptor {
+               public final StaticPaymentOutputDescriptor static_payment_output;
                private StaticPaymentOutput(long ptr, bindings.LDKSpendableOutputDescriptor.StaticPaymentOutput obj) {
                        super(null, ptr);
+                       long static_payment_output = obj.static_payment_output;
+                       StaticPaymentOutputDescriptor static_payment_output_hu_conv = new StaticPaymentOutputDescriptor(null, static_payment_output);
+                       static_payment_output_hu_conv.ptrs_to.add(this);
+                       this.static_payment_output = static_payment_output_hu_conv;
                }
        }
+       /**
+        * Creates a copy of the SpendableOutputDescriptor
+        */
+       public SpendableOutputDescriptor clone() {
+               long ret = bindings.SpendableOutputDescriptor_clone(this.ptr);
+               SpendableOutputDescriptor ret_hu_conv = SpendableOutputDescriptor.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Serialize the SpendableOutputDescriptor object into a byte array which can be read by SpendableOutputDescriptor_read
+        */
+       public byte[] write() {
+               byte[] ret = bindings.SpendableOutputDescriptor_write(this.ptr);
+               return ret;
+       }
+
+       /**
+        * Read a SpendableOutputDescriptor from a byte array, created by SpendableOutputDescriptor_write
+        */
+       public static Result_SpendableOutputDescriptorDecodeErrorZ constructor_read(byte[] ser) {
+               long ret = bindings.SpendableOutputDescriptor_read(ser);
+               Result_SpendableOutputDescriptorDecodeErrorZ ret_hu_conv = Result_SpendableOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
diff --git a/src/main/java/org/ldk/structs/WatchedOutput.java b/src/main/java/org/ldk/structs/WatchedOutput.java
new file mode 100644 (file)
index 0000000..e8c4f86
--- /dev/null
@@ -0,0 +1,90 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+
+/**
+ * A transaction output watched by a [`ChannelMonitor`] for spends on-chain.
+ * 
+ * Used to convey to a [`Filter`] such an output with a given spending condition. Any transaction
+ * spending the output must be given to [`ChannelMonitor::block_connected`] either directly or via
+ * the return value of [`Filter::register_output`].
+ * 
+ * If `block_hash` is `Some`, this indicates the output was created in the corresponding block and
+ * may have been spent there. See [`Filter::register_output`] for details.
+ * 
+ * [`ChannelMonitor`]: channelmonitor::ChannelMonitor
+ * [`ChannelMonitor::block_connected`]: channelmonitor::ChannelMonitor::block_connected
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class WatchedOutput extends CommonBase {
+       WatchedOutput(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.WatchedOutput_free(ptr); }
+       }
+
+       /**
+        * First block where the transaction output may have been spent.
+        */
+       public byte[] get_block_hash() {
+               byte[] ret = bindings.WatchedOutput_get_block_hash(this.ptr);
+               return ret;
+       }
+
+       /**
+        * First block where the transaction output may have been spent.
+        */
+       public void set_block_hash(byte[] val) {
+               bindings.WatchedOutput_set_block_hash(this.ptr, val);
+       }
+
+       /**
+        * Outpoint identifying the transaction output.
+        */
+       public OutPoint get_outpoint() {
+               long ret = bindings.WatchedOutput_get_outpoint(this.ptr);
+               OutPoint ret_hu_conv = new OutPoint(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Outpoint identifying the transaction output.
+        */
+       public void set_outpoint(OutPoint val) {
+               bindings.WatchedOutput_set_outpoint(this.ptr, val == null ? 0 : val.ptr & ~1);
+               this.ptrs_to.add(val);
+       }
+
+       /**
+        * Spending condition of the transaction output.
+        */
+       public byte[] get_script_pubkey() {
+               byte[] ret = bindings.WatchedOutput_get_script_pubkey(this.ptr);
+               return ret;
+       }
+
+       /**
+        * Spending condition of the transaction output.
+        */
+       public void set_script_pubkey(byte[] val) {
+               bindings.WatchedOutput_set_script_pubkey(this.ptr, val);
+       }
+
+       /**
+        * Constructs a new WatchedOutput given each field
+        */
+       public static WatchedOutput constructor_new(byte[] block_hash_arg, OutPoint outpoint_arg, byte[] script_pubkey_arg) {
+               long ret = bindings.WatchedOutput_new(block_hash_arg, outpoint_arg == null ? 0 : outpoint_arg.ptr & ~1, script_pubkey_arg);
+               WatchedOutput ret_hu_conv = new WatchedOutput(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               ret_hu_conv.ptrs_to.add(outpoint_arg);
+               return ret_hu_conv;
+       }
+
+}
index 0e201da0621e2e9aa1fcab949c48e52ae37af930..38f4fa544d4d6f625474172766ecb051adbcb02e 100644 (file)
@@ -487,6 +487,34 @@ JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxCreationKeysEr
        jclass err_conv = LDKSecp256k1Error_to_java(env, (*val->contents.err));
        return err_conv;
 }
+static jclass LDKCOption_u32Z_Some_class = NULL;
+static jmethodID LDKCOption_u32Z_Some_meth = NULL;
+static jclass LDKCOption_u32Z_None_class = NULL;
+static jmethodID LDKCOption_u32Z_None_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1u32Z_init (JNIEnv *env, jclass clz) {
+       LDKCOption_u32Z_Some_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKCOption_u32Z$Some;"));
+       CHECK(LDKCOption_u32Z_Some_class != NULL);
+       LDKCOption_u32Z_Some_meth = (*env)->GetMethodID(env, LDKCOption_u32Z_Some_class, "<init>", "(I)V");
+       CHECK(LDKCOption_u32Z_Some_meth != NULL);
+       LDKCOption_u32Z_None_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKCOption_u32Z$None;"));
+       CHECK(LDKCOption_u32Z_None_class != NULL);
+       LDKCOption_u32Z_None_meth = (*env)->GetMethodID(env, LDKCOption_u32Z_None_class, "<init>", "()V");
+       CHECK(LDKCOption_u32Z_None_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1u32Z_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKCOption_u32Z *obj = (LDKCOption_u32Z*)(ptr & ~1);
+       switch(obj->tag) {
+               case LDKCOption_u32Z_Some: {
+                       return (*env)->NewObject(env, LDKCOption_u32Z_Some_class, LDKCOption_u32Z_Some_meth, obj->some);
+               }
+               case LDKCOption_u32Z_None: {
+                       return (*env)->NewObject(env, LDKCOption_u32Z_None_class, LDKCOption_u32Z_None_meth);
+               }
+               default: abort();
+       }
+}
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1HTLCOutputInCommitmentDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
        return ((LDKCResult_HTLCOutputInCommitmentDecodeErrorZ*)arg)->result_ok;
 }
@@ -675,7 +703,7 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKErrorAction_init (JNIE
        CHECK(LDKErrorAction_SendErrorMessage_meth != NULL);
 }
 JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKErrorAction_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKErrorAction *obj = (LDKErrorAction*)ptr;
+       LDKErrorAction *obj = (LDKErrorAction*)(ptr & ~1);
        switch(obj->tag) {
                case LDKErrorAction_DisconnectPeer: {
                        LDKErrorMessage msg_var = obj->disconnect_peer.msg;
@@ -721,7 +749,7 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKHTLCFailChannelUpdate_
        CHECK(LDKHTLCFailChannelUpdate_NodeFailure_meth != NULL);
 }
 JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKHTLCFailChannelUpdate_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKHTLCFailChannelUpdate *obj = (LDKHTLCFailChannelUpdate*)ptr;
+       LDKHTLCFailChannelUpdate *obj = (LDKHTLCFailChannelUpdate*)(ptr & ~1);
        switch(obj->tag) {
                case LDKHTLCFailChannelUpdate_ChannelUpdateMessage: {
                        LDKChannelUpdate msg_var = obj->channel_update_message.msg;
@@ -877,7 +905,7 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKMessageSendEvent_init
        CHECK(LDKMessageSendEvent_SendReplyChannelRange_meth != NULL);
 }
 JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKMessageSendEvent_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKMessageSendEvent *obj = (LDKMessageSendEvent*)ptr;
+       LDKMessageSendEvent *obj = (LDKMessageSendEvent*)(ptr & ~1);
        switch(obj->tag) {
                case LDKMessageSendEvent_SendAcceptChannel: {
                        int8_tArray node_id_arr = (*env)->NewByteArray(env, 33);
@@ -1356,6 +1384,34 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelConfigDe
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
+static jclass LDKCOption_u64Z_Some_class = NULL;
+static jmethodID LDKCOption_u64Z_Some_meth = NULL;
+static jclass LDKCOption_u64Z_None_class = NULL;
+static jmethodID LDKCOption_u64Z_None_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1u64Z_init (JNIEnv *env, jclass clz) {
+       LDKCOption_u64Z_Some_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKCOption_u64Z$Some;"));
+       CHECK(LDKCOption_u64Z_Some_class != NULL);
+       LDKCOption_u64Z_Some_meth = (*env)->GetMethodID(env, LDKCOption_u64Z_Some_class, "<init>", "(J)V");
+       CHECK(LDKCOption_u64Z_Some_meth != NULL);
+       LDKCOption_u64Z_None_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKCOption_u64Z$None;"));
+       CHECK(LDKCOption_u64Z_None_class != NULL);
+       LDKCOption_u64Z_None_meth = (*env)->GetMethodID(env, LDKCOption_u64Z_None_class, "<init>", "()V");
+       CHECK(LDKCOption_u64Z_None_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1u64Z_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKCOption_u64Z *obj = (LDKCOption_u64Z*)(ptr & ~1);
+       switch(obj->tag) {
+               case LDKCOption_u64Z_Some: {
+                       return (*env)->NewObject(env, LDKCOption_u64Z_Some_class, LDKCOption_u64Z_Some_meth, obj->some);
+               }
+               case LDKCOption_u64Z_None: {
+                       return (*env)->NewObject(env, LDKCOption_u64Z_None_class, LDKCOption_u64Z_None_meth);
+               }
+               default: abort();
+       }
+}
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1DirectionalChannelInfoDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
        return ((LDKCResult_DirectionalChannelInfoDecodeErrorZ*)arg)->result_ok;
 }
@@ -1450,7 +1506,7 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKNetAddress_init (JNIEn
        CHECK(LDKNetAddress_OnionV3_meth != NULL);
 }
 JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKNetAddress_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKNetAddress *obj = (LDKNetAddress*)ptr;
+       LDKNetAddress *obj = (LDKNetAddress*)(ptr & ~1);
        switch(obj->tag) {
                case LDKNetAddress_IPv4: {
                        int8_tArray addr_arr = (*env)->NewByteArray(env, 4);
@@ -1645,22 +1701,30 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKMonitorEvent_init (JNI
        LDKMonitorEvent_HTLCEvent_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKMonitorEvent$HTLCEvent;"));
        CHECK(LDKMonitorEvent_HTLCEvent_class != NULL);
-       LDKMonitorEvent_HTLCEvent_meth = (*env)->GetMethodID(env, LDKMonitorEvent_HTLCEvent_class, "<init>", "()V");
+       LDKMonitorEvent_HTLCEvent_meth = (*env)->GetMethodID(env, LDKMonitorEvent_HTLCEvent_class, "<init>", "(J)V");
        CHECK(LDKMonitorEvent_HTLCEvent_meth != NULL);
        LDKMonitorEvent_CommitmentTxBroadcasted_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKMonitorEvent$CommitmentTxBroadcasted;"));
        CHECK(LDKMonitorEvent_CommitmentTxBroadcasted_class != NULL);
-       LDKMonitorEvent_CommitmentTxBroadcasted_meth = (*env)->GetMethodID(env, LDKMonitorEvent_CommitmentTxBroadcasted_class, "<init>", "()V");
+       LDKMonitorEvent_CommitmentTxBroadcasted_meth = (*env)->GetMethodID(env, LDKMonitorEvent_CommitmentTxBroadcasted_class, "<init>", "(J)V");
        CHECK(LDKMonitorEvent_CommitmentTxBroadcasted_meth != NULL);
 }
 JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKMonitorEvent_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKMonitorEvent *obj = (LDKMonitorEvent*)ptr;
+       LDKMonitorEvent *obj = (LDKMonitorEvent*)(ptr & ~1);
        switch(obj->tag) {
                case LDKMonitorEvent_HTLCEvent: {
-                       return (*env)->NewObject(env, LDKMonitorEvent_HTLCEvent_class, LDKMonitorEvent_HTLCEvent_meth);
+                       LDKHTLCUpdate htlc_event_var = obj->htlc_event;
+                       CHECK((((long)htlc_event_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+                       CHECK((((long)&htlc_event_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+                       long htlc_event_ref = (long)htlc_event_var.inner & ~1;
+                       return (*env)->NewObject(env, LDKMonitorEvent_HTLCEvent_class, LDKMonitorEvent_HTLCEvent_meth, htlc_event_ref);
                }
                case LDKMonitorEvent_CommitmentTxBroadcasted: {
-                       return (*env)->NewObject(env, LDKMonitorEvent_CommitmentTxBroadcasted_class, LDKMonitorEvent_CommitmentTxBroadcasted_meth);
+                       LDKOutPoint commitment_tx_broadcasted_var = obj->commitment_tx_broadcasted;
+                       CHECK((((long)commitment_tx_broadcasted_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+                       CHECK((((long)&commitment_tx_broadcasted_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+                       long commitment_tx_broadcasted_ref = (long)commitment_tx_broadcasted_var.inner & ~1;
+                       return (*env)->NewObject(env, LDKMonitorEvent_CommitmentTxBroadcasted_class, LDKMonitorEvent_CommitmentTxBroadcasted_meth, commitment_tx_broadcasted_ref);
                }
                default: abort();
        }
@@ -1705,16 +1769,16 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKSpendableOutputDescrip
        LDKSpendableOutputDescriptor_DelayedPaymentOutput_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKSpendableOutputDescriptor$DelayedPaymentOutput;"));
        CHECK(LDKSpendableOutputDescriptor_DelayedPaymentOutput_class != NULL);
-       LDKSpendableOutputDescriptor_DelayedPaymentOutput_meth = (*env)->GetMethodID(env, LDKSpendableOutputDescriptor_DelayedPaymentOutput_class, "<init>", "()V");
+       LDKSpendableOutputDescriptor_DelayedPaymentOutput_meth = (*env)->GetMethodID(env, LDKSpendableOutputDescriptor_DelayedPaymentOutput_class, "<init>", "(J)V");
        CHECK(LDKSpendableOutputDescriptor_DelayedPaymentOutput_meth != NULL);
        LDKSpendableOutputDescriptor_StaticPaymentOutput_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKSpendableOutputDescriptor$StaticPaymentOutput;"));
        CHECK(LDKSpendableOutputDescriptor_StaticPaymentOutput_class != NULL);
-       LDKSpendableOutputDescriptor_StaticPaymentOutput_meth = (*env)->GetMethodID(env, LDKSpendableOutputDescriptor_StaticPaymentOutput_class, "<init>", "()V");
+       LDKSpendableOutputDescriptor_StaticPaymentOutput_meth = (*env)->GetMethodID(env, LDKSpendableOutputDescriptor_StaticPaymentOutput_class, "<init>", "(J)V");
        CHECK(LDKSpendableOutputDescriptor_StaticPaymentOutput_meth != NULL);
 }
 JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKSpendableOutputDescriptor_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKSpendableOutputDescriptor *obj = (LDKSpendableOutputDescriptor*)ptr;
+       LDKSpendableOutputDescriptor *obj = (LDKSpendableOutputDescriptor*)(ptr & ~1);
        switch(obj->tag) {
                case LDKSpendableOutputDescriptor_StaticOutput: {
                        LDKOutPoint outpoint_var = obj->static_output.outpoint;
@@ -1725,10 +1789,18 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKSpendableOutputDescripto
                        return (*env)->NewObject(env, LDKSpendableOutputDescriptor_StaticOutput_class, LDKSpendableOutputDescriptor_StaticOutput_meth, outpoint_ref, (long)output_ref);
                }
                case LDKSpendableOutputDescriptor_DelayedPaymentOutput: {
-                       return (*env)->NewObject(env, LDKSpendableOutputDescriptor_DelayedPaymentOutput_class, LDKSpendableOutputDescriptor_DelayedPaymentOutput_meth);
+                       LDKDelayedPaymentOutputDescriptor delayed_payment_output_var = obj->delayed_payment_output;
+                       CHECK((((long)delayed_payment_output_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+                       CHECK((((long)&delayed_payment_output_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+                       long delayed_payment_output_ref = (long)delayed_payment_output_var.inner & ~1;
+                       return (*env)->NewObject(env, LDKSpendableOutputDescriptor_DelayedPaymentOutput_class, LDKSpendableOutputDescriptor_DelayedPaymentOutput_meth, delayed_payment_output_ref);
                }
                case LDKSpendableOutputDescriptor_StaticPaymentOutput: {
-                       return (*env)->NewObject(env, LDKSpendableOutputDescriptor_StaticPaymentOutput_class, LDKSpendableOutputDescriptor_StaticPaymentOutput_meth);
+                       LDKStaticPaymentOutputDescriptor static_payment_output_var = obj->static_payment_output;
+                       CHECK((((long)static_payment_output_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+                       CHECK((((long)&static_payment_output_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+                       long static_payment_output_ref = (long)static_payment_output_var.inner & ~1;
+                       return (*env)->NewObject(env, LDKSpendableOutputDescriptor_StaticPaymentOutput_class, LDKSpendableOutputDescriptor_StaticPaymentOutput_meth, static_payment_output_ref);
                }
                default: abort();
        }
@@ -1810,7 +1882,7 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKEvent_init (JNIEnv *en
        CHECK(LDKEvent_SpendableOutputs_meth != NULL);
 }
 JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKEvent_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKEvent *obj = (LDKEvent*)ptr;
+       LDKEvent *obj = (LDKEvent*)(ptr & ~1);
        switch(obj->tag) {
                case LDKEvent_FundingGenerationReady: {
                        int8_tArray temporary_channel_id_arr = (*env)->NewByteArray(env, 32);
@@ -2741,6 +2813,35 @@ JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxOutAccessError
        jclass err_conv = LDKAccessError_to_java(env, (*val->contents.err));
        return err_conv;
 }
+static jclass LDKCOption_C2Tuple_usizeTransactionZZ_Some_class = NULL;
+static jmethodID LDKCOption_C2Tuple_usizeTransactionZZ_Some_meth = NULL;
+static jclass LDKCOption_C2Tuple_usizeTransactionZZ_None_class = NULL;
+static jmethodID LDKCOption_C2Tuple_usizeTransactionZZ_None_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1C2Tuple_1usizeTransactionZZ_init (JNIEnv *env, jclass clz) {
+       LDKCOption_C2Tuple_usizeTransactionZZ_Some_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKCOption_C2Tuple_usizeTransactionZZ$Some;"));
+       CHECK(LDKCOption_C2Tuple_usizeTransactionZZ_Some_class != NULL);
+       LDKCOption_C2Tuple_usizeTransactionZZ_Some_meth = (*env)->GetMethodID(env, LDKCOption_C2Tuple_usizeTransactionZZ_Some_class, "<init>", "(J)V");
+       CHECK(LDKCOption_C2Tuple_usizeTransactionZZ_Some_meth != NULL);
+       LDKCOption_C2Tuple_usizeTransactionZZ_None_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKCOption_C2Tuple_usizeTransactionZZ$None;"));
+       CHECK(LDKCOption_C2Tuple_usizeTransactionZZ_None_class != NULL);
+       LDKCOption_C2Tuple_usizeTransactionZZ_None_meth = (*env)->GetMethodID(env, LDKCOption_C2Tuple_usizeTransactionZZ_None_class, "<init>", "()V");
+       CHECK(LDKCOption_C2Tuple_usizeTransactionZZ_None_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1C2Tuple_1usizeTransactionZZ_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKCOption_C2Tuple_usizeTransactionZZ *obj = (LDKCOption_C2Tuple_usizeTransactionZZ*)(ptr & ~1);
+       switch(obj->tag) {
+               case LDKCOption_C2Tuple_usizeTransactionZZ_Some: {
+                       long some_ref = (long)(&obj->some) | 1;
+                       return (*env)->NewObject(env, LDKCOption_C2Tuple_usizeTransactionZZ_Some_class, LDKCOption_C2Tuple_usizeTransactionZZ_Some_meth, some_ref);
+               }
+               case LDKCOption_C2Tuple_usizeTransactionZZ_None: {
+                       return (*env)->NewObject(env, LDKCOption_C2Tuple_usizeTransactionZZ_None_class, LDKCOption_C2Tuple_usizeTransactionZZ_None_meth);
+               }
+               default: abort();
+       }
+}
 static jclass LDKAPIError_APIMisuseError_class = NULL;
 static jmethodID LDKAPIError_APIMisuseError_meth = NULL;
 static jclass LDKAPIError_FeeRateTooHigh_class = NULL;
@@ -2779,7 +2880,7 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKAPIError_init (JNIEnv
        CHECK(LDKAPIError_MonitorUpdateFailed_meth != NULL);
 }
 JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKAPIError_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKAPIError *obj = (LDKAPIError*)ptr;
+       LDKAPIError *obj = (LDKAPIError*)(ptr & ~1);
        switch(obj->tag) {
                case LDKAPIError_APIMisuseError: {
                        LDKCVec_u8Z err_var = obj->api_misuse_error.err;
@@ -2913,38 +3014,67 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKPaymentSendFailure_ini
        LDKPaymentSendFailure_ParameterError_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKPaymentSendFailure$ParameterError;"));
        CHECK(LDKPaymentSendFailure_ParameterError_class != NULL);
-       LDKPaymentSendFailure_ParameterError_meth = (*env)->GetMethodID(env, LDKPaymentSendFailure_ParameterError_class, "<init>", "()V");
+       LDKPaymentSendFailure_ParameterError_meth = (*env)->GetMethodID(env, LDKPaymentSendFailure_ParameterError_class, "<init>", "(J)V");
        CHECK(LDKPaymentSendFailure_ParameterError_meth != NULL);
        LDKPaymentSendFailure_PathParameterError_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKPaymentSendFailure$PathParameterError;"));
        CHECK(LDKPaymentSendFailure_PathParameterError_class != NULL);
-       LDKPaymentSendFailure_PathParameterError_meth = (*env)->GetMethodID(env, LDKPaymentSendFailure_PathParameterError_class, "<init>", "()V");
+       LDKPaymentSendFailure_PathParameterError_meth = (*env)->GetMethodID(env, LDKPaymentSendFailure_PathParameterError_class, "<init>", "([J)V");
        CHECK(LDKPaymentSendFailure_PathParameterError_meth != NULL);
        LDKPaymentSendFailure_AllFailedRetrySafe_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKPaymentSendFailure$AllFailedRetrySafe;"));
        CHECK(LDKPaymentSendFailure_AllFailedRetrySafe_class != NULL);
-       LDKPaymentSendFailure_AllFailedRetrySafe_meth = (*env)->GetMethodID(env, LDKPaymentSendFailure_AllFailedRetrySafe_class, "<init>", "()V");
+       LDKPaymentSendFailure_AllFailedRetrySafe_meth = (*env)->GetMethodID(env, LDKPaymentSendFailure_AllFailedRetrySafe_class, "<init>", "([J)V");
        CHECK(LDKPaymentSendFailure_AllFailedRetrySafe_meth != NULL);
        LDKPaymentSendFailure_PartialFailure_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKPaymentSendFailure$PartialFailure;"));
        CHECK(LDKPaymentSendFailure_PartialFailure_class != NULL);
-       LDKPaymentSendFailure_PartialFailure_meth = (*env)->GetMethodID(env, LDKPaymentSendFailure_PartialFailure_class, "<init>", "()V");
+       LDKPaymentSendFailure_PartialFailure_meth = (*env)->GetMethodID(env, LDKPaymentSendFailure_PartialFailure_class, "<init>", "([J)V");
        CHECK(LDKPaymentSendFailure_PartialFailure_meth != NULL);
 }
 JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKPaymentSendFailure_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKPaymentSendFailure *obj = (LDKPaymentSendFailure*)ptr;
+       LDKPaymentSendFailure *obj = (LDKPaymentSendFailure*)(ptr & ~1);
        switch(obj->tag) {
                case LDKPaymentSendFailure_ParameterError: {
-                       return (*env)->NewObject(env, LDKPaymentSendFailure_ParameterError_class, LDKPaymentSendFailure_ParameterError_meth);
+                       long parameter_error_ref = ((long)&obj->parameter_error) | 1;
+                       return (*env)->NewObject(env, LDKPaymentSendFailure_ParameterError_class, LDKPaymentSendFailure_ParameterError_meth, parameter_error_ref);
                }
                case LDKPaymentSendFailure_PathParameterError: {
-                       return (*env)->NewObject(env, LDKPaymentSendFailure_PathParameterError_class, LDKPaymentSendFailure_PathParameterError_meth);
+                       LDKCVec_CResult_NoneAPIErrorZZ path_parameter_error_var = obj->path_parameter_error;
+                       int64_tArray path_parameter_error_arr = (*env)->NewLongArray(env, path_parameter_error_var.datalen);
+                       int64_t *path_parameter_error_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, path_parameter_error_arr, NULL);
+                       for (size_t w = 0; w < path_parameter_error_var.datalen; w++) {
+                               LDKCResult_NoneAPIErrorZ* path_parameter_error_conv_22_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
+                               *path_parameter_error_conv_22_conv = path_parameter_error_var.data[w];
+                               *path_parameter_error_conv_22_conv = CResult_NoneAPIErrorZ_clone(path_parameter_error_conv_22_conv);
+                               path_parameter_error_arr_ptr[w] = (long)path_parameter_error_conv_22_conv;
+                       }
+                       (*env)->ReleasePrimitiveArrayCritical(env, path_parameter_error_arr, path_parameter_error_arr_ptr, 0);
+                       return (*env)->NewObject(env, LDKPaymentSendFailure_PathParameterError_class, LDKPaymentSendFailure_PathParameterError_meth, path_parameter_error_arr);
                }
                case LDKPaymentSendFailure_AllFailedRetrySafe: {
-                       return (*env)->NewObject(env, LDKPaymentSendFailure_AllFailedRetrySafe_class, LDKPaymentSendFailure_AllFailedRetrySafe_meth);
+                       LDKCVec_APIErrorZ all_failed_retry_safe_var = obj->all_failed_retry_safe;
+                       int64_tArray all_failed_retry_safe_arr = (*env)->NewLongArray(env, all_failed_retry_safe_var.datalen);
+                       int64_t *all_failed_retry_safe_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, all_failed_retry_safe_arr, NULL);
+                       for (size_t k = 0; k < all_failed_retry_safe_var.datalen; k++) {
+                               long all_failed_retry_safe_conv_10_ref = ((long)&all_failed_retry_safe_var.data[k]) | 1;
+                               all_failed_retry_safe_arr_ptr[k] = all_failed_retry_safe_conv_10_ref;
+                       }
+                       (*env)->ReleasePrimitiveArrayCritical(env, all_failed_retry_safe_arr, all_failed_retry_safe_arr_ptr, 0);
+                       return (*env)->NewObject(env, LDKPaymentSendFailure_AllFailedRetrySafe_class, LDKPaymentSendFailure_AllFailedRetrySafe_meth, all_failed_retry_safe_arr);
                }
                case LDKPaymentSendFailure_PartialFailure: {
-                       return (*env)->NewObject(env, LDKPaymentSendFailure_PartialFailure_class, LDKPaymentSendFailure_PartialFailure_meth);
+                       LDKCVec_CResult_NoneAPIErrorZZ partial_failure_var = obj->partial_failure;
+                       int64_tArray partial_failure_arr = (*env)->NewLongArray(env, partial_failure_var.datalen);
+                       int64_t *partial_failure_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, partial_failure_arr, NULL);
+                       for (size_t w = 0; w < partial_failure_var.datalen; w++) {
+                               LDKCResult_NoneAPIErrorZ* partial_failure_conv_22_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
+                               *partial_failure_conv_22_conv = partial_failure_var.data[w];
+                               *partial_failure_conv_22_conv = CResult_NoneAPIErrorZ_clone(partial_failure_conv_22_conv);
+                               partial_failure_arr_ptr[w] = (long)partial_failure_conv_22_conv;
+                       }
+                       (*env)->ReleasePrimitiveArrayCritical(env, partial_failure_arr, partial_failure_arr_ptr, 0);
+                       return (*env)->NewObject(env, LDKPaymentSendFailure_PartialFailure_class, LDKPaymentSendFailure_PartialFailure_meth, partial_failure_arr);
                }
                default: abort();
        }
@@ -4928,24 +5058,23 @@ void register_tx_LDKFilter_jcall(const void* this_arg, const uint8_t (* txid)[32
        CHECK(obj != NULL);
        return (*env)->CallVoidMethod(env, obj, j_calls->register_tx_meth, txid_arr, script_pubkey_arr);
 }
-void register_output_LDKFilter_jcall(const void* this_arg, const LDKOutPoint * outpoint, LDKu8slice script_pubkey) {
+LDKCOption_C2Tuple_usizeTransactionZZ register_output_LDKFilter_jcall(const void* this_arg, LDKWatchedOutput output) {
        LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
        JNIEnv *env;
        DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       LDKOutPoint outpoint_var = *outpoint;
-       outpoint_var = OutPoint_clone(outpoint);
-       CHECK((((long)outpoint_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&outpoint_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long outpoint_ref = (long)outpoint_var.inner;
-       if (outpoint_var.is_owned) {
-               outpoint_ref |= 1;
+       LDKWatchedOutput output_var = output;
+       CHECK((((long)output_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&output_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long output_ref = (long)output_var.inner;
+       if (output_var.is_owned) {
+               output_ref |= 1;
        }
-       LDKu8slice script_pubkey_var = script_pubkey;
-       int8_tArray script_pubkey_arr = (*env)->NewByteArray(env, script_pubkey_var.datalen);
-       (*env)->SetByteArrayRegion(env, script_pubkey_arr, 0, script_pubkey_var.datalen, script_pubkey_var.data);
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->register_output_meth, outpoint_ref, script_pubkey_arr);
+       LDKCOption_C2Tuple_usizeTransactionZZ* ret = (LDKCOption_C2Tuple_usizeTransactionZZ*)(*env)->CallLongMethod(env, obj, j_calls->register_output_meth, output_ref);
+       LDKCOption_C2Tuple_usizeTransactionZZ ret_conv = *(LDKCOption_C2Tuple_usizeTransactionZZ*)(((uint64_t)ret) & ~1);
+       // Warning: we may need a move here but no clone is available for LDKCOption_C2Tuple_usizeTransactionZZ
+       return ret_conv;
 }
 static void* LDKFilter_JCalls_clone(const void* this_arg) {
        LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
@@ -4961,7 +5090,7 @@ static inline LDKFilter LDKFilter_init (JNIEnv *env, jclass clz, jobject o) {
        calls->o = (*env)->NewWeakGlobalRef(env, o);
        calls->register_tx_meth = (*env)->GetMethodID(env, c, "register_tx", "([B[B)V");
        CHECK(calls->register_tx_meth != NULL);
-       calls->register_output_meth = (*env)->GetMethodID(env, c, "register_output", "(J[B)V");
+       calls->register_output_meth = (*env)->GetMethodID(env, c, "register_output", "(J)J");
        CHECK(calls->register_output_meth != NULL);
 
        LDKFilter ret = {
@@ -4990,16 +5119,16 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Filter_1register_1tx(JNIEnv *e
        (*env)->ReleaseByteArrayElements(env, script_pubkey, (int8_t*)script_pubkey_ref.data, 0);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Filter_1register_1output(JNIEnv *env, jclass clz, int64_t this_arg, int64_t outpoint, int8_tArray script_pubkey) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Filter_1register_1output(JNIEnv *env, jclass clz, int64_t this_arg, int64_t output) {
        LDKFilter* this_arg_conv = (LDKFilter*)(((uint64_t)this_arg) & ~1);
-       LDKOutPoint outpoint_conv;
-       outpoint_conv.inner = (void*)(outpoint & (~1));
-       outpoint_conv.is_owned = false;
-       LDKu8slice script_pubkey_ref;
-       script_pubkey_ref.datalen = (*env)->GetArrayLength(env, script_pubkey);
-       script_pubkey_ref.data = (*env)->GetByteArrayElements (env, script_pubkey, NULL);
-       (this_arg_conv->register_output)(this_arg_conv->this_arg, &outpoint_conv, script_pubkey_ref);
-       (*env)->ReleaseByteArrayElements(env, script_pubkey, (int8_t*)script_pubkey_ref.data, 0);
+       LDKWatchedOutput output_conv;
+       output_conv.inner = (void*)(output & (~1));
+       output_conv.is_owned = (output & 1) || (output == 0);
+       // Warning: we need a move here but no clone is available for LDKWatchedOutput
+       LDKCOption_C2Tuple_usizeTransactionZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_usizeTransactionZZ), "LDKCOption_C2Tuple_usizeTransactionZZ");
+       *ret_copy = (this_arg_conv->register_output)(this_arg_conv->this_arg, output_conv);
+       long ret_ref = (long)ret_copy;
+       return ret_ref;
 }
 
 typedef struct LDKPersist_JCalls {
@@ -6578,6 +6707,35 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysErrorZ_
        CResult_TxCreationKeysErrorZ_free(_res_conv);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1u32Z_1some(JNIEnv *env, jclass clz, int32_t o) {
+       LDKCOption_u32Z *ret_copy = MALLOC(sizeof(LDKCOption_u32Z), "LDKCOption_u32Z");
+       *ret_copy = COption_u32Z_some(o);
+       long ret_ref = (long)ret_copy;
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1u32Z_1none(JNIEnv *env, jclass clz) {
+       LDKCOption_u32Z *ret_copy = MALLOC(sizeof(LDKCOption_u32Z), "LDKCOption_u32Z");
+       *ret_copy = COption_u32Z_none();
+       long ret_ref = (long)ret_copy;
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1u32Z_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCOption_u32Z _res_conv = *(LDKCOption_u32Z*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       COption_u32Z_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1u32Z_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCOption_u32Z* orig_conv = (LDKCOption_u32Z*)orig;
+       LDKCOption_u32Z *ret_copy = MALLOC(sizeof(LDKCOption_u32Z), "LDKCOption_u32Z");
+       *ret_copy = COption_u32Z_clone(orig_conv);
+       long ret_ref = (long)ret_copy;
+       return ret_ref;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCOutputInCommitmentDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
        LDKHTLCOutputInCommitment o_conv;
        o_conv.inner = (void*)(o & (~1));
@@ -7269,6 +7427,35 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelConfigDecod
        return (long)ret_conv;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1u64Z_1some(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
+       *ret_copy = COption_u64Z_some(o);
+       long ret_ref = (long)ret_copy;
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1u64Z_1none(JNIEnv *env, jclass clz) {
+       LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
+       *ret_copy = COption_u64Z_none();
+       long ret_ref = (long)ret_copy;
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1u64Z_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCOption_u64Z _res_conv = *(LDKCOption_u64Z*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       COption_u64Z_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1u64Z_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCOption_u64Z* orig_conv = (LDKCOption_u64Z*)orig;
+       LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
+       *ret_copy = COption_u64Z_clone(orig_conv);
+       long ret_ref = (long)ret_copy;
+       return ret_ref;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DirectionalChannelInfoDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
        LDKDirectionalChannelInfo o_conv;
        o_conv.inner = (void*)(o & (~1));
@@ -8055,6 +8242,29 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_
        return (long)ret_conv;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1C2Tuple_1usizeTransactionZZ_1some(JNIEnv *env, jclass clz, int64_t o) {
+       LDKC2Tuple_usizeTransactionZ o_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)o) & ~1);
+       FREE((void*)o);
+       LDKCOption_C2Tuple_usizeTransactionZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_usizeTransactionZZ), "LDKCOption_C2Tuple_usizeTransactionZZ");
+       *ret_copy = COption_C2Tuple_usizeTransactionZZ_some(o_conv);
+       long ret_ref = (long)ret_copy;
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1C2Tuple_1usizeTransactionZZ_1none(JNIEnv *env, jclass clz) {
+       LDKCOption_C2Tuple_usizeTransactionZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_usizeTransactionZZ), "LDKCOption_C2Tuple_usizeTransactionZZ");
+       *ret_copy = COption_C2Tuple_usizeTransactionZZ_none();
+       long ret_ref = (long)ret_copy;
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1C2Tuple_1usizeTransactionZZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCOption_C2Tuple_usizeTransactionZZ _res_conv = *(LDKCOption_C2Tuple_usizeTransactionZZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       COption_C2Tuple_usizeTransactionZZ_free(_res_conv);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneAPIErrorZ_1ok(JNIEnv *env, jclass clz) {
        LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
        *ret_conv = CResult_NoneAPIErrorZ_ok();
@@ -10504,6 +10714,100 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Filter_1free(JNIEnv *env, jcla
        Filter_free(this_ptr_conv);
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WatchedOutput_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKWatchedOutput this_obj_conv;
+       this_obj_conv.inner = (void*)(this_obj & (~1));
+       this_obj_conv.is_owned = (this_obj & 1) || (this_obj == 0);
+       WatchedOutput_free(this_obj_conv);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_WatchedOutput_1get_1block_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKWatchedOutput this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, WatchedOutput_get_block_hash(&this_ptr_conv).data);
+       return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WatchedOutput_1set_1block_1hash(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKWatchedOutput this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKThirtyTwoBytes val_ref;
+       CHECK((*env)->GetArrayLength(env, val) == 32);
+       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
+       WatchedOutput_set_block_hash(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_WatchedOutput_1get_1outpoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKWatchedOutput this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKOutPoint ret_var = WatchedOutput_get_outpoint(&this_ptr_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WatchedOutput_1set_1outpoint(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKWatchedOutput this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKOutPoint val_conv;
+       val_conv.inner = (void*)(val & (~1));
+       val_conv.is_owned = (val & 1) || (val == 0);
+       val_conv = OutPoint_clone(&val_conv);
+       WatchedOutput_set_outpoint(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_WatchedOutput_1get_1script_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKWatchedOutput this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKu8slice ret_var = WatchedOutput_get_script_pubkey(&this_ptr_conv);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+       return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WatchedOutput_1set_1script_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKWatchedOutput this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCVec_u8Z val_ref;
+       val_ref.datalen = (*env)->GetArrayLength(env, val);
+       val_ref.data = MALLOC(val_ref.datalen, "LDKCVec_u8Z Bytes");
+       (*env)->GetByteArrayRegion(env, val, 0, val_ref.datalen, val_ref.data);
+       WatchedOutput_set_script_pubkey(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_WatchedOutput_1new(JNIEnv *env, jclass clz, int8_tArray block_hash_arg, int64_t outpoint_arg, int8_tArray script_pubkey_arg) {
+       LDKThirtyTwoBytes block_hash_arg_ref;
+       CHECK((*env)->GetArrayLength(env, block_hash_arg) == 32);
+       (*env)->GetByteArrayRegion(env, block_hash_arg, 0, 32, block_hash_arg_ref.data);
+       LDKOutPoint outpoint_arg_conv;
+       outpoint_arg_conv.inner = (void*)(outpoint_arg & (~1));
+       outpoint_arg_conv.is_owned = (outpoint_arg & 1) || (outpoint_arg == 0);
+       outpoint_arg_conv = OutPoint_clone(&outpoint_arg_conv);
+       LDKCVec_u8Z script_pubkey_arg_ref;
+       script_pubkey_arg_ref.datalen = (*env)->GetArrayLength(env, script_pubkey_arg);
+       script_pubkey_arg_ref.data = MALLOC(script_pubkey_arg_ref.datalen, "LDKCVec_u8Z Bytes");
+       (*env)->GetByteArrayRegion(env, script_pubkey_arg, 0, script_pubkey_arg_ref.datalen, script_pubkey_arg_ref.data);
+       LDKWatchedOutput ret_var = WatchedOutput_new(block_hash_arg_ref, outpoint_arg_conv, script_pubkey_arg_ref);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BroadcasterInterface_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
        if ((this_ptr & 1) != 0) return;
        LDKBroadcasterInterface this_ptr_conv = *(LDKBroadcasterInterface*)(((uint64_t)this_ptr) & ~1);
@@ -11929,6 +12233,25 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1channel_1
        ChannelDetails_set_channel_id(&this_ptr_conv, val_ref);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1short_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKChannelDetails this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
+       *ret_copy = ChannelDetails_get_short_channel_id(&this_ptr_conv);
+       long ret_ref = (long)ret_copy;
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1short_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKChannelDetails this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCOption_u64Z val_conv = *(LDKCOption_u64Z*)(((uint64_t)val) & ~1);
+       FREE((void*)val);
+       ChannelDetails_set_short_channel_id(&this_ptr_conv, val_conv);
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1remote_1network_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKChannelDetails this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -17881,6 +18204,41 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1set_1p
        HTLCOutputInCommitment_set_payment_hash(&this_ptr_conv, val_ref);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1get_1transaction_1output_1index(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKHTLCOutputInCommitment this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCOption_u32Z *ret_copy = MALLOC(sizeof(LDKCOption_u32Z), "LDKCOption_u32Z");
+       *ret_copy = HTLCOutputInCommitment_get_transaction_output_index(&this_ptr_conv);
+       long ret_ref = (long)ret_copy;
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1set_1transaction_1output_1index(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKHTLCOutputInCommitment this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCOption_u32Z val_conv = *(LDKCOption_u32Z*)(((uint64_t)val) & ~1);
+       FREE((void*)val);
+       HTLCOutputInCommitment_set_transaction_output_index(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1new(JNIEnv *env, jclass clz, jboolean offered_arg, int64_t amount_msat_arg, int32_t cltv_expiry_arg, int8_tArray payment_hash_arg, int64_t transaction_output_index_arg) {
+       LDKThirtyTwoBytes payment_hash_arg_ref;
+       CHECK((*env)->GetArrayLength(env, payment_hash_arg) == 32);
+       (*env)->GetByteArrayRegion(env, payment_hash_arg, 0, 32, payment_hash_arg_ref.data);
+       LDKCOption_u32Z transaction_output_index_arg_conv = *(LDKCOption_u32Z*)(((uint64_t)transaction_output_index_arg) & ~1);
+       FREE((void*)transaction_output_index_arg);
+       LDKHTLCOutputInCommitment ret_var = HTLCOutputInCommitment_new(offered_arg, amount_msat_arg, cltv_expiry_arg, payment_hash_arg_ref, transaction_output_index_arg_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1clone(JNIEnv *env, jclass clz, int64_t orig) {
        LDKHTLCOutputInCommitment orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
@@ -19367,6 +19725,66 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1set_1cltv_1expiry_1
        RouteHint_set_cltv_expiry_delta(&this_ptr_conv, val);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RouteHint_1get_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKRouteHint this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
+       *ret_copy = RouteHint_get_htlc_minimum_msat(&this_ptr_conv);
+       long ret_ref = (long)ret_copy;
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1set_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKRouteHint this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCOption_u64Z val_conv = *(LDKCOption_u64Z*)(((uint64_t)val) & ~1);
+       FREE((void*)val);
+       RouteHint_set_htlc_minimum_msat(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RouteHint_1get_1htlc_1maximum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKRouteHint this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
+       *ret_copy = RouteHint_get_htlc_maximum_msat(&this_ptr_conv);
+       long ret_ref = (long)ret_copy;
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1set_1htlc_1maximum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKRouteHint this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCOption_u64Z val_conv = *(LDKCOption_u64Z*)(((uint64_t)val) & ~1);
+       FREE((void*)val);
+       RouteHint_set_htlc_maximum_msat(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RouteHint_1new(JNIEnv *env, jclass clz, int8_tArray src_node_id_arg, int64_t short_channel_id_arg, int64_t fees_arg, int16_t cltv_expiry_delta_arg, int64_t htlc_minimum_msat_arg, int64_t htlc_maximum_msat_arg) {
+       LDKPublicKey src_node_id_arg_ref;
+       CHECK((*env)->GetArrayLength(env, src_node_id_arg) == 33);
+       (*env)->GetByteArrayRegion(env, src_node_id_arg, 0, 33, src_node_id_arg_ref.compressed_form);
+       LDKRoutingFees fees_arg_conv;
+       fees_arg_conv.inner = (void*)(fees_arg & (~1));
+       fees_arg_conv.is_owned = (fees_arg & 1) || (fees_arg == 0);
+       fees_arg_conv = RoutingFees_clone(&fees_arg_conv);
+       LDKCOption_u64Z htlc_minimum_msat_arg_conv = *(LDKCOption_u64Z*)(((uint64_t)htlc_minimum_msat_arg) & ~1);
+       FREE((void*)htlc_minimum_msat_arg);
+       LDKCOption_u64Z htlc_maximum_msat_arg_conv = *(LDKCOption_u64Z*)(((uint64_t)htlc_maximum_msat_arg) & ~1);
+       FREE((void*)htlc_maximum_msat_arg);
+       LDKRouteHint ret_var = RouteHint_new(src_node_id_arg_ref, short_channel_id_arg, fees_arg_conv, cltv_expiry_delta_arg, htlc_minimum_msat_arg_conv, htlc_maximum_msat_arg_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RouteHint_1clone(JNIEnv *env, jclass clz, int64_t orig) {
        LDKRouteHint orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
@@ -19664,6 +20082,25 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1set_1h
        DirectionalChannelInfo_set_htlc_minimum_msat(&this_ptr_conv, val);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1get_1htlc_1maximum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKDirectionalChannelInfo this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
+       *ret_copy = DirectionalChannelInfo_get_htlc_maximum_msat(&this_ptr_conv);
+       long ret_ref = (long)ret_copy;
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1set_1htlc_1maximum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKDirectionalChannelInfo this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCOption_u64Z val_conv = *(LDKCOption_u64Z*)(((uint64_t)val) & ~1);
+       FREE((void*)val);
+       DirectionalChannelInfo_set_htlc_maximum_msat(&this_ptr_conv, val_conv);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1get_1fees(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKDirectionalChannelInfo this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -19714,6 +20151,27 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1set_1l
        DirectionalChannelInfo_set_last_update_message(&this_ptr_conv, val_conv);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1new(JNIEnv *env, jclass clz, int32_t last_update_arg, jboolean enabled_arg, int16_t cltv_expiry_delta_arg, int64_t htlc_minimum_msat_arg, int64_t htlc_maximum_msat_arg, int64_t fees_arg, int64_t last_update_message_arg) {
+       LDKCOption_u64Z htlc_maximum_msat_arg_conv = *(LDKCOption_u64Z*)(((uint64_t)htlc_maximum_msat_arg) & ~1);
+       FREE((void*)htlc_maximum_msat_arg);
+       LDKRoutingFees fees_arg_conv;
+       fees_arg_conv.inner = (void*)(fees_arg & (~1));
+       fees_arg_conv.is_owned = (fees_arg & 1) || (fees_arg == 0);
+       fees_arg_conv = RoutingFees_clone(&fees_arg_conv);
+       LDKChannelUpdate last_update_message_arg_conv;
+       last_update_message_arg_conv.inner = (void*)(last_update_message_arg & (~1));
+       last_update_message_arg_conv.is_owned = (last_update_message_arg & 1) || (last_update_message_arg == 0);
+       last_update_message_arg_conv = ChannelUpdate_clone(&last_update_message_arg_conv);
+       LDKDirectionalChannelInfo ret_var = DirectionalChannelInfo_new(last_update_arg, enabled_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg_conv, fees_arg_conv, last_update_message_arg_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1clone(JNIEnv *env, jclass clz, int64_t orig) {
        LDKDirectionalChannelInfo orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
@@ -19869,6 +20327,25 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1set_1two_1to_1one
        ChannelInfo_set_two_to_one(&this_ptr_conv, val_conv);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1get_1capacity_1sats(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKChannelInfo this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
+       *ret_copy = ChannelInfo_get_capacity_sats(&this_ptr_conv);
+       long ret_ref = (long)ret_copy;
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1set_1capacity_1sats(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKChannelInfo this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCOption_u64Z val_conv = *(LDKCOption_u64Z*)(((uint64_t)val) & ~1);
+       FREE((void*)val);
+       ChannelInfo_set_capacity_sats(&this_ptr_conv, val_conv);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1get_1announcement_1message(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKChannelInfo this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -19894,6 +20371,41 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1set_1announcement
        ChannelInfo_set_announcement_message(&this_ptr_conv, val_conv);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1new(JNIEnv *env, jclass clz, int64_t features_arg, int8_tArray node_one_arg, int64_t one_to_two_arg, int8_tArray node_two_arg, int64_t two_to_one_arg, int64_t capacity_sats_arg, int64_t announcement_message_arg) {
+       LDKChannelFeatures features_arg_conv;
+       features_arg_conv.inner = (void*)(features_arg & (~1));
+       features_arg_conv.is_owned = (features_arg & 1) || (features_arg == 0);
+       features_arg_conv = ChannelFeatures_clone(&features_arg_conv);
+       LDKPublicKey node_one_arg_ref;
+       CHECK((*env)->GetArrayLength(env, node_one_arg) == 33);
+       (*env)->GetByteArrayRegion(env, node_one_arg, 0, 33, node_one_arg_ref.compressed_form);
+       LDKDirectionalChannelInfo one_to_two_arg_conv;
+       one_to_two_arg_conv.inner = (void*)(one_to_two_arg & (~1));
+       one_to_two_arg_conv.is_owned = (one_to_two_arg & 1) || (one_to_two_arg == 0);
+       one_to_two_arg_conv = DirectionalChannelInfo_clone(&one_to_two_arg_conv);
+       LDKPublicKey node_two_arg_ref;
+       CHECK((*env)->GetArrayLength(env, node_two_arg) == 33);
+       (*env)->GetByteArrayRegion(env, node_two_arg, 0, 33, node_two_arg_ref.compressed_form);
+       LDKDirectionalChannelInfo two_to_one_arg_conv;
+       two_to_one_arg_conv.inner = (void*)(two_to_one_arg & (~1));
+       two_to_one_arg_conv.is_owned = (two_to_one_arg & 1) || (two_to_one_arg == 0);
+       two_to_one_arg_conv = DirectionalChannelInfo_clone(&two_to_one_arg_conv);
+       LDKCOption_u64Z capacity_sats_arg_conv = *(LDKCOption_u64Z*)(((uint64_t)capacity_sats_arg) & ~1);
+       FREE((void*)capacity_sats_arg);
+       LDKChannelAnnouncement announcement_message_arg_conv;
+       announcement_message_arg_conv.inner = (void*)(announcement_message_arg & (~1));
+       announcement_message_arg_conv.is_owned = (announcement_message_arg & 1) || (announcement_message_arg == 0);
+       announcement_message_arg_conv = ChannelAnnouncement_clone(&announcement_message_arg_conv);
+       LDKChannelInfo ret_var = ChannelInfo_new(features_arg_conv, node_one_arg_ref, one_to_two_arg_conv, node_two_arg_ref, two_to_one_arg_conv, capacity_sats_arg_conv, announcement_message_arg_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1clone(JNIEnv *env, jclass clz, int64_t orig) {
        LDKChannelInfo orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
index cb791791be6d4b2005ab2959d690d50347bdf1d9..7ae607bada4dac7346ea1fffcda5e3da19743db4 100644 (file)
@@ -239,6 +239,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxCreationKeysErr
 JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxCreationKeysErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCOption_u32Z_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKCOption_u32Z;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1u32Z_1ref_1from_1ptr
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_result_ok
@@ -751,6 +759,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelConfigDeco
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelConfigDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCOption_u64Z_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKCOption_u64Z;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1u64Z_1ref_1from_1ptr
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    LDKCResult_DirectionalChannelInfoDecodeErrorZ_result_ok
@@ -1519,6 +1535,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxOutAccessErrorZ
 JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxOutAccessErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCOption_C2Tuple_usizeTransactionZZ_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKCOption_C2Tuple_usizeTransactionZZ;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1C2Tuple_1usizeTransactionZZ_1ref_1from_1ptr
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    LDKAPIError_ref_from_ptr
@@ -2898,10 +2922,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Filter_1register_1tx
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Filter_register_output
- * Signature: (JJ[B)V
+ * Signature: (JJ)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Filter_1register_1output
-  (JNIEnv *, jclass, jlong, jlong, jbyteArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Filter_1register_1output
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -3383,6 +3407,38 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysErrorZ
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    COption_u32Z_some
+ * Signature: (I)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1u32Z_1some
+  (JNIEnv *, jclass, jint);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    COption_u32Z_none
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1u32Z_1none
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    COption_u32Z_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1u32Z_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    COption_u32Z_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1u32Z_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    CResult_HTLCOutputInCommitmentDecodeErrorZ_ok
@@ -3991,6 +4047,38 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelConfigDecodeEr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelConfigDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    COption_u64Z_some
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1u64Z_1some
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    COption_u64Z_none
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1u64Z_1none
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    COption_u64Z_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1u64Z_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    COption_u64Z_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1u64Z_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    CResult_DirectionalChannelInfoDecodeErrorZ_ok
@@ -4623,6 +4711,30 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_1fr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    COption_C2Tuple_usizeTransactionZZ_some
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1C2Tuple_1usizeTransactionZZ_1some
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    COption_C2Tuple_usizeTransactionZZ_none
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1C2Tuple_1usizeTransactionZZ_1none
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    COption_C2Tuple_usizeTransactionZZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1C2Tuple_1usizeTransactionZZ_1free
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    CResult_NoneAPIErrorZ_ok
@@ -6791,6 +6903,70 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Watch_1free
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Filter_1free
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    WatchedOutput_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WatchedOutput_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    WatchedOutput_get_block_hash
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_WatchedOutput_1get_1block_1hash
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    WatchedOutput_set_block_hash
+ * Signature: (J[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WatchedOutput_1set_1block_1hash
+  (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    WatchedOutput_get_outpoint
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_WatchedOutput_1get_1outpoint
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    WatchedOutput_set_outpoint
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WatchedOutput_1set_1outpoint
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    WatchedOutput_get_script_pubkey
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_WatchedOutput_1get_1script_1pubkey
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    WatchedOutput_set_script_pubkey
+ * Signature: (J[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WatchedOutput_1set_1script_1pubkey
+  (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    WatchedOutput_new
+ * Signature: ([BJ[B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_WatchedOutput_1new
+  (JNIEnv *, jclass, jbyteArray, jlong, jbyteArray);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    BroadcasterInterface_free
@@ -7791,6 +7967,22 @@ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1cha
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1channel_1id
   (JNIEnv *, jclass, jlong, jbyteArray);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelDetails_get_short_channel_id
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1short_1channel_1id
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelDetails_set_short_channel_id
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1short_1channel_1id
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelDetails_get_remote_network_id
@@ -12295,6 +12487,30 @@ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1set_1payment_1hash
   (JNIEnv *, jclass, jlong, jbyteArray);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    HTLCOutputInCommitment_get_transaction_output_index
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1get_1transaction_1output_1index
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    HTLCOutputInCommitment_set_transaction_output_index
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1set_1transaction_1output_1index
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    HTLCOutputInCommitment_new
+ * Signature: (ZJI[BJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1new
+  (JNIEnv *, jclass, jboolean, jlong, jint, jbyteArray, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    HTLCOutputInCommitment_clone
@@ -13319,6 +13535,46 @@ JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_RouteHint_1get_1cltv_1expiry
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1set_1cltv_1expiry_1delta
   (JNIEnv *, jclass, jlong, jshort);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RouteHint_get_htlc_minimum_msat
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHint_1get_1htlc_1minimum_1msat
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RouteHint_set_htlc_minimum_msat
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1set_1htlc_1minimum_1msat
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RouteHint_get_htlc_maximum_msat
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHint_1get_1htlc_1maximum_1msat
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RouteHint_set_htlc_maximum_msat
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1set_1htlc_1maximum_1msat
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RouteHint_new
+ * Signature: ([BJJSJJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHint_1new
+  (JNIEnv *, jclass, jbyteArray, jlong, jlong, jshort, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    RouteHint_clone
@@ -13495,6 +13751,22 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1get_1
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1set_1htlc_1minimum_1msat
   (JNIEnv *, jclass, jlong, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    DirectionalChannelInfo_get_htlc_maximum_msat
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1get_1htlc_1maximum_1msat
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    DirectionalChannelInfo_set_htlc_maximum_msat
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1set_1htlc_1maximum_1msat
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    DirectionalChannelInfo_get_fees
@@ -13527,6 +13799,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1get_1
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1set_1last_1update_1message
   (JNIEnv *, jclass, jlong, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    DirectionalChannelInfo_new
+ * Signature: (IZSJJJJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1new
+  (JNIEnv *, jclass, jint, jboolean, jshort, jlong, jlong, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    DirectionalChannelInfo_clone
@@ -13639,6 +13919,22 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1get_1two_1to_1on
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1set_1two_1to_1one
   (JNIEnv *, jclass, jlong, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelInfo_get_capacity_sats
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1get_1capacity_1sats
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelInfo_set_capacity_sats
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1set_1capacity_1sats
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelInfo_get_announcement_message
@@ -13655,6 +13951,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1get_1announcemen
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1set_1announcement_1message
   (JNIEnv *, jclass, jlong, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelInfo_new
+ * Signature: (J[BJ[BJJJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1new
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong, jbyteArray, jlong, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelInfo_clone
diff --git a/src/main/jni/org_ldk_impl_bindings_LDKCOption_C2Tuple_usizeTransactionZZ.h b/src/main/jni/org_ldk_impl_bindings_LDKCOption_C2Tuple_usizeTransactionZZ.h
new file mode 100644 (file)
index 0000000..53ef8b3
--- /dev/null
@@ -0,0 +1,21 @@
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_ldk_impl_bindings_LDKCOption_C2Tuple_usizeTransactionZZ */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKCOption_C2Tuple_usizeTransactionZZ
+#define _Included_org_ldk_impl_bindings_LDKCOption_C2Tuple_usizeTransactionZZ
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_ldk_impl_bindings_LDKCOption_C2Tuple_usizeTransactionZZ
+ * Method:    init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1C2Tuple_1usizeTransactionZZ_init
+  (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/main/jni/org_ldk_impl_bindings_LDKCOption_u32Z.h b/src/main/jni/org_ldk_impl_bindings_LDKCOption_u32Z.h
new file mode 100644 (file)
index 0000000..7962c41
--- /dev/null
@@ -0,0 +1,21 @@
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_ldk_impl_bindings_LDKCOption_u32Z */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKCOption_u32Z
+#define _Included_org_ldk_impl_bindings_LDKCOption_u32Z
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_ldk_impl_bindings_LDKCOption_u32Z
+ * Method:    init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1u32Z_init
+  (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/main/jni/org_ldk_impl_bindings_LDKCOption_u64Z.h b/src/main/jni/org_ldk_impl_bindings_LDKCOption_u64Z.h
new file mode 100644 (file)
index 0000000..cc60880
--- /dev/null
@@ -0,0 +1,21 @@
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_ldk_impl_bindings_LDKCOption_u64Z */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKCOption_u64Z
+#define _Included_org_ldk_impl_bindings_LDKCOption_u64Z
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_ldk_impl_bindings_LDKCOption_u64Z
+ * Method:    init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1u64Z_init
+  (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
index 91bffd579158860bd0439dc6f40bef5193c13cad..2c59d200839eb7eed918ab49e49d18093722d977 100644 (file)
@@ -279,6 +279,18 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_TxCreationKeysErr
        uint32_t err_conv = LDKSecp256k1Error_to_js((*val->contents.err));
        return err_conv;
 }
+uint32_t __attribute__((visibility("default"))) TS_LDKCOption_u32Z_ref_from_ptr(uint32_t ptr) {
+       LDKCOption_u32Z *obj = (LDKCOption_u32Z*)(ptr & ~1);
+       switch(obj->tag) {
+               case LDKCOption_u32Z_Some: {
+                       return 0 /* LDKCOption_u32Z - Some */; (void) obj->some;
+               }
+               case LDKCOption_u32Z_None: {
+                       return 0 /* LDKCOption_u32Z - None */;
+               }
+               default: abort();
+       }
+}
 jboolean  __attribute__((visibility("default"))) TS_LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_result_ok(uint32_t arg) {
        return ((LDKCResult_HTLCOutputInCommitmentDecodeErrorZ*)arg)->result_ok;
 }
@@ -444,7 +456,7 @@ void  __attribute__((visibility("default"))) TS_LDKCResult_CVec_SignatureZNoneZ_
        return *val->contents.err;
 }
 uint32_t __attribute__((visibility("default"))) TS_LDKErrorAction_ref_from_ptr(uint32_t ptr) {
-       LDKErrorAction *obj = (LDKErrorAction*)ptr;
+       LDKErrorAction *obj = (LDKErrorAction*)(ptr & ~1);
        switch(obj->tag) {
                case LDKErrorAction_DisconnectPeer: {
                        LDKErrorMessage msg_var = obj->disconnect_peer.msg;
@@ -467,7 +479,7 @@ uint32_t __attribute__((visibility("default"))) TS_LDKErrorAction_ref_from_ptr(u
        }
 }
 uint32_t __attribute__((visibility("default"))) TS_LDKHTLCFailChannelUpdate_ref_from_ptr(uint32_t ptr) {
-       LDKHTLCFailChannelUpdate *obj = (LDKHTLCFailChannelUpdate*)ptr;
+       LDKHTLCFailChannelUpdate *obj = (LDKHTLCFailChannelUpdate*)(ptr & ~1);
        switch(obj->tag) {
                case LDKHTLCFailChannelUpdate_ChannelUpdateMessage: {
                        LDKChannelUpdate msg_var = obj->channel_update_message.msg;
@@ -488,7 +500,7 @@ uint32_t __attribute__((visibility("default"))) TS_LDKHTLCFailChannelUpdate_ref_
        }
 }
 uint32_t __attribute__((visibility("default"))) TS_LDKMessageSendEvent_ref_from_ptr(uint32_t ptr) {
-       LDKMessageSendEvent *obj = (LDKMessageSendEvent*)ptr;
+       LDKMessageSendEvent *obj = (LDKMessageSendEvent*)(ptr & ~1);
        switch(obj->tag) {
                case LDKMessageSendEvent_SendAcceptChannel: {
                        int8_tArray node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
@@ -964,6 +976,18 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelConfigDeco
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
+uint32_t __attribute__((visibility("default"))) TS_LDKCOption_u64Z_ref_from_ptr(uint32_t ptr) {
+       LDKCOption_u64Z *obj = (LDKCOption_u64Z*)(ptr & ~1);
+       switch(obj->tag) {
+               case LDKCOption_u64Z_Some: {
+                       return 0 /* LDKCOption_u64Z - Some */; (void) obj->some;
+               }
+               case LDKCOption_u64Z_None: {
+                       return 0 /* LDKCOption_u64Z - None */;
+               }
+               default: abort();
+       }
+}
 jboolean  __attribute__((visibility("default"))) TS_LDKCResult_DirectionalChannelInfoDecodeErrorZ_result_ok(uint32_t arg) {
        return ((LDKCResult_DirectionalChannelInfoDecodeErrorZ*)arg)->result_ok;
 }
@@ -1028,7 +1052,7 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_RoutingFeesDecode
        return err_ref;
 }
 uint32_t __attribute__((visibility("default"))) TS_LDKNetAddress_ref_from_ptr(uint32_t ptr) {
-       LDKNetAddress *obj = (LDKNetAddress*)ptr;
+       LDKNetAddress *obj = (LDKNetAddress*)(ptr & ~1);
        switch(obj->tag) {
                case LDKNetAddress_IPv4: {
                        int8_tArray addr_arr = init_arr(4, sizeof(uint8_t), "Native int8_tArray Bytes");
@@ -1213,13 +1237,21 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NoneChannelMonito
        return err_conv;
 }
 uint32_t __attribute__((visibility("default"))) TS_LDKMonitorEvent_ref_from_ptr(uint32_t ptr) {
-       LDKMonitorEvent *obj = (LDKMonitorEvent*)ptr;
+       LDKMonitorEvent *obj = (LDKMonitorEvent*)(ptr & ~1);
        switch(obj->tag) {
                case LDKMonitorEvent_HTLCEvent: {
-                       return 0 /* LDKMonitorEvent - HTLCEvent */;
+                       LDKHTLCUpdate htlc_event_var = obj->htlc_event;
+                       CHECK((((long)htlc_event_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+                       CHECK((((long)&htlc_event_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+                       long htlc_event_ref = (long)htlc_event_var.inner & ~1;
+                       return 0 /* LDKMonitorEvent - HTLCEvent */; (void) htlc_event_ref;
                }
                case LDKMonitorEvent_CommitmentTxBroadcasted: {
-                       return 0 /* LDKMonitorEvent - CommitmentTxBroadcasted */;
+                       LDKOutPoint commitment_tx_broadcasted_var = obj->commitment_tx_broadcasted;
+                       CHECK((((long)commitment_tx_broadcasted_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+                       CHECK((((long)&commitment_tx_broadcasted_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+                       long commitment_tx_broadcasted_ref = (long)commitment_tx_broadcasted_var.inner & ~1;
+                       return 0 /* LDKMonitorEvent - CommitmentTxBroadcasted */; (void) commitment_tx_broadcasted_ref;
                }
                default: abort();
        }
@@ -1249,7 +1281,7 @@ static inline LDKCVec_MonitorEventZ CVec_MonitorEventZ_clone(const LDKCVec_Monit
        return ret;
 }
 uint32_t __attribute__((visibility("default"))) TS_LDKSpendableOutputDescriptor_ref_from_ptr(uint32_t ptr) {
-       LDKSpendableOutputDescriptor *obj = (LDKSpendableOutputDescriptor*)ptr;
+       LDKSpendableOutputDescriptor *obj = (LDKSpendableOutputDescriptor*)(ptr & ~1);
        switch(obj->tag) {
                case LDKSpendableOutputDescriptor_StaticOutput: {
                        LDKOutPoint outpoint_var = obj->static_output.outpoint;
@@ -1260,10 +1292,18 @@ uint32_t __attribute__((visibility("default"))) TS_LDKSpendableOutputDescriptor_
                        return 0 /* LDKSpendableOutputDescriptor - StaticOutput */; (void) outpoint_ref; (void) (long)output_ref;
                }
                case LDKSpendableOutputDescriptor_DelayedPaymentOutput: {
-                       return 0 /* LDKSpendableOutputDescriptor - DelayedPaymentOutput */;
+                       LDKDelayedPaymentOutputDescriptor delayed_payment_output_var = obj->delayed_payment_output;
+                       CHECK((((long)delayed_payment_output_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+                       CHECK((((long)&delayed_payment_output_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+                       long delayed_payment_output_ref = (long)delayed_payment_output_var.inner & ~1;
+                       return 0 /* LDKSpendableOutputDescriptor - DelayedPaymentOutput */; (void) delayed_payment_output_ref;
                }
                case LDKSpendableOutputDescriptor_StaticPaymentOutput: {
-                       return 0 /* LDKSpendableOutputDescriptor - StaticPaymentOutput */;
+                       LDKStaticPaymentOutputDescriptor static_payment_output_var = obj->static_payment_output;
+                       CHECK((((long)static_payment_output_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+                       CHECK((((long)&static_payment_output_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+                       long static_payment_output_ref = (long)static_payment_output_var.inner & ~1;
+                       return 0 /* LDKSpendableOutputDescriptor - StaticPaymentOutput */; (void) static_payment_output_ref;
                }
                default: abort();
        }
@@ -1293,7 +1333,7 @@ static inline LDKCVec_SpendableOutputDescriptorZ CVec_SpendableOutputDescriptorZ
        return ret;
 }
 uint32_t __attribute__((visibility("default"))) TS_LDKEvent_ref_from_ptr(uint32_t ptr) {
-       LDKEvent *obj = (LDKEvent*)ptr;
+       LDKEvent *obj = (LDKEvent*)(ptr & ~1);
        switch(obj->tag) {
                case LDKEvent_FundingGenerationReady: {
                        int8_tArray temporary_channel_id_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
@@ -2152,8 +2192,21 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_TxOutAccessErrorZ
        uint32_t err_conv = LDKAccessError_to_js((*val->contents.err));
        return err_conv;
 }
+uint32_t __attribute__((visibility("default"))) TS_LDKCOption_C2Tuple_usizeTransactionZZ_ref_from_ptr(uint32_t ptr) {
+       LDKCOption_C2Tuple_usizeTransactionZZ *obj = (LDKCOption_C2Tuple_usizeTransactionZZ*)(ptr & ~1);
+       switch(obj->tag) {
+               case LDKCOption_C2Tuple_usizeTransactionZZ_Some: {
+                       long some_ref = (long)(&obj->some) | 1;
+                       return 0 /* LDKCOption_C2Tuple_usizeTransactionZZ - Some */; (void) some_ref;
+               }
+               case LDKCOption_C2Tuple_usizeTransactionZZ_None: {
+                       return 0 /* LDKCOption_C2Tuple_usizeTransactionZZ - None */;
+               }
+               default: abort();
+       }
+}
 uint32_t __attribute__((visibility("default"))) TS_LDKAPIError_ref_from_ptr(uint32_t ptr) {
-       LDKAPIError *obj = (LDKAPIError*)ptr;
+       LDKAPIError *obj = (LDKAPIError*)(ptr & ~1);
        switch(obj->tag) {
                case LDKAPIError_APIMisuseError: {
                        LDKCVec_u8Z err_var = obj->api_misuse_error.err;
@@ -2273,19 +2326,45 @@ static inline LDKCVec_ChannelDetailsZ CVec_ChannelDetailsZ_clone(const LDKCVec_C
        return ret;
 }
 uint32_t __attribute__((visibility("default"))) TS_LDKPaymentSendFailure_ref_from_ptr(uint32_t ptr) {
-       LDKPaymentSendFailure *obj = (LDKPaymentSendFailure*)ptr;
+       LDKPaymentSendFailure *obj = (LDKPaymentSendFailure*)(ptr & ~1);
        switch(obj->tag) {
                case LDKPaymentSendFailure_ParameterError: {
-                       return 0 /* LDKPaymentSendFailure - ParameterError */;
+                       long parameter_error_ref = ((long)&obj->parameter_error) | 1;
+                       return 0 /* LDKPaymentSendFailure - ParameterError */; (void) parameter_error_ref;
                }
                case LDKPaymentSendFailure_PathParameterError: {
-                       return 0 /* LDKPaymentSendFailure - PathParameterError */;
+                       LDKCVec_CResult_NoneAPIErrorZZ path_parameter_error_var = obj->path_parameter_error;
+                       uint32_tArray path_parameter_error_arr = init_arr(path_parameter_error_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
+                       uint32_t *path_parameter_error_arr_ptr = (uint32_t*)(path_parameter_error_arr + 4);
+                       for (size_t w = 0; w < path_parameter_error_var.datalen; w++) {
+                               LDKCResult_NoneAPIErrorZ* path_parameter_error_conv_22_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
+                               *path_parameter_error_conv_22_conv = path_parameter_error_var.data[w];
+                               *path_parameter_error_conv_22_conv = CResult_NoneAPIErrorZ_clone(path_parameter_error_conv_22_conv);
+                               path_parameter_error_arr_ptr[w] = (long)path_parameter_error_conv_22_conv;
+                       }
+                       return 0 /* LDKPaymentSendFailure - PathParameterError */; (void) path_parameter_error_arr;
                }
                case LDKPaymentSendFailure_AllFailedRetrySafe: {
-                       return 0 /* LDKPaymentSendFailure - AllFailedRetrySafe */;
+                       LDKCVec_APIErrorZ all_failed_retry_safe_var = obj->all_failed_retry_safe;
+                       uint32_tArray all_failed_retry_safe_arr = init_arr(all_failed_retry_safe_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
+                       uint32_t *all_failed_retry_safe_arr_ptr = (uint32_t*)(all_failed_retry_safe_arr + 4);
+                       for (size_t k = 0; k < all_failed_retry_safe_var.datalen; k++) {
+                               long all_failed_retry_safe_conv_10_ref = ((long)&all_failed_retry_safe_var.data[k]) | 1;
+                               all_failed_retry_safe_arr_ptr[k] = all_failed_retry_safe_conv_10_ref;
+                       }
+                       return 0 /* LDKPaymentSendFailure - AllFailedRetrySafe */; (void) all_failed_retry_safe_arr;
                }
                case LDKPaymentSendFailure_PartialFailure: {
-                       return 0 /* LDKPaymentSendFailure - PartialFailure */;
+                       LDKCVec_CResult_NoneAPIErrorZZ partial_failure_var = obj->partial_failure;
+                       uint32_tArray partial_failure_arr = init_arr(partial_failure_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
+                       uint32_t *partial_failure_arr_ptr = (uint32_t*)(partial_failure_arr + 4);
+                       for (size_t w = 0; w < partial_failure_var.datalen; w++) {
+                               LDKCResult_NoneAPIErrorZ* partial_failure_conv_22_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
+                               *partial_failure_conv_22_conv = partial_failure_var.data[w];
+                               *partial_failure_conv_22_conv = CResult_NoneAPIErrorZ_clone(partial_failure_conv_22_conv);
+                               partial_failure_arr_ptr[w] = (long)partial_failure_conv_22_conv;
+                       }
+                       return 0 /* LDKPaymentSendFailure - PartialFailure */; (void) partial_failure_arr;
                }
                default: abort();
        }
@@ -4089,20 +4168,19 @@ void register_tx_LDKFilter_jcall(const void* this_arg, const uint8_t (* txid)[32
        memcpy((uint8_t*)(script_pubkey_arr + 4), script_pubkey_var.data, script_pubkey_var.datalen);
        js_invoke_function_2(j_calls->register_tx_meth, txid_arr, script_pubkey_arr);
 }
-void register_output_LDKFilter_jcall(const void* this_arg, const LDKOutPoint * outpoint, LDKu8slice script_pubkey) {
+LDKCOption_C2Tuple_usizeTransactionZZ register_output_LDKFilter_jcall(const void* this_arg, LDKWatchedOutput output) {
        LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
-       LDKOutPoint outpoint_var = *outpoint;
-       outpoint_var = OutPoint_clone(outpoint);
-       CHECK((((long)outpoint_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&outpoint_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long outpoint_ref = (long)outpoint_var.inner;
-       if (outpoint_var.is_owned) {
-               outpoint_ref |= 1;
-       }
-       LDKu8slice script_pubkey_var = script_pubkey;
-       int8_tArray script_pubkey_arr = init_arr(script_pubkey_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(script_pubkey_arr + 4), script_pubkey_var.data, script_pubkey_var.datalen);
-       js_invoke_function_2(j_calls->register_output_meth, outpoint_ref, script_pubkey_arr);
+       LDKWatchedOutput output_var = output;
+       CHECK((((long)output_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&output_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long output_ref = (long)output_var.inner;
+       if (output_var.is_owned) {
+               output_ref |= 1;
+       }
+       LDKCOption_C2Tuple_usizeTransactionZZ* ret = (LDKCOption_C2Tuple_usizeTransactionZZ*)js_invoke_function_1(j_calls->register_output_meth, output_ref);
+       LDKCOption_C2Tuple_usizeTransactionZZ ret_conv = *(LDKCOption_C2Tuple_usizeTransactionZZ*)(((uint64_t)ret) & ~1);
+       // Warning: we may need a move here but no clone is available for LDKCOption_C2Tuple_usizeTransactionZZ
+       return ret_conv;
 }
 static void* LDKFilter_JCalls_clone(const void* this_arg) {
        LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
@@ -4139,15 +4217,16 @@ void  __attribute__((visibility("default"))) TS_Filter_register_tx(uint32_t this
        (this_arg_conv->register_tx)(this_arg_conv->this_arg, txid_ref, script_pubkey_ref);
 }
 
-void  __attribute__((visibility("default"))) TS_Filter_register_output(uint32_t this_arg, uint32_t outpoint, int8_tArray script_pubkey) {
+uint32_t  __attribute__((visibility("default"))) TS_Filter_register_output(uint32_t this_arg, uint32_t output) {
        LDKFilter* this_arg_conv = (LDKFilter*)(((uint64_t)this_arg) & ~1);
-       LDKOutPoint outpoint_conv;
-       outpoint_conv.inner = (void*)(outpoint & (~1));
-       outpoint_conv.is_owned = false;
-       LDKu8slice script_pubkey_ref;
-       script_pubkey_ref.datalen = *((uint32_t*)script_pubkey);
-       script_pubkey_ref.data = (int8_t*)(script_pubkey + 4);
-       (this_arg_conv->register_output)(this_arg_conv->this_arg, &outpoint_conv, script_pubkey_ref);
+       LDKWatchedOutput output_conv;
+       output_conv.inner = (void*)(output & (~1));
+       output_conv.is_owned = (output & 1) || (output == 0);
+       // Warning: we need a move here but no clone is available for LDKWatchedOutput
+       LDKCOption_C2Tuple_usizeTransactionZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_usizeTransactionZZ), "LDKCOption_C2Tuple_usizeTransactionZZ");
+       *ret_copy = (this_arg_conv->register_output)(this_arg_conv->this_arg, output_conv);
+       long ret_ref = (long)ret_copy;
+       return ret_ref;
 }
 
 typedef struct LDKPersist_JCalls {
@@ -5504,6 +5583,35 @@ void  __attribute__((visibility("default"))) TS_CResult_TxCreationKeysErrorZ_fre
        CResult_TxCreationKeysErrorZ_free(_res_conv);
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_COption_u32Z_some(int32_t o) {
+       LDKCOption_u32Z *ret_copy = MALLOC(sizeof(LDKCOption_u32Z), "LDKCOption_u32Z");
+       *ret_copy = COption_u32Z_some(o);
+       long ret_ref = (long)ret_copy;
+       return ret_ref;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_COption_u32Z_none() {
+       LDKCOption_u32Z *ret_copy = MALLOC(sizeof(LDKCOption_u32Z), "LDKCOption_u32Z");
+       *ret_copy = COption_u32Z_none();
+       long ret_ref = (long)ret_copy;
+       return ret_ref;
+}
+
+void  __attribute__((visibility("default"))) TS_COption_u32Z_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCOption_u32Z _res_conv = *(LDKCOption_u32Z*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       COption_u32Z_free(_res_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_COption_u32Z_clone(uint32_t orig) {
+       LDKCOption_u32Z* orig_conv = (LDKCOption_u32Z*)orig;
+       LDKCOption_u32Z *ret_copy = MALLOC(sizeof(LDKCOption_u32Z), "LDKCOption_u32Z");
+       *ret_copy = COption_u32Z_clone(orig_conv);
+       long ret_ref = (long)ret_copy;
+       return ret_ref;
+}
+
 uint32_t  __attribute__((visibility("default"))) TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(uint32_t o) {
        LDKHTLCOutputInCommitment o_conv;
        o_conv.inner = (void*)(o & (~1));
@@ -6195,6 +6303,35 @@ uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelConfigDecodeE
        return (long)ret_conv;
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_COption_u64Z_some(int64_t o) {
+       LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
+       *ret_copy = COption_u64Z_some(o);
+       long ret_ref = (long)ret_copy;
+       return ret_ref;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_COption_u64Z_none() {
+       LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
+       *ret_copy = COption_u64Z_none();
+       long ret_ref = (long)ret_copy;
+       return ret_ref;
+}
+
+void  __attribute__((visibility("default"))) TS_COption_u64Z_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCOption_u64Z _res_conv = *(LDKCOption_u64Z*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       COption_u64Z_free(_res_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_COption_u64Z_clone(uint32_t orig) {
+       LDKCOption_u64Z* orig_conv = (LDKCOption_u64Z*)orig;
+       LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
+       *ret_copy = COption_u64Z_clone(orig_conv);
+       long ret_ref = (long)ret_copy;
+       return ret_ref;
+}
+
 uint32_t  __attribute__((visibility("default"))) TS_CResult_DirectionalChannelInfoDecodeErrorZ_ok(uint32_t o) {
        LDKDirectionalChannelInfo o_conv;
        o_conv.inner = (void*)(o & (~1));
@@ -6970,6 +7107,29 @@ uint32_t  __attribute__((visibility("default"))) TS_CResult_TxOutAccessErrorZ_cl
        return (long)ret_conv;
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_COption_C2Tuple_usizeTransactionZZ_some(uint32_t o) {
+       LDKC2Tuple_usizeTransactionZ o_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)o) & ~1);
+       FREE((void*)o);
+       LDKCOption_C2Tuple_usizeTransactionZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_usizeTransactionZZ), "LDKCOption_C2Tuple_usizeTransactionZZ");
+       *ret_copy = COption_C2Tuple_usizeTransactionZZ_some(o_conv);
+       long ret_ref = (long)ret_copy;
+       return ret_ref;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_COption_C2Tuple_usizeTransactionZZ_none() {
+       LDKCOption_C2Tuple_usizeTransactionZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_usizeTransactionZZ), "LDKCOption_C2Tuple_usizeTransactionZZ");
+       *ret_copy = COption_C2Tuple_usizeTransactionZZ_none();
+       long ret_ref = (long)ret_copy;
+       return ret_ref;
+}
+
+void  __attribute__((visibility("default"))) TS_COption_C2Tuple_usizeTransactionZZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCOption_C2Tuple_usizeTransactionZZ _res_conv = *(LDKCOption_C2Tuple_usizeTransactionZZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       COption_C2Tuple_usizeTransactionZZ_free(_res_conv);
+}
+
 uint32_t  __attribute__((visibility("default"))) TS_CResult_NoneAPIErrorZ_ok() {
        LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
        *ret_conv = CResult_NoneAPIErrorZ_ok();
@@ -9406,6 +9566,100 @@ void  __attribute__((visibility("default"))) TS_Filter_free(uint32_t this_ptr) {
        Filter_free(this_ptr_conv);
 }
 
+void  __attribute__((visibility("default"))) TS_WatchedOutput_free(uint32_t this_obj) {
+       LDKWatchedOutput this_obj_conv;
+       this_obj_conv.inner = (void*)(this_obj & (~1));
+       this_obj_conv.is_owned = (this_obj & 1) || (this_obj == 0);
+       WatchedOutput_free(this_obj_conv);
+}
+
+int8_tArray  __attribute__((visibility("default"))) TS_WatchedOutput_get_block_hash(uint32_t this_ptr) {
+       LDKWatchedOutput this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), WatchedOutput_get_block_hash(&this_ptr_conv).data, 32);
+       return ret_arr;
+}
+
+void  __attribute__((visibility("default"))) TS_WatchedOutput_set_block_hash(uint32_t this_ptr, int8_tArray val) {
+       LDKWatchedOutput this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKThirtyTwoBytes val_ref;
+       CHECK(*((uint32_t*)val) == 32);
+       memcpy(val_ref.data, (uint8_t*)(val + 4), 32);
+       WatchedOutput_set_block_hash(&this_ptr_conv, val_ref);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_WatchedOutput_get_outpoint(uint32_t this_ptr) {
+       LDKWatchedOutput this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKOutPoint ret_var = WatchedOutput_get_outpoint(&this_ptr_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+void  __attribute__((visibility("default"))) TS_WatchedOutput_set_outpoint(uint32_t this_ptr, uint32_t val) {
+       LDKWatchedOutput this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKOutPoint val_conv;
+       val_conv.inner = (void*)(val & (~1));
+       val_conv.is_owned = (val & 1) || (val == 0);
+       val_conv = OutPoint_clone(&val_conv);
+       WatchedOutput_set_outpoint(&this_ptr_conv, val_conv);
+}
+
+int8_tArray  __attribute__((visibility("default"))) TS_WatchedOutput_get_script_pubkey(uint32_t this_ptr) {
+       LDKWatchedOutput this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKu8slice ret_var = WatchedOutput_get_script_pubkey(&this_ptr_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);
+       return ret_arr;
+}
+
+void  __attribute__((visibility("default"))) TS_WatchedOutput_set_script_pubkey(uint32_t this_ptr, int8_tArray val) {
+       LDKWatchedOutput this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCVec_u8Z val_ref;
+       val_ref.datalen = *((uint32_t*)val);
+       val_ref.data = MALLOC(val_ref.datalen, "LDKCVec_u8Z Bytes");
+       memcpy(val_ref.data, (uint8_t*)(val + 4), val_ref.datalen);
+       WatchedOutput_set_script_pubkey(&this_ptr_conv, val_ref);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_WatchedOutput_new(int8_tArray block_hash_arg, uint32_t outpoint_arg, int8_tArray script_pubkey_arg) {
+       LDKThirtyTwoBytes block_hash_arg_ref;
+       CHECK(*((uint32_t*)block_hash_arg) == 32);
+       memcpy(block_hash_arg_ref.data, (uint8_t*)(block_hash_arg + 4), 32);
+       LDKOutPoint outpoint_arg_conv;
+       outpoint_arg_conv.inner = (void*)(outpoint_arg & (~1));
+       outpoint_arg_conv.is_owned = (outpoint_arg & 1) || (outpoint_arg == 0);
+       outpoint_arg_conv = OutPoint_clone(&outpoint_arg_conv);
+       LDKCVec_u8Z script_pubkey_arg_ref;
+       script_pubkey_arg_ref.datalen = *((uint32_t*)script_pubkey_arg);
+       script_pubkey_arg_ref.data = MALLOC(script_pubkey_arg_ref.datalen, "LDKCVec_u8Z Bytes");
+       memcpy(script_pubkey_arg_ref.data, (uint8_t*)(script_pubkey_arg + 4), script_pubkey_arg_ref.datalen);
+       LDKWatchedOutput ret_var = WatchedOutput_new(block_hash_arg_ref, outpoint_arg_conv, script_pubkey_arg_ref);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 void  __attribute__((visibility("default"))) TS_BroadcasterInterface_free(uint32_t this_ptr) {
        if ((this_ptr & 1) != 0) return;
        LDKBroadcasterInterface this_ptr_conv = *(LDKBroadcasterInterface*)(((uint64_t)this_ptr) & ~1);
@@ -10773,6 +11027,25 @@ void  __attribute__((visibility("default"))) TS_ChannelDetails_set_channel_id(ui
        ChannelDetails_set_channel_id(&this_ptr_conv, val_ref);
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_ChannelDetails_get_short_channel_id(uint32_t this_ptr) {
+       LDKChannelDetails this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
+       *ret_copy = ChannelDetails_get_short_channel_id(&this_ptr_conv);
+       long ret_ref = (long)ret_copy;
+       return ret_ref;
+}
+
+void  __attribute__((visibility("default"))) TS_ChannelDetails_set_short_channel_id(uint32_t this_ptr, uint32_t val) {
+       LDKChannelDetails this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCOption_u64Z val_conv = *(LDKCOption_u64Z*)(((uint64_t)val) & ~1);
+       FREE((void*)val);
+       ChannelDetails_set_short_channel_id(&this_ptr_conv, val_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_ChannelDetails_get_remote_network_id(uint32_t this_ptr) {
        LDKChannelDetails this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -16585,6 +16858,41 @@ void  __attribute__((visibility("default"))) TS_HTLCOutputInCommitment_set_payme
        HTLCOutputInCommitment_set_payment_hash(&this_ptr_conv, val_ref);
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_HTLCOutputInCommitment_get_transaction_output_index(uint32_t this_ptr) {
+       LDKHTLCOutputInCommitment this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCOption_u32Z *ret_copy = MALLOC(sizeof(LDKCOption_u32Z), "LDKCOption_u32Z");
+       *ret_copy = HTLCOutputInCommitment_get_transaction_output_index(&this_ptr_conv);
+       long ret_ref = (long)ret_copy;
+       return ret_ref;
+}
+
+void  __attribute__((visibility("default"))) TS_HTLCOutputInCommitment_set_transaction_output_index(uint32_t this_ptr, uint32_t val) {
+       LDKHTLCOutputInCommitment this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCOption_u32Z val_conv = *(LDKCOption_u32Z*)(((uint64_t)val) & ~1);
+       FREE((void*)val);
+       HTLCOutputInCommitment_set_transaction_output_index(&this_ptr_conv, val_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_HTLCOutputInCommitment_new(jboolean offered_arg, int64_t amount_msat_arg, int32_t cltv_expiry_arg, int8_tArray payment_hash_arg, uint32_t transaction_output_index_arg) {
+       LDKThirtyTwoBytes payment_hash_arg_ref;
+       CHECK(*((uint32_t*)payment_hash_arg) == 32);
+       memcpy(payment_hash_arg_ref.data, (uint8_t*)(payment_hash_arg + 4), 32);
+       LDKCOption_u32Z transaction_output_index_arg_conv = *(LDKCOption_u32Z*)(((uint64_t)transaction_output_index_arg) & ~1);
+       FREE((void*)transaction_output_index_arg);
+       LDKHTLCOutputInCommitment ret_var = HTLCOutputInCommitment_new(offered_arg, amount_msat_arg, cltv_expiry_arg, payment_hash_arg_ref, transaction_output_index_arg_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 uint32_t  __attribute__((visibility("default"))) TS_HTLCOutputInCommitment_clone(uint32_t orig) {
        LDKHTLCOutputInCommitment orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
@@ -18060,6 +18368,66 @@ void  __attribute__((visibility("default"))) TS_RouteHint_set_cltv_expiry_delta(
        RouteHint_set_cltv_expiry_delta(&this_ptr_conv, val);
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_RouteHint_get_htlc_minimum_msat(uint32_t this_ptr) {
+       LDKRouteHint this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
+       *ret_copy = RouteHint_get_htlc_minimum_msat(&this_ptr_conv);
+       long ret_ref = (long)ret_copy;
+       return ret_ref;
+}
+
+void  __attribute__((visibility("default"))) TS_RouteHint_set_htlc_minimum_msat(uint32_t this_ptr, uint32_t val) {
+       LDKRouteHint this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCOption_u64Z val_conv = *(LDKCOption_u64Z*)(((uint64_t)val) & ~1);
+       FREE((void*)val);
+       RouteHint_set_htlc_minimum_msat(&this_ptr_conv, val_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_RouteHint_get_htlc_maximum_msat(uint32_t this_ptr) {
+       LDKRouteHint this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
+       *ret_copy = RouteHint_get_htlc_maximum_msat(&this_ptr_conv);
+       long ret_ref = (long)ret_copy;
+       return ret_ref;
+}
+
+void  __attribute__((visibility("default"))) TS_RouteHint_set_htlc_maximum_msat(uint32_t this_ptr, uint32_t val) {
+       LDKRouteHint this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCOption_u64Z val_conv = *(LDKCOption_u64Z*)(((uint64_t)val) & ~1);
+       FREE((void*)val);
+       RouteHint_set_htlc_maximum_msat(&this_ptr_conv, val_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_RouteHint_new(int8_tArray src_node_id_arg, int64_t short_channel_id_arg, uint32_t fees_arg, int16_t cltv_expiry_delta_arg, uint32_t htlc_minimum_msat_arg, uint32_t htlc_maximum_msat_arg) {
+       LDKPublicKey src_node_id_arg_ref;
+       CHECK(*((uint32_t*)src_node_id_arg) == 33);
+       memcpy(src_node_id_arg_ref.compressed_form, (uint8_t*)(src_node_id_arg + 4), 33);
+       LDKRoutingFees fees_arg_conv;
+       fees_arg_conv.inner = (void*)(fees_arg & (~1));
+       fees_arg_conv.is_owned = (fees_arg & 1) || (fees_arg == 0);
+       fees_arg_conv = RoutingFees_clone(&fees_arg_conv);
+       LDKCOption_u64Z htlc_minimum_msat_arg_conv = *(LDKCOption_u64Z*)(((uint64_t)htlc_minimum_msat_arg) & ~1);
+       FREE((void*)htlc_minimum_msat_arg);
+       LDKCOption_u64Z htlc_maximum_msat_arg_conv = *(LDKCOption_u64Z*)(((uint64_t)htlc_maximum_msat_arg) & ~1);
+       FREE((void*)htlc_maximum_msat_arg);
+       LDKRouteHint ret_var = RouteHint_new(src_node_id_arg_ref, short_channel_id_arg, fees_arg_conv, cltv_expiry_delta_arg, htlc_minimum_msat_arg_conv, htlc_maximum_msat_arg_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 uint32_t  __attribute__((visibility("default"))) TS_RouteHint_clone(uint32_t orig) {
        LDKRouteHint orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
@@ -18331,6 +18699,25 @@ void  __attribute__((visibility("default"))) TS_DirectionalChannelInfo_set_htlc_
        DirectionalChannelInfo_set_htlc_minimum_msat(&this_ptr_conv, val);
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_DirectionalChannelInfo_get_htlc_maximum_msat(uint32_t this_ptr) {
+       LDKDirectionalChannelInfo this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
+       *ret_copy = DirectionalChannelInfo_get_htlc_maximum_msat(&this_ptr_conv);
+       long ret_ref = (long)ret_copy;
+       return ret_ref;
+}
+
+void  __attribute__((visibility("default"))) TS_DirectionalChannelInfo_set_htlc_maximum_msat(uint32_t this_ptr, uint32_t val) {
+       LDKDirectionalChannelInfo this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCOption_u64Z val_conv = *(LDKCOption_u64Z*)(((uint64_t)val) & ~1);
+       FREE((void*)val);
+       DirectionalChannelInfo_set_htlc_maximum_msat(&this_ptr_conv, val_conv);
+}
+
 uint32_t  __attribute__((visibility("default"))) TS_DirectionalChannelInfo_get_fees(uint32_t this_ptr) {
        LDKDirectionalChannelInfo this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -18381,6 +18768,27 @@ void  __attribute__((visibility("default"))) TS_DirectionalChannelInfo_set_last_
        DirectionalChannelInfo_set_last_update_message(&this_ptr_conv, val_conv);
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_DirectionalChannelInfo_new(int32_t last_update_arg, jboolean enabled_arg, int16_t cltv_expiry_delta_arg, int64_t htlc_minimum_msat_arg, uint32_t htlc_maximum_msat_arg, uint32_t fees_arg, uint32_t last_update_message_arg) {
+       LDKCOption_u64Z htlc_maximum_msat_arg_conv = *(LDKCOption_u64Z*)(((uint64_t)htlc_maximum_msat_arg) & ~1);
+       FREE((void*)htlc_maximum_msat_arg);
+       LDKRoutingFees fees_arg_conv;
+       fees_arg_conv.inner = (void*)(fees_arg & (~1));
+       fees_arg_conv.is_owned = (fees_arg & 1) || (fees_arg == 0);
+       fees_arg_conv = RoutingFees_clone(&fees_arg_conv);
+       LDKChannelUpdate last_update_message_arg_conv;
+       last_update_message_arg_conv.inner = (void*)(last_update_message_arg & (~1));
+       last_update_message_arg_conv.is_owned = (last_update_message_arg & 1) || (last_update_message_arg == 0);
+       last_update_message_arg_conv = ChannelUpdate_clone(&last_update_message_arg_conv);
+       LDKDirectionalChannelInfo ret_var = DirectionalChannelInfo_new(last_update_arg, enabled_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg_conv, fees_arg_conv, last_update_message_arg_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 uint32_t  __attribute__((visibility("default"))) TS_DirectionalChannelInfo_clone(uint32_t orig) {
        LDKDirectionalChannelInfo orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
@@ -18535,6 +18943,25 @@ void  __attribute__((visibility("default"))) TS_ChannelInfo_set_two_to_one(uint3
        ChannelInfo_set_two_to_one(&this_ptr_conv, val_conv);
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_ChannelInfo_get_capacity_sats(uint32_t this_ptr) {
+       LDKChannelInfo this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
+       *ret_copy = ChannelInfo_get_capacity_sats(&this_ptr_conv);
+       long ret_ref = (long)ret_copy;
+       return ret_ref;
+}
+
+void  __attribute__((visibility("default"))) TS_ChannelInfo_set_capacity_sats(uint32_t this_ptr, uint32_t val) {
+       LDKChannelInfo this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKCOption_u64Z val_conv = *(LDKCOption_u64Z*)(((uint64_t)val) & ~1);
+       FREE((void*)val);
+       ChannelInfo_set_capacity_sats(&this_ptr_conv, val_conv);
+}
+
 uint32_t  __attribute__((visibility("default"))) TS_ChannelInfo_get_announcement_message(uint32_t this_ptr) {
        LDKChannelInfo this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -18560,6 +18987,41 @@ void  __attribute__((visibility("default"))) TS_ChannelInfo_set_announcement_mes
        ChannelInfo_set_announcement_message(&this_ptr_conv, val_conv);
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_ChannelInfo_new(uint32_t features_arg, int8_tArray node_one_arg, uint32_t one_to_two_arg, int8_tArray node_two_arg, uint32_t two_to_one_arg, uint32_t capacity_sats_arg, uint32_t announcement_message_arg) {
+       LDKChannelFeatures features_arg_conv;
+       features_arg_conv.inner = (void*)(features_arg & (~1));
+       features_arg_conv.is_owned = (features_arg & 1) || (features_arg == 0);
+       features_arg_conv = ChannelFeatures_clone(&features_arg_conv);
+       LDKPublicKey node_one_arg_ref;
+       CHECK(*((uint32_t*)node_one_arg) == 33);
+       memcpy(node_one_arg_ref.compressed_form, (uint8_t*)(node_one_arg + 4), 33);
+       LDKDirectionalChannelInfo one_to_two_arg_conv;
+       one_to_two_arg_conv.inner = (void*)(one_to_two_arg & (~1));
+       one_to_two_arg_conv.is_owned = (one_to_two_arg & 1) || (one_to_two_arg == 0);
+       one_to_two_arg_conv = DirectionalChannelInfo_clone(&one_to_two_arg_conv);
+       LDKPublicKey node_two_arg_ref;
+       CHECK(*((uint32_t*)node_two_arg) == 33);
+       memcpy(node_two_arg_ref.compressed_form, (uint8_t*)(node_two_arg + 4), 33);
+       LDKDirectionalChannelInfo two_to_one_arg_conv;
+       two_to_one_arg_conv.inner = (void*)(two_to_one_arg & (~1));
+       two_to_one_arg_conv.is_owned = (two_to_one_arg & 1) || (two_to_one_arg == 0);
+       two_to_one_arg_conv = DirectionalChannelInfo_clone(&two_to_one_arg_conv);
+       LDKCOption_u64Z capacity_sats_arg_conv = *(LDKCOption_u64Z*)(((uint64_t)capacity_sats_arg) & ~1);
+       FREE((void*)capacity_sats_arg);
+       LDKChannelAnnouncement announcement_message_arg_conv;
+       announcement_message_arg_conv.inner = (void*)(announcement_message_arg & (~1));
+       announcement_message_arg_conv.is_owned = (announcement_message_arg & 1) || (announcement_message_arg == 0);
+       announcement_message_arg_conv = ChannelAnnouncement_clone(&announcement_message_arg_conv);
+       LDKChannelInfo ret_var = ChannelInfo_new(features_arg_conv, node_one_arg_ref, one_to_two_arg_conv, node_two_arg_ref, two_to_one_arg_conv, capacity_sats_arg_conv, announcement_message_arg_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 uint32_t  __attribute__((visibility("default"))) TS_ChannelInfo_clone(uint32_t orig) {
        LDKChannelInfo orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
index 6de31bc407a786b2fae11a1f6e76d76a66b057f8..78842cbafb806723c61803d724a4345b512516c4 100644 (file)
@@ -167,6 +167,19 @@ public static native long new_empty_slice_vec();
        public static native boolean LDKCResult_TxCreationKeysErrorZ_result_ok(long arg);
        public static native number LDKCResult_TxCreationKeysErrorZ_get_ok(long arg);
        public static native LDKSecp256k1Error LDKCResult_TxCreationKeysErrorZ_get_err(long arg);
+       public static class LDKCOption_u32Z {
+               private LDKCOption_u32Z() {}
+               export class Some extends LDKCOption_u32Z {
+                       public number some;
+                       Some(number some) { this.some = some; }
+               }
+               export class None extends LDKCOption_u32Z {
+                       None() { }
+               }
+               static native void init();
+       }
+       static { LDKCOption_u32Z.init(); }
+       public static native LDKCOption_u32Z LDKCOption_u32Z_ref_from_ptr(long ptr);
        public static native boolean LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_result_ok(long arg);
        public static native number LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok(long arg);
        public static native number LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(long arg);
@@ -363,6 +376,19 @@ public static native long new_empty_slice_vec();
        public static native boolean LDKCResult_ChannelConfigDecodeErrorZ_result_ok(long arg);
        public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_ok(long arg);
        public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_err(long arg);
+       public static class LDKCOption_u64Z {
+               private LDKCOption_u64Z() {}
+               export class Some extends LDKCOption_u64Z {
+                       public number some;
+                       Some(number some) { this.some = some; }
+               }
+               export class None extends LDKCOption_u64Z {
+                       None() { }
+               }
+               static native void init();
+       }
+       static { LDKCOption_u64Z.init(); }
+       public static native LDKCOption_u64Z LDKCOption_u64Z_ref_from_ptr(long ptr);
        public static native boolean LDKCResult_DirectionalChannelInfoDecodeErrorZ_result_ok(long arg);
        public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_ok(long arg);
        public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_err(long arg);
@@ -421,10 +447,12 @@ public static native long new_empty_slice_vec();
        public static class LDKMonitorEvent {
                private LDKMonitorEvent() {}
                export class HTLCEvent extends LDKMonitorEvent {
-                       HTLCEvent() { }
+                       public number htlc_event;
+                       HTLCEvent(number htlc_event) { this.htlc_event = htlc_event; }
                }
                export class CommitmentTxBroadcasted extends LDKMonitorEvent {
-                       CommitmentTxBroadcasted() { }
+                       public number commitment_tx_broadcasted;
+                       CommitmentTxBroadcasted(number commitment_tx_broadcasted) { this.commitment_tx_broadcasted = commitment_tx_broadcasted; }
                }
                static native void init();
        }
@@ -439,10 +467,12 @@ public static native long new_empty_slice_vec();
                        StaticOutput(number outpoint, number output) { this.outpoint = outpoint; this.output = output; }
                }
                export class DelayedPaymentOutput extends LDKSpendableOutputDescriptor {
-                       DelayedPaymentOutput() { }
+                       public number delayed_payment_output;
+                       DelayedPaymentOutput(number delayed_payment_output) { this.delayed_payment_output = delayed_payment_output; }
                }
                export class StaticPaymentOutput extends LDKSpendableOutputDescriptor {
-                       StaticPaymentOutput() { }
+                       public number static_payment_output;
+                       StaticPaymentOutput(number static_payment_output) { this.static_payment_output = static_payment_output; }
                }
                static native void init();
        }
@@ -662,6 +692,19 @@ public static native long new_empty_slice_vec();
        public static native boolean LDKCResult_TxOutAccessErrorZ_result_ok(long arg);
        public static native number LDKCResult_TxOutAccessErrorZ_get_ok(long arg);
        public static native LDKAccessError LDKCResult_TxOutAccessErrorZ_get_err(long arg);
+       public static class LDKCOption_C2Tuple_usizeTransactionZZ {
+               private LDKCOption_C2Tuple_usizeTransactionZZ() {}
+               export class Some extends LDKCOption_C2Tuple_usizeTransactionZZ {
+                       public number some;
+                       Some(number some) { this.some = some; }
+               }
+               export class None extends LDKCOption_C2Tuple_usizeTransactionZZ {
+                       None() { }
+               }
+               static native void init();
+       }
+       static { LDKCOption_C2Tuple_usizeTransactionZZ.init(); }
+       public static native LDKCOption_C2Tuple_usizeTransactionZZ LDKCOption_C2Tuple_usizeTransactionZZ_ref_from_ptr(long ptr);
        public static class LDKAPIError {
                private LDKAPIError() {}
                export class APIMisuseError extends LDKAPIError {
@@ -697,16 +740,20 @@ public static native long new_empty_slice_vec();
        public static class LDKPaymentSendFailure {
                private LDKPaymentSendFailure() {}
                export class ParameterError extends LDKPaymentSendFailure {
-                       ParameterError() { }
+                       public number parameter_error;
+                       ParameterError(number parameter_error) { this.parameter_error = parameter_error; }
                }
                export class PathParameterError extends LDKPaymentSendFailure {
-                       PathParameterError() { }
+                       public number[] path_parameter_error;
+                       PathParameterError(number[] path_parameter_error) { this.path_parameter_error = path_parameter_error; }
                }
                export class AllFailedRetrySafe extends LDKPaymentSendFailure {
-                       AllFailedRetrySafe() { }
+                       public number[] all_failed_retry_safe;
+                       AllFailedRetrySafe(number[] all_failed_retry_safe) { this.all_failed_retry_safe = all_failed_retry_safe; }
                }
                export class PartialFailure extends LDKPaymentSendFailure {
-                       PartialFailure() { }
+                       public number[] partial_failure;
+                       PartialFailure(number[] partial_failure) { this.partial_failure = partial_failure; }
                }
                static native void init();
        }
@@ -1136,7 +1183,7 @@ public static native long new_empty_slice_vec();
 
                export interface LDKFilter {
                        register_tx (txid: Uint8Array, script_pubkey: Uint8Array): void;
-                       register_output (outpoint: number, script_pubkey: Uint8Array): void;
+                       register_output (output: number): number;
                }
 
                export function LDKFilter_new(impl: LDKFilter): number {
@@ -1154,13 +1201,13 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.Filter_register_tx(this_arg, encodeArray(txid), encodeArray(script_pubkey));
                // debug statements here
        }
-       // void Filter_register_output LDKFilter *NONNULL_PTR this_arg, const struct LDKOutPoint *NONNULL_PTR outpoint, struct LDKu8slice script_pubkey
-       export function Filter_register_output(this_arg: number, outpoint: number, script_pubkey: Uint8Array): void {
+       // LDKCOption_C2Tuple_usizeTransactionZZ Filter_register_output LDKFilter *NONNULL_PTR this_arg, struct LDKWatchedOutput output
+       export function Filter_register_output(this_arg: number, output: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.Filter_register_output(this_arg, outpoint, encodeArray(script_pubkey));
-               // debug statements here
+               const nativeResponseValue = wasm.Filter_register_output(this_arg, output);
+               return nativeResponseValue;
        }
 
 
@@ -1707,6 +1754,38 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_free(_res);
                // debug statements here
        }
+       // struct LDKCOption_u32Z COption_u32Z_some(uint32_t o);
+       export function COption_u32Z_some(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.COption_u32Z_some(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCOption_u32Z COption_u32Z_none(void);
+       export function COption_u32Z_none(): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.COption_u32Z_none();
+               return nativeResponseValue;
+       }
+       // void COption_u32Z_free(struct LDKCOption_u32Z _res);
+       export function COption_u32Z_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.COption_u32Z_free(_res);
+               // debug statements here
+       }
+       // struct LDKCOption_u32Z COption_u32Z_clone(const struct LDKCOption_u32Z *NONNULL_PTR orig);
+       export function COption_u32Z_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.COption_u32Z_clone(orig);
+               return nativeResponseValue;
+       }
        // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(struct LDKHTLCOutputInCommitment o);
        export function CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
@@ -2315,6 +2394,38 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
+       // struct LDKCOption_u64Z COption_u64Z_some(uint64_t o);
+       export function COption_u64Z_some(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.COption_u64Z_some(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCOption_u64Z COption_u64Z_none(void);
+       export function COption_u64Z_none(): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.COption_u64Z_none();
+               return nativeResponseValue;
+       }
+       // void COption_u64Z_free(struct LDKCOption_u64Z _res);
+       export function COption_u64Z_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.COption_u64Z_free(_res);
+               // debug statements here
+       }
+       // struct LDKCOption_u64Z COption_u64Z_clone(const struct LDKCOption_u64Z *NONNULL_PTR orig);
+       export function COption_u64Z_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.COption_u64Z_clone(orig);
+               return nativeResponseValue;
+       }
        // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_ok(struct LDKDirectionalChannelInfo o);
        export function CResult_DirectionalChannelInfoDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
@@ -2947,6 +3058,30 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_clone(orig);
                return nativeResponseValue;
        }
+       // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_some(struct LDKC2Tuple_usizeTransactionZ o);
+       export function COption_C2Tuple_usizeTransactionZZ_some(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_some(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_none(void);
+       export function COption_C2Tuple_usizeTransactionZZ_none(): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_none();
+               return nativeResponseValue;
+       }
+       // void COption_C2Tuple_usizeTransactionZZ_free(struct LDKCOption_C2Tuple_usizeTransactionZZ _res);
+       export function COption_C2Tuple_usizeTransactionZZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_free(_res);
+               // debug statements here
+       }
        // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
        export function CResult_NoneAPIErrorZ_ok(): number {
                if(!isWasmInitialized) {
@@ -5115,6 +5250,70 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.Filter_free(this_ptr);
                // debug statements here
        }
+       // void WatchedOutput_free(struct LDKWatchedOutput this_obj);
+       export function WatchedOutput_free(this_obj: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.WatchedOutput_free(this_obj);
+               // debug statements here
+       }
+       // struct LDKThirtyTwoBytes WatchedOutput_get_block_hash(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
+       export function WatchedOutput_get_block_hash(this_ptr: number): Uint8Array {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.WatchedOutput_get_block_hash(this_ptr);
+               return decodeArray(nativeResponseValue);
+       }
+       // void WatchedOutput_set_block_hash(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+       export function WatchedOutput_set_block_hash(this_ptr: number, val: Uint8Array): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.WatchedOutput_set_block_hash(this_ptr, encodeArray(val));
+               // debug statements here
+       }
+       // struct LDKOutPoint WatchedOutput_get_outpoint(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
+       export function WatchedOutput_get_outpoint(this_ptr: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.WatchedOutput_get_outpoint(this_ptr);
+               return nativeResponseValue;
+       }
+       // void WatchedOutput_set_outpoint(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKOutPoint val);
+       export function WatchedOutput_set_outpoint(this_ptr: number, val: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.WatchedOutput_set_outpoint(this_ptr, val);
+               // debug statements here
+       }
+       // struct LDKu8slice WatchedOutput_get_script_pubkey(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
+       export function WatchedOutput_get_script_pubkey(this_ptr: number): Uint8Array {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.WatchedOutput_get_script_pubkey(this_ptr);
+               return decodeArray(nativeResponseValue);
+       }
+       // void WatchedOutput_set_script_pubkey(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
+       export function WatchedOutput_set_script_pubkey(this_ptr: number, val: Uint8Array): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.WatchedOutput_set_script_pubkey(this_ptr, encodeArray(val));
+               // debug statements here
+       }
+       // MUST_USE_RES struct LDKWatchedOutput WatchedOutput_new(struct LDKThirtyTwoBytes block_hash_arg, struct LDKOutPoint outpoint_arg, struct LDKCVec_u8Z script_pubkey_arg);
+       export function WatchedOutput_new(block_hash_arg: Uint8Array, outpoint_arg: number, script_pubkey_arg: Uint8Array): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.WatchedOutput_new(encodeArray(block_hash_arg), outpoint_arg, encodeArray(script_pubkey_arg));
+               return nativeResponseValue;
+       }
        // void BroadcasterInterface_free(struct LDKBroadcasterInterface this_ptr);
        export function BroadcasterInterface_free(this_ptr: number): void {
                if(!isWasmInitialized) {
@@ -6115,6 +6314,22 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelDetails_set_channel_id(this_ptr, encodeArray(val));
                // debug statements here
        }
+       // struct LDKCOption_u64Z ChannelDetails_get_short_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
+       export function ChannelDetails_get_short_channel_id(this_ptr: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.ChannelDetails_get_short_channel_id(this_ptr);
+               return nativeResponseValue;
+       }
+       // void ChannelDetails_set_short_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+       export function ChannelDetails_set_short_channel_id(this_ptr: number, val: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.ChannelDetails_set_short_channel_id(this_ptr, val);
+               // debug statements here
+       }
        // struct LDKPublicKey ChannelDetails_get_remote_network_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
        export function ChannelDetails_get_remote_network_id(this_ptr: number): Uint8Array {
                if(!isWasmInitialized) {
@@ -10619,6 +10834,30 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.HTLCOutputInCommitment_set_payment_hash(this_ptr, encodeArray(val));
                // debug statements here
        }
+       // struct LDKCOption_u32Z HTLCOutputInCommitment_get_transaction_output_index(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
+       export function HTLCOutputInCommitment_get_transaction_output_index(this_ptr: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.HTLCOutputInCommitment_get_transaction_output_index(this_ptr);
+               return nativeResponseValue;
+       }
+       // void HTLCOutputInCommitment_set_transaction_output_index(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
+       export function HTLCOutputInCommitment_set_transaction_output_index(this_ptr: number, val: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.HTLCOutputInCommitment_set_transaction_output_index(this_ptr, val);
+               // debug statements here
+       }
+       // MUST_USE_RES struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_new(bool offered_arg, uint64_t amount_msat_arg, uint32_t cltv_expiry_arg, struct LDKThirtyTwoBytes payment_hash_arg, struct LDKCOption_u32Z transaction_output_index_arg);
+       export function HTLCOutputInCommitment_new(offered_arg: boolean, amount_msat_arg: number, cltv_expiry_arg: number, payment_hash_arg: Uint8Array, transaction_output_index_arg: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.HTLCOutputInCommitment_new(offered_arg, amount_msat_arg, cltv_expiry_arg, encodeArray(payment_hash_arg), transaction_output_index_arg);
+               return nativeResponseValue;
+       }
        // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const struct LDKHTLCOutputInCommitment *NONNULL_PTR orig);
        export function HTLCOutputInCommitment_clone(orig: number): number {
                if(!isWasmInitialized) {
@@ -11643,6 +11882,46 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.RouteHint_set_cltv_expiry_delta(this_ptr, val);
                // debug statements here
        }
+       // struct LDKCOption_u64Z RouteHint_get_htlc_minimum_msat(const struct LDKRouteHint *NONNULL_PTR this_ptr);
+       export function RouteHint_get_htlc_minimum_msat(this_ptr: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.RouteHint_get_htlc_minimum_msat(this_ptr);
+               return nativeResponseValue;
+       }
+       // void RouteHint_set_htlc_minimum_msat(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+       export function RouteHint_set_htlc_minimum_msat(this_ptr: number, val: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.RouteHint_set_htlc_minimum_msat(this_ptr, val);
+               // debug statements here
+       }
+       // struct LDKCOption_u64Z RouteHint_get_htlc_maximum_msat(const struct LDKRouteHint *NONNULL_PTR this_ptr);
+       export function RouteHint_get_htlc_maximum_msat(this_ptr: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.RouteHint_get_htlc_maximum_msat(this_ptr);
+               return nativeResponseValue;
+       }
+       // void RouteHint_set_htlc_maximum_msat(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+       export function RouteHint_set_htlc_maximum_msat(this_ptr: number, val: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.RouteHint_set_htlc_maximum_msat(this_ptr, val);
+               // debug statements here
+       }
+       // MUST_USE_RES struct LDKRouteHint RouteHint_new(struct LDKPublicKey src_node_id_arg, uint64_t short_channel_id_arg, struct LDKRoutingFees fees_arg, uint16_t cltv_expiry_delta_arg, struct LDKCOption_u64Z htlc_minimum_msat_arg, struct LDKCOption_u64Z htlc_maximum_msat_arg);
+       export function RouteHint_new(src_node_id_arg: Uint8Array, short_channel_id_arg: number, fees_arg: number, cltv_expiry_delta_arg: number, htlc_minimum_msat_arg: number, htlc_maximum_msat_arg: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.RouteHint_new(encodeArray(src_node_id_arg), short_channel_id_arg, fees_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg);
+               return nativeResponseValue;
+       }
        // struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
        export function RouteHint_clone(orig: number): number {
                if(!isWasmInitialized) {
@@ -11819,6 +12098,22 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr, val);
                // debug statements here
        }
+       // struct LDKCOption_u64Z DirectionalChannelInfo_get_htlc_maximum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
+       export function DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr);
+               return nativeResponseValue;
+       }
+       // void DirectionalChannelInfo_set_htlc_maximum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+       export function DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr: number, val: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr, val);
+               // debug statements here
+       }
        // struct LDKRoutingFees DirectionalChannelInfo_get_fees(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
        export function DirectionalChannelInfo_get_fees(this_ptr: number): number {
                if(!isWasmInitialized) {
@@ -11851,6 +12146,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update_message(this_ptr, val);
                // debug statements here
        }
+       // MUST_USE_RES struct LDKDirectionalChannelInfo DirectionalChannelInfo_new(uint32_t last_update_arg, bool enabled_arg, uint16_t cltv_expiry_delta_arg, uint64_t htlc_minimum_msat_arg, struct LDKCOption_u64Z htlc_maximum_msat_arg, struct LDKRoutingFees fees_arg, struct LDKChannelUpdate last_update_message_arg);
+       export function DirectionalChannelInfo_new(last_update_arg: number, enabled_arg: boolean, cltv_expiry_delta_arg: number, htlc_minimum_msat_arg: number, htlc_maximum_msat_arg: number, fees_arg: number, last_update_message_arg: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.DirectionalChannelInfo_new(last_update_arg, enabled_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg, fees_arg, last_update_message_arg);
+               return nativeResponseValue;
+       }
        // struct LDKDirectionalChannelInfo DirectionalChannelInfo_clone(const struct LDKDirectionalChannelInfo *NONNULL_PTR orig);
        export function DirectionalChannelInfo_clone(orig: number): number {
                if(!isWasmInitialized) {
@@ -11963,6 +12266,22 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelInfo_set_two_to_one(this_ptr, val);
                // debug statements here
        }
+       // struct LDKCOption_u64Z ChannelInfo_get_capacity_sats(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
+       export function ChannelInfo_get_capacity_sats(this_ptr: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.ChannelInfo_get_capacity_sats(this_ptr);
+               return nativeResponseValue;
+       }
+       // void ChannelInfo_set_capacity_sats(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+       export function ChannelInfo_set_capacity_sats(this_ptr: number, val: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.ChannelInfo_set_capacity_sats(this_ptr, val);
+               // debug statements here
+       }
        // struct LDKChannelAnnouncement ChannelInfo_get_announcement_message(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
        export function ChannelInfo_get_announcement_message(this_ptr: number): number {
                if(!isWasmInitialized) {
@@ -11979,6 +12298,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelInfo_set_announcement_message(this_ptr, val);
                // debug statements here
        }
+       // MUST_USE_RES struct LDKChannelInfo ChannelInfo_new(struct LDKChannelFeatures features_arg, struct LDKPublicKey node_one_arg, struct LDKDirectionalChannelInfo one_to_two_arg, struct LDKPublicKey node_two_arg, struct LDKDirectionalChannelInfo two_to_one_arg, struct LDKCOption_u64Z capacity_sats_arg, struct LDKChannelAnnouncement announcement_message_arg);
+       export function ChannelInfo_new(features_arg: number, node_one_arg: Uint8Array, one_to_two_arg: number, node_two_arg: Uint8Array, two_to_one_arg: number, capacity_sats_arg: number, announcement_message_arg: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.ChannelInfo_new(features_arg, encodeArray(node_one_arg), one_to_two_arg, encodeArray(node_two_arg), two_to_one_arg, capacity_sats_arg, announcement_message_arg);
+               return nativeResponseValue;
+       }
        // struct LDKChannelInfo ChannelInfo_clone(const struct LDKChannelInfo *NONNULL_PTR orig);
        export function ChannelInfo_clone(orig: number): number {
                if(!isWasmInitialized) {
index 5904b6c547446fb8b81dd18569edab629faef99c..41033ebe1f7448033c26acb9c23389282e803f6d 100644 (file)
@@ -63,4 +63,12 @@ export class MonitorUpdateFailed extends APIError {
        private constructor(ptr: number, obj: bindings.LDKAPIError.MonitorUpdateFailed) {
                super(null, ptr);
        }
+}
+       public APIError clone() {
+               number ret = bindings.APIError_clone(this.ptr);
+               APIError ret_hu_conv = APIError.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
 }
index b7ef907c228ba112e9f4a6d9b4353ce7965cf024..fa57ebb17a420d3a99f0edbcaf71235dc94fa64a 100644 (file)
@@ -27,6 +27,17 @@ import * as bindings from '../bindings' // TODO: figure out location
                bindings.ChannelDetails_set_channel_id(this.ptr, val);
        }
 
+       public Option_u64Z get_short_channel_id() {
+               number ret = bindings.ChannelDetails_get_short_channel_id(this.ptr);
+               Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public void set_short_channel_id(Option_u64Z val) {
+               bindings.ChannelDetails_set_short_channel_id(this.ptr, val.ptr);
+       }
+
        public Uint8Array get_remote_network_id() {
                Uint8Array ret = bindings.ChannelDetails_get_remote_network_id(this.ptr);
                return ret;
index ea7a292f8cacf9cabb302524ee2571cb7ff1ab46..c86fe579a8e925f596288baeea053248eccf8f64 100644 (file)
@@ -72,6 +72,17 @@ import * as bindings from '../bindings' // TODO: figure out location
                this.ptrs_to.add(val);
        }
 
+       public Option_u64Z get_capacity_sats() {
+               number ret = bindings.ChannelInfo_get_capacity_sats(this.ptr);
+               Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public void set_capacity_sats(Option_u64Z val) {
+               bindings.ChannelInfo_set_capacity_sats(this.ptr, val.ptr);
+       }
+
        public ChannelAnnouncement get_announcement_message() {
                number ret = bindings.ChannelInfo_get_announcement_message(this.ptr);
                const ret_hu_conv: ChannelAnnouncement = new ChannelAnnouncement(null, ret);
@@ -84,6 +95,17 @@ import * as bindings from '../bindings' // TODO: figure out location
                this.ptrs_to.add(val);
        }
 
+       public static ChannelInfo constructor_new(ChannelFeatures features_arg, Uint8Array node_one_arg, DirectionalChannelInfo one_to_two_arg, Uint8Array node_two_arg, DirectionalChannelInfo two_to_one_arg, Option_u64Z capacity_sats_arg, ChannelAnnouncement announcement_message_arg) {
+               number ret = bindings.ChannelInfo_new(features_arg == null ? 0 : features_arg.ptr & ~1, node_one_arg, one_to_two_arg == null ? 0 : one_to_two_arg.ptr & ~1, node_two_arg, two_to_one_arg == null ? 0 : two_to_one_arg.ptr & ~1, capacity_sats_arg.ptr, announcement_message_arg == null ? 0 : announcement_message_arg.ptr & ~1);
+               const ret_hu_conv: ChannelInfo = new ChannelInfo(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               ret_hu_conv.ptrs_to.add(features_arg);
+               ret_hu_conv.ptrs_to.add(one_to_two_arg);
+               ret_hu_conv.ptrs_to.add(two_to_one_arg);
+               ret_hu_conv.ptrs_to.add(announcement_message_arg);
+               return ret_hu_conv;
+       }
+
        public ChannelInfo clone() {
                number ret = bindings.ChannelInfo_clone(this.ptr);
                const ret_hu_conv: ChannelInfo = new ChannelInfo(null, ret);
index 903e56ecf2d4cb64b25fffad37b6cf2d64099542..9fb9c3170e9c498306ccf4b52f96fae179c2e9d9 100644 (file)
@@ -54,6 +54,17 @@ import * as bindings from '../bindings' // TODO: figure out location
                bindings.DirectionalChannelInfo_set_htlc_minimum_msat(this.ptr, val);
        }
 
+       public Option_u64Z get_htlc_maximum_msat() {
+               number ret = bindings.DirectionalChannelInfo_get_htlc_maximum_msat(this.ptr);
+               Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public void set_htlc_maximum_msat(Option_u64Z val) {
+               bindings.DirectionalChannelInfo_set_htlc_maximum_msat(this.ptr, val.ptr);
+       }
+
        public RoutingFees get_fees() {
                number ret = bindings.DirectionalChannelInfo_get_fees(this.ptr);
                const ret_hu_conv: RoutingFees = new RoutingFees(null, ret);
@@ -78,6 +89,15 @@ import * as bindings from '../bindings' // TODO: figure out location
                this.ptrs_to.add(val);
        }
 
+       public static DirectionalChannelInfo constructor_new(number last_update_arg, boolean enabled_arg, number cltv_expiry_delta_arg, number htlc_minimum_msat_arg, Option_u64Z htlc_maximum_msat_arg, RoutingFees fees_arg, ChannelUpdate last_update_message_arg) {
+               number ret = bindings.DirectionalChannelInfo_new(last_update_arg, enabled_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg.ptr, fees_arg == null ? 0 : fees_arg.ptr & ~1, last_update_message_arg == null ? 0 : last_update_message_arg.ptr & ~1);
+               const ret_hu_conv: DirectionalChannelInfo = new DirectionalChannelInfo(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               ret_hu_conv.ptrs_to.add(fees_arg);
+               ret_hu_conv.ptrs_to.add(last_update_message_arg);
+               return ret_hu_conv;
+       }
+
        public DirectionalChannelInfo clone() {
                number ret = bindings.DirectionalChannelInfo_clone(this.ptr);
                const ret_hu_conv: DirectionalChannelInfo = new DirectionalChannelInfo(null, ret);
index fed9258c47fb9e4e2613d5193a27961617110ee4..25bf0917d9c2ca34b92e7db45c14cb5fc43bf485 100644 (file)
@@ -47,4 +47,12 @@ export class SendErrorMessage extends ErrorAction {
                        msg_hu_conv.ptrs_to.add(this);
                this.msg = msg_hu_conv;
        }
+}
+       public ErrorAction clone() {
+               number ret = bindings.ErrorAction_clone(this.ptr);
+               ErrorAction ret_hu_conv = ErrorAction.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
 }
index e24c66e20e3d3e0f0d596a13eca74746dc341a56..3648f39913f5625e782692ed8f79f71098fbda9e 100644 (file)
@@ -108,4 +108,17 @@ export class SpendableOutputs extends Event {
                        }
                this.outputs = outputs_conv_27_arr;
        }
+}
+       public Event clone() {
+               number ret = bindings.Event_clone(this.ptr);
+               Event ret_hu_conv = Event.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public Uint8Array write() {
+               Uint8Array ret = bindings.Event_write(this.ptr);
+               return ret;
+       }
+
 }
index fa7bceb17a7635720d42b5ae5c29d1319ade3ff3..4b43e0367d5726216dec6bf5c7b0d31abeae3985 100644 (file)
@@ -36,9 +36,12 @@ import * as bindings from '../bindings' // TODO: figure out location
                                                        arg.register_tx(txid, script_pubkey);
                                                },
 
-                                               register_output (outpoint: number, script_pubkey: Uint8Array): void {
-                                                       const outpoint_hu_conv: OutPoint = new OutPoint(null, outpoint);
-                                                       arg.register_output(outpoint_hu_conv, script_pubkey);
+                                               register_output (output: number): number {
+                                                       const output_hu_conv: WatchedOutput = new WatchedOutput(null, output);
+                               output_hu_conv.ptrs_to.add(this);
+                                                       Option_C2Tuple_usizeTransactionZZ ret = arg.register_output(output_hu_conv);
+                               result: number = ret.ptr;
+                               return result;
                                                },
 
                                                
@@ -49,7 +52,7 @@ import * as bindings from '../bindings' // TODO: figure out location
 
             export interface FilterInterface {
                 register_tx(txid: Uint8Array, script_pubkey: Uint8Array): void;
-                               register_output(outpoint: OutPoint, script_pubkey: Uint8Array): void;
+                               register_output(output: WatchedOutput): Option_C2Tuple_usizeTransactionZZ;
                                
             }
 
@@ -60,9 +63,12 @@ import * as bindings from '../bindings' // TODO: figure out location
                bindings.Filter_register_tx(this.ptr, txid, script_pubkey);
        }
 
-       public void register_output(OutPoint outpoint, Uint8Array script_pubkey) {
-               bindings.Filter_register_output(this.ptr, outpoint == null ? 0 : outpoint.ptr & ~1, script_pubkey);
-               this.ptrs_to.add(outpoint);
+       public Option_C2Tuple_usizeTransactionZZ register_output(Uint8Array output_block_hash_arg, OutPoint output_outpoint_arg, Uint8Array output_script_pubkey_arg) {
+               number ret = bindings.Filter_register_output(this.ptr, bindings.WatchedOutput_new(output_block_hash_arg, output_outpoint_arg == null ? 0 : output_outpoint_arg.ptr & ~1, output_script_pubkey_arg));
+               Option_C2Tuple_usizeTransactionZZ ret_hu_conv = Option_C2Tuple_usizeTransactionZZ.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(this);
+               ret_hu_conv.ptrs_to.add(output_outpoint_arg);
+               return ret_hu_conv;
        }
 
 }
index 5f76a0df4ef156d0a33c33360fa067e27b950776..b89c14622ff4f5af312ea9b3c1068a6dd4774c4b 100644 (file)
@@ -50,4 +50,12 @@ export class NodeFailure extends HTLCFailChannelUpdate {
                this.node_id = obj.node_id;
                this.is_permanent = obj.is_permanent;
        }
+}
+       public HTLCFailChannelUpdate clone() {
+               number ret = bindings.HTLCFailChannelUpdate_clone(this.ptr);
+               HTLCFailChannelUpdate ret_hu_conv = HTLCFailChannelUpdate.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
 }
index 42c2eccff62474343a4c46935a713f66b71336ff..2f0e42b11c722970c961b7a5d39ad2da8bbf6d7d 100644 (file)
@@ -54,6 +54,24 @@ import * as bindings from '../bindings' // TODO: figure out location
                bindings.HTLCOutputInCommitment_set_payment_hash(this.ptr, val);
        }
 
+       public Option_u32Z get_transaction_output_index() {
+               number ret = bindings.HTLCOutputInCommitment_get_transaction_output_index(this.ptr);
+               Option_u32Z ret_hu_conv = Option_u32Z.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public void set_transaction_output_index(Option_u32Z val) {
+               bindings.HTLCOutputInCommitment_set_transaction_output_index(this.ptr, val.ptr);
+       }
+
+       public static HTLCOutputInCommitment constructor_new(boolean offered_arg, number amount_msat_arg, number cltv_expiry_arg, Uint8Array payment_hash_arg, Option_u32Z transaction_output_index_arg) {
+               number ret = bindings.HTLCOutputInCommitment_new(offered_arg, amount_msat_arg, cltv_expiry_arg, payment_hash_arg, transaction_output_index_arg.ptr);
+               const ret_hu_conv: HTLCOutputInCommitment = new HTLCOutputInCommitment(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
        public HTLCOutputInCommitment clone() {
                number ret = bindings.HTLCOutputInCommitment_clone(this.ptr);
                const ret_hu_conv: HTLCOutputInCommitment = new HTLCOutputInCommitment(null, ret);
index 38998e2562ebfcc618d464a74efe97172b84ad0d..a2f96107c35a57dfbc6909482050731b2a22f5f9 100644 (file)
@@ -295,4 +295,12 @@ export class SendReplyChannelRange extends MessageSendEvent {
                        msg_hu_conv.ptrs_to.add(this);
                this.msg = msg_hu_conv;
        }
+}
+       public MessageSendEvent clone() {
+               number ret = bindings.MessageSendEvent_clone(this.ptr);
+               MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
 }
index 1a6c1637f42a6cfbfc1cc1347f68aff76bd70085..e226f96e4bd14a86fd0927ef0615ab8b006278c0 100644 (file)
@@ -21,12 +21,30 @@ export default class MonitorEvent extends CommonBase {
 
 }
 export class HTLCEvent extends MonitorEvent {
+       public htlc_event: HTLCUpdate;
        private constructor(ptr: number, obj: bindings.LDKMonitorEvent.HTLCEvent) {
                super(null, ptr);
+               const htlc_event: number = obj.htlc_event;
+               const htlc_event_hu_conv: HTLCUpdate = new HTLCUpdate(null, htlc_event);
+                       htlc_event_hu_conv.ptrs_to.add(this);
+               this.htlc_event = htlc_event_hu_conv;
        }
 }
 export class CommitmentTxBroadcasted extends MonitorEvent {
+       public commitment_tx_broadcasted: OutPoint;
        private constructor(ptr: number, obj: bindings.LDKMonitorEvent.CommitmentTxBroadcasted) {
                super(null, ptr);
+               const commitment_tx_broadcasted: number = obj.commitment_tx_broadcasted;
+               const commitment_tx_broadcasted_hu_conv: OutPoint = new OutPoint(null, commitment_tx_broadcasted);
+                       commitment_tx_broadcasted_hu_conv.ptrs_to.add(this);
+               this.commitment_tx_broadcasted = commitment_tx_broadcasted_hu_conv;
        }
+}
+       public MonitorEvent clone() {
+               number ret = bindings.MonitorEvent_clone(this.ptr);
+               MonitorEvent ret_hu_conv = MonitorEvent.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
 }
index 3de3d2eff2ff75d90a671cfda2a192739ef4e1d6..269741b9da8792956a732f5817984d9beffdcaf9 100644 (file)
@@ -65,4 +65,17 @@ export class OnionV3 extends NetAddress {
                this.version = obj.version;
                this.port = obj.port;
        }
+}
+       public NetAddress clone() {
+               number ret = bindings.NetAddress_clone(this.ptr);
+               NetAddress ret_hu_conv = NetAddress.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public Uint8Array write() {
+               Uint8Array ret = bindings.NetAddress_write(this.ptr);
+               return ret;
+       }
+
 }
diff --git a/ts/structs/Option_C2Tuple_usizeTransactionZZ.ts b/ts/structs/Option_C2Tuple_usizeTransactionZZ.ts
new file mode 100644 (file)
index 0000000..fc0b9b7
--- /dev/null
@@ -0,0 +1,55 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+export default class COption_C2Tuple_usizeTransactionZZ extends CommonBase {
+       protected constructor(_dummy: object, ptr: number) { super(ptr); }
+       protected finalize() {
+               super.finalize();
+               if (this.ptr != 0) { bindings.COption_C2Tuple_usizeTransactionZZ_free(this.ptr); }
+       }
+       static constr_from_ptr(ptr: number): COption_C2Tuple_usizeTransactionZZ {
+               const raw_val: bindings.LDKCOption_C2Tuple_usizeTransactionZZ = bindings.LDKCOption_C2Tuple_usizeTransactionZZ_ref_from_ptr(ptr);
+               if (raw_val instanceof bindings.LDKCOption_C2Tuple_usizeTransactionZZ.Some) {
+                       return new Some(this.ptr, raw_val);
+               }
+               if (raw_val instanceof bindings.LDKCOption_C2Tuple_usizeTransactionZZ.None) {
+                       return new None(this.ptr, raw_val);
+               }
+               throw new Error('oops, this should be unreachable'); // Unreachable without extending the (internal) bindings interface
+       }
+
+}
+export class Some extends COption_C2Tuple_usizeTransactionZZ {
+       public some: TwoTuple<Number, Uint8Array>;
+       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;
+       }
+}
+export class None extends COption_C2Tuple_usizeTransactionZZ {
+       private constructor(ptr: number, obj: bindings.LDKCOption_C2Tuple_usizeTransactionZZ.None) {
+               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));
+               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() {
+               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;
+       }
+
+}
diff --git a/ts/structs/Option_u32Z.ts b/ts/structs/Option_u32Z.ts
new file mode 100644 (file)
index 0000000..9d7b961
--- /dev/null
@@ -0,0 +1,56 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+export default class COption_u32Z extends CommonBase {
+       protected constructor(_dummy: object, ptr: number) { super(ptr); }
+       protected finalize() {
+               super.finalize();
+               if (this.ptr != 0) { bindings.COption_u32Z_free(this.ptr); }
+       }
+       static constr_from_ptr(ptr: number): COption_u32Z {
+               const raw_val: bindings.LDKCOption_u32Z = bindings.LDKCOption_u32Z_ref_from_ptr(ptr);
+               if (raw_val instanceof bindings.LDKCOption_u32Z.Some) {
+                       return new Some(this.ptr, raw_val);
+               }
+               if (raw_val instanceof bindings.LDKCOption_u32Z.None) {
+                       return new None(this.ptr, raw_val);
+               }
+               throw new Error('oops, this should be unreachable'); // Unreachable without extending the (internal) bindings interface
+       }
+
+}
+export class Some extends COption_u32Z {
+       public some: number;
+       private constructor(ptr: number, obj: bindings.LDKCOption_u32Z.Some) {
+               super(null, ptr);
+               this.some = obj.some;
+       }
+}
+export class None extends COption_u32Z {
+       private constructor(ptr: number, obj: bindings.LDKCOption_u32Z.None) {
+               super(null, ptr);
+       }
+}
+       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() {
+               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() {
+               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);
+               return ret_hu_conv;
+       }
+
+}
diff --git a/ts/structs/Option_u64Z.ts b/ts/structs/Option_u64Z.ts
new file mode 100644 (file)
index 0000000..c23f089
--- /dev/null
@@ -0,0 +1,56 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+export default class COption_u64Z extends CommonBase {
+       protected constructor(_dummy: object, ptr: number) { super(ptr); }
+       protected finalize() {
+               super.finalize();
+               if (this.ptr != 0) { bindings.COption_u64Z_free(this.ptr); }
+       }
+       static constr_from_ptr(ptr: number): COption_u64Z {
+               const raw_val: bindings.LDKCOption_u64Z = bindings.LDKCOption_u64Z_ref_from_ptr(ptr);
+               if (raw_val instanceof bindings.LDKCOption_u64Z.Some) {
+                       return new Some(this.ptr, raw_val);
+               }
+               if (raw_val instanceof bindings.LDKCOption_u64Z.None) {
+                       return new None(this.ptr, raw_val);
+               }
+               throw new Error('oops, this should be unreachable'); // Unreachable without extending the (internal) bindings interface
+       }
+
+}
+export class Some extends COption_u64Z {
+       public some: number;
+       private constructor(ptr: number, obj: bindings.LDKCOption_u64Z.Some) {
+               super(null, ptr);
+               this.some = obj.some;
+       }
+}
+export class None extends COption_u64Z {
+       private constructor(ptr: number, obj: bindings.LDKCOption_u64Z.None) {
+               super(null, ptr);
+       }
+}
+       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() {
+               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() {
+               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);
+               return ret_hu_conv;
+       }
+
+}
index 2310a2eea6253363e2ae486a24c9a8532fbf556a..36daa4ec969adc29aef2b3bb2a3e8e592f421c70 100644 (file)
@@ -27,22 +27,63 @@ export default class PaymentSendFailure extends CommonBase {
 
 }
 export class ParameterError extends PaymentSendFailure {
+       public parameter_error: APIError;
        private constructor(ptr: number, obj: bindings.LDKPaymentSendFailure.ParameterError) {
                super(null, ptr);
+               const parameter_error: number = obj.parameter_error;
+               APIError parameter_error_hu_conv = APIError.constr_from_ptr(parameter_error);
+                       parameter_error_hu_conv.ptrs_to.add(this);
+               this.parameter_error = parameter_error_hu_conv;
        }
 }
 export class PathParameterError extends PaymentSendFailure {
+       public path_parameter_error: Result_NoneAPIErrorZ[];
        private constructor(ptr: number, obj: bindings.LDKPaymentSendFailure.PathParameterError) {
                super(null, ptr);
+               const path_parameter_error: number[] = obj.path_parameter_error;
+               Result_NoneAPIErrorZ[] path_parameter_error_conv_22_arr = new Result_NoneAPIErrorZ[path_parameter_error.length];
+                       for (int w = 0; w < path_parameter_error.length; w++) {
+                               number path_parameter_error_conv_22 = path_parameter_error[w];
+                               Result_NoneAPIErrorZ path_parameter_error_conv_22_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(path_parameter_error_conv_22);
+                               path_parameter_error_conv_22_arr[w] = path_parameter_error_conv_22_hu_conv;
+                       }
+               this.path_parameter_error = path_parameter_error_conv_22_arr;
        }
 }
 export class AllFailedRetrySafe extends PaymentSendFailure {
+       public all_failed_retry_safe: APIError[];
        private constructor(ptr: number, obj: bindings.LDKPaymentSendFailure.AllFailedRetrySafe) {
                super(null, ptr);
+               const all_failed_retry_safe: number[] = obj.all_failed_retry_safe;
+               APIError[] all_failed_retry_safe_conv_10_arr = new APIError[all_failed_retry_safe.length];
+                       for (int k = 0; k < all_failed_retry_safe.length; k++) {
+                               number all_failed_retry_safe_conv_10 = all_failed_retry_safe[k];
+                               APIError all_failed_retry_safe_conv_10_hu_conv = APIError.constr_from_ptr(all_failed_retry_safe_conv_10);
+                               all_failed_retry_safe_conv_10_hu_conv.ptrs_to.add(this);
+                               all_failed_retry_safe_conv_10_arr[k] = all_failed_retry_safe_conv_10_hu_conv;
+                       }
+               this.all_failed_retry_safe = all_failed_retry_safe_conv_10_arr;
        }
 }
 export class PartialFailure extends PaymentSendFailure {
+       public partial_failure: Result_NoneAPIErrorZ[];
        private constructor(ptr: number, obj: bindings.LDKPaymentSendFailure.PartialFailure) {
                super(null, ptr);
+               const partial_failure: number[] = obj.partial_failure;
+               Result_NoneAPIErrorZ[] partial_failure_conv_22_arr = new Result_NoneAPIErrorZ[partial_failure.length];
+                       for (int w = 0; w < partial_failure.length; w++) {
+                               number partial_failure_conv_22 = partial_failure[w];
+                               Result_NoneAPIErrorZ partial_failure_conv_22_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(partial_failure_conv_22);
+                               partial_failure_conv_22_arr[w] = partial_failure_conv_22_hu_conv;
+                       }
+               this.partial_failure = partial_failure_conv_22_arr;
        }
+}
+       public PaymentSendFailure clone() {
+               number ret = bindings.PaymentSendFailure_clone(this.ptr);
+               PaymentSendFailure ret_hu_conv = PaymentSendFailure.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
 }
index ddc5ef5ee0cc3914272d8c7458b406153dbeff34..5e24e2fd6c023625ea229bd6331a44f216a97e1f 100644 (file)
@@ -24,10 +24,6 @@ public class Result_AcceptChannelDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_AcceptChannelDecodeErrorZ_OK(AcceptChannel res) {
-                       this(null, bindings.CResult_AcceptChannelDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_AcceptChannelDecodeErrorZ_Err extends Result_AcceptChannelDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_AcceptChannelDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_AcceptChannelDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_AcceptChannelDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_AcceptChannelDecodeErrorZ_clone(this.ptr);
+               Result_AcceptChannelDecodeErrorZ ret_hu_conv = Result_AcceptChannelDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index c243244564a88dc2c0ec9c5bff583d03f9eda58a..02479d7267c11ec6c3e0c3eb7ecd9a4dafc37655 100644 (file)
@@ -24,10 +24,6 @@ public class Result_AnnouncementSignaturesDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_AnnouncementSignaturesDecodeErrorZ_OK(AnnouncementSignatures res) {
-                       this(null, bindings.CResult_AnnouncementSignaturesDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_AnnouncementSignaturesDecodeErrorZ_Err extends Result_AnnouncementSignaturesDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_AnnouncementSignaturesDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_AnnouncementSignaturesDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_AnnouncementSignaturesDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_AnnouncementSignaturesDecodeErrorZ_clone(this.ptr);
+               Result_AnnouncementSignaturesDecodeErrorZ ret_hu_conv = Result_AnnouncementSignaturesDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 9e4fdaa8935503376e208fb2716d64ca74b18d49..7d04d85a33a849940dc13cb162e8534aac913004 100644 (file)
@@ -24,10 +24,6 @@ public class Result_BuiltCommitmentTransactionDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_BuiltCommitmentTransactionDecodeErrorZ_OK(BuiltCommitmentTransaction res) {
-                       this(null, bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_BuiltCommitmentTransactionDecodeErrorZ_Err extends Result_BuiltCommitmentTransactionDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_BuiltCommitmentTransactionDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_BuiltCommitmentTransactionDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(this.ptr);
+               Result_BuiltCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_BuiltCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 91fcaa401e5788d6e19cfccdd8758c3543606057..e3878992dc82fd7e5f5d340957d2da3b15ad45ab 100644 (file)
@@ -30,18 +30,6 @@ public class Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ extends CommonB
                        res_b_hu_conv.ptrs_to.add(res_conv);
                        this.res = res_conv;
                }
-               public Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_OK(TwoTuple<Uint8Array, ChannelManager> res) {
-                       this(null, bindings.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(bindings.C2Tuple_BlockHashChannelManagerZ_new(res.a, res.b == null ? 0 : res.b.ptr & ~1)));
-                       this.ptrs_to.add(res.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 this being visible in GC'd languages by cloning the object
-                       // at the FFI layer, creating a new object which Rust can claim ownership of
-                       // However, in some cases (eg here), there is no way to clone an object, and thus
-                       // we actually have to pass full ownership to Rust.
-                       // Thus, after this call, res.b is reset to null and is now a dummy object.
-                       res.b.ptr = 0;
-               }
        }
 
        public static final class Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_Err extends Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ {
@@ -53,9 +41,28 @@ public class Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ extends CommonB
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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));
+               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) {
+               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);
+               return ret_hu_conv;
+       }
+
 }
index c563f8489511c3ff868020ffea162c483b34f1ab..3139b2b68b136edc58218efecce320a9ede2eed6 100644 (file)
@@ -30,10 +30,6 @@ public class Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ extends CommonB
                        res_b_hu_conv.ptrs_to.add(res_conv);
                        this.res = res_conv;
                }
-               public Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_OK(TwoTuple<Uint8Array, ChannelMonitor> res) {
-                       this(null, bindings.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(bindings.C2Tuple_BlockHashChannelMonitorZ_new(res.a, res.b == null ? 0 : res.b.ptr & ~1)));
-                       this.ptrs_to.add(res.b);
-               }
        }
 
        public static final class Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_Err extends Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ {
@@ -45,9 +41,20 @@ public class Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ extends CommonB
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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));
+               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) {
+               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;
+       }
+
 }
index 23aad79f4edd0de13cac2c73898836dd6b7eec65..bf9ac0502a72d2de40be64a7fcd75760c341132d 100644 (file)
@@ -27,17 +27,30 @@ public class Result_C2Tuple_SignatureCVec_SignatureZZNoneZ extends CommonBase {
                        });
                        this.res = res_conv;
                }
-               public Result_C2Tuple_SignatureCVec_SignatureZZNoneZ_OK(TwoTuple<Uint8Array, Uint8Array[]> res) {
-                       this(null, bindings.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(bindings.C2Tuple_SignatureCVec_SignatureZZ_new(res.a, res.b)));
-               }
        }
 
        public static final class Result_C2Tuple_SignatureCVec_SignatureZZNoneZ_Err extends Result_C2Tuple_SignatureCVec_SignatureZZNoneZ {
                private Result_C2Tuple_SignatureCVec_SignatureZZNoneZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                }
-               public Result_C2Tuple_SignatureCVec_SignatureZZNoneZ_Err() {
-                       this(null, bindings.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err());
-               }
        }
+
+       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));
+               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() {
+               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() {
+               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 efef7e62d1495b4aca0fae62a0945951ae7fbabf..d6dc175e7a08a05fbb52397f0b610d68b0a80d79 100644 (file)
@@ -23,9 +23,6 @@ public class Result_CResult_NetAddressu8ZDecodeErrorZ extends CommonBase {
                        Result_NetAddressu8Z res_hu_conv = Result_NetAddressu8Z.constr_from_ptr(res);
                        this.res = res_hu_conv;
                }
-               public Result_CResult_NetAddressu8ZDecodeErrorZ_OK(Result_NetAddressu8Z res) {
-                       this(null, bindings.CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(res != null ? res.ptr : 0));
-               }
        }
 
        public static final class Result_CResult_NetAddressu8ZDecodeErrorZ_Err extends Result_CResult_NetAddressu8ZDecodeErrorZ {
@@ -37,9 +34,25 @@ public class Result_CResult_NetAddressu8ZDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_CResult_NetAddressu8ZDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_CResult_NetAddressu8ZDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               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 5850251799b2e86499af027cd6d9c3d3c51e4b26..1bf0b6b9f306836aa9ed5027220adce6ff8e0861 100644 (file)
@@ -21,17 +21,30 @@ public class Result_CVec_CVec_u8ZZNoneZ extends CommonBase {
                        super(_dummy, ptr);
                        this.res = bindings.LDKCResult_CVec_CVec_u8ZZNoneZ_get_ok(ptr);
                }
-               public Result_CVec_CVec_u8ZZNoneZ_OK(Uint8Array[] res) {
-                       this(null, bindings.CResult_CVec_CVec_u8ZZNoneZ_ok(res));
-               }
        }
 
        public static final class Result_CVec_CVec_u8ZZNoneZ_Err extends Result_CVec_CVec_u8ZZNoneZ {
                private Result_CVec_CVec_u8ZZNoneZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                }
-               public Result_CVec_CVec_u8ZZNoneZ_Err() {
-                       this(null, bindings.CResult_CVec_CVec_u8ZZNoneZ_err());
-               }
        }
+
+       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() {
+               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() {
+               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 4bbae60950e437ab61c0d72231d97ade074547b4..237f4476291c974c888191ffbeba3e699e1aa879 100644 (file)
@@ -21,17 +21,30 @@ public class Result_CVec_SignatureZNoneZ extends CommonBase {
                        super(_dummy, ptr);
                        this.res = bindings.LDKCResult_CVec_SignatureZNoneZ_get_ok(ptr);
                }
-               public Result_CVec_SignatureZNoneZ_OK(Uint8Array[] res) {
-                       this(null, bindings.CResult_CVec_SignatureZNoneZ_ok(res));
-               }
        }
 
        public static final class Result_CVec_SignatureZNoneZ_Err extends Result_CVec_SignatureZNoneZ {
                private Result_CVec_SignatureZNoneZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                }
-               public Result_CVec_SignatureZNoneZ_Err() {
-                       this(null, bindings.CResult_CVec_SignatureZNoneZ_err());
-               }
        }
+
+       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() {
+               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() {
+               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 2b318343456cb7cb3c9adccdd05c0805a1fb715e..96c33d3a9fd12f1a10bca85606c568074ac23a8d 100644 (file)
@@ -21,9 +21,6 @@ public class Result_CVec_u8ZPeerHandleErrorZ extends CommonBase {
                        super(_dummy, ptr);
                        this.res = bindings.LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok(ptr);
                }
-               public Result_CVec_u8ZPeerHandleErrorZ_OK(Uint8Array res) {
-                       this(null, bindings.CResult_CVec_u8ZPeerHandleErrorZ_ok(res));
-               }
        }
 
        public static final class Result_CVec_u8ZPeerHandleErrorZ_Err extends Result_CVec_u8ZPeerHandleErrorZ {
@@ -35,9 +32,25 @@ public class Result_CVec_u8ZPeerHandleErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_CVec_u8ZPeerHandleErrorZ_Err(PeerHandleError err) {
-                       this(null, bindings.CResult_CVec_u8ZPeerHandleErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               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 5145f35c790b0befa4852f07ae411afdfdd21311..a94e2294147862c294e6a35a059fd127781153ce 100644 (file)
@@ -24,10 +24,6 @@ public class Result_ChannelAnnouncementDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_ChannelAnnouncementDecodeErrorZ_OK(ChannelAnnouncement res) {
-                       this(null, bindings.CResult_ChannelAnnouncementDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_ChannelAnnouncementDecodeErrorZ_Err extends Result_ChannelAnnouncementDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_ChannelAnnouncementDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_ChannelAnnouncementDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_ChannelAnnouncementDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_ChannelAnnouncementDecodeErrorZ_clone(this.ptr);
+               Result_ChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_ChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index ea264bbbd159bd7f381879bcc7b059d583b6f4ca..05146da5d529b0a36697aea15950d84fc13f5dc7 100644 (file)
@@ -24,10 +24,6 @@ public class Result_ChannelConfigDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_ChannelConfigDecodeErrorZ_OK(ChannelConfig res) {
-                       this(null, bindings.CResult_ChannelConfigDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_ChannelConfigDecodeErrorZ_Err extends Result_ChannelConfigDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_ChannelConfigDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_ChannelConfigDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_ChannelConfigDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_ChannelConfigDecodeErrorZ_clone(this.ptr);
+               Result_ChannelConfigDecodeErrorZ ret_hu_conv = Result_ChannelConfigDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 931540cef41c3eba1551f1b70132a35e9e96590a..af6fcd002e9622364c52c15cdb19fcc9689d3e08 100644 (file)
@@ -24,10 +24,6 @@ public class Result_ChannelFeaturesDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_ChannelFeaturesDecodeErrorZ_OK(ChannelFeatures res) {
-                       this(null, bindings.CResult_ChannelFeaturesDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_ChannelFeaturesDecodeErrorZ_Err extends Result_ChannelFeaturesDecodeErrorZ {
@@ -39,9 +35,20 @@ public class Result_ChannelFeaturesDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_ChannelFeaturesDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_ChannelFeaturesDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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);
+               return ret_hu_conv;
+       }
+
 }
index 3650d84f247cb84c6dc964cebcff6a013a228245..79a4a6d51f44b6afd5e8ecd7049a6c780c4a2162 100644 (file)
@@ -24,10 +24,6 @@ public class Result_ChannelInfoDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_ChannelInfoDecodeErrorZ_OK(ChannelInfo res) {
-                       this(null, bindings.CResult_ChannelInfoDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_ChannelInfoDecodeErrorZ_Err extends Result_ChannelInfoDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_ChannelInfoDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_ChannelInfoDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_ChannelInfoDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_ChannelInfoDecodeErrorZ_clone(this.ptr);
+               Result_ChannelInfoDecodeErrorZ ret_hu_conv = Result_ChannelInfoDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 28bba160e3c415f2bf8fd8c21ab30381ecb17db1..ff96b9ad18021355adfaf2a9d62e704df2766d49 100644 (file)
@@ -24,10 +24,6 @@ public class Result_ChannelMonitorUpdateDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_ChannelMonitorUpdateDecodeErrorZ_OK(ChannelMonitorUpdate res) {
-                       this(null, bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_ChannelMonitorUpdateDecodeErrorZ_Err extends Result_ChannelMonitorUpdateDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_ChannelMonitorUpdateDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_ChannelMonitorUpdateDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_clone(this.ptr);
+               Result_ChannelMonitorUpdateDecodeErrorZ ret_hu_conv = Result_ChannelMonitorUpdateDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index c0febead564ee3349bfdef495b66734e19d2f791..df516cba5513af3a95c55e588fcfbcfa3a0a8778 100644 (file)
@@ -24,10 +24,6 @@ public class Result_ChannelPublicKeysDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_ChannelPublicKeysDecodeErrorZ_OK(ChannelPublicKeys res) {
-                       this(null, bindings.CResult_ChannelPublicKeysDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_ChannelPublicKeysDecodeErrorZ_Err extends Result_ChannelPublicKeysDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_ChannelPublicKeysDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_ChannelPublicKeysDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_ChannelPublicKeysDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_ChannelPublicKeysDecodeErrorZ_clone(this.ptr);
+               Result_ChannelPublicKeysDecodeErrorZ ret_hu_conv = Result_ChannelPublicKeysDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 13377d677bc3d2f195996799048e51fece0e4566..c4bd01d4399abec82d46becefe5c0b2625525a6b 100644 (file)
@@ -24,10 +24,6 @@ public class Result_ChannelReestablishDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_ChannelReestablishDecodeErrorZ_OK(ChannelReestablish res) {
-                       this(null, bindings.CResult_ChannelReestablishDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_ChannelReestablishDecodeErrorZ_Err extends Result_ChannelReestablishDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_ChannelReestablishDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_ChannelReestablishDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_ChannelReestablishDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_ChannelReestablishDecodeErrorZ_clone(this.ptr);
+               Result_ChannelReestablishDecodeErrorZ ret_hu_conv = Result_ChannelReestablishDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 2353ce9028267da2ac0e0476bbc559c5f7437b33..cc5accfd6425bcf86f216e8bb116fdbe071be4c2 100644 (file)
@@ -24,10 +24,6 @@ public class Result_ChannelTransactionParametersDecodeErrorZ extends CommonBase
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_ChannelTransactionParametersDecodeErrorZ_OK(ChannelTransactionParameters res) {
-                       this(null, bindings.CResult_ChannelTransactionParametersDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_ChannelTransactionParametersDecodeErrorZ_Err extends Result_ChannelTransactionParametersDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_ChannelTransactionParametersDecodeErrorZ extends CommonBase
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_ChannelTransactionParametersDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_ChannelTransactionParametersDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_clone(this.ptr);
+               Result_ChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_ChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index f3f85e3aaf4e6c2448f340e21bf0e0f1f97d7394..9121961825cbfa70003709743df8269204caa51f 100644 (file)
@@ -24,10 +24,6 @@ public class Result_ChannelUpdateDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_ChannelUpdateDecodeErrorZ_OK(ChannelUpdate res) {
-                       this(null, bindings.CResult_ChannelUpdateDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_ChannelUpdateDecodeErrorZ_Err extends Result_ChannelUpdateDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_ChannelUpdateDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_ChannelUpdateDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_ChannelUpdateDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_ChannelUpdateDecodeErrorZ_clone(this.ptr);
+               Result_ChannelUpdateDecodeErrorZ ret_hu_conv = Result_ChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 7163fff26d2ddefc205912eff7a895f8a2b50ebf..a56d732d0367526b25ef40c5ef8f356cd01acf46 100644 (file)
@@ -24,10 +24,6 @@ public class Result_ClosingSignedDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_ClosingSignedDecodeErrorZ_OK(ClosingSigned res) {
-                       this(null, bindings.CResult_ClosingSignedDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_ClosingSignedDecodeErrorZ_Err extends Result_ClosingSignedDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_ClosingSignedDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_ClosingSignedDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_ClosingSignedDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_ClosingSignedDecodeErrorZ_clone(this.ptr);
+               Result_ClosingSignedDecodeErrorZ ret_hu_conv = Result_ClosingSignedDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 3168c278d28429310b70bda0069e69b431c8d4b0..a8e92e725e07ce62b49ac5ec6c49467bcb672b9f 100644 (file)
@@ -24,10 +24,6 @@ public class Result_CommitmentSignedDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_CommitmentSignedDecodeErrorZ_OK(CommitmentSigned res) {
-                       this(null, bindings.CResult_CommitmentSignedDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_CommitmentSignedDecodeErrorZ_Err extends Result_CommitmentSignedDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_CommitmentSignedDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_CommitmentSignedDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_CommitmentSignedDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_CommitmentSignedDecodeErrorZ_clone(this.ptr);
+               Result_CommitmentSignedDecodeErrorZ ret_hu_conv = Result_CommitmentSignedDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index a555e9eb9d1e64ef9bd335b8002c238631800906..cf248fb21eeb677b8af587ad71f2d0c985fed006 100644 (file)
@@ -24,10 +24,6 @@ public class Result_CommitmentTransactionDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_CommitmentTransactionDecodeErrorZ_OK(CommitmentTransaction res) {
-                       this(null, bindings.CResult_CommitmentTransactionDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_CommitmentTransactionDecodeErrorZ_Err extends Result_CommitmentTransactionDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_CommitmentTransactionDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_CommitmentTransactionDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_CommitmentTransactionDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_CommitmentTransactionDecodeErrorZ_clone(this.ptr);
+               Result_CommitmentTransactionDecodeErrorZ ret_hu_conv = Result_CommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 68e67ff7e1bcdd440b968a30a43b7cf1418557fc..c96ded5d2a7951ede97e50795b9b9f6fc407b7ea 100644 (file)
@@ -24,10 +24,6 @@ public class Result_CounterpartyChannelTransactionParametersDecodeErrorZ extends
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_CounterpartyChannelTransactionParametersDecodeErrorZ_OK(CounterpartyChannelTransactionParameters res) {
-                       this(null, bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_CounterpartyChannelTransactionParametersDecodeErrorZ_Err extends Result_CounterpartyChannelTransactionParametersDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_CounterpartyChannelTransactionParametersDecodeErrorZ extends
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_CounterpartyChannelTransactionParametersDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(this.ptr);
+               Result_CounterpartyChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_CounterpartyChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 972fc4bad0f40e2a18c10cffa969bfebec28a443..84a6e3827b373c8f4a1a20095b53534dc4631a25 100644 (file)
@@ -24,10 +24,6 @@ public class Result_DirectionalChannelInfoDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_DirectionalChannelInfoDecodeErrorZ_OK(DirectionalChannelInfo res) {
-                       this(null, bindings.CResult_DirectionalChannelInfoDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_DirectionalChannelInfoDecodeErrorZ_Err extends Result_DirectionalChannelInfoDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_DirectionalChannelInfoDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_DirectionalChannelInfoDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_DirectionalChannelInfoDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_DirectionalChannelInfoDecodeErrorZ_clone(this.ptr);
+               Result_DirectionalChannelInfoDecodeErrorZ ret_hu_conv = Result_DirectionalChannelInfoDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index f3060b29d6439be5fcacc21e2c9fe94996d68938..40b124b07e2c238108e921887ee7127e065fb627 100644 (file)
@@ -24,10 +24,6 @@ public class Result_ErrorMessageDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_ErrorMessageDecodeErrorZ_OK(ErrorMessage res) {
-                       this(null, bindings.CResult_ErrorMessageDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_ErrorMessageDecodeErrorZ_Err extends Result_ErrorMessageDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_ErrorMessageDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_ErrorMessageDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_ErrorMessageDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_ErrorMessageDecodeErrorZ_clone(this.ptr);
+               Result_ErrorMessageDecodeErrorZ ret_hu_conv = Result_ErrorMessageDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 61050127c09baa6bc2edcc41c38f47c3cb1465c5..758bf5756a546c6f6c05f4c1023c569bba4fc7c1 100644 (file)
@@ -24,10 +24,6 @@ public class Result_FundingCreatedDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_FundingCreatedDecodeErrorZ_OK(FundingCreated res) {
-                       this(null, bindings.CResult_FundingCreatedDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_FundingCreatedDecodeErrorZ_Err extends Result_FundingCreatedDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_FundingCreatedDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_FundingCreatedDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_FundingCreatedDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_FundingCreatedDecodeErrorZ_clone(this.ptr);
+               Result_FundingCreatedDecodeErrorZ ret_hu_conv = Result_FundingCreatedDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index c5bd20170b776cc2ded42003dc86d5bb417f3dac..83e5f6b012ec9f93ff1303def1cf25631ca40518 100644 (file)
@@ -24,10 +24,6 @@ public class Result_FundingLockedDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_FundingLockedDecodeErrorZ_OK(FundingLocked res) {
-                       this(null, bindings.CResult_FundingLockedDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_FundingLockedDecodeErrorZ_Err extends Result_FundingLockedDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_FundingLockedDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_FundingLockedDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_FundingLockedDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_FundingLockedDecodeErrorZ_clone(this.ptr);
+               Result_FundingLockedDecodeErrorZ ret_hu_conv = Result_FundingLockedDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 37fbef2c27a65b120382e0f4c7b86e63e2711401..046c8ede99038957404c782bbc781aead6674c21 100644 (file)
@@ -24,10 +24,6 @@ public class Result_FundingSignedDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_FundingSignedDecodeErrorZ_OK(FundingSigned res) {
-                       this(null, bindings.CResult_FundingSignedDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_FundingSignedDecodeErrorZ_Err extends Result_FundingSignedDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_FundingSignedDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_FundingSignedDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_FundingSignedDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_FundingSignedDecodeErrorZ_clone(this.ptr);
+               Result_FundingSignedDecodeErrorZ ret_hu_conv = Result_FundingSignedDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 2e8c6498118b286df522aee222d802ebace970fb..8a4f07c23b64d2bd2159574fec9b18b976239e0c 100644 (file)
@@ -24,10 +24,6 @@ public class Result_GossipTimestampFilterDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_GossipTimestampFilterDecodeErrorZ_OK(GossipTimestampFilter res) {
-                       this(null, bindings.CResult_GossipTimestampFilterDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_GossipTimestampFilterDecodeErrorZ_Err extends Result_GossipTimestampFilterDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_GossipTimestampFilterDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_GossipTimestampFilterDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_GossipTimestampFilterDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_GossipTimestampFilterDecodeErrorZ_clone(this.ptr);
+               Result_GossipTimestampFilterDecodeErrorZ ret_hu_conv = Result_GossipTimestampFilterDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 634405b44f4f9b60ba83ee0c0419c121f81e0308..51e04765bee40368f7ca6075f1298857137a63d9 100644 (file)
@@ -24,10 +24,6 @@ public class Result_HTLCOutputInCommitmentDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_HTLCOutputInCommitmentDecodeErrorZ_OK(HTLCOutputInCommitment res) {
-                       this(null, bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_HTLCOutputInCommitmentDecodeErrorZ_Err extends Result_HTLCOutputInCommitmentDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_HTLCOutputInCommitmentDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_HTLCOutputInCommitmentDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(this.ptr);
+               Result_HTLCOutputInCommitmentDecodeErrorZ ret_hu_conv = Result_HTLCOutputInCommitmentDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 3e6815f22c2e606769bf715c3545574b3809f7c5..14b061e2223415672fd5d4a924ab99e59e7bd341 100644 (file)
@@ -24,10 +24,6 @@ public class Result_HTLCUpdateDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_HTLCUpdateDecodeErrorZ_OK(HTLCUpdate res) {
-                       this(null, bindings.CResult_HTLCUpdateDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_HTLCUpdateDecodeErrorZ_Err extends Result_HTLCUpdateDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_HTLCUpdateDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_HTLCUpdateDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_HTLCUpdateDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_HTLCUpdateDecodeErrorZ_clone(this.ptr);
+               Result_HTLCUpdateDecodeErrorZ ret_hu_conv = Result_HTLCUpdateDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 613fcb9dcba99b8ff0099775773534ac44d976e1..ff8a0ad49ca74533ca64be59a24adf1ae5bfc036 100644 (file)
@@ -24,10 +24,6 @@ public class Result_HolderCommitmentTransactionDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_HolderCommitmentTransactionDecodeErrorZ_OK(HolderCommitmentTransaction res) {
-                       this(null, bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_HolderCommitmentTransactionDecodeErrorZ_Err extends Result_HolderCommitmentTransactionDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_HolderCommitmentTransactionDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_HolderCommitmentTransactionDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_clone(this.ptr);
+               Result_HolderCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_HolderCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 89175a7157fafb8f534b03574f052503596eb093..ad24b905fd60edfec24239e8aee626a9c61b0c4f 100644 (file)
@@ -24,10 +24,6 @@ public class Result_InMemorySignerDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_InMemorySignerDecodeErrorZ_OK(InMemorySigner res) {
-                       this(null, bindings.CResult_InMemorySignerDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_InMemorySignerDecodeErrorZ_Err extends Result_InMemorySignerDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_InMemorySignerDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_InMemorySignerDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_InMemorySignerDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_InMemorySignerDecodeErrorZ_clone(this.ptr);
+               Result_InMemorySignerDecodeErrorZ ret_hu_conv = Result_InMemorySignerDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 168ffcdb652782b539e566e278b36daa8149a38b..48c57880dc3f98788580ca79b1c8e4f0b1c4f634 100644 (file)
@@ -24,10 +24,6 @@ public class Result_InitDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_InitDecodeErrorZ_OK(Init res) {
-                       this(null, bindings.CResult_InitDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_InitDecodeErrorZ_Err extends Result_InitDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_InitDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_InitDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_InitDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_InitDecodeErrorZ_clone(this.ptr);
+               Result_InitDecodeErrorZ ret_hu_conv = Result_InitDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 2d959796f95d4ab885ea1471f8fe7c1e354e0596..a19501071b4d684213bce919532f48a1c1aea43b 100644 (file)
@@ -24,10 +24,6 @@ public class Result_InitFeaturesDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_InitFeaturesDecodeErrorZ_OK(InitFeatures res) {
-                       this(null, bindings.CResult_InitFeaturesDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_InitFeaturesDecodeErrorZ_Err extends Result_InitFeaturesDecodeErrorZ {
@@ -39,9 +35,20 @@ public class Result_InitFeaturesDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_InitFeaturesDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_InitFeaturesDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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);
+               return ret_hu_conv;
+       }
+
 }
index ac13a5ae64eb44ddbacf820bcbddf061417935e3..9f8baa89ba3a182ea684f3f8e86d17145d393142 100644 (file)
@@ -24,10 +24,6 @@ public class Result_InvoiceFeaturesDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_InvoiceFeaturesDecodeErrorZ_OK(InvoiceFeatures res) {
-                       this(null, bindings.CResult_InvoiceFeaturesDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_InvoiceFeaturesDecodeErrorZ_Err extends Result_InvoiceFeaturesDecodeErrorZ {
@@ -39,9 +35,20 @@ public class Result_InvoiceFeaturesDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_InvoiceFeaturesDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_InvoiceFeaturesDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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);
+               return ret_hu_conv;
+       }
+
 }
index 0725f11ff31da4ab5bc4f1b77aab56bf3dff3df7..17ad93c274000c95885a26de0b6aa45a20dd7b66 100644 (file)
@@ -24,9 +24,6 @@ public class Result_NetAddressu8Z extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_NetAddressu8Z_OK(NetAddress res) {
-                       this(null, bindings.CResult_NetAddressu8Z_ok(res.ptr));
-               }
        }
 
        public static final class Result_NetAddressu8Z_Err extends Result_NetAddressu8Z {
@@ -35,8 +32,24 @@ public class Result_NetAddressu8Z extends CommonBase {
                        super(_dummy, ptr);
                        this.err = bindings.LDKCResult_NetAddressu8Z_get_err(ptr);
                }
-               public Result_NetAddressu8Z_Err(number err) {
-                       this(null, bindings.CResult_NetAddressu8Z_err(err));
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_NetAddressu8Z_clone(this.ptr);
+               Result_NetAddressu8Z ret_hu_conv = Result_NetAddressu8Z.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 78921d4e155580809c06b25e44c8970bc00d1f5d..1cc929faba0a5444cc6d06ed0eb44fb23d94f064 100644 (file)
@@ -24,10 +24,6 @@ public class Result_NetworkGraphDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_NetworkGraphDecodeErrorZ_OK(NetworkGraph res) {
-                       this(null, bindings.CResult_NetworkGraphDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_NetworkGraphDecodeErrorZ_Err extends Result_NetworkGraphDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_NetworkGraphDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_NetworkGraphDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_NetworkGraphDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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 b382ff5df99640b8a9179cea97935c705e6bdaf4..4d02f8d762ca5b98d0fa7859243613f117c154db 100644 (file)
@@ -24,10 +24,6 @@ public class Result_NodeAnnouncementDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_NodeAnnouncementDecodeErrorZ_OK(NodeAnnouncement res) {
-                       this(null, bindings.CResult_NodeAnnouncementDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_NodeAnnouncementDecodeErrorZ_Err extends Result_NodeAnnouncementDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_NodeAnnouncementDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_NodeAnnouncementDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_NodeAnnouncementDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_NodeAnnouncementDecodeErrorZ_clone(this.ptr);
+               Result_NodeAnnouncementDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index f0eb3fd4967f4a2b6e5b8bf6c6a66fe2f3080076..76c3f85b6852fdc407c3928886a90d2766590a48 100644 (file)
@@ -24,10 +24,6 @@ public class Result_NodeAnnouncementInfoDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_NodeAnnouncementInfoDecodeErrorZ_OK(NodeAnnouncementInfo res) {
-                       this(null, bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_NodeAnnouncementInfoDecodeErrorZ_Err extends Result_NodeAnnouncementInfoDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_NodeAnnouncementInfoDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_NodeAnnouncementInfoDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_clone(this.ptr);
+               Result_NodeAnnouncementInfoDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementInfoDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index cd3d97da2b83625bde610773e77f4d0f2ac39332..c75d721b21b69ff16a15aa6b5ea822500d058fe6 100644 (file)
@@ -24,10 +24,6 @@ public class Result_NodeFeaturesDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_NodeFeaturesDecodeErrorZ_OK(NodeFeatures res) {
-                       this(null, bindings.CResult_NodeFeaturesDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_NodeFeaturesDecodeErrorZ_Err extends Result_NodeFeaturesDecodeErrorZ {
@@ -39,9 +35,20 @@ public class Result_NodeFeaturesDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_NodeFeaturesDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_NodeFeaturesDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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);
+               return ret_hu_conv;
+       }
+
 }
index 3e9c8d2bbceb1afc25ef17622eecdd3b0d48bf86..7c40d301ec0360c22e365d4d2850e6fbf76a6a45 100644 (file)
@@ -24,10 +24,6 @@ public class Result_NodeInfoDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_NodeInfoDecodeErrorZ_OK(NodeInfo res) {
-                       this(null, bindings.CResult_NodeInfoDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_NodeInfoDecodeErrorZ_Err extends Result_NodeInfoDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_NodeInfoDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_NodeInfoDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_NodeInfoDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_NodeInfoDecodeErrorZ_clone(this.ptr);
+               Result_NodeInfoDecodeErrorZ ret_hu_conv = Result_NodeInfoDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 7bedbd606b994638ed3a8d4acd3b4070fbc937ea..a90182d55fef377895638917d16240e7f2e0f26f 100644 (file)
@@ -19,9 +19,6 @@ public class Result_NoneAPIErrorZ extends CommonBase {
                private Result_NoneAPIErrorZ_OK(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                }
-               public Result_NoneAPIErrorZ_OK() {
-                       this(null, bindings.CResult_NoneAPIErrorZ_ok());
-               }
        }
 
        public static final class Result_NoneAPIErrorZ_Err extends Result_NoneAPIErrorZ {
@@ -33,8 +30,24 @@ public class Result_NoneAPIErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_NoneAPIErrorZ_Err(APIError err) {
-                       this(null, bindings.CResult_NoneAPIErrorZ_err(err.ptr));
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_NoneAPIErrorZ_clone(this.ptr);
+               Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 5e61c5274c9f09b18ff82a83543ce5d43867ed81..d0bcb7ef7fcf2f895ed141b6925579ff9d619950 100644 (file)
@@ -19,9 +19,6 @@ public class Result_NoneChannelMonitorUpdateErrZ extends CommonBase {
                private Result_NoneChannelMonitorUpdateErrZ_OK(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                }
-               public Result_NoneChannelMonitorUpdateErrZ_OK() {
-                       this(null, bindings.CResult_NoneChannelMonitorUpdateErrZ_ok());
-               }
        }
 
        public static final class Result_NoneChannelMonitorUpdateErrZ_Err extends Result_NoneChannelMonitorUpdateErrZ {
@@ -30,8 +27,24 @@ public class Result_NoneChannelMonitorUpdateErrZ extends CommonBase {
                        super(_dummy, ptr);
                        this.err = bindings.LDKCResult_NoneChannelMonitorUpdateErrZ_get_err(ptr);
                }
-               public Result_NoneChannelMonitorUpdateErrZ_Err(LDKChannelMonitorUpdateErr err) {
-                       this(null, bindings.CResult_NoneChannelMonitorUpdateErrZ_err(err));
-               }
        }
+
+       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(LDKChannelMonitorUpdateErr 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() {
+               number ret = bindings.CResult_NoneChannelMonitorUpdateErrZ_clone(this.ptr);
+               Result_NoneChannelMonitorUpdateErrZ ret_hu_conv = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 510af04e59fbd30db9787c873ec7317db362c363..86718862b9e3f0064f196a474e1720885a9d2a13 100644 (file)
@@ -19,9 +19,6 @@ public class Result_NoneLightningErrorZ extends CommonBase {
                private Result_NoneLightningErrorZ_OK(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                }
-               public Result_NoneLightningErrorZ_OK() {
-                       this(null, bindings.CResult_NoneLightningErrorZ_ok());
-               }
        }
 
        public static final class Result_NoneLightningErrorZ_Err extends Result_NoneLightningErrorZ {
@@ -33,9 +30,25 @@ public class Result_NoneLightningErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_NoneLightningErrorZ_Err(LightningError err) {
-                       this(null, bindings.CResult_NoneLightningErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_NoneLightningErrorZ_clone(this.ptr);
+               Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 5b340cbad8d68d0037be23a04147ca49fda8a739..d0984aece06f0600a52d8d08b49aff1a54530921 100644 (file)
@@ -19,9 +19,6 @@ public class Result_NoneMonitorUpdateErrorZ extends CommonBase {
                private Result_NoneMonitorUpdateErrorZ_OK(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                }
-               public Result_NoneMonitorUpdateErrorZ_OK() {
-                       this(null, bindings.CResult_NoneMonitorUpdateErrorZ_ok());
-               }
        }
 
        public static final class Result_NoneMonitorUpdateErrorZ_Err extends Result_NoneMonitorUpdateErrorZ {
@@ -33,9 +30,25 @@ public class Result_NoneMonitorUpdateErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_NoneMonitorUpdateErrorZ_Err(MonitorUpdateError err) {
-                       this(null, bindings.CResult_NoneMonitorUpdateErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_NoneMonitorUpdateErrorZ_clone(this.ptr);
+               Result_NoneMonitorUpdateErrorZ ret_hu_conv = Result_NoneMonitorUpdateErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 66ac0bed06207ae7694eca9d5ffe3358e458cb9e..d51a0c5645b0887e4af0fff42a04cf76d9df17a4 100644 (file)
@@ -19,9 +19,6 @@ public class Result_NonePaymentSendFailureZ extends CommonBase {
                private Result_NonePaymentSendFailureZ_OK(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                }
-               public Result_NonePaymentSendFailureZ_OK() {
-                       this(null, bindings.CResult_NonePaymentSendFailureZ_ok());
-               }
        }
 
        public static final class Result_NonePaymentSendFailureZ_Err extends Result_NonePaymentSendFailureZ {
@@ -33,8 +30,24 @@ public class Result_NonePaymentSendFailureZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_NonePaymentSendFailureZ_Err(PaymentSendFailure err) {
-                       this(null, bindings.CResult_NonePaymentSendFailureZ_err(err.ptr));
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_NonePaymentSendFailureZ_clone(this.ptr);
+               Result_NonePaymentSendFailureZ ret_hu_conv = Result_NonePaymentSendFailureZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 6607c204473784e5bffd19746426dd204dd189b6..c4ba64ef69ebe146379923d63c235c24a33948e2 100644 (file)
@@ -19,9 +19,6 @@ public class Result_NonePeerHandleErrorZ extends CommonBase {
                private Result_NonePeerHandleErrorZ_OK(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                }
-               public Result_NonePeerHandleErrorZ_OK() {
-                       this(null, bindings.CResult_NonePeerHandleErrorZ_ok());
-               }
        }
 
        public static final class Result_NonePeerHandleErrorZ_Err extends Result_NonePeerHandleErrorZ {
@@ -33,9 +30,25 @@ public class Result_NonePeerHandleErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_NonePeerHandleErrorZ_Err(PeerHandleError err) {
-                       this(null, bindings.CResult_NonePeerHandleErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_NonePeerHandleErrorZ_clone(this.ptr);
+               Result_NonePeerHandleErrorZ ret_hu_conv = Result_NonePeerHandleErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 0b9e5bf67f5417fa34735fc619b242184ed22ec1..8bce36ee64d066776325405ec9ae3ff2f8de915e 100644 (file)
@@ -24,10 +24,6 @@ public class Result_OpenChannelDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_OpenChannelDecodeErrorZ_OK(OpenChannel res) {
-                       this(null, bindings.CResult_OpenChannelDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_OpenChannelDecodeErrorZ_Err extends Result_OpenChannelDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_OpenChannelDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_OpenChannelDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_OpenChannelDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_OpenChannelDecodeErrorZ_clone(this.ptr);
+               Result_OpenChannelDecodeErrorZ ret_hu_conv = Result_OpenChannelDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 7d46bc260948133c896d201eb6fd6a1b4726fcf5..bed0290b54b7d56c7f3bddb5accc1026dd8c1fcd 100644 (file)
@@ -24,10 +24,6 @@ public class Result_OutPointDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_OutPointDecodeErrorZ_OK(OutPoint res) {
-                       this(null, bindings.CResult_OutPointDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_OutPointDecodeErrorZ_Err extends Result_OutPointDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_OutPointDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_OutPointDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_OutPointDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_OutPointDecodeErrorZ_clone(this.ptr);
+               Result_OutPointDecodeErrorZ ret_hu_conv = Result_OutPointDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index d97504f392227268248781a92ed8959ebc16672e..a2ce4415b77dfbac6f792e6107f03cf8eded8d27 100644 (file)
@@ -24,10 +24,6 @@ public class Result_PingDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_PingDecodeErrorZ_OK(Ping res) {
-                       this(null, bindings.CResult_PingDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_PingDecodeErrorZ_Err extends Result_PingDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_PingDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_PingDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_PingDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_PingDecodeErrorZ_clone(this.ptr);
+               Result_PingDecodeErrorZ ret_hu_conv = Result_PingDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index f690d02ded2114789d106198b1e754753c45fb11..3ccbb31d63d35bcf8e73050fa9630cc5b8e724c1 100644 (file)
@@ -24,10 +24,6 @@ public class Result_PongDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_PongDecodeErrorZ_OK(Pong res) {
-                       this(null, bindings.CResult_PongDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_PongDecodeErrorZ_Err extends Result_PongDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_PongDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_PongDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_PongDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_PongDecodeErrorZ_clone(this.ptr);
+               Result_PongDecodeErrorZ ret_hu_conv = Result_PongDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 2a790f1465ede26e16d4527b50a77504f3ea68d5..3403c9817cac43801fcdd38f0681b746bf100f43 100644 (file)
@@ -21,9 +21,6 @@ public class Result_PublicKeyErrorZ extends CommonBase {
                        super(_dummy, ptr);
                        this.res = bindings.LDKCResult_PublicKeyErrorZ_get_ok(ptr);
                }
-               public Result_PublicKeyErrorZ_OK(Uint8Array res) {
-                       this(null, bindings.CResult_PublicKeyErrorZ_ok(res));
-               }
        }
 
        public static final class Result_PublicKeyErrorZ_Err extends Result_PublicKeyErrorZ {
@@ -32,8 +29,18 @@ public class Result_PublicKeyErrorZ extends CommonBase {
                        super(_dummy, ptr);
                        this.err = bindings.LDKCResult_PublicKeyErrorZ_get_err(ptr);
                }
-               public Result_PublicKeyErrorZ_Err(LDKSecp256k1Error err) {
-                       this(null, bindings.CResult_PublicKeyErrorZ_err(err));
-               }
        }
+
+       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(LDKSecp256k1Error e) {
+               number ret = bindings.CResult_PublicKeyErrorZ_err(e);
+               Result_PublicKeyErrorZ ret_hu_conv = Result_PublicKeyErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index dd80d0842af030678e90a575aa62e9b317a05b15..93c5c144beda06b32b9ef264a76db4ec45c86783 100644 (file)
@@ -24,10 +24,6 @@ public class Result_QueryChannelRangeDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_QueryChannelRangeDecodeErrorZ_OK(QueryChannelRange res) {
-                       this(null, bindings.CResult_QueryChannelRangeDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_QueryChannelRangeDecodeErrorZ_Err extends Result_QueryChannelRangeDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_QueryChannelRangeDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_QueryChannelRangeDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_QueryChannelRangeDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_QueryChannelRangeDecodeErrorZ_clone(this.ptr);
+               Result_QueryChannelRangeDecodeErrorZ ret_hu_conv = Result_QueryChannelRangeDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index b699612e3d3222530d824f023ec6bb30ca5f904a..1f4a84a516a981f88b2a15f8f24b49bd84f5a99d 100644 (file)
@@ -24,10 +24,6 @@ public class Result_QueryShortChannelIdsDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_QueryShortChannelIdsDecodeErrorZ_OK(QueryShortChannelIds res) {
-                       this(null, bindings.CResult_QueryShortChannelIdsDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_QueryShortChannelIdsDecodeErrorZ_Err extends Result_QueryShortChannelIdsDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_QueryShortChannelIdsDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_QueryShortChannelIdsDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_QueryShortChannelIdsDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_QueryShortChannelIdsDecodeErrorZ_clone(this.ptr);
+               Result_QueryShortChannelIdsDecodeErrorZ ret_hu_conv = Result_QueryShortChannelIdsDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 2fd3593e4ec1691d1d10ca8a98f6c4509685b6c4..ae17131021a77c10d3f03884f10506074fb39890 100644 (file)
@@ -24,10 +24,6 @@ public class Result_ReplyChannelRangeDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_ReplyChannelRangeDecodeErrorZ_OK(ReplyChannelRange res) {
-                       this(null, bindings.CResult_ReplyChannelRangeDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_ReplyChannelRangeDecodeErrorZ_Err extends Result_ReplyChannelRangeDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_ReplyChannelRangeDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_ReplyChannelRangeDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_ReplyChannelRangeDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_ReplyChannelRangeDecodeErrorZ_clone(this.ptr);
+               Result_ReplyChannelRangeDecodeErrorZ ret_hu_conv = Result_ReplyChannelRangeDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 23a4f46d3072dc2325b85f9ace10757aa64c9305..33ce0ded58e2052c69016930e02d79c47a67482d 100644 (file)
@@ -24,10 +24,6 @@ public class Result_ReplyShortChannelIdsEndDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_ReplyShortChannelIdsEndDecodeErrorZ_OK(ReplyShortChannelIdsEnd res) {
-                       this(null, bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_ReplyShortChannelIdsEndDecodeErrorZ_Err extends Result_ReplyShortChannelIdsEndDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_ReplyShortChannelIdsEndDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_ReplyShortChannelIdsEndDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(this.ptr);
+               Result_ReplyShortChannelIdsEndDecodeErrorZ ret_hu_conv = Result_ReplyShortChannelIdsEndDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 30426fd1ddef9bd7f6a27bac84c76151f30d075d..9a125b63cd6e48b595e1dd6782df98c2e03f29be 100644 (file)
@@ -24,10 +24,6 @@ public class Result_RevokeAndACKDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_RevokeAndACKDecodeErrorZ_OK(RevokeAndACK res) {
-                       this(null, bindings.CResult_RevokeAndACKDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_RevokeAndACKDecodeErrorZ_Err extends Result_RevokeAndACKDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_RevokeAndACKDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_RevokeAndACKDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_RevokeAndACKDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_RevokeAndACKDecodeErrorZ_clone(this.ptr);
+               Result_RevokeAndACKDecodeErrorZ ret_hu_conv = Result_RevokeAndACKDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index ce596cb24bdfa1d2832a5ebe8fa0b91e2787fbb3..2a34d4498014fa3ad6e2cd2ffaec1f9bf1ae1038 100644 (file)
@@ -24,10 +24,6 @@ public class Result_RouteDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_RouteDecodeErrorZ_OK(Route res) {
-                       this(null, bindings.CResult_RouteDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_RouteDecodeErrorZ_Err extends Result_RouteDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_RouteDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_RouteDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_RouteDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_RouteDecodeErrorZ_clone(this.ptr);
+               Result_RouteDecodeErrorZ ret_hu_conv = Result_RouteDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 8c84374bcdabbac492f88a99304865897b330535..47f961ea5e4671b78731403de444e9040c8c1221 100644 (file)
@@ -24,10 +24,6 @@ public class Result_RouteLightningErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_RouteLightningErrorZ_OK(Route res) {
-                       this(null, bindings.CResult_RouteLightningErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_RouteLightningErrorZ_Err extends Result_RouteLightningErrorZ {
@@ -39,9 +35,26 @@ public class Result_RouteLightningErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_RouteLightningErrorZ_Err(LightningError err) {
-                       this(null, bindings.CResult_RouteLightningErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_RouteLightningErrorZ_clone(this.ptr);
+               Result_RouteLightningErrorZ ret_hu_conv = Result_RouteLightningErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index e8aef3a95b564601b90bf068c553878ce13f4f7d..851ef573668c233a52e321ae7894eb1d05e7e578 100644 (file)
@@ -24,10 +24,6 @@ public class Result_RoutingFeesDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_RoutingFeesDecodeErrorZ_OK(RoutingFees res) {
-                       this(null, bindings.CResult_RoutingFeesDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_RoutingFeesDecodeErrorZ_Err extends Result_RoutingFeesDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_RoutingFeesDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_RoutingFeesDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_RoutingFeesDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_RoutingFeesDecodeErrorZ_clone(this.ptr);
+               Result_RoutingFeesDecodeErrorZ ret_hu_conv = Result_RoutingFeesDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 727c4b29810a2c9334f52a6efded7b7255a689ea..b21a0513cd0ac3694dea5508a82fc7c8df0873b4 100644 (file)
@@ -21,9 +21,6 @@ public class Result_SecretKeyErrorZ extends CommonBase {
                        super(_dummy, ptr);
                        this.res = bindings.LDKCResult_SecretKeyErrorZ_get_ok(ptr);
                }
-               public Result_SecretKeyErrorZ_OK(Uint8Array res) {
-                       this(null, bindings.CResult_SecretKeyErrorZ_ok(res));
-               }
        }
 
        public static final class Result_SecretKeyErrorZ_Err extends Result_SecretKeyErrorZ {
@@ -32,8 +29,18 @@ public class Result_SecretKeyErrorZ extends CommonBase {
                        super(_dummy, ptr);
                        this.err = bindings.LDKCResult_SecretKeyErrorZ_get_err(ptr);
                }
-               public Result_SecretKeyErrorZ_Err(LDKSecp256k1Error err) {
-                       this(null, bindings.CResult_SecretKeyErrorZ_err(err));
-               }
        }
+
+       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(LDKSecp256k1Error e) {
+               number ret = bindings.CResult_SecretKeyErrorZ_err(e);
+               Result_SecretKeyErrorZ ret_hu_conv = Result_SecretKeyErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 6b53c424b4902ce90eefe7c101dc0d621161b115..1c0c82d6201ed6fe28c63d78b2d1a3e75fc7e5ac 100644 (file)
@@ -24,10 +24,6 @@ public class Result_ShutdownDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_ShutdownDecodeErrorZ_OK(Shutdown res) {
-                       this(null, bindings.CResult_ShutdownDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_ShutdownDecodeErrorZ_Err extends Result_ShutdownDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_ShutdownDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_ShutdownDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_ShutdownDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_ShutdownDecodeErrorZ_clone(this.ptr);
+               Result_ShutdownDecodeErrorZ ret_hu_conv = Result_ShutdownDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 005c0a0317ce5a3de9ddb691bcf8e206d520c16a..9fa88d158d223c3b662a534bf5fd1fe3f33b2b26 100644 (file)
@@ -24,10 +24,6 @@ public class Result_SignDecodeErrorZ extends CommonBase {
                        ret_hu_conv.ptrs_to.add(this);
                        this.res = ret_hu_conv;
                }
-               public Result_SignDecodeErrorZ_OK(Sign res) {
-                       this(null, bindings.CResult_SignDecodeErrorZ_ok(res == null ? 0 : res.ptr));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_SignDecodeErrorZ_Err extends Result_SignDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_SignDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_SignDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_SignDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_SignDecodeErrorZ_clone(this.ptr);
+               Result_SignDecodeErrorZ ret_hu_conv = Result_SignDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 56faaa4f5c5bf175ac0a6c4b68cdbd5372755f46..0f884fda9e81777a66bd84d7034c6c0e737c80eb 100644 (file)
@@ -21,17 +21,30 @@ public class Result_SignatureNoneZ extends CommonBase {
                        super(_dummy, ptr);
                        this.res = bindings.LDKCResult_SignatureNoneZ_get_ok(ptr);
                }
-               public Result_SignatureNoneZ_OK(Uint8Array res) {
-                       this(null, bindings.CResult_SignatureNoneZ_ok(res));
-               }
        }
 
        public static final class Result_SignatureNoneZ_Err extends Result_SignatureNoneZ {
                private Result_SignatureNoneZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                }
-               public Result_SignatureNoneZ_Err() {
-                       this(null, bindings.CResult_SignatureNoneZ_err());
-               }
        }
+
+       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() {
+               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() {
+               number ret = bindings.CResult_SignatureNoneZ_clone(this.ptr);
+               Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 380336119b673bd26f593d2d096df0f77ed8de7c..c47948faba8023dc9be155149562c7aeb77d917f 100644 (file)
@@ -24,9 +24,6 @@ public class Result_SpendableOutputDescriptorDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_SpendableOutputDescriptorDecodeErrorZ_OK(SpendableOutputDescriptor res) {
-                       this(null, bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_ok(res.ptr));
-               }
        }
 
        public static final class Result_SpendableOutputDescriptorDecodeErrorZ_Err extends Result_SpendableOutputDescriptorDecodeErrorZ {
@@ -38,9 +35,25 @@ public class Result_SpendableOutputDescriptorDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_SpendableOutputDescriptorDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_clone(this.ptr);
+               Result_SpendableOutputDescriptorDecodeErrorZ ret_hu_conv = Result_SpendableOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index b6abe50304f71a62c213f7d8e76aacd701e2672f..b173cec3c96ae0a83cc5254fbcbd9c8db1eec21a 100644 (file)
@@ -21,17 +21,24 @@ public class Result_TransactionNoneZ extends CommonBase {
                        super(_dummy, ptr);
                        this.res = bindings.LDKCResult_TransactionNoneZ_get_ok(ptr);
                }
-               public Result_TransactionNoneZ_OK(Uint8Array res) {
-                       this(null, bindings.CResult_TransactionNoneZ_ok(res));
-               }
        }
 
        public static final class Result_TransactionNoneZ_Err extends Result_TransactionNoneZ {
                private Result_TransactionNoneZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                }
-               public Result_TransactionNoneZ_Err() {
-                       this(null, bindings.CResult_TransactionNoneZ_err());
-               }
        }
+
+       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() {
+               number ret = bindings.CResult_TransactionNoneZ_err();
+               Result_TransactionNoneZ ret_hu_conv = Result_TransactionNoneZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 798db4f52b2f7f6cc3a271976c4abe3246839f4b..641a008f99c595859a9a6c730078072706f0c970 100644 (file)
@@ -24,26 +24,33 @@ public class Result_TrustedCommitmentTransactionNoneZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_TrustedCommitmentTransactionNoneZ_OK(TrustedCommitmentTransaction res) {
-                       this(null, bindings.CResult_TrustedCommitmentTransactionNoneZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-                       // Due to rust's strict-ownership memory model, in some cases we need to "move"
-                       // an object to pass exclusive ownership to the function being called.
-                       // In most cases, we avoid this being visible in GC'd languages by cloning the object
-                       // at the FFI layer, creating a new object which Rust can claim ownership of
-                       // However, in some cases (eg here), there is no way to clone an object, and thus
-                       // we actually have to pass full ownership to Rust.
-                       // Thus, after this call, res is reset to null and is now a dummy object.
-                       res.ptr = 0;
-               }
        }
 
        public static final class Result_TrustedCommitmentTransactionNoneZ_Err extends Result_TrustedCommitmentTransactionNoneZ {
                private Result_TrustedCommitmentTransactionNoneZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                }
-               public Result_TrustedCommitmentTransactionNoneZ_Err() {
-                       this(null, bindings.CResult_TrustedCommitmentTransactionNoneZ_err());
-               }
        }
+
+       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);
+               // 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 is reset to null and is now a dummy object.
+               o.ptr = 0;
+               return ret_hu_conv;
+       }
+
+       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 d58dcaf5839a62dcb1d9addb17252cbbbb2ed4f1..fece556fe6085df23eab8d91f78afff5a0d0a381 100644 (file)
@@ -24,10 +24,6 @@ public class Result_TxCreationKeysDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_TxCreationKeysDecodeErrorZ_OK(TxCreationKeys res) {
-                       this(null, bindings.CResult_TxCreationKeysDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_TxCreationKeysDecodeErrorZ_Err extends Result_TxCreationKeysDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_TxCreationKeysDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_TxCreationKeysDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_TxCreationKeysDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_TxCreationKeysDecodeErrorZ_clone(this.ptr);
+               Result_TxCreationKeysDecodeErrorZ ret_hu_conv = Result_TxCreationKeysDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 964be8842bed4fd6d12470d1317560c1e3eaafe7..ab2a7315584b5e32bbc42933cf74b3546bf32f61 100644 (file)
@@ -24,10 +24,6 @@ public class Result_TxCreationKeysErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_TxCreationKeysErrorZ_OK(TxCreationKeys res) {
-                       this(null, bindings.CResult_TxCreationKeysErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_TxCreationKeysErrorZ_Err extends Result_TxCreationKeysErrorZ {
@@ -36,8 +32,19 @@ public class Result_TxCreationKeysErrorZ extends CommonBase {
                        super(_dummy, ptr);
                        this.err = bindings.LDKCResult_TxCreationKeysErrorZ_get_err(ptr);
                }
-               public Result_TxCreationKeysErrorZ_Err(LDKSecp256k1Error err) {
-                       this(null, bindings.CResult_TxCreationKeysErrorZ_err(err));
-               }
        }
+
+       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(LDKSecp256k1Error e) {
+               number ret = bindings.CResult_TxCreationKeysErrorZ_err(e);
+               Result_TxCreationKeysErrorZ ret_hu_conv = Result_TxCreationKeysErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 53a09f17769749f39e943da2ec1ca3a312238df0..aebc16244d55830164702068c6ddf0eab3f1505c 100644 (file)
@@ -23,9 +23,6 @@ public class Result_TxOutAccessErrorZ extends CommonBase {
                        TxOut res_conv = new TxOut(null, res);
                        this.res = res_conv;
                }
-               public Result_TxOutAccessErrorZ_OK(TxOut res) {
-                       this(null, bindings.CResult_TxOutAccessErrorZ_ok(res.ptr));
-               }
        }
 
        public static final class Result_TxOutAccessErrorZ_Err extends Result_TxOutAccessErrorZ {
@@ -34,8 +31,24 @@ public class Result_TxOutAccessErrorZ extends CommonBase {
                        super(_dummy, ptr);
                        this.err = bindings.LDKCResult_TxOutAccessErrorZ_get_err(ptr);
                }
-               public Result_TxOutAccessErrorZ_Err(LDKAccessError err) {
-                       this(null, bindings.CResult_TxOutAccessErrorZ_err(err));
-               }
        }
+
+       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(LDKAccessError 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() {
+               number ret = bindings.CResult_TxOutAccessErrorZ_clone(this.ptr);
+               Result_TxOutAccessErrorZ ret_hu_conv = Result_TxOutAccessErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 4d1dab8eb3f3391f16f313a12cb016eff465af35..f0ed63edb9a65078c3dde275b4b90179c456efb0 100644 (file)
@@ -24,10 +24,6 @@ public class Result_UnsignedChannelAnnouncementDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_UnsignedChannelAnnouncementDecodeErrorZ_OK(UnsignedChannelAnnouncement res) {
-                       this(null, bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_UnsignedChannelAnnouncementDecodeErrorZ_Err extends Result_UnsignedChannelAnnouncementDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_UnsignedChannelAnnouncementDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_UnsignedChannelAnnouncementDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(this.ptr);
+               Result_UnsignedChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index c9f8fca10a705baf5e473d1606deb75c22c2ae69..a77733fd80521f2bab631d281a86b59f57152174 100644 (file)
@@ -24,10 +24,6 @@ public class Result_UnsignedChannelUpdateDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_UnsignedChannelUpdateDecodeErrorZ_OK(UnsignedChannelUpdate res) {
-                       this(null, bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_UnsignedChannelUpdateDecodeErrorZ_Err extends Result_UnsignedChannelUpdateDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_UnsignedChannelUpdateDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_UnsignedChannelUpdateDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_clone(this.ptr);
+               Result_UnsignedChannelUpdateDecodeErrorZ ret_hu_conv = Result_UnsignedChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 9bf0f9e589570ca7e25410ff5fa2c31244d32bb6..7431e082a00e27b32bad6b60b18296cbcb9f75d4 100644 (file)
@@ -24,10 +24,6 @@ public class Result_UnsignedNodeAnnouncementDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_UnsignedNodeAnnouncementDecodeErrorZ_OK(UnsignedNodeAnnouncement res) {
-                       this(null, bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_UnsignedNodeAnnouncementDecodeErrorZ_Err extends Result_UnsignedNodeAnnouncementDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_UnsignedNodeAnnouncementDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_UnsignedNodeAnnouncementDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(this.ptr);
+               Result_UnsignedNodeAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedNodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 5e1b94fac76819e8cb944c644bafc31234f5ffc9..0f0e7c282f52ba3392e65ca0e1ce3751d9595d4d 100644 (file)
@@ -24,10 +24,6 @@ public class Result_UpdateAddHTLCDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_UpdateAddHTLCDecodeErrorZ_OK(UpdateAddHTLC res) {
-                       this(null, bindings.CResult_UpdateAddHTLCDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_UpdateAddHTLCDecodeErrorZ_Err extends Result_UpdateAddHTLCDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_UpdateAddHTLCDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_UpdateAddHTLCDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_UpdateAddHTLCDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_UpdateAddHTLCDecodeErrorZ_clone(this.ptr);
+               Result_UpdateAddHTLCDecodeErrorZ ret_hu_conv = Result_UpdateAddHTLCDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index f1b6b73293603fb5c50a3a861da7304bde334715..b8a0a378e1b24ddda8f705e689725b294b7d216c 100644 (file)
@@ -24,10 +24,6 @@ public class Result_UpdateFailHTLCDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_UpdateFailHTLCDecodeErrorZ_OK(UpdateFailHTLC res) {
-                       this(null, bindings.CResult_UpdateFailHTLCDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_UpdateFailHTLCDecodeErrorZ_Err extends Result_UpdateFailHTLCDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_UpdateFailHTLCDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_UpdateFailHTLCDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_UpdateFailHTLCDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_UpdateFailHTLCDecodeErrorZ_clone(this.ptr);
+               Result_UpdateFailHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailHTLCDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 8b05b5a289c1bc441e013442cc1c3049d316623e..b56c04a54a67ed66615e67d2fc8b1c7dfe5459c3 100644 (file)
@@ -24,10 +24,6 @@ public class Result_UpdateFailMalformedHTLCDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_UpdateFailMalformedHTLCDecodeErrorZ_OK(UpdateFailMalformedHTLC res) {
-                       this(null, bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_UpdateFailMalformedHTLCDecodeErrorZ_Err extends Result_UpdateFailMalformedHTLCDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_UpdateFailMalformedHTLCDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_UpdateFailMalformedHTLCDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(this.ptr);
+               Result_UpdateFailMalformedHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailMalformedHTLCDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index abb01dd7fe885f2b57a6cbf06fbfae98d077bff3..8f124ba501e86f1cb7d6c18a0293b3fdb714417a 100644 (file)
@@ -24,10 +24,6 @@ public class Result_UpdateFeeDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_UpdateFeeDecodeErrorZ_OK(UpdateFee res) {
-                       this(null, bindings.CResult_UpdateFeeDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_UpdateFeeDecodeErrorZ_Err extends Result_UpdateFeeDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_UpdateFeeDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_UpdateFeeDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_UpdateFeeDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_UpdateFeeDecodeErrorZ_clone(this.ptr);
+               Result_UpdateFeeDecodeErrorZ ret_hu_conv = Result_UpdateFeeDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 4899f6fc437795b068b0496e3a7d74b3e7112c81..39d38c4e0d7b112290fb4fa43cb6a6c67439c04b 100644 (file)
@@ -24,10 +24,6 @@ public class Result_UpdateFulfillHTLCDecodeErrorZ extends CommonBase {
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
-               public Result_UpdateFulfillHTLCDecodeErrorZ_OK(UpdateFulfillHTLC res) {
-                       this(null, bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
        }
 
        public static final class Result_UpdateFulfillHTLCDecodeErrorZ_Err extends Result_UpdateFulfillHTLCDecodeErrorZ {
@@ -39,9 +35,26 @@ public class Result_UpdateFulfillHTLCDecodeErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_UpdateFulfillHTLCDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_clone(this.ptr);
+               Result_UpdateFulfillHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFulfillHTLCDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 1b5ac3dd566b326e1edf94267dd4dd3625b1d7fb..454ecdc6dcd8949dd48550f7f6b85ef36179eb02 100644 (file)
@@ -21,9 +21,6 @@ public class Result_boolLightningErrorZ extends CommonBase {
                        super(_dummy, ptr);
                        this.res = bindings.LDKCResult_boolLightningErrorZ_get_ok(ptr);
                }
-               public Result_boolLightningErrorZ_OK(boolean res) {
-                       this(null, bindings.CResult_boolLightningErrorZ_ok(res));
-               }
        }
 
        public static final class Result_boolLightningErrorZ_Err extends Result_boolLightningErrorZ {
@@ -35,9 +32,25 @@ public class Result_boolLightningErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_boolLightningErrorZ_Err(LightningError err) {
-                       this(null, bindings.CResult_boolLightningErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_boolLightningErrorZ_clone(this.ptr);
+               Result_boolLightningErrorZ ret_hu_conv = Result_boolLightningErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index c1a720dea7a1f74245ff85bb26bcd53257bafe2a..e91e237eceb35e5b4e92435802dcdb8fa11d114c 100644 (file)
@@ -21,9 +21,6 @@ public class Result_boolPeerHandleErrorZ extends CommonBase {
                        super(_dummy, ptr);
                        this.res = bindings.LDKCResult_boolPeerHandleErrorZ_get_ok(ptr);
                }
-               public Result_boolPeerHandleErrorZ_OK(boolean res) {
-                       this(null, bindings.CResult_boolPeerHandleErrorZ_ok(res));
-               }
        }
 
        public static final class Result_boolPeerHandleErrorZ_Err extends Result_boolPeerHandleErrorZ {
@@ -35,9 +32,25 @@ public class Result_boolPeerHandleErrorZ extends CommonBase {
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
-               public Result_boolPeerHandleErrorZ_Err(PeerHandleError err) {
-                       this(null, bindings.CResult_boolPeerHandleErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
        }
+
+       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) {
+               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() {
+               number ret = bindings.CResult_boolPeerHandleErrorZ_clone(this.ptr);
+               Result_boolPeerHandleErrorZ ret_hu_conv = Result_boolPeerHandleErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 9e0474f570694d33499e9c6882b70c13383f0354..babcda0f4fd32fff0758e8408c56082f83a12635 100644 (file)
@@ -57,6 +57,36 @@ import * as bindings from '../bindings' // TODO: figure out location
                bindings.RouteHint_set_cltv_expiry_delta(this.ptr, val);
        }
 
+       public Option_u64Z get_htlc_minimum_msat() {
+               number ret = bindings.RouteHint_get_htlc_minimum_msat(this.ptr);
+               Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public void set_htlc_minimum_msat(Option_u64Z val) {
+               bindings.RouteHint_set_htlc_minimum_msat(this.ptr, val.ptr);
+       }
+
+       public Option_u64Z get_htlc_maximum_msat() {
+               number ret = bindings.RouteHint_get_htlc_maximum_msat(this.ptr);
+               Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public void set_htlc_maximum_msat(Option_u64Z val) {
+               bindings.RouteHint_set_htlc_maximum_msat(this.ptr, val.ptr);
+       }
+
+       public static RouteHint constructor_new(Uint8Array src_node_id_arg, number short_channel_id_arg, RoutingFees fees_arg, number cltv_expiry_delta_arg, Option_u64Z htlc_minimum_msat_arg, Option_u64Z htlc_maximum_msat_arg) {
+               number ret = bindings.RouteHint_new(src_node_id_arg, short_channel_id_arg, fees_arg == null ? 0 : fees_arg.ptr & ~1, cltv_expiry_delta_arg, htlc_minimum_msat_arg.ptr, htlc_maximum_msat_arg.ptr);
+               const ret_hu_conv: RouteHint = new RouteHint(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               ret_hu_conv.ptrs_to.add(fees_arg);
+               return ret_hu_conv;
+       }
+
        public RouteHint clone() {
                number ret = bindings.RouteHint_clone(this.ptr);
                const ret_hu_conv: RouteHint = new RouteHint(null, ret);
index b2481d75d6f97322db917c3c8f5e155676f0f92a..caf6286f85360060f8fd5a397a0f01605dade792 100644 (file)
@@ -38,12 +38,41 @@ export class StaticOutput extends SpendableOutputDescriptor {
        }
 }
 export class DelayedPaymentOutput extends SpendableOutputDescriptor {
+       public delayed_payment_output: DelayedPaymentOutputDescriptor;
        private constructor(ptr: number, obj: bindings.LDKSpendableOutputDescriptor.DelayedPaymentOutput) {
                super(null, ptr);
+               const delayed_payment_output: number = obj.delayed_payment_output;
+               const delayed_payment_output_hu_conv: DelayedPaymentOutputDescriptor = new DelayedPaymentOutputDescriptor(null, delayed_payment_output);
+                       delayed_payment_output_hu_conv.ptrs_to.add(this);
+               this.delayed_payment_output = delayed_payment_output_hu_conv;
        }
 }
 export class StaticPaymentOutput extends SpendableOutputDescriptor {
+       public static_payment_output: StaticPaymentOutputDescriptor;
        private constructor(ptr: number, obj: bindings.LDKSpendableOutputDescriptor.StaticPaymentOutput) {
                super(null, ptr);
+               const static_payment_output: number = obj.static_payment_output;
+               const static_payment_output_hu_conv: StaticPaymentOutputDescriptor = new StaticPaymentOutputDescriptor(null, static_payment_output);
+                       static_payment_output_hu_conv.ptrs_to.add(this);
+               this.static_payment_output = static_payment_output_hu_conv;
        }
+}
+       public SpendableOutputDescriptor clone() {
+               number ret = bindings.SpendableOutputDescriptor_clone(this.ptr);
+               SpendableOutputDescriptor ret_hu_conv = SpendableOutputDescriptor.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public Uint8Array write() {
+               Uint8Array ret = bindings.SpendableOutputDescriptor_write(this.ptr);
+               return ret;
+       }
+
+       public static Result_SpendableOutputDescriptorDecodeErrorZ constructor_read(Uint8Array ser) {
+               number ret = bindings.SpendableOutputDescriptor_read(ser);
+               Result_SpendableOutputDescriptorDecodeErrorZ ret_hu_conv = Result_SpendableOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
diff --git a/ts/structs/WatchedOutput.ts b/ts/structs/WatchedOutput.ts
new file mode 100644 (file)
index 0000000..c0c0515
--- /dev/null
@@ -0,0 +1,59 @@
+
+            
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+
+
+            export default class WatchedOutput extends CommonBase {
+                constructor(_dummy: object, ptr: number) {
+                    super(ptr);
+                }
+
+                
+                protected finalize() {
+                    super.finalize();
+
+                    if (this.ptr != 0) {
+                        bindings.WatchedOutput_free(this.ptr);
+                    }
+                }
+       public Uint8Array get_block_hash() {
+               Uint8Array ret = bindings.WatchedOutput_get_block_hash(this.ptr);
+               return ret;
+       }
+
+       public void set_block_hash(Uint8Array val) {
+               bindings.WatchedOutput_set_block_hash(this.ptr, val);
+       }
+
+       public OutPoint get_outpoint() {
+               number ret = bindings.WatchedOutput_get_outpoint(this.ptr);
+               const ret_hu_conv: OutPoint = new OutPoint(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public void set_outpoint(OutPoint val) {
+               bindings.WatchedOutput_set_outpoint(this.ptr, val == null ? 0 : val.ptr & ~1);
+               this.ptrs_to.add(val);
+       }
+
+       public Uint8Array get_script_pubkey() {
+               Uint8Array ret = bindings.WatchedOutput_get_script_pubkey(this.ptr);
+               return ret;
+       }
+
+       public void set_script_pubkey(Uint8Array val) {
+               bindings.WatchedOutput_set_script_pubkey(this.ptr, val);
+       }
+
+       public static WatchedOutput constructor_new(Uint8Array block_hash_arg, OutPoint outpoint_arg, Uint8Array script_pubkey_arg) {
+               number ret = bindings.WatchedOutput_new(block_hash_arg, outpoint_arg == null ? 0 : outpoint_arg.ptr & ~1, script_pubkey_arg);
+               const ret_hu_conv: WatchedOutput = new WatchedOutput(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               ret_hu_conv.ptrs_to.add(outpoint_arg);
+               return ret_hu_conv;
+       }
+
+}