- LDKCResult_boolPeerHandleErrorZ* ret = MALLOC(sizeof(LDKCResult_boolPeerHandleErrorZ), "LDKCResult_boolPeerHandleErrorZ");
- *ret = CResult_boolPeerHandleErrorZ_ok(arg);
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1HTLCOutputInCommitmentSignatureZZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ arg_conv = *(LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ*)arg;
- FREE((void*)arg);
- return CVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1TxidCVec_1TxOutZZZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_C2Tuple_TxidCVec_TxOutZZZ arg_conv = *(LDKCVec_C2Tuple_TxidCVec_TxOutZZZ*)arg;
- FREE((void*)arg);
- return CVec_C2Tuple_TxidCVec_TxOutZZZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1usizeTransactionZZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_C2Tuple_usizeTransactionZZ arg_conv = *(LDKCVec_C2Tuple_usizeTransactionZZ*)arg;
- FREE((void*)arg);
- return CVec_C2Tuple_usizeTransactionZZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ arg_conv = *(LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ*)arg;
- FREE((void*)arg);
- return CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1CVec_1RouteHopZZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_CVec_RouteHopZZ arg_conv = *(LDKCVec_CVec_RouteHopZZ*)arg;
- FREE((void*)arg);
- return CVec_CVec_RouteHopZZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ChannelDetailsZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_ChannelDetailsZ arg_conv = *(LDKCVec_ChannelDetailsZ*)arg;
- FREE((void*)arg);
- return CVec_ChannelDetailsZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ChannelMonitorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_ChannelMonitorZ arg_conv = *(LDKCVec_ChannelMonitorZ*)arg;
- FREE((void*)arg);
- return CVec_ChannelMonitorZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1EventZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_EventZ arg_conv = *(LDKCVec_EventZ*)arg;
- FREE((void*)arg);
- return CVec_EventZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1HTLCOutputInCommitmentZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_HTLCOutputInCommitmentZ arg_conv = *(LDKCVec_HTLCOutputInCommitmentZ*)arg;
- FREE((void*)arg);
- return CVec_HTLCOutputInCommitmentZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1MessageSendEventZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_MessageSendEventZ arg_conv = *(LDKCVec_MessageSendEventZ*)arg;
- FREE((void*)arg);
- return CVec_MessageSendEventZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1MonitorEventZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_MonitorEventZ arg_conv = *(LDKCVec_MonitorEventZ*)arg;
- FREE((void*)arg);
- return CVec_MonitorEventZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1NetAddressZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_NetAddressZ arg_conv = *(LDKCVec_NetAddressZ*)arg;
- FREE((void*)arg);
- return CVec_NetAddressZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1NodeAnnouncementZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_NodeAnnouncementZ arg_conv = *(LDKCVec_NodeAnnouncementZ*)arg;
- FREE((void*)arg);
- return CVec_NodeAnnouncementZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1PublicKeyZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_PublicKeyZ arg_conv = *(LDKCVec_PublicKeyZ*)arg;
- FREE((void*)arg);
- return CVec_PublicKeyZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1RouteHintZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_RouteHintZ arg_conv = *(LDKCVec_RouteHintZ*)arg;
- FREE((void*)arg);
- return CVec_RouteHintZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1RouteHopZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_RouteHopZ arg_conv = *(LDKCVec_RouteHopZ*)arg;
- FREE((void*)arg);
- return CVec_RouteHopZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1SignatureZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_SignatureZ arg_conv = *(LDKCVec_SignatureZ*)arg;
- FREE((void*)arg);
- return CVec_SignatureZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1SpendableOutputDescriptorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_SpendableOutputDescriptorZ arg_conv = *(LDKCVec_SpendableOutputDescriptorZ*)arg;
- FREE((void*)arg);
- return CVec_SpendableOutputDescriptorZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TransactionZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_TransactionZ arg_conv = *(LDKCVec_TransactionZ*)arg;
- FREE((void*)arg);
- return CVec_TransactionZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TxOutZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_TxOutZ arg_conv = *(LDKCVec_TxOutZ*)arg;
- FREE((void*)arg);
- return CVec_TxOutZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateAddHTLCZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_UpdateAddHTLCZ arg_conv = *(LDKCVec_UpdateAddHTLCZ*)arg;
- FREE((void*)arg);
- return CVec_UpdateAddHTLCZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateFailHTLCZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_UpdateFailHTLCZ arg_conv = *(LDKCVec_UpdateFailHTLCZ*)arg;
- FREE((void*)arg);
- return CVec_UpdateFailHTLCZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateFailMalformedHTLCZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_UpdateFailMalformedHTLCZ arg_conv = *(LDKCVec_UpdateFailMalformedHTLCZ*)arg;
- FREE((void*)arg);
- return CVec_UpdateFailMalformedHTLCZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateFulfillHTLCZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_UpdateFulfillHTLCZ arg_conv = *(LDKCVec_UpdateFulfillHTLCZ*)arg;
- FREE((void*)arg);
- return CVec_UpdateFulfillHTLCZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u64Z_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_u64Z arg_conv = *(LDKCVec_u64Z*)arg;
- FREE((void*)arg);
- return CVec_u64Z_free(arg_conv);
+ LDKCResult_boolPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolPeerHandleErrorZ), "LDKCResult_boolPeerHandleErrorZ");
+ *ret_conv = CResult_boolPeerHandleErrorZ_ok(arg);
+ return (long)ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1HTLCOutputInCommitmentSignatureZZ_1free(JNIEnv * _env, jclass _b, jlongArray arg) {
+ LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ arg_constr;
+ arg_constr.datalen = (*_env)->GetArrayLength (_env, arg);
+ if (arg_constr.datalen > 0)
+ arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKC2Tuple_HTLCOutputInCommitmentSignatureZ), "LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ Elements");
+ else
+ arg_constr.data = NULL;
+ long* arg_vals = (*_env)->GetLongArrayElements (_env, arg, NULL);
+ for (size_t q = 0; q < arg_constr.datalen; q++) {
+ long arr_conv_42 = arg_vals[q];
+ LDKC2Tuple_HTLCOutputInCommitmentSignatureZ arr_conv_42_conv = *(LDKC2Tuple_HTLCOutputInCommitmentSignatureZ*)arr_conv_42;
+ FREE((void*)arr_conv_42);
+ arg_constr.data[q] = arr_conv_42_conv;
+ }
+ (*_env)->ReleaseLongArrayElements (_env, arg, arg_vals, 0);
+ CVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ_free(arg_constr);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1TxidCVec_1TxOutZZZ_1free(JNIEnv * _env, jclass _b, jlongArray arg) {
+ LDKCVec_C2Tuple_TxidCVec_TxOutZZZ arg_constr;
+ arg_constr.datalen = (*_env)->GetArrayLength (_env, arg);
+ if (arg_constr.datalen > 0)
+ arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKC2Tuple_TxidCVec_TxOutZZ), "LDKCVec_C2Tuple_TxidCVec_TxOutZZZ Elements");
+ else
+ arg_constr.data = NULL;
+ long* arg_vals = (*_env)->GetLongArrayElements (_env, arg, NULL);
+ for (size_t b = 0; b < arg_constr.datalen; b++) {
+ long arr_conv_27 = arg_vals[b];
+ LDKC2Tuple_TxidCVec_TxOutZZ arr_conv_27_conv = *(LDKC2Tuple_TxidCVec_TxOutZZ*)arr_conv_27;
+ FREE((void*)arr_conv_27);
+ arg_constr.data[b] = arr_conv_27_conv;
+ }
+ (*_env)->ReleaseLongArrayElements (_env, arg, arg_vals, 0);
+ CVec_C2Tuple_TxidCVec_TxOutZZZ_free(arg_constr);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1usizeTransactionZZ_1free(JNIEnv * _env, jclass _b, jlongArray arg) {
+ LDKCVec_C2Tuple_usizeTransactionZZ arg_constr;
+ arg_constr.datalen = (*_env)->GetArrayLength (_env, arg);
+ if (arg_constr.datalen > 0)
+ arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKC2Tuple_usizeTransactionZ), "LDKCVec_C2Tuple_usizeTransactionZZ Elements");
+ else
+ arg_constr.data = NULL;
+ long* arg_vals = (*_env)->GetLongArrayElements (_env, arg, NULL);
+ for (size_t y = 0; y < arg_constr.datalen; y++) {
+ long arr_conv_24 = arg_vals[y];
+ LDKC2Tuple_usizeTransactionZ arr_conv_24_conv = *(LDKC2Tuple_usizeTransactionZ*)arr_conv_24;
+ FREE((void*)arr_conv_24);
+ arg_constr.data[y] = arr_conv_24_conv;
+ }
+ (*_env)->ReleaseLongArrayElements (_env, arg, arg_vals, 0);
+ CVec_C2Tuple_usizeTransactionZZ_free(arg_constr);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZZ_1free(JNIEnv * _env, jclass _b, jlongArray arg) {
+ LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ arg_constr;
+ arg_constr.datalen = (*_env)->GetArrayLength (_env, arg);
+ if (arg_constr.datalen > 0)
+ arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ Elements");
+ else
+ arg_constr.data = NULL;
+ long* arg_vals = (*_env)->GetLongArrayElements (_env, arg, NULL);
+ for (size_t l = 0; l < arg_constr.datalen; l++) {
+ long arr_conv_63 = arg_vals[l];
+ LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ arr_conv_63_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)arr_conv_63;
+ FREE((void*)arr_conv_63);
+ arg_constr.data[l] = arr_conv_63_conv;
+ }
+ (*_env)->ReleaseLongArrayElements (_env, arg, arg_vals, 0);
+ CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(arg_constr);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1CVec_1RouteHopZZ_1free(JNIEnv * _env, jclass _b, jobjectArray arg) {
+ LDKCVec_CVec_RouteHopZZ arg_constr;
+ arg_constr.datalen = (*_env)->GetArrayLength (_env, arg);
+ if (arg_constr.datalen > 0)
+ arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKCVec_RouteHopZ), "LDKCVec_CVec_RouteHopZZ Elements");
+ else
+ arg_constr.data = NULL;
+ for (size_t m = 0; m < arg_constr.datalen; m++) {
+ jobject arr_conv_12 = (*_env)->GetObjectArrayElement(_env, arg, m);
+ LDKCVec_RouteHopZ arr_conv_12_constr;
+ arr_conv_12_constr.datalen = (*_env)->GetArrayLength (_env, arr_conv_12);
+ if (arr_conv_12_constr.datalen > 0)
+ arr_conv_12_constr.data = MALLOC(arr_conv_12_constr.datalen * sizeof(LDKRouteHop), "LDKCVec_RouteHopZ Elements");
+ else
+ arr_conv_12_constr.data = NULL;
+ long* arr_conv_12_vals = (*_env)->GetLongArrayElements (_env, arr_conv_12, NULL);
+ for (size_t k = 0; k < arr_conv_12_constr.datalen; k++) {
+ long arr_conv_10 = arr_conv_12_vals[k];
+ LDKRouteHop arr_conv_10_conv;
+ arr_conv_10_conv.inner = (void*)(arr_conv_10 & (~1));
+ arr_conv_10_conv.is_owned = (arr_conv_10 & 1) || (arr_conv_10 == 0);
+ arr_conv_12_constr.data[k] = arr_conv_10_conv;
+ }
+ (*_env)->ReleaseLongArrayElements (_env, arr_conv_12, arr_conv_12_vals, 0);
+ arg_constr.data[m] = arr_conv_12_constr;
+ }
+ CVec_CVec_RouteHopZZ_free(arg_constr);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ChannelDetailsZ_1free(JNIEnv * _env, jclass _b, jlongArray arg) {
+ LDKCVec_ChannelDetailsZ arg_constr;
+ arg_constr.datalen = (*_env)->GetArrayLength (_env, arg);
+ if (arg_constr.datalen > 0)
+ arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKChannelDetails), "LDKCVec_ChannelDetailsZ Elements");
+ else
+ arg_constr.data = NULL;
+ long* arg_vals = (*_env)->GetLongArrayElements (_env, arg, NULL);
+ for (size_t q = 0; q < arg_constr.datalen; q++) {
+ long arr_conv_16 = arg_vals[q];
+ LDKChannelDetails arr_conv_16_conv;
+ arr_conv_16_conv.inner = (void*)(arr_conv_16 & (~1));
+ arr_conv_16_conv.is_owned = (arr_conv_16 & 1) || (arr_conv_16 == 0);
+ arg_constr.data[q] = arr_conv_16_conv;
+ }
+ (*_env)->ReleaseLongArrayElements (_env, arg, arg_vals, 0);
+ CVec_ChannelDetailsZ_free(arg_constr);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ChannelMonitorZ_1free(JNIEnv * _env, jclass _b, jlongArray arg) {
+ LDKCVec_ChannelMonitorZ arg_constr;
+ arg_constr.datalen = (*_env)->GetArrayLength (_env, arg);
+ if (arg_constr.datalen > 0)
+ arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKChannelMonitor), "LDKCVec_ChannelMonitorZ Elements");
+ else
+ arg_constr.data = NULL;
+ long* arg_vals = (*_env)->GetLongArrayElements (_env, arg, NULL);
+ for (size_t q = 0; q < arg_constr.datalen; q++) {
+ long arr_conv_16 = arg_vals[q];
+ LDKChannelMonitor arr_conv_16_conv;
+ arr_conv_16_conv.inner = (void*)(arr_conv_16 & (~1));
+ arr_conv_16_conv.is_owned = (arr_conv_16 & 1) || (arr_conv_16 == 0);
+ arg_constr.data[q] = arr_conv_16_conv;
+ }
+ (*_env)->ReleaseLongArrayElements (_env, arg, arg_vals, 0);
+ CVec_ChannelMonitorZ_free(arg_constr);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1EventZ_1free(JNIEnv * _env, jclass _b, jlongArray arg) {
+ LDKCVec_EventZ arg_constr;
+ arg_constr.datalen = (*_env)->GetArrayLength (_env, arg);
+ if (arg_constr.datalen > 0)
+ arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKEvent), "LDKCVec_EventZ Elements");
+ else
+ arg_constr.data = NULL;
+ long* arg_vals = (*_env)->GetLongArrayElements (_env, arg, NULL);
+ for (size_t h = 0; h < arg_constr.datalen; h++) {
+ long arr_conv_7 = arg_vals[h];
+ LDKEvent arr_conv_7_conv = *(LDKEvent*)arr_conv_7;
+ FREE((void*)arr_conv_7);
+ arg_constr.data[h] = arr_conv_7_conv;
+ }
+ (*_env)->ReleaseLongArrayElements (_env, arg, arg_vals, 0);
+ CVec_EventZ_free(arg_constr);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1HTLCOutputInCommitmentZ_1free(JNIEnv * _env, jclass _b, jlongArray arg) {
+ LDKCVec_HTLCOutputInCommitmentZ arg_constr;
+ arg_constr.datalen = (*_env)->GetArrayLength (_env, arg);
+ if (arg_constr.datalen > 0)
+ arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKHTLCOutputInCommitment), "LDKCVec_HTLCOutputInCommitmentZ Elements");
+ else
+ arg_constr.data = NULL;
+ long* arg_vals = (*_env)->GetLongArrayElements (_env, arg, NULL);
+ for (size_t y = 0; y < arg_constr.datalen; y++) {
+ long arr_conv_24 = arg_vals[y];
+ LDKHTLCOutputInCommitment arr_conv_24_conv;
+ arr_conv_24_conv.inner = (void*)(arr_conv_24 & (~1));
+ arr_conv_24_conv.is_owned = (arr_conv_24 & 1) || (arr_conv_24 == 0);
+ arg_constr.data[y] = arr_conv_24_conv;
+ }
+ (*_env)->ReleaseLongArrayElements (_env, arg, arg_vals, 0);
+ CVec_HTLCOutputInCommitmentZ_free(arg_constr);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1MessageSendEventZ_1free(JNIEnv * _env, jclass _b, jlongArray arg) {
+ LDKCVec_MessageSendEventZ arg_constr;
+ arg_constr.datalen = (*_env)->GetArrayLength (_env, arg);
+ if (arg_constr.datalen > 0)
+ arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKMessageSendEvent), "LDKCVec_MessageSendEventZ Elements");
+ else
+ arg_constr.data = NULL;
+ long* arg_vals = (*_env)->GetLongArrayElements (_env, arg, NULL);
+ for (size_t s = 0; s < arg_constr.datalen; s++) {
+ long arr_conv_18 = arg_vals[s];
+ LDKMessageSendEvent arr_conv_18_conv = *(LDKMessageSendEvent*)arr_conv_18;
+ FREE((void*)arr_conv_18);
+ arg_constr.data[s] = arr_conv_18_conv;
+ }
+ (*_env)->ReleaseLongArrayElements (_env, arg, arg_vals, 0);
+ CVec_MessageSendEventZ_free(arg_constr);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1MonitorEventZ_1free(JNIEnv * _env, jclass _b, jlongArray arg) {
+ LDKCVec_MonitorEventZ arg_constr;
+ arg_constr.datalen = (*_env)->GetArrayLength (_env, arg);
+ if (arg_constr.datalen > 0)
+ arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKMonitorEvent), "LDKCVec_MonitorEventZ Elements");
+ else
+ arg_constr.data = NULL;
+ long* arg_vals = (*_env)->GetLongArrayElements (_env, arg, NULL);
+ for (size_t o = 0; o < arg_constr.datalen; o++) {
+ long arr_conv_14 = arg_vals[o];
+ LDKMonitorEvent arr_conv_14_conv;
+ arr_conv_14_conv.inner = (void*)(arr_conv_14 & (~1));
+ arr_conv_14_conv.is_owned = (arr_conv_14 & 1) || (arr_conv_14 == 0);
+ arg_constr.data[o] = arr_conv_14_conv;
+ }
+ (*_env)->ReleaseLongArrayElements (_env, arg, arg_vals, 0);
+ CVec_MonitorEventZ_free(arg_constr);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1NetAddressZ_1free(JNIEnv * _env, jclass _b, jlongArray arg) {
+ LDKCVec_NetAddressZ arg_constr;
+ arg_constr.datalen = (*_env)->GetArrayLength (_env, arg);
+ if (arg_constr.datalen > 0)
+ arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKNetAddress), "LDKCVec_NetAddressZ Elements");
+ else
+ arg_constr.data = NULL;
+ long* arg_vals = (*_env)->GetLongArrayElements (_env, arg, NULL);
+ for (size_t m = 0; m < arg_constr.datalen; m++) {
+ long arr_conv_12 = arg_vals[m];
+ LDKNetAddress arr_conv_12_conv = *(LDKNetAddress*)arr_conv_12;
+ FREE((void*)arr_conv_12);
+ arg_constr.data[m] = arr_conv_12_conv;
+ }
+ (*_env)->ReleaseLongArrayElements (_env, arg, arg_vals, 0);
+ CVec_NetAddressZ_free(arg_constr);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1NodeAnnouncementZ_1free(JNIEnv * _env, jclass _b, jlongArray arg) {
+ LDKCVec_NodeAnnouncementZ arg_constr;
+ arg_constr.datalen = (*_env)->GetArrayLength (_env, arg);
+ if (arg_constr.datalen > 0)
+ arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKNodeAnnouncement), "LDKCVec_NodeAnnouncementZ Elements");
+ else
+ arg_constr.data = NULL;
+ long* arg_vals = (*_env)->GetLongArrayElements (_env, arg, NULL);
+ for (size_t s = 0; s < arg_constr.datalen; s++) {
+ long arr_conv_18 = arg_vals[s];
+ LDKNodeAnnouncement arr_conv_18_conv;
+ arr_conv_18_conv.inner = (void*)(arr_conv_18 & (~1));
+ arr_conv_18_conv.is_owned = (arr_conv_18 & 1) || (arr_conv_18 == 0);
+ arg_constr.data[s] = arr_conv_18_conv;
+ }
+ (*_env)->ReleaseLongArrayElements (_env, arg, arg_vals, 0);
+ CVec_NodeAnnouncementZ_free(arg_constr);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1PublicKeyZ_1free(JNIEnv * _env, jclass _b, jobjectArray arg) {
+ LDKCVec_PublicKeyZ arg_constr;
+ arg_constr.datalen = (*_env)->GetArrayLength (_env, arg);
+ if (arg_constr.datalen > 0)
+ arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKPublicKey), "LDKCVec_PublicKeyZ Elements");
+ else
+ arg_constr.data = NULL;
+ for (size_t i = 0; i < arg_constr.datalen; i++) {
+ jobject arr_conv_8 = (*_env)->GetObjectArrayElement(_env, arg, i);
+ LDKPublicKey arr_conv_8_ref;
+ CHECK((*_env)->GetArrayLength (_env, arr_conv_8) == 33);
+ (*_env)->GetByteArrayRegion (_env, arr_conv_8, 0, 33, arr_conv_8_ref.compressed_form);
+ arg_constr.data[i] = arr_conv_8_ref;
+ }
+ CVec_PublicKeyZ_free(arg_constr);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1RouteHintZ_1free(JNIEnv * _env, jclass _b, jlongArray arg) {
+ LDKCVec_RouteHintZ arg_constr;
+ arg_constr.datalen = (*_env)->GetArrayLength (_env, arg);
+ if (arg_constr.datalen > 0)
+ arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKRouteHint), "LDKCVec_RouteHintZ Elements");
+ else
+ arg_constr.data = NULL;
+ long* arg_vals = (*_env)->GetLongArrayElements (_env, arg, NULL);
+ for (size_t l = 0; l < arg_constr.datalen; l++) {
+ long arr_conv_11 = arg_vals[l];
+ LDKRouteHint arr_conv_11_conv;
+ arr_conv_11_conv.inner = (void*)(arr_conv_11 & (~1));
+ arr_conv_11_conv.is_owned = (arr_conv_11 & 1) || (arr_conv_11 == 0);
+ arg_constr.data[l] = arr_conv_11_conv;
+ }
+ (*_env)->ReleaseLongArrayElements (_env, arg, arg_vals, 0);
+ CVec_RouteHintZ_free(arg_constr);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1RouteHopZ_1free(JNIEnv * _env, jclass _b, jlongArray arg) {
+ LDKCVec_RouteHopZ arg_constr;
+ arg_constr.datalen = (*_env)->GetArrayLength (_env, arg);
+ if (arg_constr.datalen > 0)
+ arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKRouteHop), "LDKCVec_RouteHopZ Elements");
+ else
+ arg_constr.data = NULL;
+ long* arg_vals = (*_env)->GetLongArrayElements (_env, arg, NULL);
+ for (size_t k = 0; k < arg_constr.datalen; k++) {
+ long arr_conv_10 = arg_vals[k];
+ LDKRouteHop arr_conv_10_conv;
+ arr_conv_10_conv.inner = (void*)(arr_conv_10 & (~1));
+ arr_conv_10_conv.is_owned = (arr_conv_10 & 1) || (arr_conv_10 == 0);
+ arg_constr.data[k] = arr_conv_10_conv;
+ }
+ (*_env)->ReleaseLongArrayElements (_env, arg, arg_vals, 0);
+ CVec_RouteHopZ_free(arg_constr);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1SignatureZ_1free(JNIEnv * _env, jclass _b, jobjectArray arg) {
+ LDKCVec_SignatureZ arg_constr;
+ arg_constr.datalen = (*_env)->GetArrayLength (_env, arg);
+ if (arg_constr.datalen > 0)
+ arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKSignature), "LDKCVec_SignatureZ Elements");
+ else
+ arg_constr.data = NULL;
+ for (size_t i = 0; i < arg_constr.datalen; i++) {
+ jobject arr_conv_8 = (*_env)->GetObjectArrayElement(_env, arg, i);
+ LDKSignature arr_conv_8_ref;
+ CHECK((*_env)->GetArrayLength (_env, arr_conv_8) == 64);
+ (*_env)->GetByteArrayRegion (_env, arr_conv_8, 0, 64, arr_conv_8_ref.compact_form);
+ arg_constr.data[i] = arr_conv_8_ref;
+ }
+ CVec_SignatureZ_free(arg_constr);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1SpendableOutputDescriptorZ_1free(JNIEnv * _env, jclass _b, jlongArray arg) {
+ LDKCVec_SpendableOutputDescriptorZ arg_constr;
+ arg_constr.datalen = (*_env)->GetArrayLength (_env, arg);
+ if (arg_constr.datalen > 0)
+ arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements");
+ else
+ arg_constr.data = NULL;
+ long* arg_vals = (*_env)->GetLongArrayElements (_env, arg, NULL);
+ for (size_t b = 0; b < arg_constr.datalen; b++) {
+ long arr_conv_27 = arg_vals[b];
+ LDKSpendableOutputDescriptor arr_conv_27_conv = *(LDKSpendableOutputDescriptor*)arr_conv_27;
+ FREE((void*)arr_conv_27);
+ arg_constr.data[b] = arr_conv_27_conv;
+ }
+ (*_env)->ReleaseLongArrayElements (_env, arg, arg_vals, 0);
+ CVec_SpendableOutputDescriptorZ_free(arg_constr);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TransactionZ_1free(JNIEnv * _env, jclass _b, jobjectArray arg) {
+ LDKCVec_TransactionZ arg_constr;
+ arg_constr.datalen = (*_env)->GetArrayLength (_env, arg);
+ if (arg_constr.datalen > 0)
+ arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKTransaction), "LDKCVec_TransactionZ Elements");
+ else
+ arg_constr.data = NULL;
+ for (size_t i = 0; i < arg_constr.datalen; i++) {
+ jobject arr_conv_8 = (*_env)->GetObjectArrayElement(_env, arg, i);
+ LDKTransaction arr_conv_8_ref;
+ arr_conv_8_ref.datalen = (*_env)->GetArrayLength (_env, arr_conv_8);
+ arr_conv_8_ref.data = MALLOC(arr_conv_8_ref.datalen, "LDKTransaction Bytes");
+ (*_env)->GetByteArrayRegion(_env, arr_conv_8, 0, arr_conv_8_ref.datalen, arr_conv_8_ref.data);
+ arr_conv_8_ref.data_is_owned = true;
+ arg_constr.data[i] = arr_conv_8_ref;
+ }
+ CVec_TransactionZ_free(arg_constr);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TxOutZ_1free(JNIEnv * _env, jclass _b, jlongArray arg) {
+ LDKCVec_TxOutZ arg_constr;
+ arg_constr.datalen = (*_env)->GetArrayLength (_env, arg);
+ if (arg_constr.datalen > 0)
+ arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKTxOut), "LDKCVec_TxOutZ Elements");
+ else
+ arg_constr.data = NULL;
+ long* arg_vals = (*_env)->GetLongArrayElements (_env, arg, NULL);
+ for (size_t h = 0; h < arg_constr.datalen; h++) {
+ long arr_conv_7 = arg_vals[h];
+ LDKTxOut arr_conv_7_conv = *(LDKTxOut*)arr_conv_7;
+ FREE((void*)arr_conv_7);
+ arg_constr.data[h] = arr_conv_7_conv;
+ }
+ (*_env)->ReleaseLongArrayElements (_env, arg, arg_vals, 0);
+ CVec_TxOutZ_free(arg_constr);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateAddHTLCZ_1free(JNIEnv * _env, jclass _b, jlongArray arg) {
+ LDKCVec_UpdateAddHTLCZ arg_constr;
+ arg_constr.datalen = (*_env)->GetArrayLength (_env, arg);
+ if (arg_constr.datalen > 0)
+ arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKUpdateAddHTLC), "LDKCVec_UpdateAddHTLCZ Elements");
+ else
+ arg_constr.data = NULL;
+ long* arg_vals = (*_env)->GetLongArrayElements (_env, arg, NULL);
+ for (size_t p = 0; p < arg_constr.datalen; p++) {
+ long arr_conv_15 = arg_vals[p];
+ LDKUpdateAddHTLC arr_conv_15_conv;
+ arr_conv_15_conv.inner = (void*)(arr_conv_15 & (~1));
+ arr_conv_15_conv.is_owned = (arr_conv_15 & 1) || (arr_conv_15 == 0);
+ arg_constr.data[p] = arr_conv_15_conv;
+ }
+ (*_env)->ReleaseLongArrayElements (_env, arg, arg_vals, 0);
+ CVec_UpdateAddHTLCZ_free(arg_constr);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateFailHTLCZ_1free(JNIEnv * _env, jclass _b, jlongArray arg) {
+ LDKCVec_UpdateFailHTLCZ arg_constr;
+ arg_constr.datalen = (*_env)->GetArrayLength (_env, arg);
+ if (arg_constr.datalen > 0)
+ arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKUpdateFailHTLC), "LDKCVec_UpdateFailHTLCZ Elements");
+ else
+ arg_constr.data = NULL;
+ long* arg_vals = (*_env)->GetLongArrayElements (_env, arg, NULL);
+ for (size_t q = 0; q < arg_constr.datalen; q++) {
+ long arr_conv_16 = arg_vals[q];
+ LDKUpdateFailHTLC arr_conv_16_conv;
+ arr_conv_16_conv.inner = (void*)(arr_conv_16 & (~1));
+ arr_conv_16_conv.is_owned = (arr_conv_16 & 1) || (arr_conv_16 == 0);
+ arg_constr.data[q] = arr_conv_16_conv;
+ }
+ (*_env)->ReleaseLongArrayElements (_env, arg, arg_vals, 0);
+ CVec_UpdateFailHTLCZ_free(arg_constr);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateFailMalformedHTLCZ_1free(JNIEnv * _env, jclass _b, jlongArray arg) {
+ LDKCVec_UpdateFailMalformedHTLCZ arg_constr;
+ arg_constr.datalen = (*_env)->GetArrayLength (_env, arg);
+ if (arg_constr.datalen > 0)
+ arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKUpdateFailMalformedHTLC), "LDKCVec_UpdateFailMalformedHTLCZ Elements");
+ else
+ arg_constr.data = NULL;
+ long* arg_vals = (*_env)->GetLongArrayElements (_env, arg, NULL);
+ for (size_t z = 0; z < arg_constr.datalen; z++) {
+ long arr_conv_25 = arg_vals[z];
+ LDKUpdateFailMalformedHTLC arr_conv_25_conv;
+ arr_conv_25_conv.inner = (void*)(arr_conv_25 & (~1));
+ arr_conv_25_conv.is_owned = (arr_conv_25 & 1) || (arr_conv_25 == 0);
+ arg_constr.data[z] = arr_conv_25_conv;
+ }
+ (*_env)->ReleaseLongArrayElements (_env, arg, arg_vals, 0);
+ CVec_UpdateFailMalformedHTLCZ_free(arg_constr);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateFulfillHTLCZ_1free(JNIEnv * _env, jclass _b, jlongArray arg) {
+ LDKCVec_UpdateFulfillHTLCZ arg_constr;
+ arg_constr.datalen = (*_env)->GetArrayLength (_env, arg);
+ if (arg_constr.datalen > 0)
+ arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKUpdateFulfillHTLC), "LDKCVec_UpdateFulfillHTLCZ Elements");
+ else
+ arg_constr.data = NULL;
+ long* arg_vals = (*_env)->GetLongArrayElements (_env, arg, NULL);
+ for (size_t t = 0; t < arg_constr.datalen; t++) {
+ long arr_conv_19 = arg_vals[t];
+ LDKUpdateFulfillHTLC arr_conv_19_conv;
+ arr_conv_19_conv.inner = (void*)(arr_conv_19 & (~1));
+ arr_conv_19_conv.is_owned = (arr_conv_19 & 1) || (arr_conv_19 == 0);
+ arg_constr.data[t] = arr_conv_19_conv;
+ }
+ (*_env)->ReleaseLongArrayElements (_env, arg, arg_vals, 0);
+ CVec_UpdateFulfillHTLCZ_free(arg_constr);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u64Z_1free(JNIEnv * _env, jclass _b, jlongArray arg) {
+ LDKCVec_u64Z arg_constr;
+ arg_constr.datalen = (*_env)->GetArrayLength (_env, arg);
+ if (arg_constr.datalen > 0)
+ arg_constr.data = MALLOC(arg_constr.datalen * sizeof(jlong), "LDKCVec_u64Z Elements");
+ else
+ arg_constr.data = NULL;
+ long* arg_vals = (*_env)->GetLongArrayElements (_env, arg, NULL);
+ for (size_t g = 0; g < arg_constr.datalen; g++) {
+ long arr_conv_6 = arg_vals[g];
+ arg_constr.data[g] = arr_conv_6;
+ }
+ (*_env)->ReleaseLongArrayElements (_env, arg, arg_vals, 0);
+ CVec_u64Z_free(arg_constr);