package org.ldk.impl;
import org.ldk.enums.*;
+import org.ldk.impl.version;
import java.io.File;
import java.io.InputStream;
import java.io.IOException;
Path libpath = new File(tmpdir.toPath().toString(), "liblightningjni.so").toPath();
Files.copy(is, libpath, StandardCopyOption.REPLACE_EXISTING);
Runtime.getRuntime().load(libpath.toString());
- } catch (IOException e) {
+ } catch (Exception e) {
System.err.println("Failed to load LDK native library.");
System.err.println("System LDK native library load failed with: " + system_load_err);
System.err.println("Resource-based LDK native library load failed with: " + e);
}
init(java.lang.Enum.class, VecOrSliceDef.class);
init_class_cache();
- if (!get_lib_version_string().equals(get_ldk_java_bindings_version()))
+ if (!get_lib_version_string().equals(version.get_ldk_java_bindings_version()))
throw new IllegalArgumentException("Compiled LDK library and LDK class failes do not match");
// Fetching the LDK versions from C also checks that the header and binaries match
get_ldk_c_bindings_version();
static native void init_class_cache();
static native String get_lib_version_string();
- public static String get_ldk_java_bindings_version() {
- return "v0.0.101.0";
- }
public static native String get_ldk_c_bindings_version();
public static native String get_ldk_version();
public static native long LDKCResult_TxOutAccessErrorZ_get_ok(long arg);
public static native AccessError LDKCResult_TxOutAccessErrorZ_get_err(long arg);
public static native long LDKC2Tuple_usizeTransactionZ_new(long a, byte[] b);
- public static native long LDKC2Tuple_usizeTransactionZ_get_a(long ptr);
- public static native byte[] LDKC2Tuple_usizeTransactionZ_get_b(long ptr);
+ // uintptr_t C2Tuple_usizeTransactionZ_get_a(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR tuple);
+ public static native long C2Tuple_usizeTransactionZ_get_a(long tuple);
+ // struct LDKTransaction C2Tuple_usizeTransactionZ_get_b(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR tuple);
+ public static native byte[] C2Tuple_usizeTransactionZ_get_b(long tuple);
public static native long LDKCVec_C2Tuple_usizeTransactionZZ_new(long[] elems);
public static native boolean LDKCResult_NoneChannelMonitorUpdateErrZ_result_ok(long arg);
public static native void LDKCResult_NoneChannelMonitorUpdateErrZ_get_ok(long arg);
public static native void LDKCResult_NoneNoneZ_get_ok(long arg);
public static native void LDKCResult_NoneNoneZ_get_err(long arg);
public static native long LDKC2Tuple_SignatureCVec_SignatureZZ_new(byte[] a, byte[][] b);
- public static native byte[] LDKC2Tuple_SignatureCVec_SignatureZZ_get_a(long ptr);
- public static native byte[][] LDKC2Tuple_SignatureCVec_SignatureZZ_get_b(long ptr);
+ // struct LDKSignature C2Tuple_SignatureCVec_SignatureZZ_get_a(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR tuple);
+ public static native byte[] C2Tuple_SignatureCVec_SignatureZZ_get_a(long tuple);
+ // struct LDKCVec_SignatureZ C2Tuple_SignatureCVec_SignatureZZ_get_b(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR tuple);
+ public static native byte[][] C2Tuple_SignatureCVec_SignatureZZ_get_b(long tuple);
public static native boolean LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_result_ok(long arg);
public static native long LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(long arg);
public static native void LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(long arg);
public static native byte[] LDKCResult_TransactionNoneZ_get_ok(long arg);
public static native void LDKCResult_TransactionNoneZ_get_err(long arg);
public static native long LDKC2Tuple_BlockHashChannelMonitorZ_new(byte[] a, long b);
- public static native byte[] LDKC2Tuple_BlockHashChannelMonitorZ_get_a(long ptr);
- public static native long LDKC2Tuple_BlockHashChannelMonitorZ_get_b(long ptr);
+ // struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelMonitorZ_get_a(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR tuple);
+ public static native byte[] C2Tuple_BlockHashChannelMonitorZ_get_a(long tuple);
+ // struct LDKChannelMonitor C2Tuple_BlockHashChannelMonitorZ_get_b(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR tuple);
+ public static native long C2Tuple_BlockHashChannelMonitorZ_get_b(long tuple);
public static native long LDKCVec_C2Tuple_BlockHashChannelMonitorZZ_new(long[] elems);
public static native boolean LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_result_ok(long arg);
public static native long[] LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_ok(long arg);
public static native LDKNetAddress LDKNetAddress_ref_from_ptr(long ptr);
public static native long LDKCVec_NetAddressZ_new(long[] elems);
public static native long LDKC2Tuple_PaymentHashPaymentSecretZ_new(byte[] a, byte[] b);
- public static native byte[] LDKC2Tuple_PaymentHashPaymentSecretZ_get_a(long ptr);
- public static native byte[] LDKC2Tuple_PaymentHashPaymentSecretZ_get_b(long ptr);
+ // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_a(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR tuple);
+ public static native byte[] C2Tuple_PaymentHashPaymentSecretZ_get_a(long tuple);
+ // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_b(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR tuple);
+ public static native byte[] C2Tuple_PaymentHashPaymentSecretZ_get_b(long tuple);
public static native boolean LDKCResult_PaymentSecretAPIErrorZ_result_ok(long arg);
public static native byte[] LDKCResult_PaymentSecretAPIErrorZ_get_ok(long arg);
public static native long LDKCResult_PaymentSecretAPIErrorZ_get_err(long arg);
}
public static native long LDKLogger_new(LDKLogger impl);
public static native long LDKC2Tuple_BlockHashChannelManagerZ_new(byte[] a, long b);
- public static native byte[] LDKC2Tuple_BlockHashChannelManagerZ_get_a(long ptr);
- public static native long LDKC2Tuple_BlockHashChannelManagerZ_get_b(long ptr);
+ // struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelManagerZ_get_a(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR tuple);
+ public static native byte[] C2Tuple_BlockHashChannelManagerZ_get_a(long tuple);
+ // struct LDKChannelManager *C2Tuple_BlockHashChannelManagerZ_get_b(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR tuple);
+ public static native long C2Tuple_BlockHashChannelManagerZ_get_b(long tuple);
public static native boolean LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_result_ok(long arg);
public static native long LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(long arg);
public static native long LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(long arg);
public static native long LDKCResult_SignedRawInvoiceNoneZ_get_ok(long arg);
public static native void LDKCResult_SignedRawInvoiceNoneZ_get_err(long arg);
public static native long LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_new(long a, byte[] b, long c);
- public static native long LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(long ptr);
- public static native byte[] LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(long ptr);
- public static native long LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(long ptr);
+ // struct LDKRawInvoice C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple);
+ public static native long C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(long tuple);
+ // struct LDKThirtyTwoBytes C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple);
+ public static native byte[] C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(long tuple);
+ // struct LDKInvoiceSignature C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple);
+ public static native long C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(long tuple);
public static native boolean LDKCResult_PayeePubKeyErrorZ_result_ok(long arg);
public static native long LDKCResult_PayeePubKeyErrorZ_get_ok(long arg);
public static native Secp256k1Error LDKCResult_PayeePubKeyErrorZ_get_err(long arg);
public static native void LDKCResult_NoneMonitorUpdateErrorZ_get_ok(long arg);
public static native long LDKCResult_NoneMonitorUpdateErrorZ_get_err(long arg);
public static native long LDKC2Tuple_OutPointScriptZ_new(long a, byte[] b);
- public static native long LDKC2Tuple_OutPointScriptZ_get_a(long ptr);
- public static native byte[] LDKC2Tuple_OutPointScriptZ_get_b(long ptr);
+ // struct LDKOutPoint C2Tuple_OutPointScriptZ_get_a(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR tuple);
+ public static native long C2Tuple_OutPointScriptZ_get_a(long tuple);
+ // struct LDKCVec_u8Z C2Tuple_OutPointScriptZ_get_b(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR tuple);
+ public static native byte[] C2Tuple_OutPointScriptZ_get_b(long tuple);
public static native long LDKC2Tuple_u32ScriptZ_new(int a, byte[] b);
- public static native int LDKC2Tuple_u32ScriptZ_get_a(long ptr);
- public static native byte[] LDKC2Tuple_u32ScriptZ_get_b(long ptr);
+ // uint32_t C2Tuple_u32ScriptZ_get_a(LDKC2Tuple_u32ScriptZ *NONNULL_PTR tuple);
+ public static native int C2Tuple_u32ScriptZ_get_a(long tuple);
+ // struct LDKCVec_u8Z C2Tuple_u32ScriptZ_get_b(LDKC2Tuple_u32ScriptZ *NONNULL_PTR tuple);
+ public static native byte[] C2Tuple_u32ScriptZ_get_b(long tuple);
public static native long LDKCVec_C2Tuple_u32ScriptZZ_new(long[] elems);
public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(byte[] a, long[] b);
- public static native byte[] LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(long ptr);
- public static native long[] LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(long ptr);
+ // struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR tuple);
+ public static native byte[] C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(long tuple);
+ // struct LDKCVec_C2Tuple_u32ScriptZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR tuple);
+ public static native long[] C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(long tuple);
public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_new(long[] elems);
public static class LDKPaymentPurpose {
private LDKPaymentPurpose() {}
public static native LDKEvent LDKEvent_ref_from_ptr(long ptr);
public static native long LDKCVec_EventZ_new(long[] elems);
public static native long LDKC2Tuple_u32TxOutZ_new(int a, long b);
- public static native int LDKC2Tuple_u32TxOutZ_get_a(long ptr);
- public static native long LDKC2Tuple_u32TxOutZ_get_b(long ptr);
+ // uint32_t C2Tuple_u32TxOutZ_get_a(LDKC2Tuple_u32TxOutZ *NONNULL_PTR tuple);
+ public static native int C2Tuple_u32TxOutZ_get_a(long tuple);
+ // struct LDKTxOut C2Tuple_u32TxOutZ_get_b(LDKC2Tuple_u32TxOutZ *NONNULL_PTR tuple);
+ public static native long C2Tuple_u32TxOutZ_get_b(long tuple);
public static native long LDKCVec_C2Tuple_u32TxOutZZ_new(long[] elems);
public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(byte[] a, long[] b);
- public static native byte[] LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(long ptr);
- public static native long[] LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(long ptr);
+ // struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR tuple);
+ public static native byte[] C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(long tuple);
+ // struct LDKCVec_C2Tuple_u32TxOutZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR tuple);
+ public static native long[] C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(long tuple);
public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_new(long[] elems);
public static class LDKBalance {
private LDKBalance() {}
public static native void LDKCResult_NoneLightningErrorZ_get_ok(long arg);
public static native long LDKCResult_NoneLightningErrorZ_get_err(long arg);
public static native long LDKC2Tuple_PublicKeyTypeZ_new(byte[] a, long b);
- public static native byte[] LDKC2Tuple_PublicKeyTypeZ_get_a(long ptr);
- public static native long LDKC2Tuple_PublicKeyTypeZ_get_b(long ptr);
+ // struct LDKPublicKey C2Tuple_PublicKeyTypeZ_get_a(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR tuple);
+ public static native byte[] C2Tuple_PublicKeyTypeZ_get_a(long tuple);
+ // struct LDKType C2Tuple_PublicKeyTypeZ_get_b(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR tuple);
+ public static native long C2Tuple_PublicKeyTypeZ_get_b(long tuple);
public static native long LDKCVec_C2Tuple_PublicKeyTypeZZ_new(long[] elems);
public static native boolean LDKCResult_boolLightningErrorZ_result_ok(long arg);
public static native boolean LDKCResult_boolLightningErrorZ_get_ok(long arg);
public static native long LDKCResult_boolLightningErrorZ_get_err(long arg);
public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(long a, long b, long c);
- public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(long ptr);
- public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(long ptr);
- public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(long ptr);
+ // struct LDKChannelAnnouncement C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple);
+ public static native long C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(long tuple);
+ // struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple);
+ public static native long C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(long tuple);
+ // struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple);
+ public static native long C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(long tuple);
public static native long LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new(long[] elems);
public static native long LDKCVec_NodeAnnouncementZ_new(long[] elems);
public static native boolean LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok(long arg);
public static native void CResult_TransactionNoneZ_free(long _res);
// struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_clone(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR orig);
public static native long CResult_TransactionNoneZ_clone(long orig);
+ // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_clone(const struct LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR orig);
+ public static native long C2Tuple_BlockHashChannelMonitorZ_clone(long orig);
// struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
public static native long C2Tuple_BlockHashChannelMonitorZ_new(byte[] a, long b);
// void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res);
public static native long CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(IOError e);
// void CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ _res);
public static native void CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(long _res);
+ // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(const struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ *NONNULL_PTR orig);
+ public static native long CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(long orig);
// struct LDKCOption_u16Z COption_u16Z_some(uint16_t o);
public static native long COption_u16Z_some(short o);
// struct LDKCOption_u16Z COption_u16Z_none(void);
public static native long CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(long e);
// void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res);
public static native void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(long _res);
+ // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(const struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR orig);
+ public static native long CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(long orig);
// struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void);
public static native long CResult_NoneLightningErrorZ_ok();
// struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_err(struct LDKLightningError e);
public static native long CResult_NetworkGraphDecodeErrorZ_err(long e);
// void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res);
public static native void CResult_NetworkGraphDecodeErrorZ_free(long _res);
+ // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_clone(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR orig);
+ public static native long CResult_NetworkGraphDecodeErrorZ_clone(long orig);
// struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_ok(struct LDKNetAddress o);
public static native long CResult_NetAddressu8Z_ok(long o);
// struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_err(uint8_t e);
public static native long get_route(byte[] our_node_id, long network, byte[] payee, long payee_features, long[] first_hops, long[] last_hops, long final_value_msat, int final_cltv, long logger);
// void NetworkGraph_free(struct LDKNetworkGraph this_obj);
public static native void NetworkGraph_free(long this_obj);
+ // struct LDKNetworkGraph NetworkGraph_clone(const struct LDKNetworkGraph *NONNULL_PTR orig);
+ public static native long NetworkGraph_clone(long orig);
// void ReadOnlyNetworkGraph_free(struct LDKReadOnlyNetworkGraph this_obj);
public static native void ReadOnlyNetworkGraph_free(long this_obj);
// void NetworkUpdate_free(struct LDKNetworkUpdate this_ptr);
* [`PaymentReceived::payment_preimage`]: events::Event::PaymentReceived::payment_preimage
* [`create_inbound_payment_for_hash`]: Self::create_inbound_payment_for_hash
*/
- public TwoTuple<byte[], byte[]> create_inbound_payment(Option_u64Z min_value_msat, int invoice_expiry_delta_secs, long user_payment_id) {
+ public TwoTuple_PaymentHashPaymentSecretZ create_inbound_payment(Option_u64Z min_value_msat, int invoice_expiry_delta_secs, long user_payment_id) {
long ret = bindings.ChannelManager_create_inbound_payment(this.ptr, min_value_msat.ptr, invoice_expiry_delta_secs, user_payment_id);
if (ret < 1024) { return null; }
- byte[] ret_a = bindings.LDKC2Tuple_PaymentHashPaymentSecretZ_get_a(ret);
- byte[] ret_b = bindings.LDKC2Tuple_PaymentHashPaymentSecretZ_get_b(ret);
- TwoTuple<byte[], byte[]> ret_conv = new TwoTuple<byte[], byte[]>(ret_a, ret_b, () -> {
- bindings.C2Tuple_PaymentHashPaymentSecretZ_free(ret);
- });
- return ret_conv;
+ TwoTuple_PaymentHashPaymentSecretZ ret_hu_conv = new TwoTuple_PaymentHashPaymentSecretZ(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
}
/**
/**
* Gets the funding transaction outpoint of the channel this ChannelMonitor is monitoring for.
*/
- public TwoTuple<OutPoint, byte[]> get_funding_txo() {
+ public TwoTuple_OutPointScriptZ get_funding_txo() {
long ret = bindings.ChannelMonitor_get_funding_txo(this.ptr);
if (ret < 1024) { return null; }
- long ret_a = bindings.LDKC2Tuple_OutPointScriptZ_get_a(ret);
- OutPoint ret_a_hu_conv = new OutPoint(null, ret_a);
- ret_a_hu_conv.ptrs_to.add(this);;
- byte[] ret_b = bindings.LDKC2Tuple_OutPointScriptZ_get_b(ret);
- TwoTuple<OutPoint, byte[]> ret_conv = new TwoTuple<OutPoint, byte[]>(ret_a_hu_conv, ret_b, () -> {
- bindings.C2Tuple_OutPointScriptZ_free(ret);
- });
- ret_a_hu_conv.ptrs_to.add(ret_conv);
- return ret_conv;
+ TwoTuple_OutPointScriptZ ret_hu_conv = new TwoTuple_OutPointScriptZ(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
}
/**
* Gets a list of txids, with their output scripts (in the order they appear in the
* transaction), which we must learn about spends of via block_connected().
*/
- public TwoTuple<byte[], TwoTuple<Integer, byte[]>[]>[] get_outputs_to_watch() {
+ public TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ[] get_outputs_to_watch() {
long[] ret = bindings.ChannelMonitor_get_outputs_to_watch(this.ptr);
- TwoTuple<byte[], TwoTuple<Integer, byte[]>[]>[] ret_conv_47_arr = new TwoTuple[ret.length];
- for (int v = 0; v < ret.length; v++) {
- long ret_conv_47 = ret[v];
- byte[] ret_conv_47_a = bindings.LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(ret_conv_47);
- long[] ret_conv_47_b = bindings.LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(ret_conv_47);
- TwoTuple<Integer, byte[]>[] ret_conv_47_b_conv_27_arr = new TwoTuple[ret_conv_47_b.length];
- for (int b = 0; b < ret_conv_47_b.length; b++) {
- long ret_conv_47_b_conv_27 = ret_conv_47_b[b];
- int ret_conv_47_b_conv_27_a = bindings.LDKC2Tuple_u32ScriptZ_get_a(ret_conv_47_b_conv_27);
- byte[] ret_conv_47_b_conv_27_b = bindings.LDKC2Tuple_u32ScriptZ_get_b(ret_conv_47_b_conv_27);
- TwoTuple<Integer, byte[]> ret_conv_47_b_conv_27_conv = new TwoTuple<Integer, byte[]>(ret_conv_47_b_conv_27_a, ret_conv_47_b_conv_27_b, () -> {
- bindings.C2Tuple_u32ScriptZ_free(ret_conv_47_b_conv_27);
- });
- ret_conv_47_b_conv_27_arr[b] = ret_conv_47_b_conv_27_conv;
- };
- TwoTuple<byte[], TwoTuple<Integer, byte[]>[]> ret_conv_47_conv = new TwoTuple<byte[], TwoTuple<Integer, byte[]>[]>(ret_conv_47_a, ret_conv_47_b_conv_27_arr);
- // Warning: We may not free the C tuple object!
- ret_conv_47_arr[v] = ret_conv_47_conv;
+ TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ[] ret_conv_40_arr = new TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ[ret.length];
+ for (int o = 0; o < ret.length; o++) {
+ long ret_conv_40 = ret[o];
+ TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ ret_conv_40_hu_conv = new TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ(null, ret_conv_40);
+ ret_conv_40_hu_conv.ptrs_to.add(this);
+ ret_conv_40_arr[o] = ret_conv_40_hu_conv;
}
- return ret_conv_47_arr;
+ return ret_conv_40_arr;
}
/**
*
* [`get_outputs_to_watch`]: #method.get_outputs_to_watch
*/
- public TwoTuple<byte[], TwoTuple<Integer, TxOut>[]>[] block_connected(byte[] header, TwoTuple<Long, byte[]>[] txdata, int height, BroadcasterInterface broadcaster, FeeEstimator fee_estimator, Logger logger) {
- long[] ret = bindings.ChannelMonitor_block_connected(this.ptr, header, txdata != null ? Arrays.stream(txdata).mapToLong(txdata_conv_24 -> bindings.C2Tuple_usizeTransactionZ_new(txdata_conv_24.a, txdata_conv_24.b)).toArray() : null, height, broadcaster == null ? 0 : broadcaster.ptr, fee_estimator == null ? 0 : fee_estimator.ptr, logger == null ? 0 : logger.ptr);
- TwoTuple<byte[], TwoTuple<Integer, TxOut>[]>[] ret_conv_46_arr = new TwoTuple[ret.length];
- for (int u = 0; u < ret.length; u++) {
- long ret_conv_46 = ret[u];
- byte[] ret_conv_46_a = bindings.LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(ret_conv_46);
- long[] ret_conv_46_b = bindings.LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(ret_conv_46);
- TwoTuple<Integer, TxOut>[] ret_conv_46_b_conv_26_arr = new TwoTuple[ret_conv_46_b.length];
- for (int a = 0; a < ret_conv_46_b.length; a++) {
- long ret_conv_46_b_conv_26 = ret_conv_46_b[a];
- int ret_conv_46_b_conv_26_a = bindings.LDKC2Tuple_u32TxOutZ_get_a(ret_conv_46_b_conv_26);
- long ret_conv_46_b_conv_26_b = bindings.TxOut_clone(bindings.LDKC2Tuple_u32TxOutZ_get_b(ret_conv_46_b_conv_26));
- TxOut ret_conv_46_b_conv_26_b_conv = new TxOut(null, ret_conv_46_b_conv_26_b);;
- TwoTuple<Integer, TxOut> ret_conv_46_b_conv_26_conv = new TwoTuple<Integer, TxOut>(ret_conv_46_b_conv_26_a, ret_conv_46_b_conv_26_b_conv, () -> {
- bindings.C2Tuple_u32TxOutZ_free(ret_conv_46_b_conv_26);
- });
- ret_conv_46_b_conv_26_b_conv.ptrs_to.add(ret_conv_46_b_conv_26_conv);
- ret_conv_46_b_conv_26_arr[a] = ret_conv_46_b_conv_26_conv;
- };
- TwoTuple<byte[], TwoTuple<Integer, TxOut>[]> ret_conv_46_conv = new TwoTuple<byte[], TwoTuple<Integer, TxOut>[]>(ret_conv_46_a, ret_conv_46_b_conv_26_arr);
- // Warning: We may not free the C tuple object!
- ret_conv_46_arr[u] = ret_conv_46_conv;
+ public TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ[] block_connected(byte[] header, TwoTuple_usizeTransactionZ[] txdata, int height, BroadcasterInterface broadcaster, FeeEstimator fee_estimator, Logger logger) {
+ long[] ret = bindings.ChannelMonitor_block_connected(this.ptr, header, txdata != null ? Arrays.stream(txdata).mapToLong(txdata_conv_28 -> txdata_conv_28 != null ? txdata_conv_28.ptr : 0).toArray() : null, height, broadcaster == null ? 0 : broadcaster.ptr, fee_estimator == null ? 0 : fee_estimator.ptr, logger == null ? 0 : logger.ptr);
+ TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ[] ret_conv_39_arr = new TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ[ret.length];
+ for (int n = 0; n < ret.length; n++) {
+ long ret_conv_39 = ret[n];
+ TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ ret_conv_39_hu_conv = new TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ(null, ret_conv_39);
+ ret_conv_39_hu_conv.ptrs_to.add(this);
+ ret_conv_39_arr[n] = ret_conv_39_hu_conv;
}
this.ptrs_to.add(broadcaster);
this.ptrs_to.add(fee_estimator);
this.ptrs_to.add(logger);
- return ret_conv_46_arr;
+ return ret_conv_39_arr;
}
/**
*
* [`block_connected`]: Self::block_connected
*/
- public TwoTuple<byte[], TwoTuple<Integer, TxOut>[]>[] transactions_confirmed(byte[] header, TwoTuple<Long, byte[]>[] txdata, int height, BroadcasterInterface broadcaster, FeeEstimator fee_estimator, Logger logger) {
- long[] ret = bindings.ChannelMonitor_transactions_confirmed(this.ptr, header, txdata != null ? Arrays.stream(txdata).mapToLong(txdata_conv_24 -> bindings.C2Tuple_usizeTransactionZ_new(txdata_conv_24.a, txdata_conv_24.b)).toArray() : null, height, broadcaster == null ? 0 : broadcaster.ptr, fee_estimator == null ? 0 : fee_estimator.ptr, logger == null ? 0 : logger.ptr);
- TwoTuple<byte[], TwoTuple<Integer, TxOut>[]>[] ret_conv_46_arr = new TwoTuple[ret.length];
- for (int u = 0; u < ret.length; u++) {
- long ret_conv_46 = ret[u];
- byte[] ret_conv_46_a = bindings.LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(ret_conv_46);
- long[] ret_conv_46_b = bindings.LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(ret_conv_46);
- TwoTuple<Integer, TxOut>[] ret_conv_46_b_conv_26_arr = new TwoTuple[ret_conv_46_b.length];
- for (int a = 0; a < ret_conv_46_b.length; a++) {
- long ret_conv_46_b_conv_26 = ret_conv_46_b[a];
- int ret_conv_46_b_conv_26_a = bindings.LDKC2Tuple_u32TxOutZ_get_a(ret_conv_46_b_conv_26);
- long ret_conv_46_b_conv_26_b = bindings.TxOut_clone(bindings.LDKC2Tuple_u32TxOutZ_get_b(ret_conv_46_b_conv_26));
- TxOut ret_conv_46_b_conv_26_b_conv = new TxOut(null, ret_conv_46_b_conv_26_b);;
- TwoTuple<Integer, TxOut> ret_conv_46_b_conv_26_conv = new TwoTuple<Integer, TxOut>(ret_conv_46_b_conv_26_a, ret_conv_46_b_conv_26_b_conv, () -> {
- bindings.C2Tuple_u32TxOutZ_free(ret_conv_46_b_conv_26);
- });
- ret_conv_46_b_conv_26_b_conv.ptrs_to.add(ret_conv_46_b_conv_26_conv);
- ret_conv_46_b_conv_26_arr[a] = ret_conv_46_b_conv_26_conv;
- };
- TwoTuple<byte[], TwoTuple<Integer, TxOut>[]> ret_conv_46_conv = new TwoTuple<byte[], TwoTuple<Integer, TxOut>[]>(ret_conv_46_a, ret_conv_46_b_conv_26_arr);
- // Warning: We may not free the C tuple object!
- ret_conv_46_arr[u] = ret_conv_46_conv;
+ public TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ[] transactions_confirmed(byte[] header, TwoTuple_usizeTransactionZ[] txdata, int height, BroadcasterInterface broadcaster, FeeEstimator fee_estimator, Logger logger) {
+ long[] ret = bindings.ChannelMonitor_transactions_confirmed(this.ptr, header, txdata != null ? Arrays.stream(txdata).mapToLong(txdata_conv_28 -> txdata_conv_28 != null ? txdata_conv_28.ptr : 0).toArray() : null, height, broadcaster == null ? 0 : broadcaster.ptr, fee_estimator == null ? 0 : fee_estimator.ptr, logger == null ? 0 : logger.ptr);
+ TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ[] ret_conv_39_arr = new TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ[ret.length];
+ for (int n = 0; n < ret.length; n++) {
+ long ret_conv_39 = ret[n];
+ TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ ret_conv_39_hu_conv = new TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ(null, ret_conv_39);
+ ret_conv_39_hu_conv.ptrs_to.add(this);
+ ret_conv_39_arr[n] = ret_conv_39_hu_conv;
}
this.ptrs_to.add(broadcaster);
this.ptrs_to.add(fee_estimator);
this.ptrs_to.add(logger);
- return ret_conv_46_arr;
+ return ret_conv_39_arr;
}
/**
*
* [`block_connected`]: Self::block_connected
*/
- public TwoTuple<byte[], TwoTuple<Integer, TxOut>[]>[] best_block_updated(byte[] header, int height, BroadcasterInterface broadcaster, FeeEstimator fee_estimator, Logger logger) {
+ public TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ[] best_block_updated(byte[] header, int height, BroadcasterInterface broadcaster, FeeEstimator fee_estimator, Logger logger) {
long[] ret = bindings.ChannelMonitor_best_block_updated(this.ptr, header, height, broadcaster == null ? 0 : broadcaster.ptr, fee_estimator == null ? 0 : fee_estimator.ptr, logger == null ? 0 : logger.ptr);
- TwoTuple<byte[], TwoTuple<Integer, TxOut>[]>[] ret_conv_46_arr = new TwoTuple[ret.length];
- for (int u = 0; u < ret.length; u++) {
- long ret_conv_46 = ret[u];
- byte[] ret_conv_46_a = bindings.LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(ret_conv_46);
- long[] ret_conv_46_b = bindings.LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(ret_conv_46);
- TwoTuple<Integer, TxOut>[] ret_conv_46_b_conv_26_arr = new TwoTuple[ret_conv_46_b.length];
- for (int a = 0; a < ret_conv_46_b.length; a++) {
- long ret_conv_46_b_conv_26 = ret_conv_46_b[a];
- int ret_conv_46_b_conv_26_a = bindings.LDKC2Tuple_u32TxOutZ_get_a(ret_conv_46_b_conv_26);
- long ret_conv_46_b_conv_26_b = bindings.TxOut_clone(bindings.LDKC2Tuple_u32TxOutZ_get_b(ret_conv_46_b_conv_26));
- TxOut ret_conv_46_b_conv_26_b_conv = new TxOut(null, ret_conv_46_b_conv_26_b);;
- TwoTuple<Integer, TxOut> ret_conv_46_b_conv_26_conv = new TwoTuple<Integer, TxOut>(ret_conv_46_b_conv_26_a, ret_conv_46_b_conv_26_b_conv, () -> {
- bindings.C2Tuple_u32TxOutZ_free(ret_conv_46_b_conv_26);
- });
- ret_conv_46_b_conv_26_b_conv.ptrs_to.add(ret_conv_46_b_conv_26_conv);
- ret_conv_46_b_conv_26_arr[a] = ret_conv_46_b_conv_26_conv;
- };
- TwoTuple<byte[], TwoTuple<Integer, TxOut>[]> ret_conv_46_conv = new TwoTuple<byte[], TwoTuple<Integer, TxOut>[]>(ret_conv_46_a, ret_conv_46_b_conv_26_arr);
- // Warning: We may not free the C tuple object!
- ret_conv_46_arr[u] = ret_conv_46_conv;
+ TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ[] ret_conv_39_arr = new TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ[ret.length];
+ for (int n = 0; n < ret.length; n++) {
+ long ret_conv_39 = ret[n];
+ TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ ret_conv_39_hu_conv = new TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ(null, ret_conv_39);
+ ret_conv_39_hu_conv.ptrs_to.add(this);
+ ret_conv_39_arr[n] = ret_conv_39_hu_conv;
}
this.ptrs_to.add(broadcaster);
this.ptrs_to.add(fee_estimator);
this.ptrs_to.add(logger);
- return ret_conv_46_arr;
+ return ret_conv_39_arr;
}
/**
* [chain order]: Confirm#Order
* [`best_block_updated`]: Self::best_block_updated
*/
- void transactions_confirmed(byte[] header, TwoTuple<Long, byte[]>[] txdata, int height);
+ void transactions_confirmed(byte[] header, TwoTuple_usizeTransactionZ[] txdata, int height);
/**
* Processes a transaction that is no longer confirmed as result of a chain reorganization.
*
final LDKConfirmHolder impl_holder = new LDKConfirmHolder();
impl_holder.held = new Confirm(new bindings.LDKConfirm() {
@Override public void transactions_confirmed(byte[] header, long[] txdata, int height) {
- TwoTuple<Long, byte[]>[] txdata_conv_24_arr = new TwoTuple[txdata.length];
- for (int y = 0; y < txdata.length; y++) {
- long txdata_conv_24 = txdata[y];
- long txdata_conv_24_a = bindings.LDKC2Tuple_usizeTransactionZ_get_a(txdata_conv_24);
- byte[] txdata_conv_24_b = bindings.LDKC2Tuple_usizeTransactionZ_get_b(txdata_conv_24);
- TwoTuple<Long, byte[]> txdata_conv_24_conv = new TwoTuple<Long, byte[]>(txdata_conv_24_a, txdata_conv_24_b, () -> {
- bindings.C2Tuple_usizeTransactionZ_free(txdata_conv_24);
- });
- txdata_conv_24_arr[y] = txdata_conv_24_conv;
+ TwoTuple_usizeTransactionZ[] txdata_conv_28_arr = new TwoTuple_usizeTransactionZ[txdata.length];
+ for (int c = 0; c < txdata.length; c++) {
+ long txdata_conv_28 = txdata[c];
+ TwoTuple_usizeTransactionZ txdata_conv_28_hu_conv = new TwoTuple_usizeTransactionZ(null, txdata_conv_28);
+ txdata_conv_28_hu_conv.ptrs_to.add(this);
+ txdata_conv_28_arr[c] = txdata_conv_28_hu_conv;
}
- arg.transactions_confirmed(header, txdata_conv_24_arr, height);
+ arg.transactions_confirmed(header, txdata_conv_28_arr, height);
}
@Override public void transaction_unconfirmed(byte[] txid) {
arg.transaction_unconfirmed(txid);
* [chain order]: Confirm#Order
* [`best_block_updated`]: Self::best_block_updated
*/
- public void transactions_confirmed(byte[] header, TwoTuple<Long, byte[]>[] txdata, int height) {
- bindings.Confirm_transactions_confirmed(this.ptr, header, txdata != null ? Arrays.stream(txdata).mapToLong(txdata_conv_24 -> bindings.C2Tuple_usizeTransactionZ_new(txdata_conv_24.a, txdata_conv_24.b)).toArray() : null, height);
+ public void transactions_confirmed(byte[] header, TwoTuple_usizeTransactionZ[] txdata, int height) {
+ bindings.Confirm_transactions_confirmed(this.ptr, header, txdata != null ? Arrays.stream(txdata).mapToLong(txdata_conv_28 -> txdata_conv_28 != null ? txdata_conv_28.ptr : 0).toArray() : null, height);
}
/**
* correspond to the intended recipients node ids. If no connection to one of the
* specified node does not exist, the message is simply not sent to it.
*/
- TwoTuple<byte[], Type>[] get_and_clear_pending_msg();
+ TwoTuple_PublicKeyTypeZ[] get_and_clear_pending_msg();
}
private static class LDKCustomMessageHandlerHolder { CustomMessageHandler held; }
public static CustomMessageHandler new_impl(CustomMessageHandlerInterface arg, CustomMessageReader.CustomMessageReaderInterface CustomMessageReader_impl) {
return result;
}
@Override public long[] get_and_clear_pending_msg() {
- TwoTuple<byte[], Type>[] ret = arg.get_and_clear_pending_msg();
- long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_24 -> bindings.C2Tuple_PublicKeyTypeZ_new(ret_conv_24.a, ret_conv_24.b == null ? 0 : ret_conv_24.b.ptr)).toArray() : null;
- for (TwoTuple<byte[], Type> ret_conv_24: ret) { impl_holder.held.ptrs_to.add(ret_conv_24.b); };
+ TwoTuple_PublicKeyTypeZ[] ret = arg.get_and_clear_pending_msg();
+ long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_25 -> ret_conv_25 != null ? ret_conv_25.ptr : 0).toArray() : null;
return result;
}
}, CustomMessageReader.new_impl(CustomMessageReader_impl).bindings_instance);
* correspond to the intended recipients node ids. If no connection to one of the
* specified node does not exist, the message is simply not sent to it.
*/
- public TwoTuple<byte[], Type>[] get_and_clear_pending_msg() {
+ public TwoTuple_PublicKeyTypeZ[] get_and_clear_pending_msg() {
long[] ret = bindings.CustomMessageHandler_get_and_clear_pending_msg(this.ptr);
- TwoTuple<byte[], Type>[] ret_conv_24_arr = new TwoTuple[ret.length];
- for (int y = 0; y < ret.length; y++) {
- long ret_conv_24 = ret[y];
- byte[] ret_conv_24_a = bindings.LDKC2Tuple_PublicKeyTypeZ_get_a(ret_conv_24);
- long ret_conv_24_b = bindings.LDKC2Tuple_PublicKeyTypeZ_get_b(ret_conv_24);
- Type ret_hu_conv = new Type(null, ret_conv_24_b);
- ret_hu_conv.ptrs_to.add(this);;
- TwoTuple<byte[], Type> ret_conv_24_conv = new TwoTuple<byte[], Type>(ret_conv_24_a, ret_hu_conv, () -> {
- bindings.C2Tuple_PublicKeyTypeZ_free(ret_conv_24);
- });
- ret_hu_conv.ptrs_to.add(ret_conv_24_conv);
- ret_conv_24_arr[y] = ret_conv_24_conv;
+ TwoTuple_PublicKeyTypeZ[] ret_conv_25_arr = new TwoTuple_PublicKeyTypeZ[ret.length];
+ for (int z = 0; z < ret.length; z++) {
+ long ret_conv_25 = ret[z];
+ TwoTuple_PublicKeyTypeZ ret_conv_25_hu_conv = new TwoTuple_PublicKeyTypeZ(null, ret_conv_25);
+ ret_conv_25_hu_conv.ptrs_to.add(this);
+ ret_conv_25_arr[z] = ret_conv_25_hu_conv;
}
- return ret_conv_24_arr;
+ return ret_conv_25_arr;
}
}
/**
* Representation of the payment channel network
*/
- public void set_network_graph(byte[] val_genesis_hash) {
- bindings.NetGraphMsgHandler_set_network_graph(this.ptr, bindings.NetworkGraph_new(val_genesis_hash));
+ public void set_network_graph(NetworkGraph val) {
+ bindings.NetGraphMsgHandler_set_network_graph(this.ptr, val == null ? 0 : val.ptr & ~1);
+ this.ptrs_to.add(val);
}
/**
* channel data is correct, and that the announcement is signed with
* channel owners' keys.
*/
- public static NetGraphMsgHandler of(byte[] network_graph_genesis_hash, Option_AccessZ chain_access, Logger logger) {
- long ret = bindings.NetGraphMsgHandler_new(bindings.NetworkGraph_new(network_graph_genesis_hash), chain_access.ptr, logger == null ? 0 : logger.ptr);
+ public static NetGraphMsgHandler of(NetworkGraph network_graph, Option_AccessZ chain_access, Logger logger) {
+ long ret = bindings.NetGraphMsgHandler_new(network_graph == null ? 0 : network_graph.ptr & ~1, chain_access.ptr, logger == null ? 0 : logger.ptr);
if (ret < 1024) { return null; }
NetGraphMsgHandler ret_hu_conv = new NetGraphMsgHandler(null, ret);
ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ ret_hu_conv.ptrs_to.add(network_graph);
ret_hu_conv.ptrs_to.add(logger);
return ret_hu_conv;
}
if (ptr != 0) { bindings.NetworkGraph_free(ptr); }
}
+ /**
+ * Creates a copy of the NetworkGraph
+ */
+ public NetworkGraph clone() {
+ long ret = bindings.NetworkGraph_clone(this.ptr);
+ if (ret < 1024) { return null; }
+ NetworkGraph ret_hu_conv = new NetworkGraph(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
/**
* Serialize the NetworkGraph object into a byte array which can be read by NetworkGraph_read
*/
}
public final static class Some extends Option_C2Tuple_usizeTransactionZZ {
- public final TwoTuple<Long, byte[]> some;
+ public final TwoTuple_usizeTransactionZ some;
private Some(long ptr, bindings.LDKCOption_C2Tuple_usizeTransactionZZ.Some obj) {
super(null, ptr);
long some = obj.some;
- long some_a = bindings.LDKC2Tuple_usizeTransactionZ_get_a(some);
- byte[] some_b = bindings.LDKC2Tuple_usizeTransactionZ_get_b(some);
- TwoTuple<Long, byte[]> some_conv = new TwoTuple<Long, byte[]>(some_a, some_b, () -> {
- bindings.C2Tuple_usizeTransactionZ_free(some);
- });
- this.some = some_conv;
+ TwoTuple_usizeTransactionZ some_hu_conv = new TwoTuple_usizeTransactionZ(null, some);
+ some_hu_conv.ptrs_to.add(this);
+ this.some = some_hu_conv;
}
}
public final static class None extends Option_C2Tuple_usizeTransactionZZ {
/**
* Constructs a new COption_C2Tuple_usizeTransactionZZ containing a crate::c_types::derived::C2Tuple_usizeTransactionZ
*/
- public static Option_C2Tuple_usizeTransactionZZ some(TwoTuple<Long, byte[]> o) {
- long ret = bindings.COption_C2Tuple_usizeTransactionZZ_some(bindings.C2Tuple_usizeTransactionZ_new(o.a, o.b));
+ public static Option_C2Tuple_usizeTransactionZZ some(TwoTuple_usizeTransactionZ o) {
+ long ret = bindings.COption_C2Tuple_usizeTransactionZZ_some(o != null ? o.ptr : 0);
if (ret < 1024) { return null; }
Option_C2Tuple_usizeTransactionZZ ret_hu_conv = Option_C2Tuple_usizeTransactionZZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(ret_hu_conv);
}
}
public static final class Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_OK extends Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ {
- public final TwoTuple<byte[], ChannelManager> res;
+ public final TwoTuple_BlockHashChannelManagerZ res;
private Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_OK(Object _dummy, long ptr) {
super(_dummy, ptr);
long res = bindings.LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(ptr);
- byte[] res_a = bindings.LDKC2Tuple_BlockHashChannelManagerZ_get_a(res);
- long res_b = bindings.LDKC2Tuple_BlockHashChannelManagerZ_get_b(res);
- ChannelManager res_b_hu_conv = new ChannelManager(null, res_b);
- res_b_hu_conv.ptrs_to.add(this);;
- TwoTuple<byte[], ChannelManager> res_conv = new TwoTuple<byte[], ChannelManager>(res_a, res_b_hu_conv, () -> {
- bindings.C2Tuple_BlockHashChannelManagerZ_free(res);
- });
- res_b_hu_conv.ptrs_to.add(res_conv);
- this.res = res_conv;
+ TwoTuple_BlockHashChannelManagerZ res_hu_conv = new TwoTuple_BlockHashChannelManagerZ(null, res);
+ res_hu_conv.ptrs_to.add(this);
+ this.res = res_hu_conv;
}
}
/**
* Creates a new CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ in the success state.
*/
- public static Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ ok(TwoTuple<byte[], ChannelManager> o) {
- long ret = bindings.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(bindings.C2Tuple_BlockHashChannelManagerZ_new(o.a, o.b == null ? 0 : o.b.ptr & ~1));
+ public static Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ ok(TwoTuple_BlockHashChannelManagerZ o) {
+ long ret = bindings.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o != null ? o.ptr : 0);
if (ret < 1024) { return null; }
Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.constr_from_ptr(ret);
- ret_hu_conv.ptrs_to.add(o.b);
- // Due to rust's strict-ownership memory model, in some cases we need to "move"
- // an object to pass exclusive ownership to the function being called.
- // In most cases, we avoid ret_hu_conv being visible in GC'd languages by cloning the object
- // at the FFI layer, creating a new object which Rust can claim ownership of
- // However, in some cases (eg here), there is no way to clone an object, and thus
- // we actually have to pass full ownership to Rust.
- // Thus, after ret_hu_conv call, o.b is reset to null and is now a dummy object.
- o.b.ptr = 0;
return ret_hu_conv;
}
}
}
public static final class Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_OK extends Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ {
- public final TwoTuple<byte[], ChannelMonitor> res;
+ public final TwoTuple_BlockHashChannelMonitorZ res;
private Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_OK(Object _dummy, long ptr) {
super(_dummy, ptr);
long res = bindings.LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(ptr);
- byte[] res_a = bindings.LDKC2Tuple_BlockHashChannelMonitorZ_get_a(res);
- long res_b = bindings.LDKC2Tuple_BlockHashChannelMonitorZ_get_b(res);
- ChannelMonitor res_b_hu_conv = new ChannelMonitor(null, res_b);
- res_b_hu_conv.ptrs_to.add(this);;
- TwoTuple<byte[], ChannelMonitor> res_conv = new TwoTuple<byte[], ChannelMonitor>(res_a, res_b_hu_conv, () -> {
- bindings.C2Tuple_BlockHashChannelMonitorZ_free(res);
- });
- res_b_hu_conv.ptrs_to.add(res_conv);
- this.res = res_conv;
+ TwoTuple_BlockHashChannelMonitorZ res_hu_conv = new TwoTuple_BlockHashChannelMonitorZ(null, res);
+ res_hu_conv.ptrs_to.add(this);
+ this.res = res_hu_conv;
}
}
/**
* Creates a new CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ in the success state.
*/
- public static Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ ok(TwoTuple<byte[], ChannelMonitor> o) {
- long ret = bindings.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(bindings.C2Tuple_BlockHashChannelMonitorZ_new(o.a, o.b == null ? 0 : o.b.ptr & ~1));
+ public static Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ ok(TwoTuple_BlockHashChannelMonitorZ o) {
+ long ret = bindings.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o != null ? o.ptr : 0);
if (ret < 1024) { return null; }
Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.constr_from_ptr(ret);
- ret_hu_conv.ptrs_to.add(o.b);
return ret_hu_conv;
}
return ret_hu_conv;
}
+ /**
+ * Creates a new CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ clone() {
+ long ret = bindings.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(this.ptr);
+ if (ret < 1024) { return null; }
+ Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
}
}
public static final class Result_C2Tuple_SignatureCVec_SignatureZZNoneZ_OK extends Result_C2Tuple_SignatureCVec_SignatureZZNoneZ {
- public final TwoTuple<byte[], byte[][]> res;
+ public final TwoTuple_SignatureCVec_SignatureZZ res;
private Result_C2Tuple_SignatureCVec_SignatureZZNoneZ_OK(Object _dummy, long ptr) {
super(_dummy, ptr);
long res = bindings.LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(ptr);
- byte[] res_a = bindings.LDKC2Tuple_SignatureCVec_SignatureZZ_get_a(res);
- byte[][] res_b = bindings.LDKC2Tuple_SignatureCVec_SignatureZZ_get_b(res);
- TwoTuple<byte[], byte[][]> res_conv = new TwoTuple<byte[], byte[][]>(res_a, res_b, () -> {
- bindings.C2Tuple_SignatureCVec_SignatureZZ_free(res);
- });
- this.res = res_conv;
+ TwoTuple_SignatureCVec_SignatureZZ res_hu_conv = new TwoTuple_SignatureCVec_SignatureZZ(null, res);
+ res_hu_conv.ptrs_to.add(this);
+ this.res = res_hu_conv;
}
}
/**
* Creates a new CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ in the success state.
*/
- public static Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ok(TwoTuple<byte[], byte[][]> o) {
- long ret = bindings.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(bindings.C2Tuple_SignatureCVec_SignatureZZ_new(o.a, o.b));
+ public static Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ok(TwoTuple_SignatureCVec_SignatureZZ o) {
+ long ret = bindings.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o != null ? o.ptr : 0);
if (ret < 1024) { return null; }
Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_hu_conv = Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
public static final class Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_OK extends Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ {
- public final TwoTuple<byte[], ChannelMonitor>[] res;
+ public final TwoTuple_BlockHashChannelMonitorZ[] res;
private Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_OK(Object _dummy, long ptr) {
super(_dummy, ptr);
long[] res = bindings.LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_ok(ptr);
- TwoTuple<byte[], ChannelMonitor>[] res_conv_34_arr = new TwoTuple[res.length];
- for (int i = 0; i < res.length; i++) {
- long res_conv_34 = res[i];
- byte[] res_conv_34_a = bindings.LDKC2Tuple_BlockHashChannelMonitorZ_get_a(res_conv_34);
- long res_conv_34_b = bindings.LDKC2Tuple_BlockHashChannelMonitorZ_get_b(res_conv_34);
- ChannelMonitor res_conv_34_b_hu_conv = new ChannelMonitor(null, res_conv_34_b);
- res_conv_34_b_hu_conv.ptrs_to.add(this);;
- TwoTuple<byte[], ChannelMonitor> res_conv_34_conv = new TwoTuple<byte[], ChannelMonitor>(res_conv_34_a, res_conv_34_b_hu_conv, () -> {
- bindings.C2Tuple_BlockHashChannelMonitorZ_free(res_conv_34);
- });
- res_conv_34_b_hu_conv.ptrs_to.add(res_conv_34_conv);
- res_conv_34_arr[i] = res_conv_34_conv;
+ TwoTuple_BlockHashChannelMonitorZ[] res_conv_35_arr = new TwoTuple_BlockHashChannelMonitorZ[res.length];
+ for (int j = 0; j < res.length; j++) {
+ long res_conv_35 = res[j];
+ TwoTuple_BlockHashChannelMonitorZ res_conv_35_hu_conv = new TwoTuple_BlockHashChannelMonitorZ(null, res_conv_35);
+ res_conv_35_hu_conv.ptrs_to.add(this);
+ res_conv_35_arr[j] = res_conv_35_hu_conv;
}
- this.res = res_conv_34_arr;
+ this.res = res_conv_35_arr;
}
}
/**
* Creates a new CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ in the success state.
*/
- public static Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ ok(TwoTuple<byte[], ChannelMonitor>[] o) {
- long ret = bindings.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(o != null ? Arrays.stream(o).mapToLong(o_conv_34 -> bindings.C2Tuple_BlockHashChannelMonitorZ_new(o_conv_34.a, o_conv_34.b == null ? 0 : o_conv_34.b.ptr & ~1)).toArray() : null);
+ public static Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ ok(TwoTuple_BlockHashChannelMonitorZ[] o) {
+ long ret = bindings.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(o != null ? Arrays.stream(o).mapToLong(o_conv_35 -> o_conv_35 != null ? o_conv_35.ptr : 0).toArray() : null);
if (ret < 1024) { return null; }
Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ ret_hu_conv = Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ.constr_from_ptr(ret);
- for (TwoTuple<byte[], ChannelMonitor> o_conv_34: o) { ret_hu_conv.ptrs_to.add(o_conv_34.b); };
return ret_hu_conv;
}
return ret_hu_conv;
}
+ /**
+ * Creates a new CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ clone() {
+ long ret = bindings.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(this.ptr);
+ if (ret < 1024) { return null; }
+ Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ ret_hu_conv = Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
/**
* Creates a new CResult_NetworkGraphDecodeErrorZ in the success state.
*/
- public static Result_NetworkGraphDecodeErrorZ ok(byte[] o_genesis_hash) {
- long ret = bindings.CResult_NetworkGraphDecodeErrorZ_ok(bindings.NetworkGraph_new(o_genesis_hash));
+ public static Result_NetworkGraphDecodeErrorZ ok(NetworkGraph o) {
+ long ret = bindings.CResult_NetworkGraphDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
if (ret < 1024) { return null; }
Result_NetworkGraphDecodeErrorZ ret_hu_conv = Result_NetworkGraphDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
return ret_hu_conv;
}
+ /**
+ * Creates a new CResult_NetworkGraphDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_NetworkGraphDecodeErrorZ clone() {
+ long ret = bindings.CResult_NetworkGraphDecodeErrorZ_clone(this.ptr);
+ if (ret < 1024) { return null; }
+ Result_NetworkGraphDecodeErrorZ ret_hu_conv = Result_NetworkGraphDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
* to a remote node, starting at the short_channel_id indicated by starting_point and
* including the batch_amount entries immediately higher in numerical value than starting_point.
*/
- ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate>[] get_next_channel_announcements(long starting_point, byte batch_amount);
+ ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ[] get_next_channel_announcements(long starting_point, byte batch_amount);
/**
* Gets a subset of the node announcements required to dump our routing table to a remote node,
* starting at the node *after* the provided publickey and including batch_amount entries
return result;
}
@Override public long[] get_next_channel_announcements(long starting_point, byte batch_amount) {
- ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate>[] ret = arg.get_next_channel_announcements(starting_point, batch_amount);
- long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_63 -> bindings.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(ret_conv_63.a == null ? 0 : ret_conv_63.a.ptr & ~1, ret_conv_63.b == null ? 0 : ret_conv_63.b.ptr & ~1, ret_conv_63.c == null ? 0 : ret_conv_63.c.ptr & ~1)).toArray() : null;
- for (ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate> ret_conv_63: ret) { impl_holder.held.ptrs_to.add(ret_conv_63.a); impl_holder.held.ptrs_to.add(ret_conv_63.b); impl_holder.held.ptrs_to.add(ret_conv_63.c); };
+ ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ[] ret = arg.get_next_channel_announcements(starting_point, batch_amount);
+ long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_59 -> ret_conv_59 != null ? ret_conv_59.ptr : 0).toArray() : null;
return result;
}
@Override public long[] get_next_node_announcements(byte[] starting_point, byte batch_amount) {
* to a remote node, starting at the short_channel_id indicated by starting_point and
* including the batch_amount entries immediately higher in numerical value than starting_point.
*/
- public ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate>[] get_next_channel_announcements(long starting_point, byte batch_amount) {
+ public ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ[] get_next_channel_announcements(long starting_point, byte batch_amount) {
long[] ret = bindings.RoutingMessageHandler_get_next_channel_announcements(this.ptr, starting_point, batch_amount);
- ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate>[] ret_conv_63_arr = new ThreeTuple[ret.length];
- for (int l = 0; l < ret.length; l++) {
- long ret_conv_63 = ret[l];
- long ret_conv_63_a = bindings.LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(ret_conv_63);
- ChannelAnnouncement ret_conv_63_a_hu_conv = new ChannelAnnouncement(null, ret_conv_63_a);
- ret_conv_63_a_hu_conv.ptrs_to.add(this);;
- long ret_conv_63_b = bindings.LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(ret_conv_63);
- ChannelUpdate ret_conv_63_b_hu_conv = new ChannelUpdate(null, ret_conv_63_b);
- ret_conv_63_b_hu_conv.ptrs_to.add(this);;
- long ret_conv_63_c = bindings.LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(ret_conv_63);
- ChannelUpdate ret_conv_63_c_hu_conv = new ChannelUpdate(null, ret_conv_63_c);
- ret_conv_63_c_hu_conv.ptrs_to.add(this);;
- ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate> ret_conv_63_conv = new ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate>(ret_conv_63_a_hu_conv, ret_conv_63_b_hu_conv, ret_conv_63_c_hu_conv, () -> {
- bindings.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(ret_conv_63);
- });
- ret_conv_63_a_hu_conv.ptrs_to.add(ret_conv_63_conv);
- ret_conv_63_b_hu_conv.ptrs_to.add(ret_conv_63_conv);
- ret_conv_63_c_hu_conv.ptrs_to.add(ret_conv_63_conv);
- ret_conv_63_arr[l] = ret_conv_63_conv;
+ ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ[] ret_conv_59_arr = new ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ[ret.length];
+ for (int h = 0; h < ret.length; h++) {
+ long ret_conv_59 = ret[h];
+ ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ ret_conv_59_hu_conv = new ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ(null, ret_conv_59);
+ ret_conv_59_hu_conv.ptrs_to.add(this);
+ ret_conv_59_arr[h] = ret_conv_59_hu_conv;
}
- return ret_conv_63_arr;
+ return ret_conv_59_arr;
}
/**
* 2. hash of the raw invoice
* 3. signature
*/
- public ThreeTuple<RawInvoice, byte[], InvoiceSignature> into_parts() {
+ public ThreeTuple_RawInvoice_u832InvoiceSignatureZ into_parts() {
long ret = bindings.SignedRawInvoice_into_parts(this.ptr);
if (ret < 1024) { return null; }
- long ret_a = bindings.LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(ret);
- RawInvoice ret_a_hu_conv = new RawInvoice(null, ret_a);
- ret_a_hu_conv.ptrs_to.add(this);;
- byte[] ret_b = bindings.LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(ret);
- long ret_c = bindings.LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(ret);
- InvoiceSignature ret_c_hu_conv = new InvoiceSignature(null, ret_c);
- ret_c_hu_conv.ptrs_to.add(this);;
- ThreeTuple<RawInvoice, byte[], InvoiceSignature> ret_conv = new ThreeTuple<RawInvoice, byte[], InvoiceSignature>(ret_a_hu_conv, ret_b, ret_c_hu_conv, () -> {
- bindings.C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(ret);
- });
- ret_a_hu_conv.ptrs_to.add(ret_conv);
- ret_c_hu_conv.ptrs_to.add(ret_conv);
+ ThreeTuple_RawInvoice_u832InvoiceSignatureZ ret_hu_conv = new ThreeTuple_RawInvoice_u832InvoiceSignatureZ(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
this.ptrs_to.add(this);
- return ret_conv;
+ return ret_hu_conv;
}
/**
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import javax.annotation.Nullable;
+
+
+/**
+ * A Tuple
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ extends CommonBase {
+ ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(ptr); }
+ }
+
+}
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import javax.annotation.Nullable;
+
+
+/**
+ * A Tuple
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class ThreeTuple_RawInvoice_u832InvoiceSignatureZ extends CommonBase {
+ ThreeTuple_RawInvoice_u832InvoiceSignatureZ(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(ptr); }
+ }
+
+}
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import javax.annotation.Nullable;
+
+
+/**
+ * A Tuple
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class TwoTuple_BlockHashChannelManagerZ extends CommonBase {
+ TwoTuple_BlockHashChannelManagerZ(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.C2Tuple_BlockHashChannelManagerZ_free(ptr); }
+ }
+
+ /**
+ *
+ */
+ public byte[] get_a() {
+ byte[] ret = bindings.C2Tuple_BlockHashChannelManagerZ_get_a(this.ptr);
+ return ret;
+ }
+
+ /**
+ *
+ */
+ public ChannelManager get_b() {
+ long ret = bindings.C2Tuple_BlockHashChannelManagerZ_get_b(this.ptr);
+ if (ret < 1024) { return null; }
+ ChannelManager ret_hu_conv = new ChannelManager(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new C2Tuple_BlockHashChannelManagerZ from the contained elements.
+ */
+ public static TwoTuple_BlockHashChannelManagerZ of(byte[] a, FeeEstimator b_fee_est, Watch b_chain_monitor, BroadcasterInterface b_tx_broadcaster, Logger b_logger, KeysInterface b_keys_manager, UserConfig b_config, ChainParameters b_params) {
+ long ret = bindings.C2Tuple_BlockHashChannelManagerZ_new(a, bindings.ChannelManager_new(b_fee_est == null ? 0 : b_fee_est.ptr, b_chain_monitor == null ? 0 : b_chain_monitor.ptr, b_tx_broadcaster == null ? 0 : b_tx_broadcaster.ptr, b_logger == null ? 0 : b_logger.ptr, b_keys_manager == null ? 0 : b_keys_manager.ptr, b_config == null ? 0 : b_config.ptr & ~1, b_params == null ? 0 : b_params.ptr & ~1));
+ if (ret < 1024) { return null; }
+ TwoTuple_BlockHashChannelManagerZ ret_hu_conv = new TwoTuple_BlockHashChannelManagerZ(null, ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ ret_hu_conv.ptrs_to.add(b_fee_est);
+ ret_hu_conv.ptrs_to.add(b_chain_monitor);
+ ret_hu_conv.ptrs_to.add(b_tx_broadcaster);
+ ret_hu_conv.ptrs_to.add(b_logger);
+ ret_hu_conv.ptrs_to.add(b_keys_manager);
+ ret_hu_conv.ptrs_to.add(b_config);
+ ret_hu_conv.ptrs_to.add(b_params);
+ return ret_hu_conv;
+ }
+
+}
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import javax.annotation.Nullable;
+
+
+/**
+ * A Tuple
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class TwoTuple_BlockHashChannelMonitorZ extends CommonBase {
+ TwoTuple_BlockHashChannelMonitorZ(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.C2Tuple_BlockHashChannelMonitorZ_free(ptr); }
+ }
+
+ /**
+ *
+ */
+ public byte[] get_a() {
+ byte[] ret = bindings.C2Tuple_BlockHashChannelMonitorZ_get_a(this.ptr);
+ return ret;
+ }
+
+ /**
+ *
+ */
+ public ChannelMonitor get_b() {
+ long ret = bindings.C2Tuple_BlockHashChannelMonitorZ_get_b(this.ptr);
+ if (ret < 1024) { return null; }
+ ChannelMonitor ret_hu_conv = new ChannelMonitor(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new tuple which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public TwoTuple_BlockHashChannelMonitorZ clone() {
+ long ret = bindings.C2Tuple_BlockHashChannelMonitorZ_clone(this.ptr);
+ if (ret < 1024) { return null; }
+ TwoTuple_BlockHashChannelMonitorZ ret_hu_conv = new TwoTuple_BlockHashChannelMonitorZ(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new C2Tuple_BlockHashChannelMonitorZ from the contained elements.
+ */
+ public static TwoTuple_BlockHashChannelMonitorZ of(byte[] a, ChannelMonitor b) {
+ long ret = bindings.C2Tuple_BlockHashChannelMonitorZ_new(a, b == null ? 0 : b.ptr & ~1);
+ if (ret < 1024) { return null; }
+ TwoTuple_BlockHashChannelMonitorZ ret_hu_conv = new TwoTuple_BlockHashChannelMonitorZ(null, ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ ret_hu_conv.ptrs_to.add(b);
+ return ret_hu_conv;
+ }
+
+}
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import javax.annotation.Nullable;
+
+
+/**
+ * A Tuple
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class TwoTuple_OutPointScriptZ extends CommonBase {
+ TwoTuple_OutPointScriptZ(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.C2Tuple_OutPointScriptZ_free(ptr); }
+ }
+
+ /**
+ *
+ */
+ public OutPoint get_a() {
+ long ret = bindings.C2Tuple_OutPointScriptZ_get_a(this.ptr);
+ if (ret < 1024) { return null; }
+ OutPoint ret_hu_conv = new OutPoint(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ /**
+ *
+ */
+ public byte[] get_b() {
+ byte[] ret = bindings.C2Tuple_OutPointScriptZ_get_b(this.ptr);
+ return ret;
+ }
+
+ /**
+ * Creates a new tuple which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public TwoTuple_OutPointScriptZ clone() {
+ long ret = bindings.C2Tuple_OutPointScriptZ_clone(this.ptr);
+ if (ret < 1024) { return null; }
+ TwoTuple_OutPointScriptZ ret_hu_conv = new TwoTuple_OutPointScriptZ(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new C2Tuple_OutPointScriptZ from the contained elements.
+ */
+ public static TwoTuple_OutPointScriptZ of(OutPoint a, byte[] b) {
+ long ret = bindings.C2Tuple_OutPointScriptZ_new(a == null ? 0 : a.ptr & ~1, b);
+ if (ret < 1024) { return null; }
+ TwoTuple_OutPointScriptZ ret_hu_conv = new TwoTuple_OutPointScriptZ(null, ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ ret_hu_conv.ptrs_to.add(a);
+ return ret_hu_conv;
+ }
+
+}
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import javax.annotation.Nullable;
+
+
+/**
+ * A Tuple
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class TwoTuple_PaymentHashPaymentSecretZ extends CommonBase {
+ TwoTuple_PaymentHashPaymentSecretZ(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.C2Tuple_PaymentHashPaymentSecretZ_free(ptr); }
+ }
+
+ /**
+ *
+ */
+ public byte[] get_a() {
+ byte[] ret = bindings.C2Tuple_PaymentHashPaymentSecretZ_get_a(this.ptr);
+ return ret;
+ }
+
+ /**
+ *
+ */
+ public byte[] get_b() {
+ byte[] ret = bindings.C2Tuple_PaymentHashPaymentSecretZ_get_b(this.ptr);
+ return ret;
+ }
+
+ /**
+ * Creates a new tuple which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public TwoTuple_PaymentHashPaymentSecretZ clone() {
+ long ret = bindings.C2Tuple_PaymentHashPaymentSecretZ_clone(this.ptr);
+ if (ret < 1024) { return null; }
+ TwoTuple_PaymentHashPaymentSecretZ ret_hu_conv = new TwoTuple_PaymentHashPaymentSecretZ(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new C2Tuple_PaymentHashPaymentSecretZ from the contained elements.
+ */
+ public static TwoTuple_PaymentHashPaymentSecretZ of(byte[] a, byte[] b) {
+ long ret = bindings.C2Tuple_PaymentHashPaymentSecretZ_new(a, b);
+ if (ret < 1024) { return null; }
+ TwoTuple_PaymentHashPaymentSecretZ ret_hu_conv = new TwoTuple_PaymentHashPaymentSecretZ(null, ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+}
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import javax.annotation.Nullable;
+
+
+/**
+ * A Tuple
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class TwoTuple_PublicKeyTypeZ extends CommonBase {
+ TwoTuple_PublicKeyTypeZ(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.C2Tuple_PublicKeyTypeZ_free(ptr); }
+ }
+
+ /**
+ *
+ */
+ public byte[] get_a() {
+ byte[] ret = bindings.C2Tuple_PublicKeyTypeZ_get_a(this.ptr);
+ return ret;
+ }
+
+ /**
+ *
+ */
+ public Type get_b() {
+ long ret = bindings.C2Tuple_PublicKeyTypeZ_get_b(this.ptr);
+ if (ret < 1024) { return null; }
+ Type ret_hu_conv = new Type(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new tuple which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public TwoTuple_PublicKeyTypeZ clone() {
+ long ret = bindings.C2Tuple_PublicKeyTypeZ_clone(this.ptr);
+ if (ret < 1024) { return null; }
+ TwoTuple_PublicKeyTypeZ ret_hu_conv = new TwoTuple_PublicKeyTypeZ(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new C2Tuple_PublicKeyTypeZ from the contained elements.
+ */
+ public static TwoTuple_PublicKeyTypeZ of(byte[] a, Type b) {
+ long ret = bindings.C2Tuple_PublicKeyTypeZ_new(a, b == null ? 0 : b.ptr);
+ if (ret < 1024) { return null; }
+ TwoTuple_PublicKeyTypeZ ret_hu_conv = new TwoTuple_PublicKeyTypeZ(null, ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ ret_hu_conv.ptrs_to.add(b);
+ return ret_hu_conv;
+ }
+
+}
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import javax.annotation.Nullable;
+
+
+/**
+ * A Tuple
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class TwoTuple_SignatureCVec_SignatureZZ extends CommonBase {
+ TwoTuple_SignatureCVec_SignatureZZ(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.C2Tuple_SignatureCVec_SignatureZZ_free(ptr); }
+ }
+
+ /**
+ *
+ */
+ public byte[] get_a() {
+ byte[] ret = bindings.C2Tuple_SignatureCVec_SignatureZZ_get_a(this.ptr);
+ return ret;
+ }
+
+ /**
+ *
+ */
+ public byte[][] get_b() {
+ byte[][] ret = bindings.C2Tuple_SignatureCVec_SignatureZZ_get_b(this.ptr);
+ return ret;
+ }
+
+ /**
+ * Creates a new tuple which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public TwoTuple_SignatureCVec_SignatureZZ clone() {
+ long ret = bindings.C2Tuple_SignatureCVec_SignatureZZ_clone(this.ptr);
+ if (ret < 1024) { return null; }
+ TwoTuple_SignatureCVec_SignatureZZ ret_hu_conv = new TwoTuple_SignatureCVec_SignatureZZ(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new C2Tuple_SignatureCVec_SignatureZZ from the contained elements.
+ */
+ public static TwoTuple_SignatureCVec_SignatureZZ of(byte[] a, byte[][] b) {
+ long ret = bindings.C2Tuple_SignatureCVec_SignatureZZ_new(a, b);
+ if (ret < 1024) { return null; }
+ TwoTuple_SignatureCVec_SignatureZZ ret_hu_conv = new TwoTuple_SignatureCVec_SignatureZZ(null, ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+}
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import javax.annotation.Nullable;
+
+
+/**
+ * A Tuple
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ extends CommonBase {
+ TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(ptr); }
+ }
+
+ /**
+ *
+ */
+ public byte[] get_a() {
+ byte[] ret = bindings.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(this.ptr);
+ return ret;
+ }
+
+ /**
+ *
+ */
+ public TwoTuple_u32ScriptZ[] get_b() {
+ long[] ret = bindings.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(this.ptr);
+ TwoTuple_u32ScriptZ[] ret_conv_21_arr = new TwoTuple_u32ScriptZ[ret.length];
+ for (int v = 0; v < ret.length; v++) {
+ long ret_conv_21 = ret[v];
+ TwoTuple_u32ScriptZ ret_conv_21_hu_conv = new TwoTuple_u32ScriptZ(null, ret_conv_21);
+ ret_conv_21_hu_conv.ptrs_to.add(this);
+ ret_conv_21_arr[v] = ret_conv_21_hu_conv;
+ }
+ return ret_conv_21_arr;
+ }
+
+ /**
+ * Creates a new tuple which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ clone() {
+ long ret = bindings.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(this.ptr);
+ if (ret < 1024) { return null; }
+ TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ ret_hu_conv = new TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ from the contained elements.
+ */
+ public static TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ of(byte[] a, TwoTuple_u32ScriptZ[] b) {
+ long ret = bindings.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a, b != null ? Arrays.stream(b).mapToLong(b_conv_21 -> b_conv_21 != null ? b_conv_21.ptr : 0).toArray() : null);
+ if (ret < 1024) { return null; }
+ TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ ret_hu_conv = new TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ(null, ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+}
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import javax.annotation.Nullable;
+
+
+/**
+ * A Tuple
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ extends CommonBase {
+ TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(ptr); }
+ }
+
+ /**
+ *
+ */
+ public byte[] get_a() {
+ byte[] ret = bindings.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(this.ptr);
+ return ret;
+ }
+
+ /**
+ *
+ */
+ public TwoTuple_u32TxOutZ[] get_b() {
+ long[] ret = bindings.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(this.ptr);
+ TwoTuple_u32TxOutZ[] ret_conv_20_arr = new TwoTuple_u32TxOutZ[ret.length];
+ for (int u = 0; u < ret.length; u++) {
+ long ret_conv_20 = ret[u];
+ TwoTuple_u32TxOutZ ret_conv_20_hu_conv = new TwoTuple_u32TxOutZ(null, ret_conv_20);
+ ret_conv_20_hu_conv.ptrs_to.add(this);
+ ret_conv_20_arr[u] = ret_conv_20_hu_conv;
+ }
+ return ret_conv_20_arr;
+ }
+
+ /**
+ * Creates a new tuple which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ clone() {
+ long ret = bindings.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(this.ptr);
+ if (ret < 1024) { return null; }
+ TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ ret_hu_conv = new TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ from the contained elements.
+ */
+ public static TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ of(byte[] a, TwoTuple_u32TxOutZ[] b) {
+ long ret = bindings.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a, b != null ? Arrays.stream(b).mapToLong(b_conv_20 -> b_conv_20 != null ? b_conv_20.ptr : 0).toArray() : null);
+ if (ret < 1024) { return null; }
+ TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ ret_hu_conv = new TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ(null, ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+}
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import javax.annotation.Nullable;
+
+
+/**
+ * A Tuple
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class TwoTuple_u32ScriptZ extends CommonBase {
+ TwoTuple_u32ScriptZ(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.C2Tuple_u32ScriptZ_free(ptr); }
+ }
+
+ /**
+ *
+ */
+ public int get_a() {
+ int ret = bindings.C2Tuple_u32ScriptZ_get_a(this.ptr);
+ return ret;
+ }
+
+ /**
+ *
+ */
+ public byte[] get_b() {
+ byte[] ret = bindings.C2Tuple_u32ScriptZ_get_b(this.ptr);
+ return ret;
+ }
+
+ /**
+ * Creates a new tuple which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public TwoTuple_u32ScriptZ clone() {
+ long ret = bindings.C2Tuple_u32ScriptZ_clone(this.ptr);
+ if (ret < 1024) { return null; }
+ TwoTuple_u32ScriptZ ret_hu_conv = new TwoTuple_u32ScriptZ(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new C2Tuple_u32ScriptZ from the contained elements.
+ */
+ public static TwoTuple_u32ScriptZ of(int a, byte[] b) {
+ long ret = bindings.C2Tuple_u32ScriptZ_new(a, b);
+ if (ret < 1024) { return null; }
+ TwoTuple_u32ScriptZ ret_hu_conv = new TwoTuple_u32ScriptZ(null, ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+}
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import javax.annotation.Nullable;
+
+
+/**
+ * A Tuple
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class TwoTuple_u32TxOutZ extends CommonBase {
+ TwoTuple_u32TxOutZ(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.C2Tuple_u32TxOutZ_free(ptr); }
+ }
+
+ /**
+ *
+ */
+ public int get_a() {
+ int ret = bindings.C2Tuple_u32TxOutZ_get_a(this.ptr);
+ return ret;
+ }
+
+ /**
+ *
+ */
+ public TxOut get_b() {
+ long ret = bindings.C2Tuple_u32TxOutZ_get_b(this.ptr);
+ if (ret < 1024) { return null; }
+ TxOut ret_conv = new TxOut(null, ret);
+ return ret_conv;
+ }
+
+ /**
+ * Creates a new tuple which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public TwoTuple_u32TxOutZ clone() {
+ long ret = bindings.C2Tuple_u32TxOutZ_clone(this.ptr);
+ if (ret < 1024) { return null; }
+ TwoTuple_u32TxOutZ ret_hu_conv = new TwoTuple_u32TxOutZ(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new C2Tuple_u32TxOutZ from the contained elements.
+ */
+ public static TwoTuple_u32TxOutZ of(int a, TxOut b) {
+ long ret = bindings.C2Tuple_u32TxOutZ_new(a, b.ptr);
+ if (ret < 1024) { return null; }
+ TwoTuple_u32TxOutZ ret_hu_conv = new TwoTuple_u32TxOutZ(null, ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+}
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import javax.annotation.Nullable;
+
+
+/**
+ * A Tuple
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class TwoTuple_usizeTransactionZ extends CommonBase {
+ TwoTuple_usizeTransactionZ(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.C2Tuple_usizeTransactionZ_free(ptr); }
+ }
+
+ /**
+ *
+ */
+ public long get_a() {
+ long ret = bindings.C2Tuple_usizeTransactionZ_get_a(this.ptr);
+ return ret;
+ }
+
+ /**
+ *
+ */
+ public byte[] get_b() {
+ byte[] ret = bindings.C2Tuple_usizeTransactionZ_get_b(this.ptr);
+ return ret;
+ }
+
+ /**
+ * Creates a new tuple which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public TwoTuple_usizeTransactionZ clone() {
+ long ret = bindings.C2Tuple_usizeTransactionZ_clone(this.ptr);
+ if (ret < 1024) { return null; }
+ TwoTuple_usizeTransactionZ ret_hu_conv = new TwoTuple_usizeTransactionZ(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new C2Tuple_usizeTransactionZ from the contained elements.
+ */
+ public static TwoTuple_usizeTransactionZ of(long a, byte[] b) {
+ long ret = bindings.C2Tuple_usizeTransactionZ_new(a, b);
+ if (ret < 1024) { return null; }
+ TwoTuple_usizeTransactionZ ret_hu_conv = new TwoTuple_usizeTransactionZ(null, ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+}
/**
* Read a C2Tuple_BlockHashChannelMonitorZ from a byte array, created by C2Tuple_BlockHashChannelMonitorZ_write
*/
- public static Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ BlockHashChannelMonitorZ_read(byte[] ser, KeysInterface arg) {
+ public static Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ C2Tuple_BlockHashChannelMonitorZ_read(byte[] ser, KeysInterface arg) {
long ret = bindings.C2Tuple_BlockHashChannelMonitorZ_read(ser, arg == null ? 0 : arg.ptr);
if (ret < 1024) { return null; }
Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.constr_from_ptr(ret);
/**
* Read a C2Tuple_BlockHashChannelManagerZ from a byte array, created by C2Tuple_BlockHashChannelManagerZ_write
*/
- public static Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ BlockHashChannelManagerZ_read(byte[] ser, KeysInterface arg_keys_manager, FeeEstimator arg_fee_estimator, Watch arg_chain_monitor, BroadcasterInterface arg_tx_broadcaster, Logger arg_logger, UserConfig arg_default_config, ChannelMonitor[] arg_channel_monitors) {
+ public static Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ C2Tuple_BlockHashChannelManagerZ_read(byte[] ser, KeysInterface arg_keys_manager, FeeEstimator arg_fee_estimator, Watch arg_chain_monitor, BroadcasterInterface arg_tx_broadcaster, Logger arg_logger, UserConfig arg_default_config, ChannelMonitor[] arg_channel_monitors) {
long ret = bindings.C2Tuple_BlockHashChannelManagerZ_read(ser, bindings.ChannelManagerReadArgs_new(arg_keys_manager == null ? 0 : arg_keys_manager.ptr, arg_fee_estimator == null ? 0 : arg_fee_estimator.ptr, arg_chain_monitor == null ? 0 : arg_chain_monitor.ptr, arg_tx_broadcaster == null ? 0 : arg_tx_broadcaster.ptr, arg_logger == null ? 0 : arg_logger.ptr, arg_default_config == null ? 0 : arg_default_config.ptr & ~1, arg_channel_monitors != null ? Arrays.stream(arg_channel_monitors).mapToLong(arg_channel_monitors_conv_16 -> arg_channel_monitors_conv_16 == null ? 0 : arg_channel_monitors_conv_16.ptr & ~1).toArray() : null));
if (ret < 1024) { return null; }
Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.constr_from_ptr(ret);
return res;
}
-JNIEXPORT jstring JNICALL Java_org_ldk_impl_bindings_get_1lib_1version_1string(JNIEnv *env, jclass _c) {
- return str_ref_to_java(env, "v0.0.101.0", strlen("v0.0.101.0"));
-}
JNIEXPORT jstring JNICALL Java_org_ldk_impl_bindings_get_1ldk_1c_1bindings_1version(JNIEnv *env, jclass _c) {
return str_ref_to_java(env, check_get_ldk_bindings_version(), strlen(check_get_ldk_bindings_version()));
}
JNIEXPORT jstring JNICALL Java_org_ldk_impl_bindings_get_1ldk_1version(JNIEnv *env, jclass _c) {
return str_ref_to_java(env, check_get_ldk_version(), strlen(check_get_ldk_version()));
}
+#include "version.c"
static jclass arr_of_B_clz = NULL;
static jclass arr_of_J_clz = NULL;
JNIEXPORT void Java_org_ldk_impl_bindings_init_1class_1cache(JNIEnv * env, jclass clz) {
ret->b = b_ref;
return (uint64_t)ret;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1usizeTransactionZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_usizeTransactionZ *tuple = (LDKC2Tuple_usizeTransactionZ*)(ptr & ~1);
+static inline uintptr_t C2Tuple_usizeTransactionZ_get_a(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR tuple){
return tuple->a;
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1usizeTransactionZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_usizeTransactionZ *tuple = (LDKC2Tuple_usizeTransactionZ*)(ptr & ~1);
- LDKTransaction b_var = tuple->b;
- int8_tArray b_arr = (*env)->NewByteArray(env, b_var.datalen);
- (*env)->SetByteArrayRegion(env, b_arr, 0, b_var.datalen, b_var.data);
- return b_arr;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_usizeTransactionZ* tuple_conv = (LDKC2Tuple_usizeTransactionZ*)(tuple & ~1);
+ int64_t ret_val = C2Tuple_usizeTransactionZ_get_a(tuple_conv);
+ return ret_val;
+}
+
+static inline struct LDKTransaction C2Tuple_usizeTransactionZ_get_b(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR tuple){
+ return tuple->b;
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_usizeTransactionZ* tuple_conv = (LDKC2Tuple_usizeTransactionZ*)(tuple & ~1);
+ LDKTransaction ret_var = C2Tuple_usizeTransactionZ_get_b(tuple_conv);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+ Transaction_free(ret_var);
+ return ret_arr;
}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1usizeTransactionZZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
LDKCVec_C2Tuple_usizeTransactionZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_usizeTransactionZZ), "LDKCVec_C2Tuple_usizeTransactionZZ");
ret->datalen = (*env)->GetArrayLength(env, elems);
LDKCOption_C2Tuple_usizeTransactionZZ *obj = (LDKCOption_C2Tuple_usizeTransactionZZ*)(ptr & ~1);
switch(obj->tag) {
case LDKCOption_C2Tuple_usizeTransactionZZ_Some: {
- uint64_t some_ref = (uint64_t)(&obj->some) | 1;
- return (*env)->NewObject(env, LDKCOption_C2Tuple_usizeTransactionZZ_Some_class, LDKCOption_C2Tuple_usizeTransactionZZ_Some_meth, some_ref);
+ LDKC2Tuple_usizeTransactionZ* some_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
+ *some_conv = obj->some;
+ *some_conv = C2Tuple_usizeTransactionZ_clone(some_conv);
+ return (*env)->NewObject(env, LDKCOption_C2Tuple_usizeTransactionZZ_Some_class, LDKCOption_C2Tuple_usizeTransactionZZ_Some_meth, ((uint64_t)some_conv));
}
case LDKCOption_C2Tuple_usizeTransactionZZ_None: {
return (*env)->NewObject(env, LDKCOption_C2Tuple_usizeTransactionZZ_None_class, LDKCOption_C2Tuple_usizeTransactionZZ_None_meth);
ret->b = b_constr;
return (uint64_t)ret;
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1SignatureCVec_1SignatureZZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_SignatureCVec_SignatureZZ *tuple = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(ptr & ~1);
- int8_tArray a_arr = (*env)->NewByteArray(env, 64);
- (*env)->SetByteArrayRegion(env, a_arr, 0, 64, tuple->a.compact_form);
- return a_arr;
+static inline struct LDKSignature C2Tuple_SignatureCVec_SignatureZZ_get_a(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR tuple){
+ return tuple->a;
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_SignatureCVec_SignatureZZ* tuple_conv = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(tuple & ~1);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 64);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, C2Tuple_SignatureCVec_SignatureZZ_get_a(tuple_conv).compact_form);
+ return ret_arr;
+}
+
+static inline struct LDKCVec_SignatureZ C2Tuple_SignatureCVec_SignatureZZ_get_b(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR tuple){
+ return tuple->b;
}
-JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1SignatureCVec_1SignatureZZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_SignatureCVec_SignatureZZ *tuple = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(ptr & ~1);
- LDKCVec_SignatureZ b_var = tuple->b;
- jobjectArray b_arr = (*env)->NewObjectArray(env, b_var.datalen, arr_of_B_clz, NULL);
+JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_SignatureCVec_SignatureZZ* tuple_conv = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(tuple & ~1);
+ LDKCVec_SignatureZ ret_var = C2Tuple_SignatureCVec_SignatureZZ_get_b(tuple_conv);
+ jobjectArray ret_arr = (*env)->NewObjectArray(env, ret_var.datalen, arr_of_B_clz, NULL);
;
- for (size_t i = 0; i < b_var.datalen; i++) {
- int8_tArray b_conv_8_arr = (*env)->NewByteArray(env, 64);
- (*env)->SetByteArrayRegion(env, b_conv_8_arr, 0, 64, b_var.data[i].compact_form);
- (*env)->SetObjectArrayElement(env, b_arr, i, b_conv_8_arr);
+ for (size_t i = 0; i < ret_var.datalen; i++) {
+ int8_tArray ret_conv_8_arr = (*env)->NewByteArray(env, 64);
+ (*env)->SetByteArrayRegion(env, ret_conv_8_arr, 0, 64, ret_var.data[i].compact_form);
+ (*env)->SetObjectArrayElement(env, ret_arr, i, ret_conv_8_arr);
}
- return b_arr;
+ FREE(ret_var.data);
+ return ret_arr;
}
+
JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
return ((LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)arg)->result_ok;
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *val = (LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(arg & ~1);
CHECK(val->result_ok);
- uint64_t res_ref = (uint64_t)(&(*val->contents.result)) | 1;
- return res_ref;
+ LDKC2Tuple_SignatureCVec_SignatureZZ* res_conv = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
+ *res_conv = (*val->contents.result);
+ *res_conv = C2Tuple_SignatureCVec_SignatureZZ_clone(res_conv);
+ return ((uint64_t)res_conv);
}
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *val = (LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(arg & ~1);
ret->b = b_conv;
return (uint64_t)ret;
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelMonitorZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_BlockHashChannelMonitorZ *tuple = (LDKC2Tuple_BlockHashChannelMonitorZ*)(ptr & ~1);
- int8_tArray a_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, a_arr, 0, 32, tuple->a.data);
- return a_arr;
+static inline struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelMonitorZ_get_a(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR tuple){
+ return ThirtyTwoBytes_clone(&tuple->a);
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMonitorZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_BlockHashChannelMonitorZ* tuple_conv = (LDKC2Tuple_BlockHashChannelMonitorZ*)(tuple & ~1);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C2Tuple_BlockHashChannelMonitorZ_get_a(tuple_conv).data);
+ return ret_arr;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelMonitorZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_BlockHashChannelMonitorZ *tuple = (LDKC2Tuple_BlockHashChannelMonitorZ*)(ptr & ~1);
- LDKChannelMonitor b_var = tuple->b;
- CHECK((((uint64_t)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- uint64_t b_ref = (uint64_t)b_var.inner & ~1;
- return b_ref;
+
+static inline struct LDKChannelMonitor C2Tuple_BlockHashChannelMonitorZ_get_b(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR tuple){
+ return ChannelMonitor_clone(&tuple->b);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMonitorZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_BlockHashChannelMonitorZ* tuple_conv = (LDKC2Tuple_BlockHashChannelMonitorZ*)(tuple & ~1);
+ LDKChannelMonitor ret_var = C2Tuple_BlockHashChannelMonitorZ_get_b(tuple_conv);
+ CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ uint64_t ret_ref = (uint64_t)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1BlockHashChannelMonitorZZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
LDKCVec_C2Tuple_BlockHashChannelMonitorZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_BlockHashChannelMonitorZZ), "LDKCVec_C2Tuple_BlockHashChannelMonitorZZ");
ret->datalen = (*env)->GetArrayLength(env, elems);
for (size_t i = 0; i < ret->datalen; i++) {
int64_t arr_elem = java_elems[i];
LDKC2Tuple_BlockHashChannelMonitorZ arr_elem_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)arr_elem) & ~1);
- // Warning: we may need a move here but no clone is available for LDKC2Tuple_BlockHashChannelMonitorZ
+ arr_elem_conv = C2Tuple_BlockHashChannelMonitorZ_clone((LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)arr_elem) & ~1));
ret->data[i] = arr_elem_conv;
}
(*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
}
return (uint64_t)ret;
}
+static inline LDKCVec_C2Tuple_BlockHashChannelMonitorZZ CVec_C2Tuple_BlockHashChannelMonitorZZ_clone(const LDKCVec_C2Tuple_BlockHashChannelMonitorZZ *orig) {
+ LDKCVec_C2Tuple_BlockHashChannelMonitorZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ) * orig->datalen, "LDKCVec_C2Tuple_BlockHashChannelMonitorZZ clone bytes"), .datalen = orig->datalen };
+ for (size_t i = 0; i < ret.datalen; i++) {
+ ret.data[i] = C2Tuple_BlockHashChannelMonitorZ_clone(&orig->data[i]);
+ }
+ return ret;
+}
JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1C2Tuple_1BlockHashChannelMonitorZZErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
return ((LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ*)arg)->result_ok;
}
LDKCVec_C2Tuple_BlockHashChannelMonitorZZ res_var = (*val->contents.result);
int64_tArray res_arr = (*env)->NewLongArray(env, res_var.datalen);
int64_t *res_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, res_arr, NULL);
- for (size_t i = 0; i < res_var.datalen; i++) {
- uint64_t res_conv_34_ref = (uint64_t)(&res_var.data[i]) | 1;
- res_arr_ptr[i] = res_conv_34_ref;
+ for (size_t j = 0; j < res_var.datalen; j++) {
+ LDKC2Tuple_BlockHashChannelMonitorZ* res_conv_35_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
+ *res_conv_35_conv = res_var.data[j];
+ *res_conv_35_conv = C2Tuple_BlockHashChannelMonitorZ_clone(res_conv_35_conv);
+ res_arr_ptr[j] = ((uint64_t)res_conv_35_conv);
}
(*env)->ReleasePrimitiveArrayCritical(env, res_arr, res_arr_ptr, 0);
return res_arr;
ret->b = b_ref;
return (uint64_t)ret;
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1PaymentHashPaymentSecretZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_PaymentHashPaymentSecretZ *tuple = (LDKC2Tuple_PaymentHashPaymentSecretZ*)(ptr & ~1);
- int8_tArray a_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, a_arr, 0, 32, tuple->a.data);
- return a_arr;
+static inline struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_a(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR tuple){
+ return ThirtyTwoBytes_clone(&tuple->a);
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PaymentHashPaymentSecretZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_PaymentHashPaymentSecretZ* tuple_conv = (LDKC2Tuple_PaymentHashPaymentSecretZ*)(tuple & ~1);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C2Tuple_PaymentHashPaymentSecretZ_get_a(tuple_conv).data);
+ return ret_arr;
+}
+
+static inline struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_b(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR tuple){
+ return ThirtyTwoBytes_clone(&tuple->b);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1PaymentHashPaymentSecretZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_PaymentHashPaymentSecretZ *tuple = (LDKC2Tuple_PaymentHashPaymentSecretZ*)(ptr & ~1);
- int8_tArray b_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, b_arr, 0, 32, tuple->b.data);
- return b_arr;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PaymentHashPaymentSecretZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_PaymentHashPaymentSecretZ* tuple_conv = (LDKC2Tuple_PaymentHashPaymentSecretZ*)(tuple & ~1);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C2Tuple_PaymentHashPaymentSecretZ_get_b(tuple_conv).data);
+ return ret_arr;
}
+
JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PaymentSecretAPIErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
return ((LDKCResult_PaymentSecretAPIErrorZ*)arg)->result_ok;
}
ret->b = b_conv;
return (uint64_t)ret;
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelManagerZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_BlockHashChannelManagerZ *tuple = (LDKC2Tuple_BlockHashChannelManagerZ*)(ptr & ~1);
- int8_tArray a_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, a_arr, 0, 32, tuple->a.data);
- return a_arr;
+static inline struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelManagerZ_get_a(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR tuple){
+ return ThirtyTwoBytes_clone(&tuple->a);
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelManagerZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_BlockHashChannelManagerZ* tuple_conv = (LDKC2Tuple_BlockHashChannelManagerZ*)(tuple & ~1);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C2Tuple_BlockHashChannelManagerZ_get_a(tuple_conv).data);
+ return ret_arr;
+}
+
+static inline struct LDKChannelManager *C2Tuple_BlockHashChannelManagerZ_get_b(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR tuple){
+ return &tuple->b;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelManagerZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_BlockHashChannelManagerZ *tuple = (LDKC2Tuple_BlockHashChannelManagerZ*)(ptr & ~1);
- LDKChannelManager b_var = tuple->b;
- CHECK((((uint64_t)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- uint64_t b_ref = (uint64_t)b_var.inner & ~1;
- return b_ref;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelManagerZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_BlockHashChannelManagerZ* tuple_conv = (LDKC2Tuple_BlockHashChannelManagerZ*)(tuple & ~1);
+ LDKChannelManager ret_var = *C2Tuple_BlockHashChannelManagerZ_get_b(tuple_conv);
+ CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ uint64_t ret_ref = (uint64_t)ret_var.inner & ~1;
+ return ret_ref;
}
+
JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
return ((LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)arg)->result_ok;
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)(arg & ~1);
CHECK(val->result_ok);
- uint64_t res_ref = (uint64_t)(&(*val->contents.result)) | 1;
- return res_ref;
+ LDKC2Tuple_BlockHashChannelManagerZ* res_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelManagerZ), "LDKC2Tuple_BlockHashChannelManagerZ");
+ *res_conv = (*val->contents.result);
+ // Warning: we really need to clone here, but no clone is available for LDKC2Tuple_BlockHashChannelManagerZ
+ return ((uint64_t)res_conv) | 1;
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)(arg & ~1);
ret->c = c_conv;
return (uint64_t)ret;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *tuple = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(ptr & ~1);
- LDKRawInvoice a_var = tuple->a;
- CHECK((((uint64_t)a_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&a_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- uint64_t a_ref = (uint64_t)a_var.inner & ~1;
- return a_ref;
-}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *tuple = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(ptr & ~1);
- int8_tArray b_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, b_arr, 0, 32, tuple->b.data);
- return b_arr;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1get_1c(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *tuple = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(ptr & ~1);
- LDKInvoiceSignature c_var = tuple->c;
- CHECK((((uint64_t)c_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&c_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- uint64_t c_ref = (uint64_t)c_var.inner & ~1;
- return c_ref;
+static inline struct LDKRawInvoice C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple){
+ return RawInvoice_clone(&tuple->a);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* tuple_conv = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(tuple & ~1);
+ LDKRawInvoice ret_var = C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(tuple_conv);
+ CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ uint64_t ret_ref = (uint64_t)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
+static inline struct LDKThirtyTwoBytes C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple){
+ return ThirtyTwoBytes_clone(&tuple->b);
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* tuple_conv = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(tuple & ~1);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(tuple_conv).data);
+ return ret_arr;
+}
+
+static inline struct LDKInvoiceSignature C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple){
+ return InvoiceSignature_clone(&tuple->c);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1get_1c(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* tuple_conv = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(tuple & ~1);
+ LDKInvoiceSignature ret_var = C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(tuple_conv);
+ CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ uint64_t ret_ref = (uint64_t)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PayeePubKeyErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
return ((LDKCResult_PayeePubKeyErrorZ*)arg)->result_ok;
}
ret->b = b_ref;
return (uint64_t)ret;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1OutPointScriptZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_OutPointScriptZ *tuple = (LDKC2Tuple_OutPointScriptZ*)(ptr & ~1);
- LDKOutPoint a_var = tuple->a;
- CHECK((((uint64_t)a_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&a_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- uint64_t a_ref = (uint64_t)a_var.inner & ~1;
- return a_ref;
-}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1OutPointScriptZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_OutPointScriptZ *tuple = (LDKC2Tuple_OutPointScriptZ*)(ptr & ~1);
- LDKCVec_u8Z b_var = tuple->b;
- int8_tArray b_arr = (*env)->NewByteArray(env, b_var.datalen);
- (*env)->SetByteArrayRegion(env, b_arr, 0, b_var.datalen, b_var.data);
- return b_arr;
+static inline struct LDKOutPoint C2Tuple_OutPointScriptZ_get_a(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR tuple){
+ return OutPoint_clone(&tuple->a);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_OutPointScriptZ* tuple_conv = (LDKC2Tuple_OutPointScriptZ*)(tuple & ~1);
+ LDKOutPoint ret_var = C2Tuple_OutPointScriptZ_get_a(tuple_conv);
+ CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ uint64_t ret_ref = (uint64_t)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
+static inline struct LDKCVec_u8Z C2Tuple_OutPointScriptZ_get_b(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR tuple){
+ return CVec_u8Z_clone(&tuple->b);
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_OutPointScriptZ* tuple_conv = (LDKC2Tuple_OutPointScriptZ*)(tuple & ~1);
+ LDKCVec_u8Z ret_var = C2Tuple_OutPointScriptZ_get_b(tuple_conv);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32ScriptZ_1new(JNIEnv *env, jclass clz, int32_t a, int8_tArray b) {
LDKC2Tuple_u32ScriptZ* ret = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
ret->a = a;
ret->b = b_ref;
return (uint64_t)ret;
}
-JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32ScriptZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_u32ScriptZ *tuple = (LDKC2Tuple_u32ScriptZ*)(ptr & ~1);
+static inline uint32_t C2Tuple_u32ScriptZ_get_a(LDKC2Tuple_u32ScriptZ *NONNULL_PTR tuple){
return tuple->a;
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32ScriptZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_u32ScriptZ *tuple = (LDKC2Tuple_u32ScriptZ*)(ptr & ~1);
- LDKCVec_u8Z b_var = tuple->b;
- int8_tArray b_arr = (*env)->NewByteArray(env, b_var.datalen);
- (*env)->SetByteArrayRegion(env, b_arr, 0, b_var.datalen, b_var.data);
- return b_arr;
+JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32ScriptZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_u32ScriptZ* tuple_conv = (LDKC2Tuple_u32ScriptZ*)(tuple & ~1);
+ int32_t ret_val = C2Tuple_u32ScriptZ_get_a(tuple_conv);
+ return ret_val;
+}
+
+static inline struct LDKCVec_u8Z C2Tuple_u32ScriptZ_get_b(LDKC2Tuple_u32ScriptZ *NONNULL_PTR tuple){
+ return CVec_u8Z_clone(&tuple->b);
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32ScriptZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_u32ScriptZ* tuple_conv = (LDKC2Tuple_u32ScriptZ*)(tuple & ~1);
+ LDKCVec_u8Z ret_var = C2Tuple_u32ScriptZ_get_b(tuple_conv);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1u32ScriptZZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
LDKCVec_C2Tuple_u32ScriptZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_u32ScriptZZ), "LDKCVec_C2Tuple_u32ScriptZZ");
ret->datalen = (*env)->GetArrayLength(env, elems);
else
b_constr.data = NULL;
int64_t* b_vals = (*env)->GetLongArrayElements (env, b, NULL);
- for (size_t b = 0; b < b_constr.datalen; b++) {
- int64_t b_conv_27 = b_vals[b];
- LDKC2Tuple_u32ScriptZ b_conv_27_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_27) & ~1);
- b_conv_27_conv = C2Tuple_u32ScriptZ_clone((LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_27) & ~1));
- b_constr.data[b] = b_conv_27_conv;
+ for (size_t v = 0; v < b_constr.datalen; v++) {
+ int64_t b_conv_21 = b_vals[v];
+ LDKC2Tuple_u32ScriptZ b_conv_21_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_21) & ~1);
+ b_conv_21_conv = C2Tuple_u32ScriptZ_clone((LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_21) & ~1));
+ b_constr.data[v] = b_conv_21_conv;
}
(*env)->ReleaseLongArrayElements(env, b, b_vals, 0);
ret->b = b_constr;
return (uint64_t)ret;
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple_1u32ScriptZZZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *tuple = (LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(ptr & ~1);
- int8_tArray a_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, a_arr, 0, 32, tuple->a.data);
- return a_arr;
+static inline struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR tuple){
+ return ThirtyTwoBytes_clone(&tuple->a);
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32ScriptZZZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* tuple_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(tuple & ~1);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(tuple_conv).data);
+ return ret_arr;
+}
+
+static inline struct LDKCVec_C2Tuple_u32ScriptZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR tuple){
+ return CVec_C2Tuple_u32ScriptZZ_clone(&tuple->b);
}
-JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple_1u32ScriptZZZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *tuple = (LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(ptr & ~1);
- LDKCVec_C2Tuple_u32ScriptZZ b_var = tuple->b;
- int64_tArray b_arr = (*env)->NewLongArray(env, b_var.datalen);
- int64_t *b_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, b_arr, NULL);
- for (size_t b = 0; b < b_var.datalen; b++) {
- uint64_t b_conv_27_ref = (uint64_t)(&b_var.data[b]) | 1;
- b_arr_ptr[b] = b_conv_27_ref;
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32ScriptZZZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* tuple_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(tuple & ~1);
+ LDKCVec_C2Tuple_u32ScriptZZ ret_var = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(tuple_conv);
+ int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
+ int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
+ for (size_t v = 0; v < ret_var.datalen; v++) {
+ LDKC2Tuple_u32ScriptZ* ret_conv_21_conv = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
+ *ret_conv_21_conv = ret_var.data[v];
+ ret_arr_ptr[v] = ((uint64_t)ret_conv_21_conv);
}
- (*env)->ReleasePrimitiveArrayCritical(env, b_arr, b_arr_ptr, 0);
- return b_arr;
+ (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
+ FREE(ret_var.data);
+ return ret_arr;
}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1TxidCVec_1C2Tuple_1u32ScriptZZZZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ), "LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ");
ret->datalen = (*env)->GetArrayLength(env, elems);
ret->b = b_conv;
return (uint64_t)ret;
}
-JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32TxOutZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_u32TxOutZ *tuple = (LDKC2Tuple_u32TxOutZ*)(ptr & ~1);
+static inline uint32_t C2Tuple_u32TxOutZ_get_a(LDKC2Tuple_u32TxOutZ *NONNULL_PTR tuple){
return tuple->a;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32TxOutZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_u32TxOutZ *tuple = (LDKC2Tuple_u32TxOutZ*)(ptr & ~1);
- uint64_t b_ref = ((uint64_t)&tuple->b) | 1;
- return (uint64_t)b_ref;
+JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32TxOutZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_u32TxOutZ* tuple_conv = (LDKC2Tuple_u32TxOutZ*)(tuple & ~1);
+ int32_t ret_val = C2Tuple_u32TxOutZ_get_a(tuple_conv);
+ return ret_val;
+}
+
+static inline struct LDKTxOut C2Tuple_u32TxOutZ_get_b(LDKC2Tuple_u32TxOutZ *NONNULL_PTR tuple){
+ return TxOut_clone(&tuple->b);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32TxOutZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_u32TxOutZ* tuple_conv = (LDKC2Tuple_u32TxOutZ*)(tuple & ~1);
+ LDKTxOut* ret_ref = MALLOC(sizeof(LDKTxOut), "LDKTxOut");
+ *ret_ref = C2Tuple_u32TxOutZ_get_b(tuple_conv);
+ return (uint64_t)ret_ref;
}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1u32TxOutZZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
LDKCVec_C2Tuple_u32TxOutZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_u32TxOutZZ), "LDKCVec_C2Tuple_u32TxOutZZ");
ret->datalen = (*env)->GetArrayLength(env, elems);
else
b_constr.data = NULL;
int64_t* b_vals = (*env)->GetLongArrayElements (env, b, NULL);
- for (size_t a = 0; a < b_constr.datalen; a++) {
- int64_t b_conv_26 = b_vals[a];
- LDKC2Tuple_u32TxOutZ b_conv_26_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_26) & ~1);
- b_conv_26_conv = C2Tuple_u32TxOutZ_clone((LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_26) & ~1));
- b_constr.data[a] = b_conv_26_conv;
+ for (size_t u = 0; u < b_constr.datalen; u++) {
+ int64_t b_conv_20 = b_vals[u];
+ LDKC2Tuple_u32TxOutZ b_conv_20_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_20) & ~1);
+ b_conv_20_conv = C2Tuple_u32TxOutZ_clone((LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_20) & ~1));
+ b_constr.data[u] = b_conv_20_conv;
}
(*env)->ReleaseLongArrayElements(env, b, b_vals, 0);
ret->b = b_constr;
return (uint64_t)ret;
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *tuple = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(ptr & ~1);
- int8_tArray a_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, a_arr, 0, 32, tuple->a.data);
- return a_arr;
+static inline struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR tuple){
+ return ThirtyTwoBytes_clone(&tuple->a);
}
-JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *tuple = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(ptr & ~1);
- LDKCVec_C2Tuple_u32TxOutZZ b_var = tuple->b;
- int64_tArray b_arr = (*env)->NewLongArray(env, b_var.datalen);
- int64_t *b_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, b_arr, NULL);
- for (size_t a = 0; a < b_var.datalen; a++) {
- uint64_t b_conv_26_ref = (uint64_t)(&b_var.data[a]) | 1;
- b_arr_ptr[a] = b_conv_26_ref;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* tuple_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(tuple & ~1);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(tuple_conv).data);
+ return ret_arr;
+}
+
+static inline struct LDKCVec_C2Tuple_u32TxOutZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR tuple){
+ return CVec_C2Tuple_u32TxOutZZ_clone(&tuple->b);
+}
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* tuple_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(tuple & ~1);
+ LDKCVec_C2Tuple_u32TxOutZZ ret_var = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(tuple_conv);
+ int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
+ int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
+ for (size_t u = 0; u < ret_var.datalen; u++) {
+ LDKC2Tuple_u32TxOutZ* ret_conv_20_conv = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
+ *ret_conv_20_conv = ret_var.data[u];
+ ret_arr_ptr[u] = ((uint64_t)ret_conv_20_conv);
}
- (*env)->ReleasePrimitiveArrayCritical(env, b_arr, b_arr_ptr, 0);
- return b_arr;
+ (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
+ FREE(ret_var.data);
+ return ret_arr;
}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ), "LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ");
ret->datalen = (*env)->GetArrayLength(env, elems);
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)(arg & ~1);
CHECK(val->result_ok);
- uint64_t res_ref = (uint64_t)(&(*val->contents.result)) | 1;
- return res_ref;
+ LDKC2Tuple_BlockHashChannelMonitorZ* res_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
+ *res_conv = (*val->contents.result);
+ *res_conv = C2Tuple_BlockHashChannelMonitorZ_clone(res_conv);
+ return ((uint64_t)res_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)(arg & ~1);
ret->b = b_conv;
return (uint64_t)ret;
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1PublicKeyTypeZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_PublicKeyTypeZ *tuple = (LDKC2Tuple_PublicKeyTypeZ*)(ptr & ~1);
- int8_tArray a_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, a_arr, 0, 33, tuple->a.compressed_form);
- return a_arr;
+static inline struct LDKPublicKey C2Tuple_PublicKeyTypeZ_get_a(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR tuple){
+ return tuple->a;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1PublicKeyTypeZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_PublicKeyTypeZ *tuple = (LDKC2Tuple_PublicKeyTypeZ*)(ptr & ~1);
- LDKType* b_ret =MALLOC(sizeof(LDKType), "LDKType");
- *b_ret = Type_clone(&tuple->b);
- return (uint64_t)b_ret;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyTypeZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_PublicKeyTypeZ* tuple_conv = (LDKC2Tuple_PublicKeyTypeZ*)(tuple & ~1);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, C2Tuple_PublicKeyTypeZ_get_a(tuple_conv).compressed_form);
+ return ret_arr;
}
+
+static inline struct LDKType C2Tuple_PublicKeyTypeZ_get_b(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR tuple){
+ return Type_clone(&tuple->b);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyTypeZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_PublicKeyTypeZ* tuple_conv = (LDKC2Tuple_PublicKeyTypeZ*)(tuple & ~1);
+ LDKType* ret_ret =MALLOC(sizeof(LDKType), "LDKType");
+ *ret_ret = C2Tuple_PublicKeyTypeZ_get_b(tuple_conv);
+ return (uint64_t)ret_ret;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1PublicKeyTypeZZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
LDKCVec_C2Tuple_PublicKeyTypeZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_PublicKeyTypeZZ), "LDKCVec_C2Tuple_PublicKeyTypeZZ");
ret->datalen = (*env)->GetArrayLength(env, elems);
ret->c = c_conv;
return (uint64_t)ret;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *tuple = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(ptr & ~1);
- LDKChannelAnnouncement a_var = tuple->a;
- CHECK((((uint64_t)a_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&a_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- uint64_t a_ref = (uint64_t)a_var.inner & ~1;
- return a_ref;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *tuple = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(ptr & ~1);
- LDKChannelUpdate b_var = tuple->b;
- CHECK((((uint64_t)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- uint64_t b_ref = (uint64_t)b_var.inner & ~1;
- return b_ref;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1c(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *tuple = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(ptr & ~1);
- LDKChannelUpdate c_var = tuple->c;
- CHECK((((uint64_t)c_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&c_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- uint64_t c_ref = (uint64_t)c_var.inner & ~1;
- return c_ref;
+static inline struct LDKChannelAnnouncement C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple){
+ return ChannelAnnouncement_clone(&tuple->a);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* tuple_conv = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(tuple & ~1);
+ LDKChannelAnnouncement ret_var = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(tuple_conv);
+ CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ uint64_t ret_ref = (uint64_t)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
+static inline struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple){
+ return ChannelUpdate_clone(&tuple->b);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* tuple_conv = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(tuple & ~1);
+ LDKChannelUpdate ret_var = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(tuple_conv);
+ CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ uint64_t ret_ref = (uint64_t)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
+static inline struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple){
+ return ChannelUpdate_clone(&tuple->c);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1c(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* tuple_conv = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(tuple & ~1);
+ LDKChannelUpdate ret_var = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(tuple_conv);
+ CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ uint64_t ret_ref = (uint64_t)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ *ret = MALLOC(sizeof(LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ), "LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ");
ret->datalen = (*env)->GetArrayLength(env, elems);
LDKCVec_C2Tuple_usizeTransactionZZ txdata_var = txdata;
int64_tArray txdata_arr = (*env)->NewLongArray(env, txdata_var.datalen);
int64_t *txdata_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, txdata_arr, NULL);
- for (size_t y = 0; y < txdata_var.datalen; y++) {
- LDKC2Tuple_usizeTransactionZ* txdata_conv_24_ref = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
- *txdata_conv_24_ref = txdata_var.data[y];
- txdata_arr_ptr[y] = (uint64_t)txdata_conv_24_ref;
+ for (size_t c = 0; c < txdata_var.datalen; c++) {
+ LDKC2Tuple_usizeTransactionZ* txdata_conv_28_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
+ *txdata_conv_28_conv = txdata_var.data[c];
+ txdata_arr_ptr[c] = ((uint64_t)txdata_conv_28_conv);
}
(*env)->ReleasePrimitiveArrayCritical(env, txdata_arr, txdata_arr_ptr, 0);
FREE(txdata_var.data);
else
txdata_constr.data = NULL;
int64_t* txdata_vals = (*env)->GetLongArrayElements (env, txdata, NULL);
- for (size_t y = 0; y < txdata_constr.datalen; y++) {
- int64_t txdata_conv_24 = txdata_vals[y];
- LDKC2Tuple_usizeTransactionZ txdata_conv_24_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_24) & ~1);
- txdata_conv_24_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_24) & ~1));
- txdata_constr.data[y] = txdata_conv_24_conv;
+ for (size_t c = 0; c < txdata_constr.datalen; c++) {
+ int64_t txdata_conv_28 = txdata_vals[c];
+ LDKC2Tuple_usizeTransactionZ txdata_conv_28_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1);
+ txdata_conv_28_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1));
+ txdata_constr.data[c] = txdata_conv_28_conv;
}
(*env)->ReleaseLongArrayElements(env, txdata, txdata_vals, 0);
(this_arg_conv->transactions_confirmed)(this_arg_conv->this_arg, header_ref, txdata_constr, height);
else
ret_constr.data = NULL;
int64_t* ret_vals = (*env)->GetLongArrayElements (env, ret, NULL);
- for (size_t l = 0; l < ret_constr.datalen; l++) {
- int64_t ret_conv_63 = ret_vals[l];
- LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ ret_conv_63_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)ret_conv_63) & ~1);
- ret_conv_63_conv = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone((LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)ret_conv_63) & ~1));
- ret_constr.data[l] = ret_conv_63_conv;
+ for (size_t h = 0; h < ret_constr.datalen; h++) {
+ int64_t ret_conv_59 = ret_vals[h];
+ LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ ret_conv_59_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)ret_conv_59) & ~1);
+ ret_conv_59_conv = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone((LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)ret_conv_59) & ~1));
+ ret_constr.data[h] = ret_conv_59_conv;
}
(*env)->ReleaseLongArrayElements(env, ret, ret_vals, 0);
if (get_jenv_res == JNI_EDETACHED) {
LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ ret_var = (this_arg_conv->get_next_channel_announcements)(this_arg_conv->this_arg, starting_point, batch_amount);
int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
- for (size_t l = 0; l < ret_var.datalen; l++) {
- LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_conv_63_ref = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
- *ret_conv_63_ref = ret_var.data[l];
- ret_arr_ptr[l] = (uint64_t)ret_conv_63_ref;
+ for (size_t h = 0; h < ret_var.datalen; h++) {
+ LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_conv_59_conv = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
+ *ret_conv_59_conv = ret_var.data[h];
+ ret_arr_ptr[h] = ((uint64_t)ret_conv_59_conv);
}
(*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
FREE(ret_var.data);
else
ret_constr.data = NULL;
int64_t* ret_vals = (*env)->GetLongArrayElements (env, ret, NULL);
- for (size_t y = 0; y < ret_constr.datalen; y++) {
- int64_t ret_conv_24 = ret_vals[y];
- LDKC2Tuple_PublicKeyTypeZ ret_conv_24_conv = *(LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)ret_conv_24) & ~1);
- ret_conv_24_conv = C2Tuple_PublicKeyTypeZ_clone((LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)ret_conv_24) & ~1));
- ret_constr.data[y] = ret_conv_24_conv;
+ for (size_t z = 0; z < ret_constr.datalen; z++) {
+ int64_t ret_conv_25 = ret_vals[z];
+ LDKC2Tuple_PublicKeyTypeZ ret_conv_25_conv = *(LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)ret_conv_25) & ~1);
+ ret_conv_25_conv = C2Tuple_PublicKeyTypeZ_clone((LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)ret_conv_25) & ~1));
+ ret_constr.data[z] = ret_conv_25_conv;
}
(*env)->ReleaseLongArrayElements(env, ret, ret_vals, 0);
if (get_jenv_res == JNI_EDETACHED) {
LDKCVec_C2Tuple_PublicKeyTypeZZ ret_var = (this_arg_conv->get_and_clear_pending_msg)(this_arg_conv->this_arg);
int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
- for (size_t y = 0; y < ret_var.datalen; y++) {
- LDKC2Tuple_PublicKeyTypeZ* ret_conv_24_ref = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
- *ret_conv_24_ref = ret_var.data[y];
- ret_arr_ptr[y] = (uint64_t)ret_conv_24_ref;
+ for (size_t z = 0; z < ret_var.datalen; z++) {
+ LDKC2Tuple_PublicKeyTypeZ* ret_conv_25_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
+ *ret_conv_25_conv = ret_var.data[z];
+ ret_arr_ptr[z] = ((uint64_t)ret_conv_25_conv);
}
(*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
FREE(ret_var.data);
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
LDKC2Tuple_usizeTransactionZ* orig_conv = (LDKC2Tuple_usizeTransactionZ*)(orig & ~1);
- LDKC2Tuple_usizeTransactionZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
- *ret_ref = C2Tuple_usizeTransactionZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_usizeTransactionZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
+ *ret_conv = C2Tuple_usizeTransactionZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1new(JNIEnv *env, jclass clz, int64_t a, int8_tArray b) {
b_ref.data = MALLOC(b_ref.datalen, "LDKTransaction Bytes");
(*env)->GetByteArrayRegion(env, b, 0, b_ref.datalen, b_ref.data);
b_ref.data_is_owned = true;
- LDKC2Tuple_usizeTransactionZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
- *ret_ref = C2Tuple_usizeTransactionZ_new(a, b_ref);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_usizeTransactionZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
+ *ret_conv = C2Tuple_usizeTransactionZ_new(a, b_ref);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
else
_res_constr.data = NULL;
int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
- for (size_t y = 0; y < _res_constr.datalen; y++) {
- int64_t _res_conv_24 = _res_vals[y];
- LDKC2Tuple_usizeTransactionZ _res_conv_24_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)_res_conv_24) & ~1);
- FREE((void*)_res_conv_24);
- _res_constr.data[y] = _res_conv_24_conv;
+ for (size_t c = 0; c < _res_constr.datalen; c++) {
+ int64_t _res_conv_28 = _res_vals[c];
+ LDKC2Tuple_usizeTransactionZ _res_conv_28_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)_res_conv_28) & ~1);
+ FREE((void*)_res_conv_28);
+ _res_constr.data[c] = _res_conv_28_conv;
}
(*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
CVec_C2Tuple_usizeTransactionZZ_free(_res_constr);
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
LDKC2Tuple_SignatureCVec_SignatureZZ* orig_conv = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(orig & ~1);
- LDKC2Tuple_SignatureCVec_SignatureZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
- *ret_ref = C2Tuple_SignatureCVec_SignatureZZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_SignatureCVec_SignatureZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
+ *ret_conv = C2Tuple_SignatureCVec_SignatureZZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1new(JNIEnv *env, jclass clz, int8_tArray a, jobjectArray b) {
(*env)->GetByteArrayRegion(env, b_conv_8, 0, 64, b_conv_8_ref.compact_form);
b_constr.data[i] = b_conv_8_ref;
}
- LDKC2Tuple_SignatureCVec_SignatureZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
- *ret_ref = C2Tuple_SignatureCVec_SignatureZZ_new(a_ref, b_constr);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_SignatureCVec_SignatureZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
+ *ret_conv = C2Tuple_SignatureCVec_SignatureZZ_new(a_ref, b_constr);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
return (uint64_t)ret_conv;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMonitorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKC2Tuple_BlockHashChannelMonitorZ* orig_conv = (LDKC2Tuple_BlockHashChannelMonitorZ*)(orig & ~1);
+ LDKC2Tuple_BlockHashChannelMonitorZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
+ *ret_conv = C2Tuple_BlockHashChannelMonitorZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMonitorZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int64_t b) {
LDKThirtyTwoBytes a_ref;
CHECK((*env)->GetArrayLength(env, a) == 32);
b_conv.inner = (void*)(b & (~1));
b_conv.is_owned = (b & 1) || (b == 0);
b_conv = ChannelMonitor_clone(&b_conv);
- LDKC2Tuple_BlockHashChannelMonitorZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
- *ret_ref = C2Tuple_BlockHashChannelMonitorZ_new(a_ref, b_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_BlockHashChannelMonitorZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
+ *ret_conv = C2Tuple_BlockHashChannelMonitorZ_new(a_ref, b_conv);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMonitorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
else
_res_constr.data = NULL;
int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
- for (size_t i = 0; i < _res_constr.datalen; i++) {
- int64_t _res_conv_34 = _res_vals[i];
- LDKC2Tuple_BlockHashChannelMonitorZ _res_conv_34_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)_res_conv_34) & ~1);
- FREE((void*)_res_conv_34);
- _res_constr.data[i] = _res_conv_34_conv;
+ for (size_t j = 0; j < _res_constr.datalen; j++) {
+ int64_t _res_conv_35 = _res_vals[j];
+ LDKC2Tuple_BlockHashChannelMonitorZ _res_conv_35_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)_res_conv_35) & ~1);
+ FREE((void*)_res_conv_35);
+ _res_constr.data[j] = _res_conv_35_conv;
}
(*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
CVec_C2Tuple_BlockHashChannelMonitorZZ_free(_res_constr);
else
o_constr.data = NULL;
int64_t* o_vals = (*env)->GetLongArrayElements (env, o, NULL);
- for (size_t i = 0; i < o_constr.datalen; i++) {
- int64_t o_conv_34 = o_vals[i];
- LDKC2Tuple_BlockHashChannelMonitorZ o_conv_34_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o_conv_34) & ~1);
- // Warning: we may need a move here but no clone is available for LDKC2Tuple_BlockHashChannelMonitorZ
- o_constr.data[i] = o_conv_34_conv;
+ for (size_t j = 0; j < o_constr.datalen; j++) {
+ int64_t o_conv_35 = o_vals[j];
+ LDKC2Tuple_BlockHashChannelMonitorZ o_conv_35_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o_conv_35) & ~1);
+ o_conv_35_conv = C2Tuple_BlockHashChannelMonitorZ_clone((LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o_conv_35) & ~1));
+ o_constr.data[j] = o_conv_35_conv;
}
(*env)->ReleaseLongArrayElements(env, o, o_vals, 0);
LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ), "LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ");
CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(_res_conv);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1C2Tuple_1BlockHashChannelMonitorZZErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ* orig_conv = (LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ*)(orig & ~1);
+ LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ), "LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ");
+ *ret_conv = CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(orig_conv);
+ return (uint64_t)ret_conv;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1u16Z_1some(JNIEnv *env, jclass clz, int16_t o) {
LDKCOption_u16Z *ret_copy = MALLOC(sizeof(LDKCOption_u16Z), "LDKCOption_u16Z");
*ret_copy = COption_u16Z_some(o);
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PaymentHashPaymentSecretZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
LDKC2Tuple_PaymentHashPaymentSecretZ* orig_conv = (LDKC2Tuple_PaymentHashPaymentSecretZ*)(orig & ~1);
- LDKC2Tuple_PaymentHashPaymentSecretZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
- *ret_ref = C2Tuple_PaymentHashPaymentSecretZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_PaymentHashPaymentSecretZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
+ *ret_conv = C2Tuple_PaymentHashPaymentSecretZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PaymentHashPaymentSecretZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int8_tArray b) {
LDKThirtyTwoBytes b_ref;
CHECK((*env)->GetArrayLength(env, b) == 32);
(*env)->GetByteArrayRegion(env, b, 0, 32, b_ref.data);
- LDKC2Tuple_PaymentHashPaymentSecretZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
- *ret_ref = C2Tuple_PaymentHashPaymentSecretZ_new(a_ref, b_ref);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_PaymentHashPaymentSecretZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
+ *ret_conv = C2Tuple_PaymentHashPaymentSecretZ_new(a_ref, b_ref);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PaymentHashPaymentSecretZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
b_conv.inner = (void*)(b & (~1));
b_conv.is_owned = (b & 1) || (b == 0);
// Warning: we need a move here but no clone is available for LDKChannelManager
- LDKC2Tuple_BlockHashChannelManagerZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelManagerZ), "LDKC2Tuple_BlockHashChannelManagerZ");
- *ret_ref = C2Tuple_BlockHashChannelManagerZ_new(a_ref, b_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_BlockHashChannelManagerZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelManagerZ), "LDKC2Tuple_BlockHashChannelManagerZ");
+ *ret_conv = C2Tuple_BlockHashChannelManagerZ_new(a_ref, b_conv);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelManagerZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* orig_conv = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(orig & ~1);
- LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
- *ret_ref = C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
+ *ret_conv = C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1new(JNIEnv *env, jclass clz, int64_t a, int8_tArray b, int64_t c) {
c_conv.inner = (void*)(c & (~1));
c_conv.is_owned = (c & 1) || (c == 0);
c_conv = InvoiceSignature_clone(&c_conv);
- LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
- *ret_ref = C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(a_conv, b_ref, c_conv);
- return (uint64_t)ret_ref;
+ LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
+ *ret_conv = C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(a_conv, b_ref, c_conv);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
LDKC2Tuple_OutPointScriptZ* orig_conv = (LDKC2Tuple_OutPointScriptZ*)(orig & ~1);
- LDKC2Tuple_OutPointScriptZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
- *ret_ref = C2Tuple_OutPointScriptZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_OutPointScriptZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
+ *ret_conv = C2Tuple_OutPointScriptZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1new(JNIEnv *env, jclass clz, int64_t a, int8_tArray b) {
b_ref.datalen = (*env)->GetArrayLength(env, b);
b_ref.data = MALLOC(b_ref.datalen, "LDKCVec_u8Z Bytes");
(*env)->GetByteArrayRegion(env, b, 0, b_ref.datalen, b_ref.data);
- LDKC2Tuple_OutPointScriptZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
- *ret_ref = C2Tuple_OutPointScriptZ_new(a_conv, b_ref);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_OutPointScriptZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
+ *ret_conv = C2Tuple_OutPointScriptZ_new(a_conv, b_ref);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32ScriptZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
LDKC2Tuple_u32ScriptZ* orig_conv = (LDKC2Tuple_u32ScriptZ*)(orig & ~1);
- LDKC2Tuple_u32ScriptZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
- *ret_ref = C2Tuple_u32ScriptZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_u32ScriptZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
+ *ret_conv = C2Tuple_u32ScriptZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32ScriptZ_1new(JNIEnv *env, jclass clz, int32_t a, int8_tArray b) {
b_ref.datalen = (*env)->GetArrayLength(env, b);
b_ref.data = MALLOC(b_ref.datalen, "LDKCVec_u8Z Bytes");
(*env)->GetByteArrayRegion(env, b, 0, b_ref.datalen, b_ref.data);
- LDKC2Tuple_u32ScriptZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
- *ret_ref = C2Tuple_u32ScriptZ_new(a, b_ref);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_u32ScriptZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
+ *ret_conv = C2Tuple_u32ScriptZ_new(a, b_ref);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32ScriptZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
else
_res_constr.data = NULL;
int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
- for (size_t b = 0; b < _res_constr.datalen; b++) {
- int64_t _res_conv_27 = _res_vals[b];
- LDKC2Tuple_u32ScriptZ _res_conv_27_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)_res_conv_27) & ~1);
- FREE((void*)_res_conv_27);
- _res_constr.data[b] = _res_conv_27_conv;
+ for (size_t v = 0; v < _res_constr.datalen; v++) {
+ int64_t _res_conv_21 = _res_vals[v];
+ LDKC2Tuple_u32ScriptZ _res_conv_21_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)_res_conv_21) & ~1);
+ FREE((void*)_res_conv_21);
+ _res_constr.data[v] = _res_conv_21_conv;
}
(*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
CVec_C2Tuple_u32ScriptZZ_free(_res_constr);
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32ScriptZZZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* orig_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(orig & ~1);
- LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
- *ret_ref = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
+ *ret_conv = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32ScriptZZZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int64_tArray b) {
else
b_constr.data = NULL;
int64_t* b_vals = (*env)->GetLongArrayElements (env, b, NULL);
- for (size_t b = 0; b < b_constr.datalen; b++) {
- int64_t b_conv_27 = b_vals[b];
- LDKC2Tuple_u32ScriptZ b_conv_27_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_27) & ~1);
- b_conv_27_conv = C2Tuple_u32ScriptZ_clone((LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_27) & ~1));
- b_constr.data[b] = b_conv_27_conv;
+ for (size_t v = 0; v < b_constr.datalen; v++) {
+ int64_t b_conv_21 = b_vals[v];
+ LDKC2Tuple_u32ScriptZ b_conv_21_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_21) & ~1);
+ b_conv_21_conv = C2Tuple_u32ScriptZ_clone((LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_21) & ~1));
+ b_constr.data[v] = b_conv_21_conv;
}
(*env)->ReleaseLongArrayElements(env, b, b_vals, 0);
- LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
- *ret_ref = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a_ref, b_constr);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
+ *ret_conv = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a_ref, b_constr);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32ScriptZZZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
else
_res_constr.data = NULL;
int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
- for (size_t v = 0; v < _res_constr.datalen; v++) {
- int64_t _res_conv_47 = _res_vals[v];
- LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res_conv_47_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(((uint64_t)_res_conv_47) & ~1);
- FREE((void*)_res_conv_47);
- _res_constr.data[v] = _res_conv_47_conv;
+ for (size_t o = 0; o < _res_constr.datalen; o++) {
+ int64_t _res_conv_40 = _res_vals[o];
+ LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res_conv_40_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(((uint64_t)_res_conv_40) & ~1);
+ FREE((void*)_res_conv_40);
+ _res_constr.data[o] = _res_conv_40_conv;
}
(*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res_constr);
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32TxOutZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
LDKC2Tuple_u32TxOutZ* orig_conv = (LDKC2Tuple_u32TxOutZ*)(orig & ~1);
- LDKC2Tuple_u32TxOutZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
- *ret_ref = C2Tuple_u32TxOutZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_u32TxOutZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
+ *ret_conv = C2Tuple_u32TxOutZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32TxOutZ_1new(JNIEnv *env, jclass clz, int32_t a, int64_t b) {
LDKTxOut b_conv = *(LDKTxOut*)(((uint64_t)b) & ~1);
b_conv = TxOut_clone((LDKTxOut*)(((uint64_t)b) & ~1));
- LDKC2Tuple_u32TxOutZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
- *ret_ref = C2Tuple_u32TxOutZ_new(a, b_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_u32TxOutZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
+ *ret_conv = C2Tuple_u32TxOutZ_new(a, b_conv);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32TxOutZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
else
_res_constr.data = NULL;
int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
- for (size_t a = 0; a < _res_constr.datalen; a++) {
- int64_t _res_conv_26 = _res_vals[a];
- LDKC2Tuple_u32TxOutZ _res_conv_26_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)_res_conv_26) & ~1);
- FREE((void*)_res_conv_26);
- _res_constr.data[a] = _res_conv_26_conv;
+ for (size_t u = 0; u < _res_constr.datalen; u++) {
+ int64_t _res_conv_20 = _res_vals[u];
+ LDKC2Tuple_u32TxOutZ _res_conv_20_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)_res_conv_20) & ~1);
+ FREE((void*)_res_conv_20);
+ _res_constr.data[u] = _res_conv_20_conv;
}
(*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
CVec_C2Tuple_u32TxOutZZ_free(_res_constr);
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* orig_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(orig & ~1);
- LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
- *ret_ref = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+ *ret_conv = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int64_tArray b) {
else
b_constr.data = NULL;
int64_t* b_vals = (*env)->GetLongArrayElements (env, b, NULL);
- for (size_t a = 0; a < b_constr.datalen; a++) {
- int64_t b_conv_26 = b_vals[a];
- LDKC2Tuple_u32TxOutZ b_conv_26_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_26) & ~1);
- b_conv_26_conv = C2Tuple_u32TxOutZ_clone((LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_26) & ~1));
- b_constr.data[a] = b_conv_26_conv;
+ for (size_t u = 0; u < b_constr.datalen; u++) {
+ int64_t b_conv_20 = b_vals[u];
+ LDKC2Tuple_u32TxOutZ b_conv_20_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_20) & ~1);
+ b_conv_20_conv = C2Tuple_u32TxOutZ_clone((LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_20) & ~1));
+ b_constr.data[u] = b_conv_20_conv;
}
(*env)->ReleaseLongArrayElements(env, b, b_vals, 0);
- LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
- *ret_ref = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a_ref, b_constr);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+ *ret_conv = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a_ref, b_constr);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
else
_res_constr.data = NULL;
int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
- for (size_t u = 0; u < _res_constr.datalen; u++) {
- int64_t _res_conv_46 = _res_vals[u];
- LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res_conv_46_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(((uint64_t)_res_conv_46) & ~1);
- FREE((void*)_res_conv_46);
- _res_constr.data[u] = _res_conv_46_conv;
+ for (size_t n = 0; n < _res_constr.datalen; n++) {
+ int64_t _res_conv_39 = _res_vals[n];
+ LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res_conv_39_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(((uint64_t)_res_conv_39) & ~1);
+ FREE((void*)_res_conv_39);
+ _res_constr.data[n] = _res_conv_39_conv;
}
(*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res_constr);
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
LDKC2Tuple_BlockHashChannelMonitorZ o_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o) & ~1);
- // Warning: we may need a move here but no clone is available for LDKC2Tuple_BlockHashChannelMonitorZ
+ o_conv = C2Tuple_BlockHashChannelMonitorZ_clone((LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o) & ~1));
LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ");
*ret_conv = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o_conv);
return (uint64_t)ret_conv;
CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res_conv);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* orig_conv = (LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)(orig & ~1);
+ LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ");
+ *ret_conv = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(orig_conv);
+ return (uint64_t)ret_conv;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneLightningErrorZ_1ok(JNIEnv *env, jclass clz) {
LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
*ret_conv = CResult_NoneLightningErrorZ_ok();
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyTypeZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
LDKC2Tuple_PublicKeyTypeZ* orig_conv = (LDKC2Tuple_PublicKeyTypeZ*)(orig & ~1);
- LDKC2Tuple_PublicKeyTypeZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
- *ret_ref = C2Tuple_PublicKeyTypeZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_PublicKeyTypeZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
+ *ret_conv = C2Tuple_PublicKeyTypeZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyTypeZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int64_t b) {
// If this_arg is a JCalls struct, then we need to increment the refcnt in it.
LDKType_JCalls_cloned(&b_conv);
}
- LDKC2Tuple_PublicKeyTypeZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
- *ret_ref = C2Tuple_PublicKeyTypeZ_new(a_ref, b_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_PublicKeyTypeZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
+ *ret_conv = C2Tuple_PublicKeyTypeZ_new(a_ref, b_conv);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyTypeZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
else
_res_constr.data = NULL;
int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
- for (size_t y = 0; y < _res_constr.datalen; y++) {
- int64_t _res_conv_24 = _res_vals[y];
- LDKC2Tuple_PublicKeyTypeZ _res_conv_24_conv = *(LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)_res_conv_24) & ~1);
- FREE((void*)_res_conv_24);
- _res_constr.data[y] = _res_conv_24_conv;
+ for (size_t z = 0; z < _res_constr.datalen; z++) {
+ int64_t _res_conv_25 = _res_vals[z];
+ LDKC2Tuple_PublicKeyTypeZ _res_conv_25_conv = *(LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)_res_conv_25) & ~1);
+ FREE((void*)_res_conv_25);
+ _res_constr.data[z] = _res_conv_25_conv;
}
(*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
CVec_C2Tuple_PublicKeyTypeZZ_free(_res_constr);
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* orig_conv = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(orig & ~1);
- LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
- *ret_ref = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
+ *ret_conv = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1new(JNIEnv *env, jclass clz, int64_t a, int64_t b, int64_t c) {
c_conv.inner = (void*)(c & (~1));
c_conv.is_owned = (c & 1) || (c == 0);
c_conv = ChannelUpdate_clone(&c_conv);
- LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
- *ret_ref = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a_conv, b_conv, c_conv);
- return (uint64_t)ret_ref;
+ LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
+ *ret_conv = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a_conv, b_conv, c_conv);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
else
_res_constr.data = NULL;
int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
- for (size_t l = 0; l < _res_constr.datalen; l++) {
- int64_t _res_conv_63 = _res_vals[l];
- LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res_conv_63_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)_res_conv_63) & ~1);
- FREE((void*)_res_conv_63);
- _res_constr.data[l] = _res_conv_63_conv;
+ for (size_t h = 0; h < _res_constr.datalen; h++) {
+ int64_t _res_conv_59 = _res_vals[h];
+ LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res_conv_59_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)_res_conv_59) & ~1);
+ FREE((void*)_res_conv_59);
+ _res_constr.data[h] = _res_conv_59_conv;
}
(*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res_constr);
LDKNetworkGraph o_conv;
o_conv.inner = (void*)(o & (~1));
o_conv.is_owned = (o & 1) || (o == 0);
- // Warning: we need a move here but no clone is available for LDKNetworkGraph
+ o_conv = NetworkGraph_clone(&o_conv);
LDKCResult_NetworkGraphDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetworkGraphDecodeErrorZ), "LDKCResult_NetworkGraphDecodeErrorZ");
*ret_conv = CResult_NetworkGraphDecodeErrorZ_ok(o_conv);
return (uint64_t)ret_conv;
CResult_NetworkGraphDecodeErrorZ_free(_res_conv);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_NetworkGraphDecodeErrorZ* orig_conv = (LDKCResult_NetworkGraphDecodeErrorZ*)(orig & ~1);
+ LDKCResult_NetworkGraphDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetworkGraphDecodeErrorZ), "LDKCResult_NetworkGraphDecodeErrorZ");
+ *ret_conv = CResult_NetworkGraphDecodeErrorZ_clone(orig_conv);
+ return (uint64_t)ret_conv;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NetAddressu8Z_1ok(JNIEnv *env, jclass clz, int64_t o) {
LDKNetAddress o_conv = *(LDKNetAddress*)(((uint64_t)o) & ~1);
o_conv = NetAddress_clone((LDKNetAddress*)(((uint64_t)o) & ~1));
LDKChannelMonitor this_arg_conv;
this_arg_conv.inner = (void*)(this_arg & (~1));
this_arg_conv.is_owned = false;
- LDKC2Tuple_OutPointScriptZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
- *ret_ref = ChannelMonitor_get_funding_txo(&this_arg_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_OutPointScriptZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
+ *ret_conv = ChannelMonitor_get_funding_txo(&this_arg_conv);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1outputs_1to_1watch(JNIEnv *env, jclass clz, int64_t this_arg) {
LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ ret_var = ChannelMonitor_get_outputs_to_watch(&this_arg_conv);
int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
- for (size_t v = 0; v < ret_var.datalen; v++) {
- LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_conv_47_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
- *ret_conv_47_ref = ret_var.data[v];
- ret_arr_ptr[v] = (uint64_t)ret_conv_47_ref;
+ for (size_t o = 0; o < ret_var.datalen; o++) {
+ LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_conv_40_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
+ *ret_conv_40_conv = ret_var.data[o];
+ ret_arr_ptr[o] = ((uint64_t)ret_conv_40_conv);
}
(*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
FREE(ret_var.data);
else
txdata_constr.data = NULL;
int64_t* txdata_vals = (*env)->GetLongArrayElements (env, txdata, NULL);
- for (size_t y = 0; y < txdata_constr.datalen; y++) {
- int64_t txdata_conv_24 = txdata_vals[y];
- LDKC2Tuple_usizeTransactionZ txdata_conv_24_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_24) & ~1);
- txdata_conv_24_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_24) & ~1));
- txdata_constr.data[y] = txdata_conv_24_conv;
+ for (size_t c = 0; c < txdata_constr.datalen; c++) {
+ int64_t txdata_conv_28 = txdata_vals[c];
+ LDKC2Tuple_usizeTransactionZ txdata_conv_28_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1);
+ txdata_conv_28_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1));
+ txdata_constr.data[c] = txdata_conv_28_conv;
}
(*env)->ReleaseLongArrayElements(env, txdata, txdata_vals, 0);
LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(((uint64_t)broadcaster) & ~1);
LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ret_var = ChannelMonitor_block_connected(&this_arg_conv, header_ref, txdata_constr, height, broadcaster_conv, fee_estimator_conv, logger_conv);
int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
- for (size_t u = 0; u < ret_var.datalen; u++) {
- LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_46_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
- *ret_conv_46_ref = ret_var.data[u];
- ret_arr_ptr[u] = (uint64_t)ret_conv_46_ref;
+ for (size_t n = 0; n < ret_var.datalen; n++) {
+ LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_39_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+ *ret_conv_39_conv = ret_var.data[n];
+ ret_arr_ptr[n] = ((uint64_t)ret_conv_39_conv);
}
(*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
FREE(ret_var.data);
else
txdata_constr.data = NULL;
int64_t* txdata_vals = (*env)->GetLongArrayElements (env, txdata, NULL);
- for (size_t y = 0; y < txdata_constr.datalen; y++) {
- int64_t txdata_conv_24 = txdata_vals[y];
- LDKC2Tuple_usizeTransactionZ txdata_conv_24_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_24) & ~1);
- txdata_conv_24_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_24) & ~1));
- txdata_constr.data[y] = txdata_conv_24_conv;
+ for (size_t c = 0; c < txdata_constr.datalen; c++) {
+ int64_t txdata_conv_28 = txdata_vals[c];
+ LDKC2Tuple_usizeTransactionZ txdata_conv_28_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1);
+ txdata_conv_28_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1));
+ txdata_constr.data[c] = txdata_conv_28_conv;
}
(*env)->ReleaseLongArrayElements(env, txdata, txdata_vals, 0);
LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(((uint64_t)broadcaster) & ~1);
LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ret_var = ChannelMonitor_transactions_confirmed(&this_arg_conv, header_ref, txdata_constr, height, broadcaster_conv, fee_estimator_conv, logger_conv);
int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
- for (size_t u = 0; u < ret_var.datalen; u++) {
- LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_46_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
- *ret_conv_46_ref = ret_var.data[u];
- ret_arr_ptr[u] = (uint64_t)ret_conv_46_ref;
+ for (size_t n = 0; n < ret_var.datalen; n++) {
+ LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_39_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+ *ret_conv_39_conv = ret_var.data[n];
+ ret_arr_ptr[n] = ((uint64_t)ret_conv_39_conv);
}
(*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
FREE(ret_var.data);
LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ret_var = ChannelMonitor_best_block_updated(&this_arg_conv, header_ref, height, broadcaster_conv, fee_estimator_conv, logger_conv);
int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
- for (size_t u = 0; u < ret_var.datalen; u++) {
- LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_46_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
- *ret_conv_46_ref = ret_var.data[u];
- ret_arr_ptr[u] = (uint64_t)ret_conv_46_ref;
+ for (size_t n = 0; n < ret_var.datalen; n++) {
+ LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_39_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+ *ret_conv_39_conv = ret_var.data[n];
+ ret_arr_ptr[n] = ((uint64_t)ret_conv_39_conv);
}
(*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
FREE(ret_var.data);
this_arg_conv.is_owned = false;
LDKCOption_u64Z min_value_msat_conv = *(LDKCOption_u64Z*)(((uint64_t)min_value_msat) & ~1);
min_value_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)(((uint64_t)min_value_msat) & ~1));
- LDKC2Tuple_PaymentHashPaymentSecretZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
- *ret_ref = ChannelManager_create_inbound_payment(&this_arg_conv, min_value_msat_conv, invoice_expiry_delta_secs, user_payment_id);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_PaymentHashPaymentSecretZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
+ *ret_conv = ChannelManager_create_inbound_payment(&this_arg_conv, min_value_msat_conv, invoice_expiry_delta_secs, user_payment_id);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1create_1inbound_1payment_1for_1hash(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray payment_hash, int64_t min_value_msat, int32_t invoice_expiry_delta_secs, int64_t user_payment_id) {
NetworkGraph_free(this_obj_conv);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKNetworkGraph orig_conv;
+ orig_conv.inner = (void*)(orig & (~1));
+ orig_conv.is_owned = false;
+ LDKNetworkGraph ret_var = NetworkGraph_clone(&orig_conv);
+ CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ uint64_t ret_ref = (uint64_t)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReadOnlyNetworkGraph_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
LDKReadOnlyNetworkGraph this_obj_conv;
this_obj_conv.inner = (void*)(this_obj & (~1));
LDKNetworkGraph val_conv;
val_conv.inner = (void*)(val & (~1));
val_conv.is_owned = (val & 1) || (val == 0);
- // Warning: we need a move here but no clone is available for LDKNetworkGraph
+ val_conv = NetworkGraph_clone(&val_conv);
NetGraphMsgHandler_set_network_graph(&this_ptr_conv, val_conv);
}
LDKNetworkGraph network_graph_conv;
network_graph_conv.inner = (void*)(network_graph & (~1));
network_graph_conv.is_owned = (network_graph & 1) || (network_graph == 0);
- // Warning: we need a move here but no clone is available for LDKNetworkGraph
+ network_graph_conv = NetworkGraph_clone(&network_graph_conv);
LDKCOption_AccessZ chain_access_conv = *(LDKCOption_AccessZ*)(((uint64_t)chain_access) & ~1);
// Warning: we may need a move here but no clone is available for LDKCOption_AccessZ
if (chain_access_conv.tag == LDKCOption_AccessZ_Some) {
this_arg_conv.inner = (void*)(this_arg & (~1));
this_arg_conv.is_owned = (this_arg & 1) || (this_arg == 0);
this_arg_conv = SignedRawInvoice_clone(&this_arg_conv);
- LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
- *ret_ref = SignedRawInvoice_into_parts(this_arg_conv);
- return (uint64_t)ret_ref;
+ LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
+ *ret_conv = SignedRawInvoice_into_parts(this_arg_conv);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SignedRawInvoice_1raw_1invoice(JNIEnv *env, jclass clz, int64_t this_arg) {
return res;
}
-JNIEXPORT jstring JNICALL Java_org_ldk_impl_bindings_get_1lib_1version_1string(JNIEnv *env, jclass _c) {
- return str_ref_to_java(env, "v0.0.101.0", strlen("v0.0.101.0"));
-}
JNIEXPORT jstring JNICALL Java_org_ldk_impl_bindings_get_1ldk_1c_1bindings_1version(JNIEnv *env, jclass _c) {
return str_ref_to_java(env, check_get_ldk_bindings_version(), strlen(check_get_ldk_bindings_version()));
}
JNIEXPORT jstring JNICALL Java_org_ldk_impl_bindings_get_1ldk_1version(JNIEnv *env, jclass _c) {
return str_ref_to_java(env, check_get_ldk_version(), strlen(check_get_ldk_version()));
}
+#include "version.c"
static jclass arr_of_B_clz = NULL;
static jclass arr_of_J_clz = NULL;
JNIEXPORT void Java_org_ldk_impl_bindings_init_1class_1cache(JNIEnv * env, jclass clz) {
ret->b = b_ref;
return (uint64_t)ret;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1usizeTransactionZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_usizeTransactionZ *tuple = (LDKC2Tuple_usizeTransactionZ*)(ptr & ~1);
+static inline uintptr_t C2Tuple_usizeTransactionZ_get_a(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR tuple){
return tuple->a;
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1usizeTransactionZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_usizeTransactionZ *tuple = (LDKC2Tuple_usizeTransactionZ*)(ptr & ~1);
- LDKTransaction b_var = tuple->b;
- int8_tArray b_arr = (*env)->NewByteArray(env, b_var.datalen);
- (*env)->SetByteArrayRegion(env, b_arr, 0, b_var.datalen, b_var.data);
- return b_arr;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_usizeTransactionZ* tuple_conv = (LDKC2Tuple_usizeTransactionZ*)(tuple & ~1);
+ int64_t ret_val = C2Tuple_usizeTransactionZ_get_a(tuple_conv);
+ return ret_val;
+}
+
+static inline struct LDKTransaction C2Tuple_usizeTransactionZ_get_b(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR tuple){
+ return tuple->b;
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_usizeTransactionZ* tuple_conv = (LDKC2Tuple_usizeTransactionZ*)(tuple & ~1);
+ LDKTransaction ret_var = C2Tuple_usizeTransactionZ_get_b(tuple_conv);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+ Transaction_free(ret_var);
+ return ret_arr;
}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1usizeTransactionZZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
LDKCVec_C2Tuple_usizeTransactionZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_usizeTransactionZZ), "LDKCVec_C2Tuple_usizeTransactionZZ");
ret->datalen = (*env)->GetArrayLength(env, elems);
LDKCOption_C2Tuple_usizeTransactionZZ *obj = (LDKCOption_C2Tuple_usizeTransactionZZ*)(ptr & ~1);
switch(obj->tag) {
case LDKCOption_C2Tuple_usizeTransactionZZ_Some: {
- uint64_t some_ref = (uint64_t)(&obj->some) | 1;
- return (*env)->NewObject(env, LDKCOption_C2Tuple_usizeTransactionZZ_Some_class, LDKCOption_C2Tuple_usizeTransactionZZ_Some_meth, some_ref);
+ LDKC2Tuple_usizeTransactionZ* some_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
+ *some_conv = obj->some;
+ *some_conv = C2Tuple_usizeTransactionZ_clone(some_conv);
+ return (*env)->NewObject(env, LDKCOption_C2Tuple_usizeTransactionZZ_Some_class, LDKCOption_C2Tuple_usizeTransactionZZ_Some_meth, ((uint64_t)some_conv));
}
case LDKCOption_C2Tuple_usizeTransactionZZ_None: {
return (*env)->NewObject(env, LDKCOption_C2Tuple_usizeTransactionZZ_None_class, LDKCOption_C2Tuple_usizeTransactionZZ_None_meth);
ret->b = b_constr;
return (uint64_t)ret;
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1SignatureCVec_1SignatureZZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_SignatureCVec_SignatureZZ *tuple = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(ptr & ~1);
- int8_tArray a_arr = (*env)->NewByteArray(env, 64);
- (*env)->SetByteArrayRegion(env, a_arr, 0, 64, tuple->a.compact_form);
- return a_arr;
+static inline struct LDKSignature C2Tuple_SignatureCVec_SignatureZZ_get_a(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR tuple){
+ return tuple->a;
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_SignatureCVec_SignatureZZ* tuple_conv = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(tuple & ~1);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 64);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, C2Tuple_SignatureCVec_SignatureZZ_get_a(tuple_conv).compact_form);
+ return ret_arr;
+}
+
+static inline struct LDKCVec_SignatureZ C2Tuple_SignatureCVec_SignatureZZ_get_b(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR tuple){
+ return tuple->b;
}
-JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1SignatureCVec_1SignatureZZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_SignatureCVec_SignatureZZ *tuple = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(ptr & ~1);
- LDKCVec_SignatureZ b_var = tuple->b;
- jobjectArray b_arr = (*env)->NewObjectArray(env, b_var.datalen, arr_of_B_clz, NULL);
+JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_SignatureCVec_SignatureZZ* tuple_conv = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(tuple & ~1);
+ LDKCVec_SignatureZ ret_var = C2Tuple_SignatureCVec_SignatureZZ_get_b(tuple_conv);
+ jobjectArray ret_arr = (*env)->NewObjectArray(env, ret_var.datalen, arr_of_B_clz, NULL);
;
- for (size_t i = 0; i < b_var.datalen; i++) {
- int8_tArray b_conv_8_arr = (*env)->NewByteArray(env, 64);
- (*env)->SetByteArrayRegion(env, b_conv_8_arr, 0, 64, b_var.data[i].compact_form);
- (*env)->SetObjectArrayElement(env, b_arr, i, b_conv_8_arr);
+ for (size_t i = 0; i < ret_var.datalen; i++) {
+ int8_tArray ret_conv_8_arr = (*env)->NewByteArray(env, 64);
+ (*env)->SetByteArrayRegion(env, ret_conv_8_arr, 0, 64, ret_var.data[i].compact_form);
+ (*env)->SetObjectArrayElement(env, ret_arr, i, ret_conv_8_arr);
}
- return b_arr;
+ FREE(ret_var.data);
+ return ret_arr;
}
+
JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
return ((LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)arg)->result_ok;
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *val = (LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(arg & ~1);
CHECK(val->result_ok);
- uint64_t res_ref = (uint64_t)(&(*val->contents.result)) | 1;
- return res_ref;
+ LDKC2Tuple_SignatureCVec_SignatureZZ* res_conv = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
+ *res_conv = (*val->contents.result);
+ *res_conv = C2Tuple_SignatureCVec_SignatureZZ_clone(res_conv);
+ return ((uint64_t)res_conv);
}
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *val = (LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(arg & ~1);
ret->b = b_conv;
return (uint64_t)ret;
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelMonitorZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_BlockHashChannelMonitorZ *tuple = (LDKC2Tuple_BlockHashChannelMonitorZ*)(ptr & ~1);
- int8_tArray a_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, a_arr, 0, 32, tuple->a.data);
- return a_arr;
+static inline struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelMonitorZ_get_a(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR tuple){
+ return ThirtyTwoBytes_clone(&tuple->a);
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMonitorZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_BlockHashChannelMonitorZ* tuple_conv = (LDKC2Tuple_BlockHashChannelMonitorZ*)(tuple & ~1);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C2Tuple_BlockHashChannelMonitorZ_get_a(tuple_conv).data);
+ return ret_arr;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelMonitorZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_BlockHashChannelMonitorZ *tuple = (LDKC2Tuple_BlockHashChannelMonitorZ*)(ptr & ~1);
- LDKChannelMonitor b_var = tuple->b;
- CHECK((((uint64_t)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- uint64_t b_ref = (uint64_t)b_var.inner & ~1;
- return b_ref;
+
+static inline struct LDKChannelMonitor C2Tuple_BlockHashChannelMonitorZ_get_b(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR tuple){
+ return ChannelMonitor_clone(&tuple->b);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMonitorZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_BlockHashChannelMonitorZ* tuple_conv = (LDKC2Tuple_BlockHashChannelMonitorZ*)(tuple & ~1);
+ LDKChannelMonitor ret_var = C2Tuple_BlockHashChannelMonitorZ_get_b(tuple_conv);
+ CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ uint64_t ret_ref = (uint64_t)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1BlockHashChannelMonitorZZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
LDKCVec_C2Tuple_BlockHashChannelMonitorZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_BlockHashChannelMonitorZZ), "LDKCVec_C2Tuple_BlockHashChannelMonitorZZ");
ret->datalen = (*env)->GetArrayLength(env, elems);
for (size_t i = 0; i < ret->datalen; i++) {
int64_t arr_elem = java_elems[i];
LDKC2Tuple_BlockHashChannelMonitorZ arr_elem_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)arr_elem) & ~1);
- // Warning: we may need a move here but no clone is available for LDKC2Tuple_BlockHashChannelMonitorZ
+ arr_elem_conv = C2Tuple_BlockHashChannelMonitorZ_clone((LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)arr_elem) & ~1));
ret->data[i] = arr_elem_conv;
}
(*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
}
return (uint64_t)ret;
}
+static inline LDKCVec_C2Tuple_BlockHashChannelMonitorZZ CVec_C2Tuple_BlockHashChannelMonitorZZ_clone(const LDKCVec_C2Tuple_BlockHashChannelMonitorZZ *orig) {
+ LDKCVec_C2Tuple_BlockHashChannelMonitorZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ) * orig->datalen, "LDKCVec_C2Tuple_BlockHashChannelMonitorZZ clone bytes"), .datalen = orig->datalen };
+ for (size_t i = 0; i < ret.datalen; i++) {
+ ret.data[i] = C2Tuple_BlockHashChannelMonitorZ_clone(&orig->data[i]);
+ }
+ return ret;
+}
JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1C2Tuple_1BlockHashChannelMonitorZZErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
return ((LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ*)arg)->result_ok;
}
LDKCVec_C2Tuple_BlockHashChannelMonitorZZ res_var = (*val->contents.result);
int64_tArray res_arr = (*env)->NewLongArray(env, res_var.datalen);
int64_t *res_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, res_arr, NULL);
- for (size_t i = 0; i < res_var.datalen; i++) {
- uint64_t res_conv_34_ref = (uint64_t)(&res_var.data[i]) | 1;
- res_arr_ptr[i] = res_conv_34_ref;
+ for (size_t j = 0; j < res_var.datalen; j++) {
+ LDKC2Tuple_BlockHashChannelMonitorZ* res_conv_35_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
+ *res_conv_35_conv = res_var.data[j];
+ *res_conv_35_conv = C2Tuple_BlockHashChannelMonitorZ_clone(res_conv_35_conv);
+ res_arr_ptr[j] = ((uint64_t)res_conv_35_conv);
}
(*env)->ReleasePrimitiveArrayCritical(env, res_arr, res_arr_ptr, 0);
return res_arr;
ret->b = b_ref;
return (uint64_t)ret;
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1PaymentHashPaymentSecretZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_PaymentHashPaymentSecretZ *tuple = (LDKC2Tuple_PaymentHashPaymentSecretZ*)(ptr & ~1);
- int8_tArray a_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, a_arr, 0, 32, tuple->a.data);
- return a_arr;
+static inline struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_a(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR tuple){
+ return ThirtyTwoBytes_clone(&tuple->a);
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PaymentHashPaymentSecretZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_PaymentHashPaymentSecretZ* tuple_conv = (LDKC2Tuple_PaymentHashPaymentSecretZ*)(tuple & ~1);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C2Tuple_PaymentHashPaymentSecretZ_get_a(tuple_conv).data);
+ return ret_arr;
+}
+
+static inline struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_b(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR tuple){
+ return ThirtyTwoBytes_clone(&tuple->b);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1PaymentHashPaymentSecretZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_PaymentHashPaymentSecretZ *tuple = (LDKC2Tuple_PaymentHashPaymentSecretZ*)(ptr & ~1);
- int8_tArray b_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, b_arr, 0, 32, tuple->b.data);
- return b_arr;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PaymentHashPaymentSecretZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_PaymentHashPaymentSecretZ* tuple_conv = (LDKC2Tuple_PaymentHashPaymentSecretZ*)(tuple & ~1);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C2Tuple_PaymentHashPaymentSecretZ_get_b(tuple_conv).data);
+ return ret_arr;
}
+
JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PaymentSecretAPIErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
return ((LDKCResult_PaymentSecretAPIErrorZ*)arg)->result_ok;
}
ret->b = b_conv;
return (uint64_t)ret;
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelManagerZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_BlockHashChannelManagerZ *tuple = (LDKC2Tuple_BlockHashChannelManagerZ*)(ptr & ~1);
- int8_tArray a_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, a_arr, 0, 32, tuple->a.data);
- return a_arr;
+static inline struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelManagerZ_get_a(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR tuple){
+ return ThirtyTwoBytes_clone(&tuple->a);
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelManagerZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_BlockHashChannelManagerZ* tuple_conv = (LDKC2Tuple_BlockHashChannelManagerZ*)(tuple & ~1);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C2Tuple_BlockHashChannelManagerZ_get_a(tuple_conv).data);
+ return ret_arr;
+}
+
+static inline struct LDKChannelManager *C2Tuple_BlockHashChannelManagerZ_get_b(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR tuple){
+ return &tuple->b;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelManagerZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_BlockHashChannelManagerZ *tuple = (LDKC2Tuple_BlockHashChannelManagerZ*)(ptr & ~1);
- LDKChannelManager b_var = tuple->b;
- CHECK((((uint64_t)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- uint64_t b_ref = (uint64_t)b_var.inner & ~1;
- return b_ref;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelManagerZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_BlockHashChannelManagerZ* tuple_conv = (LDKC2Tuple_BlockHashChannelManagerZ*)(tuple & ~1);
+ LDKChannelManager ret_var = *C2Tuple_BlockHashChannelManagerZ_get_b(tuple_conv);
+ CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ uint64_t ret_ref = (uint64_t)ret_var.inner & ~1;
+ return ret_ref;
}
+
JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
return ((LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)arg)->result_ok;
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)(arg & ~1);
CHECK(val->result_ok);
- uint64_t res_ref = (uint64_t)(&(*val->contents.result)) | 1;
- return res_ref;
+ LDKC2Tuple_BlockHashChannelManagerZ* res_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelManagerZ), "LDKC2Tuple_BlockHashChannelManagerZ");
+ *res_conv = (*val->contents.result);
+ // Warning: we really need to clone here, but no clone is available for LDKC2Tuple_BlockHashChannelManagerZ
+ return ((uint64_t)res_conv) | 1;
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)(arg & ~1);
ret->c = c_conv;
return (uint64_t)ret;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *tuple = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(ptr & ~1);
- LDKRawInvoice a_var = tuple->a;
- CHECK((((uint64_t)a_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&a_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- uint64_t a_ref = (uint64_t)a_var.inner & ~1;
- return a_ref;
-}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *tuple = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(ptr & ~1);
- int8_tArray b_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, b_arr, 0, 32, tuple->b.data);
- return b_arr;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1get_1c(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *tuple = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(ptr & ~1);
- LDKInvoiceSignature c_var = tuple->c;
- CHECK((((uint64_t)c_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&c_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- uint64_t c_ref = (uint64_t)c_var.inner & ~1;
- return c_ref;
+static inline struct LDKRawInvoice C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple){
+ return RawInvoice_clone(&tuple->a);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* tuple_conv = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(tuple & ~1);
+ LDKRawInvoice ret_var = C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(tuple_conv);
+ CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ uint64_t ret_ref = (uint64_t)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
+static inline struct LDKThirtyTwoBytes C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple){
+ return ThirtyTwoBytes_clone(&tuple->b);
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* tuple_conv = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(tuple & ~1);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(tuple_conv).data);
+ return ret_arr;
+}
+
+static inline struct LDKInvoiceSignature C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple){
+ return InvoiceSignature_clone(&tuple->c);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1get_1c(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* tuple_conv = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(tuple & ~1);
+ LDKInvoiceSignature ret_var = C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(tuple_conv);
+ CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ uint64_t ret_ref = (uint64_t)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PayeePubKeyErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
return ((LDKCResult_PayeePubKeyErrorZ*)arg)->result_ok;
}
ret->b = b_ref;
return (uint64_t)ret;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1OutPointScriptZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_OutPointScriptZ *tuple = (LDKC2Tuple_OutPointScriptZ*)(ptr & ~1);
- LDKOutPoint a_var = tuple->a;
- CHECK((((uint64_t)a_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&a_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- uint64_t a_ref = (uint64_t)a_var.inner & ~1;
- return a_ref;
-}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1OutPointScriptZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_OutPointScriptZ *tuple = (LDKC2Tuple_OutPointScriptZ*)(ptr & ~1);
- LDKCVec_u8Z b_var = tuple->b;
- int8_tArray b_arr = (*env)->NewByteArray(env, b_var.datalen);
- (*env)->SetByteArrayRegion(env, b_arr, 0, b_var.datalen, b_var.data);
- return b_arr;
+static inline struct LDKOutPoint C2Tuple_OutPointScriptZ_get_a(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR tuple){
+ return OutPoint_clone(&tuple->a);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_OutPointScriptZ* tuple_conv = (LDKC2Tuple_OutPointScriptZ*)(tuple & ~1);
+ LDKOutPoint ret_var = C2Tuple_OutPointScriptZ_get_a(tuple_conv);
+ CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ uint64_t ret_ref = (uint64_t)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
+static inline struct LDKCVec_u8Z C2Tuple_OutPointScriptZ_get_b(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR tuple){
+ return CVec_u8Z_clone(&tuple->b);
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_OutPointScriptZ* tuple_conv = (LDKC2Tuple_OutPointScriptZ*)(tuple & ~1);
+ LDKCVec_u8Z ret_var = C2Tuple_OutPointScriptZ_get_b(tuple_conv);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32ScriptZ_1new(JNIEnv *env, jclass clz, int32_t a, int8_tArray b) {
LDKC2Tuple_u32ScriptZ* ret = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
ret->a = a;
ret->b = b_ref;
return (uint64_t)ret;
}
-JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32ScriptZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_u32ScriptZ *tuple = (LDKC2Tuple_u32ScriptZ*)(ptr & ~1);
+static inline uint32_t C2Tuple_u32ScriptZ_get_a(LDKC2Tuple_u32ScriptZ *NONNULL_PTR tuple){
return tuple->a;
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32ScriptZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_u32ScriptZ *tuple = (LDKC2Tuple_u32ScriptZ*)(ptr & ~1);
- LDKCVec_u8Z b_var = tuple->b;
- int8_tArray b_arr = (*env)->NewByteArray(env, b_var.datalen);
- (*env)->SetByteArrayRegion(env, b_arr, 0, b_var.datalen, b_var.data);
- return b_arr;
+JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32ScriptZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_u32ScriptZ* tuple_conv = (LDKC2Tuple_u32ScriptZ*)(tuple & ~1);
+ int32_t ret_val = C2Tuple_u32ScriptZ_get_a(tuple_conv);
+ return ret_val;
+}
+
+static inline struct LDKCVec_u8Z C2Tuple_u32ScriptZ_get_b(LDKC2Tuple_u32ScriptZ *NONNULL_PTR tuple){
+ return CVec_u8Z_clone(&tuple->b);
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32ScriptZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_u32ScriptZ* tuple_conv = (LDKC2Tuple_u32ScriptZ*)(tuple & ~1);
+ LDKCVec_u8Z ret_var = C2Tuple_u32ScriptZ_get_b(tuple_conv);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1u32ScriptZZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
LDKCVec_C2Tuple_u32ScriptZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_u32ScriptZZ), "LDKCVec_C2Tuple_u32ScriptZZ");
ret->datalen = (*env)->GetArrayLength(env, elems);
else
b_constr.data = NULL;
int64_t* b_vals = (*env)->GetLongArrayElements (env, b, NULL);
- for (size_t b = 0; b < b_constr.datalen; b++) {
- int64_t b_conv_27 = b_vals[b];
- LDKC2Tuple_u32ScriptZ b_conv_27_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_27) & ~1);
- b_conv_27_conv = C2Tuple_u32ScriptZ_clone((LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_27) & ~1));
- b_constr.data[b] = b_conv_27_conv;
+ for (size_t v = 0; v < b_constr.datalen; v++) {
+ int64_t b_conv_21 = b_vals[v];
+ LDKC2Tuple_u32ScriptZ b_conv_21_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_21) & ~1);
+ b_conv_21_conv = C2Tuple_u32ScriptZ_clone((LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_21) & ~1));
+ b_constr.data[v] = b_conv_21_conv;
}
(*env)->ReleaseLongArrayElements(env, b, b_vals, 0);
ret->b = b_constr;
return (uint64_t)ret;
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple_1u32ScriptZZZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *tuple = (LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(ptr & ~1);
- int8_tArray a_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, a_arr, 0, 32, tuple->a.data);
- return a_arr;
+static inline struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR tuple){
+ return ThirtyTwoBytes_clone(&tuple->a);
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32ScriptZZZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* tuple_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(tuple & ~1);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(tuple_conv).data);
+ return ret_arr;
+}
+
+static inline struct LDKCVec_C2Tuple_u32ScriptZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR tuple){
+ return CVec_C2Tuple_u32ScriptZZ_clone(&tuple->b);
}
-JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple_1u32ScriptZZZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *tuple = (LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(ptr & ~1);
- LDKCVec_C2Tuple_u32ScriptZZ b_var = tuple->b;
- int64_tArray b_arr = (*env)->NewLongArray(env, b_var.datalen);
- int64_t *b_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, b_arr, NULL);
- for (size_t b = 0; b < b_var.datalen; b++) {
- uint64_t b_conv_27_ref = (uint64_t)(&b_var.data[b]) | 1;
- b_arr_ptr[b] = b_conv_27_ref;
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32ScriptZZZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* tuple_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(tuple & ~1);
+ LDKCVec_C2Tuple_u32ScriptZZ ret_var = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(tuple_conv);
+ int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
+ int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
+ for (size_t v = 0; v < ret_var.datalen; v++) {
+ LDKC2Tuple_u32ScriptZ* ret_conv_21_conv = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
+ *ret_conv_21_conv = ret_var.data[v];
+ ret_arr_ptr[v] = ((uint64_t)ret_conv_21_conv);
}
- (*env)->ReleasePrimitiveArrayCritical(env, b_arr, b_arr_ptr, 0);
- return b_arr;
+ (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
+ FREE(ret_var.data);
+ return ret_arr;
}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1TxidCVec_1C2Tuple_1u32ScriptZZZZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ), "LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ");
ret->datalen = (*env)->GetArrayLength(env, elems);
ret->b = b_conv;
return (uint64_t)ret;
}
-JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32TxOutZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_u32TxOutZ *tuple = (LDKC2Tuple_u32TxOutZ*)(ptr & ~1);
+static inline uint32_t C2Tuple_u32TxOutZ_get_a(LDKC2Tuple_u32TxOutZ *NONNULL_PTR tuple){
return tuple->a;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32TxOutZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_u32TxOutZ *tuple = (LDKC2Tuple_u32TxOutZ*)(ptr & ~1);
- uint64_t b_ref = ((uint64_t)&tuple->b) | 1;
- return (uint64_t)b_ref;
+JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32TxOutZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_u32TxOutZ* tuple_conv = (LDKC2Tuple_u32TxOutZ*)(tuple & ~1);
+ int32_t ret_val = C2Tuple_u32TxOutZ_get_a(tuple_conv);
+ return ret_val;
+}
+
+static inline struct LDKTxOut C2Tuple_u32TxOutZ_get_b(LDKC2Tuple_u32TxOutZ *NONNULL_PTR tuple){
+ return TxOut_clone(&tuple->b);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32TxOutZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_u32TxOutZ* tuple_conv = (LDKC2Tuple_u32TxOutZ*)(tuple & ~1);
+ LDKTxOut* ret_ref = MALLOC(sizeof(LDKTxOut), "LDKTxOut");
+ *ret_ref = C2Tuple_u32TxOutZ_get_b(tuple_conv);
+ return (uint64_t)ret_ref;
}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1u32TxOutZZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
LDKCVec_C2Tuple_u32TxOutZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_u32TxOutZZ), "LDKCVec_C2Tuple_u32TxOutZZ");
ret->datalen = (*env)->GetArrayLength(env, elems);
else
b_constr.data = NULL;
int64_t* b_vals = (*env)->GetLongArrayElements (env, b, NULL);
- for (size_t a = 0; a < b_constr.datalen; a++) {
- int64_t b_conv_26 = b_vals[a];
- LDKC2Tuple_u32TxOutZ b_conv_26_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_26) & ~1);
- b_conv_26_conv = C2Tuple_u32TxOutZ_clone((LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_26) & ~1));
- b_constr.data[a] = b_conv_26_conv;
+ for (size_t u = 0; u < b_constr.datalen; u++) {
+ int64_t b_conv_20 = b_vals[u];
+ LDKC2Tuple_u32TxOutZ b_conv_20_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_20) & ~1);
+ b_conv_20_conv = C2Tuple_u32TxOutZ_clone((LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_20) & ~1));
+ b_constr.data[u] = b_conv_20_conv;
}
(*env)->ReleaseLongArrayElements(env, b, b_vals, 0);
ret->b = b_constr;
return (uint64_t)ret;
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *tuple = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(ptr & ~1);
- int8_tArray a_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, a_arr, 0, 32, tuple->a.data);
- return a_arr;
+static inline struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR tuple){
+ return ThirtyTwoBytes_clone(&tuple->a);
}
-JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *tuple = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(ptr & ~1);
- LDKCVec_C2Tuple_u32TxOutZZ b_var = tuple->b;
- int64_tArray b_arr = (*env)->NewLongArray(env, b_var.datalen);
- int64_t *b_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, b_arr, NULL);
- for (size_t a = 0; a < b_var.datalen; a++) {
- uint64_t b_conv_26_ref = (uint64_t)(&b_var.data[a]) | 1;
- b_arr_ptr[a] = b_conv_26_ref;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* tuple_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(tuple & ~1);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(tuple_conv).data);
+ return ret_arr;
+}
+
+static inline struct LDKCVec_C2Tuple_u32TxOutZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR tuple){
+ return CVec_C2Tuple_u32TxOutZZ_clone(&tuple->b);
+}
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* tuple_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(tuple & ~1);
+ LDKCVec_C2Tuple_u32TxOutZZ ret_var = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(tuple_conv);
+ int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
+ int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
+ for (size_t u = 0; u < ret_var.datalen; u++) {
+ LDKC2Tuple_u32TxOutZ* ret_conv_20_conv = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
+ *ret_conv_20_conv = ret_var.data[u];
+ ret_arr_ptr[u] = ((uint64_t)ret_conv_20_conv);
}
- (*env)->ReleasePrimitiveArrayCritical(env, b_arr, b_arr_ptr, 0);
- return b_arr;
+ (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
+ FREE(ret_var.data);
+ return ret_arr;
}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ), "LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ");
ret->datalen = (*env)->GetArrayLength(env, elems);
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)(arg & ~1);
CHECK(val->result_ok);
- uint64_t res_ref = (uint64_t)(&(*val->contents.result)) | 1;
- return res_ref;
+ LDKC2Tuple_BlockHashChannelMonitorZ* res_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
+ *res_conv = (*val->contents.result);
+ *res_conv = C2Tuple_BlockHashChannelMonitorZ_clone(res_conv);
+ return ((uint64_t)res_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)(arg & ~1);
ret->b = b_conv;
return (uint64_t)ret;
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1PublicKeyTypeZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_PublicKeyTypeZ *tuple = (LDKC2Tuple_PublicKeyTypeZ*)(ptr & ~1);
- int8_tArray a_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, a_arr, 0, 33, tuple->a.compressed_form);
- return a_arr;
+static inline struct LDKPublicKey C2Tuple_PublicKeyTypeZ_get_a(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR tuple){
+ return tuple->a;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1PublicKeyTypeZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC2Tuple_PublicKeyTypeZ *tuple = (LDKC2Tuple_PublicKeyTypeZ*)(ptr & ~1);
- LDKType* b_ret =MALLOC(sizeof(LDKType), "LDKType");
- *b_ret = Type_clone(&tuple->b);
- return (uint64_t)b_ret;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyTypeZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_PublicKeyTypeZ* tuple_conv = (LDKC2Tuple_PublicKeyTypeZ*)(tuple & ~1);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, C2Tuple_PublicKeyTypeZ_get_a(tuple_conv).compressed_form);
+ return ret_arr;
}
+
+static inline struct LDKType C2Tuple_PublicKeyTypeZ_get_b(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR tuple){
+ return Type_clone(&tuple->b);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyTypeZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC2Tuple_PublicKeyTypeZ* tuple_conv = (LDKC2Tuple_PublicKeyTypeZ*)(tuple & ~1);
+ LDKType* ret_ret =MALLOC(sizeof(LDKType), "LDKType");
+ *ret_ret = C2Tuple_PublicKeyTypeZ_get_b(tuple_conv);
+ return (uint64_t)ret_ret;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1PublicKeyTypeZZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
LDKCVec_C2Tuple_PublicKeyTypeZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_PublicKeyTypeZZ), "LDKCVec_C2Tuple_PublicKeyTypeZZ");
ret->datalen = (*env)->GetArrayLength(env, elems);
ret->c = c_conv;
return (uint64_t)ret;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *tuple = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(ptr & ~1);
- LDKChannelAnnouncement a_var = tuple->a;
- CHECK((((uint64_t)a_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&a_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- uint64_t a_ref = (uint64_t)a_var.inner & ~1;
- return a_ref;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *tuple = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(ptr & ~1);
- LDKChannelUpdate b_var = tuple->b;
- CHECK((((uint64_t)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- uint64_t b_ref = (uint64_t)b_var.inner & ~1;
- return b_ref;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1c(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *tuple = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(ptr & ~1);
- LDKChannelUpdate c_var = tuple->c;
- CHECK((((uint64_t)c_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&c_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- uint64_t c_ref = (uint64_t)c_var.inner & ~1;
- return c_ref;
+static inline struct LDKChannelAnnouncement C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple){
+ return ChannelAnnouncement_clone(&tuple->a);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1a(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* tuple_conv = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(tuple & ~1);
+ LDKChannelAnnouncement ret_var = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(tuple_conv);
+ CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ uint64_t ret_ref = (uint64_t)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
+static inline struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple){
+ return ChannelUpdate_clone(&tuple->b);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1b(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* tuple_conv = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(tuple & ~1);
+ LDKChannelUpdate ret_var = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(tuple_conv);
+ CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ uint64_t ret_ref = (uint64_t)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
+static inline struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple){
+ return ChannelUpdate_clone(&tuple->c);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1c(JNIEnv *env, jclass clz, int64_t tuple) {
+ LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* tuple_conv = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(tuple & ~1);
+ LDKChannelUpdate ret_var = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(tuple_conv);
+ CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ uint64_t ret_ref = (uint64_t)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ *ret = MALLOC(sizeof(LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ), "LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ");
ret->datalen = (*env)->GetArrayLength(env, elems);
LDKCVec_C2Tuple_usizeTransactionZZ txdata_var = txdata;
int64_tArray txdata_arr = (*env)->NewLongArray(env, txdata_var.datalen);
int64_t *txdata_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, txdata_arr, NULL);
- for (size_t y = 0; y < txdata_var.datalen; y++) {
- LDKC2Tuple_usizeTransactionZ* txdata_conv_24_ref = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
- *txdata_conv_24_ref = txdata_var.data[y];
- txdata_arr_ptr[y] = (uint64_t)txdata_conv_24_ref;
+ for (size_t c = 0; c < txdata_var.datalen; c++) {
+ LDKC2Tuple_usizeTransactionZ* txdata_conv_28_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
+ *txdata_conv_28_conv = txdata_var.data[c];
+ txdata_arr_ptr[c] = ((uint64_t)txdata_conv_28_conv);
}
(*env)->ReleasePrimitiveArrayCritical(env, txdata_arr, txdata_arr_ptr, 0);
FREE(txdata_var.data);
else
txdata_constr.data = NULL;
int64_t* txdata_vals = (*env)->GetLongArrayElements (env, txdata, NULL);
- for (size_t y = 0; y < txdata_constr.datalen; y++) {
- int64_t txdata_conv_24 = txdata_vals[y];
- LDKC2Tuple_usizeTransactionZ txdata_conv_24_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_24) & ~1);
- txdata_conv_24_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_24) & ~1));
- txdata_constr.data[y] = txdata_conv_24_conv;
+ for (size_t c = 0; c < txdata_constr.datalen; c++) {
+ int64_t txdata_conv_28 = txdata_vals[c];
+ LDKC2Tuple_usizeTransactionZ txdata_conv_28_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1);
+ txdata_conv_28_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1));
+ txdata_constr.data[c] = txdata_conv_28_conv;
}
(*env)->ReleaseLongArrayElements(env, txdata, txdata_vals, 0);
(this_arg_conv->transactions_confirmed)(this_arg_conv->this_arg, header_ref, txdata_constr, height);
else
ret_constr.data = NULL;
int64_t* ret_vals = (*env)->GetLongArrayElements (env, ret, NULL);
- for (size_t l = 0; l < ret_constr.datalen; l++) {
- int64_t ret_conv_63 = ret_vals[l];
- LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ ret_conv_63_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)ret_conv_63) & ~1);
- ret_conv_63_conv = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone((LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)ret_conv_63) & ~1));
- ret_constr.data[l] = ret_conv_63_conv;
+ for (size_t h = 0; h < ret_constr.datalen; h++) {
+ int64_t ret_conv_59 = ret_vals[h];
+ LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ ret_conv_59_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)ret_conv_59) & ~1);
+ ret_conv_59_conv = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone((LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)ret_conv_59) & ~1));
+ ret_constr.data[h] = ret_conv_59_conv;
}
(*env)->ReleaseLongArrayElements(env, ret, ret_vals, 0);
if (get_jenv_res == JNI_EDETACHED) {
LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ ret_var = (this_arg_conv->get_next_channel_announcements)(this_arg_conv->this_arg, starting_point, batch_amount);
int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
- for (size_t l = 0; l < ret_var.datalen; l++) {
- LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_conv_63_ref = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
- *ret_conv_63_ref = ret_var.data[l];
- ret_arr_ptr[l] = (uint64_t)ret_conv_63_ref;
+ for (size_t h = 0; h < ret_var.datalen; h++) {
+ LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_conv_59_conv = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
+ *ret_conv_59_conv = ret_var.data[h];
+ ret_arr_ptr[h] = ((uint64_t)ret_conv_59_conv);
}
(*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
FREE(ret_var.data);
else
ret_constr.data = NULL;
int64_t* ret_vals = (*env)->GetLongArrayElements (env, ret, NULL);
- for (size_t y = 0; y < ret_constr.datalen; y++) {
- int64_t ret_conv_24 = ret_vals[y];
- LDKC2Tuple_PublicKeyTypeZ ret_conv_24_conv = *(LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)ret_conv_24) & ~1);
- ret_conv_24_conv = C2Tuple_PublicKeyTypeZ_clone((LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)ret_conv_24) & ~1));
- ret_constr.data[y] = ret_conv_24_conv;
+ for (size_t z = 0; z < ret_constr.datalen; z++) {
+ int64_t ret_conv_25 = ret_vals[z];
+ LDKC2Tuple_PublicKeyTypeZ ret_conv_25_conv = *(LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)ret_conv_25) & ~1);
+ ret_conv_25_conv = C2Tuple_PublicKeyTypeZ_clone((LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)ret_conv_25) & ~1));
+ ret_constr.data[z] = ret_conv_25_conv;
}
(*env)->ReleaseLongArrayElements(env, ret, ret_vals, 0);
if (get_jenv_res == JNI_EDETACHED) {
LDKCVec_C2Tuple_PublicKeyTypeZZ ret_var = (this_arg_conv->get_and_clear_pending_msg)(this_arg_conv->this_arg);
int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
- for (size_t y = 0; y < ret_var.datalen; y++) {
- LDKC2Tuple_PublicKeyTypeZ* ret_conv_24_ref = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
- *ret_conv_24_ref = ret_var.data[y];
- ret_arr_ptr[y] = (uint64_t)ret_conv_24_ref;
+ for (size_t z = 0; z < ret_var.datalen; z++) {
+ LDKC2Tuple_PublicKeyTypeZ* ret_conv_25_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
+ *ret_conv_25_conv = ret_var.data[z];
+ ret_arr_ptr[z] = ((uint64_t)ret_conv_25_conv);
}
(*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
FREE(ret_var.data);
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
LDKC2Tuple_usizeTransactionZ* orig_conv = (LDKC2Tuple_usizeTransactionZ*)(orig & ~1);
- LDKC2Tuple_usizeTransactionZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
- *ret_ref = C2Tuple_usizeTransactionZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_usizeTransactionZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
+ *ret_conv = C2Tuple_usizeTransactionZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1new(JNIEnv *env, jclass clz, int64_t a, int8_tArray b) {
b_ref.data = MALLOC(b_ref.datalen, "LDKTransaction Bytes");
(*env)->GetByteArrayRegion(env, b, 0, b_ref.datalen, b_ref.data);
b_ref.data_is_owned = true;
- LDKC2Tuple_usizeTransactionZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
- *ret_ref = C2Tuple_usizeTransactionZ_new(a, b_ref);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_usizeTransactionZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
+ *ret_conv = C2Tuple_usizeTransactionZ_new(a, b_ref);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
else
_res_constr.data = NULL;
int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
- for (size_t y = 0; y < _res_constr.datalen; y++) {
- int64_t _res_conv_24 = _res_vals[y];
- LDKC2Tuple_usizeTransactionZ _res_conv_24_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)_res_conv_24) & ~1);
- FREE((void*)_res_conv_24);
- _res_constr.data[y] = _res_conv_24_conv;
+ for (size_t c = 0; c < _res_constr.datalen; c++) {
+ int64_t _res_conv_28 = _res_vals[c];
+ LDKC2Tuple_usizeTransactionZ _res_conv_28_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)_res_conv_28) & ~1);
+ FREE((void*)_res_conv_28);
+ _res_constr.data[c] = _res_conv_28_conv;
}
(*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
CVec_C2Tuple_usizeTransactionZZ_free(_res_constr);
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
LDKC2Tuple_SignatureCVec_SignatureZZ* orig_conv = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(orig & ~1);
- LDKC2Tuple_SignatureCVec_SignatureZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
- *ret_ref = C2Tuple_SignatureCVec_SignatureZZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_SignatureCVec_SignatureZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
+ *ret_conv = C2Tuple_SignatureCVec_SignatureZZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1new(JNIEnv *env, jclass clz, int8_tArray a, jobjectArray b) {
(*env)->GetByteArrayRegion(env, b_conv_8, 0, 64, b_conv_8_ref.compact_form);
b_constr.data[i] = b_conv_8_ref;
}
- LDKC2Tuple_SignatureCVec_SignatureZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
- *ret_ref = C2Tuple_SignatureCVec_SignatureZZ_new(a_ref, b_constr);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_SignatureCVec_SignatureZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
+ *ret_conv = C2Tuple_SignatureCVec_SignatureZZ_new(a_ref, b_constr);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
return (uint64_t)ret_conv;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMonitorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKC2Tuple_BlockHashChannelMonitorZ* orig_conv = (LDKC2Tuple_BlockHashChannelMonitorZ*)(orig & ~1);
+ LDKC2Tuple_BlockHashChannelMonitorZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
+ *ret_conv = C2Tuple_BlockHashChannelMonitorZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMonitorZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int64_t b) {
LDKThirtyTwoBytes a_ref;
CHECK((*env)->GetArrayLength(env, a) == 32);
b_conv.inner = (void*)(b & (~1));
b_conv.is_owned = (b & 1) || (b == 0);
b_conv = ChannelMonitor_clone(&b_conv);
- LDKC2Tuple_BlockHashChannelMonitorZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
- *ret_ref = C2Tuple_BlockHashChannelMonitorZ_new(a_ref, b_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_BlockHashChannelMonitorZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
+ *ret_conv = C2Tuple_BlockHashChannelMonitorZ_new(a_ref, b_conv);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMonitorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
else
_res_constr.data = NULL;
int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
- for (size_t i = 0; i < _res_constr.datalen; i++) {
- int64_t _res_conv_34 = _res_vals[i];
- LDKC2Tuple_BlockHashChannelMonitorZ _res_conv_34_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)_res_conv_34) & ~1);
- FREE((void*)_res_conv_34);
- _res_constr.data[i] = _res_conv_34_conv;
+ for (size_t j = 0; j < _res_constr.datalen; j++) {
+ int64_t _res_conv_35 = _res_vals[j];
+ LDKC2Tuple_BlockHashChannelMonitorZ _res_conv_35_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)_res_conv_35) & ~1);
+ FREE((void*)_res_conv_35);
+ _res_constr.data[j] = _res_conv_35_conv;
}
(*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
CVec_C2Tuple_BlockHashChannelMonitorZZ_free(_res_constr);
else
o_constr.data = NULL;
int64_t* o_vals = (*env)->GetLongArrayElements (env, o, NULL);
- for (size_t i = 0; i < o_constr.datalen; i++) {
- int64_t o_conv_34 = o_vals[i];
- LDKC2Tuple_BlockHashChannelMonitorZ o_conv_34_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o_conv_34) & ~1);
- // Warning: we may need a move here but no clone is available for LDKC2Tuple_BlockHashChannelMonitorZ
- o_constr.data[i] = o_conv_34_conv;
+ for (size_t j = 0; j < o_constr.datalen; j++) {
+ int64_t o_conv_35 = o_vals[j];
+ LDKC2Tuple_BlockHashChannelMonitorZ o_conv_35_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o_conv_35) & ~1);
+ o_conv_35_conv = C2Tuple_BlockHashChannelMonitorZ_clone((LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o_conv_35) & ~1));
+ o_constr.data[j] = o_conv_35_conv;
}
(*env)->ReleaseLongArrayElements(env, o, o_vals, 0);
LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ), "LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ");
CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(_res_conv);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1C2Tuple_1BlockHashChannelMonitorZZErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ* orig_conv = (LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ*)(orig & ~1);
+ LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ), "LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ");
+ *ret_conv = CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(orig_conv);
+ return (uint64_t)ret_conv;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1u16Z_1some(JNIEnv *env, jclass clz, int16_t o) {
LDKCOption_u16Z *ret_copy = MALLOC(sizeof(LDKCOption_u16Z), "LDKCOption_u16Z");
*ret_copy = COption_u16Z_some(o);
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PaymentHashPaymentSecretZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
LDKC2Tuple_PaymentHashPaymentSecretZ* orig_conv = (LDKC2Tuple_PaymentHashPaymentSecretZ*)(orig & ~1);
- LDKC2Tuple_PaymentHashPaymentSecretZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
- *ret_ref = C2Tuple_PaymentHashPaymentSecretZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_PaymentHashPaymentSecretZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
+ *ret_conv = C2Tuple_PaymentHashPaymentSecretZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PaymentHashPaymentSecretZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int8_tArray b) {
LDKThirtyTwoBytes b_ref;
CHECK((*env)->GetArrayLength(env, b) == 32);
(*env)->GetByteArrayRegion(env, b, 0, 32, b_ref.data);
- LDKC2Tuple_PaymentHashPaymentSecretZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
- *ret_ref = C2Tuple_PaymentHashPaymentSecretZ_new(a_ref, b_ref);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_PaymentHashPaymentSecretZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
+ *ret_conv = C2Tuple_PaymentHashPaymentSecretZ_new(a_ref, b_ref);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PaymentHashPaymentSecretZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
b_conv.inner = (void*)(b & (~1));
b_conv.is_owned = (b & 1) || (b == 0);
// Warning: we need a move here but no clone is available for LDKChannelManager
- LDKC2Tuple_BlockHashChannelManagerZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelManagerZ), "LDKC2Tuple_BlockHashChannelManagerZ");
- *ret_ref = C2Tuple_BlockHashChannelManagerZ_new(a_ref, b_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_BlockHashChannelManagerZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelManagerZ), "LDKC2Tuple_BlockHashChannelManagerZ");
+ *ret_conv = C2Tuple_BlockHashChannelManagerZ_new(a_ref, b_conv);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelManagerZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* orig_conv = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(orig & ~1);
- LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
- *ret_ref = C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
+ *ret_conv = C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1new(JNIEnv *env, jclass clz, int64_t a, int8_tArray b, int64_t c) {
c_conv.inner = (void*)(c & (~1));
c_conv.is_owned = (c & 1) || (c == 0);
c_conv = InvoiceSignature_clone(&c_conv);
- LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
- *ret_ref = C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(a_conv, b_ref, c_conv);
- return (uint64_t)ret_ref;
+ LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
+ *ret_conv = C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(a_conv, b_ref, c_conv);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
LDKC2Tuple_OutPointScriptZ* orig_conv = (LDKC2Tuple_OutPointScriptZ*)(orig & ~1);
- LDKC2Tuple_OutPointScriptZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
- *ret_ref = C2Tuple_OutPointScriptZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_OutPointScriptZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
+ *ret_conv = C2Tuple_OutPointScriptZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1new(JNIEnv *env, jclass clz, int64_t a, int8_tArray b) {
b_ref.datalen = (*env)->GetArrayLength(env, b);
b_ref.data = MALLOC(b_ref.datalen, "LDKCVec_u8Z Bytes");
(*env)->GetByteArrayRegion(env, b, 0, b_ref.datalen, b_ref.data);
- LDKC2Tuple_OutPointScriptZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
- *ret_ref = C2Tuple_OutPointScriptZ_new(a_conv, b_ref);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_OutPointScriptZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
+ *ret_conv = C2Tuple_OutPointScriptZ_new(a_conv, b_ref);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32ScriptZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
LDKC2Tuple_u32ScriptZ* orig_conv = (LDKC2Tuple_u32ScriptZ*)(orig & ~1);
- LDKC2Tuple_u32ScriptZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
- *ret_ref = C2Tuple_u32ScriptZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_u32ScriptZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
+ *ret_conv = C2Tuple_u32ScriptZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32ScriptZ_1new(JNIEnv *env, jclass clz, int32_t a, int8_tArray b) {
b_ref.datalen = (*env)->GetArrayLength(env, b);
b_ref.data = MALLOC(b_ref.datalen, "LDKCVec_u8Z Bytes");
(*env)->GetByteArrayRegion(env, b, 0, b_ref.datalen, b_ref.data);
- LDKC2Tuple_u32ScriptZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
- *ret_ref = C2Tuple_u32ScriptZ_new(a, b_ref);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_u32ScriptZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
+ *ret_conv = C2Tuple_u32ScriptZ_new(a, b_ref);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32ScriptZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
else
_res_constr.data = NULL;
int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
- for (size_t b = 0; b < _res_constr.datalen; b++) {
- int64_t _res_conv_27 = _res_vals[b];
- LDKC2Tuple_u32ScriptZ _res_conv_27_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)_res_conv_27) & ~1);
- FREE((void*)_res_conv_27);
- _res_constr.data[b] = _res_conv_27_conv;
+ for (size_t v = 0; v < _res_constr.datalen; v++) {
+ int64_t _res_conv_21 = _res_vals[v];
+ LDKC2Tuple_u32ScriptZ _res_conv_21_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)_res_conv_21) & ~1);
+ FREE((void*)_res_conv_21);
+ _res_constr.data[v] = _res_conv_21_conv;
}
(*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
CVec_C2Tuple_u32ScriptZZ_free(_res_constr);
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32ScriptZZZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* orig_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(orig & ~1);
- LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
- *ret_ref = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
+ *ret_conv = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32ScriptZZZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int64_tArray b) {
else
b_constr.data = NULL;
int64_t* b_vals = (*env)->GetLongArrayElements (env, b, NULL);
- for (size_t b = 0; b < b_constr.datalen; b++) {
- int64_t b_conv_27 = b_vals[b];
- LDKC2Tuple_u32ScriptZ b_conv_27_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_27) & ~1);
- b_conv_27_conv = C2Tuple_u32ScriptZ_clone((LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_27) & ~1));
- b_constr.data[b] = b_conv_27_conv;
+ for (size_t v = 0; v < b_constr.datalen; v++) {
+ int64_t b_conv_21 = b_vals[v];
+ LDKC2Tuple_u32ScriptZ b_conv_21_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_21) & ~1);
+ b_conv_21_conv = C2Tuple_u32ScriptZ_clone((LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_21) & ~1));
+ b_constr.data[v] = b_conv_21_conv;
}
(*env)->ReleaseLongArrayElements(env, b, b_vals, 0);
- LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
- *ret_ref = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a_ref, b_constr);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
+ *ret_conv = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a_ref, b_constr);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32ScriptZZZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
else
_res_constr.data = NULL;
int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
- for (size_t v = 0; v < _res_constr.datalen; v++) {
- int64_t _res_conv_47 = _res_vals[v];
- LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res_conv_47_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(((uint64_t)_res_conv_47) & ~1);
- FREE((void*)_res_conv_47);
- _res_constr.data[v] = _res_conv_47_conv;
+ for (size_t o = 0; o < _res_constr.datalen; o++) {
+ int64_t _res_conv_40 = _res_vals[o];
+ LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res_conv_40_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(((uint64_t)_res_conv_40) & ~1);
+ FREE((void*)_res_conv_40);
+ _res_constr.data[o] = _res_conv_40_conv;
}
(*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res_constr);
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32TxOutZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
LDKC2Tuple_u32TxOutZ* orig_conv = (LDKC2Tuple_u32TxOutZ*)(orig & ~1);
- LDKC2Tuple_u32TxOutZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
- *ret_ref = C2Tuple_u32TxOutZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_u32TxOutZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
+ *ret_conv = C2Tuple_u32TxOutZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32TxOutZ_1new(JNIEnv *env, jclass clz, int32_t a, int64_t b) {
LDKTxOut b_conv = *(LDKTxOut*)(((uint64_t)b) & ~1);
b_conv = TxOut_clone((LDKTxOut*)(((uint64_t)b) & ~1));
- LDKC2Tuple_u32TxOutZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
- *ret_ref = C2Tuple_u32TxOutZ_new(a, b_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_u32TxOutZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
+ *ret_conv = C2Tuple_u32TxOutZ_new(a, b_conv);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32TxOutZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
else
_res_constr.data = NULL;
int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
- for (size_t a = 0; a < _res_constr.datalen; a++) {
- int64_t _res_conv_26 = _res_vals[a];
- LDKC2Tuple_u32TxOutZ _res_conv_26_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)_res_conv_26) & ~1);
- FREE((void*)_res_conv_26);
- _res_constr.data[a] = _res_conv_26_conv;
+ for (size_t u = 0; u < _res_constr.datalen; u++) {
+ int64_t _res_conv_20 = _res_vals[u];
+ LDKC2Tuple_u32TxOutZ _res_conv_20_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)_res_conv_20) & ~1);
+ FREE((void*)_res_conv_20);
+ _res_constr.data[u] = _res_conv_20_conv;
}
(*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
CVec_C2Tuple_u32TxOutZZ_free(_res_constr);
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* orig_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(orig & ~1);
- LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
- *ret_ref = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+ *ret_conv = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int64_tArray b) {
else
b_constr.data = NULL;
int64_t* b_vals = (*env)->GetLongArrayElements (env, b, NULL);
- for (size_t a = 0; a < b_constr.datalen; a++) {
- int64_t b_conv_26 = b_vals[a];
- LDKC2Tuple_u32TxOutZ b_conv_26_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_26) & ~1);
- b_conv_26_conv = C2Tuple_u32TxOutZ_clone((LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_26) & ~1));
- b_constr.data[a] = b_conv_26_conv;
+ for (size_t u = 0; u < b_constr.datalen; u++) {
+ int64_t b_conv_20 = b_vals[u];
+ LDKC2Tuple_u32TxOutZ b_conv_20_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_20) & ~1);
+ b_conv_20_conv = C2Tuple_u32TxOutZ_clone((LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_20) & ~1));
+ b_constr.data[u] = b_conv_20_conv;
}
(*env)->ReleaseLongArrayElements(env, b, b_vals, 0);
- LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
- *ret_ref = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a_ref, b_constr);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+ *ret_conv = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a_ref, b_constr);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
else
_res_constr.data = NULL;
int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
- for (size_t u = 0; u < _res_constr.datalen; u++) {
- int64_t _res_conv_46 = _res_vals[u];
- LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res_conv_46_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(((uint64_t)_res_conv_46) & ~1);
- FREE((void*)_res_conv_46);
- _res_constr.data[u] = _res_conv_46_conv;
+ for (size_t n = 0; n < _res_constr.datalen; n++) {
+ int64_t _res_conv_39 = _res_vals[n];
+ LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res_conv_39_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(((uint64_t)_res_conv_39) & ~1);
+ FREE((void*)_res_conv_39);
+ _res_constr.data[n] = _res_conv_39_conv;
}
(*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res_constr);
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
LDKC2Tuple_BlockHashChannelMonitorZ o_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o) & ~1);
- // Warning: we may need a move here but no clone is available for LDKC2Tuple_BlockHashChannelMonitorZ
+ o_conv = C2Tuple_BlockHashChannelMonitorZ_clone((LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o) & ~1));
LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ");
*ret_conv = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o_conv);
return (uint64_t)ret_conv;
CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res_conv);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* orig_conv = (LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)(orig & ~1);
+ LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ");
+ *ret_conv = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(orig_conv);
+ return (uint64_t)ret_conv;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneLightningErrorZ_1ok(JNIEnv *env, jclass clz) {
LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
*ret_conv = CResult_NoneLightningErrorZ_ok();
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyTypeZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
LDKC2Tuple_PublicKeyTypeZ* orig_conv = (LDKC2Tuple_PublicKeyTypeZ*)(orig & ~1);
- LDKC2Tuple_PublicKeyTypeZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
- *ret_ref = C2Tuple_PublicKeyTypeZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_PublicKeyTypeZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
+ *ret_conv = C2Tuple_PublicKeyTypeZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyTypeZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int64_t b) {
// If this_arg is a JCalls struct, then we need to increment the refcnt in it.
LDKType_JCalls_cloned(&b_conv);
}
- LDKC2Tuple_PublicKeyTypeZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
- *ret_ref = C2Tuple_PublicKeyTypeZ_new(a_ref, b_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_PublicKeyTypeZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
+ *ret_conv = C2Tuple_PublicKeyTypeZ_new(a_ref, b_conv);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyTypeZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
else
_res_constr.data = NULL;
int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
- for (size_t y = 0; y < _res_constr.datalen; y++) {
- int64_t _res_conv_24 = _res_vals[y];
- LDKC2Tuple_PublicKeyTypeZ _res_conv_24_conv = *(LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)_res_conv_24) & ~1);
- FREE((void*)_res_conv_24);
- _res_constr.data[y] = _res_conv_24_conv;
+ for (size_t z = 0; z < _res_constr.datalen; z++) {
+ int64_t _res_conv_25 = _res_vals[z];
+ LDKC2Tuple_PublicKeyTypeZ _res_conv_25_conv = *(LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)_res_conv_25) & ~1);
+ FREE((void*)_res_conv_25);
+ _res_constr.data[z] = _res_conv_25_conv;
}
(*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
CVec_C2Tuple_PublicKeyTypeZZ_free(_res_constr);
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* orig_conv = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(orig & ~1);
- LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
- *ret_ref = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
+ *ret_conv = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1new(JNIEnv *env, jclass clz, int64_t a, int64_t b, int64_t c) {
c_conv.inner = (void*)(c & (~1));
c_conv.is_owned = (c & 1) || (c == 0);
c_conv = ChannelUpdate_clone(&c_conv);
- LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
- *ret_ref = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a_conv, b_conv, c_conv);
- return (uint64_t)ret_ref;
+ LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
+ *ret_conv = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a_conv, b_conv, c_conv);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
else
_res_constr.data = NULL;
int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
- for (size_t l = 0; l < _res_constr.datalen; l++) {
- int64_t _res_conv_63 = _res_vals[l];
- LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res_conv_63_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)_res_conv_63) & ~1);
- FREE((void*)_res_conv_63);
- _res_constr.data[l] = _res_conv_63_conv;
+ for (size_t h = 0; h < _res_constr.datalen; h++) {
+ int64_t _res_conv_59 = _res_vals[h];
+ LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res_conv_59_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)_res_conv_59) & ~1);
+ FREE((void*)_res_conv_59);
+ _res_constr.data[h] = _res_conv_59_conv;
}
(*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res_constr);
LDKNetworkGraph o_conv;
o_conv.inner = (void*)(o & (~1));
o_conv.is_owned = (o & 1) || (o == 0);
- // Warning: we need a move here but no clone is available for LDKNetworkGraph
+ o_conv = NetworkGraph_clone(&o_conv);
LDKCResult_NetworkGraphDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetworkGraphDecodeErrorZ), "LDKCResult_NetworkGraphDecodeErrorZ");
*ret_conv = CResult_NetworkGraphDecodeErrorZ_ok(o_conv);
return (uint64_t)ret_conv;
CResult_NetworkGraphDecodeErrorZ_free(_res_conv);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_NetworkGraphDecodeErrorZ* orig_conv = (LDKCResult_NetworkGraphDecodeErrorZ*)(orig & ~1);
+ LDKCResult_NetworkGraphDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetworkGraphDecodeErrorZ), "LDKCResult_NetworkGraphDecodeErrorZ");
+ *ret_conv = CResult_NetworkGraphDecodeErrorZ_clone(orig_conv);
+ return (uint64_t)ret_conv;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NetAddressu8Z_1ok(JNIEnv *env, jclass clz, int64_t o) {
LDKNetAddress o_conv = *(LDKNetAddress*)(((uint64_t)o) & ~1);
o_conv = NetAddress_clone((LDKNetAddress*)(((uint64_t)o) & ~1));
LDKChannelMonitor this_arg_conv;
this_arg_conv.inner = (void*)(this_arg & (~1));
this_arg_conv.is_owned = false;
- LDKC2Tuple_OutPointScriptZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
- *ret_ref = ChannelMonitor_get_funding_txo(&this_arg_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_OutPointScriptZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
+ *ret_conv = ChannelMonitor_get_funding_txo(&this_arg_conv);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1outputs_1to_1watch(JNIEnv *env, jclass clz, int64_t this_arg) {
LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ ret_var = ChannelMonitor_get_outputs_to_watch(&this_arg_conv);
int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
- for (size_t v = 0; v < ret_var.datalen; v++) {
- LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_conv_47_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
- *ret_conv_47_ref = ret_var.data[v];
- ret_arr_ptr[v] = (uint64_t)ret_conv_47_ref;
+ for (size_t o = 0; o < ret_var.datalen; o++) {
+ LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_conv_40_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
+ *ret_conv_40_conv = ret_var.data[o];
+ ret_arr_ptr[o] = ((uint64_t)ret_conv_40_conv);
}
(*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
FREE(ret_var.data);
else
txdata_constr.data = NULL;
int64_t* txdata_vals = (*env)->GetLongArrayElements (env, txdata, NULL);
- for (size_t y = 0; y < txdata_constr.datalen; y++) {
- int64_t txdata_conv_24 = txdata_vals[y];
- LDKC2Tuple_usizeTransactionZ txdata_conv_24_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_24) & ~1);
- txdata_conv_24_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_24) & ~1));
- txdata_constr.data[y] = txdata_conv_24_conv;
+ for (size_t c = 0; c < txdata_constr.datalen; c++) {
+ int64_t txdata_conv_28 = txdata_vals[c];
+ LDKC2Tuple_usizeTransactionZ txdata_conv_28_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1);
+ txdata_conv_28_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1));
+ txdata_constr.data[c] = txdata_conv_28_conv;
}
(*env)->ReleaseLongArrayElements(env, txdata, txdata_vals, 0);
LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(((uint64_t)broadcaster) & ~1);
LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ret_var = ChannelMonitor_block_connected(&this_arg_conv, header_ref, txdata_constr, height, broadcaster_conv, fee_estimator_conv, logger_conv);
int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
- for (size_t u = 0; u < ret_var.datalen; u++) {
- LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_46_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
- *ret_conv_46_ref = ret_var.data[u];
- ret_arr_ptr[u] = (uint64_t)ret_conv_46_ref;
+ for (size_t n = 0; n < ret_var.datalen; n++) {
+ LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_39_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+ *ret_conv_39_conv = ret_var.data[n];
+ ret_arr_ptr[n] = ((uint64_t)ret_conv_39_conv);
}
(*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
FREE(ret_var.data);
else
txdata_constr.data = NULL;
int64_t* txdata_vals = (*env)->GetLongArrayElements (env, txdata, NULL);
- for (size_t y = 0; y < txdata_constr.datalen; y++) {
- int64_t txdata_conv_24 = txdata_vals[y];
- LDKC2Tuple_usizeTransactionZ txdata_conv_24_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_24) & ~1);
- txdata_conv_24_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_24) & ~1));
- txdata_constr.data[y] = txdata_conv_24_conv;
+ for (size_t c = 0; c < txdata_constr.datalen; c++) {
+ int64_t txdata_conv_28 = txdata_vals[c];
+ LDKC2Tuple_usizeTransactionZ txdata_conv_28_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1);
+ txdata_conv_28_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1));
+ txdata_constr.data[c] = txdata_conv_28_conv;
}
(*env)->ReleaseLongArrayElements(env, txdata, txdata_vals, 0);
LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(((uint64_t)broadcaster) & ~1);
LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ret_var = ChannelMonitor_transactions_confirmed(&this_arg_conv, header_ref, txdata_constr, height, broadcaster_conv, fee_estimator_conv, logger_conv);
int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
- for (size_t u = 0; u < ret_var.datalen; u++) {
- LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_46_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
- *ret_conv_46_ref = ret_var.data[u];
- ret_arr_ptr[u] = (uint64_t)ret_conv_46_ref;
+ for (size_t n = 0; n < ret_var.datalen; n++) {
+ LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_39_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+ *ret_conv_39_conv = ret_var.data[n];
+ ret_arr_ptr[n] = ((uint64_t)ret_conv_39_conv);
}
(*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
FREE(ret_var.data);
LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ret_var = ChannelMonitor_best_block_updated(&this_arg_conv, header_ref, height, broadcaster_conv, fee_estimator_conv, logger_conv);
int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
- for (size_t u = 0; u < ret_var.datalen; u++) {
- LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_46_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
- *ret_conv_46_ref = ret_var.data[u];
- ret_arr_ptr[u] = (uint64_t)ret_conv_46_ref;
+ for (size_t n = 0; n < ret_var.datalen; n++) {
+ LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_39_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+ *ret_conv_39_conv = ret_var.data[n];
+ ret_arr_ptr[n] = ((uint64_t)ret_conv_39_conv);
}
(*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
FREE(ret_var.data);
this_arg_conv.is_owned = false;
LDKCOption_u64Z min_value_msat_conv = *(LDKCOption_u64Z*)(((uint64_t)min_value_msat) & ~1);
min_value_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)(((uint64_t)min_value_msat) & ~1));
- LDKC2Tuple_PaymentHashPaymentSecretZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
- *ret_ref = ChannelManager_create_inbound_payment(&this_arg_conv, min_value_msat_conv, invoice_expiry_delta_secs, user_payment_id);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_PaymentHashPaymentSecretZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
+ *ret_conv = ChannelManager_create_inbound_payment(&this_arg_conv, min_value_msat_conv, invoice_expiry_delta_secs, user_payment_id);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1create_1inbound_1payment_1for_1hash(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray payment_hash, int64_t min_value_msat, int32_t invoice_expiry_delta_secs, int64_t user_payment_id) {
NetworkGraph_free(this_obj_conv);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKNetworkGraph orig_conv;
+ orig_conv.inner = (void*)(orig & (~1));
+ orig_conv.is_owned = false;
+ LDKNetworkGraph ret_var = NetworkGraph_clone(&orig_conv);
+ CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ uint64_t ret_ref = (uint64_t)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReadOnlyNetworkGraph_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
LDKReadOnlyNetworkGraph this_obj_conv;
this_obj_conv.inner = (void*)(this_obj & (~1));
LDKNetworkGraph val_conv;
val_conv.inner = (void*)(val & (~1));
val_conv.is_owned = (val & 1) || (val == 0);
- // Warning: we need a move here but no clone is available for LDKNetworkGraph
+ val_conv = NetworkGraph_clone(&val_conv);
NetGraphMsgHandler_set_network_graph(&this_ptr_conv, val_conv);
}
LDKNetworkGraph network_graph_conv;
network_graph_conv.inner = (void*)(network_graph & (~1));
network_graph_conv.is_owned = (network_graph & 1) || (network_graph == 0);
- // Warning: we need a move here but no clone is available for LDKNetworkGraph
+ network_graph_conv = NetworkGraph_clone(&network_graph_conv);
LDKCOption_AccessZ chain_access_conv = *(LDKCOption_AccessZ*)(((uint64_t)chain_access) & ~1);
// Warning: we may need a move here but no clone is available for LDKCOption_AccessZ
if (chain_access_conv.tag == LDKCOption_AccessZ_Some) {
this_arg_conv.inner = (void*)(this_arg & (~1));
this_arg_conv.is_owned = (this_arg & 1) || (this_arg == 0);
this_arg_conv = SignedRawInvoice_clone(&this_arg_conv);
- LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
- *ret_ref = SignedRawInvoice_into_parts(this_arg_conv);
- return (uint64_t)ret_ref;
+ LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
+ *ret_conv = SignedRawInvoice_into_parts(this_arg_conv);
+ return ((uint64_t)ret_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SignedRawInvoice_1raw_1invoice(JNIEnv *env, jclass clz, int64_t this_arg) {
/*
* Class: org_ldk_impl_bindings
- * Method: LDKC2Tuple_usizeTransactionZ_get_a
+ * Method: C2Tuple_usizeTransactionZ_get_a
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1usizeTransactionZ_1get_1a
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1get_1a
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: LDKC2Tuple_usizeTransactionZ_get_b
+ * Method: C2Tuple_usizeTransactionZ_get_b
* Signature: (J)[B
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1usizeTransactionZ_1get_1b
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1get_1b
(JNIEnv *, jclass, jlong);
/*
/*
* Class: org_ldk_impl_bindings
- * Method: LDKC2Tuple_SignatureCVec_SignatureZZ_get_a
+ * Method: C2Tuple_SignatureCVec_SignatureZZ_get_a
* Signature: (J)[B
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1SignatureCVec_1SignatureZZ_1get_1a
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1get_1a
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: LDKC2Tuple_SignatureCVec_SignatureZZ_get_b
+ * Method: C2Tuple_SignatureCVec_SignatureZZ_get_b
* Signature: (J)[[B
*/
-JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1SignatureCVec_1SignatureZZ_1get_1b
+JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1get_1b
(JNIEnv *, jclass, jlong);
/*
/*
* Class: org_ldk_impl_bindings
- * Method: LDKC2Tuple_BlockHashChannelMonitorZ_get_a
+ * Method: C2Tuple_BlockHashChannelMonitorZ_get_a
* Signature: (J)[B
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelMonitorZ_1get_1a
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMonitorZ_1get_1a
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: LDKC2Tuple_BlockHashChannelMonitorZ_get_b
+ * Method: C2Tuple_BlockHashChannelMonitorZ_get_b
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelMonitorZ_1get_1b
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMonitorZ_1get_1b
(JNIEnv *, jclass, jlong);
/*
/*
* Class: org_ldk_impl_bindings
- * Method: LDKC2Tuple_PaymentHashPaymentSecretZ_get_a
+ * Method: C2Tuple_PaymentHashPaymentSecretZ_get_a
* Signature: (J)[B
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1PaymentHashPaymentSecretZ_1get_1a
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PaymentHashPaymentSecretZ_1get_1a
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: LDKC2Tuple_PaymentHashPaymentSecretZ_get_b
+ * Method: C2Tuple_PaymentHashPaymentSecretZ_get_b
* Signature: (J)[B
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1PaymentHashPaymentSecretZ_1get_1b
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PaymentHashPaymentSecretZ_1get_1b
(JNIEnv *, jclass, jlong);
/*
/*
* Class: org_ldk_impl_bindings
- * Method: LDKC2Tuple_BlockHashChannelManagerZ_get_a
+ * Method: C2Tuple_BlockHashChannelManagerZ_get_a
* Signature: (J)[B
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelManagerZ_1get_1a
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelManagerZ_1get_1a
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: LDKC2Tuple_BlockHashChannelManagerZ_get_b
+ * Method: C2Tuple_BlockHashChannelManagerZ_get_b
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelManagerZ_1get_1b
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelManagerZ_1get_1b
(JNIEnv *, jclass, jlong);
/*
/*
* Class: org_ldk_impl_bindings
- * Method: LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a
+ * Method: C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1get_1a
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1get_1a
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b
+ * Method: C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b
* Signature: (J)[B
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1get_1b
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1get_1b
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c
+ * Method: C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1get_1c
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1RawInvoice_1u832InvoiceSignatureZ_1get_1c
(JNIEnv *, jclass, jlong);
/*
/*
* Class: org_ldk_impl_bindings
- * Method: LDKC2Tuple_OutPointScriptZ_get_a
+ * Method: C2Tuple_OutPointScriptZ_get_a
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1OutPointScriptZ_1get_1a
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1get_1a
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: LDKC2Tuple_OutPointScriptZ_get_b
+ * Method: C2Tuple_OutPointScriptZ_get_b
* Signature: (J)[B
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1OutPointScriptZ_1get_1b
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1get_1b
(JNIEnv *, jclass, jlong);
/*
/*
* Class: org_ldk_impl_bindings
- * Method: LDKC2Tuple_u32ScriptZ_get_a
+ * Method: C2Tuple_u32ScriptZ_get_a
* Signature: (J)I
*/
-JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32ScriptZ_1get_1a
+JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32ScriptZ_1get_1a
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: LDKC2Tuple_u32ScriptZ_get_b
+ * Method: C2Tuple_u32ScriptZ_get_b
* Signature: (J)[B
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32ScriptZ_1get_1b
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32ScriptZ_1get_1b
(JNIEnv *, jclass, jlong);
/*
/*
* Class: org_ldk_impl_bindings
- * Method: LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a
+ * Method: C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a
* Signature: (J)[B
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple_1u32ScriptZZZ_1get_1a
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32ScriptZZZ_1get_1a
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b
+ * Method: C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b
* Signature: (J)[J
*/
-JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple_1u32ScriptZZZ_1get_1b
+JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32ScriptZZZ_1get_1b
(JNIEnv *, jclass, jlong);
/*
/*
* Class: org_ldk_impl_bindings
- * Method: LDKC2Tuple_u32TxOutZ_get_a
+ * Method: C2Tuple_u32TxOutZ_get_a
* Signature: (J)I
*/
-JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32TxOutZ_1get_1a
+JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32TxOutZ_1get_1a
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: LDKC2Tuple_u32TxOutZ_get_b
+ * Method: C2Tuple_u32TxOutZ_get_b
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32TxOutZ_1get_1b
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32TxOutZ_1get_1b
(JNIEnv *, jclass, jlong);
/*
/*
* Class: org_ldk_impl_bindings
- * Method: LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a
+ * Method: C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a
* Signature: (J)[B
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1get_1a
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1get_1a
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b
+ * Method: C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b
* Signature: (J)[J
*/
-JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1get_1b
+JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1get_1b
(JNIEnv *, jclass, jlong);
/*
/*
* Class: org_ldk_impl_bindings
- * Method: LDKC2Tuple_PublicKeyTypeZ_get_a
+ * Method: C2Tuple_PublicKeyTypeZ_get_a
* Signature: (J)[B
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1PublicKeyTypeZ_1get_1a
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyTypeZ_1get_1a
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: LDKC2Tuple_PublicKeyTypeZ_get_b
+ * Method: C2Tuple_PublicKeyTypeZ_get_b
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1PublicKeyTypeZ_1get_1b
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyTypeZ_1get_1b
(JNIEnv *, jclass, jlong);
/*
/*
* Class: org_ldk_impl_bindings
- * Method: LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a
+ * Method: C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1a
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1a
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b
+ * Method: C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1b
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1b
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c
+ * Method: C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1c
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1c
(JNIEnv *, jclass, jlong);
/*
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1clone
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: C2Tuple_BlockHashChannelMonitorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMonitorZ_1clone
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: C2Tuple_BlockHashChannelMonitorZ_new
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1C2Tuple_1BlockHashChannelMonitorZZErrorZ_1free
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1C2Tuple_1BlockHashChannelMonitorZZErrorZ_1clone
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: COption_u16Z_some
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1free
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1clone
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: CResult_NoneLightningErrorZ_ok
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecodeErrorZ_1free
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_NetworkGraphDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecodeErrorZ_1clone
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: CResult_NetAddressu8Z_ok
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1free
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: NetworkGraph_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1clone
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: ReadOnlyNetworkGraph_free
ret->b = b_ref;
return (uint64_t)ret;
}
-int64_t __attribute__((visibility("default"))) TS_LDKC2Tuple_usizeTransactionZ_get_a(uint32_t ptr) {
- LDKC2Tuple_usizeTransactionZ *tuple = (LDKC2Tuple_usizeTransactionZ*)(ptr & ~1);
+static inline uintptr_t C2Tuple_usizeTransactionZ_get_a(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR tuple){
return tuple->a;
}
-int8_tArray __attribute__((visibility("default"))) TS_LDKC2Tuple_usizeTransactionZ_get_b(uint32_t ptr) {
- LDKC2Tuple_usizeTransactionZ *tuple = (LDKC2Tuple_usizeTransactionZ*)(ptr & ~1);
- LDKTransaction b_var = tuple->b;
- int8_tArray b_arr = init_arr(b_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
- memcpy((uint8_t*)(b_arr + 4), b_var.data, b_var.datalen);
- return b_arr;
+int64_t __attribute__((visibility("default"))) TS_C2Tuple_usizeTransactionZ_get_a(uint32_t tuple) {
+ LDKC2Tuple_usizeTransactionZ* tuple_conv = (LDKC2Tuple_usizeTransactionZ*)(tuple & ~1);
+ int64_t ret_val = C2Tuple_usizeTransactionZ_get_a(tuple_conv);
+ return ret_val;
+}
+
+static inline struct LDKTransaction C2Tuple_usizeTransactionZ_get_b(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR tuple){
+ return tuple->b;
}
+int8_tArray __attribute__((visibility("default"))) TS_C2Tuple_usizeTransactionZ_get_b(uint32_t tuple) {
+ LDKC2Tuple_usizeTransactionZ* tuple_conv = (LDKC2Tuple_usizeTransactionZ*)(tuple & ~1);
+ LDKTransaction ret_var = C2Tuple_usizeTransactionZ_get_b(tuple_conv);
+ int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+ memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+ Transaction_free(ret_var);
+ return ret_arr;
+}
+
uint32_t __attribute__((visibility("default"))) TS_LDKCVec_C2Tuple_usizeTransactionZZ_new(uint32_tArray elems) {
LDKCVec_C2Tuple_usizeTransactionZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_usizeTransactionZZ), "LDKCVec_C2Tuple_usizeTransactionZZ");
ret->datalen = *((uint32_t*)elems);
LDKCOption_C2Tuple_usizeTransactionZZ *obj = (LDKCOption_C2Tuple_usizeTransactionZZ*)(ptr & ~1);
switch(obj->tag) {
case LDKCOption_C2Tuple_usizeTransactionZZ_Some: {
- uint64_t some_ref = (uint64_t)(&obj->some) | 1;
- return 0 /* LDKCOption_C2Tuple_usizeTransactionZZ - Some */; (void) some_ref;
+ LDKC2Tuple_usizeTransactionZ* some_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
+ *some_conv = obj->some;
+ *some_conv = C2Tuple_usizeTransactionZ_clone(some_conv);
+ return 0 /* LDKCOption_C2Tuple_usizeTransactionZZ - Some */; (void) ((uint64_t)some_conv);
}
case LDKCOption_C2Tuple_usizeTransactionZZ_None: {
return 0 /* LDKCOption_C2Tuple_usizeTransactionZZ - None */;
ret->b = b_constr;
return (uint64_t)ret;
}
-int8_tArray __attribute__((visibility("default"))) TS_LDKC2Tuple_SignatureCVec_SignatureZZ_get_a(uint32_t ptr) {
- LDKC2Tuple_SignatureCVec_SignatureZZ *tuple = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(ptr & ~1);
- int8_tArray a_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
- memcpy((uint8_t*)(a_arr + 4), tuple->a.compact_form, 64);
- return a_arr;
+static inline struct LDKSignature C2Tuple_SignatureCVec_SignatureZZ_get_a(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR tuple){
+ return tuple->a;
+}
+int8_tArray __attribute__((visibility("default"))) TS_C2Tuple_SignatureCVec_SignatureZZ_get_a(uint32_t tuple) {
+ LDKC2Tuple_SignatureCVec_SignatureZZ* tuple_conv = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(tuple & ~1);
+ int8_tArray ret_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
+ memcpy((uint8_t*)(ret_arr + 4), C2Tuple_SignatureCVec_SignatureZZ_get_a(tuple_conv).compact_form, 64);
+ return ret_arr;
}
-ptrArray __attribute__((visibility("default"))) TS_LDKC2Tuple_SignatureCVec_SignatureZZ_get_b(uint32_t ptr) {
- LDKC2Tuple_SignatureCVec_SignatureZZ *tuple = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(ptr & ~1);
- LDKCVec_SignatureZ b_var = tuple->b;
- ptrArray b_arr = init_arr(b_var.datalen, sizeof(uint32_t), "Native ptrArray Bytes");
- int8_tArray *b_arr_ptr = (int8_tArray*)(b_arr + 4);
- for (size_t m = 0; m < b_var.datalen; m++) {
- int8_tArray b_conv_12_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
- memcpy((uint8_t*)(b_conv_12_arr + 4), b_var.data[m].compact_form, 64);
- b_arr_ptr[m] = b_conv_12_arr;
+
+static inline struct LDKCVec_SignatureZ C2Tuple_SignatureCVec_SignatureZZ_get_b(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR tuple){
+ return tuple->b;
+}
+ptrArray __attribute__((visibility("default"))) TS_C2Tuple_SignatureCVec_SignatureZZ_get_b(uint32_t tuple) {
+ LDKC2Tuple_SignatureCVec_SignatureZZ* tuple_conv = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(tuple & ~1);
+ LDKCVec_SignatureZ ret_var = C2Tuple_SignatureCVec_SignatureZZ_get_b(tuple_conv);
+ ptrArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native ptrArray Bytes");
+ int8_tArray *ret_arr_ptr = (int8_tArray*)(ret_arr + 4);
+ for (size_t m = 0; m < ret_var.datalen; m++) {
+ int8_tArray ret_conv_12_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
+ memcpy((uint8_t*)(ret_conv_12_arr + 4), ret_var.data[m].compact_form, 64);
+ ret_arr_ptr[m] = ret_conv_12_arr;
}
- return b_arr;
+ FREE(ret_var.data);
+ return ret_arr;
}
+
jboolean __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_result_ok(uint32_t arg) {
return ((LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)arg)->result_ok;
}
uint32_t __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(uint32_t arg) {
LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *val = (LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(arg & ~1);
CHECK(val->result_ok);
- uint64_t res_ref = (uint64_t)(&(*val->contents.result)) | 1;
- return res_ref;
+ LDKC2Tuple_SignatureCVec_SignatureZZ* res_conv = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
+ *res_conv = (*val->contents.result);
+ *res_conv = C2Tuple_SignatureCVec_SignatureZZ_clone(res_conv);
+ return ((uint64_t)res_conv);
}
void __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(uint32_t arg) {
LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *val = (LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(arg & ~1);
ret->b = b_conv;
return (uint64_t)ret;
}
-int8_tArray __attribute__((visibility("default"))) TS_LDKC2Tuple_BlockHashChannelMonitorZ_get_a(uint32_t ptr) {
- LDKC2Tuple_BlockHashChannelMonitorZ *tuple = (LDKC2Tuple_BlockHashChannelMonitorZ*)(ptr & ~1);
- int8_tArray a_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
- memcpy((uint8_t*)(a_arr + 4), tuple->a.data, 32);
- return a_arr;
+static inline struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelMonitorZ_get_a(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR tuple){
+ return ThirtyTwoBytes_clone(&tuple->a);
+}
+int8_tArray __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelMonitorZ_get_a(uint32_t tuple) {
+ LDKC2Tuple_BlockHashChannelMonitorZ* tuple_conv = (LDKC2Tuple_BlockHashChannelMonitorZ*)(tuple & ~1);
+ int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+ memcpy((uint8_t*)(ret_arr + 4), C2Tuple_BlockHashChannelMonitorZ_get_a(tuple_conv).data, 32);
+ return ret_arr;
}
-uint32_t __attribute__((visibility("default"))) TS_LDKC2Tuple_BlockHashChannelMonitorZ_get_b(uint32_t ptr) {
- LDKC2Tuple_BlockHashChannelMonitorZ *tuple = (LDKC2Tuple_BlockHashChannelMonitorZ*)(ptr & ~1);
- LDKChannelMonitor b_var = tuple->b;
- CHECK((((uint64_t)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- uint64_t b_ref = (uint64_t)b_var.inner & ~1;
- return b_ref;
+
+static inline struct LDKChannelMonitor C2Tuple_BlockHashChannelMonitorZ_get_b(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR tuple){
+ return ChannelMonitor_clone(&tuple->b);
}
+uint32_t __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelMonitorZ_get_b(uint32_t tuple) {
+ LDKC2Tuple_BlockHashChannelMonitorZ* tuple_conv = (LDKC2Tuple_BlockHashChannelMonitorZ*)(tuple & ~1);
+ LDKChannelMonitor ret_var = C2Tuple_BlockHashChannelMonitorZ_get_b(tuple_conv);
+ CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ uint64_t ret_ref = (uint64_t)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
uint32_t __attribute__((visibility("default"))) TS_LDKCVec_C2Tuple_BlockHashChannelMonitorZZ_new(uint32_tArray elems) {
LDKCVec_C2Tuple_BlockHashChannelMonitorZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_BlockHashChannelMonitorZZ), "LDKCVec_C2Tuple_BlockHashChannelMonitorZZ");
ret->datalen = *((uint32_t*)elems);
for (size_t i = 0; i < ret->datalen; i++) {
uint32_t arr_elem = java_elems[i];
LDKC2Tuple_BlockHashChannelMonitorZ arr_elem_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)arr_elem) & ~1);
- // Warning: we may need a move here but no clone is available for LDKC2Tuple_BlockHashChannelMonitorZ
+ arr_elem_conv = C2Tuple_BlockHashChannelMonitorZ_clone((LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)arr_elem) & ~1));
ret->data[i] = arr_elem_conv;
}
}
return (uint64_t)ret;
}
+static inline LDKCVec_C2Tuple_BlockHashChannelMonitorZZ CVec_C2Tuple_BlockHashChannelMonitorZZ_clone(const LDKCVec_C2Tuple_BlockHashChannelMonitorZZ *orig) {
+ LDKCVec_C2Tuple_BlockHashChannelMonitorZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ) * orig->datalen, "LDKCVec_C2Tuple_BlockHashChannelMonitorZZ clone bytes"), .datalen = orig->datalen };
+ for (size_t i = 0; i < ret.datalen; i++) {
+ ret.data[i] = C2Tuple_BlockHashChannelMonitorZ_clone(&orig->data[i]);
+ }
+ return ret;
+}
jboolean __attribute__((visibility("default"))) TS_LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_result_ok(uint32_t arg) {
return ((LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ*)arg)->result_ok;
}
LDKCVec_C2Tuple_BlockHashChannelMonitorZZ res_var = (*val->contents.result);
uint32_tArray res_arr = init_arr(res_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
uint32_t *res_arr_ptr = (uint32_t*)(res_arr + 4);
- for (size_t m = 0; m < res_var.datalen; m++) {
- uint64_t res_conv_38_ref = (uint64_t)(&res_var.data[m]) | 1;
- res_arr_ptr[m] = res_conv_38_ref;
+ for (size_t j = 0; j < res_var.datalen; j++) {
+ LDKC2Tuple_BlockHashChannelMonitorZ* res_conv_35_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
+ *res_conv_35_conv = res_var.data[j];
+ *res_conv_35_conv = C2Tuple_BlockHashChannelMonitorZ_clone(res_conv_35_conv);
+ res_arr_ptr[j] = ((uint64_t)res_conv_35_conv);
}
return res_arr;
}
ret->b = b_ref;
return (uint64_t)ret;
}
-int8_tArray __attribute__((visibility("default"))) TS_LDKC2Tuple_PaymentHashPaymentSecretZ_get_a(uint32_t ptr) {
- LDKC2Tuple_PaymentHashPaymentSecretZ *tuple = (LDKC2Tuple_PaymentHashPaymentSecretZ*)(ptr & ~1);
- int8_tArray a_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
- memcpy((uint8_t*)(a_arr + 4), tuple->a.data, 32);
- return a_arr;
+static inline struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_a(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR tuple){
+ return ThirtyTwoBytes_clone(&tuple->a);
+}
+int8_tArray __attribute__((visibility("default"))) TS_C2Tuple_PaymentHashPaymentSecretZ_get_a(uint32_t tuple) {
+ LDKC2Tuple_PaymentHashPaymentSecretZ* tuple_conv = (LDKC2Tuple_PaymentHashPaymentSecretZ*)(tuple & ~1);
+ int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+ memcpy((uint8_t*)(ret_arr + 4), C2Tuple_PaymentHashPaymentSecretZ_get_a(tuple_conv).data, 32);
+ return ret_arr;
+}
+
+static inline struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_b(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR tuple){
+ return ThirtyTwoBytes_clone(&tuple->b);
}
-int8_tArray __attribute__((visibility("default"))) TS_LDKC2Tuple_PaymentHashPaymentSecretZ_get_b(uint32_t ptr) {
- LDKC2Tuple_PaymentHashPaymentSecretZ *tuple = (LDKC2Tuple_PaymentHashPaymentSecretZ*)(ptr & ~1);
- int8_tArray b_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
- memcpy((uint8_t*)(b_arr + 4), tuple->b.data, 32);
- return b_arr;
+int8_tArray __attribute__((visibility("default"))) TS_C2Tuple_PaymentHashPaymentSecretZ_get_b(uint32_t tuple) {
+ LDKC2Tuple_PaymentHashPaymentSecretZ* tuple_conv = (LDKC2Tuple_PaymentHashPaymentSecretZ*)(tuple & ~1);
+ int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+ memcpy((uint8_t*)(ret_arr + 4), C2Tuple_PaymentHashPaymentSecretZ_get_b(tuple_conv).data, 32);
+ return ret_arr;
}
+
jboolean __attribute__((visibility("default"))) TS_LDKCResult_PaymentSecretAPIErrorZ_result_ok(uint32_t arg) {
return ((LDKCResult_PaymentSecretAPIErrorZ*)arg)->result_ok;
}
ret->b = b_conv;
return (uint64_t)ret;
}
-int8_tArray __attribute__((visibility("default"))) TS_LDKC2Tuple_BlockHashChannelManagerZ_get_a(uint32_t ptr) {
- LDKC2Tuple_BlockHashChannelManagerZ *tuple = (LDKC2Tuple_BlockHashChannelManagerZ*)(ptr & ~1);
- int8_tArray a_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
- memcpy((uint8_t*)(a_arr + 4), tuple->a.data, 32);
- return a_arr;
+static inline struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelManagerZ_get_a(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR tuple){
+ return ThirtyTwoBytes_clone(&tuple->a);
+}
+int8_tArray __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelManagerZ_get_a(uint32_t tuple) {
+ LDKC2Tuple_BlockHashChannelManagerZ* tuple_conv = (LDKC2Tuple_BlockHashChannelManagerZ*)(tuple & ~1);
+ int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+ memcpy((uint8_t*)(ret_arr + 4), C2Tuple_BlockHashChannelManagerZ_get_a(tuple_conv).data, 32);
+ return ret_arr;
+}
+
+static inline struct LDKChannelManager *C2Tuple_BlockHashChannelManagerZ_get_b(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR tuple){
+ return &tuple->b;
}
-uint32_t __attribute__((visibility("default"))) TS_LDKC2Tuple_BlockHashChannelManagerZ_get_b(uint32_t ptr) {
- LDKC2Tuple_BlockHashChannelManagerZ *tuple = (LDKC2Tuple_BlockHashChannelManagerZ*)(ptr & ~1);
- LDKChannelManager b_var = tuple->b;
- CHECK((((uint64_t)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- uint64_t b_ref = (uint64_t)b_var.inner & ~1;
- return b_ref;
+uint32_t __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelManagerZ_get_b(uint32_t tuple) {
+ LDKC2Tuple_BlockHashChannelManagerZ* tuple_conv = (LDKC2Tuple_BlockHashChannelManagerZ*)(tuple & ~1);
+ LDKChannelManager ret_var = *C2Tuple_BlockHashChannelManagerZ_get_b(tuple_conv);
+ CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ uint64_t ret_ref = (uint64_t)ret_var.inner & ~1;
+ return ret_ref;
}
+
jboolean __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_result_ok(uint32_t arg) {
return ((LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)arg)->result_ok;
}
uint32_t __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(uint32_t arg) {
LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)(arg & ~1);
CHECK(val->result_ok);
- uint64_t res_ref = (uint64_t)(&(*val->contents.result)) | 1;
- return res_ref;
+ LDKC2Tuple_BlockHashChannelManagerZ* res_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelManagerZ), "LDKC2Tuple_BlockHashChannelManagerZ");
+ *res_conv = (*val->contents.result);
+ // Warning: we really need to clone here, but no clone is available for LDKC2Tuple_BlockHashChannelManagerZ
+ return ((uint64_t)res_conv) | 1;
}
uint32_t __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(uint32_t arg) {
LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)(arg & ~1);
ret->c = c_conv;
return (uint64_t)ret;
}
-uint32_t __attribute__((visibility("default"))) TS_LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(uint32_t ptr) {
- LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *tuple = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(ptr & ~1);
- LDKRawInvoice a_var = tuple->a;
- CHECK((((uint64_t)a_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&a_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- uint64_t a_ref = (uint64_t)a_var.inner & ~1;
- return a_ref;
-}
-int8_tArray __attribute__((visibility("default"))) TS_LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(uint32_t ptr) {
- LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *tuple = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(ptr & ~1);
- int8_tArray b_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
- memcpy((uint8_t*)(b_arr + 4), tuple->b.data, 32);
- return b_arr;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(uint32_t ptr) {
- LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *tuple = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(ptr & ~1);
- LDKInvoiceSignature c_var = tuple->c;
- CHECK((((uint64_t)c_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&c_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- uint64_t c_ref = (uint64_t)c_var.inner & ~1;
- return c_ref;
+static inline struct LDKRawInvoice C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple){
+ return RawInvoice_clone(&tuple->a);
}
+uint32_t __attribute__((visibility("default"))) TS_C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(uint32_t tuple) {
+ LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* tuple_conv = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(tuple & ~1);
+ LDKRawInvoice ret_var = C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(tuple_conv);
+ CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ uint64_t ret_ref = (uint64_t)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
+static inline struct LDKThirtyTwoBytes C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple){
+ return ThirtyTwoBytes_clone(&tuple->b);
+}
+int8_tArray __attribute__((visibility("default"))) TS_C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(uint32_t tuple) {
+ LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* tuple_conv = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(tuple & ~1);
+ int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+ memcpy((uint8_t*)(ret_arr + 4), C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(tuple_conv).data, 32);
+ return ret_arr;
+}
+
+static inline struct LDKInvoiceSignature C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple){
+ return InvoiceSignature_clone(&tuple->c);
+}
+uint32_t __attribute__((visibility("default"))) TS_C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(uint32_t tuple) {
+ LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* tuple_conv = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(tuple & ~1);
+ LDKInvoiceSignature ret_var = C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(tuple_conv);
+ CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ uint64_t ret_ref = (uint64_t)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
jboolean __attribute__((visibility("default"))) TS_LDKCResult_PayeePubKeyErrorZ_result_ok(uint32_t arg) {
return ((LDKCResult_PayeePubKeyErrorZ*)arg)->result_ok;
}
ret->b = b_ref;
return (uint64_t)ret;
}
-uint32_t __attribute__((visibility("default"))) TS_LDKC2Tuple_OutPointScriptZ_get_a(uint32_t ptr) {
- LDKC2Tuple_OutPointScriptZ *tuple = (LDKC2Tuple_OutPointScriptZ*)(ptr & ~1);
- LDKOutPoint a_var = tuple->a;
- CHECK((((uint64_t)a_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&a_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- uint64_t a_ref = (uint64_t)a_var.inner & ~1;
- return a_ref;
-}
-int8_tArray __attribute__((visibility("default"))) TS_LDKC2Tuple_OutPointScriptZ_get_b(uint32_t ptr) {
- LDKC2Tuple_OutPointScriptZ *tuple = (LDKC2Tuple_OutPointScriptZ*)(ptr & ~1);
- LDKCVec_u8Z b_var = tuple->b;
- int8_tArray b_arr = init_arr(b_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
- memcpy((uint8_t*)(b_arr + 4), b_var.data, b_var.datalen);
- return b_arr;
+static inline struct LDKOutPoint C2Tuple_OutPointScriptZ_get_a(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR tuple){
+ return OutPoint_clone(&tuple->a);
+}
+uint32_t __attribute__((visibility("default"))) TS_C2Tuple_OutPointScriptZ_get_a(uint32_t tuple) {
+ LDKC2Tuple_OutPointScriptZ* tuple_conv = (LDKC2Tuple_OutPointScriptZ*)(tuple & ~1);
+ LDKOutPoint ret_var = C2Tuple_OutPointScriptZ_get_a(tuple_conv);
+ CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ uint64_t ret_ref = (uint64_t)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
+static inline struct LDKCVec_u8Z C2Tuple_OutPointScriptZ_get_b(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR tuple){
+ return CVec_u8Z_clone(&tuple->b);
+}
+int8_tArray __attribute__((visibility("default"))) TS_C2Tuple_OutPointScriptZ_get_b(uint32_t tuple) {
+ LDKC2Tuple_OutPointScriptZ* tuple_conv = (LDKC2Tuple_OutPointScriptZ*)(tuple & ~1);
+ LDKCVec_u8Z ret_var = C2Tuple_OutPointScriptZ_get_b(tuple_conv);
+ int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+ memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
}
+
uint32_t __attribute__((visibility("default"))) TS_LDKC2Tuple_u32ScriptZ_new(int32_t a, int8_tArray b) {
LDKC2Tuple_u32ScriptZ* ret = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
ret->a = a;
ret->b = b_ref;
return (uint64_t)ret;
}
-int32_t __attribute__((visibility("default"))) TS_LDKC2Tuple_u32ScriptZ_get_a(uint32_t ptr) {
- LDKC2Tuple_u32ScriptZ *tuple = (LDKC2Tuple_u32ScriptZ*)(ptr & ~1);
+static inline uint32_t C2Tuple_u32ScriptZ_get_a(LDKC2Tuple_u32ScriptZ *NONNULL_PTR tuple){
return tuple->a;
}
-int8_tArray __attribute__((visibility("default"))) TS_LDKC2Tuple_u32ScriptZ_get_b(uint32_t ptr) {
- LDKC2Tuple_u32ScriptZ *tuple = (LDKC2Tuple_u32ScriptZ*)(ptr & ~1);
- LDKCVec_u8Z b_var = tuple->b;
- int8_tArray b_arr = init_arr(b_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
- memcpy((uint8_t*)(b_arr + 4), b_var.data, b_var.datalen);
- return b_arr;
+int32_t __attribute__((visibility("default"))) TS_C2Tuple_u32ScriptZ_get_a(uint32_t tuple) {
+ LDKC2Tuple_u32ScriptZ* tuple_conv = (LDKC2Tuple_u32ScriptZ*)(tuple & ~1);
+ int32_t ret_val = C2Tuple_u32ScriptZ_get_a(tuple_conv);
+ return ret_val;
+}
+
+static inline struct LDKCVec_u8Z C2Tuple_u32ScriptZ_get_b(LDKC2Tuple_u32ScriptZ *NONNULL_PTR tuple){
+ return CVec_u8Z_clone(&tuple->b);
+}
+int8_tArray __attribute__((visibility("default"))) TS_C2Tuple_u32ScriptZ_get_b(uint32_t tuple) {
+ LDKC2Tuple_u32ScriptZ* tuple_conv = (LDKC2Tuple_u32ScriptZ*)(tuple & ~1);
+ LDKCVec_u8Z ret_var = C2Tuple_u32ScriptZ_get_b(tuple_conv);
+ int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+ memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
}
+
uint32_t __attribute__((visibility("default"))) TS_LDKCVec_C2Tuple_u32ScriptZZ_new(uint32_tArray elems) {
LDKCVec_C2Tuple_u32ScriptZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_u32ScriptZZ), "LDKCVec_C2Tuple_u32ScriptZZ");
ret->datalen = *((uint32_t*)elems);
else
b_constr.data = NULL;
uint32_t* b_vals = (uint32_t*)(b + 4);
- for (size_t e = 0; e < b_constr.datalen; e++) {
- uint32_t b_conv_30 = b_vals[e];
- LDKC2Tuple_u32ScriptZ b_conv_30_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_30) & ~1);
- b_conv_30_conv = C2Tuple_u32ScriptZ_clone((LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_30) & ~1));
- b_constr.data[e] = b_conv_30_conv;
+ for (size_t v = 0; v < b_constr.datalen; v++) {
+ uint32_t b_conv_21 = b_vals[v];
+ LDKC2Tuple_u32ScriptZ b_conv_21_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_21) & ~1);
+ b_conv_21_conv = C2Tuple_u32ScriptZ_clone((LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_21) & ~1));
+ b_constr.data[v] = b_conv_21_conv;
}
ret->b = b_constr;
return (uint64_t)ret;
}
-int8_tArray __attribute__((visibility("default"))) TS_LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(uint32_t ptr) {
- LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *tuple = (LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(ptr & ~1);
- int8_tArray a_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
- memcpy((uint8_t*)(a_arr + 4), tuple->a.data, 32);
- return a_arr;
+static inline struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR tuple){
+ return ThirtyTwoBytes_clone(&tuple->a);
+}
+int8_tArray __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(uint32_t tuple) {
+ LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* tuple_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(tuple & ~1);
+ int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+ memcpy((uint8_t*)(ret_arr + 4), C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(tuple_conv).data, 32);
+ return ret_arr;
+}
+
+static inline struct LDKCVec_C2Tuple_u32ScriptZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR tuple){
+ return CVec_C2Tuple_u32ScriptZZ_clone(&tuple->b);
}
-uint32_tArray __attribute__((visibility("default"))) TS_LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(uint32_t ptr) {
- LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *tuple = (LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(ptr & ~1);
- LDKCVec_C2Tuple_u32ScriptZZ b_var = tuple->b;
- uint32_tArray b_arr = init_arr(b_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
- uint32_t *b_arr_ptr = (uint32_t*)(b_arr + 4);
- for (size_t e = 0; e < b_var.datalen; e++) {
- uint64_t b_conv_30_ref = (uint64_t)(&b_var.data[e]) | 1;
- b_arr_ptr[e] = b_conv_30_ref;
+uint32_tArray __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(uint32_t tuple) {
+ LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* tuple_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(tuple & ~1);
+ LDKCVec_C2Tuple_u32ScriptZZ ret_var = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(tuple_conv);
+ uint32_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
+ uint32_t *ret_arr_ptr = (uint32_t*)(ret_arr + 4);
+ for (size_t v = 0; v < ret_var.datalen; v++) {
+ LDKC2Tuple_u32ScriptZ* ret_conv_21_conv = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
+ *ret_conv_21_conv = ret_var.data[v];
+ ret_arr_ptr[v] = ((uint64_t)ret_conv_21_conv);
}
- return b_arr;
+ FREE(ret_var.data);
+ return ret_arr;
}
+
uint32_t __attribute__((visibility("default"))) TS_LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_new(uint32_tArray elems) {
LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ), "LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ");
ret->datalen = *((uint32_t*)elems);
ret->b = b_conv;
return (uint64_t)ret;
}
-int32_t __attribute__((visibility("default"))) TS_LDKC2Tuple_u32TxOutZ_get_a(uint32_t ptr) {
- LDKC2Tuple_u32TxOutZ *tuple = (LDKC2Tuple_u32TxOutZ*)(ptr & ~1);
+static inline uint32_t C2Tuple_u32TxOutZ_get_a(LDKC2Tuple_u32TxOutZ *NONNULL_PTR tuple){
return tuple->a;
}
-uint32_t __attribute__((visibility("default"))) TS_LDKC2Tuple_u32TxOutZ_get_b(uint32_t ptr) {
- LDKC2Tuple_u32TxOutZ *tuple = (LDKC2Tuple_u32TxOutZ*)(ptr & ~1);
- uint64_t b_ref = ((uint64_t)&tuple->b) | 1;
- return (uint64_t)b_ref;
+int32_t __attribute__((visibility("default"))) TS_C2Tuple_u32TxOutZ_get_a(uint32_t tuple) {
+ LDKC2Tuple_u32TxOutZ* tuple_conv = (LDKC2Tuple_u32TxOutZ*)(tuple & ~1);
+ int32_t ret_val = C2Tuple_u32TxOutZ_get_a(tuple_conv);
+ return ret_val;
+}
+
+static inline struct LDKTxOut C2Tuple_u32TxOutZ_get_b(LDKC2Tuple_u32TxOutZ *NONNULL_PTR tuple){
+ return TxOut_clone(&tuple->b);
+}
+uint32_t __attribute__((visibility("default"))) TS_C2Tuple_u32TxOutZ_get_b(uint32_t tuple) {
+ LDKC2Tuple_u32TxOutZ* tuple_conv = (LDKC2Tuple_u32TxOutZ*)(tuple & ~1);
+ LDKTxOut* ret_ref = MALLOC(sizeof(LDKTxOut), "LDKTxOut");
+ *ret_ref = C2Tuple_u32TxOutZ_get_b(tuple_conv);
+ return (uint64_t)ret_ref;
}
+
uint32_t __attribute__((visibility("default"))) TS_LDKCVec_C2Tuple_u32TxOutZZ_new(uint32_tArray elems) {
LDKCVec_C2Tuple_u32TxOutZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_u32TxOutZZ), "LDKCVec_C2Tuple_u32TxOutZZ");
ret->datalen = *((uint32_t*)elems);
else
b_constr.data = NULL;
uint32_t* b_vals = (uint32_t*)(b + 4);
- for (size_t z = 0; z < b_constr.datalen; z++) {
- uint32_t b_conv_25 = b_vals[z];
- LDKC2Tuple_u32TxOutZ b_conv_25_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_25) & ~1);
- b_conv_25_conv = C2Tuple_u32TxOutZ_clone((LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_25) & ~1));
- b_constr.data[z] = b_conv_25_conv;
+ for (size_t u = 0; u < b_constr.datalen; u++) {
+ uint32_t b_conv_20 = b_vals[u];
+ LDKC2Tuple_u32TxOutZ b_conv_20_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_20) & ~1);
+ b_conv_20_conv = C2Tuple_u32TxOutZ_clone((LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_20) & ~1));
+ b_constr.data[u] = b_conv_20_conv;
}
ret->b = b_constr;
return (uint64_t)ret;
}
-int8_tArray __attribute__((visibility("default"))) TS_LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(uint32_t ptr) {
- LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *tuple = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(ptr & ~1);
- int8_tArray a_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
- memcpy((uint8_t*)(a_arr + 4), tuple->a.data, 32);
- return a_arr;
+static inline struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR tuple){
+ return ThirtyTwoBytes_clone(&tuple->a);
+}
+int8_tArray __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(uint32_t tuple) {
+ LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* tuple_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(tuple & ~1);
+ int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+ memcpy((uint8_t*)(ret_arr + 4), C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(tuple_conv).data, 32);
+ return ret_arr;
+}
+
+static inline struct LDKCVec_C2Tuple_u32TxOutZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR tuple){
+ return CVec_C2Tuple_u32TxOutZZ_clone(&tuple->b);
}
-uint32_tArray __attribute__((visibility("default"))) TS_LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(uint32_t ptr) {
- LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *tuple = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(ptr & ~1);
- LDKCVec_C2Tuple_u32TxOutZZ b_var = tuple->b;
- uint32_tArray b_arr = init_arr(b_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
- uint32_t *b_arr_ptr = (uint32_t*)(b_arr + 4);
- for (size_t z = 0; z < b_var.datalen; z++) {
- uint64_t b_conv_25_ref = (uint64_t)(&b_var.data[z]) | 1;
- b_arr_ptr[z] = b_conv_25_ref;
+uint32_tArray __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(uint32_t tuple) {
+ LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* tuple_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(tuple & ~1);
+ LDKCVec_C2Tuple_u32TxOutZZ ret_var = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(tuple_conv);
+ uint32_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
+ uint32_t *ret_arr_ptr = (uint32_t*)(ret_arr + 4);
+ for (size_t u = 0; u < ret_var.datalen; u++) {
+ LDKC2Tuple_u32TxOutZ* ret_conv_20_conv = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
+ *ret_conv_20_conv = ret_var.data[u];
+ ret_arr_ptr[u] = ((uint64_t)ret_conv_20_conv);
}
- return b_arr;
+ FREE(ret_var.data);
+ return ret_arr;
}
+
uint32_t __attribute__((visibility("default"))) TS_LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_new(uint32_tArray elems) {
LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ), "LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ");
ret->datalen = *((uint32_t*)elems);
uint32_t __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(uint32_t arg) {
LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)(arg & ~1);
CHECK(val->result_ok);
- uint64_t res_ref = (uint64_t)(&(*val->contents.result)) | 1;
- return res_ref;
+ LDKC2Tuple_BlockHashChannelMonitorZ* res_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
+ *res_conv = (*val->contents.result);
+ *res_conv = C2Tuple_BlockHashChannelMonitorZ_clone(res_conv);
+ return ((uint64_t)res_conv);
}
uint32_t __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(uint32_t arg) {
LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)(arg & ~1);
ret->b = b_conv;
return (uint64_t)ret;
}
-int8_tArray __attribute__((visibility("default"))) TS_LDKC2Tuple_PublicKeyTypeZ_get_a(uint32_t ptr) {
- LDKC2Tuple_PublicKeyTypeZ *tuple = (LDKC2Tuple_PublicKeyTypeZ*)(ptr & ~1);
- int8_tArray a_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
- memcpy((uint8_t*)(a_arr + 4), tuple->a.compressed_form, 33);
- return a_arr;
+static inline struct LDKPublicKey C2Tuple_PublicKeyTypeZ_get_a(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR tuple){
+ return tuple->a;
+}
+int8_tArray __attribute__((visibility("default"))) TS_C2Tuple_PublicKeyTypeZ_get_a(uint32_t tuple) {
+ LDKC2Tuple_PublicKeyTypeZ* tuple_conv = (LDKC2Tuple_PublicKeyTypeZ*)(tuple & ~1);
+ int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+ memcpy((uint8_t*)(ret_arr + 4), C2Tuple_PublicKeyTypeZ_get_a(tuple_conv).compressed_form, 33);
+ return ret_arr;
}
-uint32_t __attribute__((visibility("default"))) TS_LDKC2Tuple_PublicKeyTypeZ_get_b(uint32_t ptr) {
- LDKC2Tuple_PublicKeyTypeZ *tuple = (LDKC2Tuple_PublicKeyTypeZ*)(ptr & ~1);
- LDKType* b_ret =MALLOC(sizeof(LDKType), "LDKType");
- *b_ret = Type_clone(&tuple->b);
- return (uint64_t)b_ret;
+
+static inline struct LDKType C2Tuple_PublicKeyTypeZ_get_b(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR tuple){
+ return Type_clone(&tuple->b);
}
+uint32_t __attribute__((visibility("default"))) TS_C2Tuple_PublicKeyTypeZ_get_b(uint32_t tuple) {
+ LDKC2Tuple_PublicKeyTypeZ* tuple_conv = (LDKC2Tuple_PublicKeyTypeZ*)(tuple & ~1);
+ LDKType* ret_ret =MALLOC(sizeof(LDKType), "LDKType");
+ *ret_ret = C2Tuple_PublicKeyTypeZ_get_b(tuple_conv);
+ return (uint64_t)ret_ret;
+}
+
uint32_t __attribute__((visibility("default"))) TS_LDKCVec_C2Tuple_PublicKeyTypeZZ_new(uint32_tArray elems) {
LDKCVec_C2Tuple_PublicKeyTypeZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_PublicKeyTypeZZ), "LDKCVec_C2Tuple_PublicKeyTypeZZ");
ret->datalen = *((uint32_t*)elems);
ret->c = c_conv;
return (uint64_t)ret;
}
-uint32_t __attribute__((visibility("default"))) TS_LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(uint32_t ptr) {
- LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *tuple = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(ptr & ~1);
- LDKChannelAnnouncement a_var = tuple->a;
- CHECK((((uint64_t)a_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&a_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- uint64_t a_ref = (uint64_t)a_var.inner & ~1;
- return a_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(uint32_t ptr) {
- LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *tuple = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(ptr & ~1);
- LDKChannelUpdate b_var = tuple->b;
- CHECK((((uint64_t)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- uint64_t b_ref = (uint64_t)b_var.inner & ~1;
- return b_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(uint32_t ptr) {
- LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *tuple = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(ptr & ~1);
- LDKChannelUpdate c_var = tuple->c;
- CHECK((((uint64_t)c_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&c_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- uint64_t c_ref = (uint64_t)c_var.inner & ~1;
- return c_ref;
+static inline struct LDKChannelAnnouncement C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple){
+ return ChannelAnnouncement_clone(&tuple->a);
+}
+uint32_t __attribute__((visibility("default"))) TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(uint32_t tuple) {
+ LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* tuple_conv = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(tuple & ~1);
+ LDKChannelAnnouncement ret_var = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(tuple_conv);
+ CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ uint64_t ret_ref = (uint64_t)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
+static inline struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple){
+ return ChannelUpdate_clone(&tuple->b);
}
+uint32_t __attribute__((visibility("default"))) TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(uint32_t tuple) {
+ LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* tuple_conv = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(tuple & ~1);
+ LDKChannelUpdate ret_var = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(tuple_conv);
+ CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ uint64_t ret_ref = (uint64_t)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
+static inline struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple){
+ return ChannelUpdate_clone(&tuple->c);
+}
+uint32_t __attribute__((visibility("default"))) TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(uint32_t tuple) {
+ LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* tuple_conv = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(tuple & ~1);
+ LDKChannelUpdate ret_var = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(tuple_conv);
+ CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ uint64_t ret_ref = (uint64_t)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
uint32_t __attribute__((visibility("default"))) TS_LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new(uint32_tArray elems) {
LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ *ret = MALLOC(sizeof(LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ), "LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ");
ret->datalen = *((uint32_t*)elems);
LDKCVec_C2Tuple_usizeTransactionZZ txdata_var = txdata;
uint32_tArray txdata_arr = init_arr(txdata_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
uint32_t *txdata_arr_ptr = (uint32_t*)(txdata_arr + 4);
- for (size_t e = 0; e < txdata_var.datalen; e++) {
- LDKC2Tuple_usizeTransactionZ* txdata_conv_30_ref = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
- *txdata_conv_30_ref = txdata_var.data[e];
- txdata_arr_ptr[e] = (uint64_t)txdata_conv_30_ref;
+ for (size_t c = 0; c < txdata_var.datalen; c++) {
+ LDKC2Tuple_usizeTransactionZ* txdata_conv_28_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
+ *txdata_conv_28_conv = txdata_var.data[c];
+ txdata_arr_ptr[c] = ((uint64_t)txdata_conv_28_conv);
}
FREE(txdata_var.data);
js_invoke_function_3(j_calls->transactions_confirmed_meth, header_arr, txdata_arr, height);
else
txdata_constr.data = NULL;
uint32_t* txdata_vals = (uint32_t*)(txdata + 4);
- for (size_t e = 0; e < txdata_constr.datalen; e++) {
- uint32_t txdata_conv_30 = txdata_vals[e];
- LDKC2Tuple_usizeTransactionZ txdata_conv_30_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_30) & ~1);
- txdata_conv_30_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_30) & ~1));
- txdata_constr.data[e] = txdata_conv_30_conv;
+ for (size_t c = 0; c < txdata_constr.datalen; c++) {
+ uint32_t txdata_conv_28 = txdata_vals[c];
+ LDKC2Tuple_usizeTransactionZ txdata_conv_28_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1);
+ txdata_conv_28_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1));
+ txdata_constr.data[c] = txdata_conv_28_conv;
}
(this_arg_conv->transactions_confirmed)(this_arg_conv->this_arg, header_ref, txdata_constr, height);
}
else
ret_constr.data = NULL;
uint32_t* ret_vals = (uint32_t*)(ret + 4);
- for (size_t l = 0; l < ret_constr.datalen; l++) {
- uint32_t ret_conv_63 = ret_vals[l];
- LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ ret_conv_63_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)ret_conv_63) & ~1);
- ret_conv_63_conv = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone((LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)ret_conv_63) & ~1));
- ret_constr.data[l] = ret_conv_63_conv;
+ for (size_t h = 0; h < ret_constr.datalen; h++) {
+ uint32_t ret_conv_59 = ret_vals[h];
+ LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ ret_conv_59_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)ret_conv_59) & ~1);
+ ret_conv_59_conv = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone((LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)ret_conv_59) & ~1));
+ ret_constr.data[h] = ret_conv_59_conv;
}
return ret_constr;
}
LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ ret_var = (this_arg_conv->get_next_channel_announcements)(this_arg_conv->this_arg, starting_point, batch_amount);
uint32_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
uint32_t *ret_arr_ptr = (uint32_t*)(ret_arr + 4);
- for (size_t l = 0; l < ret_var.datalen; l++) {
- LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_conv_63_ref = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
- *ret_conv_63_ref = ret_var.data[l];
- ret_arr_ptr[l] = (uint64_t)ret_conv_63_ref;
+ for (size_t h = 0; h < ret_var.datalen; h++) {
+ LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_conv_59_conv = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
+ *ret_conv_59_conv = ret_var.data[h];
+ ret_arr_ptr[h] = ((uint64_t)ret_conv_59_conv);
}
FREE(ret_var.data);
return ret_arr;
else
ret_constr.data = NULL;
uint32_t* ret_vals = (uint32_t*)(ret + 4);
- for (size_t c = 0; c < ret_constr.datalen; c++) {
- uint32_t ret_conv_28 = ret_vals[c];
- LDKC2Tuple_PublicKeyTypeZ ret_conv_28_conv = *(LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)ret_conv_28) & ~1);
- ret_conv_28_conv = C2Tuple_PublicKeyTypeZ_clone((LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)ret_conv_28) & ~1));
- ret_constr.data[c] = ret_conv_28_conv;
+ for (size_t z = 0; z < ret_constr.datalen; z++) {
+ uint32_t ret_conv_25 = ret_vals[z];
+ LDKC2Tuple_PublicKeyTypeZ ret_conv_25_conv = *(LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)ret_conv_25) & ~1);
+ ret_conv_25_conv = C2Tuple_PublicKeyTypeZ_clone((LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)ret_conv_25) & ~1));
+ ret_constr.data[z] = ret_conv_25_conv;
}
return ret_constr;
}
LDKCVec_C2Tuple_PublicKeyTypeZZ ret_var = (this_arg_conv->get_and_clear_pending_msg)(this_arg_conv->this_arg);
uint32_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
uint32_t *ret_arr_ptr = (uint32_t*)(ret_arr + 4);
- for (size_t c = 0; c < ret_var.datalen; c++) {
- LDKC2Tuple_PublicKeyTypeZ* ret_conv_28_ref = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
- *ret_conv_28_ref = ret_var.data[c];
- ret_arr_ptr[c] = (uint64_t)ret_conv_28_ref;
+ for (size_t z = 0; z < ret_var.datalen; z++) {
+ LDKC2Tuple_PublicKeyTypeZ* ret_conv_25_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
+ *ret_conv_25_conv = ret_var.data[z];
+ ret_arr_ptr[z] = ((uint64_t)ret_conv_25_conv);
}
FREE(ret_var.data);
return ret_arr;
uint32_t __attribute__((visibility("default"))) TS_C2Tuple_usizeTransactionZ_clone(uint32_t orig) {
LDKC2Tuple_usizeTransactionZ* orig_conv = (LDKC2Tuple_usizeTransactionZ*)(orig & ~1);
- LDKC2Tuple_usizeTransactionZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
- *ret_ref = C2Tuple_usizeTransactionZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_usizeTransactionZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
+ *ret_conv = C2Tuple_usizeTransactionZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
uint32_t __attribute__((visibility("default"))) TS_C2Tuple_usizeTransactionZ_new(int64_t a, int8_tArray b) {
b_ref.data = MALLOC(b_ref.datalen, "LDKTransaction Bytes");
memcpy(b_ref.data, (uint8_t*)(b + 4), b_ref.datalen);
b_ref.data_is_owned = true;
- LDKC2Tuple_usizeTransactionZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
- *ret_ref = C2Tuple_usizeTransactionZ_new(a, b_ref);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_usizeTransactionZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
+ *ret_conv = C2Tuple_usizeTransactionZ_new(a, b_ref);
+ return ((uint64_t)ret_conv);
}
void __attribute__((visibility("default"))) TS_C2Tuple_usizeTransactionZ_free(uint32_t _res) {
else
_res_constr.data = NULL;
uint32_t* _res_vals = (uint32_t*)(_res + 4);
- for (size_t e = 0; e < _res_constr.datalen; e++) {
- uint32_t _res_conv_30 = _res_vals[e];
- LDKC2Tuple_usizeTransactionZ _res_conv_30_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)_res_conv_30) & ~1);
- FREE((void*)_res_conv_30);
- _res_constr.data[e] = _res_conv_30_conv;
+ for (size_t c = 0; c < _res_constr.datalen; c++) {
+ uint32_t _res_conv_28 = _res_vals[c];
+ LDKC2Tuple_usizeTransactionZ _res_conv_28_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)_res_conv_28) & ~1);
+ FREE((void*)_res_conv_28);
+ _res_constr.data[c] = _res_conv_28_conv;
}
CVec_C2Tuple_usizeTransactionZZ_free(_res_constr);
}
uint32_t __attribute__((visibility("default"))) TS_C2Tuple_SignatureCVec_SignatureZZ_clone(uint32_t orig) {
LDKC2Tuple_SignatureCVec_SignatureZZ* orig_conv = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(orig & ~1);
- LDKC2Tuple_SignatureCVec_SignatureZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
- *ret_ref = C2Tuple_SignatureCVec_SignatureZZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_SignatureCVec_SignatureZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
+ *ret_conv = C2Tuple_SignatureCVec_SignatureZZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
uint32_t __attribute__((visibility("default"))) TS_C2Tuple_SignatureCVec_SignatureZZ_new(int8_tArray a, ptrArray b) {
memcpy(b_conv_12_ref.compact_form, (uint8_t*)(b_conv_12 + 4), 64);
b_constr.data[m] = b_conv_12_ref;
}
- LDKC2Tuple_SignatureCVec_SignatureZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
- *ret_ref = C2Tuple_SignatureCVec_SignatureZZ_new(a_ref, b_constr);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_SignatureCVec_SignatureZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
+ *ret_conv = C2Tuple_SignatureCVec_SignatureZZ_new(a_ref, b_constr);
+ return ((uint64_t)ret_conv);
}
void __attribute__((visibility("default"))) TS_C2Tuple_SignatureCVec_SignatureZZ_free(uint32_t _res) {
return (uint64_t)ret_conv;
}
+uint32_t __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelMonitorZ_clone(uint32_t orig) {
+ LDKC2Tuple_BlockHashChannelMonitorZ* orig_conv = (LDKC2Tuple_BlockHashChannelMonitorZ*)(orig & ~1);
+ LDKC2Tuple_BlockHashChannelMonitorZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
+ *ret_conv = C2Tuple_BlockHashChannelMonitorZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
+}
+
uint32_t __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelMonitorZ_new(int8_tArray a, uint32_t b) {
LDKThirtyTwoBytes a_ref;
CHECK(*((uint32_t*)a) == 32);
b_conv.inner = (void*)(b & (~1));
b_conv.is_owned = (b & 1) || (b == 0);
b_conv = ChannelMonitor_clone(&b_conv);
- LDKC2Tuple_BlockHashChannelMonitorZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
- *ret_ref = C2Tuple_BlockHashChannelMonitorZ_new(a_ref, b_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_BlockHashChannelMonitorZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
+ *ret_conv = C2Tuple_BlockHashChannelMonitorZ_new(a_ref, b_conv);
+ return ((uint64_t)ret_conv);
}
void __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelMonitorZ_free(uint32_t _res) {
else
_res_constr.data = NULL;
uint32_t* _res_vals = (uint32_t*)(_res + 4);
- for (size_t m = 0; m < _res_constr.datalen; m++) {
- uint32_t _res_conv_38 = _res_vals[m];
- LDKC2Tuple_BlockHashChannelMonitorZ _res_conv_38_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)_res_conv_38) & ~1);
- FREE((void*)_res_conv_38);
- _res_constr.data[m] = _res_conv_38_conv;
+ for (size_t j = 0; j < _res_constr.datalen; j++) {
+ uint32_t _res_conv_35 = _res_vals[j];
+ LDKC2Tuple_BlockHashChannelMonitorZ _res_conv_35_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)_res_conv_35) & ~1);
+ FREE((void*)_res_conv_35);
+ _res_constr.data[j] = _res_conv_35_conv;
}
CVec_C2Tuple_BlockHashChannelMonitorZZ_free(_res_constr);
}
else
o_constr.data = NULL;
uint32_t* o_vals = (uint32_t*)(o + 4);
- for (size_t m = 0; m < o_constr.datalen; m++) {
- uint32_t o_conv_38 = o_vals[m];
- LDKC2Tuple_BlockHashChannelMonitorZ o_conv_38_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o_conv_38) & ~1);
- // Warning: we may need a move here but no clone is available for LDKC2Tuple_BlockHashChannelMonitorZ
- o_constr.data[m] = o_conv_38_conv;
+ for (size_t j = 0; j < o_constr.datalen; j++) {
+ uint32_t o_conv_35 = o_vals[j];
+ LDKC2Tuple_BlockHashChannelMonitorZ o_conv_35_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o_conv_35) & ~1);
+ o_conv_35_conv = C2Tuple_BlockHashChannelMonitorZ_clone((LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o_conv_35) & ~1));
+ o_constr.data[j] = o_conv_35_conv;
}
LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ), "LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ");
*ret_conv = CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(o_constr);
CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(_res_conv);
}
+uint32_t __attribute__((visibility("default"))) TS_CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(uint32_t orig) {
+ LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ* orig_conv = (LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ*)(orig & ~1);
+ LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ), "LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ");
+ *ret_conv = CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(orig_conv);
+ return (uint64_t)ret_conv;
+}
+
uint32_t __attribute__((visibility("default"))) TS_COption_u16Z_some(int16_t o) {
LDKCOption_u16Z *ret_copy = MALLOC(sizeof(LDKCOption_u16Z), "LDKCOption_u16Z");
*ret_copy = COption_u16Z_some(o);
uint32_t __attribute__((visibility("default"))) TS_C2Tuple_PaymentHashPaymentSecretZ_clone(uint32_t orig) {
LDKC2Tuple_PaymentHashPaymentSecretZ* orig_conv = (LDKC2Tuple_PaymentHashPaymentSecretZ*)(orig & ~1);
- LDKC2Tuple_PaymentHashPaymentSecretZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
- *ret_ref = C2Tuple_PaymentHashPaymentSecretZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_PaymentHashPaymentSecretZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
+ *ret_conv = C2Tuple_PaymentHashPaymentSecretZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
uint32_t __attribute__((visibility("default"))) TS_C2Tuple_PaymentHashPaymentSecretZ_new(int8_tArray a, int8_tArray b) {
LDKThirtyTwoBytes b_ref;
CHECK(*((uint32_t*)b) == 32);
memcpy(b_ref.data, (uint8_t*)(b + 4), 32);
- LDKC2Tuple_PaymentHashPaymentSecretZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
- *ret_ref = C2Tuple_PaymentHashPaymentSecretZ_new(a_ref, b_ref);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_PaymentHashPaymentSecretZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
+ *ret_conv = C2Tuple_PaymentHashPaymentSecretZ_new(a_ref, b_ref);
+ return ((uint64_t)ret_conv);
}
void __attribute__((visibility("default"))) TS_C2Tuple_PaymentHashPaymentSecretZ_free(uint32_t _res) {
b_conv.inner = (void*)(b & (~1));
b_conv.is_owned = (b & 1) || (b == 0);
// Warning: we need a move here but no clone is available for LDKChannelManager
- LDKC2Tuple_BlockHashChannelManagerZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelManagerZ), "LDKC2Tuple_BlockHashChannelManagerZ");
- *ret_ref = C2Tuple_BlockHashChannelManagerZ_new(a_ref, b_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_BlockHashChannelManagerZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelManagerZ), "LDKC2Tuple_BlockHashChannelManagerZ");
+ *ret_conv = C2Tuple_BlockHashChannelManagerZ_new(a_ref, b_conv);
+ return ((uint64_t)ret_conv);
}
void __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelManagerZ_free(uint32_t _res) {
uint32_t __attribute__((visibility("default"))) TS_C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(uint32_t orig) {
LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* orig_conv = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(orig & ~1);
- LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
- *ret_ref = C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
+ *ret_conv = C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
uint32_t __attribute__((visibility("default"))) TS_C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(uint32_t a, int8_tArray b, uint32_t c) {
c_conv.inner = (void*)(c & (~1));
c_conv.is_owned = (c & 1) || (c == 0);
c_conv = InvoiceSignature_clone(&c_conv);
- LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
- *ret_ref = C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(a_conv, b_ref, c_conv);
- return (uint64_t)ret_ref;
+ LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
+ *ret_conv = C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(a_conv, b_ref, c_conv);
+ return ((uint64_t)ret_conv);
}
void __attribute__((visibility("default"))) TS_C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(uint32_t _res) {
uint32_t __attribute__((visibility("default"))) TS_C2Tuple_OutPointScriptZ_clone(uint32_t orig) {
LDKC2Tuple_OutPointScriptZ* orig_conv = (LDKC2Tuple_OutPointScriptZ*)(orig & ~1);
- LDKC2Tuple_OutPointScriptZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
- *ret_ref = C2Tuple_OutPointScriptZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_OutPointScriptZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
+ *ret_conv = C2Tuple_OutPointScriptZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
uint32_t __attribute__((visibility("default"))) TS_C2Tuple_OutPointScriptZ_new(uint32_t a, int8_tArray b) {
b_ref.datalen = *((uint32_t*)b);
b_ref.data = MALLOC(b_ref.datalen, "LDKCVec_u8Z Bytes");
memcpy(b_ref.data, (uint8_t*)(b + 4), b_ref.datalen);
- LDKC2Tuple_OutPointScriptZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
- *ret_ref = C2Tuple_OutPointScriptZ_new(a_conv, b_ref);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_OutPointScriptZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
+ *ret_conv = C2Tuple_OutPointScriptZ_new(a_conv, b_ref);
+ return ((uint64_t)ret_conv);
}
void __attribute__((visibility("default"))) TS_C2Tuple_OutPointScriptZ_free(uint32_t _res) {
uint32_t __attribute__((visibility("default"))) TS_C2Tuple_u32ScriptZ_clone(uint32_t orig) {
LDKC2Tuple_u32ScriptZ* orig_conv = (LDKC2Tuple_u32ScriptZ*)(orig & ~1);
- LDKC2Tuple_u32ScriptZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
- *ret_ref = C2Tuple_u32ScriptZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_u32ScriptZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
+ *ret_conv = C2Tuple_u32ScriptZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
uint32_t __attribute__((visibility("default"))) TS_C2Tuple_u32ScriptZ_new(int32_t a, int8_tArray b) {
b_ref.datalen = *((uint32_t*)b);
b_ref.data = MALLOC(b_ref.datalen, "LDKCVec_u8Z Bytes");
memcpy(b_ref.data, (uint8_t*)(b + 4), b_ref.datalen);
- LDKC2Tuple_u32ScriptZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
- *ret_ref = C2Tuple_u32ScriptZ_new(a, b_ref);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_u32ScriptZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
+ *ret_conv = C2Tuple_u32ScriptZ_new(a, b_ref);
+ return ((uint64_t)ret_conv);
}
void __attribute__((visibility("default"))) TS_C2Tuple_u32ScriptZ_free(uint32_t _res) {
else
_res_constr.data = NULL;
uint32_t* _res_vals = (uint32_t*)(_res + 4);
- for (size_t e = 0; e < _res_constr.datalen; e++) {
- uint32_t _res_conv_30 = _res_vals[e];
- LDKC2Tuple_u32ScriptZ _res_conv_30_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)_res_conv_30) & ~1);
- FREE((void*)_res_conv_30);
- _res_constr.data[e] = _res_conv_30_conv;
+ for (size_t v = 0; v < _res_constr.datalen; v++) {
+ uint32_t _res_conv_21 = _res_vals[v];
+ LDKC2Tuple_u32ScriptZ _res_conv_21_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)_res_conv_21) & ~1);
+ FREE((void*)_res_conv_21);
+ _res_constr.data[v] = _res_conv_21_conv;
}
CVec_C2Tuple_u32ScriptZZ_free(_res_constr);
}
uint32_t __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(uint32_t orig) {
LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* orig_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(orig & ~1);
- LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
- *ret_ref = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
+ *ret_conv = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
uint32_t __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(int8_tArray a, uint32_tArray b) {
else
b_constr.data = NULL;
uint32_t* b_vals = (uint32_t*)(b + 4);
- for (size_t e = 0; e < b_constr.datalen; e++) {
- uint32_t b_conv_30 = b_vals[e];
- LDKC2Tuple_u32ScriptZ b_conv_30_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_30) & ~1);
- b_conv_30_conv = C2Tuple_u32ScriptZ_clone((LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_30) & ~1));
- b_constr.data[e] = b_conv_30_conv;
- }
- LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
- *ret_ref = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a_ref, b_constr);
- return (uint64_t)ret_ref;
+ for (size_t v = 0; v < b_constr.datalen; v++) {
+ uint32_t b_conv_21 = b_vals[v];
+ LDKC2Tuple_u32ScriptZ b_conv_21_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_21) & ~1);
+ b_conv_21_conv = C2Tuple_u32ScriptZ_clone((LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_21) & ~1));
+ b_constr.data[v] = b_conv_21_conv;
+ }
+ LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
+ *ret_conv = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a_ref, b_constr);
+ return ((uint64_t)ret_conv);
}
void __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(uint32_t _res) {
else
_res_constr.data = NULL;
uint32_t* _res_vals = (uint32_t*)(_res + 4);
- for (size_t c = 0; c < _res_constr.datalen; c++) {
- uint32_t _res_conv_54 = _res_vals[c];
- LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res_conv_54_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(((uint64_t)_res_conv_54) & ~1);
- FREE((void*)_res_conv_54);
- _res_constr.data[c] = _res_conv_54_conv;
+ for (size_t o = 0; o < _res_constr.datalen; o++) {
+ uint32_t _res_conv_40 = _res_vals[o];
+ LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res_conv_40_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(((uint64_t)_res_conv_40) & ~1);
+ FREE((void*)_res_conv_40);
+ _res_constr.data[o] = _res_conv_40_conv;
}
CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res_constr);
}
uint32_t __attribute__((visibility("default"))) TS_C2Tuple_u32TxOutZ_clone(uint32_t orig) {
LDKC2Tuple_u32TxOutZ* orig_conv = (LDKC2Tuple_u32TxOutZ*)(orig & ~1);
- LDKC2Tuple_u32TxOutZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
- *ret_ref = C2Tuple_u32TxOutZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_u32TxOutZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
+ *ret_conv = C2Tuple_u32TxOutZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
uint32_t __attribute__((visibility("default"))) TS_C2Tuple_u32TxOutZ_new(int32_t a, uint32_t b) {
LDKTxOut b_conv = *(LDKTxOut*)(((uint64_t)b) & ~1);
b_conv = TxOut_clone((LDKTxOut*)(((uint64_t)b) & ~1));
- LDKC2Tuple_u32TxOutZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
- *ret_ref = C2Tuple_u32TxOutZ_new(a, b_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_u32TxOutZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
+ *ret_conv = C2Tuple_u32TxOutZ_new(a, b_conv);
+ return ((uint64_t)ret_conv);
}
void __attribute__((visibility("default"))) TS_C2Tuple_u32TxOutZ_free(uint32_t _res) {
else
_res_constr.data = NULL;
uint32_t* _res_vals = (uint32_t*)(_res + 4);
- for (size_t z = 0; z < _res_constr.datalen; z++) {
- uint32_t _res_conv_25 = _res_vals[z];
- LDKC2Tuple_u32TxOutZ _res_conv_25_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)_res_conv_25) & ~1);
- FREE((void*)_res_conv_25);
- _res_constr.data[z] = _res_conv_25_conv;
+ for (size_t u = 0; u < _res_constr.datalen; u++) {
+ uint32_t _res_conv_20 = _res_vals[u];
+ LDKC2Tuple_u32TxOutZ _res_conv_20_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)_res_conv_20) & ~1);
+ FREE((void*)_res_conv_20);
+ _res_constr.data[u] = _res_conv_20_conv;
}
CVec_C2Tuple_u32TxOutZZ_free(_res_constr);
}
uint32_t __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(uint32_t orig) {
LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* orig_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(orig & ~1);
- LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
- *ret_ref = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+ *ret_conv = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
uint32_t __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(int8_tArray a, uint32_tArray b) {
else
b_constr.data = NULL;
uint32_t* b_vals = (uint32_t*)(b + 4);
- for (size_t z = 0; z < b_constr.datalen; z++) {
- uint32_t b_conv_25 = b_vals[z];
- LDKC2Tuple_u32TxOutZ b_conv_25_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_25) & ~1);
- b_conv_25_conv = C2Tuple_u32TxOutZ_clone((LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_25) & ~1));
- b_constr.data[z] = b_conv_25_conv;
- }
- LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
- *ret_ref = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a_ref, b_constr);
- return (uint64_t)ret_ref;
+ for (size_t u = 0; u < b_constr.datalen; u++) {
+ uint32_t b_conv_20 = b_vals[u];
+ LDKC2Tuple_u32TxOutZ b_conv_20_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_20) & ~1);
+ b_conv_20_conv = C2Tuple_u32TxOutZ_clone((LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_20) & ~1));
+ b_constr.data[u] = b_conv_20_conv;
+ }
+ LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+ *ret_conv = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a_ref, b_constr);
+ return ((uint64_t)ret_conv);
}
void __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(uint32_t _res) {
else
_res_constr.data = NULL;
uint32_t* _res_vals = (uint32_t*)(_res + 4);
- for (size_t x = 0; x < _res_constr.datalen; x++) {
- uint32_t _res_conv_49 = _res_vals[x];
- LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res_conv_49_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(((uint64_t)_res_conv_49) & ~1);
- FREE((void*)_res_conv_49);
- _res_constr.data[x] = _res_conv_49_conv;
+ for (size_t n = 0; n < _res_constr.datalen; n++) {
+ uint32_t _res_conv_39 = _res_vals[n];
+ LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res_conv_39_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(((uint64_t)_res_conv_39) & ~1);
+ FREE((void*)_res_conv_39);
+ _res_constr.data[n] = _res_conv_39_conv;
}
CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res_constr);
}
uint32_t __attribute__((visibility("default"))) TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(uint32_t o) {
LDKC2Tuple_BlockHashChannelMonitorZ o_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o) & ~1);
- // Warning: we may need a move here but no clone is available for LDKC2Tuple_BlockHashChannelMonitorZ
+ o_conv = C2Tuple_BlockHashChannelMonitorZ_clone((LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o) & ~1));
LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ");
*ret_conv = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o_conv);
return (uint64_t)ret_conv;
CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res_conv);
}
+uint32_t __attribute__((visibility("default"))) TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(uint32_t orig) {
+ LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* orig_conv = (LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)(orig & ~1);
+ LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ");
+ *ret_conv = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(orig_conv);
+ return (uint64_t)ret_conv;
+}
+
uint32_t __attribute__((visibility("default"))) TS_CResult_NoneLightningErrorZ_ok() {
LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
*ret_conv = CResult_NoneLightningErrorZ_ok();
uint32_t __attribute__((visibility("default"))) TS_C2Tuple_PublicKeyTypeZ_clone(uint32_t orig) {
LDKC2Tuple_PublicKeyTypeZ* orig_conv = (LDKC2Tuple_PublicKeyTypeZ*)(orig & ~1);
- LDKC2Tuple_PublicKeyTypeZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
- *ret_ref = C2Tuple_PublicKeyTypeZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_PublicKeyTypeZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
+ *ret_conv = C2Tuple_PublicKeyTypeZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
uint32_t __attribute__((visibility("default"))) TS_C2Tuple_PublicKeyTypeZ_new(int8_tArray a, uint32_t b) {
CHECK(*((uint32_t*)a) == 33);
memcpy(a_ref.compressed_form, (uint8_t*)(a + 4), 33);
LDKType b_conv = *(LDKType*)(((uint64_t)b) & ~1);
- LDKC2Tuple_PublicKeyTypeZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
- *ret_ref = C2Tuple_PublicKeyTypeZ_new(a_ref, b_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_PublicKeyTypeZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
+ *ret_conv = C2Tuple_PublicKeyTypeZ_new(a_ref, b_conv);
+ return ((uint64_t)ret_conv);
}
void __attribute__((visibility("default"))) TS_C2Tuple_PublicKeyTypeZ_free(uint32_t _res) {
else
_res_constr.data = NULL;
uint32_t* _res_vals = (uint32_t*)(_res + 4);
- for (size_t c = 0; c < _res_constr.datalen; c++) {
- uint32_t _res_conv_28 = _res_vals[c];
- LDKC2Tuple_PublicKeyTypeZ _res_conv_28_conv = *(LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)_res_conv_28) & ~1);
- FREE((void*)_res_conv_28);
- _res_constr.data[c] = _res_conv_28_conv;
+ for (size_t z = 0; z < _res_constr.datalen; z++) {
+ uint32_t _res_conv_25 = _res_vals[z];
+ LDKC2Tuple_PublicKeyTypeZ _res_conv_25_conv = *(LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)_res_conv_25) & ~1);
+ FREE((void*)_res_conv_25);
+ _res_constr.data[z] = _res_conv_25_conv;
}
CVec_C2Tuple_PublicKeyTypeZZ_free(_res_constr);
}
uint32_t __attribute__((visibility("default"))) TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(uint32_t orig) {
LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* orig_conv = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(orig & ~1);
- LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
- *ret_ref = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
+ *ret_conv = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
uint32_t __attribute__((visibility("default"))) TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(uint32_t a, uint32_t b, uint32_t c) {
c_conv.inner = (void*)(c & (~1));
c_conv.is_owned = (c & 1) || (c == 0);
c_conv = ChannelUpdate_clone(&c_conv);
- LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
- *ret_ref = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a_conv, b_conv, c_conv);
- return (uint64_t)ret_ref;
+ LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
+ *ret_conv = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a_conv, b_conv, c_conv);
+ return ((uint64_t)ret_conv);
}
void __attribute__((visibility("default"))) TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(uint32_t _res) {
else
_res_constr.data = NULL;
uint32_t* _res_vals = (uint32_t*)(_res + 4);
- for (size_t l = 0; l < _res_constr.datalen; l++) {
- uint32_t _res_conv_63 = _res_vals[l];
- LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res_conv_63_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)_res_conv_63) & ~1);
- FREE((void*)_res_conv_63);
- _res_constr.data[l] = _res_conv_63_conv;
+ for (size_t h = 0; h < _res_constr.datalen; h++) {
+ uint32_t _res_conv_59 = _res_vals[h];
+ LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res_conv_59_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)_res_conv_59) & ~1);
+ FREE((void*)_res_conv_59);
+ _res_constr.data[h] = _res_conv_59_conv;
}
CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res_constr);
}
LDKNetworkGraph o_conv;
o_conv.inner = (void*)(o & (~1));
o_conv.is_owned = (o & 1) || (o == 0);
- // Warning: we need a move here but no clone is available for LDKNetworkGraph
+ o_conv = NetworkGraph_clone(&o_conv);
LDKCResult_NetworkGraphDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetworkGraphDecodeErrorZ), "LDKCResult_NetworkGraphDecodeErrorZ");
*ret_conv = CResult_NetworkGraphDecodeErrorZ_ok(o_conv);
return (uint64_t)ret_conv;
CResult_NetworkGraphDecodeErrorZ_free(_res_conv);
}
+uint32_t __attribute__((visibility("default"))) TS_CResult_NetworkGraphDecodeErrorZ_clone(uint32_t orig) {
+ LDKCResult_NetworkGraphDecodeErrorZ* orig_conv = (LDKCResult_NetworkGraphDecodeErrorZ*)(orig & ~1);
+ LDKCResult_NetworkGraphDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetworkGraphDecodeErrorZ), "LDKCResult_NetworkGraphDecodeErrorZ");
+ *ret_conv = CResult_NetworkGraphDecodeErrorZ_clone(orig_conv);
+ return (uint64_t)ret_conv;
+}
+
uint32_t __attribute__((visibility("default"))) TS_CResult_NetAddressu8Z_ok(uint32_t o) {
LDKNetAddress o_conv = *(LDKNetAddress*)(((uint64_t)o) & ~1);
o_conv = NetAddress_clone((LDKNetAddress*)(((uint64_t)o) & ~1));
LDKChannelMonitor this_arg_conv;
this_arg_conv.inner = (void*)(this_arg & (~1));
this_arg_conv.is_owned = false;
- LDKC2Tuple_OutPointScriptZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
- *ret_ref = ChannelMonitor_get_funding_txo(&this_arg_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_OutPointScriptZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
+ *ret_conv = ChannelMonitor_get_funding_txo(&this_arg_conv);
+ return ((uint64_t)ret_conv);
}
uint32_tArray __attribute__((visibility("default"))) TS_ChannelMonitor_get_outputs_to_watch(uint32_t this_arg) {
LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ ret_var = ChannelMonitor_get_outputs_to_watch(&this_arg_conv);
uint32_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
uint32_t *ret_arr_ptr = (uint32_t*)(ret_arr + 4);
- for (size_t c = 0; c < ret_var.datalen; c++) {
- LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_conv_54_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
- *ret_conv_54_ref = ret_var.data[c];
- ret_arr_ptr[c] = (uint64_t)ret_conv_54_ref;
+ for (size_t o = 0; o < ret_var.datalen; o++) {
+ LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_conv_40_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
+ *ret_conv_40_conv = ret_var.data[o];
+ ret_arr_ptr[o] = ((uint64_t)ret_conv_40_conv);
}
FREE(ret_var.data);
return ret_arr;
else
txdata_constr.data = NULL;
uint32_t* txdata_vals = (uint32_t*)(txdata + 4);
- for (size_t e = 0; e < txdata_constr.datalen; e++) {
- uint32_t txdata_conv_30 = txdata_vals[e];
- LDKC2Tuple_usizeTransactionZ txdata_conv_30_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_30) & ~1);
- txdata_conv_30_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_30) & ~1));
- txdata_constr.data[e] = txdata_conv_30_conv;
+ for (size_t c = 0; c < txdata_constr.datalen; c++) {
+ uint32_t txdata_conv_28 = txdata_vals[c];
+ LDKC2Tuple_usizeTransactionZ txdata_conv_28_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1);
+ txdata_conv_28_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1));
+ txdata_constr.data[c] = txdata_conv_28_conv;
}
LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(((uint64_t)broadcaster) & ~1);
LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)(((uint64_t)fee_estimator) & ~1);
LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ret_var = ChannelMonitor_block_connected(&this_arg_conv, header_ref, txdata_constr, height, broadcaster_conv, fee_estimator_conv, logger_conv);
uint32_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
uint32_t *ret_arr_ptr = (uint32_t*)(ret_arr + 4);
- for (size_t x = 0; x < ret_var.datalen; x++) {
- LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_49_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
- *ret_conv_49_ref = ret_var.data[x];
- ret_arr_ptr[x] = (uint64_t)ret_conv_49_ref;
+ for (size_t n = 0; n < ret_var.datalen; n++) {
+ LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_39_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+ *ret_conv_39_conv = ret_var.data[n];
+ ret_arr_ptr[n] = ((uint64_t)ret_conv_39_conv);
}
FREE(ret_var.data);
return ret_arr;
else
txdata_constr.data = NULL;
uint32_t* txdata_vals = (uint32_t*)(txdata + 4);
- for (size_t e = 0; e < txdata_constr.datalen; e++) {
- uint32_t txdata_conv_30 = txdata_vals[e];
- LDKC2Tuple_usizeTransactionZ txdata_conv_30_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_30) & ~1);
- txdata_conv_30_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_30) & ~1));
- txdata_constr.data[e] = txdata_conv_30_conv;
+ for (size_t c = 0; c < txdata_constr.datalen; c++) {
+ uint32_t txdata_conv_28 = txdata_vals[c];
+ LDKC2Tuple_usizeTransactionZ txdata_conv_28_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1);
+ txdata_conv_28_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1));
+ txdata_constr.data[c] = txdata_conv_28_conv;
}
LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(((uint64_t)broadcaster) & ~1);
LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)(((uint64_t)fee_estimator) & ~1);
LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ret_var = ChannelMonitor_transactions_confirmed(&this_arg_conv, header_ref, txdata_constr, height, broadcaster_conv, fee_estimator_conv, logger_conv);
uint32_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
uint32_t *ret_arr_ptr = (uint32_t*)(ret_arr + 4);
- for (size_t x = 0; x < ret_var.datalen; x++) {
- LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_49_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
- *ret_conv_49_ref = ret_var.data[x];
- ret_arr_ptr[x] = (uint64_t)ret_conv_49_ref;
+ for (size_t n = 0; n < ret_var.datalen; n++) {
+ LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_39_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+ *ret_conv_39_conv = ret_var.data[n];
+ ret_arr_ptr[n] = ((uint64_t)ret_conv_39_conv);
}
FREE(ret_var.data);
return ret_arr;
LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ret_var = ChannelMonitor_best_block_updated(&this_arg_conv, header_ref, height, broadcaster_conv, fee_estimator_conv, logger_conv);
uint32_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
uint32_t *ret_arr_ptr = (uint32_t*)(ret_arr + 4);
- for (size_t x = 0; x < ret_var.datalen; x++) {
- LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_49_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
- *ret_conv_49_ref = ret_var.data[x];
- ret_arr_ptr[x] = (uint64_t)ret_conv_49_ref;
+ for (size_t n = 0; n < ret_var.datalen; n++) {
+ LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_39_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+ *ret_conv_39_conv = ret_var.data[n];
+ ret_arr_ptr[n] = ((uint64_t)ret_conv_39_conv);
}
FREE(ret_var.data);
return ret_arr;
this_arg_conv.is_owned = false;
LDKCOption_u64Z min_value_msat_conv = *(LDKCOption_u64Z*)(((uint64_t)min_value_msat) & ~1);
min_value_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)(((uint64_t)min_value_msat) & ~1));
- LDKC2Tuple_PaymentHashPaymentSecretZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
- *ret_ref = ChannelManager_create_inbound_payment(&this_arg_conv, min_value_msat_conv, invoice_expiry_delta_secs, user_payment_id);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_PaymentHashPaymentSecretZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
+ *ret_conv = ChannelManager_create_inbound_payment(&this_arg_conv, min_value_msat_conv, invoice_expiry_delta_secs, user_payment_id);
+ return ((uint64_t)ret_conv);
}
uint32_t __attribute__((visibility("default"))) TS_ChannelManager_create_inbound_payment_for_hash(uint32_t this_arg, int8_tArray payment_hash, uint32_t min_value_msat, int32_t invoice_expiry_delta_secs, int64_t user_payment_id) {
NetworkGraph_free(this_obj_conv);
}
+uint32_t __attribute__((visibility("default"))) TS_NetworkGraph_clone(uint32_t orig) {
+ LDKNetworkGraph orig_conv;
+ orig_conv.inner = (void*)(orig & (~1));
+ orig_conv.is_owned = false;
+ LDKNetworkGraph ret_var = NetworkGraph_clone(&orig_conv);
+ CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ uint64_t ret_ref = (uint64_t)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
void __attribute__((visibility("default"))) TS_ReadOnlyNetworkGraph_free(uint32_t this_obj) {
LDKReadOnlyNetworkGraph this_obj_conv;
this_obj_conv.inner = (void*)(this_obj & (~1));
LDKNetworkGraph val_conv;
val_conv.inner = (void*)(val & (~1));
val_conv.is_owned = (val & 1) || (val == 0);
- // Warning: we need a move here but no clone is available for LDKNetworkGraph
+ val_conv = NetworkGraph_clone(&val_conv);
NetGraphMsgHandler_set_network_graph(&this_ptr_conv, val_conv);
}
LDKNetworkGraph network_graph_conv;
network_graph_conv.inner = (void*)(network_graph & (~1));
network_graph_conv.is_owned = (network_graph & 1) || (network_graph == 0);
- // Warning: we need a move here but no clone is available for LDKNetworkGraph
+ network_graph_conv = NetworkGraph_clone(&network_graph_conv);
LDKCOption_AccessZ chain_access_conv = *(LDKCOption_AccessZ*)(((uint64_t)chain_access) & ~1);
// Warning: we may need a move here but no clone is available for LDKCOption_AccessZ
if (chain_access_conv.tag == LDKCOption_AccessZ_Some) {
this_arg_conv.inner = (void*)(this_arg & (~1));
this_arg_conv.is_owned = (this_arg & 1) || (this_arg == 0);
this_arg_conv = SignedRawInvoice_clone(&this_arg_conv);
- LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
- *ret_ref = SignedRawInvoice_into_parts(this_arg_conv);
- return (uint64_t)ret_ref;
+ LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
+ *ret_conv = SignedRawInvoice_into_parts(this_arg_conv);
+ return ((uint64_t)ret_conv);
}
uint32_t __attribute__((visibility("default"))) TS_SignedRawInvoice_raw_invoice(uint32_t this_arg) {
ret->b = b_ref;
return (uint64_t)ret;
}
-int64_t __attribute__((visibility("default"))) TS_LDKC2Tuple_usizeTransactionZ_get_a(uint32_t ptr) {
- LDKC2Tuple_usizeTransactionZ *tuple = (LDKC2Tuple_usizeTransactionZ*)(ptr & ~1);
+static inline uintptr_t C2Tuple_usizeTransactionZ_get_a(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR tuple){
return tuple->a;
}
-int8_tArray __attribute__((visibility("default"))) TS_LDKC2Tuple_usizeTransactionZ_get_b(uint32_t ptr) {
- LDKC2Tuple_usizeTransactionZ *tuple = (LDKC2Tuple_usizeTransactionZ*)(ptr & ~1);
- LDKTransaction b_var = tuple->b;
- int8_tArray b_arr = init_arr(b_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
- memcpy((uint8_t*)(b_arr + 4), b_var.data, b_var.datalen);
- return b_arr;
+int64_t __attribute__((visibility("default"))) TS_C2Tuple_usizeTransactionZ_get_a(uint32_t tuple) {
+ LDKC2Tuple_usizeTransactionZ* tuple_conv = (LDKC2Tuple_usizeTransactionZ*)(tuple & ~1);
+ int64_t ret_val = C2Tuple_usizeTransactionZ_get_a(tuple_conv);
+ return ret_val;
+}
+
+static inline struct LDKTransaction C2Tuple_usizeTransactionZ_get_b(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR tuple){
+ return tuple->b;
}
+int8_tArray __attribute__((visibility("default"))) TS_C2Tuple_usizeTransactionZ_get_b(uint32_t tuple) {
+ LDKC2Tuple_usizeTransactionZ* tuple_conv = (LDKC2Tuple_usizeTransactionZ*)(tuple & ~1);
+ LDKTransaction ret_var = C2Tuple_usizeTransactionZ_get_b(tuple_conv);
+ int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+ memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+ Transaction_free(ret_var);
+ return ret_arr;
+}
+
uint32_t __attribute__((visibility("default"))) TS_LDKCVec_C2Tuple_usizeTransactionZZ_new(uint32_tArray elems) {
LDKCVec_C2Tuple_usizeTransactionZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_usizeTransactionZZ), "LDKCVec_C2Tuple_usizeTransactionZZ");
ret->datalen = *((uint32_t*)elems);
LDKCOption_C2Tuple_usizeTransactionZZ *obj = (LDKCOption_C2Tuple_usizeTransactionZZ*)(ptr & ~1);
switch(obj->tag) {
case LDKCOption_C2Tuple_usizeTransactionZZ_Some: {
- uint64_t some_ref = (uint64_t)(&obj->some) | 1;
- return 0 /* LDKCOption_C2Tuple_usizeTransactionZZ - Some */; (void) some_ref;
+ LDKC2Tuple_usizeTransactionZ* some_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
+ *some_conv = obj->some;
+ *some_conv = C2Tuple_usizeTransactionZ_clone(some_conv);
+ return 0 /* LDKCOption_C2Tuple_usizeTransactionZZ - Some */; (void) ((uint64_t)some_conv);
}
case LDKCOption_C2Tuple_usizeTransactionZZ_None: {
return 0 /* LDKCOption_C2Tuple_usizeTransactionZZ - None */;
ret->b = b_constr;
return (uint64_t)ret;
}
-int8_tArray __attribute__((visibility("default"))) TS_LDKC2Tuple_SignatureCVec_SignatureZZ_get_a(uint32_t ptr) {
- LDKC2Tuple_SignatureCVec_SignatureZZ *tuple = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(ptr & ~1);
- int8_tArray a_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
- memcpy((uint8_t*)(a_arr + 4), tuple->a.compact_form, 64);
- return a_arr;
+static inline struct LDKSignature C2Tuple_SignatureCVec_SignatureZZ_get_a(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR tuple){
+ return tuple->a;
+}
+int8_tArray __attribute__((visibility("default"))) TS_C2Tuple_SignatureCVec_SignatureZZ_get_a(uint32_t tuple) {
+ LDKC2Tuple_SignatureCVec_SignatureZZ* tuple_conv = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(tuple & ~1);
+ int8_tArray ret_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
+ memcpy((uint8_t*)(ret_arr + 4), C2Tuple_SignatureCVec_SignatureZZ_get_a(tuple_conv).compact_form, 64);
+ return ret_arr;
}
-ptrArray __attribute__((visibility("default"))) TS_LDKC2Tuple_SignatureCVec_SignatureZZ_get_b(uint32_t ptr) {
- LDKC2Tuple_SignatureCVec_SignatureZZ *tuple = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(ptr & ~1);
- LDKCVec_SignatureZ b_var = tuple->b;
- ptrArray b_arr = init_arr(b_var.datalen, sizeof(uint32_t), "Native ptrArray Bytes");
- int8_tArray *b_arr_ptr = (int8_tArray*)(b_arr + 4);
- for (size_t m = 0; m < b_var.datalen; m++) {
- int8_tArray b_conv_12_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
- memcpy((uint8_t*)(b_conv_12_arr + 4), b_var.data[m].compact_form, 64);
- b_arr_ptr[m] = b_conv_12_arr;
+
+static inline struct LDKCVec_SignatureZ C2Tuple_SignatureCVec_SignatureZZ_get_b(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR tuple){
+ return tuple->b;
+}
+ptrArray __attribute__((visibility("default"))) TS_C2Tuple_SignatureCVec_SignatureZZ_get_b(uint32_t tuple) {
+ LDKC2Tuple_SignatureCVec_SignatureZZ* tuple_conv = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(tuple & ~1);
+ LDKCVec_SignatureZ ret_var = C2Tuple_SignatureCVec_SignatureZZ_get_b(tuple_conv);
+ ptrArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native ptrArray Bytes");
+ int8_tArray *ret_arr_ptr = (int8_tArray*)(ret_arr + 4);
+ for (size_t m = 0; m < ret_var.datalen; m++) {
+ int8_tArray ret_conv_12_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
+ memcpy((uint8_t*)(ret_conv_12_arr + 4), ret_var.data[m].compact_form, 64);
+ ret_arr_ptr[m] = ret_conv_12_arr;
}
- return b_arr;
+ FREE(ret_var.data);
+ return ret_arr;
}
+
jboolean __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_result_ok(uint32_t arg) {
return ((LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)arg)->result_ok;
}
uint32_t __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(uint32_t arg) {
LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *val = (LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(arg & ~1);
CHECK(val->result_ok);
- uint64_t res_ref = (uint64_t)(&(*val->contents.result)) | 1;
- return res_ref;
+ LDKC2Tuple_SignatureCVec_SignatureZZ* res_conv = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
+ *res_conv = (*val->contents.result);
+ *res_conv = C2Tuple_SignatureCVec_SignatureZZ_clone(res_conv);
+ return ((uint64_t)res_conv);
}
void __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(uint32_t arg) {
LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *val = (LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(arg & ~1);
ret->b = b_conv;
return (uint64_t)ret;
}
-int8_tArray __attribute__((visibility("default"))) TS_LDKC2Tuple_BlockHashChannelMonitorZ_get_a(uint32_t ptr) {
- LDKC2Tuple_BlockHashChannelMonitorZ *tuple = (LDKC2Tuple_BlockHashChannelMonitorZ*)(ptr & ~1);
- int8_tArray a_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
- memcpy((uint8_t*)(a_arr + 4), tuple->a.data, 32);
- return a_arr;
+static inline struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelMonitorZ_get_a(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR tuple){
+ return ThirtyTwoBytes_clone(&tuple->a);
+}
+int8_tArray __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelMonitorZ_get_a(uint32_t tuple) {
+ LDKC2Tuple_BlockHashChannelMonitorZ* tuple_conv = (LDKC2Tuple_BlockHashChannelMonitorZ*)(tuple & ~1);
+ int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+ memcpy((uint8_t*)(ret_arr + 4), C2Tuple_BlockHashChannelMonitorZ_get_a(tuple_conv).data, 32);
+ return ret_arr;
}
-uint32_t __attribute__((visibility("default"))) TS_LDKC2Tuple_BlockHashChannelMonitorZ_get_b(uint32_t ptr) {
- LDKC2Tuple_BlockHashChannelMonitorZ *tuple = (LDKC2Tuple_BlockHashChannelMonitorZ*)(ptr & ~1);
- LDKChannelMonitor b_var = tuple->b;
- CHECK((((uint64_t)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- uint64_t b_ref = (uint64_t)b_var.inner & ~1;
- return b_ref;
+
+static inline struct LDKChannelMonitor C2Tuple_BlockHashChannelMonitorZ_get_b(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR tuple){
+ return ChannelMonitor_clone(&tuple->b);
}
+uint32_t __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelMonitorZ_get_b(uint32_t tuple) {
+ LDKC2Tuple_BlockHashChannelMonitorZ* tuple_conv = (LDKC2Tuple_BlockHashChannelMonitorZ*)(tuple & ~1);
+ LDKChannelMonitor ret_var = C2Tuple_BlockHashChannelMonitorZ_get_b(tuple_conv);
+ CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ uint64_t ret_ref = (uint64_t)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
uint32_t __attribute__((visibility("default"))) TS_LDKCVec_C2Tuple_BlockHashChannelMonitorZZ_new(uint32_tArray elems) {
LDKCVec_C2Tuple_BlockHashChannelMonitorZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_BlockHashChannelMonitorZZ), "LDKCVec_C2Tuple_BlockHashChannelMonitorZZ");
ret->datalen = *((uint32_t*)elems);
for (size_t i = 0; i < ret->datalen; i++) {
uint32_t arr_elem = java_elems[i];
LDKC2Tuple_BlockHashChannelMonitorZ arr_elem_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)arr_elem) & ~1);
- // Warning: we may need a move here but no clone is available for LDKC2Tuple_BlockHashChannelMonitorZ
+ arr_elem_conv = C2Tuple_BlockHashChannelMonitorZ_clone((LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)arr_elem) & ~1));
ret->data[i] = arr_elem_conv;
}
}
return (uint64_t)ret;
}
+static inline LDKCVec_C2Tuple_BlockHashChannelMonitorZZ CVec_C2Tuple_BlockHashChannelMonitorZZ_clone(const LDKCVec_C2Tuple_BlockHashChannelMonitorZZ *orig) {
+ LDKCVec_C2Tuple_BlockHashChannelMonitorZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ) * orig->datalen, "LDKCVec_C2Tuple_BlockHashChannelMonitorZZ clone bytes"), .datalen = orig->datalen };
+ for (size_t i = 0; i < ret.datalen; i++) {
+ ret.data[i] = C2Tuple_BlockHashChannelMonitorZ_clone(&orig->data[i]);
+ }
+ return ret;
+}
jboolean __attribute__((visibility("default"))) TS_LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_result_ok(uint32_t arg) {
return ((LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ*)arg)->result_ok;
}
LDKCVec_C2Tuple_BlockHashChannelMonitorZZ res_var = (*val->contents.result);
uint32_tArray res_arr = init_arr(res_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
uint32_t *res_arr_ptr = (uint32_t*)(res_arr + 4);
- for (size_t m = 0; m < res_var.datalen; m++) {
- uint64_t res_conv_38_ref = (uint64_t)(&res_var.data[m]) | 1;
- res_arr_ptr[m] = res_conv_38_ref;
+ for (size_t j = 0; j < res_var.datalen; j++) {
+ LDKC2Tuple_BlockHashChannelMonitorZ* res_conv_35_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
+ *res_conv_35_conv = res_var.data[j];
+ *res_conv_35_conv = C2Tuple_BlockHashChannelMonitorZ_clone(res_conv_35_conv);
+ res_arr_ptr[j] = ((uint64_t)res_conv_35_conv);
}
return res_arr;
}
ret->b = b_ref;
return (uint64_t)ret;
}
-int8_tArray __attribute__((visibility("default"))) TS_LDKC2Tuple_PaymentHashPaymentSecretZ_get_a(uint32_t ptr) {
- LDKC2Tuple_PaymentHashPaymentSecretZ *tuple = (LDKC2Tuple_PaymentHashPaymentSecretZ*)(ptr & ~1);
- int8_tArray a_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
- memcpy((uint8_t*)(a_arr + 4), tuple->a.data, 32);
- return a_arr;
+static inline struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_a(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR tuple){
+ return ThirtyTwoBytes_clone(&tuple->a);
+}
+int8_tArray __attribute__((visibility("default"))) TS_C2Tuple_PaymentHashPaymentSecretZ_get_a(uint32_t tuple) {
+ LDKC2Tuple_PaymentHashPaymentSecretZ* tuple_conv = (LDKC2Tuple_PaymentHashPaymentSecretZ*)(tuple & ~1);
+ int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+ memcpy((uint8_t*)(ret_arr + 4), C2Tuple_PaymentHashPaymentSecretZ_get_a(tuple_conv).data, 32);
+ return ret_arr;
+}
+
+static inline struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_b(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR tuple){
+ return ThirtyTwoBytes_clone(&tuple->b);
}
-int8_tArray __attribute__((visibility("default"))) TS_LDKC2Tuple_PaymentHashPaymentSecretZ_get_b(uint32_t ptr) {
- LDKC2Tuple_PaymentHashPaymentSecretZ *tuple = (LDKC2Tuple_PaymentHashPaymentSecretZ*)(ptr & ~1);
- int8_tArray b_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
- memcpy((uint8_t*)(b_arr + 4), tuple->b.data, 32);
- return b_arr;
+int8_tArray __attribute__((visibility("default"))) TS_C2Tuple_PaymentHashPaymentSecretZ_get_b(uint32_t tuple) {
+ LDKC2Tuple_PaymentHashPaymentSecretZ* tuple_conv = (LDKC2Tuple_PaymentHashPaymentSecretZ*)(tuple & ~1);
+ int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+ memcpy((uint8_t*)(ret_arr + 4), C2Tuple_PaymentHashPaymentSecretZ_get_b(tuple_conv).data, 32);
+ return ret_arr;
}
+
jboolean __attribute__((visibility("default"))) TS_LDKCResult_PaymentSecretAPIErrorZ_result_ok(uint32_t arg) {
return ((LDKCResult_PaymentSecretAPIErrorZ*)arg)->result_ok;
}
ret->b = b_conv;
return (uint64_t)ret;
}
-int8_tArray __attribute__((visibility("default"))) TS_LDKC2Tuple_BlockHashChannelManagerZ_get_a(uint32_t ptr) {
- LDKC2Tuple_BlockHashChannelManagerZ *tuple = (LDKC2Tuple_BlockHashChannelManagerZ*)(ptr & ~1);
- int8_tArray a_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
- memcpy((uint8_t*)(a_arr + 4), tuple->a.data, 32);
- return a_arr;
+static inline struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelManagerZ_get_a(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR tuple){
+ return ThirtyTwoBytes_clone(&tuple->a);
+}
+int8_tArray __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelManagerZ_get_a(uint32_t tuple) {
+ LDKC2Tuple_BlockHashChannelManagerZ* tuple_conv = (LDKC2Tuple_BlockHashChannelManagerZ*)(tuple & ~1);
+ int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+ memcpy((uint8_t*)(ret_arr + 4), C2Tuple_BlockHashChannelManagerZ_get_a(tuple_conv).data, 32);
+ return ret_arr;
+}
+
+static inline struct LDKChannelManager *C2Tuple_BlockHashChannelManagerZ_get_b(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR tuple){
+ return &tuple->b;
}
-uint32_t __attribute__((visibility("default"))) TS_LDKC2Tuple_BlockHashChannelManagerZ_get_b(uint32_t ptr) {
- LDKC2Tuple_BlockHashChannelManagerZ *tuple = (LDKC2Tuple_BlockHashChannelManagerZ*)(ptr & ~1);
- LDKChannelManager b_var = tuple->b;
- CHECK((((uint64_t)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- uint64_t b_ref = (uint64_t)b_var.inner & ~1;
- return b_ref;
+uint32_t __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelManagerZ_get_b(uint32_t tuple) {
+ LDKC2Tuple_BlockHashChannelManagerZ* tuple_conv = (LDKC2Tuple_BlockHashChannelManagerZ*)(tuple & ~1);
+ LDKChannelManager ret_var = *C2Tuple_BlockHashChannelManagerZ_get_b(tuple_conv);
+ CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ uint64_t ret_ref = (uint64_t)ret_var.inner & ~1;
+ return ret_ref;
}
+
jboolean __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_result_ok(uint32_t arg) {
return ((LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)arg)->result_ok;
}
uint32_t __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(uint32_t arg) {
LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)(arg & ~1);
CHECK(val->result_ok);
- uint64_t res_ref = (uint64_t)(&(*val->contents.result)) | 1;
- return res_ref;
+ LDKC2Tuple_BlockHashChannelManagerZ* res_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelManagerZ), "LDKC2Tuple_BlockHashChannelManagerZ");
+ *res_conv = (*val->contents.result);
+ // Warning: we really need to clone here, but no clone is available for LDKC2Tuple_BlockHashChannelManagerZ
+ return ((uint64_t)res_conv) | 1;
}
uint32_t __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(uint32_t arg) {
LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)(arg & ~1);
ret->c = c_conv;
return (uint64_t)ret;
}
-uint32_t __attribute__((visibility("default"))) TS_LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(uint32_t ptr) {
- LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *tuple = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(ptr & ~1);
- LDKRawInvoice a_var = tuple->a;
- CHECK((((uint64_t)a_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&a_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- uint64_t a_ref = (uint64_t)a_var.inner & ~1;
- return a_ref;
-}
-int8_tArray __attribute__((visibility("default"))) TS_LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(uint32_t ptr) {
- LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *tuple = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(ptr & ~1);
- int8_tArray b_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
- memcpy((uint8_t*)(b_arr + 4), tuple->b.data, 32);
- return b_arr;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(uint32_t ptr) {
- LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *tuple = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(ptr & ~1);
- LDKInvoiceSignature c_var = tuple->c;
- CHECK((((uint64_t)c_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&c_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- uint64_t c_ref = (uint64_t)c_var.inner & ~1;
- return c_ref;
+static inline struct LDKRawInvoice C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple){
+ return RawInvoice_clone(&tuple->a);
}
+uint32_t __attribute__((visibility("default"))) TS_C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(uint32_t tuple) {
+ LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* tuple_conv = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(tuple & ~1);
+ LDKRawInvoice ret_var = C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(tuple_conv);
+ CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ uint64_t ret_ref = (uint64_t)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
+static inline struct LDKThirtyTwoBytes C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple){
+ return ThirtyTwoBytes_clone(&tuple->b);
+}
+int8_tArray __attribute__((visibility("default"))) TS_C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(uint32_t tuple) {
+ LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* tuple_conv = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(tuple & ~1);
+ int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+ memcpy((uint8_t*)(ret_arr + 4), C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(tuple_conv).data, 32);
+ return ret_arr;
+}
+
+static inline struct LDKInvoiceSignature C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple){
+ return InvoiceSignature_clone(&tuple->c);
+}
+uint32_t __attribute__((visibility("default"))) TS_C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(uint32_t tuple) {
+ LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* tuple_conv = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(tuple & ~1);
+ LDKInvoiceSignature ret_var = C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(tuple_conv);
+ CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ uint64_t ret_ref = (uint64_t)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
jboolean __attribute__((visibility("default"))) TS_LDKCResult_PayeePubKeyErrorZ_result_ok(uint32_t arg) {
return ((LDKCResult_PayeePubKeyErrorZ*)arg)->result_ok;
}
ret->b = b_ref;
return (uint64_t)ret;
}
-uint32_t __attribute__((visibility("default"))) TS_LDKC2Tuple_OutPointScriptZ_get_a(uint32_t ptr) {
- LDKC2Tuple_OutPointScriptZ *tuple = (LDKC2Tuple_OutPointScriptZ*)(ptr & ~1);
- LDKOutPoint a_var = tuple->a;
- CHECK((((uint64_t)a_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&a_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- uint64_t a_ref = (uint64_t)a_var.inner & ~1;
- return a_ref;
-}
-int8_tArray __attribute__((visibility("default"))) TS_LDKC2Tuple_OutPointScriptZ_get_b(uint32_t ptr) {
- LDKC2Tuple_OutPointScriptZ *tuple = (LDKC2Tuple_OutPointScriptZ*)(ptr & ~1);
- LDKCVec_u8Z b_var = tuple->b;
- int8_tArray b_arr = init_arr(b_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
- memcpy((uint8_t*)(b_arr + 4), b_var.data, b_var.datalen);
- return b_arr;
+static inline struct LDKOutPoint C2Tuple_OutPointScriptZ_get_a(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR tuple){
+ return OutPoint_clone(&tuple->a);
+}
+uint32_t __attribute__((visibility("default"))) TS_C2Tuple_OutPointScriptZ_get_a(uint32_t tuple) {
+ LDKC2Tuple_OutPointScriptZ* tuple_conv = (LDKC2Tuple_OutPointScriptZ*)(tuple & ~1);
+ LDKOutPoint ret_var = C2Tuple_OutPointScriptZ_get_a(tuple_conv);
+ CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ uint64_t ret_ref = (uint64_t)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
+static inline struct LDKCVec_u8Z C2Tuple_OutPointScriptZ_get_b(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR tuple){
+ return CVec_u8Z_clone(&tuple->b);
+}
+int8_tArray __attribute__((visibility("default"))) TS_C2Tuple_OutPointScriptZ_get_b(uint32_t tuple) {
+ LDKC2Tuple_OutPointScriptZ* tuple_conv = (LDKC2Tuple_OutPointScriptZ*)(tuple & ~1);
+ LDKCVec_u8Z ret_var = C2Tuple_OutPointScriptZ_get_b(tuple_conv);
+ int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+ memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
}
+
uint32_t __attribute__((visibility("default"))) TS_LDKC2Tuple_u32ScriptZ_new(int32_t a, int8_tArray b) {
LDKC2Tuple_u32ScriptZ* ret = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
ret->a = a;
ret->b = b_ref;
return (uint64_t)ret;
}
-int32_t __attribute__((visibility("default"))) TS_LDKC2Tuple_u32ScriptZ_get_a(uint32_t ptr) {
- LDKC2Tuple_u32ScriptZ *tuple = (LDKC2Tuple_u32ScriptZ*)(ptr & ~1);
+static inline uint32_t C2Tuple_u32ScriptZ_get_a(LDKC2Tuple_u32ScriptZ *NONNULL_PTR tuple){
return tuple->a;
}
-int8_tArray __attribute__((visibility("default"))) TS_LDKC2Tuple_u32ScriptZ_get_b(uint32_t ptr) {
- LDKC2Tuple_u32ScriptZ *tuple = (LDKC2Tuple_u32ScriptZ*)(ptr & ~1);
- LDKCVec_u8Z b_var = tuple->b;
- int8_tArray b_arr = init_arr(b_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
- memcpy((uint8_t*)(b_arr + 4), b_var.data, b_var.datalen);
- return b_arr;
+int32_t __attribute__((visibility("default"))) TS_C2Tuple_u32ScriptZ_get_a(uint32_t tuple) {
+ LDKC2Tuple_u32ScriptZ* tuple_conv = (LDKC2Tuple_u32ScriptZ*)(tuple & ~1);
+ int32_t ret_val = C2Tuple_u32ScriptZ_get_a(tuple_conv);
+ return ret_val;
+}
+
+static inline struct LDKCVec_u8Z C2Tuple_u32ScriptZ_get_b(LDKC2Tuple_u32ScriptZ *NONNULL_PTR tuple){
+ return CVec_u8Z_clone(&tuple->b);
+}
+int8_tArray __attribute__((visibility("default"))) TS_C2Tuple_u32ScriptZ_get_b(uint32_t tuple) {
+ LDKC2Tuple_u32ScriptZ* tuple_conv = (LDKC2Tuple_u32ScriptZ*)(tuple & ~1);
+ LDKCVec_u8Z ret_var = C2Tuple_u32ScriptZ_get_b(tuple_conv);
+ int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+ memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
}
+
uint32_t __attribute__((visibility("default"))) TS_LDKCVec_C2Tuple_u32ScriptZZ_new(uint32_tArray elems) {
LDKCVec_C2Tuple_u32ScriptZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_u32ScriptZZ), "LDKCVec_C2Tuple_u32ScriptZZ");
ret->datalen = *((uint32_t*)elems);
else
b_constr.data = NULL;
uint32_t* b_vals = (uint32_t*)(b + 4);
- for (size_t e = 0; e < b_constr.datalen; e++) {
- uint32_t b_conv_30 = b_vals[e];
- LDKC2Tuple_u32ScriptZ b_conv_30_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_30) & ~1);
- b_conv_30_conv = C2Tuple_u32ScriptZ_clone((LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_30) & ~1));
- b_constr.data[e] = b_conv_30_conv;
+ for (size_t v = 0; v < b_constr.datalen; v++) {
+ uint32_t b_conv_21 = b_vals[v];
+ LDKC2Tuple_u32ScriptZ b_conv_21_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_21) & ~1);
+ b_conv_21_conv = C2Tuple_u32ScriptZ_clone((LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_21) & ~1));
+ b_constr.data[v] = b_conv_21_conv;
}
ret->b = b_constr;
return (uint64_t)ret;
}
-int8_tArray __attribute__((visibility("default"))) TS_LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(uint32_t ptr) {
- LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *tuple = (LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(ptr & ~1);
- int8_tArray a_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
- memcpy((uint8_t*)(a_arr + 4), tuple->a.data, 32);
- return a_arr;
+static inline struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR tuple){
+ return ThirtyTwoBytes_clone(&tuple->a);
+}
+int8_tArray __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(uint32_t tuple) {
+ LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* tuple_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(tuple & ~1);
+ int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+ memcpy((uint8_t*)(ret_arr + 4), C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(tuple_conv).data, 32);
+ return ret_arr;
+}
+
+static inline struct LDKCVec_C2Tuple_u32ScriptZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR tuple){
+ return CVec_C2Tuple_u32ScriptZZ_clone(&tuple->b);
}
-uint32_tArray __attribute__((visibility("default"))) TS_LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(uint32_t ptr) {
- LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *tuple = (LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(ptr & ~1);
- LDKCVec_C2Tuple_u32ScriptZZ b_var = tuple->b;
- uint32_tArray b_arr = init_arr(b_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
- uint32_t *b_arr_ptr = (uint32_t*)(b_arr + 4);
- for (size_t e = 0; e < b_var.datalen; e++) {
- uint64_t b_conv_30_ref = (uint64_t)(&b_var.data[e]) | 1;
- b_arr_ptr[e] = b_conv_30_ref;
+uint32_tArray __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(uint32_t tuple) {
+ LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* tuple_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(tuple & ~1);
+ LDKCVec_C2Tuple_u32ScriptZZ ret_var = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(tuple_conv);
+ uint32_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
+ uint32_t *ret_arr_ptr = (uint32_t*)(ret_arr + 4);
+ for (size_t v = 0; v < ret_var.datalen; v++) {
+ LDKC2Tuple_u32ScriptZ* ret_conv_21_conv = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
+ *ret_conv_21_conv = ret_var.data[v];
+ ret_arr_ptr[v] = ((uint64_t)ret_conv_21_conv);
}
- return b_arr;
+ FREE(ret_var.data);
+ return ret_arr;
}
+
uint32_t __attribute__((visibility("default"))) TS_LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_new(uint32_tArray elems) {
LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ), "LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ");
ret->datalen = *((uint32_t*)elems);
ret->b = b_conv;
return (uint64_t)ret;
}
-int32_t __attribute__((visibility("default"))) TS_LDKC2Tuple_u32TxOutZ_get_a(uint32_t ptr) {
- LDKC2Tuple_u32TxOutZ *tuple = (LDKC2Tuple_u32TxOutZ*)(ptr & ~1);
+static inline uint32_t C2Tuple_u32TxOutZ_get_a(LDKC2Tuple_u32TxOutZ *NONNULL_PTR tuple){
return tuple->a;
}
-uint32_t __attribute__((visibility("default"))) TS_LDKC2Tuple_u32TxOutZ_get_b(uint32_t ptr) {
- LDKC2Tuple_u32TxOutZ *tuple = (LDKC2Tuple_u32TxOutZ*)(ptr & ~1);
- uint64_t b_ref = ((uint64_t)&tuple->b) | 1;
- return (uint64_t)b_ref;
+int32_t __attribute__((visibility("default"))) TS_C2Tuple_u32TxOutZ_get_a(uint32_t tuple) {
+ LDKC2Tuple_u32TxOutZ* tuple_conv = (LDKC2Tuple_u32TxOutZ*)(tuple & ~1);
+ int32_t ret_val = C2Tuple_u32TxOutZ_get_a(tuple_conv);
+ return ret_val;
+}
+
+static inline struct LDKTxOut C2Tuple_u32TxOutZ_get_b(LDKC2Tuple_u32TxOutZ *NONNULL_PTR tuple){
+ return TxOut_clone(&tuple->b);
+}
+uint32_t __attribute__((visibility("default"))) TS_C2Tuple_u32TxOutZ_get_b(uint32_t tuple) {
+ LDKC2Tuple_u32TxOutZ* tuple_conv = (LDKC2Tuple_u32TxOutZ*)(tuple & ~1);
+ LDKTxOut* ret_ref = MALLOC(sizeof(LDKTxOut), "LDKTxOut");
+ *ret_ref = C2Tuple_u32TxOutZ_get_b(tuple_conv);
+ return (uint64_t)ret_ref;
}
+
uint32_t __attribute__((visibility("default"))) TS_LDKCVec_C2Tuple_u32TxOutZZ_new(uint32_tArray elems) {
LDKCVec_C2Tuple_u32TxOutZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_u32TxOutZZ), "LDKCVec_C2Tuple_u32TxOutZZ");
ret->datalen = *((uint32_t*)elems);
else
b_constr.data = NULL;
uint32_t* b_vals = (uint32_t*)(b + 4);
- for (size_t z = 0; z < b_constr.datalen; z++) {
- uint32_t b_conv_25 = b_vals[z];
- LDKC2Tuple_u32TxOutZ b_conv_25_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_25) & ~1);
- b_conv_25_conv = C2Tuple_u32TxOutZ_clone((LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_25) & ~1));
- b_constr.data[z] = b_conv_25_conv;
+ for (size_t u = 0; u < b_constr.datalen; u++) {
+ uint32_t b_conv_20 = b_vals[u];
+ LDKC2Tuple_u32TxOutZ b_conv_20_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_20) & ~1);
+ b_conv_20_conv = C2Tuple_u32TxOutZ_clone((LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_20) & ~1));
+ b_constr.data[u] = b_conv_20_conv;
}
ret->b = b_constr;
return (uint64_t)ret;
}
-int8_tArray __attribute__((visibility("default"))) TS_LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(uint32_t ptr) {
- LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *tuple = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(ptr & ~1);
- int8_tArray a_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
- memcpy((uint8_t*)(a_arr + 4), tuple->a.data, 32);
- return a_arr;
+static inline struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR tuple){
+ return ThirtyTwoBytes_clone(&tuple->a);
+}
+int8_tArray __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(uint32_t tuple) {
+ LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* tuple_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(tuple & ~1);
+ int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+ memcpy((uint8_t*)(ret_arr + 4), C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(tuple_conv).data, 32);
+ return ret_arr;
+}
+
+static inline struct LDKCVec_C2Tuple_u32TxOutZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR tuple){
+ return CVec_C2Tuple_u32TxOutZZ_clone(&tuple->b);
}
-uint32_tArray __attribute__((visibility("default"))) TS_LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(uint32_t ptr) {
- LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *tuple = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(ptr & ~1);
- LDKCVec_C2Tuple_u32TxOutZZ b_var = tuple->b;
- uint32_tArray b_arr = init_arr(b_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
- uint32_t *b_arr_ptr = (uint32_t*)(b_arr + 4);
- for (size_t z = 0; z < b_var.datalen; z++) {
- uint64_t b_conv_25_ref = (uint64_t)(&b_var.data[z]) | 1;
- b_arr_ptr[z] = b_conv_25_ref;
+uint32_tArray __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(uint32_t tuple) {
+ LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* tuple_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(tuple & ~1);
+ LDKCVec_C2Tuple_u32TxOutZZ ret_var = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(tuple_conv);
+ uint32_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
+ uint32_t *ret_arr_ptr = (uint32_t*)(ret_arr + 4);
+ for (size_t u = 0; u < ret_var.datalen; u++) {
+ LDKC2Tuple_u32TxOutZ* ret_conv_20_conv = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
+ *ret_conv_20_conv = ret_var.data[u];
+ ret_arr_ptr[u] = ((uint64_t)ret_conv_20_conv);
}
- return b_arr;
+ FREE(ret_var.data);
+ return ret_arr;
}
+
uint32_t __attribute__((visibility("default"))) TS_LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_new(uint32_tArray elems) {
LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ), "LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ");
ret->datalen = *((uint32_t*)elems);
uint32_t __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(uint32_t arg) {
LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)(arg & ~1);
CHECK(val->result_ok);
- uint64_t res_ref = (uint64_t)(&(*val->contents.result)) | 1;
- return res_ref;
+ LDKC2Tuple_BlockHashChannelMonitorZ* res_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
+ *res_conv = (*val->contents.result);
+ *res_conv = C2Tuple_BlockHashChannelMonitorZ_clone(res_conv);
+ return ((uint64_t)res_conv);
}
uint32_t __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(uint32_t arg) {
LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)(arg & ~1);
ret->b = b_conv;
return (uint64_t)ret;
}
-int8_tArray __attribute__((visibility("default"))) TS_LDKC2Tuple_PublicKeyTypeZ_get_a(uint32_t ptr) {
- LDKC2Tuple_PublicKeyTypeZ *tuple = (LDKC2Tuple_PublicKeyTypeZ*)(ptr & ~1);
- int8_tArray a_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
- memcpy((uint8_t*)(a_arr + 4), tuple->a.compressed_form, 33);
- return a_arr;
+static inline struct LDKPublicKey C2Tuple_PublicKeyTypeZ_get_a(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR tuple){
+ return tuple->a;
+}
+int8_tArray __attribute__((visibility("default"))) TS_C2Tuple_PublicKeyTypeZ_get_a(uint32_t tuple) {
+ LDKC2Tuple_PublicKeyTypeZ* tuple_conv = (LDKC2Tuple_PublicKeyTypeZ*)(tuple & ~1);
+ int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+ memcpy((uint8_t*)(ret_arr + 4), C2Tuple_PublicKeyTypeZ_get_a(tuple_conv).compressed_form, 33);
+ return ret_arr;
}
-uint32_t __attribute__((visibility("default"))) TS_LDKC2Tuple_PublicKeyTypeZ_get_b(uint32_t ptr) {
- LDKC2Tuple_PublicKeyTypeZ *tuple = (LDKC2Tuple_PublicKeyTypeZ*)(ptr & ~1);
- LDKType* b_ret =MALLOC(sizeof(LDKType), "LDKType");
- *b_ret = Type_clone(&tuple->b);
- return (uint64_t)b_ret;
+
+static inline struct LDKType C2Tuple_PublicKeyTypeZ_get_b(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR tuple){
+ return Type_clone(&tuple->b);
}
+uint32_t __attribute__((visibility("default"))) TS_C2Tuple_PublicKeyTypeZ_get_b(uint32_t tuple) {
+ LDKC2Tuple_PublicKeyTypeZ* tuple_conv = (LDKC2Tuple_PublicKeyTypeZ*)(tuple & ~1);
+ LDKType* ret_ret =MALLOC(sizeof(LDKType), "LDKType");
+ *ret_ret = C2Tuple_PublicKeyTypeZ_get_b(tuple_conv);
+ return (uint64_t)ret_ret;
+}
+
uint32_t __attribute__((visibility("default"))) TS_LDKCVec_C2Tuple_PublicKeyTypeZZ_new(uint32_tArray elems) {
LDKCVec_C2Tuple_PublicKeyTypeZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_PublicKeyTypeZZ), "LDKCVec_C2Tuple_PublicKeyTypeZZ");
ret->datalen = *((uint32_t*)elems);
ret->c = c_conv;
return (uint64_t)ret;
}
-uint32_t __attribute__((visibility("default"))) TS_LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(uint32_t ptr) {
- LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *tuple = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(ptr & ~1);
- LDKChannelAnnouncement a_var = tuple->a;
- CHECK((((uint64_t)a_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&a_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- uint64_t a_ref = (uint64_t)a_var.inner & ~1;
- return a_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(uint32_t ptr) {
- LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *tuple = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(ptr & ~1);
- LDKChannelUpdate b_var = tuple->b;
- CHECK((((uint64_t)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- uint64_t b_ref = (uint64_t)b_var.inner & ~1;
- return b_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(uint32_t ptr) {
- LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *tuple = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(ptr & ~1);
- LDKChannelUpdate c_var = tuple->c;
- CHECK((((uint64_t)c_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&c_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- uint64_t c_ref = (uint64_t)c_var.inner & ~1;
- return c_ref;
+static inline struct LDKChannelAnnouncement C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple){
+ return ChannelAnnouncement_clone(&tuple->a);
+}
+uint32_t __attribute__((visibility("default"))) TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(uint32_t tuple) {
+ LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* tuple_conv = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(tuple & ~1);
+ LDKChannelAnnouncement ret_var = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(tuple_conv);
+ CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ uint64_t ret_ref = (uint64_t)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
+static inline struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple){
+ return ChannelUpdate_clone(&tuple->b);
}
+uint32_t __attribute__((visibility("default"))) TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(uint32_t tuple) {
+ LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* tuple_conv = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(tuple & ~1);
+ LDKChannelUpdate ret_var = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(tuple_conv);
+ CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ uint64_t ret_ref = (uint64_t)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
+static inline struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple){
+ return ChannelUpdate_clone(&tuple->c);
+}
+uint32_t __attribute__((visibility("default"))) TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(uint32_t tuple) {
+ LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* tuple_conv = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(tuple & ~1);
+ LDKChannelUpdate ret_var = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(tuple_conv);
+ CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ uint64_t ret_ref = (uint64_t)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
uint32_t __attribute__((visibility("default"))) TS_LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new(uint32_tArray elems) {
LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ *ret = MALLOC(sizeof(LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ), "LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ");
ret->datalen = *((uint32_t*)elems);
LDKCVec_C2Tuple_usizeTransactionZZ txdata_var = txdata;
uint32_tArray txdata_arr = init_arr(txdata_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
uint32_t *txdata_arr_ptr = (uint32_t*)(txdata_arr + 4);
- for (size_t e = 0; e < txdata_var.datalen; e++) {
- LDKC2Tuple_usizeTransactionZ* txdata_conv_30_ref = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
- *txdata_conv_30_ref = txdata_var.data[e];
- txdata_arr_ptr[e] = (uint64_t)txdata_conv_30_ref;
+ for (size_t c = 0; c < txdata_var.datalen; c++) {
+ LDKC2Tuple_usizeTransactionZ* txdata_conv_28_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
+ *txdata_conv_28_conv = txdata_var.data[c];
+ txdata_arr_ptr[c] = ((uint64_t)txdata_conv_28_conv);
}
FREE(txdata_var.data);
js_invoke_function_3(j_calls->transactions_confirmed_meth, header_arr, txdata_arr, height);
else
txdata_constr.data = NULL;
uint32_t* txdata_vals = (uint32_t*)(txdata + 4);
- for (size_t e = 0; e < txdata_constr.datalen; e++) {
- uint32_t txdata_conv_30 = txdata_vals[e];
- LDKC2Tuple_usizeTransactionZ txdata_conv_30_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_30) & ~1);
- txdata_conv_30_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_30) & ~1));
- txdata_constr.data[e] = txdata_conv_30_conv;
+ for (size_t c = 0; c < txdata_constr.datalen; c++) {
+ uint32_t txdata_conv_28 = txdata_vals[c];
+ LDKC2Tuple_usizeTransactionZ txdata_conv_28_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1);
+ txdata_conv_28_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1));
+ txdata_constr.data[c] = txdata_conv_28_conv;
}
(this_arg_conv->transactions_confirmed)(this_arg_conv->this_arg, header_ref, txdata_constr, height);
}
else
ret_constr.data = NULL;
uint32_t* ret_vals = (uint32_t*)(ret + 4);
- for (size_t l = 0; l < ret_constr.datalen; l++) {
- uint32_t ret_conv_63 = ret_vals[l];
- LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ ret_conv_63_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)ret_conv_63) & ~1);
- ret_conv_63_conv = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone((LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)ret_conv_63) & ~1));
- ret_constr.data[l] = ret_conv_63_conv;
+ for (size_t h = 0; h < ret_constr.datalen; h++) {
+ uint32_t ret_conv_59 = ret_vals[h];
+ LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ ret_conv_59_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)ret_conv_59) & ~1);
+ ret_conv_59_conv = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone((LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)ret_conv_59) & ~1));
+ ret_constr.data[h] = ret_conv_59_conv;
}
return ret_constr;
}
LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ ret_var = (this_arg_conv->get_next_channel_announcements)(this_arg_conv->this_arg, starting_point, batch_amount);
uint32_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
uint32_t *ret_arr_ptr = (uint32_t*)(ret_arr + 4);
- for (size_t l = 0; l < ret_var.datalen; l++) {
- LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_conv_63_ref = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
- *ret_conv_63_ref = ret_var.data[l];
- ret_arr_ptr[l] = (uint64_t)ret_conv_63_ref;
+ for (size_t h = 0; h < ret_var.datalen; h++) {
+ LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_conv_59_conv = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
+ *ret_conv_59_conv = ret_var.data[h];
+ ret_arr_ptr[h] = ((uint64_t)ret_conv_59_conv);
}
FREE(ret_var.data);
return ret_arr;
else
ret_constr.data = NULL;
uint32_t* ret_vals = (uint32_t*)(ret + 4);
- for (size_t c = 0; c < ret_constr.datalen; c++) {
- uint32_t ret_conv_28 = ret_vals[c];
- LDKC2Tuple_PublicKeyTypeZ ret_conv_28_conv = *(LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)ret_conv_28) & ~1);
- ret_conv_28_conv = C2Tuple_PublicKeyTypeZ_clone((LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)ret_conv_28) & ~1));
- ret_constr.data[c] = ret_conv_28_conv;
+ for (size_t z = 0; z < ret_constr.datalen; z++) {
+ uint32_t ret_conv_25 = ret_vals[z];
+ LDKC2Tuple_PublicKeyTypeZ ret_conv_25_conv = *(LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)ret_conv_25) & ~1);
+ ret_conv_25_conv = C2Tuple_PublicKeyTypeZ_clone((LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)ret_conv_25) & ~1));
+ ret_constr.data[z] = ret_conv_25_conv;
}
return ret_constr;
}
LDKCVec_C2Tuple_PublicKeyTypeZZ ret_var = (this_arg_conv->get_and_clear_pending_msg)(this_arg_conv->this_arg);
uint32_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
uint32_t *ret_arr_ptr = (uint32_t*)(ret_arr + 4);
- for (size_t c = 0; c < ret_var.datalen; c++) {
- LDKC2Tuple_PublicKeyTypeZ* ret_conv_28_ref = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
- *ret_conv_28_ref = ret_var.data[c];
- ret_arr_ptr[c] = (uint64_t)ret_conv_28_ref;
+ for (size_t z = 0; z < ret_var.datalen; z++) {
+ LDKC2Tuple_PublicKeyTypeZ* ret_conv_25_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
+ *ret_conv_25_conv = ret_var.data[z];
+ ret_arr_ptr[z] = ((uint64_t)ret_conv_25_conv);
}
FREE(ret_var.data);
return ret_arr;
uint32_t __attribute__((visibility("default"))) TS_C2Tuple_usizeTransactionZ_clone(uint32_t orig) {
LDKC2Tuple_usizeTransactionZ* orig_conv = (LDKC2Tuple_usizeTransactionZ*)(orig & ~1);
- LDKC2Tuple_usizeTransactionZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
- *ret_ref = C2Tuple_usizeTransactionZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_usizeTransactionZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
+ *ret_conv = C2Tuple_usizeTransactionZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
uint32_t __attribute__((visibility("default"))) TS_C2Tuple_usizeTransactionZ_new(int64_t a, int8_tArray b) {
b_ref.data = MALLOC(b_ref.datalen, "LDKTransaction Bytes");
memcpy(b_ref.data, (uint8_t*)(b + 4), b_ref.datalen);
b_ref.data_is_owned = true;
- LDKC2Tuple_usizeTransactionZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
- *ret_ref = C2Tuple_usizeTransactionZ_new(a, b_ref);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_usizeTransactionZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
+ *ret_conv = C2Tuple_usizeTransactionZ_new(a, b_ref);
+ return ((uint64_t)ret_conv);
}
void __attribute__((visibility("default"))) TS_C2Tuple_usizeTransactionZ_free(uint32_t _res) {
else
_res_constr.data = NULL;
uint32_t* _res_vals = (uint32_t*)(_res + 4);
- for (size_t e = 0; e < _res_constr.datalen; e++) {
- uint32_t _res_conv_30 = _res_vals[e];
- LDKC2Tuple_usizeTransactionZ _res_conv_30_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)_res_conv_30) & ~1);
- FREE((void*)_res_conv_30);
- _res_constr.data[e] = _res_conv_30_conv;
+ for (size_t c = 0; c < _res_constr.datalen; c++) {
+ uint32_t _res_conv_28 = _res_vals[c];
+ LDKC2Tuple_usizeTransactionZ _res_conv_28_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)_res_conv_28) & ~1);
+ FREE((void*)_res_conv_28);
+ _res_constr.data[c] = _res_conv_28_conv;
}
CVec_C2Tuple_usizeTransactionZZ_free(_res_constr);
}
uint32_t __attribute__((visibility("default"))) TS_C2Tuple_SignatureCVec_SignatureZZ_clone(uint32_t orig) {
LDKC2Tuple_SignatureCVec_SignatureZZ* orig_conv = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(orig & ~1);
- LDKC2Tuple_SignatureCVec_SignatureZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
- *ret_ref = C2Tuple_SignatureCVec_SignatureZZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_SignatureCVec_SignatureZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
+ *ret_conv = C2Tuple_SignatureCVec_SignatureZZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
uint32_t __attribute__((visibility("default"))) TS_C2Tuple_SignatureCVec_SignatureZZ_new(int8_tArray a, ptrArray b) {
memcpy(b_conv_12_ref.compact_form, (uint8_t*)(b_conv_12 + 4), 64);
b_constr.data[m] = b_conv_12_ref;
}
- LDKC2Tuple_SignatureCVec_SignatureZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
- *ret_ref = C2Tuple_SignatureCVec_SignatureZZ_new(a_ref, b_constr);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_SignatureCVec_SignatureZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
+ *ret_conv = C2Tuple_SignatureCVec_SignatureZZ_new(a_ref, b_constr);
+ return ((uint64_t)ret_conv);
}
void __attribute__((visibility("default"))) TS_C2Tuple_SignatureCVec_SignatureZZ_free(uint32_t _res) {
return (uint64_t)ret_conv;
}
+uint32_t __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelMonitorZ_clone(uint32_t orig) {
+ LDKC2Tuple_BlockHashChannelMonitorZ* orig_conv = (LDKC2Tuple_BlockHashChannelMonitorZ*)(orig & ~1);
+ LDKC2Tuple_BlockHashChannelMonitorZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
+ *ret_conv = C2Tuple_BlockHashChannelMonitorZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
+}
+
uint32_t __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelMonitorZ_new(int8_tArray a, uint32_t b) {
LDKThirtyTwoBytes a_ref;
CHECK(*((uint32_t*)a) == 32);
b_conv.inner = (void*)(b & (~1));
b_conv.is_owned = (b & 1) || (b == 0);
b_conv = ChannelMonitor_clone(&b_conv);
- LDKC2Tuple_BlockHashChannelMonitorZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
- *ret_ref = C2Tuple_BlockHashChannelMonitorZ_new(a_ref, b_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_BlockHashChannelMonitorZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
+ *ret_conv = C2Tuple_BlockHashChannelMonitorZ_new(a_ref, b_conv);
+ return ((uint64_t)ret_conv);
}
void __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelMonitorZ_free(uint32_t _res) {
else
_res_constr.data = NULL;
uint32_t* _res_vals = (uint32_t*)(_res + 4);
- for (size_t m = 0; m < _res_constr.datalen; m++) {
- uint32_t _res_conv_38 = _res_vals[m];
- LDKC2Tuple_BlockHashChannelMonitorZ _res_conv_38_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)_res_conv_38) & ~1);
- FREE((void*)_res_conv_38);
- _res_constr.data[m] = _res_conv_38_conv;
+ for (size_t j = 0; j < _res_constr.datalen; j++) {
+ uint32_t _res_conv_35 = _res_vals[j];
+ LDKC2Tuple_BlockHashChannelMonitorZ _res_conv_35_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)_res_conv_35) & ~1);
+ FREE((void*)_res_conv_35);
+ _res_constr.data[j] = _res_conv_35_conv;
}
CVec_C2Tuple_BlockHashChannelMonitorZZ_free(_res_constr);
}
else
o_constr.data = NULL;
uint32_t* o_vals = (uint32_t*)(o + 4);
- for (size_t m = 0; m < o_constr.datalen; m++) {
- uint32_t o_conv_38 = o_vals[m];
- LDKC2Tuple_BlockHashChannelMonitorZ o_conv_38_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o_conv_38) & ~1);
- // Warning: we may need a move here but no clone is available for LDKC2Tuple_BlockHashChannelMonitorZ
- o_constr.data[m] = o_conv_38_conv;
+ for (size_t j = 0; j < o_constr.datalen; j++) {
+ uint32_t o_conv_35 = o_vals[j];
+ LDKC2Tuple_BlockHashChannelMonitorZ o_conv_35_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o_conv_35) & ~1);
+ o_conv_35_conv = C2Tuple_BlockHashChannelMonitorZ_clone((LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o_conv_35) & ~1));
+ o_constr.data[j] = o_conv_35_conv;
}
LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ), "LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ");
*ret_conv = CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(o_constr);
CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(_res_conv);
}
+uint32_t __attribute__((visibility("default"))) TS_CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(uint32_t orig) {
+ LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ* orig_conv = (LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ*)(orig & ~1);
+ LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ), "LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ");
+ *ret_conv = CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(orig_conv);
+ return (uint64_t)ret_conv;
+}
+
uint32_t __attribute__((visibility("default"))) TS_COption_u16Z_some(int16_t o) {
LDKCOption_u16Z *ret_copy = MALLOC(sizeof(LDKCOption_u16Z), "LDKCOption_u16Z");
*ret_copy = COption_u16Z_some(o);
uint32_t __attribute__((visibility("default"))) TS_C2Tuple_PaymentHashPaymentSecretZ_clone(uint32_t orig) {
LDKC2Tuple_PaymentHashPaymentSecretZ* orig_conv = (LDKC2Tuple_PaymentHashPaymentSecretZ*)(orig & ~1);
- LDKC2Tuple_PaymentHashPaymentSecretZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
- *ret_ref = C2Tuple_PaymentHashPaymentSecretZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_PaymentHashPaymentSecretZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
+ *ret_conv = C2Tuple_PaymentHashPaymentSecretZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
uint32_t __attribute__((visibility("default"))) TS_C2Tuple_PaymentHashPaymentSecretZ_new(int8_tArray a, int8_tArray b) {
LDKThirtyTwoBytes b_ref;
CHECK(*((uint32_t*)b) == 32);
memcpy(b_ref.data, (uint8_t*)(b + 4), 32);
- LDKC2Tuple_PaymentHashPaymentSecretZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
- *ret_ref = C2Tuple_PaymentHashPaymentSecretZ_new(a_ref, b_ref);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_PaymentHashPaymentSecretZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
+ *ret_conv = C2Tuple_PaymentHashPaymentSecretZ_new(a_ref, b_ref);
+ return ((uint64_t)ret_conv);
}
void __attribute__((visibility("default"))) TS_C2Tuple_PaymentHashPaymentSecretZ_free(uint32_t _res) {
b_conv.inner = (void*)(b & (~1));
b_conv.is_owned = (b & 1) || (b == 0);
// Warning: we need a move here but no clone is available for LDKChannelManager
- LDKC2Tuple_BlockHashChannelManagerZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelManagerZ), "LDKC2Tuple_BlockHashChannelManagerZ");
- *ret_ref = C2Tuple_BlockHashChannelManagerZ_new(a_ref, b_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_BlockHashChannelManagerZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelManagerZ), "LDKC2Tuple_BlockHashChannelManagerZ");
+ *ret_conv = C2Tuple_BlockHashChannelManagerZ_new(a_ref, b_conv);
+ return ((uint64_t)ret_conv);
}
void __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelManagerZ_free(uint32_t _res) {
uint32_t __attribute__((visibility("default"))) TS_C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(uint32_t orig) {
LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* orig_conv = (LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ*)(orig & ~1);
- LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
- *ret_ref = C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
+ *ret_conv = C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
uint32_t __attribute__((visibility("default"))) TS_C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(uint32_t a, int8_tArray b, uint32_t c) {
c_conv.inner = (void*)(c & (~1));
c_conv.is_owned = (c & 1) || (c == 0);
c_conv = InvoiceSignature_clone(&c_conv);
- LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
- *ret_ref = C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(a_conv, b_ref, c_conv);
- return (uint64_t)ret_ref;
+ LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
+ *ret_conv = C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(a_conv, b_ref, c_conv);
+ return ((uint64_t)ret_conv);
}
void __attribute__((visibility("default"))) TS_C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(uint32_t _res) {
uint32_t __attribute__((visibility("default"))) TS_C2Tuple_OutPointScriptZ_clone(uint32_t orig) {
LDKC2Tuple_OutPointScriptZ* orig_conv = (LDKC2Tuple_OutPointScriptZ*)(orig & ~1);
- LDKC2Tuple_OutPointScriptZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
- *ret_ref = C2Tuple_OutPointScriptZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_OutPointScriptZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
+ *ret_conv = C2Tuple_OutPointScriptZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
uint32_t __attribute__((visibility("default"))) TS_C2Tuple_OutPointScriptZ_new(uint32_t a, int8_tArray b) {
b_ref.datalen = *((uint32_t*)b);
b_ref.data = MALLOC(b_ref.datalen, "LDKCVec_u8Z Bytes");
memcpy(b_ref.data, (uint8_t*)(b + 4), b_ref.datalen);
- LDKC2Tuple_OutPointScriptZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
- *ret_ref = C2Tuple_OutPointScriptZ_new(a_conv, b_ref);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_OutPointScriptZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
+ *ret_conv = C2Tuple_OutPointScriptZ_new(a_conv, b_ref);
+ return ((uint64_t)ret_conv);
}
void __attribute__((visibility("default"))) TS_C2Tuple_OutPointScriptZ_free(uint32_t _res) {
uint32_t __attribute__((visibility("default"))) TS_C2Tuple_u32ScriptZ_clone(uint32_t orig) {
LDKC2Tuple_u32ScriptZ* orig_conv = (LDKC2Tuple_u32ScriptZ*)(orig & ~1);
- LDKC2Tuple_u32ScriptZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
- *ret_ref = C2Tuple_u32ScriptZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_u32ScriptZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
+ *ret_conv = C2Tuple_u32ScriptZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
uint32_t __attribute__((visibility("default"))) TS_C2Tuple_u32ScriptZ_new(int32_t a, int8_tArray b) {
b_ref.datalen = *((uint32_t*)b);
b_ref.data = MALLOC(b_ref.datalen, "LDKCVec_u8Z Bytes");
memcpy(b_ref.data, (uint8_t*)(b + 4), b_ref.datalen);
- LDKC2Tuple_u32ScriptZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
- *ret_ref = C2Tuple_u32ScriptZ_new(a, b_ref);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_u32ScriptZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
+ *ret_conv = C2Tuple_u32ScriptZ_new(a, b_ref);
+ return ((uint64_t)ret_conv);
}
void __attribute__((visibility("default"))) TS_C2Tuple_u32ScriptZ_free(uint32_t _res) {
else
_res_constr.data = NULL;
uint32_t* _res_vals = (uint32_t*)(_res + 4);
- for (size_t e = 0; e < _res_constr.datalen; e++) {
- uint32_t _res_conv_30 = _res_vals[e];
- LDKC2Tuple_u32ScriptZ _res_conv_30_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)_res_conv_30) & ~1);
- FREE((void*)_res_conv_30);
- _res_constr.data[e] = _res_conv_30_conv;
+ for (size_t v = 0; v < _res_constr.datalen; v++) {
+ uint32_t _res_conv_21 = _res_vals[v];
+ LDKC2Tuple_u32ScriptZ _res_conv_21_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)_res_conv_21) & ~1);
+ FREE((void*)_res_conv_21);
+ _res_constr.data[v] = _res_conv_21_conv;
}
CVec_C2Tuple_u32ScriptZZ_free(_res_constr);
}
uint32_t __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(uint32_t orig) {
LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* orig_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(orig & ~1);
- LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
- *ret_ref = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
+ *ret_conv = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
uint32_t __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(int8_tArray a, uint32_tArray b) {
else
b_constr.data = NULL;
uint32_t* b_vals = (uint32_t*)(b + 4);
- for (size_t e = 0; e < b_constr.datalen; e++) {
- uint32_t b_conv_30 = b_vals[e];
- LDKC2Tuple_u32ScriptZ b_conv_30_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_30) & ~1);
- b_conv_30_conv = C2Tuple_u32ScriptZ_clone((LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_30) & ~1));
- b_constr.data[e] = b_conv_30_conv;
- }
- LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
- *ret_ref = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a_ref, b_constr);
- return (uint64_t)ret_ref;
+ for (size_t v = 0; v < b_constr.datalen; v++) {
+ uint32_t b_conv_21 = b_vals[v];
+ LDKC2Tuple_u32ScriptZ b_conv_21_conv = *(LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_21) & ~1);
+ b_conv_21_conv = C2Tuple_u32ScriptZ_clone((LDKC2Tuple_u32ScriptZ*)(((uint64_t)b_conv_21) & ~1));
+ b_constr.data[v] = b_conv_21_conv;
+ }
+ LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
+ *ret_conv = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a_ref, b_constr);
+ return ((uint64_t)ret_conv);
}
void __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(uint32_t _res) {
else
_res_constr.data = NULL;
uint32_t* _res_vals = (uint32_t*)(_res + 4);
- for (size_t c = 0; c < _res_constr.datalen; c++) {
- uint32_t _res_conv_54 = _res_vals[c];
- LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res_conv_54_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(((uint64_t)_res_conv_54) & ~1);
- FREE((void*)_res_conv_54);
- _res_constr.data[c] = _res_conv_54_conv;
+ for (size_t o = 0; o < _res_constr.datalen; o++) {
+ uint32_t _res_conv_40 = _res_vals[o];
+ LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res_conv_40_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ*)(((uint64_t)_res_conv_40) & ~1);
+ FREE((void*)_res_conv_40);
+ _res_constr.data[o] = _res_conv_40_conv;
}
CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res_constr);
}
uint32_t __attribute__((visibility("default"))) TS_C2Tuple_u32TxOutZ_clone(uint32_t orig) {
LDKC2Tuple_u32TxOutZ* orig_conv = (LDKC2Tuple_u32TxOutZ*)(orig & ~1);
- LDKC2Tuple_u32TxOutZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
- *ret_ref = C2Tuple_u32TxOutZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_u32TxOutZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
+ *ret_conv = C2Tuple_u32TxOutZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
uint32_t __attribute__((visibility("default"))) TS_C2Tuple_u32TxOutZ_new(int32_t a, uint32_t b) {
LDKTxOut b_conv = *(LDKTxOut*)(((uint64_t)b) & ~1);
b_conv = TxOut_clone((LDKTxOut*)(((uint64_t)b) & ~1));
- LDKC2Tuple_u32TxOutZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
- *ret_ref = C2Tuple_u32TxOutZ_new(a, b_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_u32TxOutZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
+ *ret_conv = C2Tuple_u32TxOutZ_new(a, b_conv);
+ return ((uint64_t)ret_conv);
}
void __attribute__((visibility("default"))) TS_C2Tuple_u32TxOutZ_free(uint32_t _res) {
else
_res_constr.data = NULL;
uint32_t* _res_vals = (uint32_t*)(_res + 4);
- for (size_t z = 0; z < _res_constr.datalen; z++) {
- uint32_t _res_conv_25 = _res_vals[z];
- LDKC2Tuple_u32TxOutZ _res_conv_25_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)_res_conv_25) & ~1);
- FREE((void*)_res_conv_25);
- _res_constr.data[z] = _res_conv_25_conv;
+ for (size_t u = 0; u < _res_constr.datalen; u++) {
+ uint32_t _res_conv_20 = _res_vals[u];
+ LDKC2Tuple_u32TxOutZ _res_conv_20_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)_res_conv_20) & ~1);
+ FREE((void*)_res_conv_20);
+ _res_constr.data[u] = _res_conv_20_conv;
}
CVec_C2Tuple_u32TxOutZZ_free(_res_constr);
}
uint32_t __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(uint32_t orig) {
LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* orig_conv = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(orig & ~1);
- LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
- *ret_ref = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+ *ret_conv = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
uint32_t __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(int8_tArray a, uint32_tArray b) {
else
b_constr.data = NULL;
uint32_t* b_vals = (uint32_t*)(b + 4);
- for (size_t z = 0; z < b_constr.datalen; z++) {
- uint32_t b_conv_25 = b_vals[z];
- LDKC2Tuple_u32TxOutZ b_conv_25_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_25) & ~1);
- b_conv_25_conv = C2Tuple_u32TxOutZ_clone((LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_25) & ~1));
- b_constr.data[z] = b_conv_25_conv;
- }
- LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
- *ret_ref = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a_ref, b_constr);
- return (uint64_t)ret_ref;
+ for (size_t u = 0; u < b_constr.datalen; u++) {
+ uint32_t b_conv_20 = b_vals[u];
+ LDKC2Tuple_u32TxOutZ b_conv_20_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_20) & ~1);
+ b_conv_20_conv = C2Tuple_u32TxOutZ_clone((LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_20) & ~1));
+ b_constr.data[u] = b_conv_20_conv;
+ }
+ LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+ *ret_conv = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a_ref, b_constr);
+ return ((uint64_t)ret_conv);
}
void __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(uint32_t _res) {
else
_res_constr.data = NULL;
uint32_t* _res_vals = (uint32_t*)(_res + 4);
- for (size_t x = 0; x < _res_constr.datalen; x++) {
- uint32_t _res_conv_49 = _res_vals[x];
- LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res_conv_49_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(((uint64_t)_res_conv_49) & ~1);
- FREE((void*)_res_conv_49);
- _res_constr.data[x] = _res_conv_49_conv;
+ for (size_t n = 0; n < _res_constr.datalen; n++) {
+ uint32_t _res_conv_39 = _res_vals[n];
+ LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res_conv_39_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(((uint64_t)_res_conv_39) & ~1);
+ FREE((void*)_res_conv_39);
+ _res_constr.data[n] = _res_conv_39_conv;
}
CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res_constr);
}
uint32_t __attribute__((visibility("default"))) TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(uint32_t o) {
LDKC2Tuple_BlockHashChannelMonitorZ o_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o) & ~1);
- // Warning: we may need a move here but no clone is available for LDKC2Tuple_BlockHashChannelMonitorZ
+ o_conv = C2Tuple_BlockHashChannelMonitorZ_clone((LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o) & ~1));
LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ");
*ret_conv = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o_conv);
return (uint64_t)ret_conv;
CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res_conv);
}
+uint32_t __attribute__((visibility("default"))) TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(uint32_t orig) {
+ LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* orig_conv = (LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)(orig & ~1);
+ LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ");
+ *ret_conv = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(orig_conv);
+ return (uint64_t)ret_conv;
+}
+
uint32_t __attribute__((visibility("default"))) TS_CResult_NoneLightningErrorZ_ok() {
LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
*ret_conv = CResult_NoneLightningErrorZ_ok();
uint32_t __attribute__((visibility("default"))) TS_C2Tuple_PublicKeyTypeZ_clone(uint32_t orig) {
LDKC2Tuple_PublicKeyTypeZ* orig_conv = (LDKC2Tuple_PublicKeyTypeZ*)(orig & ~1);
- LDKC2Tuple_PublicKeyTypeZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
- *ret_ref = C2Tuple_PublicKeyTypeZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_PublicKeyTypeZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
+ *ret_conv = C2Tuple_PublicKeyTypeZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
uint32_t __attribute__((visibility("default"))) TS_C2Tuple_PublicKeyTypeZ_new(int8_tArray a, uint32_t b) {
CHECK(*((uint32_t*)a) == 33);
memcpy(a_ref.compressed_form, (uint8_t*)(a + 4), 33);
LDKType b_conv = *(LDKType*)(((uint64_t)b) & ~1);
- LDKC2Tuple_PublicKeyTypeZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
- *ret_ref = C2Tuple_PublicKeyTypeZ_new(a_ref, b_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_PublicKeyTypeZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
+ *ret_conv = C2Tuple_PublicKeyTypeZ_new(a_ref, b_conv);
+ return ((uint64_t)ret_conv);
}
void __attribute__((visibility("default"))) TS_C2Tuple_PublicKeyTypeZ_free(uint32_t _res) {
else
_res_constr.data = NULL;
uint32_t* _res_vals = (uint32_t*)(_res + 4);
- for (size_t c = 0; c < _res_constr.datalen; c++) {
- uint32_t _res_conv_28 = _res_vals[c];
- LDKC2Tuple_PublicKeyTypeZ _res_conv_28_conv = *(LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)_res_conv_28) & ~1);
- FREE((void*)_res_conv_28);
- _res_constr.data[c] = _res_conv_28_conv;
+ for (size_t z = 0; z < _res_constr.datalen; z++) {
+ uint32_t _res_conv_25 = _res_vals[z];
+ LDKC2Tuple_PublicKeyTypeZ _res_conv_25_conv = *(LDKC2Tuple_PublicKeyTypeZ*)(((uint64_t)_res_conv_25) & ~1);
+ FREE((void*)_res_conv_25);
+ _res_constr.data[z] = _res_conv_25_conv;
}
CVec_C2Tuple_PublicKeyTypeZZ_free(_res_constr);
}
uint32_t __attribute__((visibility("default"))) TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(uint32_t orig) {
LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* orig_conv = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(orig & ~1);
- LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
- *ret_ref = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig_conv);
- return (uint64_t)ret_ref;
+ LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
+ *ret_conv = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig_conv);
+ return ((uint64_t)ret_conv);
}
uint32_t __attribute__((visibility("default"))) TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(uint32_t a, uint32_t b, uint32_t c) {
c_conv.inner = (void*)(c & (~1));
c_conv.is_owned = (c & 1) || (c == 0);
c_conv = ChannelUpdate_clone(&c_conv);
- LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
- *ret_ref = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a_conv, b_conv, c_conv);
- return (uint64_t)ret_ref;
+ LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
+ *ret_conv = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a_conv, b_conv, c_conv);
+ return ((uint64_t)ret_conv);
}
void __attribute__((visibility("default"))) TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(uint32_t _res) {
else
_res_constr.data = NULL;
uint32_t* _res_vals = (uint32_t*)(_res + 4);
- for (size_t l = 0; l < _res_constr.datalen; l++) {
- uint32_t _res_conv_63 = _res_vals[l];
- LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res_conv_63_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)_res_conv_63) & ~1);
- FREE((void*)_res_conv_63);
- _res_constr.data[l] = _res_conv_63_conv;
+ for (size_t h = 0; h < _res_constr.datalen; h++) {
+ uint32_t _res_conv_59 = _res_vals[h];
+ LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res_conv_59_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)_res_conv_59) & ~1);
+ FREE((void*)_res_conv_59);
+ _res_constr.data[h] = _res_conv_59_conv;
}
CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res_constr);
}
LDKNetworkGraph o_conv;
o_conv.inner = (void*)(o & (~1));
o_conv.is_owned = (o & 1) || (o == 0);
- // Warning: we need a move here but no clone is available for LDKNetworkGraph
+ o_conv = NetworkGraph_clone(&o_conv);
LDKCResult_NetworkGraphDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetworkGraphDecodeErrorZ), "LDKCResult_NetworkGraphDecodeErrorZ");
*ret_conv = CResult_NetworkGraphDecodeErrorZ_ok(o_conv);
return (uint64_t)ret_conv;
CResult_NetworkGraphDecodeErrorZ_free(_res_conv);
}
+uint32_t __attribute__((visibility("default"))) TS_CResult_NetworkGraphDecodeErrorZ_clone(uint32_t orig) {
+ LDKCResult_NetworkGraphDecodeErrorZ* orig_conv = (LDKCResult_NetworkGraphDecodeErrorZ*)(orig & ~1);
+ LDKCResult_NetworkGraphDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetworkGraphDecodeErrorZ), "LDKCResult_NetworkGraphDecodeErrorZ");
+ *ret_conv = CResult_NetworkGraphDecodeErrorZ_clone(orig_conv);
+ return (uint64_t)ret_conv;
+}
+
uint32_t __attribute__((visibility("default"))) TS_CResult_NetAddressu8Z_ok(uint32_t o) {
LDKNetAddress o_conv = *(LDKNetAddress*)(((uint64_t)o) & ~1);
o_conv = NetAddress_clone((LDKNetAddress*)(((uint64_t)o) & ~1));
LDKChannelMonitor this_arg_conv;
this_arg_conv.inner = (void*)(this_arg & (~1));
this_arg_conv.is_owned = false;
- LDKC2Tuple_OutPointScriptZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
- *ret_ref = ChannelMonitor_get_funding_txo(&this_arg_conv);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_OutPointScriptZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
+ *ret_conv = ChannelMonitor_get_funding_txo(&this_arg_conv);
+ return ((uint64_t)ret_conv);
}
uint32_tArray __attribute__((visibility("default"))) TS_ChannelMonitor_get_outputs_to_watch(uint32_t this_arg) {
LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ ret_var = ChannelMonitor_get_outputs_to_watch(&this_arg_conv);
uint32_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
uint32_t *ret_arr_ptr = (uint32_t*)(ret_arr + 4);
- for (size_t c = 0; c < ret_var.datalen; c++) {
- LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_conv_54_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
- *ret_conv_54_ref = ret_var.data[c];
- ret_arr_ptr[c] = (uint64_t)ret_conv_54_ref;
+ for (size_t o = 0; o < ret_var.datalen; o++) {
+ LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_conv_40_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
+ *ret_conv_40_conv = ret_var.data[o];
+ ret_arr_ptr[o] = ((uint64_t)ret_conv_40_conv);
}
FREE(ret_var.data);
return ret_arr;
else
txdata_constr.data = NULL;
uint32_t* txdata_vals = (uint32_t*)(txdata + 4);
- for (size_t e = 0; e < txdata_constr.datalen; e++) {
- uint32_t txdata_conv_30 = txdata_vals[e];
- LDKC2Tuple_usizeTransactionZ txdata_conv_30_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_30) & ~1);
- txdata_conv_30_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_30) & ~1));
- txdata_constr.data[e] = txdata_conv_30_conv;
+ for (size_t c = 0; c < txdata_constr.datalen; c++) {
+ uint32_t txdata_conv_28 = txdata_vals[c];
+ LDKC2Tuple_usizeTransactionZ txdata_conv_28_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1);
+ txdata_conv_28_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1));
+ txdata_constr.data[c] = txdata_conv_28_conv;
}
LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(((uint64_t)broadcaster) & ~1);
LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)(((uint64_t)fee_estimator) & ~1);
LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ret_var = ChannelMonitor_block_connected(&this_arg_conv, header_ref, txdata_constr, height, broadcaster_conv, fee_estimator_conv, logger_conv);
uint32_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
uint32_t *ret_arr_ptr = (uint32_t*)(ret_arr + 4);
- for (size_t x = 0; x < ret_var.datalen; x++) {
- LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_49_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
- *ret_conv_49_ref = ret_var.data[x];
- ret_arr_ptr[x] = (uint64_t)ret_conv_49_ref;
+ for (size_t n = 0; n < ret_var.datalen; n++) {
+ LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_39_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+ *ret_conv_39_conv = ret_var.data[n];
+ ret_arr_ptr[n] = ((uint64_t)ret_conv_39_conv);
}
FREE(ret_var.data);
return ret_arr;
else
txdata_constr.data = NULL;
uint32_t* txdata_vals = (uint32_t*)(txdata + 4);
- for (size_t e = 0; e < txdata_constr.datalen; e++) {
- uint32_t txdata_conv_30 = txdata_vals[e];
- LDKC2Tuple_usizeTransactionZ txdata_conv_30_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_30) & ~1);
- txdata_conv_30_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_30) & ~1));
- txdata_constr.data[e] = txdata_conv_30_conv;
+ for (size_t c = 0; c < txdata_constr.datalen; c++) {
+ uint32_t txdata_conv_28 = txdata_vals[c];
+ LDKC2Tuple_usizeTransactionZ txdata_conv_28_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1);
+ txdata_conv_28_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_28) & ~1));
+ txdata_constr.data[c] = txdata_conv_28_conv;
}
LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(((uint64_t)broadcaster) & ~1);
LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)(((uint64_t)fee_estimator) & ~1);
LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ret_var = ChannelMonitor_transactions_confirmed(&this_arg_conv, header_ref, txdata_constr, height, broadcaster_conv, fee_estimator_conv, logger_conv);
uint32_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
uint32_t *ret_arr_ptr = (uint32_t*)(ret_arr + 4);
- for (size_t x = 0; x < ret_var.datalen; x++) {
- LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_49_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
- *ret_conv_49_ref = ret_var.data[x];
- ret_arr_ptr[x] = (uint64_t)ret_conv_49_ref;
+ for (size_t n = 0; n < ret_var.datalen; n++) {
+ LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_39_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+ *ret_conv_39_conv = ret_var.data[n];
+ ret_arr_ptr[n] = ((uint64_t)ret_conv_39_conv);
}
FREE(ret_var.data);
return ret_arr;
LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ret_var = ChannelMonitor_best_block_updated(&this_arg_conv, header_ref, height, broadcaster_conv, fee_estimator_conv, logger_conv);
uint32_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
uint32_t *ret_arr_ptr = (uint32_t*)(ret_arr + 4);
- for (size_t x = 0; x < ret_var.datalen; x++) {
- LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_49_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
- *ret_conv_49_ref = ret_var.data[x];
- ret_arr_ptr[x] = (uint64_t)ret_conv_49_ref;
+ for (size_t n = 0; n < ret_var.datalen; n++) {
+ LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_39_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+ *ret_conv_39_conv = ret_var.data[n];
+ ret_arr_ptr[n] = ((uint64_t)ret_conv_39_conv);
}
FREE(ret_var.data);
return ret_arr;
this_arg_conv.is_owned = false;
LDKCOption_u64Z min_value_msat_conv = *(LDKCOption_u64Z*)(((uint64_t)min_value_msat) & ~1);
min_value_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)(((uint64_t)min_value_msat) & ~1));
- LDKC2Tuple_PaymentHashPaymentSecretZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
- *ret_ref = ChannelManager_create_inbound_payment(&this_arg_conv, min_value_msat_conv, invoice_expiry_delta_secs, user_payment_id);
- return (uint64_t)ret_ref;
+ LDKC2Tuple_PaymentHashPaymentSecretZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PaymentHashPaymentSecretZ), "LDKC2Tuple_PaymentHashPaymentSecretZ");
+ *ret_conv = ChannelManager_create_inbound_payment(&this_arg_conv, min_value_msat_conv, invoice_expiry_delta_secs, user_payment_id);
+ return ((uint64_t)ret_conv);
}
uint32_t __attribute__((visibility("default"))) TS_ChannelManager_create_inbound_payment_for_hash(uint32_t this_arg, int8_tArray payment_hash, uint32_t min_value_msat, int32_t invoice_expiry_delta_secs, int64_t user_payment_id) {
NetworkGraph_free(this_obj_conv);
}
+uint32_t __attribute__((visibility("default"))) TS_NetworkGraph_clone(uint32_t orig) {
+ LDKNetworkGraph orig_conv;
+ orig_conv.inner = (void*)(orig & (~1));
+ orig_conv.is_owned = false;
+ LDKNetworkGraph ret_var = NetworkGraph_clone(&orig_conv);
+ CHECK((((uint64_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uint64_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ uint64_t ret_ref = (uint64_t)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
void __attribute__((visibility("default"))) TS_ReadOnlyNetworkGraph_free(uint32_t this_obj) {
LDKReadOnlyNetworkGraph this_obj_conv;
this_obj_conv.inner = (void*)(this_obj & (~1));
LDKNetworkGraph val_conv;
val_conv.inner = (void*)(val & (~1));
val_conv.is_owned = (val & 1) || (val == 0);
- // Warning: we need a move here but no clone is available for LDKNetworkGraph
+ val_conv = NetworkGraph_clone(&val_conv);
NetGraphMsgHandler_set_network_graph(&this_ptr_conv, val_conv);
}
LDKNetworkGraph network_graph_conv;
network_graph_conv.inner = (void*)(network_graph & (~1));
network_graph_conv.is_owned = (network_graph & 1) || (network_graph == 0);
- // Warning: we need a move here but no clone is available for LDKNetworkGraph
+ network_graph_conv = NetworkGraph_clone(&network_graph_conv);
LDKCOption_AccessZ chain_access_conv = *(LDKCOption_AccessZ*)(((uint64_t)chain_access) & ~1);
// Warning: we may need a move here but no clone is available for LDKCOption_AccessZ
if (chain_access_conv.tag == LDKCOption_AccessZ_Some) {
this_arg_conv.inner = (void*)(this_arg & (~1));
this_arg_conv.is_owned = (this_arg & 1) || (this_arg == 0);
this_arg_conv = SignedRawInvoice_clone(&this_arg_conv);
- LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
- *ret_ref = SignedRawInvoice_into_parts(this_arg_conv);
- return (uint64_t)ret_ref;
+ LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ), "LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ");
+ *ret_conv = SignedRawInvoice_into_parts(this_arg_conv);
+ return ((uint64_t)ret_conv);
}
uint32_t __attribute__((visibility("default"))) TS_SignedRawInvoice_raw_invoice(uint32_t this_arg) {
public static native number LDKCResult_TxOutAccessErrorZ_get_ok(long arg);
public static native AccessError LDKCResult_TxOutAccessErrorZ_get_err(long arg);
public static native long LDKC2Tuple_usizeTransactionZ_new(number a, Uint8Array b);
- public static native number LDKC2Tuple_usizeTransactionZ_get_a(long ptr);
- public static native Uint8Array LDKC2Tuple_usizeTransactionZ_get_b(long ptr);
+ // uintptr_t C2Tuple_usizeTransactionZ_get_a(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR tuple);
+ export function C2Tuple_usizeTransactionZ_get_a(tuple: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_get_a(tuple);
+ return nativeResponseValue;
+ }
+ // struct LDKTransaction C2Tuple_usizeTransactionZ_get_b(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR tuple);
+ export function C2Tuple_usizeTransactionZ_get_b(tuple: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_get_b(tuple);
+ return decodeArray(nativeResponseValue);
+ }
public static native long LDKCVec_C2Tuple_usizeTransactionZZ_new(number[] elems);
public static native boolean LDKCResult_NoneChannelMonitorUpdateErrZ_result_ok(long arg);
public static native void LDKCResult_NoneChannelMonitorUpdateErrZ_get_ok(long arg);
public static native void LDKCResult_NoneNoneZ_get_ok(long arg);
public static native void LDKCResult_NoneNoneZ_get_err(long arg);
public static native long LDKC2Tuple_SignatureCVec_SignatureZZ_new(Uint8Array a, Uint8Array[] b);
- public static native Uint8Array LDKC2Tuple_SignatureCVec_SignatureZZ_get_a(long ptr);
- public static native Uint8Array[] LDKC2Tuple_SignatureCVec_SignatureZZ_get_b(long ptr);
+ // struct LDKSignature C2Tuple_SignatureCVec_SignatureZZ_get_a(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR tuple);
+ export function C2Tuple_SignatureCVec_SignatureZZ_get_a(tuple: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_get_a(tuple);
+ return decodeArray(nativeResponseValue);
+ }
+ // struct LDKCVec_SignatureZ C2Tuple_SignatureCVec_SignatureZZ_get_b(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR tuple);
+ export function C2Tuple_SignatureCVec_SignatureZZ_get_b(tuple: number): Uint8Array[] {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_get_b(tuple);
+ return nativeResponseValue;
+ }
public static native boolean LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_result_ok(long arg);
public static native number LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(long arg);
public static native void LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(long arg);
public static native Uint8Array LDKCResult_TransactionNoneZ_get_ok(long arg);
public static native void LDKCResult_TransactionNoneZ_get_err(long arg);
public static native long LDKC2Tuple_BlockHashChannelMonitorZ_new(Uint8Array a, number b);
- public static native Uint8Array LDKC2Tuple_BlockHashChannelMonitorZ_get_a(long ptr);
- public static native number LDKC2Tuple_BlockHashChannelMonitorZ_get_b(long ptr);
+ // struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelMonitorZ_get_a(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR tuple);
+ export function C2Tuple_BlockHashChannelMonitorZ_get_a(tuple: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_get_a(tuple);
+ return decodeArray(nativeResponseValue);
+ }
+ // struct LDKChannelMonitor C2Tuple_BlockHashChannelMonitorZ_get_b(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR tuple);
+ export function C2Tuple_BlockHashChannelMonitorZ_get_b(tuple: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_get_b(tuple);
+ return nativeResponseValue;
+ }
public static native long LDKCVec_C2Tuple_BlockHashChannelMonitorZZ_new(number[] elems);
public static native boolean LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_result_ok(long arg);
public static native number[] LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_ok(long arg);
public static native LDKNetAddress LDKNetAddress_ref_from_ptr(long ptr);
public static native long LDKCVec_NetAddressZ_new(number[] elems);
public static native long LDKC2Tuple_PaymentHashPaymentSecretZ_new(Uint8Array a, Uint8Array b);
- public static native Uint8Array LDKC2Tuple_PaymentHashPaymentSecretZ_get_a(long ptr);
- public static native Uint8Array LDKC2Tuple_PaymentHashPaymentSecretZ_get_b(long ptr);
+ // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_a(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR tuple);
+ export function C2Tuple_PaymentHashPaymentSecretZ_get_a(tuple: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_get_a(tuple);
+ return decodeArray(nativeResponseValue);
+ }
+ // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_b(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR tuple);
+ export function C2Tuple_PaymentHashPaymentSecretZ_get_b(tuple: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_get_b(tuple);
+ return decodeArray(nativeResponseValue);
+ }
public static native boolean LDKCResult_PaymentSecretAPIErrorZ_result_ok(long arg);
public static native Uint8Array LDKCResult_PaymentSecretAPIErrorZ_get_ok(long arg);
public static native number LDKCResult_PaymentSecretAPIErrorZ_get_err(long arg);
public static native long LDKC2Tuple_BlockHashChannelManagerZ_new(Uint8Array a, number b);
- public static native Uint8Array LDKC2Tuple_BlockHashChannelManagerZ_get_a(long ptr);
- public static native number LDKC2Tuple_BlockHashChannelManagerZ_get_b(long ptr);
+ // struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelManagerZ_get_a(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR tuple);
+ export function C2Tuple_BlockHashChannelManagerZ_get_a(tuple: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_get_a(tuple);
+ return decodeArray(nativeResponseValue);
+ }
+ // struct LDKChannelManager *C2Tuple_BlockHashChannelManagerZ_get_b(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR tuple);
+ export function C2Tuple_BlockHashChannelManagerZ_get_b(tuple: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_get_b(tuple);
+ return nativeResponseValue;
+ }
public static native boolean LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_result_ok(long arg);
public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(long arg);
public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(long arg);
public static native number LDKCResult_SignedRawInvoiceNoneZ_get_ok(long arg);
public static native void LDKCResult_SignedRawInvoiceNoneZ_get_err(long arg);
public static native long LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_new(number a, Uint8Array b, number c);
- public static native number LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(long ptr);
- public static native Uint8Array LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(long ptr);
- public static native number LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(long ptr);
+ // struct LDKRawInvoice C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple);
+ export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(tuple: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(tuple);
+ return nativeResponseValue;
+ }
+ // struct LDKThirtyTwoBytes C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple);
+ export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(tuple: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(tuple);
+ return decodeArray(nativeResponseValue);
+ }
+ // struct LDKInvoiceSignature C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple);
+ export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(tuple: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(tuple);
+ return nativeResponseValue;
+ }
public static native boolean LDKCResult_PayeePubKeyErrorZ_result_ok(long arg);
public static native number LDKCResult_PayeePubKeyErrorZ_get_ok(long arg);
public static native Secp256k1Error LDKCResult_PayeePubKeyErrorZ_get_err(long arg);
public static native void LDKCResult_NoneMonitorUpdateErrorZ_get_ok(long arg);
public static native number LDKCResult_NoneMonitorUpdateErrorZ_get_err(long arg);
public static native long LDKC2Tuple_OutPointScriptZ_new(number a, Uint8Array b);
- public static native number LDKC2Tuple_OutPointScriptZ_get_a(long ptr);
- public static native Uint8Array LDKC2Tuple_OutPointScriptZ_get_b(long ptr);
+ // struct LDKOutPoint C2Tuple_OutPointScriptZ_get_a(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR tuple);
+ export function C2Tuple_OutPointScriptZ_get_a(tuple: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_get_a(tuple);
+ return nativeResponseValue;
+ }
+ // struct LDKCVec_u8Z C2Tuple_OutPointScriptZ_get_b(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR tuple);
+ export function C2Tuple_OutPointScriptZ_get_b(tuple: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_get_b(tuple);
+ return decodeArray(nativeResponseValue);
+ }
public static native long LDKC2Tuple_u32ScriptZ_new(number a, Uint8Array b);
- public static native number LDKC2Tuple_u32ScriptZ_get_a(long ptr);
- public static native Uint8Array LDKC2Tuple_u32ScriptZ_get_b(long ptr);
+ // uint32_t C2Tuple_u32ScriptZ_get_a(LDKC2Tuple_u32ScriptZ *NONNULL_PTR tuple);
+ export function C2Tuple_u32ScriptZ_get_a(tuple: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_get_a(tuple);
+ return nativeResponseValue;
+ }
+ // struct LDKCVec_u8Z C2Tuple_u32ScriptZ_get_b(LDKC2Tuple_u32ScriptZ *NONNULL_PTR tuple);
+ export function C2Tuple_u32ScriptZ_get_b(tuple: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_get_b(tuple);
+ return decodeArray(nativeResponseValue);
+ }
public static native long LDKCVec_C2Tuple_u32ScriptZZ_new(number[] elems);
public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(Uint8Array a, number[] b);
- public static native Uint8Array LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(long ptr);
- public static native number[] LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(long ptr);
+ // struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR tuple);
+ export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(tuple: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(tuple);
+ return decodeArray(nativeResponseValue);
+ }
+ // struct LDKCVec_C2Tuple_u32ScriptZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR tuple);
+ export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(tuple: number): number[] {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(tuple);
+ return nativeResponseValue;
+ }
public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_new(number[] elems);
public static class LDKPaymentPurpose {
private LDKPaymentPurpose() {}
public static native LDKEvent LDKEvent_ref_from_ptr(long ptr);
public static native long LDKCVec_EventZ_new(number[] elems);
public static native long LDKC2Tuple_u32TxOutZ_new(number a, number b);
- public static native number LDKC2Tuple_u32TxOutZ_get_a(long ptr);
- public static native number LDKC2Tuple_u32TxOutZ_get_b(long ptr);
+ // uint32_t C2Tuple_u32TxOutZ_get_a(LDKC2Tuple_u32TxOutZ *NONNULL_PTR tuple);
+ export function C2Tuple_u32TxOutZ_get_a(tuple: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_get_a(tuple);
+ return nativeResponseValue;
+ }
+ // struct LDKTxOut C2Tuple_u32TxOutZ_get_b(LDKC2Tuple_u32TxOutZ *NONNULL_PTR tuple);
+ export function C2Tuple_u32TxOutZ_get_b(tuple: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_get_b(tuple);
+ return nativeResponseValue;
+ }
public static native long LDKCVec_C2Tuple_u32TxOutZZ_new(number[] elems);
public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(Uint8Array a, number[] b);
- public static native Uint8Array LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(long ptr);
- public static native number[] LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(long ptr);
+ // struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR tuple);
+ export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(tuple: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(tuple);
+ return decodeArray(nativeResponseValue);
+ }
+ // struct LDKCVec_C2Tuple_u32TxOutZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR tuple);
+ export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(tuple: number): number[] {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(tuple);
+ return nativeResponseValue;
+ }
public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_new(number[] elems);
public static class LDKBalance {
private LDKBalance() {}
public static native void LDKCResult_NoneLightningErrorZ_get_ok(long arg);
public static native number LDKCResult_NoneLightningErrorZ_get_err(long arg);
public static native long LDKC2Tuple_PublicKeyTypeZ_new(Uint8Array a, number b);
- public static native Uint8Array LDKC2Tuple_PublicKeyTypeZ_get_a(long ptr);
- public static native number LDKC2Tuple_PublicKeyTypeZ_get_b(long ptr);
+ // struct LDKPublicKey C2Tuple_PublicKeyTypeZ_get_a(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR tuple);
+ export function C2Tuple_PublicKeyTypeZ_get_a(tuple: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_PublicKeyTypeZ_get_a(tuple);
+ return decodeArray(nativeResponseValue);
+ }
+ // struct LDKType C2Tuple_PublicKeyTypeZ_get_b(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR tuple);
+ export function C2Tuple_PublicKeyTypeZ_get_b(tuple: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_PublicKeyTypeZ_get_b(tuple);
+ return nativeResponseValue;
+ }
public static native long LDKCVec_C2Tuple_PublicKeyTypeZZ_new(number[] elems);
public static native boolean LDKCResult_boolLightningErrorZ_result_ok(long arg);
public static native boolean LDKCResult_boolLightningErrorZ_get_ok(long arg);
public static native number LDKCResult_boolLightningErrorZ_get_err(long arg);
public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(number a, number b, number c);
- public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(long ptr);
- public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(long ptr);
- public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(long ptr);
+ // struct LDKChannelAnnouncement C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple);
+ export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(tuple: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(tuple);
+ return nativeResponseValue;
+ }
+ // struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple);
+ export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(tuple: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(tuple);
+ return nativeResponseValue;
+ }
+ // struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple);
+ export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(tuple: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(tuple);
+ return nativeResponseValue;
+ }
public static native long LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new(number[] elems);
public static native long LDKCVec_NodeAnnouncementZ_new(number[] elems);
public static native boolean LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok(long arg);
const nativeResponseValue = wasm.CResult_TransactionNoneZ_clone(orig);
return nativeResponseValue;
}
+ // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_clone(const struct LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR orig);
+ export function C2Tuple_BlockHashChannelMonitorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_clone(orig);
+ return nativeResponseValue;
+ }
// struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
export function C2Tuple_BlockHashChannelMonitorZ_new(a: Uint8Array, b: number): number {
if(!isWasmInitialized) {
const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(_res);
// debug statements here
}
+ // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(const struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ *NONNULL_PTR orig);
+ export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
// struct LDKCOption_u16Z COption_u16Z_some(uint16_t o);
export function COption_u16Z_some(o: number): number {
if(!isWasmInitialized) {
const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res);
// debug statements here
}
+ // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(const struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR orig);
+ export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
// struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void);
export function CResult_NoneLightningErrorZ_ok(): number {
if(!isWasmInitialized) {
const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_free(_res);
// debug statements here
}
+ // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_clone(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR orig);
+ export function CResult_NetworkGraphDecodeErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
// struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_ok(struct LDKNetAddress o);
export function CResult_NetAddressu8Z_ok(o: number): number {
if(!isWasmInitialized) {
const nativeResponseValue = wasm.NetworkGraph_free(this_obj);
// debug statements here
}
+ // struct LDKNetworkGraph NetworkGraph_clone(const struct LDKNetworkGraph *NONNULL_PTR orig);
+ export function NetworkGraph_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.NetworkGraph_clone(orig);
+ return nativeResponseValue;
+ }
// void ReadOnlyNetworkGraph_free(struct LDKReadOnlyNetworkGraph this_obj);
export function ReadOnlyNetworkGraph_free(this_obj: number): void {
if(!isWasmInitialized) {
this.ptrs_to.add(funding_txo);
}
- public TwoTuple<Uint8Array, Uint8Array> create_inbound_payment(Option_u64Z min_value_msat, number invoice_expiry_delta_secs, number user_payment_id) {
+ public TwoTuple_PaymentHashPaymentSecretZ create_inbound_payment(Option_u64Z min_value_msat, number invoice_expiry_delta_secs, number user_payment_id) {
number ret = bindings.ChannelManager_create_inbound_payment(this.ptr, min_value_msat.ptr, invoice_expiry_delta_secs, user_payment_id);
- Uint8Array ret_a = bindings.LDKC2Tuple_PaymentHashPaymentSecretZ_get_a(ret);
- Uint8Array ret_b = bindings.LDKC2Tuple_PaymentHashPaymentSecretZ_get_b(ret);
- TwoTuple<Uint8Array, Uint8Array> ret_conv = new TwoTuple<Uint8Array, Uint8Array>(ret_a, ret_b, () -> {
- bindings.C2Tuple_PaymentHashPaymentSecretZ_free(ret);
- });
- return ret_conv;
+ TwoTuple_PaymentHashPaymentSecretZ ret_hu_conv = new TwoTuple_PaymentHashPaymentSecretZ(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
}
public Result_PaymentSecretAPIErrorZ create_inbound_payment_for_hash(Uint8Array payment_hash, Option_u64Z min_value_msat, number invoice_expiry_delta_secs, number user_payment_id) {
return ret;
}
- public TwoTuple<OutPoint, Uint8Array> get_funding_txo() {
+ public TwoTuple_OutPointScriptZ get_funding_txo() {
number ret = bindings.ChannelMonitor_get_funding_txo(this.ptr);
- number ret_a = bindings.LDKC2Tuple_OutPointScriptZ_get_a(ret);
- const ret_a_hu_conv: OutPoint = new OutPoint(null, ret_a);
- ret_a_hu_conv.ptrs_to.add(this);;
- Uint8Array ret_b = bindings.LDKC2Tuple_OutPointScriptZ_get_b(ret);
- TwoTuple<OutPoint, Uint8Array> ret_conv = new TwoTuple<OutPoint, Uint8Array>(ret_a_hu_conv, ret_b, () -> {
- bindings.C2Tuple_OutPointScriptZ_free(ret);
- });
- ret_a_hu_conv.ptrs_to.add(ret_conv);
- return ret_conv;
- }
-
- public TwoTuple<Uint8Array, TwoTuple<Number, Uint8Array>[]>[] get_outputs_to_watch() {
+ TwoTuple_OutPointScriptZ ret_hu_conv = new TwoTuple_OutPointScriptZ(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ public TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ[] get_outputs_to_watch() {
number[] ret = bindings.ChannelMonitor_get_outputs_to_watch(this.ptr);
- TwoTuple<Uint8Array, TwoTuple<Number, Uint8Array>[]>[] ret_conv_54_arr = new TwoTuple[ret.length];
- for (int c = 0; c < ret.length; c++) {
- number ret_conv_54 = ret[c];
- Uint8Array ret_conv_54_a = bindings.LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(ret_conv_54);
- number[] ret_conv_54_b = bindings.LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(ret_conv_54);
- TwoTuple<Number, Uint8Array>[] ret_conv_54_b_conv_30_arr = new TwoTuple[ret_conv_54_b.length];
- for (int e = 0; e < ret_conv_54_b.length; e++) {
- number ret_conv_54_b_conv_30 = ret_conv_54_b[e];
- number ret_conv_54_b_conv_30_a = bindings.LDKC2Tuple_u32ScriptZ_get_a(ret_conv_54_b_conv_30);
- Uint8Array ret_conv_54_b_conv_30_b = bindings.LDKC2Tuple_u32ScriptZ_get_b(ret_conv_54_b_conv_30);
- TwoTuple<Number, Uint8Array> ret_conv_54_b_conv_30_conv = new TwoTuple<Number, Uint8Array>(ret_conv_54_b_conv_30_a, ret_conv_54_b_conv_30_b, () -> {
- bindings.C2Tuple_u32ScriptZ_free(ret_conv_54_b_conv_30);
- });
- ret_conv_54_b_conv_30_arr[e] = ret_conv_54_b_conv_30_conv;
- };
- TwoTuple<Uint8Array, TwoTuple<Number, Uint8Array>[]> ret_conv_54_conv = new TwoTuple<Uint8Array, TwoTuple<Number, Uint8Array>[]>(ret_conv_54_a, ret_conv_54_b_conv_30_arr);
- // Warning: We may not free the C tuple object!
- ret_conv_54_arr[c] = ret_conv_54_conv;
+ TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ[] ret_conv_40_arr = new TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ[ret.length];
+ for (int o = 0; o < ret.length; o++) {
+ number ret_conv_40 = ret[o];
+ TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ ret_conv_40_hu_conv = new TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ(null, ret_conv_40);
+ ret_conv_40_hu_conv.ptrs_to.add(this);
+ ret_conv_40_arr[o] = ret_conv_40_hu_conv;
}
- return ret_conv_54_arr;
+ return ret_conv_40_arr;
}
public void load_outputs_to_watch(Filter filter) {
return ret;
}
- public TwoTuple<Uint8Array, TwoTuple<Number, TxOut>[]>[] block_connected(Uint8Array header, TwoTuple<Number, Uint8Array>[] txdata, number height, BroadcasterInterface broadcaster, FeeEstimator fee_estimator, Logger logger) {
- number[] ret = bindings.ChannelMonitor_block_connected(this.ptr, header, txdata != null ? Arrays.stream(txdata).map(txdata_conv_30 -> bindings.C2Tuple_usizeTransactionZ_new(txdata_conv_30.a, txdata_conv_30.b)).toArray(number[]::new) : null, height, broadcaster == null ? 0 : broadcaster.ptr, fee_estimator == null ? 0 : fee_estimator.ptr, logger == null ? 0 : logger.ptr);
- TwoTuple<Uint8Array, TwoTuple<Number, TxOut>[]>[] ret_conv_49_arr = new TwoTuple[ret.length];
- for (int x = 0; x < ret.length; x++) {
- number ret_conv_49 = ret[x];
- Uint8Array ret_conv_49_a = bindings.LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(ret_conv_49);
- number[] ret_conv_49_b = bindings.LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(ret_conv_49);
- TwoTuple<Number, TxOut>[] ret_conv_49_b_conv_25_arr = new TwoTuple[ret_conv_49_b.length];
- for (int z = 0; z < ret_conv_49_b.length; z++) {
- number ret_conv_49_b_conv_25 = ret_conv_49_b[z];
- number ret_conv_49_b_conv_25_a = bindings.LDKC2Tuple_u32TxOutZ_get_a(ret_conv_49_b_conv_25);
- number ret_conv_49_b_conv_25_b = bindings.TxOut_clone(bindings.LDKC2Tuple_u32TxOutZ_get_b(ret_conv_49_b_conv_25));
- TxOut ret_conv_49_b_conv_25_b_conv = new TxOut(null, ret_conv_49_b_conv_25_b);;
- TwoTuple<Number, TxOut> ret_conv_49_b_conv_25_conv = new TwoTuple<Number, TxOut>(ret_conv_49_b_conv_25_a, ret_conv_49_b_conv_25_b_conv, () -> {
- bindings.C2Tuple_u32TxOutZ_free(ret_conv_49_b_conv_25);
- });
- ret_conv_49_b_conv_25_b_conv.ptrs_to.add(ret_conv_49_b_conv_25_conv);
- ret_conv_49_b_conv_25_arr[z] = ret_conv_49_b_conv_25_conv;
- };
- TwoTuple<Uint8Array, TwoTuple<Number, TxOut>[]> ret_conv_49_conv = new TwoTuple<Uint8Array, TwoTuple<Number, TxOut>[]>(ret_conv_49_a, ret_conv_49_b_conv_25_arr);
- // Warning: We may not free the C tuple object!
- ret_conv_49_arr[x] = ret_conv_49_conv;
+ public TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ[] block_connected(Uint8Array header, TwoTuple_usizeTransactionZ[] txdata, number height, BroadcasterInterface broadcaster, FeeEstimator fee_estimator, Logger logger) {
+ number[] ret = bindings.ChannelMonitor_block_connected(this.ptr, header, txdata != null ? Arrays.stream(txdata).map(txdata_conv_28 -> txdata_conv_28 != null ? txdata_conv_28.ptr : 0).toArray(number[]::new) : null, height, broadcaster == null ? 0 : broadcaster.ptr, fee_estimator == null ? 0 : fee_estimator.ptr, logger == null ? 0 : logger.ptr);
+ TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ[] ret_conv_39_arr = new TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ[ret.length];
+ for (int n = 0; n < ret.length; n++) {
+ number ret_conv_39 = ret[n];
+ TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ ret_conv_39_hu_conv = new TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ(null, ret_conv_39);
+ ret_conv_39_hu_conv.ptrs_to.add(this);
+ ret_conv_39_arr[n] = ret_conv_39_hu_conv;
}
this.ptrs_to.add(broadcaster);
this.ptrs_to.add(fee_estimator);
this.ptrs_to.add(logger);
- return ret_conv_49_arr;
+ return ret_conv_39_arr;
}
public void block_disconnected(Uint8Array header, number height, BroadcasterInterface broadcaster, FeeEstimator fee_estimator, Logger logger) {
this.ptrs_to.add(logger);
}
- public TwoTuple<Uint8Array, TwoTuple<Number, TxOut>[]>[] transactions_confirmed(Uint8Array header, TwoTuple<Number, Uint8Array>[] txdata, number height, BroadcasterInterface broadcaster, FeeEstimator fee_estimator, Logger logger) {
- number[] ret = bindings.ChannelMonitor_transactions_confirmed(this.ptr, header, txdata != null ? Arrays.stream(txdata).map(txdata_conv_30 -> bindings.C2Tuple_usizeTransactionZ_new(txdata_conv_30.a, txdata_conv_30.b)).toArray(number[]::new) : null, height, broadcaster == null ? 0 : broadcaster.ptr, fee_estimator == null ? 0 : fee_estimator.ptr, logger == null ? 0 : logger.ptr);
- TwoTuple<Uint8Array, TwoTuple<Number, TxOut>[]>[] ret_conv_49_arr = new TwoTuple[ret.length];
- for (int x = 0; x < ret.length; x++) {
- number ret_conv_49 = ret[x];
- Uint8Array ret_conv_49_a = bindings.LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(ret_conv_49);
- number[] ret_conv_49_b = bindings.LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(ret_conv_49);
- TwoTuple<Number, TxOut>[] ret_conv_49_b_conv_25_arr = new TwoTuple[ret_conv_49_b.length];
- for (int z = 0; z < ret_conv_49_b.length; z++) {
- number ret_conv_49_b_conv_25 = ret_conv_49_b[z];
- number ret_conv_49_b_conv_25_a = bindings.LDKC2Tuple_u32TxOutZ_get_a(ret_conv_49_b_conv_25);
- number ret_conv_49_b_conv_25_b = bindings.TxOut_clone(bindings.LDKC2Tuple_u32TxOutZ_get_b(ret_conv_49_b_conv_25));
- TxOut ret_conv_49_b_conv_25_b_conv = new TxOut(null, ret_conv_49_b_conv_25_b);;
- TwoTuple<Number, TxOut> ret_conv_49_b_conv_25_conv = new TwoTuple<Number, TxOut>(ret_conv_49_b_conv_25_a, ret_conv_49_b_conv_25_b_conv, () -> {
- bindings.C2Tuple_u32TxOutZ_free(ret_conv_49_b_conv_25);
- });
- ret_conv_49_b_conv_25_b_conv.ptrs_to.add(ret_conv_49_b_conv_25_conv);
- ret_conv_49_b_conv_25_arr[z] = ret_conv_49_b_conv_25_conv;
- };
- TwoTuple<Uint8Array, TwoTuple<Number, TxOut>[]> ret_conv_49_conv = new TwoTuple<Uint8Array, TwoTuple<Number, TxOut>[]>(ret_conv_49_a, ret_conv_49_b_conv_25_arr);
- // Warning: We may not free the C tuple object!
- ret_conv_49_arr[x] = ret_conv_49_conv;
+ public TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ[] transactions_confirmed(Uint8Array header, TwoTuple_usizeTransactionZ[] txdata, number height, BroadcasterInterface broadcaster, FeeEstimator fee_estimator, Logger logger) {
+ number[] ret = bindings.ChannelMonitor_transactions_confirmed(this.ptr, header, txdata != null ? Arrays.stream(txdata).map(txdata_conv_28 -> txdata_conv_28 != null ? txdata_conv_28.ptr : 0).toArray(number[]::new) : null, height, broadcaster == null ? 0 : broadcaster.ptr, fee_estimator == null ? 0 : fee_estimator.ptr, logger == null ? 0 : logger.ptr);
+ TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ[] ret_conv_39_arr = new TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ[ret.length];
+ for (int n = 0; n < ret.length; n++) {
+ number ret_conv_39 = ret[n];
+ TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ ret_conv_39_hu_conv = new TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ(null, ret_conv_39);
+ ret_conv_39_hu_conv.ptrs_to.add(this);
+ ret_conv_39_arr[n] = ret_conv_39_hu_conv;
}
this.ptrs_to.add(broadcaster);
this.ptrs_to.add(fee_estimator);
this.ptrs_to.add(logger);
- return ret_conv_49_arr;
+ return ret_conv_39_arr;
}
public void transaction_unconfirmed(Uint8Array txid, BroadcasterInterface broadcaster, FeeEstimator fee_estimator, Logger logger) {
this.ptrs_to.add(logger);
}
- public TwoTuple<Uint8Array, TwoTuple<Number, TxOut>[]>[] best_block_updated(Uint8Array header, number height, BroadcasterInterface broadcaster, FeeEstimator fee_estimator, Logger logger) {
+ public TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ[] best_block_updated(Uint8Array header, number height, BroadcasterInterface broadcaster, FeeEstimator fee_estimator, Logger logger) {
number[] ret = bindings.ChannelMonitor_best_block_updated(this.ptr, header, height, broadcaster == null ? 0 : broadcaster.ptr, fee_estimator == null ? 0 : fee_estimator.ptr, logger == null ? 0 : logger.ptr);
- TwoTuple<Uint8Array, TwoTuple<Number, TxOut>[]>[] ret_conv_49_arr = new TwoTuple[ret.length];
- for (int x = 0; x < ret.length; x++) {
- number ret_conv_49 = ret[x];
- Uint8Array ret_conv_49_a = bindings.LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(ret_conv_49);
- number[] ret_conv_49_b = bindings.LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(ret_conv_49);
- TwoTuple<Number, TxOut>[] ret_conv_49_b_conv_25_arr = new TwoTuple[ret_conv_49_b.length];
- for (int z = 0; z < ret_conv_49_b.length; z++) {
- number ret_conv_49_b_conv_25 = ret_conv_49_b[z];
- number ret_conv_49_b_conv_25_a = bindings.LDKC2Tuple_u32TxOutZ_get_a(ret_conv_49_b_conv_25);
- number ret_conv_49_b_conv_25_b = bindings.TxOut_clone(bindings.LDKC2Tuple_u32TxOutZ_get_b(ret_conv_49_b_conv_25));
- TxOut ret_conv_49_b_conv_25_b_conv = new TxOut(null, ret_conv_49_b_conv_25_b);;
- TwoTuple<Number, TxOut> ret_conv_49_b_conv_25_conv = new TwoTuple<Number, TxOut>(ret_conv_49_b_conv_25_a, ret_conv_49_b_conv_25_b_conv, () -> {
- bindings.C2Tuple_u32TxOutZ_free(ret_conv_49_b_conv_25);
- });
- ret_conv_49_b_conv_25_b_conv.ptrs_to.add(ret_conv_49_b_conv_25_conv);
- ret_conv_49_b_conv_25_arr[z] = ret_conv_49_b_conv_25_conv;
- };
- TwoTuple<Uint8Array, TwoTuple<Number, TxOut>[]> ret_conv_49_conv = new TwoTuple<Uint8Array, TwoTuple<Number, TxOut>[]>(ret_conv_49_a, ret_conv_49_b_conv_25_arr);
- // Warning: We may not free the C tuple object!
- ret_conv_49_arr[x] = ret_conv_49_conv;
+ TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ[] ret_conv_39_arr = new TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ[ret.length];
+ for (int n = 0; n < ret.length; n++) {
+ number ret_conv_39 = ret[n];
+ TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ ret_conv_39_hu_conv = new TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ(null, ret_conv_39);
+ ret_conv_39_hu_conv.ptrs_to.add(this);
+ ret_conv_39_arr[n] = ret_conv_39_hu_conv;
}
this.ptrs_to.add(broadcaster);
this.ptrs_to.add(fee_estimator);
this.ptrs_to.add(logger);
- return ret_conv_49_arr;
+ return ret_conv_39_arr;
}
public Uint8Array[] get_relevant_txids() {
let structImplementation = <bindings.LDKConfirm>{
// todo: in-line interface filling
transactions_confirmed (header: Uint8Array, txdata: number[], height: number): void {
- TwoTuple<Number, Uint8Array>[] txdata_conv_30_arr = new TwoTuple[txdata.length];
- for (int e = 0; e < txdata.length; e++) {
- number txdata_conv_30 = txdata[e];
- number txdata_conv_30_a = bindings.LDKC2Tuple_usizeTransactionZ_get_a(txdata_conv_30);
- Uint8Array txdata_conv_30_b = bindings.LDKC2Tuple_usizeTransactionZ_get_b(txdata_conv_30);
- TwoTuple<Number, Uint8Array> txdata_conv_30_conv = new TwoTuple<Number, Uint8Array>(txdata_conv_30_a, txdata_conv_30_b, () -> {
- bindings.C2Tuple_usizeTransactionZ_free(txdata_conv_30);
- });
- txdata_conv_30_arr[e] = txdata_conv_30_conv;
+ TwoTuple_usizeTransactionZ[] txdata_conv_28_arr = new TwoTuple_usizeTransactionZ[txdata.length];
+ for (int c = 0; c < txdata.length; c++) {
+ number txdata_conv_28 = txdata[c];
+ TwoTuple_usizeTransactionZ txdata_conv_28_hu_conv = new TwoTuple_usizeTransactionZ(null, txdata_conv_28);
+ txdata_conv_28_hu_conv.ptrs_to.add(this);
+ txdata_conv_28_arr[c] = txdata_conv_28_hu_conv;
}
- arg.transactions_confirmed(header, txdata_conv_30_arr, height);
+ arg.transactions_confirmed(header, txdata_conv_28_arr, height);
},
transaction_unconfirmed (txid: Uint8Array): void {
}
export interface ConfirmInterface {
- transactions_confirmed(header: Uint8Array, txdata: TwoTuple<Number, Uint8Array>[], height: number): void;
+ transactions_confirmed(header: Uint8Array, txdata: TwoTuple_usizeTransactionZ[], height: number): void;
transaction_unconfirmed(txid: Uint8Array): void;
best_block_updated(header: Uint8Array, height: number): void;
get_relevant_txids(): Uint8Array[];
class LDKConfirmHolder {
held: Confirm;
}
- public void transactions_confirmed(Uint8Array header, TwoTuple<Number, Uint8Array>[] txdata, number height) {
- bindings.Confirm_transactions_confirmed(this.ptr, header, txdata != null ? Arrays.stream(txdata).map(txdata_conv_30 -> bindings.C2Tuple_usizeTransactionZ_new(txdata_conv_30.a, txdata_conv_30.b)).toArray(number[]::new) : null, height);
+ public void transactions_confirmed(Uint8Array header, TwoTuple_usizeTransactionZ[] txdata, number height) {
+ bindings.Confirm_transactions_confirmed(this.ptr, header, txdata != null ? Arrays.stream(txdata).map(txdata_conv_28 -> txdata_conv_28 != null ? txdata_conv_28.ptr : 0).toArray(number[]::new) : null, height);
}
public void transaction_unconfirmed(Uint8Array txid) {
},
get_and_clear_pending_msg (): number[] {
- TwoTuple<Uint8Array, Type>[] ret = arg.get_and_clear_pending_msg();
- result: number[] = ret != null ? Arrays.stream(ret).map(ret_conv_28 -> bindings.C2Tuple_PublicKeyTypeZ_new(ret_conv_28.a, ret_conv_28.b == null ? 0 : ret_conv_28.b.ptr)).toArray(number[]::new) : null;
- for (TwoTuple<Uint8Array, Type> ret_conv_28: ret) { impl_holder.held.ptrs_to.add(ret_conv_28.b); };
+ TwoTuple_PublicKeyTypeZ[] ret = arg.get_and_clear_pending_msg();
+ result: number[] = ret != null ? Arrays.stream(ret).map(ret_conv_25 -> ret_conv_25 != null ? ret_conv_25.ptr : 0).toArray(number[]::new) : null;
return result;
},
export interface CustomMessageHandlerInterface {
handle_custom_message(msg: Type, sender_node_id: Uint8Array): Result_NoneLightningErrorZ;
- get_and_clear_pending_msg(): TwoTuple<Uint8Array, Type>[];
+ get_and_clear_pending_msg(): TwoTuple_PublicKeyTypeZ[];
}
return ret_hu_conv;
}
- public TwoTuple<Uint8Array, Type>[] get_and_clear_pending_msg() {
+ public TwoTuple_PublicKeyTypeZ[] get_and_clear_pending_msg() {
number[] ret = bindings.CustomMessageHandler_get_and_clear_pending_msg(this.ptr);
- TwoTuple<Uint8Array, Type>[] ret_conv_28_arr = new TwoTuple[ret.length];
- for (int c = 0; c < ret.length; c++) {
- number ret_conv_28 = ret[c];
- Uint8Array ret_conv_28_a = bindings.LDKC2Tuple_PublicKeyTypeZ_get_a(ret_conv_28);
- number ret_conv_28_b = bindings.LDKC2Tuple_PublicKeyTypeZ_get_b(ret_conv_28);
- Type ret_hu_conv = new Type(null, ret_conv_28_b);
- ret_hu_conv.ptrs_to.add(this);;
- TwoTuple<Uint8Array, Type> ret_conv_28_conv = new TwoTuple<Uint8Array, Type>(ret_conv_28_a, ret_hu_conv, () -> {
- bindings.C2Tuple_PublicKeyTypeZ_free(ret_conv_28);
- });
- ret_hu_conv.ptrs_to.add(ret_conv_28_conv);
- ret_conv_28_arr[c] = ret_conv_28_conv;
+ TwoTuple_PublicKeyTypeZ[] ret_conv_25_arr = new TwoTuple_PublicKeyTypeZ[ret.length];
+ for (int z = 0; z < ret.length; z++) {
+ number ret_conv_25 = ret[z];
+ TwoTuple_PublicKeyTypeZ ret_conv_25_hu_conv = new TwoTuple_PublicKeyTypeZ(null, ret_conv_25);
+ ret_conv_25_hu_conv.ptrs_to.add(this);
+ ret_conv_25_arr[z] = ret_conv_25_hu_conv;
}
- return ret_conv_28_arr;
+ return ret_conv_25_arr;
}
}
return ret_hu_conv;
}
- public void set_network_graph(Uint8Array val_genesis_hash) {
- bindings.NetGraphMsgHandler_set_network_graph(this.ptr, bindings.NetworkGraph_new(val_genesis_hash));
+ public void set_network_graph(NetworkGraph val) {
+ bindings.NetGraphMsgHandler_set_network_graph(this.ptr, val == null ? 0 : val.ptr & ~1);
+ this.ptrs_to.add(val);
}
- public static NetGraphMsgHandler constructor_new(Uint8Array network_graph_genesis_hash, Option_AccessZ chain_access, Logger logger) {
- number ret = bindings.NetGraphMsgHandler_new(bindings.NetworkGraph_new(network_graph_genesis_hash), chain_access.ptr, logger == null ? 0 : logger.ptr);
+ public static NetGraphMsgHandler constructor_new(NetworkGraph network_graph, Option_AccessZ chain_access, Logger logger) {
+ number ret = bindings.NetGraphMsgHandler_new(network_graph == null ? 0 : network_graph.ptr & ~1, chain_access.ptr, logger == null ? 0 : logger.ptr);
const ret_hu_conv: NetGraphMsgHandler = new NetGraphMsgHandler(null, ret);
ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ ret_hu_conv.ptrs_to.add(network_graph);
ret_hu_conv.ptrs_to.add(logger);
return ret_hu_conv;
}
bindings.NetworkGraph_free(this.ptr);
}
}
+ public NetworkGraph clone() {
+ number ret = bindings.NetworkGraph_clone(this.ptr);
+ const ret_hu_conv: NetworkGraph = new NetworkGraph(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
public Uint8Array write() {
Uint8Array ret = bindings.NetworkGraph_write(this.ptr);
return ret;
super(null, ptr);
}
}
- public static Option_AccessZ constructor__some(Access o) {
+ public static Option_AccessZ constructor_some(Access o) {
number ret = bindings.COption_AccessZ_some(o == null ? 0 : o.ptr);
Option_AccessZ ret_hu_conv = Option_AccessZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(ret_hu_conv);
return ret_hu_conv;
}
- public static Option_AccessZ constructor__none() {
+ public static Option_AccessZ constructor_none() {
number ret = bindings.COption_AccessZ_none();
Option_AccessZ ret_hu_conv = Option_AccessZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(ret_hu_conv);
}
export class Some extends COption_C2Tuple_usizeTransactionZZ {
- public some: TwoTuple<Number, Uint8Array>;
+ public some: TwoTuple_usizeTransactionZ;
private constructor(ptr: number, obj: bindings.LDKCOption_C2Tuple_usizeTransactionZZ.Some) {
super(null, ptr);
const some: number = obj.some;
- number some_a = bindings.LDKC2Tuple_usizeTransactionZ_get_a(some);
- Uint8Array some_b = bindings.LDKC2Tuple_usizeTransactionZ_get_b(some);
- TwoTuple<Number, Uint8Array> some_conv = new TwoTuple<Number, Uint8Array>(some_a, some_b, () -> {
- bindings.C2Tuple_usizeTransactionZ_free(some);
- });
- this.some = some_conv;
+ TwoTuple_usizeTransactionZ some_hu_conv = new TwoTuple_usizeTransactionZ(null, some);
+ some_hu_conv.ptrs_to.add(this);
+ this.some = some_hu_conv;
}
}
export class None extends COption_C2Tuple_usizeTransactionZZ {
super(null, ptr);
}
}
- public static Option_C2Tuple_usizeTransactionZZ constructor__some(TwoTuple<Number, Uint8Array> o) {
- number ret = bindings.COption_C2Tuple_usizeTransactionZZ_some(bindings.C2Tuple_usizeTransactionZ_new(o.a, o.b));
+ public static Option_C2Tuple_usizeTransactionZZ constructor_some(TwoTuple_usizeTransactionZ o) {
+ number ret = bindings.COption_C2Tuple_usizeTransactionZZ_some(o != null ? o.ptr : 0);
Option_C2Tuple_usizeTransactionZZ ret_hu_conv = Option_C2Tuple_usizeTransactionZZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(ret_hu_conv);
return ret_hu_conv;
}
- public static Option_C2Tuple_usizeTransactionZZ constructor__none() {
+ public static Option_C2Tuple_usizeTransactionZZ constructor_none() {
number ret = bindings.COption_C2Tuple_usizeTransactionZZ_none();
Option_C2Tuple_usizeTransactionZZ ret_hu_conv = Option_C2Tuple_usizeTransactionZZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(ret_hu_conv);
return ret_hu_conv;
}
- public Option_C2Tuple_usizeTransactionZZ _clone() {
+ public Option_C2Tuple_usizeTransactionZZ clone() {
number ret = bindings.COption_C2Tuple_usizeTransactionZZ_clone(this.ptr);
Option_C2Tuple_usizeTransactionZZ ret_hu_conv = Option_C2Tuple_usizeTransactionZZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(this);
super(null, ptr);
}
}
- public static Option_FilterZ constructor__some(Filter o) {
+ public static Option_FilterZ constructor_some(Filter o) {
number ret = bindings.COption_FilterZ_some(o == null ? 0 : o.ptr);
Option_FilterZ ret_hu_conv = Option_FilterZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(ret_hu_conv);
return ret_hu_conv;
}
- public static Option_FilterZ constructor__none() {
+ public static Option_FilterZ constructor_none() {
number ret = bindings.COption_FilterZ_none();
Option_FilterZ ret_hu_conv = Option_FilterZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(ret_hu_conv);
super(null, ptr);
}
}
- public static Option_NetworkUpdateZ constructor__some(NetworkUpdate o) {
+ public static Option_NetworkUpdateZ constructor_some(NetworkUpdate o) {
number ret = bindings.COption_NetworkUpdateZ_some(o.ptr);
Option_NetworkUpdateZ ret_hu_conv = Option_NetworkUpdateZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(ret_hu_conv);
return ret_hu_conv;
}
- public static Option_NetworkUpdateZ constructor__none() {
+ public static Option_NetworkUpdateZ constructor_none() {
number ret = bindings.COption_NetworkUpdateZ_none();
Option_NetworkUpdateZ ret_hu_conv = Option_NetworkUpdateZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(ret_hu_conv);
return ret_hu_conv;
}
- public Option_NetworkUpdateZ _clone() {
+ public Option_NetworkUpdateZ clone() {
number ret = bindings.COption_NetworkUpdateZ_clone(this.ptr);
Option_NetworkUpdateZ ret_hu_conv = Option_NetworkUpdateZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(this);
super(null, ptr);
}
}
- public static Option_TypeZ constructor__some(Type o) {
+ public static Option_TypeZ constructor_some(Type o) {
number ret = bindings.COption_TypeZ_some(o == null ? 0 : o.ptr);
Option_TypeZ ret_hu_conv = Option_TypeZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(ret_hu_conv);
return ret_hu_conv;
}
- public static Option_TypeZ constructor__none() {
+ public static Option_TypeZ constructor_none() {
number ret = bindings.COption_TypeZ_none();
Option_TypeZ ret_hu_conv = Option_TypeZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(ret_hu_conv);
return ret_hu_conv;
}
- public Option_TypeZ _clone() {
+ public Option_TypeZ clone() {
number ret = bindings.COption_TypeZ_clone(this.ptr);
Option_TypeZ ret_hu_conv = Option_TypeZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(this);
super(null, ptr);
}
}
- public static Option_u16Z constructor__some(number o) {
+ public static Option_u16Z constructor_some(number o) {
number ret = bindings.COption_u16Z_some(o);
Option_u16Z ret_hu_conv = Option_u16Z.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(ret_hu_conv);
return ret_hu_conv;
}
- public static Option_u16Z constructor__none() {
+ public static Option_u16Z constructor_none() {
number ret = bindings.COption_u16Z_none();
Option_u16Z ret_hu_conv = Option_u16Z.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(ret_hu_conv);
return ret_hu_conv;
}
- public Option_u16Z _clone() {
+ public Option_u16Z clone() {
number ret = bindings.COption_u16Z_clone(this.ptr);
Option_u16Z ret_hu_conv = Option_u16Z.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(this);
super(null, ptr);
}
}
- public static Option_u32Z constructor__some(number o) {
+ public static Option_u32Z constructor_some(number o) {
number ret = bindings.COption_u32Z_some(o);
Option_u32Z ret_hu_conv = Option_u32Z.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(ret_hu_conv);
return ret_hu_conv;
}
- public static Option_u32Z constructor__none() {
+ public static Option_u32Z constructor_none() {
number ret = bindings.COption_u32Z_none();
Option_u32Z ret_hu_conv = Option_u32Z.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(ret_hu_conv);
return ret_hu_conv;
}
- public Option_u32Z _clone() {
+ public Option_u32Z clone() {
number ret = bindings.COption_u32Z_clone(this.ptr);
Option_u32Z ret_hu_conv = Option_u32Z.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(this);
super(null, ptr);
}
}
- public static Option_u64Z constructor__some(number o) {
+ public static Option_u64Z constructor_some(number o) {
number ret = bindings.COption_u64Z_some(o);
Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(ret_hu_conv);
return ret_hu_conv;
}
- public static Option_u64Z constructor__none() {
+ public static Option_u64Z constructor_none() {
number ret = bindings.COption_u64Z_none();
Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(ret_hu_conv);
return ret_hu_conv;
}
- public Option_u64Z _clone() {
+ public Option_u64Z clone() {
number ret = bindings.COption_u64Z_clone(this.ptr);
Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(this);
}
}
- public static Result_AcceptChannelDecodeErrorZ constructor__ok(AcceptChannel o) {
+ public static Result_AcceptChannelDecodeErrorZ constructor_ok(AcceptChannel o) {
number ret = bindings.CResult_AcceptChannelDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_AcceptChannelDecodeErrorZ ret_hu_conv = Result_AcceptChannelDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_AcceptChannelDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_AcceptChannelDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_AcceptChannelDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_AcceptChannelDecodeErrorZ ret_hu_conv = Result_AcceptChannelDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_AcceptChannelDecodeErrorZ _clone() {
+ public Result_AcceptChannelDecodeErrorZ clone() {
number ret = bindings.CResult_AcceptChannelDecodeErrorZ_clone(this.ptr);
Result_AcceptChannelDecodeErrorZ ret_hu_conv = Result_AcceptChannelDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_AnnouncementSignaturesDecodeErrorZ constructor__ok(AnnouncementSignatures o) {
+ public static Result_AnnouncementSignaturesDecodeErrorZ constructor_ok(AnnouncementSignatures o) {
number ret = bindings.CResult_AnnouncementSignaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_AnnouncementSignaturesDecodeErrorZ ret_hu_conv = Result_AnnouncementSignaturesDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_AnnouncementSignaturesDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_AnnouncementSignaturesDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_AnnouncementSignaturesDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_AnnouncementSignaturesDecodeErrorZ ret_hu_conv = Result_AnnouncementSignaturesDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_AnnouncementSignaturesDecodeErrorZ _clone() {
+ public Result_AnnouncementSignaturesDecodeErrorZ clone() {
number ret = bindings.CResult_AnnouncementSignaturesDecodeErrorZ_clone(this.ptr);
Result_AnnouncementSignaturesDecodeErrorZ ret_hu_conv = Result_AnnouncementSignaturesDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_BuiltCommitmentTransactionDecodeErrorZ constructor__ok(BuiltCommitmentTransaction o) {
+ public static Result_BuiltCommitmentTransactionDecodeErrorZ constructor_ok(BuiltCommitmentTransaction o) {
number ret = bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_BuiltCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_BuiltCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_BuiltCommitmentTransactionDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_BuiltCommitmentTransactionDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_BuiltCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_BuiltCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_BuiltCommitmentTransactionDecodeErrorZ _clone() {
+ public Result_BuiltCommitmentTransactionDecodeErrorZ clone() {
number ret = bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(this.ptr);
Result_BuiltCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_BuiltCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
public static final class Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_OK extends Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ {
- public final TwoTuple<Uint8Array, ChannelManager> res;
+ public final TwoTuple_BlockHashChannelManagerZ res;
private Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_OK(Object _dummy, long ptr) {
super(_dummy, ptr);
number res = bindings.LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(ptr);
- Uint8Array res_a = bindings.LDKC2Tuple_BlockHashChannelManagerZ_get_a(res);
- number res_b = bindings.LDKC2Tuple_BlockHashChannelManagerZ_get_b(res);
- const res_b_hu_conv: ChannelManager = new ChannelManager(null, res_b);
- res_b_hu_conv.ptrs_to.add(this);;
- TwoTuple<Uint8Array, ChannelManager> res_conv = new TwoTuple<Uint8Array, ChannelManager>(res_a, res_b_hu_conv, () -> {
- bindings.C2Tuple_BlockHashChannelManagerZ_free(res);
- });
- res_b_hu_conv.ptrs_to.add(res_conv);
- this.res = res_conv;
+ TwoTuple_BlockHashChannelManagerZ res_hu_conv = new TwoTuple_BlockHashChannelManagerZ(null, res);
+ res_hu_conv.ptrs_to.add(this);
+ this.res = res_hu_conv;
}
}
}
}
- public static Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ constructor__ok(TwoTuple<Uint8Array, ChannelManager> o) {
- number ret = bindings.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(bindings.C2Tuple_BlockHashChannelManagerZ_new(o.a, o.b == null ? 0 : o.b.ptr & ~1));
+ public static Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ constructor_ok(TwoTuple_BlockHashChannelManagerZ o) {
+ number ret = bindings.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o != null ? o.ptr : 0);
Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.constr_from_ptr(ret);
- ret_hu_conv.ptrs_to.add(o.b);
- // Due to rust's strict-ownership memory model, in some cases we need to "move"
- // an object to pass exclusive ownership to the function being called.
- // In most cases, we avoid ret_hu_conv being visible in GC'd languages by cloning the object
- // at the FFI layer, creating a new object which Rust can claim ownership of
- // However, in some cases (eg here), there is no way to clone an object, and thus
- // we actually have to pass full ownership to Rust.
- // Thus, after ret_hu_conv call, o.b is reset to null and is now a dummy object.
- o.b.ptr = 0;
return ret_hu_conv;
}
- public static Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
}
}
public static final class Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_OK extends Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ {
- public final TwoTuple<Uint8Array, ChannelMonitor> res;
+ public final TwoTuple_BlockHashChannelMonitorZ res;
private Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_OK(Object _dummy, long ptr) {
super(_dummy, ptr);
number res = bindings.LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(ptr);
- Uint8Array res_a = bindings.LDKC2Tuple_BlockHashChannelMonitorZ_get_a(res);
- number res_b = bindings.LDKC2Tuple_BlockHashChannelMonitorZ_get_b(res);
- const res_b_hu_conv: ChannelMonitor = new ChannelMonitor(null, res_b);
- res_b_hu_conv.ptrs_to.add(this);;
- TwoTuple<Uint8Array, ChannelMonitor> res_conv = new TwoTuple<Uint8Array, ChannelMonitor>(res_a, res_b_hu_conv, () -> {
- bindings.C2Tuple_BlockHashChannelMonitorZ_free(res);
- });
- res_b_hu_conv.ptrs_to.add(res_conv);
- this.res = res_conv;
+ TwoTuple_BlockHashChannelMonitorZ res_hu_conv = new TwoTuple_BlockHashChannelMonitorZ(null, res);
+ res_hu_conv.ptrs_to.add(this);
+ this.res = res_hu_conv;
}
}
}
}
- public static Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ constructor__ok(TwoTuple<Uint8Array, ChannelMonitor> o) {
- number ret = bindings.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(bindings.C2Tuple_BlockHashChannelMonitorZ_new(o.a, o.b == null ? 0 : o.b.ptr & ~1));
+ public static Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ constructor_ok(TwoTuple_BlockHashChannelMonitorZ o) {
+ number ret = bindings.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o != null ? o.ptr : 0);
Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.constr_from_ptr(ret);
- ret_hu_conv.ptrs_to.add(o.b);
return ret_hu_conv;
}
- public static Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
+ public Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ clone() {
+ number ret = bindings.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(this.ptr);
+ Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
}
}
public static final class Result_C2Tuple_SignatureCVec_SignatureZZNoneZ_OK extends Result_C2Tuple_SignatureCVec_SignatureZZNoneZ {
- public final TwoTuple<Uint8Array, Uint8Array[]> res;
+ public final TwoTuple_SignatureCVec_SignatureZZ res;
private Result_C2Tuple_SignatureCVec_SignatureZZNoneZ_OK(Object _dummy, long ptr) {
super(_dummy, ptr);
number res = bindings.LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(ptr);
- Uint8Array res_a = bindings.LDKC2Tuple_SignatureCVec_SignatureZZ_get_a(res);
- Uint8Array[] res_b = bindings.LDKC2Tuple_SignatureCVec_SignatureZZ_get_b(res);
- TwoTuple<Uint8Array, Uint8Array[]> res_conv = new TwoTuple<Uint8Array, Uint8Array[]>(res_a, res_b, () -> {
- bindings.C2Tuple_SignatureCVec_SignatureZZ_free(res);
- });
- this.res = res_conv;
+ TwoTuple_SignatureCVec_SignatureZZ res_hu_conv = new TwoTuple_SignatureCVec_SignatureZZ(null, res);
+ res_hu_conv.ptrs_to.add(this);
+ this.res = res_hu_conv;
}
}
}
}
- public static Result_C2Tuple_SignatureCVec_SignatureZZNoneZ constructor__ok(TwoTuple<Uint8Array, Uint8Array[]> o) {
- number ret = bindings.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(bindings.C2Tuple_SignatureCVec_SignatureZZ_new(o.a, o.b));
+ public static Result_C2Tuple_SignatureCVec_SignatureZZNoneZ constructor_ok(TwoTuple_SignatureCVec_SignatureZZ o) {
+ number ret = bindings.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o != null ? o.ptr : 0);
Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_hu_conv = Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public static Result_C2Tuple_SignatureCVec_SignatureZZNoneZ constructor__err() {
+ public static Result_C2Tuple_SignatureCVec_SignatureZZNoneZ constructor_err() {
number ret = bindings.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_hu_conv = Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public Result_C2Tuple_SignatureCVec_SignatureZZNoneZ _clone() {
+ public Result_C2Tuple_SignatureCVec_SignatureZZNoneZ clone() {
number ret = bindings.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(this.ptr);
Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_hu_conv = Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_COption_TypeZDecodeErrorZ constructor__ok(Option_TypeZ o) {
+ public static Result_COption_TypeZDecodeErrorZ constructor_ok(Option_TypeZ o) {
number ret = bindings.CResult_COption_TypeZDecodeErrorZ_ok(o.ptr);
Result_COption_TypeZDecodeErrorZ ret_hu_conv = Result_COption_TypeZDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public static Result_COption_TypeZDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_COption_TypeZDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_COption_TypeZDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_COption_TypeZDecodeErrorZ ret_hu_conv = Result_COption_TypeZDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_COption_TypeZDecodeErrorZ _clone() {
+ public Result_COption_TypeZDecodeErrorZ clone() {
number ret = bindings.CResult_COption_TypeZDecodeErrorZ_clone(this.ptr);
Result_COption_TypeZDecodeErrorZ ret_hu_conv = Result_COption_TypeZDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_CResult_NetAddressu8ZDecodeErrorZ constructor__ok(Result_NetAddressu8Z o) {
+ public static Result_CResult_NetAddressu8ZDecodeErrorZ constructor_ok(Result_NetAddressu8Z o) {
number ret = bindings.CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o != null ? o.ptr : 0);
Result_CResult_NetAddressu8ZDecodeErrorZ ret_hu_conv = Result_CResult_NetAddressu8ZDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public static Result_CResult_NetAddressu8ZDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_CResult_NetAddressu8ZDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_CResult_NetAddressu8ZDecodeErrorZ ret_hu_conv = Result_CResult_NetAddressu8ZDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_CResult_NetAddressu8ZDecodeErrorZ _clone() {
+ public Result_CResult_NetAddressu8ZDecodeErrorZ clone() {
number ret = bindings.CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(this.ptr);
Result_CResult_NetAddressu8ZDecodeErrorZ ret_hu_conv = Result_CResult_NetAddressu8ZDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
public static final class Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_OK extends Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ {
- public final TwoTuple<Uint8Array, ChannelMonitor>[] res;
+ public final TwoTuple_BlockHashChannelMonitorZ[] res;
private Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_OK(Object _dummy, long ptr) {
super(_dummy, ptr);
number[] res = bindings.LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_ok(ptr);
- TwoTuple<Uint8Array, ChannelMonitor>[] res_conv_38_arr = new TwoTuple[res.length];
- for (int m = 0; m < res.length; m++) {
- number res_conv_38 = res[m];
- Uint8Array res_conv_38_a = bindings.LDKC2Tuple_BlockHashChannelMonitorZ_get_a(res_conv_38);
- number res_conv_38_b = bindings.LDKC2Tuple_BlockHashChannelMonitorZ_get_b(res_conv_38);
- const res_conv_38_b_hu_conv: ChannelMonitor = new ChannelMonitor(null, res_conv_38_b);
- res_conv_38_b_hu_conv.ptrs_to.add(this);;
- TwoTuple<Uint8Array, ChannelMonitor> res_conv_38_conv = new TwoTuple<Uint8Array, ChannelMonitor>(res_conv_38_a, res_conv_38_b_hu_conv, () -> {
- bindings.C2Tuple_BlockHashChannelMonitorZ_free(res_conv_38);
- });
- res_conv_38_b_hu_conv.ptrs_to.add(res_conv_38_conv);
- res_conv_38_arr[m] = res_conv_38_conv;
+ TwoTuple_BlockHashChannelMonitorZ[] res_conv_35_arr = new TwoTuple_BlockHashChannelMonitorZ[res.length];
+ for (int j = 0; j < res.length; j++) {
+ number res_conv_35 = res[j];
+ TwoTuple_BlockHashChannelMonitorZ res_conv_35_hu_conv = new TwoTuple_BlockHashChannelMonitorZ(null, res_conv_35);
+ res_conv_35_hu_conv.ptrs_to.add(this);
+ res_conv_35_arr[j] = res_conv_35_hu_conv;
}
- this.res = res_conv_38_arr;
+ this.res = res_conv_35_arr;
}
}
}
}
- public static Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ constructor__ok(TwoTuple<Uint8Array, ChannelMonitor>[] o) {
- number ret = bindings.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(o != null ? Arrays.stream(o).map(o_conv_38 -> bindings.C2Tuple_BlockHashChannelMonitorZ_new(o_conv_38.a, o_conv_38.b == null ? 0 : o_conv_38.b.ptr & ~1)).toArray(number[]::new) : null);
+ public static Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ constructor_ok(TwoTuple_BlockHashChannelMonitorZ[] o) {
+ number ret = bindings.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(o != null ? Arrays.stream(o).map(o_conv_35 -> o_conv_35 != null ? o_conv_35.ptr : 0).toArray(number[]::new) : null);
Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ ret_hu_conv = Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ.constr_from_ptr(ret);
- for (TwoTuple<Uint8Array, ChannelMonitor> o_conv_38: o) { ret_hu_conv.ptrs_to.add(o_conv_38.b); };
return ret_hu_conv;
}
- public static Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ constructor__err(IOError e) {
+ public static Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ constructor_err(IOError e) {
number ret = bindings.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(e);
Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ ret_hu_conv = Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
+ public Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ clone() {
+ number ret = bindings.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(this.ptr);
+ Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ ret_hu_conv = Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
}
}
- public static Result_CVec_CVec_u8ZZNoneZ constructor__ok(Uint8Array[] o) {
+ public static Result_CVec_CVec_u8ZZNoneZ constructor_ok(Uint8Array[] o) {
number ret = bindings.CResult_CVec_CVec_u8ZZNoneZ_ok(o);
Result_CVec_CVec_u8ZZNoneZ ret_hu_conv = Result_CVec_CVec_u8ZZNoneZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public static Result_CVec_CVec_u8ZZNoneZ constructor__err() {
+ public static Result_CVec_CVec_u8ZZNoneZ constructor_err() {
number ret = bindings.CResult_CVec_CVec_u8ZZNoneZ_err();
Result_CVec_CVec_u8ZZNoneZ ret_hu_conv = Result_CVec_CVec_u8ZZNoneZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public Result_CVec_CVec_u8ZZNoneZ _clone() {
+ public Result_CVec_CVec_u8ZZNoneZ clone() {
number ret = bindings.CResult_CVec_CVec_u8ZZNoneZ_clone(this.ptr);
Result_CVec_CVec_u8ZZNoneZ ret_hu_conv = Result_CVec_CVec_u8ZZNoneZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_CVec_SignatureZNoneZ constructor__ok(Uint8Array[] o) {
+ public static Result_CVec_SignatureZNoneZ constructor_ok(Uint8Array[] o) {
number ret = bindings.CResult_CVec_SignatureZNoneZ_ok(o);
Result_CVec_SignatureZNoneZ ret_hu_conv = Result_CVec_SignatureZNoneZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public static Result_CVec_SignatureZNoneZ constructor__err() {
+ public static Result_CVec_SignatureZNoneZ constructor_err() {
number ret = bindings.CResult_CVec_SignatureZNoneZ_err();
Result_CVec_SignatureZNoneZ ret_hu_conv = Result_CVec_SignatureZNoneZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public Result_CVec_SignatureZNoneZ _clone() {
+ public Result_CVec_SignatureZNoneZ clone() {
number ret = bindings.CResult_CVec_SignatureZNoneZ_clone(this.ptr);
Result_CVec_SignatureZNoneZ ret_hu_conv = Result_CVec_SignatureZNoneZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_CVec_u8ZPeerHandleErrorZ constructor__ok(Uint8Array o) {
+ public static Result_CVec_u8ZPeerHandleErrorZ constructor_ok(Uint8Array o) {
number ret = bindings.CResult_CVec_u8ZPeerHandleErrorZ_ok(o);
Result_CVec_u8ZPeerHandleErrorZ ret_hu_conv = Result_CVec_u8ZPeerHandleErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public static Result_CVec_u8ZPeerHandleErrorZ constructor__err(PeerHandleError e) {
+ public static Result_CVec_u8ZPeerHandleErrorZ constructor_err(PeerHandleError e) {
number ret = bindings.CResult_CVec_u8ZPeerHandleErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_CVec_u8ZPeerHandleErrorZ ret_hu_conv = Result_CVec_u8ZPeerHandleErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_CVec_u8ZPeerHandleErrorZ _clone() {
+ public Result_CVec_u8ZPeerHandleErrorZ clone() {
number ret = bindings.CResult_CVec_u8ZPeerHandleErrorZ_clone(this.ptr);
Result_CVec_u8ZPeerHandleErrorZ ret_hu_conv = Result_CVec_u8ZPeerHandleErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_ChannelAnnouncementDecodeErrorZ constructor__ok(ChannelAnnouncement o) {
+ public static Result_ChannelAnnouncementDecodeErrorZ constructor_ok(ChannelAnnouncement o) {
number ret = bindings.CResult_ChannelAnnouncementDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_ChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_ChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_ChannelAnnouncementDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_ChannelAnnouncementDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_ChannelAnnouncementDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_ChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_ChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_ChannelAnnouncementDecodeErrorZ _clone() {
+ public Result_ChannelAnnouncementDecodeErrorZ clone() {
number ret = bindings.CResult_ChannelAnnouncementDecodeErrorZ_clone(this.ptr);
Result_ChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_ChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_ChannelConfigDecodeErrorZ constructor__ok(ChannelConfig o) {
+ public static Result_ChannelConfigDecodeErrorZ constructor_ok(ChannelConfig o) {
number ret = bindings.CResult_ChannelConfigDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_ChannelConfigDecodeErrorZ ret_hu_conv = Result_ChannelConfigDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_ChannelConfigDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_ChannelConfigDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_ChannelConfigDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_ChannelConfigDecodeErrorZ ret_hu_conv = Result_ChannelConfigDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_ChannelConfigDecodeErrorZ _clone() {
+ public Result_ChannelConfigDecodeErrorZ clone() {
number ret = bindings.CResult_ChannelConfigDecodeErrorZ_clone(this.ptr);
Result_ChannelConfigDecodeErrorZ ret_hu_conv = Result_ChannelConfigDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_ChannelFeaturesDecodeErrorZ constructor__ok(ChannelFeatures o) {
+ public static Result_ChannelFeaturesDecodeErrorZ constructor_ok(ChannelFeatures o) {
number ret = bindings.CResult_ChannelFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_ChannelFeaturesDecodeErrorZ ret_hu_conv = Result_ChannelFeaturesDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_ChannelFeaturesDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_ChannelFeaturesDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_ChannelFeaturesDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_ChannelFeaturesDecodeErrorZ ret_hu_conv = Result_ChannelFeaturesDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
}
}
- public static Result_ChannelInfoDecodeErrorZ constructor__ok(ChannelInfo o) {
+ public static Result_ChannelInfoDecodeErrorZ constructor_ok(ChannelInfo o) {
number ret = bindings.CResult_ChannelInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_ChannelInfoDecodeErrorZ ret_hu_conv = Result_ChannelInfoDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_ChannelInfoDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_ChannelInfoDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_ChannelInfoDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_ChannelInfoDecodeErrorZ ret_hu_conv = Result_ChannelInfoDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_ChannelInfoDecodeErrorZ _clone() {
+ public Result_ChannelInfoDecodeErrorZ clone() {
number ret = bindings.CResult_ChannelInfoDecodeErrorZ_clone(this.ptr);
Result_ChannelInfoDecodeErrorZ ret_hu_conv = Result_ChannelInfoDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_ChannelMonitorUpdateDecodeErrorZ constructor__ok(ChannelMonitorUpdate o) {
+ public static Result_ChannelMonitorUpdateDecodeErrorZ constructor_ok(ChannelMonitorUpdate o) {
number ret = bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_ChannelMonitorUpdateDecodeErrorZ ret_hu_conv = Result_ChannelMonitorUpdateDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_ChannelMonitorUpdateDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_ChannelMonitorUpdateDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_ChannelMonitorUpdateDecodeErrorZ ret_hu_conv = Result_ChannelMonitorUpdateDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_ChannelMonitorUpdateDecodeErrorZ _clone() {
+ public Result_ChannelMonitorUpdateDecodeErrorZ clone() {
number ret = bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_clone(this.ptr);
Result_ChannelMonitorUpdateDecodeErrorZ ret_hu_conv = Result_ChannelMonitorUpdateDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_ChannelPublicKeysDecodeErrorZ constructor__ok(ChannelPublicKeys o) {
+ public static Result_ChannelPublicKeysDecodeErrorZ constructor_ok(ChannelPublicKeys o) {
number ret = bindings.CResult_ChannelPublicKeysDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_ChannelPublicKeysDecodeErrorZ ret_hu_conv = Result_ChannelPublicKeysDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_ChannelPublicKeysDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_ChannelPublicKeysDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_ChannelPublicKeysDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_ChannelPublicKeysDecodeErrorZ ret_hu_conv = Result_ChannelPublicKeysDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_ChannelPublicKeysDecodeErrorZ _clone() {
+ public Result_ChannelPublicKeysDecodeErrorZ clone() {
number ret = bindings.CResult_ChannelPublicKeysDecodeErrorZ_clone(this.ptr);
Result_ChannelPublicKeysDecodeErrorZ ret_hu_conv = Result_ChannelPublicKeysDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_ChannelReestablishDecodeErrorZ constructor__ok(ChannelReestablish o) {
+ public static Result_ChannelReestablishDecodeErrorZ constructor_ok(ChannelReestablish o) {
number ret = bindings.CResult_ChannelReestablishDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_ChannelReestablishDecodeErrorZ ret_hu_conv = Result_ChannelReestablishDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_ChannelReestablishDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_ChannelReestablishDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_ChannelReestablishDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_ChannelReestablishDecodeErrorZ ret_hu_conv = Result_ChannelReestablishDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_ChannelReestablishDecodeErrorZ _clone() {
+ public Result_ChannelReestablishDecodeErrorZ clone() {
number ret = bindings.CResult_ChannelReestablishDecodeErrorZ_clone(this.ptr);
Result_ChannelReestablishDecodeErrorZ ret_hu_conv = Result_ChannelReestablishDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_ChannelTransactionParametersDecodeErrorZ constructor__ok(ChannelTransactionParameters o) {
+ public static Result_ChannelTransactionParametersDecodeErrorZ constructor_ok(ChannelTransactionParameters o) {
number ret = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_ChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_ChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_ChannelTransactionParametersDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_ChannelTransactionParametersDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_ChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_ChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_ChannelTransactionParametersDecodeErrorZ _clone() {
+ public Result_ChannelTransactionParametersDecodeErrorZ clone() {
number ret = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_clone(this.ptr);
Result_ChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_ChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_ChannelUpdateDecodeErrorZ constructor__ok(ChannelUpdate o) {
+ public static Result_ChannelUpdateDecodeErrorZ constructor_ok(ChannelUpdate o) {
number ret = bindings.CResult_ChannelUpdateDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_ChannelUpdateDecodeErrorZ ret_hu_conv = Result_ChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_ChannelUpdateDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_ChannelUpdateDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_ChannelUpdateDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_ChannelUpdateDecodeErrorZ ret_hu_conv = Result_ChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_ChannelUpdateDecodeErrorZ _clone() {
+ public Result_ChannelUpdateDecodeErrorZ clone() {
number ret = bindings.CResult_ChannelUpdateDecodeErrorZ_clone(this.ptr);
Result_ChannelUpdateDecodeErrorZ ret_hu_conv = Result_ChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_ClosingSignedDecodeErrorZ constructor__ok(ClosingSigned o) {
+ public static Result_ClosingSignedDecodeErrorZ constructor_ok(ClosingSigned o) {
number ret = bindings.CResult_ClosingSignedDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_ClosingSignedDecodeErrorZ ret_hu_conv = Result_ClosingSignedDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_ClosingSignedDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_ClosingSignedDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_ClosingSignedDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_ClosingSignedDecodeErrorZ ret_hu_conv = Result_ClosingSignedDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_ClosingSignedDecodeErrorZ _clone() {
+ public Result_ClosingSignedDecodeErrorZ clone() {
number ret = bindings.CResult_ClosingSignedDecodeErrorZ_clone(this.ptr);
Result_ClosingSignedDecodeErrorZ ret_hu_conv = Result_ClosingSignedDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_ClosingSignedFeeRangeDecodeErrorZ constructor__ok(ClosingSignedFeeRange o) {
+ public static Result_ClosingSignedFeeRangeDecodeErrorZ constructor_ok(ClosingSignedFeeRange o) {
number ret = bindings.CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_ClosingSignedFeeRangeDecodeErrorZ ret_hu_conv = Result_ClosingSignedFeeRangeDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_ClosingSignedFeeRangeDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_ClosingSignedFeeRangeDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_ClosingSignedFeeRangeDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_ClosingSignedFeeRangeDecodeErrorZ ret_hu_conv = Result_ClosingSignedFeeRangeDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_ClosingSignedFeeRangeDecodeErrorZ _clone() {
+ public Result_ClosingSignedFeeRangeDecodeErrorZ clone() {
number ret = bindings.CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(this.ptr);
Result_ClosingSignedFeeRangeDecodeErrorZ ret_hu_conv = Result_ClosingSignedFeeRangeDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_CommitmentSignedDecodeErrorZ constructor__ok(CommitmentSigned o) {
+ public static Result_CommitmentSignedDecodeErrorZ constructor_ok(CommitmentSigned o) {
number ret = bindings.CResult_CommitmentSignedDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_CommitmentSignedDecodeErrorZ ret_hu_conv = Result_CommitmentSignedDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_CommitmentSignedDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_CommitmentSignedDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_CommitmentSignedDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_CommitmentSignedDecodeErrorZ ret_hu_conv = Result_CommitmentSignedDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_CommitmentSignedDecodeErrorZ _clone() {
+ public Result_CommitmentSignedDecodeErrorZ clone() {
number ret = bindings.CResult_CommitmentSignedDecodeErrorZ_clone(this.ptr);
Result_CommitmentSignedDecodeErrorZ ret_hu_conv = Result_CommitmentSignedDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_CommitmentTransactionDecodeErrorZ constructor__ok(CommitmentTransaction o) {
+ public static Result_CommitmentTransactionDecodeErrorZ constructor_ok(CommitmentTransaction o) {
number ret = bindings.CResult_CommitmentTransactionDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_CommitmentTransactionDecodeErrorZ ret_hu_conv = Result_CommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_CommitmentTransactionDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_CommitmentTransactionDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_CommitmentTransactionDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_CommitmentTransactionDecodeErrorZ ret_hu_conv = Result_CommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_CommitmentTransactionDecodeErrorZ _clone() {
+ public Result_CommitmentTransactionDecodeErrorZ clone() {
number ret = bindings.CResult_CommitmentTransactionDecodeErrorZ_clone(this.ptr);
Result_CommitmentTransactionDecodeErrorZ ret_hu_conv = Result_CommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_CounterpartyChannelTransactionParametersDecodeErrorZ constructor__ok(CounterpartyChannelTransactionParameters o) {
+ public static Result_CounterpartyChannelTransactionParametersDecodeErrorZ constructor_ok(CounterpartyChannelTransactionParameters o) {
number ret = bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_CounterpartyChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_CounterpartyChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_CounterpartyChannelTransactionParametersDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_CounterpartyChannelTransactionParametersDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_CounterpartyChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_CounterpartyChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_CounterpartyChannelTransactionParametersDecodeErrorZ _clone() {
+ public Result_CounterpartyChannelTransactionParametersDecodeErrorZ clone() {
number ret = bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(this.ptr);
Result_CounterpartyChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_CounterpartyChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_DelayedPaymentOutputDescriptorDecodeErrorZ constructor__ok(DelayedPaymentOutputDescriptor o) {
+ public static Result_DelayedPaymentOutputDescriptorDecodeErrorZ constructor_ok(DelayedPaymentOutputDescriptor o) {
number ret = bindings.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_DelayedPaymentOutputDescriptorDecodeErrorZ ret_hu_conv = Result_DelayedPaymentOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_DelayedPaymentOutputDescriptorDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_DelayedPaymentOutputDescriptorDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_DelayedPaymentOutputDescriptorDecodeErrorZ ret_hu_conv = Result_DelayedPaymentOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_DelayedPaymentOutputDescriptorDecodeErrorZ _clone() {
+ public Result_DelayedPaymentOutputDescriptorDecodeErrorZ clone() {
number ret = bindings.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(this.ptr);
Result_DelayedPaymentOutputDescriptorDecodeErrorZ ret_hu_conv = Result_DelayedPaymentOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_DescriptionCreationErrorZ constructor__ok(Description o) {
+ public static Result_DescriptionCreationErrorZ constructor_ok(Description o) {
number ret = bindings.CResult_DescriptionCreationErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_DescriptionCreationErrorZ ret_hu_conv = Result_DescriptionCreationErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_DescriptionCreationErrorZ constructor__err(CreationError e) {
+ public static Result_DescriptionCreationErrorZ constructor_err(CreationError e) {
number ret = bindings.CResult_DescriptionCreationErrorZ_err(e);
Result_DescriptionCreationErrorZ ret_hu_conv = Result_DescriptionCreationErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public Result_DescriptionCreationErrorZ _clone() {
+ public Result_DescriptionCreationErrorZ clone() {
number ret = bindings.CResult_DescriptionCreationErrorZ_clone(this.ptr);
Result_DescriptionCreationErrorZ ret_hu_conv = Result_DescriptionCreationErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_DirectionalChannelInfoDecodeErrorZ constructor__ok(DirectionalChannelInfo o) {
+ public static Result_DirectionalChannelInfoDecodeErrorZ constructor_ok(DirectionalChannelInfo o) {
number ret = bindings.CResult_DirectionalChannelInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_DirectionalChannelInfoDecodeErrorZ ret_hu_conv = Result_DirectionalChannelInfoDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_DirectionalChannelInfoDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_DirectionalChannelInfoDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_DirectionalChannelInfoDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_DirectionalChannelInfoDecodeErrorZ ret_hu_conv = Result_DirectionalChannelInfoDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_DirectionalChannelInfoDecodeErrorZ _clone() {
+ public Result_DirectionalChannelInfoDecodeErrorZ clone() {
number ret = bindings.CResult_DirectionalChannelInfoDecodeErrorZ_clone(this.ptr);
Result_DirectionalChannelInfoDecodeErrorZ ret_hu_conv = Result_DirectionalChannelInfoDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_ErrorMessageDecodeErrorZ constructor__ok(ErrorMessage o) {
+ public static Result_ErrorMessageDecodeErrorZ constructor_ok(ErrorMessage o) {
number ret = bindings.CResult_ErrorMessageDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_ErrorMessageDecodeErrorZ ret_hu_conv = Result_ErrorMessageDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_ErrorMessageDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_ErrorMessageDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_ErrorMessageDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_ErrorMessageDecodeErrorZ ret_hu_conv = Result_ErrorMessageDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_ErrorMessageDecodeErrorZ _clone() {
+ public Result_ErrorMessageDecodeErrorZ clone() {
number ret = bindings.CResult_ErrorMessageDecodeErrorZ_clone(this.ptr);
Result_ErrorMessageDecodeErrorZ ret_hu_conv = Result_ErrorMessageDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_ExpiryTimeCreationErrorZ constructor__ok(ExpiryTime o) {
+ public static Result_ExpiryTimeCreationErrorZ constructor_ok(ExpiryTime o) {
number ret = bindings.CResult_ExpiryTimeCreationErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_ExpiryTimeCreationErrorZ ret_hu_conv = Result_ExpiryTimeCreationErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_ExpiryTimeCreationErrorZ constructor__err(CreationError e) {
+ public static Result_ExpiryTimeCreationErrorZ constructor_err(CreationError e) {
number ret = bindings.CResult_ExpiryTimeCreationErrorZ_err(e);
Result_ExpiryTimeCreationErrorZ ret_hu_conv = Result_ExpiryTimeCreationErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public Result_ExpiryTimeCreationErrorZ _clone() {
+ public Result_ExpiryTimeCreationErrorZ clone() {
number ret = bindings.CResult_ExpiryTimeCreationErrorZ_clone(this.ptr);
Result_ExpiryTimeCreationErrorZ ret_hu_conv = Result_ExpiryTimeCreationErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_FundingCreatedDecodeErrorZ constructor__ok(FundingCreated o) {
+ public static Result_FundingCreatedDecodeErrorZ constructor_ok(FundingCreated o) {
number ret = bindings.CResult_FundingCreatedDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_FundingCreatedDecodeErrorZ ret_hu_conv = Result_FundingCreatedDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_FundingCreatedDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_FundingCreatedDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_FundingCreatedDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_FundingCreatedDecodeErrorZ ret_hu_conv = Result_FundingCreatedDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_FundingCreatedDecodeErrorZ _clone() {
+ public Result_FundingCreatedDecodeErrorZ clone() {
number ret = bindings.CResult_FundingCreatedDecodeErrorZ_clone(this.ptr);
Result_FundingCreatedDecodeErrorZ ret_hu_conv = Result_FundingCreatedDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_FundingLockedDecodeErrorZ constructor__ok(FundingLocked o) {
+ public static Result_FundingLockedDecodeErrorZ constructor_ok(FundingLocked o) {
number ret = bindings.CResult_FundingLockedDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_FundingLockedDecodeErrorZ ret_hu_conv = Result_FundingLockedDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_FundingLockedDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_FundingLockedDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_FundingLockedDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_FundingLockedDecodeErrorZ ret_hu_conv = Result_FundingLockedDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_FundingLockedDecodeErrorZ _clone() {
+ public Result_FundingLockedDecodeErrorZ clone() {
number ret = bindings.CResult_FundingLockedDecodeErrorZ_clone(this.ptr);
Result_FundingLockedDecodeErrorZ ret_hu_conv = Result_FundingLockedDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_FundingSignedDecodeErrorZ constructor__ok(FundingSigned o) {
+ public static Result_FundingSignedDecodeErrorZ constructor_ok(FundingSigned o) {
number ret = bindings.CResult_FundingSignedDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_FundingSignedDecodeErrorZ ret_hu_conv = Result_FundingSignedDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_FundingSignedDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_FundingSignedDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_FundingSignedDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_FundingSignedDecodeErrorZ ret_hu_conv = Result_FundingSignedDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_FundingSignedDecodeErrorZ _clone() {
+ public Result_FundingSignedDecodeErrorZ clone() {
number ret = bindings.CResult_FundingSignedDecodeErrorZ_clone(this.ptr);
Result_FundingSignedDecodeErrorZ ret_hu_conv = Result_FundingSignedDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_GossipTimestampFilterDecodeErrorZ constructor__ok(GossipTimestampFilter o) {
+ public static Result_GossipTimestampFilterDecodeErrorZ constructor_ok(GossipTimestampFilter o) {
number ret = bindings.CResult_GossipTimestampFilterDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_GossipTimestampFilterDecodeErrorZ ret_hu_conv = Result_GossipTimestampFilterDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_GossipTimestampFilterDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_GossipTimestampFilterDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_GossipTimestampFilterDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_GossipTimestampFilterDecodeErrorZ ret_hu_conv = Result_GossipTimestampFilterDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_GossipTimestampFilterDecodeErrorZ _clone() {
+ public Result_GossipTimestampFilterDecodeErrorZ clone() {
number ret = bindings.CResult_GossipTimestampFilterDecodeErrorZ_clone(this.ptr);
Result_GossipTimestampFilterDecodeErrorZ ret_hu_conv = Result_GossipTimestampFilterDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_HTLCOutputInCommitmentDecodeErrorZ constructor__ok(HTLCOutputInCommitment o) {
+ public static Result_HTLCOutputInCommitmentDecodeErrorZ constructor_ok(HTLCOutputInCommitment o) {
number ret = bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_HTLCOutputInCommitmentDecodeErrorZ ret_hu_conv = Result_HTLCOutputInCommitmentDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_HTLCOutputInCommitmentDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_HTLCOutputInCommitmentDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_HTLCOutputInCommitmentDecodeErrorZ ret_hu_conv = Result_HTLCOutputInCommitmentDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_HTLCOutputInCommitmentDecodeErrorZ _clone() {
+ public Result_HTLCOutputInCommitmentDecodeErrorZ clone() {
number ret = bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(this.ptr);
Result_HTLCOutputInCommitmentDecodeErrorZ ret_hu_conv = Result_HTLCOutputInCommitmentDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_HTLCUpdateDecodeErrorZ constructor__ok(HTLCUpdate o) {
+ public static Result_HTLCUpdateDecodeErrorZ constructor_ok(HTLCUpdate o) {
number ret = bindings.CResult_HTLCUpdateDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_HTLCUpdateDecodeErrorZ ret_hu_conv = Result_HTLCUpdateDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_HTLCUpdateDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_HTLCUpdateDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_HTLCUpdateDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_HTLCUpdateDecodeErrorZ ret_hu_conv = Result_HTLCUpdateDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_HTLCUpdateDecodeErrorZ _clone() {
+ public Result_HTLCUpdateDecodeErrorZ clone() {
number ret = bindings.CResult_HTLCUpdateDecodeErrorZ_clone(this.ptr);
Result_HTLCUpdateDecodeErrorZ ret_hu_conv = Result_HTLCUpdateDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_HolderCommitmentTransactionDecodeErrorZ constructor__ok(HolderCommitmentTransaction o) {
+ public static Result_HolderCommitmentTransactionDecodeErrorZ constructor_ok(HolderCommitmentTransaction o) {
number ret = bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_HolderCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_HolderCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_HolderCommitmentTransactionDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_HolderCommitmentTransactionDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_HolderCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_HolderCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_HolderCommitmentTransactionDecodeErrorZ _clone() {
+ public Result_HolderCommitmentTransactionDecodeErrorZ clone() {
number ret = bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_clone(this.ptr);
Result_HolderCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_HolderCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_InMemorySignerDecodeErrorZ constructor__ok(InMemorySigner o) {
+ public static Result_InMemorySignerDecodeErrorZ constructor_ok(InMemorySigner o) {
number ret = bindings.CResult_InMemorySignerDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_InMemorySignerDecodeErrorZ ret_hu_conv = Result_InMemorySignerDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_InMemorySignerDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_InMemorySignerDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_InMemorySignerDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_InMemorySignerDecodeErrorZ ret_hu_conv = Result_InMemorySignerDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_InMemorySignerDecodeErrorZ _clone() {
+ public Result_InMemorySignerDecodeErrorZ clone() {
number ret = bindings.CResult_InMemorySignerDecodeErrorZ_clone(this.ptr);
Result_InMemorySignerDecodeErrorZ ret_hu_conv = Result_InMemorySignerDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_InitDecodeErrorZ constructor__ok(Init o) {
+ public static Result_InitDecodeErrorZ constructor_ok(Init o) {
number ret = bindings.CResult_InitDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_InitDecodeErrorZ ret_hu_conv = Result_InitDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_InitDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_InitDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_InitDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_InitDecodeErrorZ ret_hu_conv = Result_InitDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_InitDecodeErrorZ _clone() {
+ public Result_InitDecodeErrorZ clone() {
number ret = bindings.CResult_InitDecodeErrorZ_clone(this.ptr);
Result_InitDecodeErrorZ ret_hu_conv = Result_InitDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_InitFeaturesDecodeErrorZ constructor__ok(InitFeatures o) {
+ public static Result_InitFeaturesDecodeErrorZ constructor_ok(InitFeatures o) {
number ret = bindings.CResult_InitFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_InitFeaturesDecodeErrorZ ret_hu_conv = Result_InitFeaturesDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_InitFeaturesDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_InitFeaturesDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_InitFeaturesDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_InitFeaturesDecodeErrorZ ret_hu_conv = Result_InitFeaturesDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
}
}
- public static Result_InvoiceFeaturesDecodeErrorZ constructor__ok(InvoiceFeatures o) {
+ public static Result_InvoiceFeaturesDecodeErrorZ constructor_ok(InvoiceFeatures o) {
number ret = bindings.CResult_InvoiceFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_InvoiceFeaturesDecodeErrorZ ret_hu_conv = Result_InvoiceFeaturesDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_InvoiceFeaturesDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_InvoiceFeaturesDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_InvoiceFeaturesDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_InvoiceFeaturesDecodeErrorZ ret_hu_conv = Result_InvoiceFeaturesDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
}
}
- public static Result_InvoiceNoneZ constructor__ok(Invoice o) {
+ public static Result_InvoiceNoneZ constructor_ok(Invoice o) {
number ret = bindings.CResult_InvoiceNoneZ_ok(o == null ? 0 : o.ptr & ~1);
Result_InvoiceNoneZ ret_hu_conv = Result_InvoiceNoneZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_InvoiceNoneZ constructor__err() {
+ public static Result_InvoiceNoneZ constructor_err() {
number ret = bindings.CResult_InvoiceNoneZ_err();
Result_InvoiceNoneZ ret_hu_conv = Result_InvoiceNoneZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public Result_InvoiceNoneZ _clone() {
+ public Result_InvoiceNoneZ clone() {
number ret = bindings.CResult_InvoiceNoneZ_clone(this.ptr);
Result_InvoiceNoneZ ret_hu_conv = Result_InvoiceNoneZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_InvoiceSemanticErrorZ constructor__ok(Invoice o) {
+ public static Result_InvoiceSemanticErrorZ constructor_ok(Invoice o) {
number ret = bindings.CResult_InvoiceSemanticErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_InvoiceSemanticErrorZ ret_hu_conv = Result_InvoiceSemanticErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_InvoiceSemanticErrorZ constructor__err(SemanticError e) {
+ public static Result_InvoiceSemanticErrorZ constructor_err(SemanticError e) {
number ret = bindings.CResult_InvoiceSemanticErrorZ_err(e);
Result_InvoiceSemanticErrorZ ret_hu_conv = Result_InvoiceSemanticErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public Result_InvoiceSemanticErrorZ _clone() {
+ public Result_InvoiceSemanticErrorZ clone() {
number ret = bindings.CResult_InvoiceSemanticErrorZ_clone(this.ptr);
Result_InvoiceSemanticErrorZ ret_hu_conv = Result_InvoiceSemanticErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_InvoiceSignOrCreationErrorZ constructor__ok(Invoice o) {
+ public static Result_InvoiceSignOrCreationErrorZ constructor_ok(Invoice o) {
number ret = bindings.CResult_InvoiceSignOrCreationErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_InvoiceSignOrCreationErrorZ ret_hu_conv = Result_InvoiceSignOrCreationErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_InvoiceSignOrCreationErrorZ constructor__err(SignOrCreationError e) {
+ public static Result_InvoiceSignOrCreationErrorZ constructor_err(SignOrCreationError e) {
number ret = bindings.CResult_InvoiceSignOrCreationErrorZ_err(e.ptr);
Result_InvoiceSignOrCreationErrorZ ret_hu_conv = Result_InvoiceSignOrCreationErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public Result_InvoiceSignOrCreationErrorZ _clone() {
+ public Result_InvoiceSignOrCreationErrorZ clone() {
number ret = bindings.CResult_InvoiceSignOrCreationErrorZ_clone(this.ptr);
Result_InvoiceSignOrCreationErrorZ ret_hu_conv = Result_InvoiceSignOrCreationErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_NetAddressDecodeErrorZ constructor__ok(NetAddress o) {
+ public static Result_NetAddressDecodeErrorZ constructor_ok(NetAddress o) {
number ret = bindings.CResult_NetAddressDecodeErrorZ_ok(o.ptr);
Result_NetAddressDecodeErrorZ ret_hu_conv = Result_NetAddressDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public static Result_NetAddressDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_NetAddressDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_NetAddressDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_NetAddressDecodeErrorZ ret_hu_conv = Result_NetAddressDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_NetAddressDecodeErrorZ _clone() {
+ public Result_NetAddressDecodeErrorZ clone() {
number ret = bindings.CResult_NetAddressDecodeErrorZ_clone(this.ptr);
Result_NetAddressDecodeErrorZ ret_hu_conv = Result_NetAddressDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_NetAddressu8Z constructor__ok(NetAddress o) {
+ public static Result_NetAddressu8Z constructor_ok(NetAddress o) {
number ret = bindings.CResult_NetAddressu8Z_ok(o.ptr);
Result_NetAddressu8Z ret_hu_conv = Result_NetAddressu8Z.constr_from_ptr(ret);
return ret_hu_conv;
}
- public static Result_NetAddressu8Z constructor__err(number e) {
+ public static Result_NetAddressu8Z constructor_err(number e) {
number ret = bindings.CResult_NetAddressu8Z_err(e);
Result_NetAddressu8Z ret_hu_conv = Result_NetAddressu8Z.constr_from_ptr(ret);
return ret_hu_conv;
}
- public Result_NetAddressu8Z _clone() {
+ public Result_NetAddressu8Z clone() {
number ret = bindings.CResult_NetAddressu8Z_clone(this.ptr);
Result_NetAddressu8Z ret_hu_conv = Result_NetAddressu8Z.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_NetworkGraphDecodeErrorZ constructor__ok(Uint8Array o_genesis_hash) {
- number ret = bindings.CResult_NetworkGraphDecodeErrorZ_ok(bindings.NetworkGraph_new(o_genesis_hash));
+ public static Result_NetworkGraphDecodeErrorZ constructor_ok(NetworkGraph o) {
+ number ret = bindings.CResult_NetworkGraphDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_NetworkGraphDecodeErrorZ ret_hu_conv = Result_NetworkGraphDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_NetworkGraphDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_NetworkGraphDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_NetworkGraphDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_NetworkGraphDecodeErrorZ ret_hu_conv = Result_NetworkGraphDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
+ public Result_NetworkGraphDecodeErrorZ clone() {
+ number ret = bindings.CResult_NetworkGraphDecodeErrorZ_clone(this.ptr);
+ Result_NetworkGraphDecodeErrorZ ret_hu_conv = Result_NetworkGraphDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
}
}
- public static Result_NodeAnnouncementDecodeErrorZ constructor__ok(NodeAnnouncement o) {
+ public static Result_NodeAnnouncementDecodeErrorZ constructor_ok(NodeAnnouncement o) {
number ret = bindings.CResult_NodeAnnouncementDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_NodeAnnouncementDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_NodeAnnouncementDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_NodeAnnouncementDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_NodeAnnouncementDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_NodeAnnouncementDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_NodeAnnouncementDecodeErrorZ _clone() {
+ public Result_NodeAnnouncementDecodeErrorZ clone() {
number ret = bindings.CResult_NodeAnnouncementDecodeErrorZ_clone(this.ptr);
Result_NodeAnnouncementDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_NodeAnnouncementInfoDecodeErrorZ constructor__ok(NodeAnnouncementInfo o) {
+ public static Result_NodeAnnouncementInfoDecodeErrorZ constructor_ok(NodeAnnouncementInfo o) {
number ret = bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_NodeAnnouncementInfoDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementInfoDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_NodeAnnouncementInfoDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_NodeAnnouncementInfoDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_NodeAnnouncementInfoDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementInfoDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_NodeAnnouncementInfoDecodeErrorZ _clone() {
+ public Result_NodeAnnouncementInfoDecodeErrorZ clone() {
number ret = bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_clone(this.ptr);
Result_NodeAnnouncementInfoDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementInfoDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_NodeFeaturesDecodeErrorZ constructor__ok(NodeFeatures o) {
+ public static Result_NodeFeaturesDecodeErrorZ constructor_ok(NodeFeatures o) {
number ret = bindings.CResult_NodeFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_NodeFeaturesDecodeErrorZ ret_hu_conv = Result_NodeFeaturesDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_NodeFeaturesDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_NodeFeaturesDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_NodeFeaturesDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_NodeFeaturesDecodeErrorZ ret_hu_conv = Result_NodeFeaturesDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
}
}
- public static Result_NodeInfoDecodeErrorZ constructor__ok(NodeInfo o) {
+ public static Result_NodeInfoDecodeErrorZ constructor_ok(NodeInfo o) {
number ret = bindings.CResult_NodeInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_NodeInfoDecodeErrorZ ret_hu_conv = Result_NodeInfoDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_NodeInfoDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_NodeInfoDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_NodeInfoDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_NodeInfoDecodeErrorZ ret_hu_conv = Result_NodeInfoDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_NodeInfoDecodeErrorZ _clone() {
+ public Result_NodeInfoDecodeErrorZ clone() {
number ret = bindings.CResult_NodeInfoDecodeErrorZ_clone(this.ptr);
Result_NodeInfoDecodeErrorZ ret_hu_conv = Result_NodeInfoDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_NoneAPIErrorZ constructor__ok() {
+ public static Result_NoneAPIErrorZ constructor_ok() {
number ret = bindings.CResult_NoneAPIErrorZ_ok();
Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public static Result_NoneAPIErrorZ constructor__err(APIError e) {
+ public static Result_NoneAPIErrorZ constructor_err(APIError e) {
number ret = bindings.CResult_NoneAPIErrorZ_err(e.ptr);
Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public Result_NoneAPIErrorZ _clone() {
+ public Result_NoneAPIErrorZ clone() {
number ret = bindings.CResult_NoneAPIErrorZ_clone(this.ptr);
Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_NoneChannelMonitorUpdateErrZ constructor__ok() {
+ public static Result_NoneChannelMonitorUpdateErrZ constructor_ok() {
number ret = bindings.CResult_NoneChannelMonitorUpdateErrZ_ok();
Result_NoneChannelMonitorUpdateErrZ ret_hu_conv = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public static Result_NoneChannelMonitorUpdateErrZ constructor__err(ChannelMonitorUpdateErr e) {
+ public static Result_NoneChannelMonitorUpdateErrZ constructor_err(ChannelMonitorUpdateErr e) {
number ret = bindings.CResult_NoneChannelMonitorUpdateErrZ_err(e);
Result_NoneChannelMonitorUpdateErrZ ret_hu_conv = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public Result_NoneChannelMonitorUpdateErrZ _clone() {
+ public Result_NoneChannelMonitorUpdateErrZ clone() {
number ret = bindings.CResult_NoneChannelMonitorUpdateErrZ_clone(this.ptr);
Result_NoneChannelMonitorUpdateErrZ ret_hu_conv = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_NoneErrorZ constructor__ok() {
+ public static Result_NoneErrorZ constructor_ok() {
number ret = bindings.CResult_NoneErrorZ_ok();
Result_NoneErrorZ ret_hu_conv = Result_NoneErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public static Result_NoneErrorZ constructor__err(IOError e) {
+ public static Result_NoneErrorZ constructor_err(IOError e) {
number ret = bindings.CResult_NoneErrorZ_err(e);
Result_NoneErrorZ ret_hu_conv = Result_NoneErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public Result_NoneErrorZ _clone() {
+ public Result_NoneErrorZ clone() {
number ret = bindings.CResult_NoneErrorZ_clone(this.ptr);
Result_NoneErrorZ ret_hu_conv = Result_NoneErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_NoneLightningErrorZ constructor__ok() {
+ public static Result_NoneLightningErrorZ constructor_ok() {
number ret = bindings.CResult_NoneLightningErrorZ_ok();
Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public static Result_NoneLightningErrorZ constructor__err(LightningError e) {
+ public static Result_NoneLightningErrorZ constructor_err(LightningError e) {
number ret = bindings.CResult_NoneLightningErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_NoneLightningErrorZ _clone() {
+ public Result_NoneLightningErrorZ clone() {
number ret = bindings.CResult_NoneLightningErrorZ_clone(this.ptr);
Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_NoneMonitorUpdateErrorZ constructor__ok() {
+ public static Result_NoneMonitorUpdateErrorZ constructor_ok() {
number ret = bindings.CResult_NoneMonitorUpdateErrorZ_ok();
Result_NoneMonitorUpdateErrorZ ret_hu_conv = Result_NoneMonitorUpdateErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public static Result_NoneMonitorUpdateErrorZ constructor__err(MonitorUpdateError e) {
+ public static Result_NoneMonitorUpdateErrorZ constructor_err(MonitorUpdateError e) {
number ret = bindings.CResult_NoneMonitorUpdateErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_NoneMonitorUpdateErrorZ ret_hu_conv = Result_NoneMonitorUpdateErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_NoneMonitorUpdateErrorZ _clone() {
+ public Result_NoneMonitorUpdateErrorZ clone() {
number ret = bindings.CResult_NoneMonitorUpdateErrorZ_clone(this.ptr);
Result_NoneMonitorUpdateErrorZ ret_hu_conv = Result_NoneMonitorUpdateErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_NoneNoneZ constructor__ok() {
+ public static Result_NoneNoneZ constructor_ok() {
number ret = bindings.CResult_NoneNoneZ_ok();
Result_NoneNoneZ ret_hu_conv = Result_NoneNoneZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public static Result_NoneNoneZ constructor__err() {
+ public static Result_NoneNoneZ constructor_err() {
number ret = bindings.CResult_NoneNoneZ_err();
Result_NoneNoneZ ret_hu_conv = Result_NoneNoneZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public Result_NoneNoneZ _clone() {
+ public Result_NoneNoneZ clone() {
number ret = bindings.CResult_NoneNoneZ_clone(this.ptr);
Result_NoneNoneZ ret_hu_conv = Result_NoneNoneZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_NonePaymentSendFailureZ constructor__ok() {
+ public static Result_NonePaymentSendFailureZ constructor_ok() {
number ret = bindings.CResult_NonePaymentSendFailureZ_ok();
Result_NonePaymentSendFailureZ ret_hu_conv = Result_NonePaymentSendFailureZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public static Result_NonePaymentSendFailureZ constructor__err(PaymentSendFailure e) {
+ public static Result_NonePaymentSendFailureZ constructor_err(PaymentSendFailure e) {
number ret = bindings.CResult_NonePaymentSendFailureZ_err(e.ptr);
Result_NonePaymentSendFailureZ ret_hu_conv = Result_NonePaymentSendFailureZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public Result_NonePaymentSendFailureZ _clone() {
+ public Result_NonePaymentSendFailureZ clone() {
number ret = bindings.CResult_NonePaymentSendFailureZ_clone(this.ptr);
Result_NonePaymentSendFailureZ ret_hu_conv = Result_NonePaymentSendFailureZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_NonePeerHandleErrorZ constructor__ok() {
+ public static Result_NonePeerHandleErrorZ constructor_ok() {
number ret = bindings.CResult_NonePeerHandleErrorZ_ok();
Result_NonePeerHandleErrorZ ret_hu_conv = Result_NonePeerHandleErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public static Result_NonePeerHandleErrorZ constructor__err(PeerHandleError e) {
+ public static Result_NonePeerHandleErrorZ constructor_err(PeerHandleError e) {
number ret = bindings.CResult_NonePeerHandleErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_NonePeerHandleErrorZ ret_hu_conv = Result_NonePeerHandleErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_NonePeerHandleErrorZ _clone() {
+ public Result_NonePeerHandleErrorZ clone() {
number ret = bindings.CResult_NonePeerHandleErrorZ_clone(this.ptr);
Result_NonePeerHandleErrorZ ret_hu_conv = Result_NonePeerHandleErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_NoneSemanticErrorZ constructor__ok() {
+ public static Result_NoneSemanticErrorZ constructor_ok() {
number ret = bindings.CResult_NoneSemanticErrorZ_ok();
Result_NoneSemanticErrorZ ret_hu_conv = Result_NoneSemanticErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public static Result_NoneSemanticErrorZ constructor__err(SemanticError e) {
+ public static Result_NoneSemanticErrorZ constructor_err(SemanticError e) {
number ret = bindings.CResult_NoneSemanticErrorZ_err(e);
Result_NoneSemanticErrorZ ret_hu_conv = Result_NoneSemanticErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public Result_NoneSemanticErrorZ _clone() {
+ public Result_NoneSemanticErrorZ clone() {
number ret = bindings.CResult_NoneSemanticErrorZ_clone(this.ptr);
Result_NoneSemanticErrorZ ret_hu_conv = Result_NoneSemanticErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_OpenChannelDecodeErrorZ constructor__ok(OpenChannel o) {
+ public static Result_OpenChannelDecodeErrorZ constructor_ok(OpenChannel o) {
number ret = bindings.CResult_OpenChannelDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_OpenChannelDecodeErrorZ ret_hu_conv = Result_OpenChannelDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_OpenChannelDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_OpenChannelDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_OpenChannelDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_OpenChannelDecodeErrorZ ret_hu_conv = Result_OpenChannelDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_OpenChannelDecodeErrorZ _clone() {
+ public Result_OpenChannelDecodeErrorZ clone() {
number ret = bindings.CResult_OpenChannelDecodeErrorZ_clone(this.ptr);
Result_OpenChannelDecodeErrorZ ret_hu_conv = Result_OpenChannelDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_OutPointDecodeErrorZ constructor__ok(OutPoint o) {
+ public static Result_OutPointDecodeErrorZ constructor_ok(OutPoint o) {
number ret = bindings.CResult_OutPointDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_OutPointDecodeErrorZ ret_hu_conv = Result_OutPointDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_OutPointDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_OutPointDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_OutPointDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_OutPointDecodeErrorZ ret_hu_conv = Result_OutPointDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_OutPointDecodeErrorZ _clone() {
+ public Result_OutPointDecodeErrorZ clone() {
number ret = bindings.CResult_OutPointDecodeErrorZ_clone(this.ptr);
Result_OutPointDecodeErrorZ ret_hu_conv = Result_OutPointDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_PayeePubKeyErrorZ constructor__ok(PayeePubKey o) {
+ public static Result_PayeePubKeyErrorZ constructor_ok(PayeePubKey o) {
number ret = bindings.CResult_PayeePubKeyErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_PayeePubKeyErrorZ ret_hu_conv = Result_PayeePubKeyErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_PayeePubKeyErrorZ constructor__err(Secp256k1Error e) {
+ public static Result_PayeePubKeyErrorZ constructor_err(Secp256k1Error e) {
number ret = bindings.CResult_PayeePubKeyErrorZ_err(e);
Result_PayeePubKeyErrorZ ret_hu_conv = Result_PayeePubKeyErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public Result_PayeePubKeyErrorZ _clone() {
+ public Result_PayeePubKeyErrorZ clone() {
number ret = bindings.CResult_PayeePubKeyErrorZ_clone(this.ptr);
Result_PayeePubKeyErrorZ ret_hu_conv = Result_PayeePubKeyErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_PaymentHashPaymentSendFailureZ constructor__ok(Uint8Array o) {
+ public static Result_PaymentHashPaymentSendFailureZ constructor_ok(Uint8Array o) {
number ret = bindings.CResult_PaymentHashPaymentSendFailureZ_ok(o);
Result_PaymentHashPaymentSendFailureZ ret_hu_conv = Result_PaymentHashPaymentSendFailureZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public static Result_PaymentHashPaymentSendFailureZ constructor__err(PaymentSendFailure e) {
+ public static Result_PaymentHashPaymentSendFailureZ constructor_err(PaymentSendFailure e) {
number ret = bindings.CResult_PaymentHashPaymentSendFailureZ_err(e.ptr);
Result_PaymentHashPaymentSendFailureZ ret_hu_conv = Result_PaymentHashPaymentSendFailureZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public Result_PaymentHashPaymentSendFailureZ _clone() {
+ public Result_PaymentHashPaymentSendFailureZ clone() {
number ret = bindings.CResult_PaymentHashPaymentSendFailureZ_clone(this.ptr);
Result_PaymentHashPaymentSendFailureZ ret_hu_conv = Result_PaymentHashPaymentSendFailureZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_PaymentSecretAPIErrorZ constructor__ok(Uint8Array o) {
+ public static Result_PaymentSecretAPIErrorZ constructor_ok(Uint8Array o) {
number ret = bindings.CResult_PaymentSecretAPIErrorZ_ok(o);
Result_PaymentSecretAPIErrorZ ret_hu_conv = Result_PaymentSecretAPIErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public static Result_PaymentSecretAPIErrorZ constructor__err(APIError e) {
+ public static Result_PaymentSecretAPIErrorZ constructor_err(APIError e) {
number ret = bindings.CResult_PaymentSecretAPIErrorZ_err(e.ptr);
Result_PaymentSecretAPIErrorZ ret_hu_conv = Result_PaymentSecretAPIErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public Result_PaymentSecretAPIErrorZ _clone() {
+ public Result_PaymentSecretAPIErrorZ clone() {
number ret = bindings.CResult_PaymentSecretAPIErrorZ_clone(this.ptr);
Result_PaymentSecretAPIErrorZ ret_hu_conv = Result_PaymentSecretAPIErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_PingDecodeErrorZ constructor__ok(Ping o) {
+ public static Result_PingDecodeErrorZ constructor_ok(Ping o) {
number ret = bindings.CResult_PingDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_PingDecodeErrorZ ret_hu_conv = Result_PingDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_PingDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_PingDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_PingDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_PingDecodeErrorZ ret_hu_conv = Result_PingDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_PingDecodeErrorZ _clone() {
+ public Result_PingDecodeErrorZ clone() {
number ret = bindings.CResult_PingDecodeErrorZ_clone(this.ptr);
Result_PingDecodeErrorZ ret_hu_conv = Result_PingDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_PongDecodeErrorZ constructor__ok(Pong o) {
+ public static Result_PongDecodeErrorZ constructor_ok(Pong o) {
number ret = bindings.CResult_PongDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_PongDecodeErrorZ ret_hu_conv = Result_PongDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_PongDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_PongDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_PongDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_PongDecodeErrorZ ret_hu_conv = Result_PongDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_PongDecodeErrorZ _clone() {
+ public Result_PongDecodeErrorZ clone() {
number ret = bindings.CResult_PongDecodeErrorZ_clone(this.ptr);
Result_PongDecodeErrorZ ret_hu_conv = Result_PongDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_PositiveTimestampCreationErrorZ constructor__ok(PositiveTimestamp o) {
+ public static Result_PositiveTimestampCreationErrorZ constructor_ok(PositiveTimestamp o) {
number ret = bindings.CResult_PositiveTimestampCreationErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_PositiveTimestampCreationErrorZ ret_hu_conv = Result_PositiveTimestampCreationErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_PositiveTimestampCreationErrorZ constructor__err(CreationError e) {
+ public static Result_PositiveTimestampCreationErrorZ constructor_err(CreationError e) {
number ret = bindings.CResult_PositiveTimestampCreationErrorZ_err(e);
Result_PositiveTimestampCreationErrorZ ret_hu_conv = Result_PositiveTimestampCreationErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public Result_PositiveTimestampCreationErrorZ _clone() {
+ public Result_PositiveTimestampCreationErrorZ clone() {
number ret = bindings.CResult_PositiveTimestampCreationErrorZ_clone(this.ptr);
Result_PositiveTimestampCreationErrorZ ret_hu_conv = Result_PositiveTimestampCreationErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_PrivateRouteCreationErrorZ constructor__ok(PrivateRoute o) {
+ public static Result_PrivateRouteCreationErrorZ constructor_ok(PrivateRoute o) {
number ret = bindings.CResult_PrivateRouteCreationErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_PrivateRouteCreationErrorZ ret_hu_conv = Result_PrivateRouteCreationErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_PrivateRouteCreationErrorZ constructor__err(CreationError e) {
+ public static Result_PrivateRouteCreationErrorZ constructor_err(CreationError e) {
number ret = bindings.CResult_PrivateRouteCreationErrorZ_err(e);
Result_PrivateRouteCreationErrorZ ret_hu_conv = Result_PrivateRouteCreationErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public Result_PrivateRouteCreationErrorZ _clone() {
+ public Result_PrivateRouteCreationErrorZ clone() {
number ret = bindings.CResult_PrivateRouteCreationErrorZ_clone(this.ptr);
Result_PrivateRouteCreationErrorZ ret_hu_conv = Result_PrivateRouteCreationErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_PublicKeyErrorZ constructor__ok(Uint8Array o) {
+ public static Result_PublicKeyErrorZ constructor_ok(Uint8Array o) {
number ret = bindings.CResult_PublicKeyErrorZ_ok(o);
Result_PublicKeyErrorZ ret_hu_conv = Result_PublicKeyErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public static Result_PublicKeyErrorZ constructor__err(Secp256k1Error e) {
+ public static Result_PublicKeyErrorZ constructor_err(Secp256k1Error e) {
number ret = bindings.CResult_PublicKeyErrorZ_err(e);
Result_PublicKeyErrorZ ret_hu_conv = Result_PublicKeyErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public Result_PublicKeyErrorZ _clone() {
+ public Result_PublicKeyErrorZ clone() {
number ret = bindings.CResult_PublicKeyErrorZ_clone(this.ptr);
Result_PublicKeyErrorZ ret_hu_conv = Result_PublicKeyErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_QueryChannelRangeDecodeErrorZ constructor__ok(QueryChannelRange o) {
+ public static Result_QueryChannelRangeDecodeErrorZ constructor_ok(QueryChannelRange o) {
number ret = bindings.CResult_QueryChannelRangeDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_QueryChannelRangeDecodeErrorZ ret_hu_conv = Result_QueryChannelRangeDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_QueryChannelRangeDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_QueryChannelRangeDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_QueryChannelRangeDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_QueryChannelRangeDecodeErrorZ ret_hu_conv = Result_QueryChannelRangeDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_QueryChannelRangeDecodeErrorZ _clone() {
+ public Result_QueryChannelRangeDecodeErrorZ clone() {
number ret = bindings.CResult_QueryChannelRangeDecodeErrorZ_clone(this.ptr);
Result_QueryChannelRangeDecodeErrorZ ret_hu_conv = Result_QueryChannelRangeDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_QueryShortChannelIdsDecodeErrorZ constructor__ok(QueryShortChannelIds o) {
+ public static Result_QueryShortChannelIdsDecodeErrorZ constructor_ok(QueryShortChannelIds o) {
number ret = bindings.CResult_QueryShortChannelIdsDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_QueryShortChannelIdsDecodeErrorZ ret_hu_conv = Result_QueryShortChannelIdsDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_QueryShortChannelIdsDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_QueryShortChannelIdsDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_QueryShortChannelIdsDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_QueryShortChannelIdsDecodeErrorZ ret_hu_conv = Result_QueryShortChannelIdsDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_QueryShortChannelIdsDecodeErrorZ _clone() {
+ public Result_QueryShortChannelIdsDecodeErrorZ clone() {
number ret = bindings.CResult_QueryShortChannelIdsDecodeErrorZ_clone(this.ptr);
Result_QueryShortChannelIdsDecodeErrorZ ret_hu_conv = Result_QueryShortChannelIdsDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_RecoverableSignatureNoneZ constructor__ok(Uint8Array arg) {
+ public static Result_RecoverableSignatureNoneZ constructor_ok(Uint8Array arg) {
number ret = bindings.CResult_RecoverableSignatureNoneZ_ok(arg);
Result_RecoverableSignatureNoneZ ret_hu_conv = Result_RecoverableSignatureNoneZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public static Result_RecoverableSignatureNoneZ constructor__err() {
+ public static Result_RecoverableSignatureNoneZ constructor_err() {
number ret = bindings.CResult_RecoverableSignatureNoneZ_err();
Result_RecoverableSignatureNoneZ ret_hu_conv = Result_RecoverableSignatureNoneZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public Result_RecoverableSignatureNoneZ _clone() {
+ public Result_RecoverableSignatureNoneZ clone() {
number ret = bindings.CResult_RecoverableSignatureNoneZ_clone(this.ptr);
Result_RecoverableSignatureNoneZ ret_hu_conv = Result_RecoverableSignatureNoneZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_ReplyChannelRangeDecodeErrorZ constructor__ok(ReplyChannelRange o) {
+ public static Result_ReplyChannelRangeDecodeErrorZ constructor_ok(ReplyChannelRange o) {
number ret = bindings.CResult_ReplyChannelRangeDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_ReplyChannelRangeDecodeErrorZ ret_hu_conv = Result_ReplyChannelRangeDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_ReplyChannelRangeDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_ReplyChannelRangeDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_ReplyChannelRangeDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_ReplyChannelRangeDecodeErrorZ ret_hu_conv = Result_ReplyChannelRangeDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_ReplyChannelRangeDecodeErrorZ _clone() {
+ public Result_ReplyChannelRangeDecodeErrorZ clone() {
number ret = bindings.CResult_ReplyChannelRangeDecodeErrorZ_clone(this.ptr);
Result_ReplyChannelRangeDecodeErrorZ ret_hu_conv = Result_ReplyChannelRangeDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_ReplyShortChannelIdsEndDecodeErrorZ constructor__ok(ReplyShortChannelIdsEnd o) {
+ public static Result_ReplyShortChannelIdsEndDecodeErrorZ constructor_ok(ReplyShortChannelIdsEnd o) {
number ret = bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_ReplyShortChannelIdsEndDecodeErrorZ ret_hu_conv = Result_ReplyShortChannelIdsEndDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_ReplyShortChannelIdsEndDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_ReplyShortChannelIdsEndDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_ReplyShortChannelIdsEndDecodeErrorZ ret_hu_conv = Result_ReplyShortChannelIdsEndDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_ReplyShortChannelIdsEndDecodeErrorZ _clone() {
+ public Result_ReplyShortChannelIdsEndDecodeErrorZ clone() {
number ret = bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(this.ptr);
Result_ReplyShortChannelIdsEndDecodeErrorZ ret_hu_conv = Result_ReplyShortChannelIdsEndDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_RevokeAndACKDecodeErrorZ constructor__ok(RevokeAndACK o) {
+ public static Result_RevokeAndACKDecodeErrorZ constructor_ok(RevokeAndACK o) {
number ret = bindings.CResult_RevokeAndACKDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_RevokeAndACKDecodeErrorZ ret_hu_conv = Result_RevokeAndACKDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_RevokeAndACKDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_RevokeAndACKDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_RevokeAndACKDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_RevokeAndACKDecodeErrorZ ret_hu_conv = Result_RevokeAndACKDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_RevokeAndACKDecodeErrorZ _clone() {
+ public Result_RevokeAndACKDecodeErrorZ clone() {
number ret = bindings.CResult_RevokeAndACKDecodeErrorZ_clone(this.ptr);
Result_RevokeAndACKDecodeErrorZ ret_hu_conv = Result_RevokeAndACKDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_RouteDecodeErrorZ constructor__ok(Route o) {
+ public static Result_RouteDecodeErrorZ constructor_ok(Route o) {
number ret = bindings.CResult_RouteDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_RouteDecodeErrorZ ret_hu_conv = Result_RouteDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_RouteDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_RouteDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_RouteDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_RouteDecodeErrorZ ret_hu_conv = Result_RouteDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_RouteDecodeErrorZ _clone() {
+ public Result_RouteDecodeErrorZ clone() {
number ret = bindings.CResult_RouteDecodeErrorZ_clone(this.ptr);
Result_RouteDecodeErrorZ ret_hu_conv = Result_RouteDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_RouteHopDecodeErrorZ constructor__ok(RouteHop o) {
+ public static Result_RouteHopDecodeErrorZ constructor_ok(RouteHop o) {
number ret = bindings.CResult_RouteHopDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_RouteHopDecodeErrorZ ret_hu_conv = Result_RouteHopDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_RouteHopDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_RouteHopDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_RouteHopDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_RouteHopDecodeErrorZ ret_hu_conv = Result_RouteHopDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_RouteHopDecodeErrorZ _clone() {
+ public Result_RouteHopDecodeErrorZ clone() {
number ret = bindings.CResult_RouteHopDecodeErrorZ_clone(this.ptr);
Result_RouteHopDecodeErrorZ ret_hu_conv = Result_RouteHopDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_RouteLightningErrorZ constructor__ok(Route o) {
+ public static Result_RouteLightningErrorZ constructor_ok(Route o) {
number ret = bindings.CResult_RouteLightningErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_RouteLightningErrorZ ret_hu_conv = Result_RouteLightningErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_RouteLightningErrorZ constructor__err(LightningError e) {
+ public static Result_RouteLightningErrorZ constructor_err(LightningError e) {
number ret = bindings.CResult_RouteLightningErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_RouteLightningErrorZ ret_hu_conv = Result_RouteLightningErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_RouteLightningErrorZ _clone() {
+ public Result_RouteLightningErrorZ clone() {
number ret = bindings.CResult_RouteLightningErrorZ_clone(this.ptr);
Result_RouteLightningErrorZ ret_hu_conv = Result_RouteLightningErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_RoutingFeesDecodeErrorZ constructor__ok(RoutingFees o) {
+ public static Result_RoutingFeesDecodeErrorZ constructor_ok(RoutingFees o) {
number ret = bindings.CResult_RoutingFeesDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_RoutingFeesDecodeErrorZ ret_hu_conv = Result_RoutingFeesDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_RoutingFeesDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_RoutingFeesDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_RoutingFeesDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_RoutingFeesDecodeErrorZ ret_hu_conv = Result_RoutingFeesDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_RoutingFeesDecodeErrorZ _clone() {
+ public Result_RoutingFeesDecodeErrorZ clone() {
number ret = bindings.CResult_RoutingFeesDecodeErrorZ_clone(this.ptr);
Result_RoutingFeesDecodeErrorZ ret_hu_conv = Result_RoutingFeesDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_SecretKeyErrorZ constructor__ok(Uint8Array o) {
+ public static Result_SecretKeyErrorZ constructor_ok(Uint8Array o) {
number ret = bindings.CResult_SecretKeyErrorZ_ok(o);
Result_SecretKeyErrorZ ret_hu_conv = Result_SecretKeyErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public static Result_SecretKeyErrorZ constructor__err(Secp256k1Error e) {
+ public static Result_SecretKeyErrorZ constructor_err(Secp256k1Error e) {
number ret = bindings.CResult_SecretKeyErrorZ_err(e);
Result_SecretKeyErrorZ ret_hu_conv = Result_SecretKeyErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_ShutdownDecodeErrorZ constructor__ok(Shutdown o) {
+ public static Result_ShutdownDecodeErrorZ constructor_ok(Shutdown o) {
number ret = bindings.CResult_ShutdownDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_ShutdownDecodeErrorZ ret_hu_conv = Result_ShutdownDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_ShutdownDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_ShutdownDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_ShutdownDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_ShutdownDecodeErrorZ ret_hu_conv = Result_ShutdownDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_ShutdownDecodeErrorZ _clone() {
+ public Result_ShutdownDecodeErrorZ clone() {
number ret = bindings.CResult_ShutdownDecodeErrorZ_clone(this.ptr);
Result_ShutdownDecodeErrorZ ret_hu_conv = Result_ShutdownDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_ShutdownScriptDecodeErrorZ constructor__ok(ShutdownScript o) {
+ public static Result_ShutdownScriptDecodeErrorZ constructor_ok(ShutdownScript o) {
number ret = bindings.CResult_ShutdownScriptDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_ShutdownScriptDecodeErrorZ ret_hu_conv = Result_ShutdownScriptDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_ShutdownScriptDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_ShutdownScriptDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_ShutdownScriptDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_ShutdownScriptDecodeErrorZ ret_hu_conv = Result_ShutdownScriptDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_ShutdownScriptDecodeErrorZ _clone() {
+ public Result_ShutdownScriptDecodeErrorZ clone() {
number ret = bindings.CResult_ShutdownScriptDecodeErrorZ_clone(this.ptr);
Result_ShutdownScriptDecodeErrorZ ret_hu_conv = Result_ShutdownScriptDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_ShutdownScriptInvalidShutdownScriptZ constructor__ok(ShutdownScript o) {
+ public static Result_ShutdownScriptInvalidShutdownScriptZ constructor_ok(ShutdownScript o) {
number ret = bindings.CResult_ShutdownScriptInvalidShutdownScriptZ_ok(o == null ? 0 : o.ptr & ~1);
Result_ShutdownScriptInvalidShutdownScriptZ ret_hu_conv = Result_ShutdownScriptInvalidShutdownScriptZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_ShutdownScriptInvalidShutdownScriptZ constructor__err(Uint8Array e_script_arg) {
+ public static Result_ShutdownScriptInvalidShutdownScriptZ constructor_err(Uint8Array e_script_arg) {
number ret = bindings.CResult_ShutdownScriptInvalidShutdownScriptZ_err(bindings.InvalidShutdownScript_new(e_script_arg));
Result_ShutdownScriptInvalidShutdownScriptZ ret_hu_conv = Result_ShutdownScriptInvalidShutdownScriptZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_SiPrefixNoneZ constructor__ok(SiPrefix o) {
+ public static Result_SiPrefixNoneZ constructor_ok(SiPrefix o) {
number ret = bindings.CResult_SiPrefixNoneZ_ok(o);
Result_SiPrefixNoneZ ret_hu_conv = Result_SiPrefixNoneZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public static Result_SiPrefixNoneZ constructor__err() {
+ public static Result_SiPrefixNoneZ constructor_err() {
number ret = bindings.CResult_SiPrefixNoneZ_err();
Result_SiPrefixNoneZ ret_hu_conv = Result_SiPrefixNoneZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public Result_SiPrefixNoneZ _clone() {
+ public Result_SiPrefixNoneZ clone() {
number ret = bindings.CResult_SiPrefixNoneZ_clone(this.ptr);
Result_SiPrefixNoneZ ret_hu_conv = Result_SiPrefixNoneZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_SignDecodeErrorZ constructor__ok(Sign o) {
+ public static Result_SignDecodeErrorZ constructor_ok(Sign o) {
number ret = bindings.CResult_SignDecodeErrorZ_ok(o == null ? 0 : o.ptr);
Result_SignDecodeErrorZ ret_hu_conv = Result_SignDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_SignDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_SignDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_SignDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_SignDecodeErrorZ ret_hu_conv = Result_SignDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_SignDecodeErrorZ _clone() {
+ public Result_SignDecodeErrorZ clone() {
number ret = bindings.CResult_SignDecodeErrorZ_clone(this.ptr);
Result_SignDecodeErrorZ ret_hu_conv = Result_SignDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_SignatureNoneZ constructor__ok(Uint8Array o) {
+ public static Result_SignatureNoneZ constructor_ok(Uint8Array o) {
number ret = bindings.CResult_SignatureNoneZ_ok(o);
Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public static Result_SignatureNoneZ constructor__err() {
+ public static Result_SignatureNoneZ constructor_err() {
number ret = bindings.CResult_SignatureNoneZ_err();
Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public Result_SignatureNoneZ _clone() {
+ public Result_SignatureNoneZ clone() {
number ret = bindings.CResult_SignatureNoneZ_clone(this.ptr);
Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_SignedRawInvoiceNoneZ constructor__ok(SignedRawInvoice o) {
+ public static Result_SignedRawInvoiceNoneZ constructor_ok(SignedRawInvoice o) {
number ret = bindings.CResult_SignedRawInvoiceNoneZ_ok(o == null ? 0 : o.ptr & ~1);
Result_SignedRawInvoiceNoneZ ret_hu_conv = Result_SignedRawInvoiceNoneZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_SignedRawInvoiceNoneZ constructor__err() {
+ public static Result_SignedRawInvoiceNoneZ constructor_err() {
number ret = bindings.CResult_SignedRawInvoiceNoneZ_err();
Result_SignedRawInvoiceNoneZ ret_hu_conv = Result_SignedRawInvoiceNoneZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public Result_SignedRawInvoiceNoneZ _clone() {
+ public Result_SignedRawInvoiceNoneZ clone() {
number ret = bindings.CResult_SignedRawInvoiceNoneZ_clone(this.ptr);
Result_SignedRawInvoiceNoneZ ret_hu_conv = Result_SignedRawInvoiceNoneZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_SpendableOutputDescriptorDecodeErrorZ constructor__ok(SpendableOutputDescriptor o) {
+ public static Result_SpendableOutputDescriptorDecodeErrorZ constructor_ok(SpendableOutputDescriptor o) {
number ret = bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o.ptr);
Result_SpendableOutputDescriptorDecodeErrorZ ret_hu_conv = Result_SpendableOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public static Result_SpendableOutputDescriptorDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_SpendableOutputDescriptorDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_SpendableOutputDescriptorDecodeErrorZ ret_hu_conv = Result_SpendableOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_SpendableOutputDescriptorDecodeErrorZ _clone() {
+ public Result_SpendableOutputDescriptorDecodeErrorZ clone() {
number ret = bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_clone(this.ptr);
Result_SpendableOutputDescriptorDecodeErrorZ ret_hu_conv = Result_SpendableOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_StaticPaymentOutputDescriptorDecodeErrorZ constructor__ok(StaticPaymentOutputDescriptor o) {
+ public static Result_StaticPaymentOutputDescriptorDecodeErrorZ constructor_ok(StaticPaymentOutputDescriptor o) {
number ret = bindings.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_StaticPaymentOutputDescriptorDecodeErrorZ ret_hu_conv = Result_StaticPaymentOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_StaticPaymentOutputDescriptorDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_StaticPaymentOutputDescriptorDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_StaticPaymentOutputDescriptorDecodeErrorZ ret_hu_conv = Result_StaticPaymentOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_StaticPaymentOutputDescriptorDecodeErrorZ _clone() {
+ public Result_StaticPaymentOutputDescriptorDecodeErrorZ clone() {
number ret = bindings.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(this.ptr);
Result_StaticPaymentOutputDescriptorDecodeErrorZ ret_hu_conv = Result_StaticPaymentOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_StringErrorZ constructor__ok(String o) {
+ public static Result_StringErrorZ constructor_ok(String o) {
number ret = bindings.CResult_StringErrorZ_ok(o);
Result_StringErrorZ ret_hu_conv = Result_StringErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public static Result_StringErrorZ constructor__err(Secp256k1Error e) {
+ public static Result_StringErrorZ constructor_err(Secp256k1Error e) {
number ret = bindings.CResult_StringErrorZ_err(e);
Result_StringErrorZ ret_hu_conv = Result_StringErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_TransactionNoneZ constructor__ok(Uint8Array o) {
+ public static Result_TransactionNoneZ constructor_ok(Uint8Array o) {
number ret = bindings.CResult_TransactionNoneZ_ok(o);
Result_TransactionNoneZ ret_hu_conv = Result_TransactionNoneZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public static Result_TransactionNoneZ constructor__err() {
+ public static Result_TransactionNoneZ constructor_err() {
number ret = bindings.CResult_TransactionNoneZ_err();
Result_TransactionNoneZ ret_hu_conv = Result_TransactionNoneZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public Result_TransactionNoneZ _clone() {
+ public Result_TransactionNoneZ clone() {
number ret = bindings.CResult_TransactionNoneZ_clone(this.ptr);
Result_TransactionNoneZ ret_hu_conv = Result_TransactionNoneZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_TrustedClosingTransactionNoneZ constructor__ok(TrustedClosingTransaction o) {
+ public static Result_TrustedClosingTransactionNoneZ constructor_ok(TrustedClosingTransaction o) {
number ret = bindings.CResult_TrustedClosingTransactionNoneZ_ok(o == null ? 0 : o.ptr & ~1);
Result_TrustedClosingTransactionNoneZ ret_hu_conv = Result_TrustedClosingTransactionNoneZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_TrustedClosingTransactionNoneZ constructor__err() {
+ public static Result_TrustedClosingTransactionNoneZ constructor_err() {
number ret = bindings.CResult_TrustedClosingTransactionNoneZ_err();
Result_TrustedClosingTransactionNoneZ ret_hu_conv = Result_TrustedClosingTransactionNoneZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_TrustedCommitmentTransactionNoneZ constructor__ok(TrustedCommitmentTransaction o) {
+ public static Result_TrustedCommitmentTransactionNoneZ constructor_ok(TrustedCommitmentTransaction o) {
number ret = bindings.CResult_TrustedCommitmentTransactionNoneZ_ok(o == null ? 0 : o.ptr & ~1);
Result_TrustedCommitmentTransactionNoneZ ret_hu_conv = Result_TrustedCommitmentTransactionNoneZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_TrustedCommitmentTransactionNoneZ constructor__err() {
+ public static Result_TrustedCommitmentTransactionNoneZ constructor_err() {
number ret = bindings.CResult_TrustedCommitmentTransactionNoneZ_err();
Result_TrustedCommitmentTransactionNoneZ ret_hu_conv = Result_TrustedCommitmentTransactionNoneZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_TxCreationKeysDecodeErrorZ constructor__ok(TxCreationKeys o) {
+ public static Result_TxCreationKeysDecodeErrorZ constructor_ok(TxCreationKeys o) {
number ret = bindings.CResult_TxCreationKeysDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_TxCreationKeysDecodeErrorZ ret_hu_conv = Result_TxCreationKeysDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_TxCreationKeysDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_TxCreationKeysDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_TxCreationKeysDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_TxCreationKeysDecodeErrorZ ret_hu_conv = Result_TxCreationKeysDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_TxCreationKeysDecodeErrorZ _clone() {
+ public Result_TxCreationKeysDecodeErrorZ clone() {
number ret = bindings.CResult_TxCreationKeysDecodeErrorZ_clone(this.ptr);
Result_TxCreationKeysDecodeErrorZ ret_hu_conv = Result_TxCreationKeysDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_TxCreationKeysErrorZ constructor__ok(TxCreationKeys o) {
+ public static Result_TxCreationKeysErrorZ constructor_ok(TxCreationKeys o) {
number ret = bindings.CResult_TxCreationKeysErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_TxCreationKeysErrorZ ret_hu_conv = Result_TxCreationKeysErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_TxCreationKeysErrorZ constructor__err(Secp256k1Error e) {
+ public static Result_TxCreationKeysErrorZ constructor_err(Secp256k1Error e) {
number ret = bindings.CResult_TxCreationKeysErrorZ_err(e);
Result_TxCreationKeysErrorZ ret_hu_conv = Result_TxCreationKeysErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public Result_TxCreationKeysErrorZ _clone() {
+ public Result_TxCreationKeysErrorZ clone() {
number ret = bindings.CResult_TxCreationKeysErrorZ_clone(this.ptr);
Result_TxCreationKeysErrorZ ret_hu_conv = Result_TxCreationKeysErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_TxOutAccessErrorZ constructor__ok(TxOut o) {
+ public static Result_TxOutAccessErrorZ constructor_ok(TxOut o) {
number ret = bindings.CResult_TxOutAccessErrorZ_ok(o.ptr);
Result_TxOutAccessErrorZ ret_hu_conv = Result_TxOutAccessErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public static Result_TxOutAccessErrorZ constructor__err(AccessError e) {
+ public static Result_TxOutAccessErrorZ constructor_err(AccessError e) {
number ret = bindings.CResult_TxOutAccessErrorZ_err(e);
Result_TxOutAccessErrorZ ret_hu_conv = Result_TxOutAccessErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public Result_TxOutAccessErrorZ _clone() {
+ public Result_TxOutAccessErrorZ clone() {
number ret = bindings.CResult_TxOutAccessErrorZ_clone(this.ptr);
Result_TxOutAccessErrorZ ret_hu_conv = Result_TxOutAccessErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_UnsignedChannelAnnouncementDecodeErrorZ constructor__ok(UnsignedChannelAnnouncement o) {
+ public static Result_UnsignedChannelAnnouncementDecodeErrorZ constructor_ok(UnsignedChannelAnnouncement o) {
number ret = bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_UnsignedChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_UnsignedChannelAnnouncementDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_UnsignedChannelAnnouncementDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_UnsignedChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_UnsignedChannelAnnouncementDecodeErrorZ _clone() {
+ public Result_UnsignedChannelAnnouncementDecodeErrorZ clone() {
number ret = bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(this.ptr);
Result_UnsignedChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_UnsignedChannelUpdateDecodeErrorZ constructor__ok(UnsignedChannelUpdate o) {
+ public static Result_UnsignedChannelUpdateDecodeErrorZ constructor_ok(UnsignedChannelUpdate o) {
number ret = bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_UnsignedChannelUpdateDecodeErrorZ ret_hu_conv = Result_UnsignedChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_UnsignedChannelUpdateDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_UnsignedChannelUpdateDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_UnsignedChannelUpdateDecodeErrorZ ret_hu_conv = Result_UnsignedChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_UnsignedChannelUpdateDecodeErrorZ _clone() {
+ public Result_UnsignedChannelUpdateDecodeErrorZ clone() {
number ret = bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_clone(this.ptr);
Result_UnsignedChannelUpdateDecodeErrorZ ret_hu_conv = Result_UnsignedChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_UnsignedNodeAnnouncementDecodeErrorZ constructor__ok(UnsignedNodeAnnouncement o) {
+ public static Result_UnsignedNodeAnnouncementDecodeErrorZ constructor_ok(UnsignedNodeAnnouncement o) {
number ret = bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_UnsignedNodeAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedNodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_UnsignedNodeAnnouncementDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_UnsignedNodeAnnouncementDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_UnsignedNodeAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedNodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_UnsignedNodeAnnouncementDecodeErrorZ _clone() {
+ public Result_UnsignedNodeAnnouncementDecodeErrorZ clone() {
number ret = bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(this.ptr);
Result_UnsignedNodeAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedNodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_UpdateAddHTLCDecodeErrorZ constructor__ok(UpdateAddHTLC o) {
+ public static Result_UpdateAddHTLCDecodeErrorZ constructor_ok(UpdateAddHTLC o) {
number ret = bindings.CResult_UpdateAddHTLCDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_UpdateAddHTLCDecodeErrorZ ret_hu_conv = Result_UpdateAddHTLCDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_UpdateAddHTLCDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_UpdateAddHTLCDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_UpdateAddHTLCDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_UpdateAddHTLCDecodeErrorZ ret_hu_conv = Result_UpdateAddHTLCDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_UpdateAddHTLCDecodeErrorZ _clone() {
+ public Result_UpdateAddHTLCDecodeErrorZ clone() {
number ret = bindings.CResult_UpdateAddHTLCDecodeErrorZ_clone(this.ptr);
Result_UpdateAddHTLCDecodeErrorZ ret_hu_conv = Result_UpdateAddHTLCDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_UpdateFailHTLCDecodeErrorZ constructor__ok(UpdateFailHTLC o) {
+ public static Result_UpdateFailHTLCDecodeErrorZ constructor_ok(UpdateFailHTLC o) {
number ret = bindings.CResult_UpdateFailHTLCDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_UpdateFailHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailHTLCDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_UpdateFailHTLCDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_UpdateFailHTLCDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_UpdateFailHTLCDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_UpdateFailHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailHTLCDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_UpdateFailHTLCDecodeErrorZ _clone() {
+ public Result_UpdateFailHTLCDecodeErrorZ clone() {
number ret = bindings.CResult_UpdateFailHTLCDecodeErrorZ_clone(this.ptr);
Result_UpdateFailHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailHTLCDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_UpdateFailMalformedHTLCDecodeErrorZ constructor__ok(UpdateFailMalformedHTLC o) {
+ public static Result_UpdateFailMalformedHTLCDecodeErrorZ constructor_ok(UpdateFailMalformedHTLC o) {
number ret = bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_UpdateFailMalformedHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailMalformedHTLCDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_UpdateFailMalformedHTLCDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_UpdateFailMalformedHTLCDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_UpdateFailMalformedHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailMalformedHTLCDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_UpdateFailMalformedHTLCDecodeErrorZ _clone() {
+ public Result_UpdateFailMalformedHTLCDecodeErrorZ clone() {
number ret = bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(this.ptr);
Result_UpdateFailMalformedHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailMalformedHTLCDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_UpdateFeeDecodeErrorZ constructor__ok(UpdateFee o) {
+ public static Result_UpdateFeeDecodeErrorZ constructor_ok(UpdateFee o) {
number ret = bindings.CResult_UpdateFeeDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_UpdateFeeDecodeErrorZ ret_hu_conv = Result_UpdateFeeDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_UpdateFeeDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_UpdateFeeDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_UpdateFeeDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_UpdateFeeDecodeErrorZ ret_hu_conv = Result_UpdateFeeDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_UpdateFeeDecodeErrorZ _clone() {
+ public Result_UpdateFeeDecodeErrorZ clone() {
number ret = bindings.CResult_UpdateFeeDecodeErrorZ_clone(this.ptr);
Result_UpdateFeeDecodeErrorZ ret_hu_conv = Result_UpdateFeeDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_UpdateFulfillHTLCDecodeErrorZ constructor__ok(UpdateFulfillHTLC o) {
+ public static Result_UpdateFulfillHTLCDecodeErrorZ constructor_ok(UpdateFulfillHTLC o) {
number ret = bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
Result_UpdateFulfillHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFulfillHTLCDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(o);
return ret_hu_conv;
}
- public static Result_UpdateFulfillHTLCDecodeErrorZ constructor__err(DecodeError e) {
+ public static Result_UpdateFulfillHTLCDecodeErrorZ constructor_err(DecodeError e) {
number ret = bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_UpdateFulfillHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFulfillHTLCDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_UpdateFulfillHTLCDecodeErrorZ _clone() {
+ public Result_UpdateFulfillHTLCDecodeErrorZ clone() {
number ret = bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_clone(this.ptr);
Result_UpdateFulfillHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFulfillHTLCDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_boolLightningErrorZ constructor__ok(boolean o) {
+ public static Result_boolLightningErrorZ constructor_ok(boolean o) {
number ret = bindings.CResult_boolLightningErrorZ_ok(o);
Result_boolLightningErrorZ ret_hu_conv = Result_boolLightningErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public static Result_boolLightningErrorZ constructor__err(LightningError e) {
+ public static Result_boolLightningErrorZ constructor_err(LightningError e) {
number ret = bindings.CResult_boolLightningErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_boolLightningErrorZ ret_hu_conv = Result_boolLightningErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_boolLightningErrorZ _clone() {
+ public Result_boolLightningErrorZ clone() {
number ret = bindings.CResult_boolLightningErrorZ_clone(this.ptr);
Result_boolLightningErrorZ ret_hu_conv = Result_boolLightningErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
}
- public static Result_boolPeerHandleErrorZ constructor__ok(boolean o) {
+ public static Result_boolPeerHandleErrorZ constructor_ok(boolean o) {
number ret = bindings.CResult_boolPeerHandleErrorZ_ok(o);
Result_boolPeerHandleErrorZ ret_hu_conv = Result_boolPeerHandleErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public static Result_boolPeerHandleErrorZ constructor__err(PeerHandleError e) {
+ public static Result_boolPeerHandleErrorZ constructor_err(PeerHandleError e) {
number ret = bindings.CResult_boolPeerHandleErrorZ_err(e == null ? 0 : e.ptr & ~1);
Result_boolPeerHandleErrorZ ret_hu_conv = Result_boolPeerHandleErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(e);
return ret_hu_conv;
}
- public Result_boolPeerHandleErrorZ _clone() {
+ public Result_boolPeerHandleErrorZ clone() {
number ret = bindings.CResult_boolPeerHandleErrorZ_clone(this.ptr);
Result_boolPeerHandleErrorZ ret_hu_conv = Result_boolPeerHandleErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
},
get_next_channel_announcements (starting_point: number, batch_amount: number): number[] {
- ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate>[] ret = arg.get_next_channel_announcements(starting_point, batch_amount);
- result: number[] = ret != null ? Arrays.stream(ret).map(ret_conv_63 -> bindings.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(ret_conv_63.a == null ? 0 : ret_conv_63.a.ptr & ~1, ret_conv_63.b == null ? 0 : ret_conv_63.b.ptr & ~1, ret_conv_63.c == null ? 0 : ret_conv_63.c.ptr & ~1)).toArray(number[]::new) : null;
- for (ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate> ret_conv_63: ret) { impl_holder.held.ptrs_to.add(ret_conv_63.a); impl_holder.held.ptrs_to.add(ret_conv_63.b); impl_holder.held.ptrs_to.add(ret_conv_63.c); };
+ ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ[] ret = arg.get_next_channel_announcements(starting_point, batch_amount);
+ result: number[] = ret != null ? Arrays.stream(ret).map(ret_conv_59 -> ret_conv_59 != null ? ret_conv_59.ptr : 0).toArray(number[]::new) : null;
return result;
},
handle_node_announcement(msg: NodeAnnouncement): Result_boolLightningErrorZ;
handle_channel_announcement(msg: ChannelAnnouncement): Result_boolLightningErrorZ;
handle_channel_update(msg: ChannelUpdate): Result_boolLightningErrorZ;
- get_next_channel_announcements(starting_point: number, batch_amount: number): ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate>[];
+ get_next_channel_announcements(starting_point: number, batch_amount: number): ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ[];
get_next_node_announcements(starting_point: Uint8Array, batch_amount: number): NodeAnnouncement[];
sync_routing_table(their_node_id: Uint8Array, init: Init): void;
handle_reply_channel_range(their_node_id: Uint8Array, msg: ReplyChannelRange): Result_NoneLightningErrorZ;
return ret_hu_conv;
}
- public ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate>[] get_next_channel_announcements(number starting_point, number batch_amount) {
+ public ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ[] get_next_channel_announcements(number starting_point, number batch_amount) {
number[] ret = bindings.RoutingMessageHandler_get_next_channel_announcements(this.ptr, starting_point, batch_amount);
- ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate>[] ret_conv_63_arr = new ThreeTuple[ret.length];
- for (int l = 0; l < ret.length; l++) {
- number ret_conv_63 = ret[l];
- number ret_conv_63_a = bindings.LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(ret_conv_63);
- const ret_conv_63_a_hu_conv: ChannelAnnouncement = new ChannelAnnouncement(null, ret_conv_63_a);
- ret_conv_63_a_hu_conv.ptrs_to.add(this);;
- number ret_conv_63_b = bindings.LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(ret_conv_63);
- const ret_conv_63_b_hu_conv: ChannelUpdate = new ChannelUpdate(null, ret_conv_63_b);
- ret_conv_63_b_hu_conv.ptrs_to.add(this);;
- number ret_conv_63_c = bindings.LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(ret_conv_63);
- const ret_conv_63_c_hu_conv: ChannelUpdate = new ChannelUpdate(null, ret_conv_63_c);
- ret_conv_63_c_hu_conv.ptrs_to.add(this);;
- ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate> ret_conv_63_conv = new ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate>(ret_conv_63_a_hu_conv, ret_conv_63_b_hu_conv, ret_conv_63_c_hu_conv, () -> {
- bindings.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(ret_conv_63);
- });
- ret_conv_63_a_hu_conv.ptrs_to.add(ret_conv_63_conv);
- ret_conv_63_b_hu_conv.ptrs_to.add(ret_conv_63_conv);
- ret_conv_63_c_hu_conv.ptrs_to.add(ret_conv_63_conv);
- ret_conv_63_arr[l] = ret_conv_63_conv;
+ ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ[] ret_conv_59_arr = new ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ[ret.length];
+ for (int h = 0; h < ret.length; h++) {
+ number ret_conv_59 = ret[h];
+ ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ ret_conv_59_hu_conv = new ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ(null, ret_conv_59);
+ ret_conv_59_hu_conv.ptrs_to.add(this);
+ ret_conv_59_arr[h] = ret_conv_59_hu_conv;
}
- return ret_conv_63_arr;
+ return ret_conv_59_arr;
}
public NodeAnnouncement[] get_next_node_announcements(Uint8Array starting_point, number batch_amount) {
return ret_hu_conv;
}
- public ThreeTuple<RawInvoice, Uint8Array, InvoiceSignature> into_parts() {
+ public ThreeTuple_RawInvoice_u832InvoiceSignatureZ into_parts() {
number ret = bindings.SignedRawInvoice_into_parts(this.ptr);
- number ret_a = bindings.LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(ret);
- const ret_a_hu_conv: RawInvoice = new RawInvoice(null, ret_a);
- ret_a_hu_conv.ptrs_to.add(this);;
- Uint8Array ret_b = bindings.LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(ret);
- number ret_c = bindings.LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(ret);
- const ret_c_hu_conv: InvoiceSignature = new InvoiceSignature(null, ret_c);
- ret_c_hu_conv.ptrs_to.add(this);;
- ThreeTuple<RawInvoice, Uint8Array, InvoiceSignature> ret_conv = new ThreeTuple<RawInvoice, Uint8Array, InvoiceSignature>(ret_a_hu_conv, ret_b, ret_c_hu_conv, () -> {
- bindings.C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(ret);
- });
- ret_a_hu_conv.ptrs_to.add(ret_conv);
- ret_c_hu_conv.ptrs_to.add(ret_conv);
- return ret_conv;
+ ThreeTuple_RawInvoice_u832InvoiceSignatureZ ret_hu_conv = new ThreeTuple_RawInvoice_u832InvoiceSignatureZ(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
}
public RawInvoice raw_invoice() {
--- /dev/null
+
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+
+
+ export default class C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ extends CommonBase {
+ constructor(_dummy: object, ptr: number) {
+ super(ptr);
+ }
+
+
+ protected finalize() {
+ super.finalize();
+
+ if (this.ptr != 0) {
+ bindings.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(this.ptr);
+ }
+ }
+}
--- /dev/null
+
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+
+
+ export default class C3Tuple_RawInvoice_u832InvoiceSignatureZ extends CommonBase {
+ constructor(_dummy: object, ptr: number) {
+ super(ptr);
+ }
+
+
+ protected finalize() {
+ super.finalize();
+
+ if (this.ptr != 0) {
+ bindings.C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(this.ptr);
+ }
+ }
+}
--- /dev/null
+
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+
+
+ export default class C2Tuple_BlockHashChannelManagerZ extends CommonBase {
+ constructor(_dummy: object, ptr: number) {
+ super(ptr);
+ }
+
+
+ protected finalize() {
+ super.finalize();
+
+ if (this.ptr != 0) {
+ bindings.C2Tuple_BlockHashChannelManagerZ_free(this.ptr);
+ }
+ }
+ public Uint8Array get_a() {
+ Uint8Array ret = bindings.C2Tuple_BlockHashChannelManagerZ_get_a(this.ptr);
+ return ret;
+ }
+
+ public ChannelManager get_b() {
+ number ret = bindings.C2Tuple_BlockHashChannelManagerZ_get_b(this.ptr);
+ const ret_hu_conv: ChannelManager = new ChannelManager(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ public static TwoTuple_BlockHashChannelManagerZ constructor_new(Uint8Array a, FeeEstimator b_fee_est, Watch b_chain_monitor, BroadcasterInterface b_tx_broadcaster, Logger b_logger, KeysInterface b_keys_manager, UserConfig b_config, ChainParameters b_params) {
+ number ret = bindings.C2Tuple_BlockHashChannelManagerZ_new(a, bindings.ChannelManager_new(b_fee_est == null ? 0 : b_fee_est.ptr, b_chain_monitor == null ? 0 : b_chain_monitor.ptr, b_tx_broadcaster == null ? 0 : b_tx_broadcaster.ptr, b_logger == null ? 0 : b_logger.ptr, b_keys_manager == null ? 0 : b_keys_manager.ptr, b_config == null ? 0 : b_config.ptr & ~1, b_params == null ? 0 : b_params.ptr & ~1));
+ TwoTuple_BlockHashChannelManagerZ ret_hu_conv = new TwoTuple_BlockHashChannelManagerZ(null, ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ ret_hu_conv.ptrs_to.add(b_fee_est);
+ ret_hu_conv.ptrs_to.add(b_chain_monitor);
+ ret_hu_conv.ptrs_to.add(b_tx_broadcaster);
+ ret_hu_conv.ptrs_to.add(b_logger);
+ ret_hu_conv.ptrs_to.add(b_keys_manager);
+ ret_hu_conv.ptrs_to.add(b_config);
+ ret_hu_conv.ptrs_to.add(b_params);
+ return ret_hu_conv;
+ }
+
+}
--- /dev/null
+
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+
+
+ export default class C2Tuple_BlockHashChannelMonitorZ extends CommonBase {
+ constructor(_dummy: object, ptr: number) {
+ super(ptr);
+ }
+
+
+ protected finalize() {
+ super.finalize();
+
+ if (this.ptr != 0) {
+ bindings.C2Tuple_BlockHashChannelMonitorZ_free(this.ptr);
+ }
+ }
+ public Uint8Array get_a() {
+ Uint8Array ret = bindings.C2Tuple_BlockHashChannelMonitorZ_get_a(this.ptr);
+ return ret;
+ }
+
+ public ChannelMonitor get_b() {
+ number ret = bindings.C2Tuple_BlockHashChannelMonitorZ_get_b(this.ptr);
+ const ret_hu_conv: ChannelMonitor = new ChannelMonitor(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ public TwoTuple_BlockHashChannelMonitorZ clone() {
+ number ret = bindings.C2Tuple_BlockHashChannelMonitorZ_clone(this.ptr);
+ TwoTuple_BlockHashChannelMonitorZ ret_hu_conv = new TwoTuple_BlockHashChannelMonitorZ(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ public static TwoTuple_BlockHashChannelMonitorZ constructor_new(Uint8Array a, ChannelMonitor b) {
+ number ret = bindings.C2Tuple_BlockHashChannelMonitorZ_new(a, b == null ? 0 : b.ptr & ~1);
+ TwoTuple_BlockHashChannelMonitorZ ret_hu_conv = new TwoTuple_BlockHashChannelMonitorZ(null, ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ ret_hu_conv.ptrs_to.add(b);
+ return ret_hu_conv;
+ }
+
+}
--- /dev/null
+
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+
+
+ export default class C2Tuple_OutPointScriptZ extends CommonBase {
+ constructor(_dummy: object, ptr: number) {
+ super(ptr);
+ }
+
+
+ protected finalize() {
+ super.finalize();
+
+ if (this.ptr != 0) {
+ bindings.C2Tuple_OutPointScriptZ_free(this.ptr);
+ }
+ }
+ public OutPoint get_a() {
+ number ret = bindings.C2Tuple_OutPointScriptZ_get_a(this.ptr);
+ const ret_hu_conv: OutPoint = new OutPoint(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ public Uint8Array get_b() {
+ Uint8Array ret = bindings.C2Tuple_OutPointScriptZ_get_b(this.ptr);
+ return ret;
+ }
+
+ public TwoTuple_OutPointScriptZ clone() {
+ number ret = bindings.C2Tuple_OutPointScriptZ_clone(this.ptr);
+ TwoTuple_OutPointScriptZ ret_hu_conv = new TwoTuple_OutPointScriptZ(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ public static TwoTuple_OutPointScriptZ constructor_new(OutPoint a, Uint8Array b) {
+ number ret = bindings.C2Tuple_OutPointScriptZ_new(a == null ? 0 : a.ptr & ~1, b);
+ TwoTuple_OutPointScriptZ ret_hu_conv = new TwoTuple_OutPointScriptZ(null, ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ ret_hu_conv.ptrs_to.add(a);
+ return ret_hu_conv;
+ }
+
+}
--- /dev/null
+
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+
+
+ export default class C2Tuple_PaymentHashPaymentSecretZ extends CommonBase {
+ constructor(_dummy: object, ptr: number) {
+ super(ptr);
+ }
+
+
+ protected finalize() {
+ super.finalize();
+
+ if (this.ptr != 0) {
+ bindings.C2Tuple_PaymentHashPaymentSecretZ_free(this.ptr);
+ }
+ }
+ public Uint8Array get_a() {
+ Uint8Array ret = bindings.C2Tuple_PaymentHashPaymentSecretZ_get_a(this.ptr);
+ return ret;
+ }
+
+ public Uint8Array get_b() {
+ Uint8Array ret = bindings.C2Tuple_PaymentHashPaymentSecretZ_get_b(this.ptr);
+ return ret;
+ }
+
+ public TwoTuple_PaymentHashPaymentSecretZ clone() {
+ number ret = bindings.C2Tuple_PaymentHashPaymentSecretZ_clone(this.ptr);
+ TwoTuple_PaymentHashPaymentSecretZ ret_hu_conv = new TwoTuple_PaymentHashPaymentSecretZ(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ public static TwoTuple_PaymentHashPaymentSecretZ constructor_new(Uint8Array a, Uint8Array b) {
+ number ret = bindings.C2Tuple_PaymentHashPaymentSecretZ_new(a, b);
+ TwoTuple_PaymentHashPaymentSecretZ ret_hu_conv = new TwoTuple_PaymentHashPaymentSecretZ(null, ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+}
--- /dev/null
+
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+
+
+ export default class C2Tuple_PublicKeyTypeZ extends CommonBase {
+ constructor(_dummy: object, ptr: number) {
+ super(ptr);
+ }
+
+
+ protected finalize() {
+ super.finalize();
+
+ if (this.ptr != 0) {
+ bindings.C2Tuple_PublicKeyTypeZ_free(this.ptr);
+ }
+ }
+ public Uint8Array get_a() {
+ Uint8Array ret = bindings.C2Tuple_PublicKeyTypeZ_get_a(this.ptr);
+ return ret;
+ }
+
+ public Type get_b() {
+ number ret = bindings.C2Tuple_PublicKeyTypeZ_get_b(this.ptr);
+ Type ret_hu_conv = new Type(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ public TwoTuple_PublicKeyTypeZ clone() {
+ number ret = bindings.C2Tuple_PublicKeyTypeZ_clone(this.ptr);
+ TwoTuple_PublicKeyTypeZ ret_hu_conv = new TwoTuple_PublicKeyTypeZ(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ public static TwoTuple_PublicKeyTypeZ constructor_new(Uint8Array a, Type b) {
+ number ret = bindings.C2Tuple_PublicKeyTypeZ_new(a, b == null ? 0 : b.ptr);
+ TwoTuple_PublicKeyTypeZ ret_hu_conv = new TwoTuple_PublicKeyTypeZ(null, ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ ret_hu_conv.ptrs_to.add(b);
+ return ret_hu_conv;
+ }
+
+}
--- /dev/null
+
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+
+
+ export default class C2Tuple_SignatureCVec_SignatureZZ extends CommonBase {
+ constructor(_dummy: object, ptr: number) {
+ super(ptr);
+ }
+
+
+ protected finalize() {
+ super.finalize();
+
+ if (this.ptr != 0) {
+ bindings.C2Tuple_SignatureCVec_SignatureZZ_free(this.ptr);
+ }
+ }
+ public Uint8Array get_a() {
+ Uint8Array ret = bindings.C2Tuple_SignatureCVec_SignatureZZ_get_a(this.ptr);
+ return ret;
+ }
+
+ public Uint8Array[] get_b() {
+ Uint8Array[] ret = bindings.C2Tuple_SignatureCVec_SignatureZZ_get_b(this.ptr);
+ return ret;
+ }
+
+ public TwoTuple_SignatureCVec_SignatureZZ clone() {
+ number ret = bindings.C2Tuple_SignatureCVec_SignatureZZ_clone(this.ptr);
+ TwoTuple_SignatureCVec_SignatureZZ ret_hu_conv = new TwoTuple_SignatureCVec_SignatureZZ(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ public static TwoTuple_SignatureCVec_SignatureZZ constructor_new(Uint8Array a, Uint8Array[] b) {
+ number ret = bindings.C2Tuple_SignatureCVec_SignatureZZ_new(a, b);
+ TwoTuple_SignatureCVec_SignatureZZ ret_hu_conv = new TwoTuple_SignatureCVec_SignatureZZ(null, ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+}
--- /dev/null
+
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+
+
+ export default class C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ extends CommonBase {
+ constructor(_dummy: object, ptr: number) {
+ super(ptr);
+ }
+
+
+ protected finalize() {
+ super.finalize();
+
+ if (this.ptr != 0) {
+ bindings.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(this.ptr);
+ }
+ }
+ public Uint8Array get_a() {
+ Uint8Array ret = bindings.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(this.ptr);
+ return ret;
+ }
+
+ public TwoTuple_u32ScriptZ[] get_b() {
+ number[] ret = bindings.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(this.ptr);
+ TwoTuple_u32ScriptZ[] ret_conv_21_arr = new TwoTuple_u32ScriptZ[ret.length];
+ for (int v = 0; v < ret.length; v++) {
+ number ret_conv_21 = ret[v];
+ TwoTuple_u32ScriptZ ret_conv_21_hu_conv = new TwoTuple_u32ScriptZ(null, ret_conv_21);
+ ret_conv_21_hu_conv.ptrs_to.add(this);
+ ret_conv_21_arr[v] = ret_conv_21_hu_conv;
+ }
+ return ret_conv_21_arr;
+ }
+
+ public TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ clone() {
+ number ret = bindings.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(this.ptr);
+ TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ ret_hu_conv = new TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ public static TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ constructor_new(Uint8Array a, TwoTuple_u32ScriptZ[] b) {
+ number ret = bindings.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a, b != null ? Arrays.stream(b).map(b_conv_21 -> b_conv_21 != null ? b_conv_21.ptr : 0).toArray(number[]::new) : null);
+ TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ ret_hu_conv = new TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ(null, ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+}
--- /dev/null
+
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+
+
+ export default class C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ extends CommonBase {
+ constructor(_dummy: object, ptr: number) {
+ super(ptr);
+ }
+
+
+ protected finalize() {
+ super.finalize();
+
+ if (this.ptr != 0) {
+ bindings.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(this.ptr);
+ }
+ }
+ public Uint8Array get_a() {
+ Uint8Array ret = bindings.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(this.ptr);
+ return ret;
+ }
+
+ public TwoTuple_u32TxOutZ[] get_b() {
+ number[] ret = bindings.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(this.ptr);
+ TwoTuple_u32TxOutZ[] ret_conv_20_arr = new TwoTuple_u32TxOutZ[ret.length];
+ for (int u = 0; u < ret.length; u++) {
+ number ret_conv_20 = ret[u];
+ TwoTuple_u32TxOutZ ret_conv_20_hu_conv = new TwoTuple_u32TxOutZ(null, ret_conv_20);
+ ret_conv_20_hu_conv.ptrs_to.add(this);
+ ret_conv_20_arr[u] = ret_conv_20_hu_conv;
+ }
+ return ret_conv_20_arr;
+ }
+
+ public TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ clone() {
+ number ret = bindings.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(this.ptr);
+ TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ ret_hu_conv = new TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ public static TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ constructor_new(Uint8Array a, TwoTuple_u32TxOutZ[] b) {
+ number ret = bindings.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a, b != null ? Arrays.stream(b).map(b_conv_20 -> b_conv_20 != null ? b_conv_20.ptr : 0).toArray(number[]::new) : null);
+ TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ ret_hu_conv = new TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ(null, ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+}
--- /dev/null
+
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+
+
+ export default class C2Tuple_u32ScriptZ extends CommonBase {
+ constructor(_dummy: object, ptr: number) {
+ super(ptr);
+ }
+
+
+ protected finalize() {
+ super.finalize();
+
+ if (this.ptr != 0) {
+ bindings.C2Tuple_u32ScriptZ_free(this.ptr);
+ }
+ }
+ public number get_a() {
+ number ret = bindings.C2Tuple_u32ScriptZ_get_a(this.ptr);
+ return ret;
+ }
+
+ public Uint8Array get_b() {
+ Uint8Array ret = bindings.C2Tuple_u32ScriptZ_get_b(this.ptr);
+ return ret;
+ }
+
+ public TwoTuple_u32ScriptZ clone() {
+ number ret = bindings.C2Tuple_u32ScriptZ_clone(this.ptr);
+ TwoTuple_u32ScriptZ ret_hu_conv = new TwoTuple_u32ScriptZ(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ public static TwoTuple_u32ScriptZ constructor_new(number a, Uint8Array b) {
+ number ret = bindings.C2Tuple_u32ScriptZ_new(a, b);
+ TwoTuple_u32ScriptZ ret_hu_conv = new TwoTuple_u32ScriptZ(null, ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+}
--- /dev/null
+
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+
+
+ export default class C2Tuple_u32TxOutZ extends CommonBase {
+ constructor(_dummy: object, ptr: number) {
+ super(ptr);
+ }
+
+
+ protected finalize() {
+ super.finalize();
+
+ if (this.ptr != 0) {
+ bindings.C2Tuple_u32TxOutZ_free(this.ptr);
+ }
+ }
+ public number get_a() {
+ number ret = bindings.C2Tuple_u32TxOutZ_get_a(this.ptr);
+ return ret;
+ }
+
+ public TxOut get_b() {
+ number ret = bindings.C2Tuple_u32TxOutZ_get_b(this.ptr);
+ TxOut ret_conv = new TxOut(null, ret);
+ return ret_conv;
+ }
+
+ public TwoTuple_u32TxOutZ clone() {
+ number ret = bindings.C2Tuple_u32TxOutZ_clone(this.ptr);
+ TwoTuple_u32TxOutZ ret_hu_conv = new TwoTuple_u32TxOutZ(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ public static TwoTuple_u32TxOutZ constructor_new(number a, TxOut b) {
+ number ret = bindings.C2Tuple_u32TxOutZ_new(a, b.ptr);
+ TwoTuple_u32TxOutZ ret_hu_conv = new TwoTuple_u32TxOutZ(null, ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+}
--- /dev/null
+
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+
+
+ export default class C2Tuple_usizeTransactionZ extends CommonBase {
+ constructor(_dummy: object, ptr: number) {
+ super(ptr);
+ }
+
+
+ protected finalize() {
+ super.finalize();
+
+ if (this.ptr != 0) {
+ bindings.C2Tuple_usizeTransactionZ_free(this.ptr);
+ }
+ }
+ public number get_a() {
+ number ret = bindings.C2Tuple_usizeTransactionZ_get_a(this.ptr);
+ return ret;
+ }
+
+ public Uint8Array get_b() {
+ Uint8Array ret = bindings.C2Tuple_usizeTransactionZ_get_b(this.ptr);
+ return ret;
+ }
+
+ public TwoTuple_usizeTransactionZ clone() {
+ number ret = bindings.C2Tuple_usizeTransactionZ_clone(this.ptr);
+ TwoTuple_usizeTransactionZ ret_hu_conv = new TwoTuple_usizeTransactionZ(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ public static TwoTuple_usizeTransactionZ constructor_new(number a, Uint8Array b) {
+ number ret = bindings.C2Tuple_usizeTransactionZ_new(a, b);
+ TwoTuple_usizeTransactionZ ret_hu_conv = new TwoTuple_usizeTransactionZ(null, ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+}
- public static Result_StringErrorZ constructor_ign(Uint8Array msg, Uint8Array sk) {
+ public static Result_StringErrorZ constructor_sign(Uint8Array msg, Uint8Array sk) {
number ret = bindings.sign(msg, sk);
Result_StringErrorZ ret_hu_conv = Result_StringErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public static Result_PublicKeyErrorZ constructor_ecover_pk(Uint8Array msg, String sig) {
+ public static Result_PublicKeyErrorZ constructor_recover_pk(Uint8Array msg, String sig) {
number ret = bindings.recover_pk(msg, sig);
Result_PublicKeyErrorZ ret_hu_conv = Result_PublicKeyErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public static boolean constructor_erify(Uint8Array msg, String sig, Uint8Array pk) {
+ public static boolean constructor_verify(Uint8Array msg, String sig, Uint8Array pk) {
boolean ret = bindings.verify(msg, sig, pk);
return ret;
}
- public static Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ constructor_BlockHashChannelMonitorZ_read(Uint8Array ser, KeysInterface arg) {
+ public static Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ constructor_C2Tuple_BlockHashChannelMonitorZ_read(Uint8Array ser, KeysInterface arg) {
number ret = bindings.C2Tuple_BlockHashChannelMonitorZ_read(ser, arg == null ? 0 : arg.ptr);
Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(arg);
return ret_hu_conv;
}
- public static Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ constructor_BlockHashChannelManagerZ_read(Uint8Array ser, KeysInterface arg_keys_manager, FeeEstimator arg_fee_estimator, Watch arg_chain_monitor, BroadcasterInterface arg_tx_broadcaster, Logger arg_logger, UserConfig arg_default_config, ChannelMonitor[] arg_channel_monitors) {
+ public static Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ constructor_C2Tuple_BlockHashChannelManagerZ_read(Uint8Array ser, KeysInterface arg_keys_manager, FeeEstimator arg_fee_estimator, Watch arg_chain_monitor, BroadcasterInterface arg_tx_broadcaster, Logger arg_logger, UserConfig arg_default_config, ChannelMonitor[] arg_channel_monitors) {
number ret = bindings.C2Tuple_BlockHashChannelManagerZ_read(ser, bindings.ChannelManagerReadArgs_new(arg_keys_manager == null ? 0 : arg_keys_manager.ptr, arg_fee_estimator == null ? 0 : arg_fee_estimator.ptr, arg_chain_monitor == null ? 0 : arg_chain_monitor.ptr, arg_tx_broadcaster == null ? 0 : arg_tx_broadcaster.ptr, arg_logger == null ? 0 : arg_logger.ptr, arg_default_config == null ? 0 : arg_default_config.ptr & ~1, arg_channel_monitors != null ? Arrays.stream(arg_channel_monitors).map(arg_channel_monitors_conv_16 -> arg_channel_monitors_conv_16 == null ? 0 : arg_channel_monitors_conv_16.ptr & ~1).toArray(number[]::new) : null));
Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(arg_keys_manager);
return ret_hu_conv;
}
- public static Uint8Array constructor_uild_commitment_secret(Uint8Array commitment_seed, number idx) {
+ public static Uint8Array constructor_build_commitment_secret(Uint8Array commitment_seed, number idx) {
Uint8Array ret = bindings.build_commitment_secret(commitment_seed, idx);
return ret;
}
- public static Uint8Array constructor_uild_closing_transaction(number to_holder_value_sat, number to_counterparty_value_sat, Uint8Array to_holder_script, Uint8Array to_counterparty_script, OutPoint funding_outpoint) {
+ public static Uint8Array constructor_build_closing_transaction(number to_holder_value_sat, number to_counterparty_value_sat, Uint8Array to_holder_script, Uint8Array to_counterparty_script, OutPoint funding_outpoint) {
Uint8Array ret = bindings.build_closing_transaction(to_holder_value_sat, to_counterparty_value_sat, to_holder_script, to_counterparty_script, funding_outpoint == null ? 0 : funding_outpoint.ptr & ~1);
// this.ptrs_to.add(funding_outpoint);
return ret;
}
- public static Result_SecretKeyErrorZ constructor_erive_private_key(Uint8Array per_commitment_point, Uint8Array base_secret) {
+ public static Result_SecretKeyErrorZ constructor_derive_private_key(Uint8Array per_commitment_point, Uint8Array base_secret) {
number ret = bindings.derive_private_key(per_commitment_point, base_secret);
Result_SecretKeyErrorZ ret_hu_conv = Result_SecretKeyErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public static Result_PublicKeyErrorZ constructor_erive_public_key(Uint8Array per_commitment_point, Uint8Array base_point) {
+ public static Result_PublicKeyErrorZ constructor_derive_public_key(Uint8Array per_commitment_point, Uint8Array base_point) {
number ret = bindings.derive_public_key(per_commitment_point, base_point);
Result_PublicKeyErrorZ ret_hu_conv = Result_PublicKeyErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public static Result_SecretKeyErrorZ constructor_erive_private_revocation_key(Uint8Array per_commitment_secret, Uint8Array countersignatory_revocation_base_secret) {
+ public static Result_SecretKeyErrorZ constructor_derive_private_revocation_key(Uint8Array per_commitment_secret, Uint8Array countersignatory_revocation_base_secret) {
number ret = bindings.derive_private_revocation_key(per_commitment_secret, countersignatory_revocation_base_secret);
Result_SecretKeyErrorZ ret_hu_conv = Result_SecretKeyErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public static Result_PublicKeyErrorZ constructor_erive_public_revocation_key(Uint8Array per_commitment_point, Uint8Array countersignatory_revocation_base_point) {
+ public static Result_PublicKeyErrorZ constructor_derive_public_revocation_key(Uint8Array per_commitment_point, Uint8Array countersignatory_revocation_base_point) {
number ret = bindings.derive_public_revocation_key(per_commitment_point, countersignatory_revocation_base_point);
Result_PublicKeyErrorZ ret_hu_conv = Result_PublicKeyErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
- public static Uint8Array constructor_et_revokeable_redeemscript(Uint8Array revocation_key, number contest_delay, Uint8Array broadcaster_delayed_payment_key) {
+ public static Uint8Array constructor_get_revokeable_redeemscript(Uint8Array revocation_key, number contest_delay, Uint8Array broadcaster_delayed_payment_key) {
Uint8Array ret = bindings.get_revokeable_redeemscript(revocation_key, contest_delay, broadcaster_delayed_payment_key);
return ret;
}
- public static Uint8Array constructor_et_htlc_redeemscript(HTLCOutputInCommitment htlc, TxCreationKeys keys) {
+ public static Uint8Array constructor_get_htlc_redeemscript(HTLCOutputInCommitment htlc, TxCreationKeys keys) {
Uint8Array ret = bindings.get_htlc_redeemscript(htlc == null ? 0 : htlc.ptr & ~1, keys == null ? 0 : keys.ptr & ~1);
// this.ptrs_to.add(htlc);
// this.ptrs_to.add(keys);
return ret;
}
- public static Uint8Array constructor_ake_funding_redeemscript(Uint8Array broadcaster, Uint8Array countersignatory) {
+ public static Uint8Array constructor_make_funding_redeemscript(Uint8Array broadcaster, Uint8Array countersignatory) {
Uint8Array ret = bindings.make_funding_redeemscript(broadcaster, countersignatory);
return ret;
}
- public static Uint8Array constructor_uild_htlc_transaction(Uint8Array commitment_txid, number feerate_per_kw, number contest_delay, HTLCOutputInCommitment htlc, Uint8Array broadcaster_delayed_payment_key, Uint8Array revocation_key) {
+ public static Uint8Array constructor_build_htlc_transaction(Uint8Array commitment_txid, number feerate_per_kw, number contest_delay, HTLCOutputInCommitment htlc, Uint8Array broadcaster_delayed_payment_key, Uint8Array revocation_key) {
Uint8Array ret = bindings.build_htlc_transaction(commitment_txid, feerate_per_kw, contest_delay, htlc == null ? 0 : htlc.ptr & ~1, broadcaster_delayed_payment_key, revocation_key);
// this.ptrs_to.add(htlc);
return ret;
}
- public static number constructor_et_commitment_transaction_number_obscure_factor(Uint8Array broadcaster_payment_basepoint, Uint8Array countersignatory_payment_basepoint, boolean outbound_from_broadcaster) {
+ public static number constructor_get_commitment_transaction_number_obscure_factor(Uint8Array broadcaster_payment_basepoint, Uint8Array countersignatory_payment_basepoint, boolean outbound_from_broadcaster) {
number ret = bindings.get_commitment_transaction_number_obscure_factor(broadcaster_payment_basepoint, countersignatory_payment_basepoint, outbound_from_broadcaster);
return ret;
}
- public static Result_RouteLightningErrorZ constructor_et_keysend_route(Uint8Array our_node_id, NetworkGraph network, Uint8Array payee, ChannelDetails[] first_hops, RouteHint[] last_hops, number final_value_msat, number final_cltv, Logger logger) {
+ public static Result_RouteLightningErrorZ constructor_get_keysend_route(Uint8Array our_node_id, NetworkGraph network, Uint8Array payee, ChannelDetails[] first_hops, RouteHint[] last_hops, number final_value_msat, number final_cltv, Logger logger) {
number ret = bindings.get_keysend_route(our_node_id, network == null ? 0 : network.ptr & ~1, payee, first_hops != null ? Arrays.stream(first_hops).map(first_hops_conv_16 -> first_hops_conv_16 == null ? 0 : first_hops_conv_16.ptr & ~1).toArray(number[]::new) : null, last_hops != null ? Arrays.stream(last_hops).map(last_hops_conv_11 -> last_hops_conv_11 == null ? 0 : last_hops_conv_11.ptr & ~1).toArray(number[]::new) : null, final_value_msat, final_cltv, logger == null ? 0 : logger.ptr);
Result_RouteLightningErrorZ ret_hu_conv = Result_RouteLightningErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(network);
return ret_hu_conv;
}
- public static Result_RouteLightningErrorZ constructor_et_route(Uint8Array our_node_id, NetworkGraph network, Uint8Array payee, InvoiceFeatures payee_features, ChannelDetails[] first_hops, RouteHint[] last_hops, number final_value_msat, number final_cltv, Logger logger) {
+ public static Result_RouteLightningErrorZ constructor_get_route(Uint8Array our_node_id, NetworkGraph network, Uint8Array payee, InvoiceFeatures payee_features, ChannelDetails[] first_hops, RouteHint[] last_hops, number final_value_msat, number final_cltv, Logger logger) {
number ret = bindings.get_route(our_node_id, network == null ? 0 : network.ptr & ~1, payee, payee_features == null ? 0 : payee_features.ptr & ~1, first_hops != null ? Arrays.stream(first_hops).map(first_hops_conv_16 -> first_hops_conv_16 == null ? 0 : first_hops_conv_16.ptr & ~1).toArray(number[]::new) : null, last_hops != null ? Arrays.stream(last_hops).map(last_hops_conv_11 -> last_hops_conv_11 == null ? 0 : last_hops_conv_11.ptr & ~1).toArray(number[]::new) : null, final_value_msat, final_cltv, logger == null ? 0 : logger.ptr);
Result_RouteLightningErrorZ ret_hu_conv = Result_RouteLightningErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(network);
return ret_hu_conv;
}
- public static Result_NoneErrorZ constructor_ilesystemPersister_persist_manager(String data_dir, ChannelManager manager) {
+ public static Result_NoneErrorZ constructor_FilesystemPersister_persist_manager(String data_dir, ChannelManager manager) {
number ret = bindings.FilesystemPersister_persist_manager(data_dir, manager == null ? 0 : manager.ptr & ~1);
Result_NoneErrorZ ret_hu_conv = Result_NoneErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(manager);
return ret_hu_conv;
}
- public static Result_InvoiceSignOrCreationErrorZ constructor_reate_invoice_from_channelmanager(ChannelManager channelmanager, KeysInterface keys_manager, Currency network, Option_u64Z amt_msat, String description) {
+ public static Result_InvoiceSignOrCreationErrorZ constructor_create_invoice_from_channelmanager(ChannelManager channelmanager, KeysInterface keys_manager, Currency network, Option_u64Z amt_msat, String description) {
number ret = bindings.create_invoice_from_channelmanager(channelmanager == null ? 0 : channelmanager.ptr & ~1, keys_manager == null ? 0 : keys_manager.ptr, network, amt_msat.ptr, description);
Result_InvoiceSignOrCreationErrorZ ret_hu_conv = Result_InvoiceSignOrCreationErrorZ.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(channelmanager);