public static native short DelayedPaymentOutputDescriptor_get_to_self_delay(long this_ptr);
// void DelayedPaymentOutputDescriptor_set_to_self_delay(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint16_t val);
public static native void DelayedPaymentOutputDescriptor_set_to_self_delay(long this_ptr, short val);
+ // struct LDKTxOut DelayedPaymentOutputDescriptor_get_output(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
+ public static native long DelayedPaymentOutputDescriptor_get_output(long this_ptr);
// void DelayedPaymentOutputDescriptor_set_output(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
public static native void DelayedPaymentOutputDescriptor_set_output(long this_ptr, long val);
// struct LDKPublicKey DelayedPaymentOutputDescriptor_get_revocation_pubkey(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
public static native long StaticPaymentOutputDescriptor_get_outpoint(long this_ptr);
// void StaticPaymentOutputDescriptor_set_outpoint(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
public static native void StaticPaymentOutputDescriptor_set_outpoint(long this_ptr, long val);
+ // struct LDKTxOut StaticPaymentOutputDescriptor_get_output(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
+ public static native long StaticPaymentOutputDescriptor_get_output(long this_ptr);
// void StaticPaymentOutputDescriptor_set_output(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
public static native void StaticPaymentOutputDescriptor_set_output(long this_ptr, long val);
// const uint8_t (*StaticPaymentOutputDescriptor_get_channel_keys_id(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
public static native byte[] CommitmentSigned_get_signature(long this_ptr);
// void CommitmentSigned_set_signature(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
public static native void CommitmentSigned_set_signature(long this_ptr, byte[] val);
+ // struct LDKCVec_SignatureZ CommitmentSigned_get_htlc_signatures(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr);
+ public static native byte[][] CommitmentSigned_get_htlc_signatures(long this_ptr);
// void CommitmentSigned_set_htlc_signatures(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
public static native void CommitmentSigned_set_htlc_signatures(long this_ptr, byte[][] val);
// MUST_USE_RES struct LDKCommitmentSigned CommitmentSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg, struct LDKCVec_SignatureZ htlc_signatures_arg);
public static native byte[] UnsignedNodeAnnouncement_get_alias(long this_ptr);
// void UnsignedNodeAnnouncement_set_alias(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
public static native void UnsignedNodeAnnouncement_set_alias(long this_ptr, byte[] val);
+ // struct LDKCVec_NetAddressZ UnsignedNodeAnnouncement_get_addresses(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
+ public static native long[] UnsignedNodeAnnouncement_get_addresses(long this_ptr);
// void UnsignedNodeAnnouncement_set_addresses(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
public static native void UnsignedNodeAnnouncement_set_addresses(long this_ptr, long[] val);
// uintptr_t UnsignedNodeAnnouncement_clone_ptr(LDKUnsignedNodeAnnouncement *NONNULL_PTR arg);
public static native int UnsignedChannelUpdate_get_fee_proportional_millionths(long this_ptr);
// void UnsignedChannelUpdate_set_fee_proportional_millionths(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
public static native void UnsignedChannelUpdate_set_fee_proportional_millionths(long this_ptr, int val);
+ // struct LDKCVec_u8Z UnsignedChannelUpdate_get_excess_data(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
+ public static native byte[] UnsignedChannelUpdate_get_excess_data(long this_ptr);
// void UnsignedChannelUpdate_set_excess_data(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
public static native void UnsignedChannelUpdate_set_excess_data(long this_ptr, byte[] val);
// MUST_USE_RES struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_new(struct LDKThirtyTwoBytes chain_hash_arg, uint64_t short_channel_id_arg, uint32_t timestamp_arg, uint8_t flags_arg, uint16_t cltv_expiry_delta_arg, uint64_t htlc_minimum_msat_arg, uint64_t htlc_maximum_msat_arg, uint32_t fee_base_msat_arg, uint32_t fee_proportional_millionths_arg, struct LDKCVec_u8Z excess_data_arg);
public static native boolean ReplyChannelRange_get_sync_complete(long this_ptr);
// void ReplyChannelRange_set_sync_complete(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, bool val);
public static native void ReplyChannelRange_set_sync_complete(long this_ptr, boolean val);
+ // struct LDKCVec_u64Z ReplyChannelRange_get_short_channel_ids(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
+ public static native long[] ReplyChannelRange_get_short_channel_ids(long this_ptr);
// void ReplyChannelRange_set_short_channel_ids(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
public static native void ReplyChannelRange_set_short_channel_ids(long this_ptr, long[] val);
// MUST_USE_RES struct LDKReplyChannelRange ReplyChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg, bool sync_complete_arg, struct LDKCVec_u64Z short_channel_ids_arg);
public static native byte[] QueryShortChannelIds_get_chain_hash(long this_ptr);
// void QueryShortChannelIds_set_chain_hash(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
public static native void QueryShortChannelIds_set_chain_hash(long this_ptr, byte[] val);
+ // struct LDKCVec_u64Z QueryShortChannelIds_get_short_channel_ids(const struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr);
+ public static native long[] QueryShortChannelIds_get_short_channel_ids(long this_ptr);
// void QueryShortChannelIds_set_short_channel_ids(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
public static native void QueryShortChannelIds_set_short_channel_ids(long this_ptr, long[] val);
// MUST_USE_RES struct LDKQueryShortChannelIds QueryShortChannelIds_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKCVec_u64Z short_channel_ids_arg);
public static native byte[] HolderCommitmentTransaction_get_counterparty_sig(long this_ptr);
// void HolderCommitmentTransaction_set_counterparty_sig(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKSignature val);
public static native void HolderCommitmentTransaction_set_counterparty_sig(long this_ptr, byte[] val);
+ // struct LDKCVec_SignatureZ HolderCommitmentTransaction_get_counterparty_htlc_sigs(const struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr);
+ public static native byte[][] HolderCommitmentTransaction_get_counterparty_htlc_sigs(long this_ptr);
// void HolderCommitmentTransaction_set_counterparty_htlc_sigs(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
public static native void HolderCommitmentTransaction_set_counterparty_htlc_sigs(long this_ptr, byte[][] val);
// uintptr_t HolderCommitmentTransaction_clone_ptr(LDKHolderCommitmentTransaction *NONNULL_PTR arg);
public static native long NodeAnnouncementInfo_get_alias(long this_ptr);
// void NodeAnnouncementInfo_set_alias(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeAlias val);
public static native void NodeAnnouncementInfo_set_alias(long this_ptr, long val);
+ // struct LDKCVec_NetAddressZ NodeAnnouncementInfo_get_addresses(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
+ public static native long[] NodeAnnouncementInfo_get_addresses(long this_ptr);
// void NodeAnnouncementInfo_set_addresses(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
public static native void NodeAnnouncementInfo_set_addresses(long this_ptr, long[] val);
// struct LDKNodeAnnouncement NodeAnnouncementInfo_get_announcement_message(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
public static native long NodeAlias_read(byte[] ser);
// void NodeInfo_free(struct LDKNodeInfo this_obj);
public static native void NodeInfo_free(long this_obj);
+ // struct LDKCVec_u64Z NodeInfo_get_channels(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
+ public static native long[] NodeInfo_get_channels(long this_ptr);
// void NodeInfo_set_channels(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
public static native void NodeInfo_set_channels(long this_ptr, long[] val);
// struct LDKRoutingFees NodeInfo_get_lowest_inbound_channel_fees(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
public static native long NetworkGraph_update_channel_unsigned(long this_arg, long msg);
// MUST_USE_RES struct LDKChannelInfo ReadOnlyNetworkGraph_channel(const struct LDKReadOnlyNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id);
public static native long ReadOnlyNetworkGraph_channel(long this_arg, long short_channel_id);
+ // MUST_USE_RES struct LDKCVec_u64Z ReadOnlyNetworkGraph_list_channels(const struct LDKReadOnlyNetworkGraph *NONNULL_PTR this_arg);
+ public static native long[] ReadOnlyNetworkGraph_list_channels(long this_arg);
// MUST_USE_RES struct LDKNodeInfo ReadOnlyNetworkGraph_node(const struct LDKReadOnlyNetworkGraph *NONNULL_PTR this_arg, const struct LDKNodeId *NONNULL_PTR node_id);
public static native long ReadOnlyNetworkGraph_node(long this_arg, long node_id);
+ // MUST_USE_RES struct LDKCVec_NodeIdZ ReadOnlyNetworkGraph_list_nodes(const struct LDKReadOnlyNetworkGraph *NONNULL_PTR this_arg);
+ public static native long[] ReadOnlyNetworkGraph_list_nodes(long this_arg);
// MUST_USE_RES struct LDKCOption_CVec_NetAddressZZ ReadOnlyNetworkGraph_get_addresses(const struct LDKReadOnlyNetworkGraph *NONNULL_PTR this_arg, struct LDKPublicKey pubkey);
public static native long ReadOnlyNetworkGraph_get_addresses(long this_arg, byte[] pubkey);
// void RouteHop_free(struct LDKRouteHop this_obj);
public static native byte PaymentParameters_get_max_channel_saturation_power_of_half(long this_ptr);
// void PaymentParameters_set_max_channel_saturation_power_of_half(struct LDKPaymentParameters *NONNULL_PTR this_ptr, uint8_t val);
public static native void PaymentParameters_set_max_channel_saturation_power_of_half(long this_ptr, byte val);
+ // struct LDKCVec_u64Z PaymentParameters_get_previously_failed_channels(const struct LDKPaymentParameters *NONNULL_PTR this_ptr);
+ public static native long[] PaymentParameters_get_previously_failed_channels(long this_ptr);
// void PaymentParameters_set_previously_failed_channels(struct LDKPaymentParameters *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
public static native void PaymentParameters_set_previously_failed_channels(long this_ptr, long[] val);
// MUST_USE_RES struct LDKPaymentParameters PaymentParameters_new(struct LDKPublicKey payee_pubkey_arg, struct LDKInvoiceFeatures features_arg, struct LDKCVec_RouteHintZ route_hints_arg, struct LDKCOption_u64Z expiry_time_arg, uint32_t max_total_cltv_expiry_delta_arg, uint8_t max_path_count_arg, uint8_t max_channel_saturation_power_of_half_arg, struct LDKCVec_u64Z previously_failed_channels_arg);
Reference.reachabilityFence(val);
}
+ /**
+ * Signatures on the HTLC transactions
+ *
+ * Returns a copy of the field.
+ */
+ public byte[][] get_htlc_signatures() {
+ byte[][] ret = bindings.CommitmentSigned_get_htlc_signatures(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
/**
* Signatures on the HTLC transactions
*/
Reference.reachabilityFence(val);
}
+ /**
+ * The output which is referenced by the given outpoint
+ *
+ * Returns a copy of the field.
+ */
+ public TxOut get_output() {
+ long ret = bindings.DelayedPaymentOutputDescriptor_get_output(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ TxOut ret_conv = new TxOut(null, ret);
+ return ret_conv;
+ }
+
/**
* The output which is referenced by the given outpoint
*/
Reference.reachabilityFence(val);
}
+ /**
+ * All non-dust counterparty HTLC signatures, in the order they appear in the transaction
+ *
+ * Returns a copy of the field.
+ */
+ public byte[][] get_counterparty_htlc_sigs() {
+ byte[][] ret = bindings.HolderCommitmentTransaction_get_counterparty_htlc_sigs(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
/**
* All non-dust counterparty HTLC signatures, in the order they appear in the transaction
*/
Reference.reachabilityFence(val);
}
+ /**
+ * Internet-level addresses via which one can connect to the node
+ *
+ * Returns a copy of the field.
+ */
+ public NetAddress[] get_addresses() {
+ long[] ret = bindings.NodeAnnouncementInfo_get_addresses(this.ptr);
+ Reference.reachabilityFence(this);
+ int ret_conv_12_len = ret.length;
+ NetAddress[] ret_conv_12_arr = new NetAddress[ret_conv_12_len];
+ for (int m = 0; m < ret_conv_12_len; m++) {
+ long ret_conv_12 = ret[m];
+ org.ldk.structs.NetAddress ret_conv_12_hu_conv = org.ldk.structs.NetAddress.constr_from_ptr(ret_conv_12);
+ ret_conv_12_hu_conv.ptrs_to.add(this);
+ ret_conv_12_arr[m] = ret_conv_12_hu_conv;
+ }
+ return ret_conv_12_arr;
+ }
+
/**
* Internet-level addresses via which one can connect to the node
*/
if (ptr != 0) { bindings.NodeInfo_free(ptr); }
}
+ /**
+ * All valid channels a node has announced
+ *
+ * Returns a copy of the field.
+ */
+ public long[] get_channels() {
+ long[] ret = bindings.NodeInfo_get_channels(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
/**
* All valid channels a node has announced
*/
Reference.reachabilityFence(val);
}
+ /**
+ * A list of SCIDs which this payment was previously attempted over and which caused the
+ * payment to fail. Future attempts for the same payment shouldn't be relayed through any of
+ * these SCIDs.
+ *
+ * Returns a copy of the field.
+ */
+ public long[] get_previously_failed_channels() {
+ long[] ret = bindings.PaymentParameters_get_previously_failed_channels(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
/**
* A list of SCIDs which this payment was previously attempted over and which caused the
* payment to fail. Future attempts for the same payment shouldn't be relayed through any of
Reference.reachabilityFence(val);
}
+ /**
+ * The short_channel_ids that are being queried
+ *
+ * Returns a copy of the field.
+ */
+ public long[] get_short_channel_ids() {
+ long[] ret = bindings.QueryShortChannelIds_get_short_channel_ids(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
/**
* The short_channel_ids that are being queried
*/
return ret_hu_conv;
}
+ /**
+ * Returns the list of channels in the graph
+ */
+ public long[] list_channels() {
+ long[] ret = bindings.ReadOnlyNetworkGraph_list_channels(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
/**
* Returns information on a node with the given id.
*
return ret_hu_conv;
}
+ /**
+ * Returns the list of nodes in the graph
+ */
+ public NodeId[] list_nodes() {
+ long[] ret = bindings.ReadOnlyNetworkGraph_list_nodes(this.ptr);
+ Reference.reachabilityFence(this);
+ int ret_conv_8_len = ret.length;
+ NodeId[] ret_conv_8_arr = new NodeId[ret_conv_8_len];
+ for (int i = 0; i < ret_conv_8_len; i++) {
+ long ret_conv_8 = ret[i];
+ org.ldk.structs.NodeId ret_conv_8_hu_conv = null; if (ret_conv_8 < 0 || ret_conv_8 > 4096) { ret_conv_8_hu_conv = new org.ldk.structs.NodeId(null, ret_conv_8); }
+ ret_conv_8_hu_conv.ptrs_to.add(this);
+ ret_conv_8_arr[i] = ret_conv_8_hu_conv;
+ }
+ return ret_conv_8_arr;
+ }
+
/**
* Get network addresses by node id.
* Returns None if the requested node is completely unknown,
Reference.reachabilityFence(val);
}
+ /**
+ * The short_channel_ids in the channel range
+ *
+ * Returns a copy of the field.
+ */
+ public long[] get_short_channel_ids() {
+ long[] ret = bindings.ReplyChannelRange_get_short_channel_ids(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
/**
* The short_channel_ids in the channel range
*/
Reference.reachabilityFence(val);
}
+ /**
+ * The output which is referenced by the given outpoint
+ *
+ * Returns a copy of the field.
+ */
+ public TxOut get_output() {
+ long ret = bindings.StaticPaymentOutputDescriptor_get_output(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ TxOut ret_conv = new TxOut(null, ret);
+ return ret_conv;
+ }
+
/**
* The output which is referenced by the given outpoint
*/
Reference.reachabilityFence(val);
}
+ /**
+ * Excess data which was signed as a part of the message which we do not (yet) understand how
+ * to decode. This is stored to ensure forward-compatibility as new fields are added to the
+ * lightning gossip
+ *
+ * Returns a copy of the field.
+ */
+ public byte[] get_excess_data() {
+ byte[] ret = bindings.UnsignedChannelUpdate_get_excess_data(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
/**
* Excess data which was signed as a part of the message which we do not (yet) understand how
* to decode. This is stored to ensure forward-compatibility as new fields are added to the
Reference.reachabilityFence(val);
}
+ /**
+ * List of addresses on which this node is reachable
+ *
+ * Returns a copy of the field.
+ */
+ public NetAddress[] get_addresses() {
+ long[] ret = bindings.UnsignedNodeAnnouncement_get_addresses(this.ptr);
+ Reference.reachabilityFence(this);
+ int ret_conv_12_len = ret.length;
+ NetAddress[] ret_conv_12_arr = new NetAddress[ret_conv_12_len];
+ for (int m = 0; m < ret_conv_12_len; m++) {
+ long ret_conv_12 = ret[m];
+ org.ldk.structs.NetAddress ret_conv_12_hu_conv = org.ldk.structs.NetAddress.constr_from_ptr(ret_conv_12);
+ ret_conv_12_hu_conv.ptrs_to.add(this);
+ ret_conv_12_arr[m] = ret_conv_12_hu_conv;
+ }
+ return ret_conv_12_arr;
+ }
+
/**
* List of addresses on which this node is reachable
*/
DelayedPaymentOutputDescriptor_set_to_self_delay(&this_ptr_conv, val);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1get_1output(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKTxOut* ret_ref = MALLOC(sizeof(LDKTxOut), "LDKTxOut");
+ *ret_ref = DelayedPaymentOutputDescriptor_get_output(&this_ptr_conv);
+ return (int64_t)ret_ref;
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1set_1output(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKDelayedPaymentOutputDescriptor this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
StaticPaymentOutputDescriptor_set_outpoint(&this_ptr_conv, val_conv);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_StaticPaymentOutputDescriptor_1get_1output(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKStaticPaymentOutputDescriptor this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKTxOut* ret_ref = MALLOC(sizeof(LDKTxOut), "LDKTxOut");
+ *ret_ref = StaticPaymentOutputDescriptor_get_output(&this_ptr_conv);
+ return (int64_t)ret_ref;
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_StaticPaymentOutputDescriptor_1set_1output(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKStaticPaymentOutputDescriptor this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
CommitmentSigned_set_signature(&this_ptr_conv, val_ref);
}
+JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1get_1htlc_1signatures(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommitmentSigned this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKCVec_SignatureZ ret_var = CommitmentSigned_get_htlc_signatures(&this_ptr_conv);
+ jobjectArray ret_arr = NULL;
+ ret_arr = (*env)->NewObjectArray(env, ret_var.datalen, arr_of_B_clz, NULL);
+ ;
+ for (size_t i = 0; i < ret_var.datalen; i++) {
+ int8_tArray ret_conv_8_arr = (*env)->NewByteArray(env, 64);
+ (*env)->SetByteArrayRegion(env, ret_conv_8_arr, 0, 64, ret_var.data[i].compact_form);
+ (*env)->SetObjectArrayElement(env, ret_arr, i, ret_conv_8_arr);
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1set_1htlc_1signatures(JNIEnv *env, jclass clz, int64_t this_ptr, jobjectArray val) {
LDKCommitmentSigned this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
UnsignedNodeAnnouncement_set_alias(&this_ptr_conv, val_ref);
}
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1get_1addresses(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKUnsignedNodeAnnouncement this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKCVec_NetAddressZ ret_var = UnsignedNodeAnnouncement_get_addresses(&this_ptr_conv);
+ int64_tArray ret_arr = NULL;
+ ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
+ int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
+ for (size_t m = 0; m < ret_var.datalen; m++) {
+ LDKNetAddress *ret_conv_12_copy = MALLOC(sizeof(LDKNetAddress), "LDKNetAddress");
+ *ret_conv_12_copy = ret_var.data[m];
+ int64_t ret_conv_12_ref = (uintptr_t)ret_conv_12_copy;
+ ret_arr_ptr[m] = ret_conv_12_ref;
+ }
+ (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1addresses(JNIEnv *env, jclass clz, int64_t this_ptr, int64_tArray val) {
LDKUnsignedNodeAnnouncement this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
UnsignedChannelUpdate_set_fee_proportional_millionths(&this_ptr_conv, val);
}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1excess_1data(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKUnsignedChannelUpdate this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKCVec_u8Z ret_var = UnsignedChannelUpdate_get_excess_data(&this_ptr_conv);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1excess_1data(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
LDKUnsignedChannelUpdate this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
ReplyChannelRange_set_sync_complete(&this_ptr_conv, val);
}
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1get_1short_1channel_1ids(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKReplyChannelRange this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKCVec_u64Z ret_var = ReplyChannelRange_get_short_channel_ids(&this_ptr_conv);
+ int64_tArray ret_arr = NULL;
+ ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
+ int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
+ for (size_t g = 0; g < ret_var.datalen; g++) {
+ int64_t ret_conv_6_conv = ret_var.data[g];
+ ret_arr_ptr[g] = ret_conv_6_conv;
+ }
+ (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1set_1short_1channel_1ids(JNIEnv *env, jclass clz, int64_t this_ptr, int64_tArray val) {
LDKReplyChannelRange this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
QueryShortChannelIds_set_chain_hash(&this_ptr_conv, val_ref);
}
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1get_1short_1channel_1ids(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKQueryShortChannelIds this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKCVec_u64Z ret_var = QueryShortChannelIds_get_short_channel_ids(&this_ptr_conv);
+ int64_tArray ret_arr = NULL;
+ ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
+ int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
+ for (size_t g = 0; g < ret_var.datalen; g++) {
+ int64_t ret_conv_6_conv = ret_var.data[g];
+ ret_arr_ptr[g] = ret_conv_6_conv;
+ }
+ (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1set_1short_1channel_1ids(JNIEnv *env, jclass clz, int64_t this_ptr, int64_tArray val) {
LDKQueryShortChannelIds this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
HolderCommitmentTransaction_set_counterparty_sig(&this_ptr_conv, val_ref);
}
+JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1get_1counterparty_1htlc_1sigs(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKHolderCommitmentTransaction this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKCVec_SignatureZ ret_var = HolderCommitmentTransaction_get_counterparty_htlc_sigs(&this_ptr_conv);
+ jobjectArray ret_arr = NULL;
+ ret_arr = (*env)->NewObjectArray(env, ret_var.datalen, arr_of_B_clz, NULL);
+ ;
+ for (size_t i = 0; i < ret_var.datalen; i++) {
+ int8_tArray ret_conv_8_arr = (*env)->NewByteArray(env, 64);
+ (*env)->SetByteArrayRegion(env, ret_conv_8_arr, 0, 64, ret_var.data[i].compact_form);
+ (*env)->SetObjectArrayElement(env, ret_arr, i, ret_conv_8_arr);
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1set_1counterparty_1htlc_1sigs(JNIEnv *env, jclass clz, int64_t this_ptr, jobjectArray val) {
LDKHolderCommitmentTransaction this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
NodeAnnouncementInfo_set_alias(&this_ptr_conv, val_conv);
}
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1get_1addresses(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKNodeAnnouncementInfo this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKCVec_NetAddressZ ret_var = NodeAnnouncementInfo_get_addresses(&this_ptr_conv);
+ int64_tArray ret_arr = NULL;
+ ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
+ int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
+ for (size_t m = 0; m < ret_var.datalen; m++) {
+ LDKNetAddress *ret_conv_12_copy = MALLOC(sizeof(LDKNetAddress), "LDKNetAddress");
+ *ret_conv_12_copy = ret_var.data[m];
+ int64_t ret_conv_12_ref = (uintptr_t)ret_conv_12_copy;
+ ret_arr_ptr[m] = ret_conv_12_ref;
+ }
+ (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1set_1addresses(JNIEnv *env, jclass clz, int64_t this_ptr, int64_tArray val) {
LDKNodeAnnouncementInfo this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
NodeInfo_free(this_obj_conv);
}
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_NodeInfo_1get_1channels(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKNodeInfo this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKCVec_u64Z ret_var = NodeInfo_get_channels(&this_ptr_conv);
+ int64_tArray ret_arr = NULL;
+ ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
+ int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
+ for (size_t g = 0; g < ret_var.datalen; g++) {
+ int64_t ret_conv_6_conv = ret_var.data[g];
+ ret_arr_ptr[g] = ret_conv_6_conv;
+ }
+ (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeInfo_1set_1channels(JNIEnv *env, jclass clz, int64_t this_ptr, int64_tArray val) {
LDKNodeInfo this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
return ret_ref;
}
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ReadOnlyNetworkGraph_1list_1channels(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKReadOnlyNetworkGraph 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);
+ LDKCVec_u64Z ret_var = ReadOnlyNetworkGraph_list_channels(&this_arg_conv);
+ int64_tArray ret_arr = NULL;
+ ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
+ int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
+ for (size_t g = 0; g < ret_var.datalen; g++) {
+ int64_t ret_conv_6_conv = ret_var.data[g];
+ ret_arr_ptr[g] = ret_conv_6_conv;
+ }
+ (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReadOnlyNetworkGraph_1node(JNIEnv *env, jclass clz, int64_t this_arg, int64_t node_id) {
LDKReadOnlyNetworkGraph this_arg_conv;
this_arg_conv.inner = (void*)(this_arg & (~1));
return ret_ref;
}
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ReadOnlyNetworkGraph_1list_1nodes(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKReadOnlyNetworkGraph 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);
+ LDKCVec_NodeIdZ ret_var = ReadOnlyNetworkGraph_list_nodes(&this_arg_conv);
+ int64_tArray ret_arr = NULL;
+ ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
+ int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
+ for (size_t i = 0; i < ret_var.datalen; i++) {
+ LDKNodeId ret_conv_8_var = ret_var.data[i];
+ int64_t ret_conv_8_ref = 0;
+ CHECK((((uintptr_t)ret_conv_8_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uintptr_t)&ret_conv_8_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_8_var);
+ ret_conv_8_ref = (uintptr_t)ret_conv_8_var.inner;
+ if (ret_conv_8_var.is_owned) {
+ ret_conv_8_ref |= 1;
+ }
+ ret_arr_ptr[i] = ret_conv_8_ref;
+ }
+ (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReadOnlyNetworkGraph_1get_1addresses(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray pubkey) {
LDKReadOnlyNetworkGraph this_arg_conv;
this_arg_conv.inner = (void*)(this_arg & (~1));
PaymentParameters_set_max_channel_saturation_power_of_half(&this_ptr_conv, val);
}
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_PaymentParameters_1get_1previously_1failed_1channels(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKPaymentParameters this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKCVec_u64Z ret_var = PaymentParameters_get_previously_failed_channels(&this_ptr_conv);
+ int64_tArray ret_arr = NULL;
+ ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
+ int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
+ for (size_t g = 0; g < ret_var.datalen; g++) {
+ int64_t ret_conv_6_conv = ret_var.data[g];
+ ret_arr_ptr[g] = ret_conv_6_conv;
+ }
+ (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PaymentParameters_1set_1previously_1failed_1channels(JNIEnv *env, jclass clz, int64_t this_ptr, int64_tArray val) {
LDKPaymentParameters this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
DelayedPaymentOutputDescriptor_set_to_self_delay(&this_ptr_conv, val);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1get_1output(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKTxOut* ret_ref = MALLOC(sizeof(LDKTxOut), "LDKTxOut");
+ *ret_ref = DelayedPaymentOutputDescriptor_get_output(&this_ptr_conv);
+ return (int64_t)ret_ref;
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1set_1output(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKDelayedPaymentOutputDescriptor this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
StaticPaymentOutputDescriptor_set_outpoint(&this_ptr_conv, val_conv);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_StaticPaymentOutputDescriptor_1get_1output(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKStaticPaymentOutputDescriptor this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKTxOut* ret_ref = MALLOC(sizeof(LDKTxOut), "LDKTxOut");
+ *ret_ref = StaticPaymentOutputDescriptor_get_output(&this_ptr_conv);
+ return (int64_t)ret_ref;
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_StaticPaymentOutputDescriptor_1set_1output(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKStaticPaymentOutputDescriptor this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
CommitmentSigned_set_signature(&this_ptr_conv, val_ref);
}
+JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1get_1htlc_1signatures(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommitmentSigned this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKCVec_SignatureZ ret_var = CommitmentSigned_get_htlc_signatures(&this_ptr_conv);
+ jobjectArray ret_arr = NULL;
+ ret_arr = (*env)->NewObjectArray(env, ret_var.datalen, arr_of_B_clz, NULL);
+ ;
+ for (size_t i = 0; i < ret_var.datalen; i++) {
+ int8_tArray ret_conv_8_arr = (*env)->NewByteArray(env, 64);
+ (*env)->SetByteArrayRegion(env, ret_conv_8_arr, 0, 64, ret_var.data[i].compact_form);
+ (*env)->SetObjectArrayElement(env, ret_arr, i, ret_conv_8_arr);
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1set_1htlc_1signatures(JNIEnv *env, jclass clz, int64_t this_ptr, jobjectArray val) {
LDKCommitmentSigned this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
UnsignedNodeAnnouncement_set_alias(&this_ptr_conv, val_ref);
}
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1get_1addresses(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKUnsignedNodeAnnouncement this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKCVec_NetAddressZ ret_var = UnsignedNodeAnnouncement_get_addresses(&this_ptr_conv);
+ int64_tArray ret_arr = NULL;
+ ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
+ int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
+ for (size_t m = 0; m < ret_var.datalen; m++) {
+ LDKNetAddress *ret_conv_12_copy = MALLOC(sizeof(LDKNetAddress), "LDKNetAddress");
+ *ret_conv_12_copy = ret_var.data[m];
+ int64_t ret_conv_12_ref = (uintptr_t)ret_conv_12_copy;
+ ret_arr_ptr[m] = ret_conv_12_ref;
+ }
+ (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1addresses(JNIEnv *env, jclass clz, int64_t this_ptr, int64_tArray val) {
LDKUnsignedNodeAnnouncement this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
UnsignedChannelUpdate_set_fee_proportional_millionths(&this_ptr_conv, val);
}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1excess_1data(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKUnsignedChannelUpdate this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKCVec_u8Z ret_var = UnsignedChannelUpdate_get_excess_data(&this_ptr_conv);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1excess_1data(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
LDKUnsignedChannelUpdate this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
ReplyChannelRange_set_sync_complete(&this_ptr_conv, val);
}
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1get_1short_1channel_1ids(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKReplyChannelRange this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKCVec_u64Z ret_var = ReplyChannelRange_get_short_channel_ids(&this_ptr_conv);
+ int64_tArray ret_arr = NULL;
+ ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
+ int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
+ for (size_t g = 0; g < ret_var.datalen; g++) {
+ int64_t ret_conv_6_conv = ret_var.data[g];
+ ret_arr_ptr[g] = ret_conv_6_conv;
+ }
+ (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1set_1short_1channel_1ids(JNIEnv *env, jclass clz, int64_t this_ptr, int64_tArray val) {
LDKReplyChannelRange this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
QueryShortChannelIds_set_chain_hash(&this_ptr_conv, val_ref);
}
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1get_1short_1channel_1ids(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKQueryShortChannelIds this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKCVec_u64Z ret_var = QueryShortChannelIds_get_short_channel_ids(&this_ptr_conv);
+ int64_tArray ret_arr = NULL;
+ ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
+ int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
+ for (size_t g = 0; g < ret_var.datalen; g++) {
+ int64_t ret_conv_6_conv = ret_var.data[g];
+ ret_arr_ptr[g] = ret_conv_6_conv;
+ }
+ (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1set_1short_1channel_1ids(JNIEnv *env, jclass clz, int64_t this_ptr, int64_tArray val) {
LDKQueryShortChannelIds this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
HolderCommitmentTransaction_set_counterparty_sig(&this_ptr_conv, val_ref);
}
+JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1get_1counterparty_1htlc_1sigs(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKHolderCommitmentTransaction this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKCVec_SignatureZ ret_var = HolderCommitmentTransaction_get_counterparty_htlc_sigs(&this_ptr_conv);
+ jobjectArray ret_arr = NULL;
+ ret_arr = (*env)->NewObjectArray(env, ret_var.datalen, arr_of_B_clz, NULL);
+ ;
+ for (size_t i = 0; i < ret_var.datalen; i++) {
+ int8_tArray ret_conv_8_arr = (*env)->NewByteArray(env, 64);
+ (*env)->SetByteArrayRegion(env, ret_conv_8_arr, 0, 64, ret_var.data[i].compact_form);
+ (*env)->SetObjectArrayElement(env, ret_arr, i, ret_conv_8_arr);
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1set_1counterparty_1htlc_1sigs(JNIEnv *env, jclass clz, int64_t this_ptr, jobjectArray val) {
LDKHolderCommitmentTransaction this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
NodeAnnouncementInfo_set_alias(&this_ptr_conv, val_conv);
}
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1get_1addresses(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKNodeAnnouncementInfo this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKCVec_NetAddressZ ret_var = NodeAnnouncementInfo_get_addresses(&this_ptr_conv);
+ int64_tArray ret_arr = NULL;
+ ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
+ int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
+ for (size_t m = 0; m < ret_var.datalen; m++) {
+ LDKNetAddress *ret_conv_12_copy = MALLOC(sizeof(LDKNetAddress), "LDKNetAddress");
+ *ret_conv_12_copy = ret_var.data[m];
+ int64_t ret_conv_12_ref = (uintptr_t)ret_conv_12_copy;
+ ret_arr_ptr[m] = ret_conv_12_ref;
+ }
+ (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1set_1addresses(JNIEnv *env, jclass clz, int64_t this_ptr, int64_tArray val) {
LDKNodeAnnouncementInfo this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
NodeInfo_free(this_obj_conv);
}
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_NodeInfo_1get_1channels(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKNodeInfo this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKCVec_u64Z ret_var = NodeInfo_get_channels(&this_ptr_conv);
+ int64_tArray ret_arr = NULL;
+ ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
+ int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
+ for (size_t g = 0; g < ret_var.datalen; g++) {
+ int64_t ret_conv_6_conv = ret_var.data[g];
+ ret_arr_ptr[g] = ret_conv_6_conv;
+ }
+ (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeInfo_1set_1channels(JNIEnv *env, jclass clz, int64_t this_ptr, int64_tArray val) {
LDKNodeInfo this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
return ret_ref;
}
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ReadOnlyNetworkGraph_1list_1channels(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKReadOnlyNetworkGraph 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);
+ LDKCVec_u64Z ret_var = ReadOnlyNetworkGraph_list_channels(&this_arg_conv);
+ int64_tArray ret_arr = NULL;
+ ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
+ int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
+ for (size_t g = 0; g < ret_var.datalen; g++) {
+ int64_t ret_conv_6_conv = ret_var.data[g];
+ ret_arr_ptr[g] = ret_conv_6_conv;
+ }
+ (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReadOnlyNetworkGraph_1node(JNIEnv *env, jclass clz, int64_t this_arg, int64_t node_id) {
LDKReadOnlyNetworkGraph this_arg_conv;
this_arg_conv.inner = (void*)(this_arg & (~1));
return ret_ref;
}
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ReadOnlyNetworkGraph_1list_1nodes(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKReadOnlyNetworkGraph 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);
+ LDKCVec_NodeIdZ ret_var = ReadOnlyNetworkGraph_list_nodes(&this_arg_conv);
+ int64_tArray ret_arr = NULL;
+ ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
+ int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
+ for (size_t i = 0; i < ret_var.datalen; i++) {
+ LDKNodeId ret_conv_8_var = ret_var.data[i];
+ int64_t ret_conv_8_ref = 0;
+ CHECK((((uintptr_t)ret_conv_8_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uintptr_t)&ret_conv_8_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_8_var);
+ ret_conv_8_ref = (uintptr_t)ret_conv_8_var.inner;
+ if (ret_conv_8_var.is_owned) {
+ ret_conv_8_ref |= 1;
+ }
+ ret_arr_ptr[i] = ret_conv_8_ref;
+ }
+ (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReadOnlyNetworkGraph_1get_1addresses(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray pubkey) {
LDKReadOnlyNetworkGraph this_arg_conv;
this_arg_conv.inner = (void*)(this_arg & (~1));
PaymentParameters_set_max_channel_saturation_power_of_half(&this_ptr_conv, val);
}
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_PaymentParameters_1get_1previously_1failed_1channels(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKPaymentParameters this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKCVec_u64Z ret_var = PaymentParameters_get_previously_failed_channels(&this_ptr_conv);
+ int64_tArray ret_arr = NULL;
+ ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
+ int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
+ for (size_t g = 0; g < ret_var.datalen; g++) {
+ int64_t ret_conv_6_conv = ret_var.data[g];
+ ret_arr_ptr[g] = ret_conv_6_conv;
+ }
+ (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PaymentParameters_1set_1previously_1failed_1channels(JNIEnv *env, jclass clz, int64_t this_ptr, int64_tArray val) {
LDKPaymentParameters this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1set_1to_1self_1delay
(JNIEnv *, jclass, jlong, jshort);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: DelayedPaymentOutputDescriptor_get_output
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1get_1output
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: DelayedPaymentOutputDescriptor_set_output
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_StaticPaymentOutputDescriptor_1set_1outpoint
(JNIEnv *, jclass, jlong, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: StaticPaymentOutputDescriptor_get_output
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_StaticPaymentOutputDescriptor_1get_1output
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: StaticPaymentOutputDescriptor_set_output
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1set_1signature
(JNIEnv *, jclass, jlong, jbyteArray);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CommitmentSigned_get_htlc_signatures
+ * Signature: (J)[[B
+ */
+JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1get_1htlc_1signatures
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: CommitmentSigned_set_htlc_signatures
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1alias
(JNIEnv *, jclass, jlong, jbyteArray);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: UnsignedNodeAnnouncement_get_addresses
+ * Signature: (J)[J
+ */
+JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1get_1addresses
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: UnsignedNodeAnnouncement_set_addresses
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1fee_1proportional_1millionths
(JNIEnv *, jclass, jlong, jint);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: UnsignedChannelUpdate_get_excess_data
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1excess_1data
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: UnsignedChannelUpdate_set_excess_data
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1set_1sync_1complete
(JNIEnv *, jclass, jlong, jboolean);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ReplyChannelRange_get_short_channel_ids
+ * Signature: (J)[J
+ */
+JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1get_1short_1channel_1ids
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: ReplyChannelRange_set_short_channel_ids
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1set_1chain_1hash
(JNIEnv *, jclass, jlong, jbyteArray);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: QueryShortChannelIds_get_short_channel_ids
+ * Signature: (J)[J
+ */
+JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1get_1short_1channel_1ids
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: QueryShortChannelIds_set_short_channel_ids
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1set_1counterparty_1sig
(JNIEnv *, jclass, jlong, jbyteArray);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: HolderCommitmentTransaction_get_counterparty_htlc_sigs
+ * Signature: (J)[[B
+ */
+JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1get_1counterparty_1htlc_1sigs
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: HolderCommitmentTransaction_set_counterparty_htlc_sigs
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1set_1alias
(JNIEnv *, jclass, jlong, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: NodeAnnouncementInfo_get_addresses
+ * Signature: (J)[J
+ */
+JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1get_1addresses
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: NodeAnnouncementInfo_set_addresses
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeInfo_1free
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: NodeInfo_get_channels
+ * Signature: (J)[J
+ */
+JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_NodeInfo_1get_1channels
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: NodeInfo_set_channels
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReadOnlyNetworkGraph_1channel
(JNIEnv *, jclass, jlong, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ReadOnlyNetworkGraph_list_channels
+ * Signature: (J)[J
+ */
+JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_ReadOnlyNetworkGraph_1list_1channels
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: ReadOnlyNetworkGraph_node
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReadOnlyNetworkGraph_1node
(JNIEnv *, jclass, jlong, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ReadOnlyNetworkGraph_list_nodes
+ * Signature: (J)[J
+ */
+JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_ReadOnlyNetworkGraph_1list_1nodes
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: ReadOnlyNetworkGraph_get_addresses
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PaymentParameters_1set_1max_1channel_1saturation_1power_1of_1half
(JNIEnv *, jclass, jlong, jbyte);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: PaymentParameters_get_previously_failed_channels
+ * Signature: (J)[J
+ */
+JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_PaymentParameters_1get_1previously_1failed_1channels
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: PaymentParameters_set_previously_failed_channels