--- /dev/null
+package org.ldk.enums;
+
+/**
+ * Specifies the recipient of an invoice, to indicate to [`KeysInterface::sign_invoice`] what node
+ * secret key should be used to sign the invoice.
+ */
+public enum Recipient {
+ /**
+ * The invoice should be signed with the local node secret key.
+ */
+ LDKRecipient_Node,
+ /**
+ * The invoice should be signed with the phantom node secret key. This secret key must be the
+ * same for all nodes participating in the [phantom node payment].
+ *
+ * [phantom node payment]: PhantomKeysManager
+ */
+ LDKRecipient_PhantomNode,
+ ; static native void init();
+ static { init(); }
+}
\ No newline at end of file
public static native long CResult_BuiltCommitmentTransactionDecodeErrorZ_get_ok(long owner);
// struct LDKDecodeError CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR owner);
public static native long CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(long owner);
- // struct LDKTrustedClosingTransaction *CResult_TrustedClosingTransactionNoneZ_get_ok(LDKCResult_TrustedClosingTransactionNoneZ *NONNULL_PTR owner);
+ // struct LDKTrustedClosingTransaction *NONNULL_PTR CResult_TrustedClosingTransactionNoneZ_get_ok(LDKCResult_TrustedClosingTransactionNoneZ *NONNULL_PTR owner);
public static native long CResult_TrustedClosingTransactionNoneZ_get_ok(long owner);
// void CResult_TrustedClosingTransactionNoneZ_get_err(LDKCResult_TrustedClosingTransactionNoneZ *NONNULL_PTR owner);
public static native void CResult_TrustedClosingTransactionNoneZ_get_err(long owner);
public static native long CResult_CommitmentTransactionDecodeErrorZ_get_ok(long owner);
// struct LDKDecodeError CResult_CommitmentTransactionDecodeErrorZ_get_err(LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR owner);
public static native long CResult_CommitmentTransactionDecodeErrorZ_get_err(long owner);
- // struct LDKTrustedCommitmentTransaction *CResult_TrustedCommitmentTransactionNoneZ_get_ok(LDKCResult_TrustedCommitmentTransactionNoneZ *NONNULL_PTR owner);
+ // struct LDKTrustedCommitmentTransaction *NONNULL_PTR CResult_TrustedCommitmentTransactionNoneZ_get_ok(LDKCResult_TrustedCommitmentTransactionNoneZ *NONNULL_PTR owner);
public static native long CResult_TrustedCommitmentTransactionNoneZ_get_ok(long owner);
// void CResult_TrustedCommitmentTransactionNoneZ_get_err(LDKCResult_TrustedCommitmentTransactionNoneZ *NONNULL_PTR owner);
public static native void CResult_TrustedCommitmentTransactionNoneZ_get_err(long owner);
public static native long CResult_ScoringParametersDecodeErrorZ_get_ok(long owner);
// struct LDKDecodeError CResult_ScoringParametersDecodeErrorZ_get_err(LDKCResult_ScoringParametersDecodeErrorZ *NONNULL_PTR owner);
public static native long CResult_ScoringParametersDecodeErrorZ_get_err(long owner);
- // struct LDKScorer *CResult_ScorerDecodeErrorZ_get_ok(LDKCResult_ScorerDecodeErrorZ *NONNULL_PTR owner);
+ // struct LDKScorer *NONNULL_PTR CResult_ScorerDecodeErrorZ_get_ok(LDKCResult_ScorerDecodeErrorZ *NONNULL_PTR owner);
public static native long CResult_ScorerDecodeErrorZ_get_ok(long owner);
// struct LDKDecodeError CResult_ScorerDecodeErrorZ_get_err(LDKCResult_ScorerDecodeErrorZ *NONNULL_PTR owner);
public static native long CResult_ScorerDecodeErrorZ_get_err(long owner);
public static native long CResult_ProbabilisticScoringParametersDecodeErrorZ_get_ok(long owner);
// struct LDKDecodeError CResult_ProbabilisticScoringParametersDecodeErrorZ_get_err(LDKCResult_ProbabilisticScoringParametersDecodeErrorZ *NONNULL_PTR owner);
public static native long CResult_ProbabilisticScoringParametersDecodeErrorZ_get_err(long owner);
+ // struct LDKProbabilisticScoringParameters C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_get_a(LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ *NONNULL_PTR owner);
+ public static native long C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_get_a(long owner);
+ // struct LDKNetworkGraph C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_get_b(LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ *NONNULL_PTR owner);
+ public static native long C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_get_b(long owner);
+ // struct LDKProbabilisticScorer *NONNULL_PTR CResult_ProbabilisticScorerDecodeErrorZ_get_ok(LDKCResult_ProbabilisticScorerDecodeErrorZ *NONNULL_PTR owner);
+ public static native long CResult_ProbabilisticScorerDecodeErrorZ_get_ok(long owner);
+ // struct LDKDecodeError CResult_ProbabilisticScorerDecodeErrorZ_get_err(LDKCResult_ProbabilisticScorerDecodeErrorZ *NONNULL_PTR owner);
+ public static native long CResult_ProbabilisticScorerDecodeErrorZ_get_err(long owner);
// struct LDKInitFeatures CResult_InitFeaturesDecodeErrorZ_get_ok(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR owner);
public static native long CResult_InitFeaturesDecodeErrorZ_get_ok(long owner);
// struct LDKDecodeError CResult_InitFeaturesDecodeErrorZ_get_err(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR owner);
public static native long LDKLogger_new(LDKLogger impl);
// struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelManagerZ_get_a(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR owner);
public static native byte[] C2Tuple_BlockHashChannelManagerZ_get_a(long owner);
- // struct LDKChannelManager *C2Tuple_BlockHashChannelManagerZ_get_b(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR owner);
+ // struct LDKChannelManager *NONNULL_PTR C2Tuple_BlockHashChannelManagerZ_get_b(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR owner);
public static native long C2Tuple_BlockHashChannelManagerZ_get_b(long owner);
- // struct LDKC2Tuple_BlockHashChannelManagerZ *CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *NONNULL_PTR owner);
+ // struct LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *NONNULL_PTR owner);
public static native long CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(long owner);
// struct LDKDecodeError CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *NONNULL_PTR owner);
public static native long CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(long owner);
}
static { LDKCOption_FilterZ.init(); }
public static native LDKCOption_FilterZ LDKCOption_FilterZ_ref_from_ptr(long ptr);
- // struct LDKLockedChannelMonitor *CResult_LockedChannelMonitorNoneZ_get_ok(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner);
+ // struct LDKLockedChannelMonitor *NONNULL_PTR CResult_LockedChannelMonitorNoneZ_get_ok(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner);
public static native long CResult_LockedChannelMonitorNoneZ_get_ok(long owner);
// void CResult_LockedChannelMonitorNoneZ_get_err(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner);
public static native void CResult_LockedChannelMonitorNoneZ_get_err(long owner);
public static native long CResult_ProbabilisticScoringParametersDecodeErrorZ_clone_ptr(long arg);
// struct LDKCResult_ProbabilisticScoringParametersDecodeErrorZ CResult_ProbabilisticScoringParametersDecodeErrorZ_clone(const struct LDKCResult_ProbabilisticScoringParametersDecodeErrorZ *NONNULL_PTR orig);
public static native long CResult_ProbabilisticScoringParametersDecodeErrorZ_clone(long orig);
+ // uintptr_t C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_clone_ptr(LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ *NONNULL_PTR arg);
+ public static native long C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_clone_ptr(long arg);
+ // struct LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_clone(const struct LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ *NONNULL_PTR orig);
+ public static native long C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_clone(long orig);
+ // struct LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_new(struct LDKProbabilisticScoringParameters a, const struct LDKNetworkGraph *NONNULL_PTR b);
+ public static native long C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_new(long a, long b);
+ // void C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_free(struct LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ _res);
+ public static native void C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_free(long _res);
+ // struct LDKCResult_ProbabilisticScorerDecodeErrorZ CResult_ProbabilisticScorerDecodeErrorZ_ok(struct LDKProbabilisticScorer o);
+ public static native long CResult_ProbabilisticScorerDecodeErrorZ_ok(long o);
+ // struct LDKCResult_ProbabilisticScorerDecodeErrorZ CResult_ProbabilisticScorerDecodeErrorZ_err(struct LDKDecodeError e);
+ public static native long CResult_ProbabilisticScorerDecodeErrorZ_err(long e);
+ // bool CResult_ProbabilisticScorerDecodeErrorZ_is_ok(const struct LDKCResult_ProbabilisticScorerDecodeErrorZ *NONNULL_PTR o);
+ public static native boolean CResult_ProbabilisticScorerDecodeErrorZ_is_ok(long o);
+ // void CResult_ProbabilisticScorerDecodeErrorZ_free(struct LDKCResult_ProbabilisticScorerDecodeErrorZ _res);
+ public static native void CResult_ProbabilisticScorerDecodeErrorZ_free(long _res);
// struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o);
public static native long CResult_InitFeaturesDecodeErrorZ_ok(long o);
// struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
public static native byte[] Scorer_write(long obj);
// struct LDKCResult_ScorerDecodeErrorZ Scorer_read(struct LDKu8slice ser);
public static native long Scorer_read(byte[] ser);
+ // void ProbabilisticScorer_free(struct LDKProbabilisticScorer this_obj);
+ public static native void ProbabilisticScorer_free(long this_obj);
// void ProbabilisticScoringParameters_free(struct LDKProbabilisticScoringParameters this_obj);
public static native void ProbabilisticScoringParameters_free(long this_obj);
// uint64_t ProbabilisticScoringParameters_get_liquidity_penalty_multiplier_msat(const struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr);
public static native byte[] ProbabilisticScoringParameters_write(long obj);
// struct LDKCResult_ProbabilisticScoringParametersDecodeErrorZ ProbabilisticScoringParameters_read(struct LDKu8slice ser);
public static native long ProbabilisticScoringParameters_read(byte[] ser);
+ // MUST_USE_RES struct LDKProbabilisticScorer ProbabilisticScorer_new(struct LDKProbabilisticScoringParameters params, const struct LDKNetworkGraph *NONNULL_PTR network_graph);
+ public static native long ProbabilisticScorer_new(long params, long network_graph);
// MUST_USE_RES struct LDKProbabilisticScoringParameters ProbabilisticScoringParameters_default(void);
public static native long ProbabilisticScoringParameters_default();
+ // struct LDKScore ProbabilisticScorer_as_Score(const struct LDKProbabilisticScorer *NONNULL_PTR this_arg);
+ public static native long ProbabilisticScorer_as_Score(long this_arg);
+ // struct LDKCVec_u8Z ProbabilisticScorer_write(const struct LDKProbabilisticScorer *NONNULL_PTR obj);
+ public static native byte[] ProbabilisticScorer_write(long obj);
+ // struct LDKCResult_ProbabilisticScorerDecodeErrorZ ProbabilisticScorer_read(struct LDKu8slice ser, struct LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ arg);
+ public static native long ProbabilisticScorer_read(byte[] ser, long arg);
// void FilesystemPersister_free(struct LDKFilesystemPersister this_obj);
public static native void FilesystemPersister_free(long this_obj);
// MUST_USE_RES struct LDKFilesystemPersister FilesystemPersister_new(struct LDKStr path_to_channel_data);
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * [`Score`] implementation using channel success probability distributions.
+ *
+ * Based on *Optimally Reliable & Cheap Payment Flows on the Lightning Network* by Rene Pickhardt
+ * and Stefan Richter [[1]]. Given the uncertainty of channel liquidity balances, probability
+ * distributions are defined based on knowledge learned from successful and unsuccessful attempts.
+ * Then the negative `log10` of the success probability is used to determine the cost of routing a
+ * specific HTLC amount through a channel.
+ *
+ * Knowledge about channel liquidity balances takes the form of upper and lower bounds on the
+ * possible liquidity. Certainty of the bounds is decreased over time using a decay function. See
+ * [`ProbabilisticScoringParameters`] for details.
+ *
+ * Since the scorer aims to learn the current channel liquidity balances, it works best for nodes
+ * with high payment volume or that actively probe the [`NetworkGraph`]. Nodes with low payment
+ * volume are more likely to experience failed payment paths, which would need to be retried.
+ *
+ * # Note
+ *
+ * Mixing the `no-std` feature between serialization and deserialization results in undefined
+ * behavior.
+ *
+ * [1]: https://arxiv.org/abs/2107.05322
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class ProbabilisticScorer extends CommonBase {
+ ProbabilisticScorer(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.ProbabilisticScorer_free(ptr); }
+ }
+
+ /**
+ * Creates a new scorer using the given scoring parameters for sending payments from a node
+ * through a network graph.
+ */
+ public static ProbabilisticScorer of(ProbabilisticScoringParameters params, NetworkGraph network_graph) {
+ long ret = bindings.ProbabilisticScorer_new(params == null ? 0 : params.ptr & ~1, network_graph == null ? 0 : network_graph.ptr & ~1);
+ Reference.reachabilityFence(params);
+ Reference.reachabilityFence(network_graph);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ ProbabilisticScorer ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ProbabilisticScorer(null, ret); }
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ ret_hu_conv.ptrs_to.add(network_graph);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Constructs a new Score which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned Score must be freed before this_arg is
+ */
+ public Score as_Score() {
+ long ret = bindings.ProbabilisticScorer_as_Score(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Score ret_hu_conv = new Score(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Serialize the ProbabilisticScorer object into a byte array which can be read by ProbabilisticScorer_read
+ */
+ public byte[] write() {
+ byte[] ret = bindings.ProbabilisticScorer_write(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Read a ProbabilisticScorer from a byte array, created by ProbabilisticScorer_write
+ */
+ public static Result_ProbabilisticScorerDecodeErrorZ read(byte[] ser, TwoTuple_ProbabilisticScoringParametersNetworkGraphZ arg) {
+ long ret = bindings.ProbabilisticScorer_read(ser, arg != null ? arg.ptr : 0);
+ Reference.reachabilityFence(ser);
+ Reference.reachabilityFence(arg);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_ProbabilisticScorerDecodeErrorZ ret_hu_conv = Result_ProbabilisticScorerDecodeErrorZ.constr_from_ptr(ret);
+ 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 java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_ProbabilisticScorerDecodeErrorZ extends CommonBase {
+ private Result_ProbabilisticScorerDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+ protected void finalize() throws Throwable {
+ if (ptr != 0) { bindings.CResult_ProbabilisticScorerDecodeErrorZ_free(ptr); } super.finalize();
+ }
+
+ static Result_ProbabilisticScorerDecodeErrorZ constr_from_ptr(long ptr) {
+ if (bindings.CResult_ProbabilisticScorerDecodeErrorZ_is_ok(ptr)) {
+ return new Result_ProbabilisticScorerDecodeErrorZ_OK(null, ptr);
+ } else {
+ return new Result_ProbabilisticScorerDecodeErrorZ_Err(null, ptr);
+ }
+ }
+ public static final class Result_ProbabilisticScorerDecodeErrorZ_OK extends Result_ProbabilisticScorerDecodeErrorZ {
+ public final ProbabilisticScorer res;
+ private Result_ProbabilisticScorerDecodeErrorZ_OK(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ long res = bindings.CResult_ProbabilisticScorerDecodeErrorZ_get_ok(ptr);
+ ProbabilisticScorer res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new ProbabilisticScorer(null, res); }
+ res_hu_conv.ptrs_to.add(this);
+ this.res = res_hu_conv;
+ }
+ }
+
+ public static final class Result_ProbabilisticScorerDecodeErrorZ_Err extends Result_ProbabilisticScorerDecodeErrorZ {
+ public final DecodeError err;
+ private Result_ProbabilisticScorerDecodeErrorZ_Err(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ long err = bindings.CResult_ProbabilisticScorerDecodeErrorZ_get_err(ptr);
+ DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new DecodeError(null, err); }
+ err_hu_conv.ptrs_to.add(this);
+ this.err = err_hu_conv;
+ }
+ }
+
+ /**
+ * Creates a new CResult_ProbabilisticScorerDecodeErrorZ in the success state.
+ */
+ public static Result_ProbabilisticScorerDecodeErrorZ ok(ProbabilisticScoringParameters o_params, NetworkGraph o_network_graph) {
+ long ret = bindings.CResult_ProbabilisticScorerDecodeErrorZ_ok(bindings.ProbabilisticScorer_new(o_params == null ? 0 : o_params.ptr & ~1, o_network_graph == null ? 0 : o_network_graph.ptr & ~1));
+ Reference.reachabilityFence(o_params);
+ Reference.reachabilityFence(o_network_graph);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_ProbabilisticScorerDecodeErrorZ ret_hu_conv = Result_ProbabilisticScorerDecodeErrorZ.constr_from_ptr(ret);
+ ;
+ ret_hu_conv.ptrs_to.add(o_network_graph);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_ProbabilisticScorerDecodeErrorZ in the error state.
+ */
+ public static Result_ProbabilisticScorerDecodeErrorZ err(DecodeError e) {
+ long ret = bindings.CResult_ProbabilisticScorerDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Reference.reachabilityFence(e);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_ProbabilisticScorerDecodeErrorZ ret_hu_conv = Result_ProbabilisticScorerDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if the given object is currently in the success state
+ */
+ public boolean is_ok() {
+ boolean ret = bindings.CResult_ProbabilisticScorerDecodeErrorZ_is_ok(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+}
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * A Tuple
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class TwoTuple_ProbabilisticScoringParametersNetworkGraphZ extends CommonBase {
+ TwoTuple_ProbabilisticScoringParametersNetworkGraphZ(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_free(ptr); }
+ }
+
+ /**
+ *
+ */
+ public ProbabilisticScoringParameters get_a() {
+ long ret = bindings.C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_get_a(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ ProbabilisticScoringParameters ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ProbabilisticScoringParameters(null, ret); }
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ /**
+ *
+ */
+ public NetworkGraph get_b() {
+ long ret = bindings.C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_get_b(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ NetworkGraph ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new NetworkGraph(null, ret); }
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ long clone_ptr() {
+ long ret = bindings.C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ 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_ProbabilisticScoringParametersNetworkGraphZ clone() {
+ long ret = bindings.C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ TwoTuple_ProbabilisticScoringParametersNetworkGraphZ ret_hu_conv = new TwoTuple_ProbabilisticScoringParametersNetworkGraphZ(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new C2Tuple_ProbabilisticScoringParametersNetworkGraphZ from the contained elements.
+ */
+ public static TwoTuple_ProbabilisticScoringParametersNetworkGraphZ of(ProbabilisticScoringParameters a, NetworkGraph b) {
+ long ret = bindings.C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_new(a == null ? 0 : a.ptr & ~1, b == null ? 0 : b.ptr & ~1);
+ Reference.reachabilityFence(a);
+ Reference.reachabilityFence(b);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ TwoTuple_ProbabilisticScoringParametersNetworkGraphZ ret_hu_conv = new TwoTuple_ProbabilisticScoringParametersNetworkGraphZ(null, ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ ret_hu_conv.ptrs_to.add(b);
+ return ret_hu_conv;
+ }
+
+}
return ret_ref;
}
-static inline struct LDKTrustedClosingTransaction *CResult_TrustedClosingTransactionNoneZ_get_ok(LDKCResult_TrustedClosingTransactionNoneZ *NONNULL_PTR owner){
+static inline struct LDKTrustedClosingTransaction *NONNULL_PTR CResult_TrustedClosingTransactionNoneZ_get_ok(LDKCResult_TrustedClosingTransactionNoneZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
return &*owner->contents.result;
}
return ret_ref;
}
-static inline struct LDKTrustedCommitmentTransaction *CResult_TrustedCommitmentTransactionNoneZ_get_ok(LDKCResult_TrustedCommitmentTransactionNoneZ *NONNULL_PTR owner){
+static inline struct LDKTrustedCommitmentTransaction *NONNULL_PTR CResult_TrustedCommitmentTransactionNoneZ_get_ok(LDKCResult_TrustedCommitmentTransactionNoneZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
return &*owner->contents.result;
}
return ret_ref;
}
-static inline struct LDKScorer *CResult_ScorerDecodeErrorZ_get_ok(LDKCResult_ScorerDecodeErrorZ *NONNULL_PTR owner){
+static inline struct LDKScorer *NONNULL_PTR CResult_ScorerDecodeErrorZ_get_ok(LDKCResult_ScorerDecodeErrorZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
return &*owner->contents.result;
}
return ret_ref;
}
+static inline struct LDKProbabilisticScoringParameters C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_get_a(LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ *NONNULL_PTR owner){
+ return ProbabilisticScoringParameters_clone(&owner->a);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ProbabilisticScoringParametersNetworkGraphZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ* owner_conv = (LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ*)(owner & ~1);
+ LDKProbabilisticScoringParameters ret_var = C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_get_a(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK((((uintptr_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uintptr_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = (uintptr_t)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
+static inline struct LDKNetworkGraph C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_get_b(LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ *NONNULL_PTR owner){
+ return NetworkGraph_clone(&owner->b);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ProbabilisticScoringParametersNetworkGraphZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ* owner_conv = (LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ*)(owner & ~1);
+ LDKNetworkGraph ret_var = C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_get_b(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK((((uintptr_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uintptr_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = (uintptr_t)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
+static inline struct LDKProbabilisticScorer *NONNULL_PTR CResult_ProbabilisticScorerDecodeErrorZ_get_ok(LDKCResult_ProbabilisticScorerDecodeErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+ return &*owner->contents.result;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScorerDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_ProbabilisticScorerDecodeErrorZ* owner_conv = (LDKCResult_ProbabilisticScorerDecodeErrorZ*)(owner & ~1);
+ LDKProbabilisticScorer ret_var = *CResult_ProbabilisticScorerDecodeErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK((((uintptr_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uintptr_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = (uintptr_t)ret_var.inner & ~1;
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_ProbabilisticScorerDecodeErrorZ_get_err(LDKCResult_ProbabilisticScorerDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScorerDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_ProbabilisticScorerDecodeErrorZ* owner_conv = (LDKCResult_ProbabilisticScorerDecodeErrorZ*)(owner & ~1);
+ LDKDecodeError ret_var = CResult_ProbabilisticScorerDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK((((uintptr_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uintptr_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = (uintptr_t)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
static inline struct LDKInitFeatures CResult_InitFeaturesDecodeErrorZ_get_ok(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
return InitFeatures_clone(&*owner->contents.result);
}
LDKHolderCommitmentTransaction holder_tx_var = *holder_tx;
int64_t holder_tx_ref = 0;
- holder_tx_var = HolderCommitmentTransaction_clone(holder_tx);
+ holder_tx_var = HolderCommitmentTransaction_clone(&holder_tx_var);
CHECK((((uintptr_t)holder_tx_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&holder_tx_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(holder_tx_var);
}
LDKCommitmentTransaction commitment_tx_var = *commitment_tx;
int64_t commitment_tx_ref = 0;
- commitment_tx_var = CommitmentTransaction_clone(commitment_tx);
+ commitment_tx_var = CommitmentTransaction_clone(&commitment_tx_var);
CHECK((((uintptr_t)commitment_tx_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&commitment_tx_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(commitment_tx_var);
}
LDKHolderCommitmentTransaction commitment_tx_var = *commitment_tx;
int64_t commitment_tx_ref = 0;
- commitment_tx_var = HolderCommitmentTransaction_clone(commitment_tx);
+ commitment_tx_var = HolderCommitmentTransaction_clone(&commitment_tx_var);
CHECK((((uintptr_t)commitment_tx_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&commitment_tx_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(commitment_tx_var);
(*env)->SetByteArrayRegion(env, per_commitment_key_arr, 0, 32, *per_commitment_key);
LDKHTLCOutputInCommitment htlc_var = *htlc;
int64_t htlc_ref = 0;
- htlc_var = HTLCOutputInCommitment_clone(htlc);
+ htlc_var = HTLCOutputInCommitment_clone(&htlc_var);
CHECK((((uintptr_t)htlc_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&htlc_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(htlc_var);
(*env)->SetByteArrayRegion(env, per_commitment_point_arr, 0, 33, per_commitment_point.compressed_form);
LDKHTLCOutputInCommitment htlc_var = *htlc;
int64_t htlc_ref = 0;
- htlc_var = HTLCOutputInCommitment_clone(htlc);
+ htlc_var = HTLCOutputInCommitment_clone(&htlc_var);
CHECK((((uintptr_t)htlc_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&htlc_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(htlc_var);
}
LDKClosingTransaction closing_tx_var = *closing_tx;
int64_t closing_tx_ref = 0;
- closing_tx_var = ClosingTransaction_clone(closing_tx);
+ closing_tx_var = ClosingTransaction_clone(&closing_tx_var);
CHECK((((uintptr_t)closing_tx_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&closing_tx_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(closing_tx_var);
}
LDKUnsignedChannelAnnouncement msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = UnsignedChannelAnnouncement_clone(msg);
+ msg_var = UnsignedChannelAnnouncement_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
}
LDKChannelTransactionParameters channel_parameters_var = *channel_parameters;
int64_t channel_parameters_ref = 0;
- channel_parameters_var = ChannelTransactionParameters_clone(channel_parameters);
+ channel_parameters_var = ChannelTransactionParameters_clone(&channel_parameters_var);
CHECK((((uintptr_t)channel_parameters_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&channel_parameters_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_parameters_var);
}
LDKRecord record_var = *record;
int64_t record_ref = 0;
- record_var = Record_clone(record);
+ record_var = Record_clone(&record_var);
CHECK((((uintptr_t)record_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&record_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(record_var);
return ret_arr;
}
-static inline struct LDKChannelManager *C2Tuple_BlockHashChannelManagerZ_get_b(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR owner){
+static inline struct LDKChannelManager *NONNULL_PTR C2Tuple_BlockHashChannelManagerZ_get_b(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR owner){
return &owner->b;
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelManagerZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
return ret_ref;
}
-static inline struct LDKC2Tuple_BlockHashChannelManagerZ *CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *NONNULL_PTR owner){
+static inline struct LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
return &*owner->contents.result;
}
default: abort();
}
}
-static inline struct LDKLockedChannelMonitor *CResult_LockedChannelMonitorNoneZ_get_ok(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){
+static inline struct LDKLockedChannelMonitor *NONNULL_PTR CResult_LockedChannelMonitorNoneZ_get_ok(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
return &*owner->contents.result;
}
}
LDKChannelMonitor data_var = *data;
int64_t data_ref = 0;
- data_var = ChannelMonitor_clone(data);
+ data_var = ChannelMonitor_clone(&data_var);
CHECK((((uintptr_t)data_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&data_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(data_var);
LDKChannelMonitorUpdate update_var = *update;
int64_t update_ref = 0;
if ((uintptr_t)update_var.inner > 4096) {
- update_var = ChannelMonitorUpdate_clone(update);
+ update_var = ChannelMonitorUpdate_clone(&update_var);
CHECK((((uintptr_t)update_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&update_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(update_var);
}
LDKChannelMonitor data_var = *data;
int64_t data_ref = 0;
- data_var = ChannelMonitor_clone(data);
+ data_var = ChannelMonitor_clone(&data_var);
CHECK((((uintptr_t)data_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&data_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(data_var);
}
LDKOpenChannel msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = OpenChannel_clone(msg);
+ msg_var = OpenChannel_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
}
LDKAcceptChannel msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = AcceptChannel_clone(msg);
+ msg_var = AcceptChannel_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
(*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
LDKFundingCreated msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = FundingCreated_clone(msg);
+ msg_var = FundingCreated_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
(*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
LDKFundingSigned msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = FundingSigned_clone(msg);
+ msg_var = FundingSigned_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
(*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
LDKFundingLocked msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = FundingLocked_clone(msg);
+ msg_var = FundingLocked_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
(*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
LDKInitFeatures their_features_var = *their_features;
int64_t their_features_ref = 0;
- their_features_var = InitFeatures_clone(their_features);
+ their_features_var = InitFeatures_clone(&their_features_var);
CHECK((((uintptr_t)their_features_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&their_features_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(their_features_var);
}
LDKShutdown msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = Shutdown_clone(msg);
+ msg_var = Shutdown_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
(*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
LDKClosingSigned msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = ClosingSigned_clone(msg);
+ msg_var = ClosingSigned_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
(*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
LDKUpdateAddHTLC msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = UpdateAddHTLC_clone(msg);
+ msg_var = UpdateAddHTLC_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
(*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
LDKUpdateFulfillHTLC msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = UpdateFulfillHTLC_clone(msg);
+ msg_var = UpdateFulfillHTLC_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
(*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
LDKUpdateFailHTLC msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = UpdateFailHTLC_clone(msg);
+ msg_var = UpdateFailHTLC_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
(*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
LDKUpdateFailMalformedHTLC msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = UpdateFailMalformedHTLC_clone(msg);
+ msg_var = UpdateFailMalformedHTLC_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
(*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
LDKCommitmentSigned msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = CommitmentSigned_clone(msg);
+ msg_var = CommitmentSigned_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
(*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
LDKRevokeAndACK msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = RevokeAndACK_clone(msg);
+ msg_var = RevokeAndACK_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
(*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
LDKUpdateFee msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = UpdateFee_clone(msg);
+ msg_var = UpdateFee_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
(*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
LDKAnnouncementSignatures msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = AnnouncementSignatures_clone(msg);
+ msg_var = AnnouncementSignatures_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
(*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
LDKInit msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = Init_clone(msg);
+ msg_var = Init_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
(*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
LDKChannelReestablish msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = ChannelReestablish_clone(msg);
+ msg_var = ChannelReestablish_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
(*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
LDKChannelUpdate msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = ChannelUpdate_clone(msg);
+ msg_var = ChannelUpdate_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
(*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
LDKErrorMessage msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = ErrorMessage_clone(msg);
+ msg_var = ErrorMessage_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
}
LDKNodeAnnouncement msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = NodeAnnouncement_clone(msg);
+ msg_var = NodeAnnouncement_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
}
LDKChannelAnnouncement msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = ChannelAnnouncement_clone(msg);
+ msg_var = ChannelAnnouncement_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
}
LDKChannelUpdate msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = ChannelUpdate_clone(msg);
+ msg_var = ChannelUpdate_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
(*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
LDKInit init_var = *init;
int64_t init_ref = 0;
- init_var = Init_clone(init);
+ init_var = Init_clone(&init_var);
CHECK((((uintptr_t)init_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&init_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(init_var);
}
LDKNodeId source_var = *source;
int64_t source_ref = 0;
- source_var = NodeId_clone(source);
+ source_var = NodeId_clone(&source_var);
CHECK((((uintptr_t)source_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&source_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(source_var);
}
LDKNodeId target_var = *target;
int64_t target_ref = 0;
- target_var = NodeId_clone(target);
+ target_var = NodeId_clone(&target_var);
CHECK((((uintptr_t)target_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&target_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(target_var);
}
LDKRoute route_var = *route;
int64_t route_ref = 0;
- route_var = Route_clone(route);
+ route_var = Route_clone(&route_var);
CHECK((((uintptr_t)route_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&route_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(route_var);
}
LDKRoute route_var = *route;
int64_t route_ref = 0;
- route_var = Route_clone(route);
+ route_var = Route_clone(&route_var);
CHECK((((uintptr_t)route_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&route_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(route_var);
}
LDKRoute route_var = *route;
int64_t route_ref = 0;
- route_var = Route_clone(route);
+ route_var = Route_clone(&route_var);
CHECK((((uintptr_t)route_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&route_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(route_var);
(*env)->SetByteArrayRegion(env, payer_arr, 0, 33, payer.compressed_form);
LDKRouteParameters route_params_var = *route_params;
int64_t route_params_ref = 0;
- route_params_var = RouteParameters_clone(route_params);
+ route_params_var = RouteParameters_clone(&route_params_var);
CHECK((((uintptr_t)route_params_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&route_params_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(route_params_var);
return (int64_t)ret_conv;
}
+static inline uintptr_t C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_clone_ptr(LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ *NONNULL_PTR arg) {
+ LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ), "LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ");
+ *ret_conv = C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_clone(arg);
+ return ((int64_t)ret_conv);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ProbabilisticScoringParametersNetworkGraphZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ* arg_conv = (LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ*)(arg & ~1);
+ int64_t ret_val = C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_clone_ptr(arg_conv);
+ return ret_val;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ProbabilisticScoringParametersNetworkGraphZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ* orig_conv = (LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ*)(orig & ~1);
+ LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ), "LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ");
+ *ret_conv = C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_clone(orig_conv);
+ return ((int64_t)ret_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ProbabilisticScoringParametersNetworkGraphZ_1new(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ LDKProbabilisticScoringParameters a_conv;
+ a_conv.inner = (void*)(a & (~1));
+ a_conv.is_owned = (a & 1) || (a == 0);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv = ProbabilisticScoringParameters_clone(&a_conv);
+ LDKNetworkGraph b_conv;
+ b_conv.inner = (void*)(b & (~1));
+ b_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ), "LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ");
+ *ret_conv = C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_new(a_conv, &b_conv);
+ return ((int64_t)ret_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ProbabilisticScoringParametersNetworkGraphZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if ((_res & 1) != 0) return;
+ void* _res_ptr = (void*)(((uintptr_t)_res) & ~1);
+ CHECK_ACCESS(_res_ptr);
+ LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ _res_conv = *(LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ*)(_res_ptr);
+ FREE((void*)_res);
+ C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScorerDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKProbabilisticScorer o_conv;
+ o_conv.inner = (void*)(o & (~1));
+ o_conv.is_owned = (o & 1) || (o == 0);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ // WARNING: we need a move here but no clone is available for LDKProbabilisticScorer
+ LDKCResult_ProbabilisticScorerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ProbabilisticScorerDecodeErrorZ), "LDKCResult_ProbabilisticScorerDecodeErrorZ");
+ *ret_conv = CResult_ProbabilisticScorerDecodeErrorZ_ok(o_conv);
+ return (int64_t)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScorerDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+ LDKDecodeError e_conv;
+ e_conv.inner = (void*)(e & (~1));
+ e_conv.is_owned = (e & 1) || (e == 0);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
+ e_conv = DecodeError_clone(&e_conv);
+ LDKCResult_ProbabilisticScorerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ProbabilisticScorerDecodeErrorZ), "LDKCResult_ProbabilisticScorerDecodeErrorZ");
+ *ret_conv = CResult_ProbabilisticScorerDecodeErrorZ_err(e_conv);
+ return (int64_t)ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScorerDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_ProbabilisticScorerDecodeErrorZ* o_conv = (LDKCResult_ProbabilisticScorerDecodeErrorZ*)(o & ~1);
+ jboolean ret_val = CResult_ProbabilisticScorerDecodeErrorZ_is_ok(o_conv);
+ return ret_val;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScorerDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if ((_res & 1) != 0) return;
+ void* _res_ptr = (void*)(((uintptr_t)_res) & ~1);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_ProbabilisticScorerDecodeErrorZ _res_conv = *(LDKCResult_ProbabilisticScorerDecodeErrorZ*)(_res_ptr);
+ FREE((void*)_res);
+ CResult_ProbabilisticScorerDecodeErrorZ_free(_res_conv);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InitFeaturesDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
LDKInitFeatures o_conv;
o_conv.inner = (void*)(o & (~1));
return (int64_t)ret_conv;
}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ProbabilisticScorer_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKProbabilisticScorer this_obj_conv;
+ this_obj_conv.inner = (void*)(this_obj & (~1));
+ this_obj_conv.is_owned = (this_obj & 1) || (this_obj == 0);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ ProbabilisticScorer_free(this_obj_conv);
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ProbabilisticScoringParameters_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
LDKProbabilisticScoringParameters this_obj_conv;
this_obj_conv.inner = (void*)(this_obj & (~1));
return (int64_t)ret_conv;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ProbabilisticScorer_1new(JNIEnv *env, jclass clz, int64_t params, int64_t network_graph) {
+ LDKProbabilisticScoringParameters params_conv;
+ params_conv.inner = (void*)(params & (~1));
+ params_conv.is_owned = (params & 1) || (params == 0);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(params_conv);
+ params_conv = ProbabilisticScoringParameters_clone(¶ms_conv);
+ LDKNetworkGraph network_graph_conv;
+ network_graph_conv.inner = (void*)(network_graph & (~1));
+ network_graph_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_conv);
+ LDKProbabilisticScorer ret_var = ProbabilisticScorer_new(params_conv, &network_graph_conv);
+ int64_t ret_ref = 0;
+ CHECK((((uintptr_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uintptr_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = (uintptr_t)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ProbabilisticScoringParameters_1default(JNIEnv *env, jclass clz) {
LDKProbabilisticScoringParameters ret_var = ProbabilisticScoringParameters_default();
int64_t ret_ref = 0;
return ret_ref;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ProbabilisticScorer_1as_1Score(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKProbabilisticScorer this_arg_conv;
+ this_arg_conv.inner = (void*)(this_arg & (~1));
+ this_arg_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ LDKScore* ret_ret = MALLOC(sizeof(LDKScore), "LDKScore");
+ *ret_ret = ProbabilisticScorer_as_Score(&this_arg_conv);
+ return (int64_t)ret_ret;
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ProbabilisticScorer_1write(JNIEnv *env, jclass clz, int64_t obj) {
+ LDKProbabilisticScorer obj_conv;
+ obj_conv.inner = (void*)(obj & (~1));
+ obj_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+ LDKCVec_u8Z ret_var = ProbabilisticScorer_write(&obj_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_ProbabilisticScorer_1read(JNIEnv *env, jclass clz, int8_tArray ser, int64_t arg) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+ ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+ void* arg_ptr = (void*)(((uintptr_t)arg) & ~1);
+ CHECK_ACCESS(arg_ptr);
+ LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ arg_conv = *(LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ*)(arg_ptr);
+ arg_conv = C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_clone((LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ*)(((uintptr_t)arg) & ~1));
+ LDKCResult_ProbabilisticScorerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ProbabilisticScorerDecodeErrorZ), "LDKCResult_ProbabilisticScorerDecodeErrorZ");
+ *ret_conv = ProbabilisticScorer_read(ser_ref, arg_conv);
+ (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+ return (int64_t)ret_conv;
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FilesystemPersister_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
LDKFilesystemPersister this_obj_conv;
this_obj_conv.inner = (void*)(this_obj & (~1));
return ret_ref;
}
-static inline struct LDKTrustedClosingTransaction *CResult_TrustedClosingTransactionNoneZ_get_ok(LDKCResult_TrustedClosingTransactionNoneZ *NONNULL_PTR owner){
+static inline struct LDKTrustedClosingTransaction *NONNULL_PTR CResult_TrustedClosingTransactionNoneZ_get_ok(LDKCResult_TrustedClosingTransactionNoneZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
return &*owner->contents.result;
}
return ret_ref;
}
-static inline struct LDKTrustedCommitmentTransaction *CResult_TrustedCommitmentTransactionNoneZ_get_ok(LDKCResult_TrustedCommitmentTransactionNoneZ *NONNULL_PTR owner){
+static inline struct LDKTrustedCommitmentTransaction *NONNULL_PTR CResult_TrustedCommitmentTransactionNoneZ_get_ok(LDKCResult_TrustedCommitmentTransactionNoneZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
return &*owner->contents.result;
}
return ret_ref;
}
-static inline struct LDKScorer *CResult_ScorerDecodeErrorZ_get_ok(LDKCResult_ScorerDecodeErrorZ *NONNULL_PTR owner){
+static inline struct LDKScorer *NONNULL_PTR CResult_ScorerDecodeErrorZ_get_ok(LDKCResult_ScorerDecodeErrorZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
return &*owner->contents.result;
}
return ret_ref;
}
+static inline struct LDKProbabilisticScoringParameters C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_get_a(LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ *NONNULL_PTR owner){
+ return ProbabilisticScoringParameters_clone(&owner->a);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ProbabilisticScoringParametersNetworkGraphZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ* owner_conv = (LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ*)(owner & ~1);
+ LDKProbabilisticScoringParameters ret_var = C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_get_a(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK((((uintptr_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uintptr_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = (uintptr_t)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
+static inline struct LDKNetworkGraph C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_get_b(LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ *NONNULL_PTR owner){
+ return NetworkGraph_clone(&owner->b);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ProbabilisticScoringParametersNetworkGraphZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ* owner_conv = (LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ*)(owner & ~1);
+ LDKNetworkGraph ret_var = C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_get_b(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK((((uintptr_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uintptr_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = (uintptr_t)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
+static inline struct LDKProbabilisticScorer *NONNULL_PTR CResult_ProbabilisticScorerDecodeErrorZ_get_ok(LDKCResult_ProbabilisticScorerDecodeErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+ return &*owner->contents.result;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScorerDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_ProbabilisticScorerDecodeErrorZ* owner_conv = (LDKCResult_ProbabilisticScorerDecodeErrorZ*)(owner & ~1);
+ LDKProbabilisticScorer ret_var = *CResult_ProbabilisticScorerDecodeErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK((((uintptr_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uintptr_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = (uintptr_t)ret_var.inner & ~1;
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_ProbabilisticScorerDecodeErrorZ_get_err(LDKCResult_ProbabilisticScorerDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScorerDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_ProbabilisticScorerDecodeErrorZ* owner_conv = (LDKCResult_ProbabilisticScorerDecodeErrorZ*)(owner & ~1);
+ LDKDecodeError ret_var = CResult_ProbabilisticScorerDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK((((uintptr_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uintptr_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = (uintptr_t)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
static inline struct LDKInitFeatures CResult_InitFeaturesDecodeErrorZ_get_ok(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
return InitFeatures_clone(&*owner->contents.result);
}
LDKHolderCommitmentTransaction holder_tx_var = *holder_tx;
int64_t holder_tx_ref = 0;
- holder_tx_var = HolderCommitmentTransaction_clone(holder_tx);
+ holder_tx_var = HolderCommitmentTransaction_clone(&holder_tx_var);
CHECK((((uintptr_t)holder_tx_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&holder_tx_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(holder_tx_var);
}
LDKCommitmentTransaction commitment_tx_var = *commitment_tx;
int64_t commitment_tx_ref = 0;
- commitment_tx_var = CommitmentTransaction_clone(commitment_tx);
+ commitment_tx_var = CommitmentTransaction_clone(&commitment_tx_var);
CHECK((((uintptr_t)commitment_tx_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&commitment_tx_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(commitment_tx_var);
}
LDKHolderCommitmentTransaction commitment_tx_var = *commitment_tx;
int64_t commitment_tx_ref = 0;
- commitment_tx_var = HolderCommitmentTransaction_clone(commitment_tx);
+ commitment_tx_var = HolderCommitmentTransaction_clone(&commitment_tx_var);
CHECK((((uintptr_t)commitment_tx_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&commitment_tx_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(commitment_tx_var);
(*env)->SetByteArrayRegion(env, per_commitment_key_arr, 0, 32, *per_commitment_key);
LDKHTLCOutputInCommitment htlc_var = *htlc;
int64_t htlc_ref = 0;
- htlc_var = HTLCOutputInCommitment_clone(htlc);
+ htlc_var = HTLCOutputInCommitment_clone(&htlc_var);
CHECK((((uintptr_t)htlc_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&htlc_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(htlc_var);
(*env)->SetByteArrayRegion(env, per_commitment_point_arr, 0, 33, per_commitment_point.compressed_form);
LDKHTLCOutputInCommitment htlc_var = *htlc;
int64_t htlc_ref = 0;
- htlc_var = HTLCOutputInCommitment_clone(htlc);
+ htlc_var = HTLCOutputInCommitment_clone(&htlc_var);
CHECK((((uintptr_t)htlc_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&htlc_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(htlc_var);
}
LDKClosingTransaction closing_tx_var = *closing_tx;
int64_t closing_tx_ref = 0;
- closing_tx_var = ClosingTransaction_clone(closing_tx);
+ closing_tx_var = ClosingTransaction_clone(&closing_tx_var);
CHECK((((uintptr_t)closing_tx_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&closing_tx_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(closing_tx_var);
}
LDKUnsignedChannelAnnouncement msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = UnsignedChannelAnnouncement_clone(msg);
+ msg_var = UnsignedChannelAnnouncement_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
}
LDKChannelTransactionParameters channel_parameters_var = *channel_parameters;
int64_t channel_parameters_ref = 0;
- channel_parameters_var = ChannelTransactionParameters_clone(channel_parameters);
+ channel_parameters_var = ChannelTransactionParameters_clone(&channel_parameters_var);
CHECK((((uintptr_t)channel_parameters_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&channel_parameters_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_parameters_var);
}
LDKRecord record_var = *record;
int64_t record_ref = 0;
- record_var = Record_clone(record);
+ record_var = Record_clone(&record_var);
CHECK((((uintptr_t)record_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&record_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(record_var);
return ret_arr;
}
-static inline struct LDKChannelManager *C2Tuple_BlockHashChannelManagerZ_get_b(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR owner){
+static inline struct LDKChannelManager *NONNULL_PTR C2Tuple_BlockHashChannelManagerZ_get_b(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR owner){
return &owner->b;
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelManagerZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
return ret_ref;
}
-static inline struct LDKC2Tuple_BlockHashChannelManagerZ *CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *NONNULL_PTR owner){
+static inline struct LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
return &*owner->contents.result;
}
default: abort();
}
}
-static inline struct LDKLockedChannelMonitor *CResult_LockedChannelMonitorNoneZ_get_ok(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){
+static inline struct LDKLockedChannelMonitor *NONNULL_PTR CResult_LockedChannelMonitorNoneZ_get_ok(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
return &*owner->contents.result;
}
}
LDKChannelMonitor data_var = *data;
int64_t data_ref = 0;
- data_var = ChannelMonitor_clone(data);
+ data_var = ChannelMonitor_clone(&data_var);
CHECK((((uintptr_t)data_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&data_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(data_var);
LDKChannelMonitorUpdate update_var = *update;
int64_t update_ref = 0;
if ((uintptr_t)update_var.inner > 4096) {
- update_var = ChannelMonitorUpdate_clone(update);
+ update_var = ChannelMonitorUpdate_clone(&update_var);
CHECK((((uintptr_t)update_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&update_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(update_var);
}
LDKChannelMonitor data_var = *data;
int64_t data_ref = 0;
- data_var = ChannelMonitor_clone(data);
+ data_var = ChannelMonitor_clone(&data_var);
CHECK((((uintptr_t)data_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&data_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(data_var);
}
LDKOpenChannel msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = OpenChannel_clone(msg);
+ msg_var = OpenChannel_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
}
LDKAcceptChannel msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = AcceptChannel_clone(msg);
+ msg_var = AcceptChannel_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
(*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
LDKFundingCreated msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = FundingCreated_clone(msg);
+ msg_var = FundingCreated_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
(*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
LDKFundingSigned msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = FundingSigned_clone(msg);
+ msg_var = FundingSigned_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
(*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
LDKFundingLocked msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = FundingLocked_clone(msg);
+ msg_var = FundingLocked_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
(*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
LDKInitFeatures their_features_var = *their_features;
int64_t their_features_ref = 0;
- their_features_var = InitFeatures_clone(their_features);
+ their_features_var = InitFeatures_clone(&their_features_var);
CHECK((((uintptr_t)their_features_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&their_features_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(their_features_var);
}
LDKShutdown msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = Shutdown_clone(msg);
+ msg_var = Shutdown_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
(*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
LDKClosingSigned msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = ClosingSigned_clone(msg);
+ msg_var = ClosingSigned_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
(*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
LDKUpdateAddHTLC msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = UpdateAddHTLC_clone(msg);
+ msg_var = UpdateAddHTLC_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
(*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
LDKUpdateFulfillHTLC msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = UpdateFulfillHTLC_clone(msg);
+ msg_var = UpdateFulfillHTLC_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
(*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
LDKUpdateFailHTLC msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = UpdateFailHTLC_clone(msg);
+ msg_var = UpdateFailHTLC_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
(*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
LDKUpdateFailMalformedHTLC msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = UpdateFailMalformedHTLC_clone(msg);
+ msg_var = UpdateFailMalformedHTLC_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
(*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
LDKCommitmentSigned msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = CommitmentSigned_clone(msg);
+ msg_var = CommitmentSigned_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
(*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
LDKRevokeAndACK msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = RevokeAndACK_clone(msg);
+ msg_var = RevokeAndACK_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
(*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
LDKUpdateFee msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = UpdateFee_clone(msg);
+ msg_var = UpdateFee_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
(*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
LDKAnnouncementSignatures msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = AnnouncementSignatures_clone(msg);
+ msg_var = AnnouncementSignatures_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
(*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
LDKInit msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = Init_clone(msg);
+ msg_var = Init_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
(*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
LDKChannelReestablish msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = ChannelReestablish_clone(msg);
+ msg_var = ChannelReestablish_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
(*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
LDKChannelUpdate msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = ChannelUpdate_clone(msg);
+ msg_var = ChannelUpdate_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
(*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
LDKErrorMessage msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = ErrorMessage_clone(msg);
+ msg_var = ErrorMessage_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
}
LDKNodeAnnouncement msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = NodeAnnouncement_clone(msg);
+ msg_var = NodeAnnouncement_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
}
LDKChannelAnnouncement msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = ChannelAnnouncement_clone(msg);
+ msg_var = ChannelAnnouncement_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
}
LDKChannelUpdate msg_var = *msg;
int64_t msg_ref = 0;
- msg_var = ChannelUpdate_clone(msg);
+ msg_var = ChannelUpdate_clone(&msg_var);
CHECK((((uintptr_t)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
(*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
LDKInit init_var = *init;
int64_t init_ref = 0;
- init_var = Init_clone(init);
+ init_var = Init_clone(&init_var);
CHECK((((uintptr_t)init_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&init_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(init_var);
}
LDKNodeId source_var = *source;
int64_t source_ref = 0;
- source_var = NodeId_clone(source);
+ source_var = NodeId_clone(&source_var);
CHECK((((uintptr_t)source_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&source_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(source_var);
}
LDKNodeId target_var = *target;
int64_t target_ref = 0;
- target_var = NodeId_clone(target);
+ target_var = NodeId_clone(&target_var);
CHECK((((uintptr_t)target_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&target_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(target_var);
}
LDKRoute route_var = *route;
int64_t route_ref = 0;
- route_var = Route_clone(route);
+ route_var = Route_clone(&route_var);
CHECK((((uintptr_t)route_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&route_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(route_var);
}
LDKRoute route_var = *route;
int64_t route_ref = 0;
- route_var = Route_clone(route);
+ route_var = Route_clone(&route_var);
CHECK((((uintptr_t)route_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&route_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(route_var);
}
LDKRoute route_var = *route;
int64_t route_ref = 0;
- route_var = Route_clone(route);
+ route_var = Route_clone(&route_var);
CHECK((((uintptr_t)route_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&route_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(route_var);
(*env)->SetByteArrayRegion(env, payer_arr, 0, 33, payer.compressed_form);
LDKRouteParameters route_params_var = *route_params;
int64_t route_params_ref = 0;
- route_params_var = RouteParameters_clone(route_params);
+ route_params_var = RouteParameters_clone(&route_params_var);
CHECK((((uintptr_t)route_params_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
CHECK((((uintptr_t)&route_params_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
CHECK_INNER_FIELD_ACCESS_OR_NULL(route_params_var);
return (int64_t)ret_conv;
}
+static inline uintptr_t C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_clone_ptr(LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ *NONNULL_PTR arg) {
+ LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ), "LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ");
+ *ret_conv = C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_clone(arg);
+ return ((int64_t)ret_conv);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ProbabilisticScoringParametersNetworkGraphZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ* arg_conv = (LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ*)(arg & ~1);
+ int64_t ret_val = C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_clone_ptr(arg_conv);
+ return ret_val;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ProbabilisticScoringParametersNetworkGraphZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ* orig_conv = (LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ*)(orig & ~1);
+ LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ), "LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ");
+ *ret_conv = C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_clone(orig_conv);
+ return ((int64_t)ret_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ProbabilisticScoringParametersNetworkGraphZ_1new(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ LDKProbabilisticScoringParameters a_conv;
+ a_conv.inner = (void*)(a & (~1));
+ a_conv.is_owned = (a & 1) || (a == 0);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv = ProbabilisticScoringParameters_clone(&a_conv);
+ LDKNetworkGraph b_conv;
+ b_conv.inner = (void*)(b & (~1));
+ b_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ), "LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ");
+ *ret_conv = C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_new(a_conv, &b_conv);
+ return ((int64_t)ret_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ProbabilisticScoringParametersNetworkGraphZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if ((_res & 1) != 0) return;
+ void* _res_ptr = (void*)(((uintptr_t)_res) & ~1);
+ CHECK_ACCESS(_res_ptr);
+ LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ _res_conv = *(LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ*)(_res_ptr);
+ FREE((void*)_res);
+ C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScorerDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKProbabilisticScorer o_conv;
+ o_conv.inner = (void*)(o & (~1));
+ o_conv.is_owned = (o & 1) || (o == 0);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ // WARNING: we need a move here but no clone is available for LDKProbabilisticScorer
+ LDKCResult_ProbabilisticScorerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ProbabilisticScorerDecodeErrorZ), "LDKCResult_ProbabilisticScorerDecodeErrorZ");
+ *ret_conv = CResult_ProbabilisticScorerDecodeErrorZ_ok(o_conv);
+ return (int64_t)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScorerDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+ LDKDecodeError e_conv;
+ e_conv.inner = (void*)(e & (~1));
+ e_conv.is_owned = (e & 1) || (e == 0);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
+ e_conv = DecodeError_clone(&e_conv);
+ LDKCResult_ProbabilisticScorerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ProbabilisticScorerDecodeErrorZ), "LDKCResult_ProbabilisticScorerDecodeErrorZ");
+ *ret_conv = CResult_ProbabilisticScorerDecodeErrorZ_err(e_conv);
+ return (int64_t)ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScorerDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_ProbabilisticScorerDecodeErrorZ* o_conv = (LDKCResult_ProbabilisticScorerDecodeErrorZ*)(o & ~1);
+ jboolean ret_val = CResult_ProbabilisticScorerDecodeErrorZ_is_ok(o_conv);
+ return ret_val;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScorerDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if ((_res & 1) != 0) return;
+ void* _res_ptr = (void*)(((uintptr_t)_res) & ~1);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_ProbabilisticScorerDecodeErrorZ _res_conv = *(LDKCResult_ProbabilisticScorerDecodeErrorZ*)(_res_ptr);
+ FREE((void*)_res);
+ CResult_ProbabilisticScorerDecodeErrorZ_free(_res_conv);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InitFeaturesDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
LDKInitFeatures o_conv;
o_conv.inner = (void*)(o & (~1));
return (int64_t)ret_conv;
}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ProbabilisticScorer_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKProbabilisticScorer this_obj_conv;
+ this_obj_conv.inner = (void*)(this_obj & (~1));
+ this_obj_conv.is_owned = (this_obj & 1) || (this_obj == 0);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ ProbabilisticScorer_free(this_obj_conv);
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ProbabilisticScoringParameters_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
LDKProbabilisticScoringParameters this_obj_conv;
this_obj_conv.inner = (void*)(this_obj & (~1));
return (int64_t)ret_conv;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ProbabilisticScorer_1new(JNIEnv *env, jclass clz, int64_t params, int64_t network_graph) {
+ LDKProbabilisticScoringParameters params_conv;
+ params_conv.inner = (void*)(params & (~1));
+ params_conv.is_owned = (params & 1) || (params == 0);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(params_conv);
+ params_conv = ProbabilisticScoringParameters_clone(¶ms_conv);
+ LDKNetworkGraph network_graph_conv;
+ network_graph_conv.inner = (void*)(network_graph & (~1));
+ network_graph_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_conv);
+ LDKProbabilisticScorer ret_var = ProbabilisticScorer_new(params_conv, &network_graph_conv);
+ int64_t ret_ref = 0;
+ CHECK((((uintptr_t)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uintptr_t)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = (uintptr_t)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ProbabilisticScoringParameters_1default(JNIEnv *env, jclass clz) {
LDKProbabilisticScoringParameters ret_var = ProbabilisticScoringParameters_default();
int64_t ret_ref = 0;
return ret_ref;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ProbabilisticScorer_1as_1Score(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKProbabilisticScorer this_arg_conv;
+ this_arg_conv.inner = (void*)(this_arg & (~1));
+ this_arg_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ LDKScore* ret_ret = MALLOC(sizeof(LDKScore), "LDKScore");
+ *ret_ret = ProbabilisticScorer_as_Score(&this_arg_conv);
+ return (int64_t)ret_ret;
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ProbabilisticScorer_1write(JNIEnv *env, jclass clz, int64_t obj) {
+ LDKProbabilisticScorer obj_conv;
+ obj_conv.inner = (void*)(obj & (~1));
+ obj_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+ LDKCVec_u8Z ret_var = ProbabilisticScorer_write(&obj_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_ProbabilisticScorer_1read(JNIEnv *env, jclass clz, int8_tArray ser, int64_t arg) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+ ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+ void* arg_ptr = (void*)(((uintptr_t)arg) & ~1);
+ CHECK_ACCESS(arg_ptr);
+ LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ arg_conv = *(LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ*)(arg_ptr);
+ arg_conv = C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_clone((LDKC2Tuple_ProbabilisticScoringParametersNetworkGraphZ*)(((uintptr_t)arg) & ~1));
+ LDKCResult_ProbabilisticScorerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ProbabilisticScorerDecodeErrorZ), "LDKCResult_ProbabilisticScorerDecodeErrorZ");
+ *ret_conv = ProbabilisticScorer_read(ser_ref, arg_conv);
+ (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+ return (int64_t)ret_conv;
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FilesystemPersister_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
LDKFilesystemPersister this_obj_conv;
this_obj_conv.inner = (void*)(this_obj & (~1));
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScoringParametersDecodeErrorZ_1get_1err
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_get_a
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ProbabilisticScoringParametersNetworkGraphZ_1get_1a
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_get_b
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ProbabilisticScoringParametersNetworkGraphZ_1get_1b
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_ProbabilisticScorerDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScorerDecodeErrorZ_1get_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_ProbabilisticScorerDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScorerDecodeErrorZ_1get_1err
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: CResult_InitFeaturesDecodeErrorZ_get_ok
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScoringParametersDecodeErrorZ_1clone
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ProbabilisticScoringParametersNetworkGraphZ_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ProbabilisticScoringParametersNetworkGraphZ_1clone
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_new
+ * Signature: (JJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ProbabilisticScoringParametersNetworkGraphZ_1new
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: C2Tuple_ProbabilisticScoringParametersNetworkGraphZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ProbabilisticScoringParametersNetworkGraphZ_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_ProbabilisticScorerDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScorerDecodeErrorZ_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_ProbabilisticScorerDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScorerDecodeErrorZ_1err
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_ProbabilisticScorerDecodeErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScorerDecodeErrorZ_1is_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_ProbabilisticScorerDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScorerDecodeErrorZ_1free
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: CResult_InitFeaturesDecodeErrorZ_ok
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Scorer_1read
(JNIEnv *, jclass, jbyteArray);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ProbabilisticScorer_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ProbabilisticScorer_1free
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: ProbabilisticScoringParameters_free
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ProbabilisticScoringParameters_1read
(JNIEnv *, jclass, jbyteArray);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ProbabilisticScorer_new
+ * Signature: (JJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ProbabilisticScorer_1new
+ (JNIEnv *, jclass, jlong, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: ProbabilisticScoringParameters_default
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ProbabilisticScoringParameters_1default
(JNIEnv *, jclass);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ProbabilisticScorer_as_Score
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ProbabilisticScorer_1as_1Score
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ProbabilisticScorer_write
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ProbabilisticScorer_1write
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ProbabilisticScorer_read
+ * Signature: ([BJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ProbabilisticScorer_1read
+ (JNIEnv *, jclass, jbyteArray, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: FilesystemPersister_free