dummy_line = fn_line.group(1) + struct_name + "_call_" + fn_line.group(2) + " " + struct_name + "* arg" + fn_line.group(4) + "\n"
map_fn(dummy_line, re.compile("([A-Za-z_0-9]*) *([A-Za-z_0-9]*) *(.*)").match(dummy_line), None, "(arg_conv->" + fn_line.group(2) + ")(arg_conv->this_arg")
- out_java.write("""package org.ldk.impl;
-
-public class bindings {
- static {
- System.loadLibrary(\"lightningjni\");
- init(java.lang.Enum.class);
- }
-""")
out_c.write("""#include \"org_ldk_impl_bindings.h\"
#include <rust_types.h>
#include <lightning.h>
DO_ASSERT(allocation_ll == NULL);
}
""")
+ out_java.write("""package org.ldk.impl;
- out_java.write("""
- static native void init(java.lang.Class c);
+public class bindings {
+ public static class VecOrSliceDef {
+ public long dataptr;
+ public long datalen;
+ public long stride;
+ public VecOrSliceDef(long dataptr, long datalen, long stride) {
+ this.dataptr = dataptr; this.datalen = datalen; this.stride = stride;
+ }
+ }
+ static {
+ System.loadLibrary(\"lightningjni\");
+ init(java.lang.Enum.class, VecOrSliceDef.class);
+ }
+ static native void init(java.lang.Class c, java.lang.Class slicedef);
public static native boolean deref_bool(long ptr);
public static native long deref_long(long ptr);
""")
out_c.write("""
jmethodID ordinal_meth = NULL;
-JNIEXPORT void Java_org_ldk_impl_bindings_init(JNIEnv * env, jclass _b, jclass enum_class) {
+jmethodID slicedef_meth = NULL;
+jclass slicedef_cls = NULL;
+JNIEXPORT void Java_org_ldk_impl_bindings_init(JNIEnv * env, jclass _b, jclass enum_class, jclass slicedef_class) {
ordinal_meth = (*env)->GetMethodID(env, enum_class, "ordinal", "()I");
DO_ASSERT(ordinal_meth != NULL);
+ slicedef_meth = (*env)->GetMethodID(env, slicedef_class, "<init>", "(JJJ)V");
+ DO_ASSERT(slicedef_meth != NULL);
+ slicedef_cls = (*env)->NewGlobalRef(env, slicedef_class);
+ DO_ASSERT(slicedef_cls != NULL);
}
JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_deref_1bool (JNIEnv * env, jclass _a, jlong ptr) {
const_val_regex = re.compile("^extern const ([A-Za-z_0-9]*) ([A-Za-z_0-9]*);$")
line_indicates_result_regex = re.compile("^ bool result_ok;$")
+ line_indicates_vec_regex = re.compile("^ ([A-Za-z_0-9]*) \*data;$")
line_indicates_opaque_regex = re.compile("^ bool is_owned;$")
line_indicates_trait_regex = re.compile("^ ([A-Za-z_0-9]* \*?)\(\*([A-Za-z_0-9]*)\)\((const )?void \*this_arg(.*)\);$")
assert(line_indicates_trait_regex.match(" uintptr_t (*send_data)(void *this_arg, LDKu8slice data, bool resume_read);"))
if line.startswith("} "):
field_lines = []
struct_name = None
+ vec_ty = None
obj_lines = cur_block_obj.split("\n")
is_opaque = False
is_result = False
in_block_comment = False
else:
struct_name_match = struct_name_regex.match(struct_line)
+ vec_ty_match = line_indicates_vec_regex.match(struct_line)
if struct_name_match is not None:
struct_name = struct_name_match.group(3)
if struct_name_match.group(1) == "enum":
is_opaque = True
elif line_indicates_result_regex.match(struct_line):
is_result = True
+ elif vec_ty_match is not None and struct_name.startswith("LDKCVecTempl_"):
+ vec_ty = vec_ty_match.group(1)
trait_fn_match = line_indicates_trait_regex.match(struct_line)
if trait_fn_match is not None:
trait_fn_lines.append(trait_fn_match)
out_c.write("}\n")
elif is_result:
result_templ_structs.add(struct_name)
+ elif vec_ty is not None:
+ out_java.write("\tpublic static native VecOrSliceDef " + struct_name + "_arr_info(long vec_ptr);\n")
+ out_c.write("JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_" + struct_name.replace("_", "_1") + "_1arr_1info(JNIEnv *env, jclass _b, jlong ptr) {\n")
+ out_c.write("\t" + struct_name + " *vec = (" + struct_name + "*)ptr;\n")
+ out_c.write("\treturn (*env)->NewObject(env, slicedef_cls, slicedef_meth, (long)vec->data, (long)vec->datalen, sizeof(" + vec_ty + "));\n")
+ out_c.write("}\n")
elif is_unitary_enum:
unitary_enums.add(struct_name)
out_c.write("static inline " + struct_name + " " + struct_name + "_from_java(JNIEnv *env, jclass val) {\n")
package org.ldk.impl;
public class bindings {
+ public static class VecOrSliceDef {
+ public long dataptr;
+ public long datalen;
+ public long stride;
+ public VecOrSliceDef(long dataptr, long datalen, long stride) {
+ this.dataptr = dataptr; this.datalen = datalen; this.stride = stride;
+ }
+ }
static {
System.loadLibrary("lightningjni");
- init(java.lang.Enum.class);
+ init(java.lang.Enum.class, VecOrSliceDef.class);
}
-
- static native void init(java.lang.Class c);
+ static native void init(java.lang.Class c, java.lang.Class slicedef);
public static native boolean deref_bool(long ptr);
public static native long deref_long(long ptr);
LDKSecp256k1Error_NotEnoughMemory,
LDKSecp256k1Error_CallbackPanicked,
}
+ public static native VecOrSliceDef LDKCVecTempl_u8_arr_info(long vec_ptr);
public static native boolean LDKCResult_NoneChannelMonitorUpdateErrZ_result_ok(long arg);
public static native long LDKCResult_NoneChannelMonitorUpdateErrZ_get_inner(long arg);
public static native long LDKMonitorUpdateError_optional_none();
public static native boolean LDKCResult_NoneMonitorUpdateErrorZ_result_ok(long arg);
public static native long LDKCResult_NoneMonitorUpdateErrorZ_get_inner(long arg);
public static native long LDKOutPoint_optional_none();
+ public static native VecOrSliceDef LDKCVecTempl_TxOut_arr_info(long vec_ptr);
+ public static native VecOrSliceDef LDKCVecTempl_Signature_arr_info(long vec_ptr);
public static native boolean LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_result_ok(long arg);
public static native long LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_inner(long arg);
public static native boolean LDKCResult_SignatureNoneZ_result_ok(long arg);
public static native boolean LDKCResult_NonePeerHandleErrorZ_result_ok(long arg);
public static native long LDKCResult_NonePeerHandleErrorZ_get_inner(long arg);
public static native long LDKHTLCOutputInCommitment_optional_none();
+ public static native VecOrSliceDef LDKCVecTempl_SpendableOutputDescriptor_arr_info(long vec_ptr);
public static native long LDKAcceptChannel_optional_none();
public static native long LDKOpenChannel_optional_none();
public static native long LDKFundingCreated_optional_none();
public static native long LDKChannelReestablish_optional_none();
public static native long LDKNodeAnnouncement_optional_none();
public static native long LDKErrorMessage_optional_none();
+ public static native VecOrSliceDef LDKCVecTempl_MessageSendEvent_arr_info(long vec_ptr);
public interface LDKMessageSendEventsProvider {
long get_and_clear_pending_msg_events();
}
public static native LDKMessageSendEventsProvider LDKMessageSendEventsProvider_get_obj_from_jcalls(long val);
// LDKCVec_MessageSendEventZ LDKMessageSendEventsProvider_call_get_and_clear_pending_msg_events LDKMessageSendEventsProvider* arg
public static native long LDKMessageSendEventsProvider_call_get_and_clear_pending_msg_events(long arg);
+ public static native VecOrSliceDef LDKCVecTempl_Event_arr_info(long vec_ptr);
public interface LDKEventsProvider {
long get_and_clear_pending_events();
}
public static native long LDKAccess_call_get_utxo(long arg, byte[] genesis_hash, long short_channel_id);
public static native long LDKChannelPublicKeys_optional_none();
public static native long LDKPreCalculatedTxCreationKeys_optional_none();
+ public static native VecOrSliceDef LDKCVecTempl_HTLCOutputInCommitment_arr_info(long vec_ptr);
public static native long LDKHolderCommitmentTransaction_optional_none();
public static native long LDKUnsignedChannelAnnouncement_optional_none();
public interface LDKChannelKeys {
public static native long LDKChannelMonitor_optional_none();
public static native long LDKChannelMonitorUpdate_optional_none();
public static native long LDKMonitorEvent_optional_none();
+ public static native VecOrSliceDef LDKCVecTempl_MonitorEvent_arr_info(long vec_ptr);
public interface LDKWatch {
long watch_channel(long funding_txo, long monitor);
long update_channel(long funding_txo, long update);
// uint32_t LDKFeeEstimator_call_get_est_sat_per_1000_weight LDKFeeEstimator* arg, LDKConfirmationTarget confirmation_target
public static native int LDKFeeEstimator_call_get_est_sat_per_1000_weight(long arg, LDKConfirmationTarget confirmation_target);
public static native long LDKChainMonitor_optional_none();
+ public static native VecOrSliceDef LDKCVecTempl_C2TupleTempl_usize__Transaction_arr_info(long vec_ptr);
public static native long LDKHTLCUpdate_optional_none();
+ public static native VecOrSliceDef LDKCVecTempl_Transaction_arr_info(long vec_ptr);
+ public static native VecOrSliceDef LDKCVecTempl_C2TupleTempl_ThirtyTwoBytes__CVecTempl_TxOut_arr_info(long vec_ptr);
public interface LDKKeysInterface {
long get_node_secret();
long get_destination_script();
public static native long LDKChannelManager_optional_none();
public static native long LDKChannelDetails_optional_none();
public static native long LDKInitFeatures_optional_none();
+ public static native VecOrSliceDef LDKCVecTempl_ChannelDetails_arr_info(long vec_ptr);
public static native long LDKRoute_optional_none();
+ public static native VecOrSliceDef LDKCVecTempl_NetAddress_arr_info(long vec_ptr);
public static native long LDKUpdateAddHTLC_optional_none();
public static native long LDKUpdateFulfillHTLC_optional_none();
public static native long LDKUpdateFailHTLC_optional_none();
// void LDKChannelMessageHandler_call_handle_error LDKChannelMessageHandler* arg, LDKPublicKey their_node_id, const LDKErrorMessage *msg
public static native void LDKChannelMessageHandler_call_handle_error(long arg, long their_node_id, long msg);
public static native long LDKChannelManagerReadArgs_optional_none();
+ public static native VecOrSliceDef LDKCVecTempl_ChannelMonitor_arr_info(long vec_ptr);
public static native long LDKDecodeError_optional_none();
public static native long LDKPing_optional_none();
public static native long LDKPong_optional_none();
public static native long LDKUnsignedChannelUpdate_optional_none();
public static native long LDKQueryChannelRange_optional_none();
public static native long LDKReplyChannelRange_optional_none();
+ public static native VecOrSliceDef LDKCVecTempl_u64_arr_info(long vec_ptr);
public static native long LDKQueryShortChannelIds_optional_none();
public static native long LDKReplyShortChannelIdsEnd_optional_none();
public static native long LDKGossipTimestampFilter_optional_none();
public static native long LDKLightningError_optional_none();
+ public static native VecOrSliceDef LDKCVecTempl_UpdateAddHTLC_arr_info(long vec_ptr);
+ public static native VecOrSliceDef LDKCVecTempl_UpdateFulfillHTLC_arr_info(long vec_ptr);
+ public static native VecOrSliceDef LDKCVecTempl_UpdateFailHTLC_arr_info(long vec_ptr);
+ public static native VecOrSliceDef LDKCVecTempl_UpdateFailMalformedHTLC_arr_info(long vec_ptr);
public static native boolean LDKCResult_boolLightningErrorZ_result_ok(long arg);
public static native long LDKCResult_boolLightningErrorZ_get_inner(long arg);
+ public static native VecOrSliceDef LDKCVecTempl_C3TupleTempl_ChannelAnnouncement__ChannelUpdate__ChannelUpdate_arr_info(long vec_ptr);
+ public static native VecOrSliceDef LDKCVecTempl_NodeAnnouncement_arr_info(long vec_ptr);
public interface LDKRoutingMessageHandler {
long handle_node_announcement(long msg);
long handle_channel_announcement(long msg);
// uint64_t LDKSocketDescriptor_call_hash LDKSocketDescriptor* arg
public static native long LDKSocketDescriptor_call_hash(long arg);
public static native long LDKPeerManager_optional_none();
+ public static native VecOrSliceDef LDKCVecTempl_PublicKey_arr_info(long vec_ptr);
public static native boolean LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok(long arg);
public static native long LDKCResult_CVec_u8ZPeerHandleErrorZ_get_inner(long arg);
public static native boolean LDKCResult_boolPeerHandleErrorZ_result_ok(long arg);
public static native long LDKTxCreationKeys_optional_none();
public static native boolean LDKCResult_TxCreationKeysSecpErrorZ_result_ok(long arg);
public static native long LDKCResult_TxCreationKeysSecpErrorZ_get_inner(long arg);
+ public static native VecOrSliceDef LDKCVecTempl_C2TupleTempl_HTLCOutputInCommitment__Signature_arr_info(long vec_ptr);
public static native long LDKRouteHop_optional_none();
+ public static native VecOrSliceDef LDKCVecTempl_RouteHop_arr_info(long vec_ptr);
+ public static native VecOrSliceDef LDKCVecTempl_CVecTempl_RouteHop_arr_info(long vec_ptr);
public static native long LDKRouteHint_optional_none();
public static native long LDKRoutingFees_optional_none();
public static native boolean LDKCResult_RouteLightningErrorZ_result_ok(long arg);
public static native long LDKCResult_RouteLightningErrorZ_get_inner(long arg);
public static native long LDKNetworkGraph_optional_none();
+ public static native VecOrSliceDef LDKCVecTempl_RouteHint_arr_info(long vec_ptr);
public static native long LDKLockedNetworkGraph_optional_none();
public static native long LDKNetGraphMsgHandler_optional_none();
public static native long LDKDirectionalChannelInfo_optional_none();
}
jmethodID ordinal_meth = NULL;
-JNIEXPORT void Java_org_ldk_impl_bindings_init(JNIEnv * env, jclass _b, jclass enum_class) {
+jmethodID slicedef_meth = NULL;
+jclass slicedef_cls = NULL;
+JNIEXPORT void Java_org_ldk_impl_bindings_init(JNIEnv * env, jclass _b, jclass enum_class, jclass slicedef_class) {
ordinal_meth = (*env)->GetMethodID(env, enum_class, "ordinal", "()I");
DO_ASSERT(ordinal_meth != NULL);
+ slicedef_meth = (*env)->GetMethodID(env, slicedef_class, "<init>", "(JJJ)V");
+ DO_ASSERT(slicedef_meth != NULL);
+ slicedef_cls = (*env)->NewGlobalRef(env, slicedef_class);
+ DO_ASSERT(slicedef_cls != NULL);
}
JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_deref_1bool (JNIEnv * env, jclass _a, jlong ptr) {
}
}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1u8_1arr_1info(JNIEnv *env, jclass _b, jlong ptr) {
+ LDKCVecTempl_u8 *vec = (LDKCVecTempl_u8*)ptr;
+ return (*env)->NewObject(env, slicedef_cls, slicedef_meth, (long)vec->data, (long)vec->datalen, sizeof(uint8_t));
+}
JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneChannelMonitorUpdateErrZ_1result_1ok (JNIEnv * env, jclass _a, jlong arg) {
return ((LDKCResult_NoneChannelMonitorUpdateErrZ*)arg)->result_ok;
}
ret->inner = NULL;
return (long)ret;
}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1TxOut_1arr_1info(JNIEnv *env, jclass _b, jlong ptr) {
+ LDKCVecTempl_TxOut *vec = (LDKCVecTempl_TxOut*)ptr;
+ return (*env)->NewObject(env, slicedef_cls, slicedef_meth, (long)vec->data, (long)vec->datalen, sizeof(LDKTxOut));
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1Signature_1arr_1info(JNIEnv *env, jclass _b, jlong ptr) {
+ LDKCVecTempl_Signature *vec = (LDKCVecTempl_Signature*)ptr;
+ return (*env)->NewObject(env, slicedef_cls, slicedef_meth, (long)vec->data, (long)vec->datalen, sizeof(LDKSignature));
+}
JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1result_1ok (JNIEnv * env, jclass _a, jlong arg) {
return ((LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)arg)->result_ok;
}
ret->inner = NULL;
return (long)ret;
}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1SpendableOutputDescriptor_1arr_1info(JNIEnv *env, jclass _b, jlong ptr) {
+ LDKCVecTempl_SpendableOutputDescriptor *vec = (LDKCVecTempl_SpendableOutputDescriptor*)ptr;
+ return (*env)->NewObject(env, slicedef_cls, slicedef_meth, (long)vec->data, (long)vec->datalen, sizeof(LDKSpendableOutputDescriptor));
+}
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKAcceptChannel_1optional_1none (JNIEnv * env, jclass _a) {
LDKAcceptChannel *ret = MALLOC(sizeof(LDKAcceptChannel), "LDKAcceptChannel");
ret->inner = NULL;
ret->inner = NULL;
return (long)ret;
}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1MessageSendEvent_1arr_1info(JNIEnv *env, jclass _b, jlong ptr) {
+ LDKCVecTempl_MessageSendEvent *vec = (LDKCVecTempl_MessageSendEvent*)ptr;
+ return (*env)->NewObject(env, slicedef_cls, slicedef_meth, (long)vec->data, (long)vec->datalen, sizeof(LDKMessageSendEvent));
+}
typedef struct LDKMessageSendEventsProvider_JCalls {
atomic_size_t refcnt;
JavaVM *vm;
return (long)ret;
}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1Event_1arr_1info(JNIEnv *env, jclass _b, jlong ptr) {
+ LDKCVecTempl_Event *vec = (LDKCVecTempl_Event*)ptr;
+ return (*env)->NewObject(env, slicedef_cls, slicedef_meth, (long)vec->data, (long)vec->datalen, sizeof(LDKEvent));
+}
typedef struct LDKEventsProvider_JCalls {
atomic_size_t refcnt;
JavaVM *vm;
ret->inner = NULL;
return (long)ret;
}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1HTLCOutputInCommitment_1arr_1info(JNIEnv *env, jclass _b, jlong ptr) {
+ LDKCVecTempl_HTLCOutputInCommitment *vec = (LDKCVecTempl_HTLCOutputInCommitment*)ptr;
+ return (*env)->NewObject(env, slicedef_cls, slicedef_meth, (long)vec->data, (long)vec->datalen, sizeof(LDKHTLCOutputInCommitment));
+}
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKHolderCommitmentTransaction_1optional_1none (JNIEnv * env, jclass _a) {
LDKHolderCommitmentTransaction *ret = MALLOC(sizeof(LDKHolderCommitmentTransaction), "LDKHolderCommitmentTransaction");
ret->inner = NULL;
ret->inner = NULL;
return (long)ret;
}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1MonitorEvent_1arr_1info(JNIEnv *env, jclass _b, jlong ptr) {
+ LDKCVecTempl_MonitorEvent *vec = (LDKCVecTempl_MonitorEvent*)ptr;
+ return (*env)->NewObject(env, slicedef_cls, slicedef_meth, (long)vec->data, (long)vec->datalen, sizeof(LDKMonitorEvent));
+}
typedef struct LDKWatch_JCalls {
atomic_size_t refcnt;
JavaVM *vm;
ret->inner = NULL;
return (long)ret;
}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1C2TupleTempl_1usize_1_1Transaction_1arr_1info(JNIEnv *env, jclass _b, jlong ptr) {
+ LDKCVecTempl_C2TupleTempl_usize__Transaction *vec = (LDKCVecTempl_C2TupleTempl_usize__Transaction*)ptr;
+ return (*env)->NewObject(env, slicedef_cls, slicedef_meth, (long)vec->data, (long)vec->datalen, sizeof(LDKC2TupleTempl_usize__Transaction));
+}
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKHTLCUpdate_1optional_1none (JNIEnv * env, jclass _a) {
LDKHTLCUpdate *ret = MALLOC(sizeof(LDKHTLCUpdate), "LDKHTLCUpdate");
ret->inner = NULL;
return (long)ret;
}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1Transaction_1arr_1info(JNIEnv *env, jclass _b, jlong ptr) {
+ LDKCVecTempl_Transaction *vec = (LDKCVecTempl_Transaction*)ptr;
+ return (*env)->NewObject(env, slicedef_cls, slicedef_meth, (long)vec->data, (long)vec->datalen, sizeof(LDKTransaction));
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1C2TupleTempl_1ThirtyTwoBytes_1_1CVecTempl_1TxOut_1arr_1info(JNIEnv *env, jclass _b, jlong ptr) {
+ LDKCVecTempl_C2TupleTempl_ThirtyTwoBytes__CVecTempl_TxOut *vec = (LDKCVecTempl_C2TupleTempl_ThirtyTwoBytes__CVecTempl_TxOut*)ptr;
+ return (*env)->NewObject(env, slicedef_cls, slicedef_meth, (long)vec->data, (long)vec->datalen, sizeof(LDKC2TupleTempl_ThirtyTwoBytes__CVecTempl_TxOut));
+}
typedef struct LDKKeysInterface_JCalls {
atomic_size_t refcnt;
JavaVM *vm;
ret->inner = NULL;
return (long)ret;
}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1ChannelDetails_1arr_1info(JNIEnv *env, jclass _b, jlong ptr) {
+ LDKCVecTempl_ChannelDetails *vec = (LDKCVecTempl_ChannelDetails*)ptr;
+ return (*env)->NewObject(env, slicedef_cls, slicedef_meth, (long)vec->data, (long)vec->datalen, sizeof(LDKChannelDetails));
+}
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKRoute_1optional_1none (JNIEnv * env, jclass _a) {
LDKRoute *ret = MALLOC(sizeof(LDKRoute), "LDKRoute");
ret->inner = NULL;
return (long)ret;
}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1NetAddress_1arr_1info(JNIEnv *env, jclass _b, jlong ptr) {
+ LDKCVecTempl_NetAddress *vec = (LDKCVecTempl_NetAddress*)ptr;
+ return (*env)->NewObject(env, slicedef_cls, slicedef_meth, (long)vec->data, (long)vec->datalen, sizeof(LDKNetAddress));
+}
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKUpdateAddHTLC_1optional_1none (JNIEnv * env, jclass _a) {
LDKUpdateAddHTLC *ret = MALLOC(sizeof(LDKUpdateAddHTLC), "LDKUpdateAddHTLC");
ret->inner = NULL;
ret->inner = NULL;
return (long)ret;
}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1ChannelMonitor_1arr_1info(JNIEnv *env, jclass _b, jlong ptr) {
+ LDKCVecTempl_ChannelMonitor *vec = (LDKCVecTempl_ChannelMonitor*)ptr;
+ return (*env)->NewObject(env, slicedef_cls, slicedef_meth, (long)vec->data, (long)vec->datalen, sizeof(LDKChannelMonitor));
+}
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKDecodeError_1optional_1none (JNIEnv * env, jclass _a) {
LDKDecodeError *ret = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
ret->inner = NULL;
ret->inner = NULL;
return (long)ret;
}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1u64_1arr_1info(JNIEnv *env, jclass _b, jlong ptr) {
+ LDKCVecTempl_u64 *vec = (LDKCVecTempl_u64*)ptr;
+ return (*env)->NewObject(env, slicedef_cls, slicedef_meth, (long)vec->data, (long)vec->datalen, sizeof(uint64_t));
+}
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKQueryShortChannelIds_1optional_1none (JNIEnv * env, jclass _a) {
LDKQueryShortChannelIds *ret = MALLOC(sizeof(LDKQueryShortChannelIds), "LDKQueryShortChannelIds");
ret->inner = NULL;
ret->inner = NULL;
return (long)ret;
}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1UpdateAddHTLC_1arr_1info(JNIEnv *env, jclass _b, jlong ptr) {
+ LDKCVecTempl_UpdateAddHTLC *vec = (LDKCVecTempl_UpdateAddHTLC*)ptr;
+ return (*env)->NewObject(env, slicedef_cls, slicedef_meth, (long)vec->data, (long)vec->datalen, sizeof(LDKUpdateAddHTLC));
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1UpdateFulfillHTLC_1arr_1info(JNIEnv *env, jclass _b, jlong ptr) {
+ LDKCVecTempl_UpdateFulfillHTLC *vec = (LDKCVecTempl_UpdateFulfillHTLC*)ptr;
+ return (*env)->NewObject(env, slicedef_cls, slicedef_meth, (long)vec->data, (long)vec->datalen, sizeof(LDKUpdateFulfillHTLC));
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1UpdateFailHTLC_1arr_1info(JNIEnv *env, jclass _b, jlong ptr) {
+ LDKCVecTempl_UpdateFailHTLC *vec = (LDKCVecTempl_UpdateFailHTLC*)ptr;
+ return (*env)->NewObject(env, slicedef_cls, slicedef_meth, (long)vec->data, (long)vec->datalen, sizeof(LDKUpdateFailHTLC));
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1UpdateFailMalformedHTLC_1arr_1info(JNIEnv *env, jclass _b, jlong ptr) {
+ LDKCVecTempl_UpdateFailMalformedHTLC *vec = (LDKCVecTempl_UpdateFailMalformedHTLC*)ptr;
+ return (*env)->NewObject(env, slicedef_cls, slicedef_meth, (long)vec->data, (long)vec->datalen, sizeof(LDKUpdateFailMalformedHTLC));
+}
JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolLightningErrorZ_1result_1ok (JNIEnv * env, jclass _a, jlong arg) {
return ((LDKCResult_boolLightningErrorZ*)arg)->result_ok;
}
return (long)((LDKCResult_boolLightningErrorZ*)arg)->contents.err;
}
}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1C3TupleTempl_1ChannelAnnouncement_1_1ChannelUpdate_1_1ChannelUpdate_1arr_1info(JNIEnv *env, jclass _b, jlong ptr) {
+ LDKCVecTempl_C3TupleTempl_ChannelAnnouncement__ChannelUpdate__ChannelUpdate *vec = (LDKCVecTempl_C3TupleTempl_ChannelAnnouncement__ChannelUpdate__ChannelUpdate*)ptr;
+ return (*env)->NewObject(env, slicedef_cls, slicedef_meth, (long)vec->data, (long)vec->datalen, sizeof(LDKC3TupleTempl_ChannelAnnouncement__ChannelUpdate__ChannelUpdate));
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1NodeAnnouncement_1arr_1info(JNIEnv *env, jclass _b, jlong ptr) {
+ LDKCVecTempl_NodeAnnouncement *vec = (LDKCVecTempl_NodeAnnouncement*)ptr;
+ return (*env)->NewObject(env, slicedef_cls, slicedef_meth, (long)vec->data, (long)vec->datalen, sizeof(LDKNodeAnnouncement));
+}
typedef struct LDKRoutingMessageHandler_JCalls {
atomic_size_t refcnt;
JavaVM *vm;
ret->inner = NULL;
return (long)ret;
}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1PublicKey_1arr_1info(JNIEnv *env, jclass _b, jlong ptr) {
+ LDKCVecTempl_PublicKey *vec = (LDKCVecTempl_PublicKey*)ptr;
+ return (*env)->NewObject(env, slicedef_cls, slicedef_meth, (long)vec->data, (long)vec->datalen, sizeof(LDKPublicKey));
+}
JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1u8ZPeerHandleErrorZ_1result_1ok (JNIEnv * env, jclass _a, jlong arg) {
return ((LDKCResult_CVec_u8ZPeerHandleErrorZ*)arg)->result_ok;
}
return (long)((LDKCResult_TxCreationKeysSecpErrorZ*)arg)->contents.err;
}
}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1C2TupleTempl_1HTLCOutputInCommitment_1_1Signature_1arr_1info(JNIEnv *env, jclass _b, jlong ptr) {
+ LDKCVecTempl_C2TupleTempl_HTLCOutputInCommitment__Signature *vec = (LDKCVecTempl_C2TupleTempl_HTLCOutputInCommitment__Signature*)ptr;
+ return (*env)->NewObject(env, slicedef_cls, slicedef_meth, (long)vec->data, (long)vec->datalen, sizeof(LDKC2TupleTempl_HTLCOutputInCommitment__Signature));
+}
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKRouteHop_1optional_1none (JNIEnv * env, jclass _a) {
LDKRouteHop *ret = MALLOC(sizeof(LDKRouteHop), "LDKRouteHop");
ret->inner = NULL;
return (long)ret;
}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1RouteHop_1arr_1info(JNIEnv *env, jclass _b, jlong ptr) {
+ LDKCVecTempl_RouteHop *vec = (LDKCVecTempl_RouteHop*)ptr;
+ return (*env)->NewObject(env, slicedef_cls, slicedef_meth, (long)vec->data, (long)vec->datalen, sizeof(LDKRouteHop));
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1CVecTempl_1RouteHop_1arr_1info(JNIEnv *env, jclass _b, jlong ptr) {
+ LDKCVecTempl_CVecTempl_RouteHop *vec = (LDKCVecTempl_CVecTempl_RouteHop*)ptr;
+ return (*env)->NewObject(env, slicedef_cls, slicedef_meth, (long)vec->data, (long)vec->datalen, sizeof(LDKCVecTempl_RouteHop));
+}
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKRouteHint_1optional_1none (JNIEnv * env, jclass _a) {
LDKRouteHint *ret = MALLOC(sizeof(LDKRouteHint), "LDKRouteHint");
ret->inner = NULL;
ret->inner = NULL;
return (long)ret;
}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1RouteHint_1arr_1info(JNIEnv *env, jclass _b, jlong ptr) {
+ LDKCVecTempl_RouteHint *vec = (LDKCVecTempl_RouteHint*)ptr;
+ return (*env)->NewObject(env, slicedef_cls, slicedef_meth, (long)vec->data, (long)vec->datalen, sizeof(LDKRouteHint));
+}
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKLockedNetworkGraph_1optional_1none (JNIEnv * env, jclass _a) {
LDKLockedNetworkGraph *ret = MALLOC(sizeof(LDKLockedNetworkGraph), "LDKLockedNetworkGraph");
ret->inner = NULL;
/*
* Class: org_ldk_impl_bindings
* Method: init
- * Signature: (Ljava/lang/Class;)V
+ * Signature: (Ljava/lang/Class;Ljava/lang/Class;)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_init
- (JNIEnv *, jclass, jclass);
+ (JNIEnv *, jclass, jclass, jclass);
/*
* Class: org_ldk_impl_bindings
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKSecretKey_1new
(JNIEnv *, jclass);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKCVecTempl_u8_arr_info
+ * Signature: (J)Lorg/ldk/impl/bindings/VecOrSliceDef;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1u8_1arr_1info
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: LDKCResult_NoneChannelMonitorUpdateErrZ_result_ok
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKOutPoint_1optional_1none
(JNIEnv *, jclass);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKCVecTempl_TxOut_arr_info
+ * Signature: (J)Lorg/ldk/impl/bindings/VecOrSliceDef;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1TxOut_1arr_1info
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKCVecTempl_Signature_arr_info
+ * Signature: (J)Lorg/ldk/impl/bindings/VecOrSliceDef;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1Signature_1arr_1info
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_result_ok
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKHTLCOutputInCommitment_1optional_1none
(JNIEnv *, jclass);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKCVecTempl_SpendableOutputDescriptor_arr_info
+ * Signature: (J)Lorg/ldk/impl/bindings/VecOrSliceDef;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1SpendableOutputDescriptor_1arr_1info
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: LDKAcceptChannel_optional_none
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKErrorMessage_1optional_1none
(JNIEnv *, jclass);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKCVecTempl_MessageSendEvent_arr_info
+ * Signature: (J)Lorg/ldk/impl/bindings/VecOrSliceDef;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1MessageSendEvent_1arr_1info
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: LDKMessageSendEventsProvider_new
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKMessageSendEventsProvider_1call_1get_1and_1clear_1pending_1msg_1events
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKCVecTempl_Event_arr_info
+ * Signature: (J)Lorg/ldk/impl/bindings/VecOrSliceDef;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1Event_1arr_1info
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: LDKEventsProvider_new
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKPreCalculatedTxCreationKeys_1optional_1none
(JNIEnv *, jclass);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKCVecTempl_HTLCOutputInCommitment_arr_info
+ * Signature: (J)Lorg/ldk/impl/bindings/VecOrSliceDef;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1HTLCOutputInCommitment_1arr_1info
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: LDKHolderCommitmentTransaction_optional_none
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKMonitorEvent_1optional_1none
(JNIEnv *, jclass);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKCVecTempl_MonitorEvent_arr_info
+ * Signature: (J)Lorg/ldk/impl/bindings/VecOrSliceDef;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1MonitorEvent_1arr_1info
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: LDKWatch_new
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKChainMonitor_1optional_1none
(JNIEnv *, jclass);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKCVecTempl_C2TupleTempl_usize__Transaction_arr_info
+ * Signature: (J)Lorg/ldk/impl/bindings/VecOrSliceDef;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1C2TupleTempl_1usize_1_1Transaction_1arr_1info
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: LDKHTLCUpdate_optional_none
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKHTLCUpdate_1optional_1none
(JNIEnv *, jclass);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKCVecTempl_Transaction_arr_info
+ * Signature: (J)Lorg/ldk/impl/bindings/VecOrSliceDef;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1Transaction_1arr_1info
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKCVecTempl_C2TupleTempl_ThirtyTwoBytes__CVecTempl_TxOut_arr_info
+ * Signature: (J)Lorg/ldk/impl/bindings/VecOrSliceDef;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1C2TupleTempl_1ThirtyTwoBytes_1_1CVecTempl_1TxOut_1arr_1info
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: LDKKeysInterface_new
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKInitFeatures_1optional_1none
(JNIEnv *, jclass);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKCVecTempl_ChannelDetails_arr_info
+ * Signature: (J)Lorg/ldk/impl/bindings/VecOrSliceDef;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1ChannelDetails_1arr_1info
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: LDKRoute_optional_none
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKRoute_1optional_1none
(JNIEnv *, jclass);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKCVecTempl_NetAddress_arr_info
+ * Signature: (J)Lorg/ldk/impl/bindings/VecOrSliceDef;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1NetAddress_1arr_1info
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: LDKUpdateAddHTLC_optional_none
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKChannelManagerReadArgs_1optional_1none
(JNIEnv *, jclass);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKCVecTempl_ChannelMonitor_arr_info
+ * Signature: (J)Lorg/ldk/impl/bindings/VecOrSliceDef;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1ChannelMonitor_1arr_1info
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: LDKDecodeError_optional_none
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKReplyChannelRange_1optional_1none
(JNIEnv *, jclass);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKCVecTempl_u64_arr_info
+ * Signature: (J)Lorg/ldk/impl/bindings/VecOrSliceDef;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1u64_1arr_1info
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: LDKQueryShortChannelIds_optional_none
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKLightningError_1optional_1none
(JNIEnv *, jclass);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKCVecTempl_UpdateAddHTLC_arr_info
+ * Signature: (J)Lorg/ldk/impl/bindings/VecOrSliceDef;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1UpdateAddHTLC_1arr_1info
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKCVecTempl_UpdateFulfillHTLC_arr_info
+ * Signature: (J)Lorg/ldk/impl/bindings/VecOrSliceDef;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1UpdateFulfillHTLC_1arr_1info
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKCVecTempl_UpdateFailHTLC_arr_info
+ * Signature: (J)Lorg/ldk/impl/bindings/VecOrSliceDef;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1UpdateFailHTLC_1arr_1info
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKCVecTempl_UpdateFailMalformedHTLC_arr_info
+ * Signature: (J)Lorg/ldk/impl/bindings/VecOrSliceDef;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1UpdateFailMalformedHTLC_1arr_1info
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: LDKCResult_boolLightningErrorZ_result_ok
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolLightningErrorZ_1get_1inner
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKCVecTempl_C3TupleTempl_ChannelAnnouncement__ChannelUpdate__ChannelUpdate_arr_info
+ * Signature: (J)Lorg/ldk/impl/bindings/VecOrSliceDef;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1C3TupleTempl_1ChannelAnnouncement_1_1ChannelUpdate_1_1ChannelUpdate_1arr_1info
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKCVecTempl_NodeAnnouncement_arr_info
+ * Signature: (J)Lorg/ldk/impl/bindings/VecOrSliceDef;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1NodeAnnouncement_1arr_1info
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: LDKRoutingMessageHandler_new
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKPeerManager_1optional_1none
(JNIEnv *, jclass);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKCVecTempl_PublicKey_arr_info
+ * Signature: (J)Lorg/ldk/impl/bindings/VecOrSliceDef;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1PublicKey_1arr_1info
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxCreationKeysSecpErrorZ_1get_1inner
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKCVecTempl_C2TupleTempl_HTLCOutputInCommitment__Signature_arr_info
+ * Signature: (J)Lorg/ldk/impl/bindings/VecOrSliceDef;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1C2TupleTempl_1HTLCOutputInCommitment_1_1Signature_1arr_1info
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: LDKRouteHop_optional_none
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKRouteHop_1optional_1none
(JNIEnv *, jclass);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKCVecTempl_RouteHop_arr_info
+ * Signature: (J)Lorg/ldk/impl/bindings/VecOrSliceDef;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1RouteHop_1arr_1info
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKCVecTempl_CVecTempl_RouteHop_arr_info
+ * Signature: (J)Lorg/ldk/impl/bindings/VecOrSliceDef;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1CVecTempl_1RouteHop_1arr_1info
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: LDKRouteHint_optional_none
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKNetworkGraph_1optional_1none
(JNIEnv *, jclass);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKCVecTempl_RouteHint_arr_info
+ * Signature: (J)Lorg/ldk/impl/bindings/VecOrSliceDef;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCVecTempl_1RouteHint_1arr_1info
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: LDKLockedNetworkGraph_optional_none
final long keys_interface;
final long config;
final long chan_manager;
+ final long chan_manager_events;
final long chan_handler;
final long router;
final long route_handler;
this.keys_interface = bindings.KeysManager_as_KeysInterface(keys);
this.config = bindings.UserConfig_default();
this.chan_manager = bindings.ChannelManager_new(bindings.LDKNetwork.LDKNetwork_Bitcoin, fee_estimator, chain_monitor, tx_broadcaster, logger, keys_interface, config, 1);
+ this.chan_manager_events = bindings.ChannelManager_as_EventsProvider(chan_manager);
this.chan_handler = bindings.ChannelManager_as_ChannelMessageHandler(chan_manager);
this.router = bindings.NetGraphMsgHandler_new(0, logger);
bindings.KeysManager_free(keys);
bindings.KeysInterface_free(keys_interface);
bindings.ChannelManager_free(chan_manager);
+ bindings.EventsProvider_free(chan_manager_events);
bindings.ChannelMessageHandler_free(chan_handler);
bindings.NetGraphMsgHandler_free(router);
bindings.RoutingMessageHandler_free(route_handler);
bindings.PeerManager_process_events(peer2.peer_manager);
while (!list.isEmpty()) { list.poll().join(); }
+ long events = bindings.LDKEventsProvider_call_get_and_clear_pending_events(peer1.chan_manager_events);
+ bindings.VecOrSliceDef events_arr_info = bindings.LDKCVecTempl_Event_arr_info(events);
+ assert events_arr_info.datalen == 1;
+ bindings.CVec_EventZ_free(events);
+
long peer1_chans = bindings.ChannelManager_list_channels(peer1.chan_manager);
long peer2_chans = bindings.ChannelManager_list_channels(peer2.chan_manager);
assert bindings.vec_slice_len(peer1_chans) == 1;