- return TxOut_free(_res_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1new(JNIEnv * _env, jclass _b, jlong a, jlong b) {
- LDKTransaction b_conv = *(LDKTransaction*)b;
- FREE((void*)b);
- LDKC2Tuple_usizeTransactionZ* ret = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
- *ret = C2Tuple_usizeTransactionZ_new(a, b_conv);
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1ok(JNIEnv * _env, jclass _b) {
- LDKCResult_NoneChannelMonitorUpdateErrZ* ret = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
- *ret = CResult_NoneChannelMonitorUpdateErrZ_ok();
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateErrorZ_1ok(JNIEnv * _env, jclass _b) {
- LDKCResult_NoneMonitorUpdateErrorZ* ret = MALLOC(sizeof(LDKCResult_NoneMonitorUpdateErrorZ), "LDKCResult_NoneMonitorUpdateErrorZ");
- *ret = CResult_NoneMonitorUpdateErrorZ_ok();
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1new(JNIEnv * _env, jclass _b, jlong a, jlong b) {
- LDKOutPoint a_conv = *(LDKOutPoint*)a;
- FREE((void*)a);
- a_conv.is_owned = true;
- LDKCVec_u8Z b_conv = *(LDKCVec_u8Z*)b;
- FREE((void*)b);
- LDKC2Tuple_OutPointScriptZ* ret = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
- *ret = C2Tuple_OutPointScriptZ_new(a_conv, b_conv);
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1TxOutZZ_1new(JNIEnv * _env, jclass _b, jlong a, jlong b) {
- LDKThirtyTwoBytes a_conv = *(LDKThirtyTwoBytes*)a;
- FREE((void*)a);
- LDKCVec_TxOutZ b_conv = *(LDKCVec_TxOutZ*)b;
- FREE((void*)b);
- LDKC2Tuple_TxidCVec_TxOutZZ* ret = MALLOC(sizeof(LDKC2Tuple_TxidCVec_TxOutZZ), "LDKC2Tuple_TxidCVec_TxOutZZ");
- *ret = C2Tuple_TxidCVec_TxOutZZ_new(a_conv, b_conv);
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u64u64Z_1new(JNIEnv * _env, jclass _b, jlong a, jlong b) {
- LDKC2Tuple_u64u64Z* ret = MALLOC(sizeof(LDKC2Tuple_u64u64Z), "LDKC2Tuple_u64u64Z");
- *ret = C2Tuple_u64u64Z_new(a, b);
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1new(JNIEnv * _env, jclass _b, jlong a, jlong b) {
- LDKSignature a_conv = *(LDKSignature*)a;
- FREE((void*)a);
- LDKCVec_SignatureZ b_conv = *(LDKCVec_SignatureZ*)b;
- FREE((void*)b);
- LDKC2Tuple_SignatureCVec_SignatureZZ* ret = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
- *ret = C2Tuple_SignatureCVec_SignatureZZ_new(a_conv, b_conv);
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1err(JNIEnv * _env, jclass _b) {
- LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ* ret = MALLOC(sizeof(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ), "LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ");
- *ret = CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SignatureNoneZ_1err(JNIEnv * _env, jclass _b) {
- LDKCResult_SignatureNoneZ* ret = MALLOC(sizeof(LDKCResult_SignatureNoneZ), "LDKCResult_SignatureNoneZ");
- *ret = CResult_SignatureNoneZ_err();
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1err(JNIEnv * _env, jclass _b) {
- LDKCResult_CVec_SignatureZNoneZ* ret = MALLOC(sizeof(LDKCResult_CVec_SignatureZNoneZ), "LDKCResult_CVec_SignatureZNoneZ");
- *ret = CResult_CVec_SignatureZNoneZ_err();
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneAPIErrorZ_1ok(JNIEnv * _env, jclass _b) {
- LDKCResult_NoneAPIErrorZ* ret = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
- *ret = CResult_NoneAPIErrorZ_ok();
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1ok(JNIEnv * _env, jclass _b) {
- LDKCResult_NonePaymentSendFailureZ* ret = MALLOC(sizeof(LDKCResult_NonePaymentSendFailureZ), "LDKCResult_NonePaymentSendFailureZ");
- *ret = CResult_NonePaymentSendFailureZ_ok();
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1new(JNIEnv * _env, jclass _b, jlong a, jlong b, jlong c) {
- LDKChannelAnnouncement a_conv = *(LDKChannelAnnouncement*)a;
- FREE((void*)a);
- a_conv.is_owned = true;
- LDKChannelUpdate b_conv = *(LDKChannelUpdate*)b;
- FREE((void*)b);
- b_conv.is_owned = true;
- LDKChannelUpdate c_conv = *(LDKChannelUpdate*)c;
- FREE((void*)c);
- c_conv.is_owned = true;
- LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
- *ret = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a_conv, b_conv, c_conv);
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1ok(JNIEnv * _env, jclass _b) {
- LDKCResult_NonePeerHandleErrorZ* ret = MALLOC(sizeof(LDKCResult_NonePeerHandleErrorZ), "LDKCResult_NonePeerHandleErrorZ");
- *ret = CResult_NonePeerHandleErrorZ_ok();
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1HTLCOutputInCommitmentSignatureZ_1new(JNIEnv * _env, jclass _b, jlong a, jlong b) {
- LDKHTLCOutputInCommitment a_conv = *(LDKHTLCOutputInCommitment*)a;
- FREE((void*)a);
- a_conv.is_owned = true;
- LDKSignature b_conv = *(LDKSignature*)b;
- FREE((void*)b);
- LDKC2Tuple_HTLCOutputInCommitmentSignatureZ* ret = MALLOC(sizeof(LDKC2Tuple_HTLCOutputInCommitmentSignatureZ), "LDKC2Tuple_HTLCOutputInCommitmentSignatureZ");
- *ret = C2Tuple_HTLCOutputInCommitmentSignatureZ_new(a_conv, b_conv);
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Event_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKEvent this_ptr_conv = *(LDKEvent*)this_ptr;
- FREE((void*)this_ptr);
- return Event_free(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_MessageSendEvent_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKMessageSendEvent this_ptr_conv = *(LDKMessageSendEvent*)this_ptr;
- FREE((void*)this_ptr);
- return MessageSendEvent_free(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_MessageSendEventsProvider_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKMessageSendEventsProvider this_ptr_conv = *(LDKMessageSendEventsProvider*)this_ptr;
- FREE((void*)this_ptr);
- return MessageSendEventsProvider_free(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_EventsProvider_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKEventsProvider this_ptr_conv = *(LDKEventsProvider*)this_ptr;
- FREE((void*)this_ptr);
- return EventsProvider_free(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_APIError_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKAPIError this_ptr_conv = *(LDKAPIError*)this_ptr;
- FREE((void*)this_ptr);
- return APIError_free(this_ptr_conv);
-}
-
-JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Level_1max(JNIEnv * _env, jclass _b) {
- jclass ret = LDKLevel_to_java(_env, Level_max());
- return ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Logger_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKLogger this_ptr_conv = *(LDKLogger*)this_ptr;
- FREE((void*)this_ptr);
- return Logger_free(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChannelHandshakeConfig this_ptr_conv = *(LDKChannelHandshakeConfig*)this_ptr;
- FREE((void*)this_ptr);
- this_ptr_conv.is_owned = true;
- return ChannelHandshakeConfig_free(this_ptr_conv);
-}
-
-JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1get_1minimum_1depth(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChannelHandshakeConfig* this_ptr_conv = (LDKChannelHandshakeConfig*)this_ptr;
- return ChannelHandshakeConfig_get_minimum_depth(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1set_1minimum_1depth(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
- LDKChannelHandshakeConfig* this_ptr_conv = (LDKChannelHandshakeConfig*)this_ptr;
- return ChannelHandshakeConfig_set_minimum_depth(this_ptr_conv, val);
-}
-
-JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1get_1our_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChannelHandshakeConfig* this_ptr_conv = (LDKChannelHandshakeConfig*)this_ptr;
- return ChannelHandshakeConfig_get_our_to_self_delay(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1set_1our_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
- LDKChannelHandshakeConfig* this_ptr_conv = (LDKChannelHandshakeConfig*)this_ptr;
- return ChannelHandshakeConfig_set_our_to_self_delay(this_ptr_conv, val);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1get_1our_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChannelHandshakeConfig* this_ptr_conv = (LDKChannelHandshakeConfig*)this_ptr;
- return ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1set_1our_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKChannelHandshakeConfig* this_ptr_conv = (LDKChannelHandshakeConfig*)this_ptr;
- return ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr_conv, val);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1new(JNIEnv * _env, jclass _b, jint minimum_depth_arg, jshort our_to_self_delay_arg, jlong our_htlc_minimum_msat_arg) {
- LDKChannelHandshakeConfig* ret = MALLOC(sizeof(LDKChannelHandshakeConfig), "LDKChannelHandshakeConfig");
- *ret = ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg);
- DO_ASSERT(ret->is_owned);
- ret->is_owned = false;
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1default(JNIEnv * _env, jclass _b) {
- LDKChannelHandshakeConfig* ret = MALLOC(sizeof(LDKChannelHandshakeConfig), "LDKChannelHandshakeConfig");
- *ret = ChannelHandshakeConfig_default();
- DO_ASSERT(ret->is_owned);
- ret->is_owned = false;
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChannelHandshakeLimits this_ptr_conv = *(LDKChannelHandshakeLimits*)this_ptr;
- FREE((void*)this_ptr);
- this_ptr_conv.is_owned = true;
- return ChannelHandshakeLimits_free(this_ptr_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1min_1funding_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
- return ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1min_1funding_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
- return ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr_conv, val);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1max_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
- return ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1max_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
- return ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr_conv, val);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1min_1max_1htlc_1value_1in_1flight_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
- return ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1min_1max_1htlc_1value_1in_1flight_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
- return ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr_conv, val);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1max_1channel_1reserve_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
- return ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1max_1channel_1reserve_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
- return ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr_conv, val);
-}
-
-JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1min_1max_1accepted_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
- return ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1min_1max_1accepted_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
- LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
- return ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr_conv, val);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1min_1dust_1limit_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
- return ChannelHandshakeLimits_get_min_dust_limit_satoshis(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1min_1dust_1limit_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
- return ChannelHandshakeLimits_set_min_dust_limit_satoshis(this_ptr_conv, val);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1max_1dust_1limit_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
- return ChannelHandshakeLimits_get_max_dust_limit_satoshis(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1max_1dust_1limit_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
- return ChannelHandshakeLimits_set_max_dust_limit_satoshis(this_ptr_conv, val);
-}
-
-JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1max_1minimum_1depth(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
- return ChannelHandshakeLimits_get_max_minimum_depth(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1max_1minimum_1depth(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
- LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
- return ChannelHandshakeLimits_set_max_minimum_depth(this_ptr_conv, val);
-}
-
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1force_1announced_1channel_1preference(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
- return ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1force_1announced_1channel_1preference(JNIEnv * _env, jclass _b, jlong this_ptr, jboolean val) {
- LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
- return ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr_conv, val);
-}
-
-JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1their_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
- return ChannelHandshakeLimits_get_their_to_self_delay(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1their_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
- LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
- return ChannelHandshakeLimits_set_their_to_self_delay(this_ptr_conv, val);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1new(JNIEnv * _env, jclass _b, jlong min_funding_satoshis_arg, jlong max_htlc_minimum_msat_arg, jlong min_max_htlc_value_in_flight_msat_arg, jlong max_channel_reserve_satoshis_arg, jshort min_max_accepted_htlcs_arg, jlong min_dust_limit_satoshis_arg, jlong max_dust_limit_satoshis_arg, jint max_minimum_depth_arg, jboolean force_announced_channel_preference_arg, jshort their_to_self_delay_arg) {
- LDKChannelHandshakeLimits* ret = MALLOC(sizeof(LDKChannelHandshakeLimits), "LDKChannelHandshakeLimits");
- *ret = ChannelHandshakeLimits_new(min_funding_satoshis_arg, max_htlc_minimum_msat_arg, min_max_htlc_value_in_flight_msat_arg, max_channel_reserve_satoshis_arg, min_max_accepted_htlcs_arg, min_dust_limit_satoshis_arg, max_dust_limit_satoshis_arg, max_minimum_depth_arg, force_announced_channel_preference_arg, their_to_self_delay_arg);
- DO_ASSERT(ret->is_owned);
- ret->is_owned = false;
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1default(JNIEnv * _env, jclass _b) {
- LDKChannelHandshakeLimits* ret = MALLOC(sizeof(LDKChannelHandshakeLimits), "LDKChannelHandshakeLimits");
- *ret = ChannelHandshakeLimits_default();
- DO_ASSERT(ret->is_owned);
- ret->is_owned = false;
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChannelConfig this_ptr_conv = *(LDKChannelConfig*)this_ptr;
- FREE((void*)this_ptr);
- this_ptr_conv.is_owned = true;
- return ChannelConfig_free(this_ptr_conv);
-}
-
-JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1get_1fee_1proportional_1millionths(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChannelConfig* this_ptr_conv = (LDKChannelConfig*)this_ptr;
- return ChannelConfig_get_fee_proportional_millionths(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1set_1fee_1proportional_1millionths(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
- LDKChannelConfig* this_ptr_conv = (LDKChannelConfig*)this_ptr;
- return ChannelConfig_set_fee_proportional_millionths(this_ptr_conv, val);
-}
-
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1get_1announced_1channel(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChannelConfig* this_ptr_conv = (LDKChannelConfig*)this_ptr;
- return ChannelConfig_get_announced_channel(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1set_1announced_1channel(JNIEnv * _env, jclass _b, jlong this_ptr, jboolean val) {
- LDKChannelConfig* this_ptr_conv = (LDKChannelConfig*)this_ptr;
- return ChannelConfig_set_announced_channel(this_ptr_conv, val);
-}
-
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1get_1commit_1upfront_1shutdown_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChannelConfig* this_ptr_conv = (LDKChannelConfig*)this_ptr;
- return ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1set_1commit_1upfront_1shutdown_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr, jboolean val) {
- LDKChannelConfig* this_ptr_conv = (LDKChannelConfig*)this_ptr;
- return ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr_conv, val);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1new(JNIEnv * _env, jclass _b, jint fee_proportional_millionths_arg, jboolean announced_channel_arg, jboolean commit_upfront_shutdown_pubkey_arg) {
- LDKChannelConfig* ret = MALLOC(sizeof(LDKChannelConfig), "LDKChannelConfig");
- *ret = ChannelConfig_new(fee_proportional_millionths_arg, announced_channel_arg, commit_upfront_shutdown_pubkey_arg);
- DO_ASSERT(ret->is_owned);
- ret->is_owned = false;
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1default(JNIEnv * _env, jclass _b) {
- LDKChannelConfig* ret = MALLOC(sizeof(LDKChannelConfig), "LDKChannelConfig");
- *ret = ChannelConfig_default();
- DO_ASSERT(ret->is_owned);
- ret->is_owned = false;
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1write(JNIEnv * _env, jclass _b, jlong obj) {
- LDKChannelConfig* obj_conv = (LDKChannelConfig*)obj;
- LDKCVec_u8Z* ret = MALLOC(sizeof(LDKCVec_u8Z), "LDKCVec_u8Z");
- *ret = ChannelConfig_write(obj_conv);
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1read(JNIEnv * _env, jclass _b, jlong ser) {
- LDKu8slice ser_conv = *(LDKu8slice*)ser;
- LDKChannelConfig* ret = MALLOC(sizeof(LDKChannelConfig), "LDKChannelConfig");
- *ret = ChannelConfig_read(ser_conv);
- DO_ASSERT(ret->is_owned);
- ret->is_owned = false;
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UserConfig_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKUserConfig this_ptr_conv = *(LDKUserConfig*)this_ptr;
- FREE((void*)this_ptr);
- this_ptr_conv.is_owned = true;
- return UserConfig_free(this_ptr_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UserConfig_1get_1own_1channel_1config(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKUserConfig* this_ptr_conv = (LDKUserConfig*)this_ptr;
- LDKChannelHandshakeConfig* ret = MALLOC(sizeof(LDKChannelHandshakeConfig), "LDKChannelHandshakeConfig");
- *ret = UserConfig_get_own_channel_config(this_ptr_conv);
- DO_ASSERT(ret->is_owned);
- ret->is_owned = false;
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UserConfig_1set_1own_1channel_1config(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKUserConfig* this_ptr_conv = (LDKUserConfig*)this_ptr;
- LDKChannelHandshakeConfig val_conv = *(LDKChannelHandshakeConfig*)val;
- FREE((void*)val);
- val_conv.is_owned = true;
- return UserConfig_set_own_channel_config(this_ptr_conv, val_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UserConfig_1get_1peer_1channel_1config_1limits(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKUserConfig* this_ptr_conv = (LDKUserConfig*)this_ptr;
- LDKChannelHandshakeLimits* ret = MALLOC(sizeof(LDKChannelHandshakeLimits), "LDKChannelHandshakeLimits");
- *ret = UserConfig_get_peer_channel_config_limits(this_ptr_conv);
- DO_ASSERT(ret->is_owned);
- ret->is_owned = false;
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UserConfig_1set_1peer_1channel_1config_1limits(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKUserConfig* this_ptr_conv = (LDKUserConfig*)this_ptr;
- LDKChannelHandshakeLimits val_conv = *(LDKChannelHandshakeLimits*)val;
- FREE((void*)val);
- val_conv.is_owned = true;
- return UserConfig_set_peer_channel_config_limits(this_ptr_conv, val_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UserConfig_1get_1channel_1options(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKUserConfig* this_ptr_conv = (LDKUserConfig*)this_ptr;
- LDKChannelConfig* ret = MALLOC(sizeof(LDKChannelConfig), "LDKChannelConfig");
- *ret = UserConfig_get_channel_options(this_ptr_conv);
- DO_ASSERT(ret->is_owned);
- ret->is_owned = false;
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UserConfig_1set_1channel_1options(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKUserConfig* this_ptr_conv = (LDKUserConfig*)this_ptr;
- LDKChannelConfig val_conv = *(LDKChannelConfig*)val;
- FREE((void*)val);
- val_conv.is_owned = true;
- return UserConfig_set_channel_options(this_ptr_conv, val_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UserConfig_1new(JNIEnv * _env, jclass _b, jlong own_channel_config_arg, jlong peer_channel_config_limits_arg, jlong channel_options_arg) {
- LDKChannelHandshakeConfig own_channel_config_arg_conv = *(LDKChannelHandshakeConfig*)own_channel_config_arg;
- FREE((void*)own_channel_config_arg);
- own_channel_config_arg_conv.is_owned = true;
- LDKChannelHandshakeLimits peer_channel_config_limits_arg_conv = *(LDKChannelHandshakeLimits*)peer_channel_config_limits_arg;
- FREE((void*)peer_channel_config_limits_arg);
- peer_channel_config_limits_arg_conv.is_owned = true;
- LDKChannelConfig channel_options_arg_conv = *(LDKChannelConfig*)channel_options_arg;
- FREE((void*)channel_options_arg);
- channel_options_arg_conv.is_owned = true;
- LDKUserConfig* ret = MALLOC(sizeof(LDKUserConfig), "LDKUserConfig");
- *ret = UserConfig_new(own_channel_config_arg_conv, peer_channel_config_limits_arg_conv, channel_options_arg_conv);
- DO_ASSERT(ret->is_owned);
- ret->is_owned = false;
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UserConfig_1default(JNIEnv * _env, jclass _b) {
- LDKUserConfig* ret = MALLOC(sizeof(LDKUserConfig), "LDKUserConfig");
- *ret = UserConfig_default();
- DO_ASSERT(ret->is_owned);
- ret->is_owned = false;
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Access_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKAccess this_ptr_conv = *(LDKAccess*)this_ptr;
- FREE((void*)this_ptr);
- return Access_free(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Watch_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKWatch this_ptr_conv = *(LDKWatch*)this_ptr;
- FREE((void*)this_ptr);
- return Watch_free(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Filter_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKFilter this_ptr_conv = *(LDKFilter*)this_ptr;
- FREE((void*)this_ptr);
- return Filter_free(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BroadcasterInterface_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKBroadcasterInterface this_ptr_conv = *(LDKBroadcasterInterface*)this_ptr;
- FREE((void*)this_ptr);
- return BroadcasterInterface_free(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FeeEstimator_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKFeeEstimator this_ptr_conv = *(LDKFeeEstimator*)this_ptr;
- FREE((void*)this_ptr);
- return FeeEstimator_free(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChainMonitor this_ptr_conv = *(LDKChainMonitor*)this_ptr;
- FREE((void*)this_ptr);
- this_ptr_conv.is_owned = true;
- return ChainMonitor_free(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1block_1connected(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray header, jlong txdata, jint height) {
- LDKChainMonitor* this_arg_conv = (LDKChainMonitor*)this_arg;
- unsigned char header_arr[80];
- (*_env)->GetByteArrayRegion (_env, header, 0, 80, header_arr);
- unsigned char (*header_ref)[80] = &header_arr;
- LDKCVec_C2Tuple_usizeTransactionZZ txdata_conv = *(LDKCVec_C2Tuple_usizeTransactionZZ*)txdata;
- FREE((void*)txdata);
- return ChainMonitor_block_connected(this_arg_conv, header_ref, txdata_conv, height);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1block_1disconnected(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray header, jint disconnected_height) {
- LDKChainMonitor* this_arg_conv = (LDKChainMonitor*)this_arg;
- unsigned char header_arr[80];
- (*_env)->GetByteArrayRegion (_env, header, 0, 80, header_arr);
- unsigned char (*header_ref)[80] = &header_arr;
- return ChainMonitor_block_disconnected(this_arg_conv, header_ref, disconnected_height);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1new(JNIEnv * _env, jclass _b, jlong chain_source, jlong broadcaster, jlong logger, jlong feeest) {
- LDKFilter* chain_source_conv = (LDKFilter*)chain_source;
- LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)broadcaster;
- if (broadcaster_conv.free == LDKBroadcasterInterface_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKBroadcasterInterface_JCalls_clone(broadcaster_conv.this_arg);
- }
- LDKLogger logger_conv = *(LDKLogger*)logger;
- if (logger_conv.free == LDKLogger_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKLogger_JCalls_clone(logger_conv.this_arg);
- }
- LDKFeeEstimator feeest_conv = *(LDKFeeEstimator*)feeest;
- if (feeest_conv.free == LDKFeeEstimator_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKFeeEstimator_JCalls_clone(feeest_conv.this_arg);
- }
- LDKChainMonitor* ret = MALLOC(sizeof(LDKChainMonitor), "LDKChainMonitor");
- *ret = ChainMonitor_new(chain_source_conv, broadcaster_conv, logger_conv, feeest_conv);
- DO_ASSERT(ret->is_owned);
- ret->is_owned = false;
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1as_1Watch(JNIEnv * _env, jclass _b, jlong this_arg) {
- LDKChainMonitor* this_arg_conv = (LDKChainMonitor*)this_arg;
- LDKWatch* ret = MALLOC(sizeof(LDKWatch), "LDKWatch");
- *ret = ChainMonitor_as_Watch(this_arg_conv);
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1as_1EventsProvider(JNIEnv * _env, jclass _b, jlong this_arg) {
- LDKChainMonitor* this_arg_conv = (LDKChainMonitor*)this_arg;
- LDKEventsProvider* ret = MALLOC(sizeof(LDKEventsProvider), "LDKEventsProvider");
- *ret = ChainMonitor_as_EventsProvider(this_arg_conv);
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChannelMonitorUpdate this_ptr_conv = *(LDKChannelMonitorUpdate*)this_ptr;
- FREE((void*)this_ptr);
- this_ptr_conv.is_owned = true;
- return ChannelMonitorUpdate_free(this_ptr_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1get_1update_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChannelMonitorUpdate* this_ptr_conv = (LDKChannelMonitorUpdate*)this_ptr;
- return ChannelMonitorUpdate_get_update_id(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1set_1update_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKChannelMonitorUpdate* this_ptr_conv = (LDKChannelMonitorUpdate*)this_ptr;
- return ChannelMonitorUpdate_set_update_id(this_ptr_conv, val);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1write(JNIEnv * _env, jclass _b, jlong obj) {
- LDKChannelMonitorUpdate* obj_conv = (LDKChannelMonitorUpdate*)obj;
- LDKCVec_u8Z* ret = MALLOC(sizeof(LDKCVec_u8Z), "LDKCVec_u8Z");
- *ret = ChannelMonitorUpdate_write(obj_conv);
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1read(JNIEnv * _env, jclass _b, jlong ser) {
- LDKu8slice ser_conv = *(LDKu8slice*)ser;
- LDKChannelMonitorUpdate* ret = MALLOC(sizeof(LDKChannelMonitorUpdate), "LDKChannelMonitorUpdate");
- *ret = ChannelMonitorUpdate_read(ser_conv);
- DO_ASSERT(ret->is_owned);
- ret->is_owned = false;
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_MonitorUpdateError_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKMonitorUpdateError this_ptr_conv = *(LDKMonitorUpdateError*)this_ptr;
- FREE((void*)this_ptr);
- this_ptr_conv.is_owned = true;
- return MonitorUpdateError_free(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKMonitorEvent this_ptr_conv = *(LDKMonitorEvent*)this_ptr;
- FREE((void*)this_ptr);
- this_ptr_conv.is_owned = true;
- return MonitorEvent_free(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCUpdate_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKHTLCUpdate this_ptr_conv = *(LDKHTLCUpdate*)this_ptr;
- FREE((void*)this_ptr);
- this_ptr_conv.is_owned = true;
- return HTLCUpdate_free(this_ptr_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCUpdate_1write(JNIEnv * _env, jclass _b, jlong obj) {
- LDKHTLCUpdate* obj_conv = (LDKHTLCUpdate*)obj;
- LDKCVec_u8Z* ret = MALLOC(sizeof(LDKCVec_u8Z), "LDKCVec_u8Z");
- *ret = HTLCUpdate_write(obj_conv);
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCUpdate_1read(JNIEnv * _env, jclass _b, jlong ser) {
- LDKu8slice ser_conv = *(LDKu8slice*)ser;
- LDKHTLCUpdate* ret = MALLOC(sizeof(LDKHTLCUpdate), "LDKHTLCUpdate");
- *ret = HTLCUpdate_read(ser_conv);
- DO_ASSERT(ret->is_owned);
- ret->is_owned = false;
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChannelMonitor this_ptr_conv = *(LDKChannelMonitor*)this_ptr;
- FREE((void*)this_ptr);
- this_ptr_conv.is_owned = true;
- return ChannelMonitor_free(this_ptr_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1update_1monitor(JNIEnv * _env, jclass _b, jlong this_arg, jlong updates, jlong broadcaster, jlong logger) {
- LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg;
- LDKChannelMonitorUpdate updates_conv = *(LDKChannelMonitorUpdate*)updates;
- FREE((void*)updates);
- updates_conv.is_owned = true;
- LDKBroadcasterInterface* broadcaster_conv = (LDKBroadcasterInterface*)broadcaster;
- LDKLogger* logger_conv = (LDKLogger*)logger;
- LDKCResult_NoneMonitorUpdateErrorZ* ret = MALLOC(sizeof(LDKCResult_NoneMonitorUpdateErrorZ), "LDKCResult_NoneMonitorUpdateErrorZ");
- *ret = ChannelMonitor_update_monitor(this_arg_conv, updates_conv, broadcaster_conv, logger_conv);
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1latest_1update_1id(JNIEnv * _env, jclass _b, jlong this_arg) {
- LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg;
- return ChannelMonitor_get_latest_update_id(this_arg_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1funding_1txo(JNIEnv * _env, jclass _b, jlong this_arg) {
- LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg;
- LDKC2Tuple_OutPointScriptZ* ret = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
- *ret = ChannelMonitor_get_funding_txo(this_arg_conv);
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1and_1clear_1pending_1monitor_1events(JNIEnv * _env, jclass _b, jlong this_arg) {
- LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg;
- LDKCVec_MonitorEventZ* ret = MALLOC(sizeof(LDKCVec_MonitorEventZ), "LDKCVec_MonitorEventZ");
- *ret = ChannelMonitor_get_and_clear_pending_monitor_events(this_arg_conv);
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1and_1clear_1pending_1events(JNIEnv * _env, jclass _b, jlong this_arg) {
- LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg;
- LDKCVec_EventZ* ret = MALLOC(sizeof(LDKCVec_EventZ), "LDKCVec_EventZ");
- *ret = ChannelMonitor_get_and_clear_pending_events(this_arg_conv);
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1latest_1holder_1commitment_1txn(JNIEnv * _env, jclass _b, jlong this_arg, jlong logger) {
- LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg;
- LDKLogger* logger_conv = (LDKLogger*)logger;
- LDKCVec_TransactionZ* ret = MALLOC(sizeof(LDKCVec_TransactionZ), "LDKCVec_TransactionZ");
- *ret = ChannelMonitor_get_latest_holder_commitment_txn(this_arg_conv, logger_conv);
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1block_1connected(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray header, jlong txdata, jint height, jlong broadcaster, jlong fee_estimator, jlong logger) {
- LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg;
- unsigned char header_arr[80];
- (*_env)->GetByteArrayRegion (_env, header, 0, 80, header_arr);
- unsigned char (*header_ref)[80] = &header_arr;
- LDKCVec_C2Tuple_usizeTransactionZZ txdata_conv = *(LDKCVec_C2Tuple_usizeTransactionZZ*)txdata;
- FREE((void*)txdata);
- LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)broadcaster;
- if (broadcaster_conv.free == LDKBroadcasterInterface_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKBroadcasterInterface_JCalls_clone(broadcaster_conv.this_arg);
- }
- LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)fee_estimator;
- if (fee_estimator_conv.free == LDKFeeEstimator_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKFeeEstimator_JCalls_clone(fee_estimator_conv.this_arg);
- }
- LDKLogger logger_conv = *(LDKLogger*)logger;
- if (logger_conv.free == LDKLogger_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKLogger_JCalls_clone(logger_conv.this_arg);
- }
- LDKCVec_C2Tuple_TxidCVec_TxOutZZZ* ret = MALLOC(sizeof(LDKCVec_C2Tuple_TxidCVec_TxOutZZZ), "LDKCVec_C2Tuple_TxidCVec_TxOutZZZ");
- *ret = ChannelMonitor_block_connected(this_arg_conv, header_ref, txdata_conv, height, broadcaster_conv, fee_estimator_conv, logger_conv);
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1block_1disconnected(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray header, jint height, jlong broadcaster, jlong fee_estimator, jlong logger) {
- LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg;
- unsigned char header_arr[80];
- (*_env)->GetByteArrayRegion (_env, header, 0, 80, header_arr);
- unsigned char (*header_ref)[80] = &header_arr;
- LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)broadcaster;
- if (broadcaster_conv.free == LDKBroadcasterInterface_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKBroadcasterInterface_JCalls_clone(broadcaster_conv.this_arg);
- }
- LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)fee_estimator;
- if (fee_estimator_conv.free == LDKFeeEstimator_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKFeeEstimator_JCalls_clone(fee_estimator_conv.this_arg);
- }
- LDKLogger logger_conv = *(LDKLogger*)logger;
- if (logger_conv.free == LDKLogger_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKLogger_JCalls_clone(logger_conv.this_arg);
- }
- return ChannelMonitor_block_disconnected(this_arg_conv, header_ref, height, broadcaster_conv, fee_estimator_conv, logger_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutPoint_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKOutPoint this_ptr_conv = *(LDKOutPoint*)this_ptr;
- FREE((void*)this_ptr);
- this_ptr_conv.is_owned = true;
- return OutPoint_free(this_ptr_conv);
-}
-
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OutPoint_1get_1txid(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKOutPoint* this_ptr_conv = (LDKOutPoint*)this_ptr;
- jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
- (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *OutPoint_get_txid(this_ptr_conv));
- return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutPoint_1set_1txid(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKOutPoint* this_ptr_conv = (LDKOutPoint*)this_ptr;
- LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
- FREE((void*)val);
- return OutPoint_set_txid(this_ptr_conv, val_conv);
-}
-
-JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_OutPoint_1get_1index(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKOutPoint* this_ptr_conv = (LDKOutPoint*)this_ptr;
- return OutPoint_get_index(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutPoint_1set_1index(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
- LDKOutPoint* this_ptr_conv = (LDKOutPoint*)this_ptr;
- return OutPoint_set_index(this_ptr_conv, val);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutPoint_1new(JNIEnv * _env, jclass _b, jlong txid_arg, jshort index_arg) {
- LDKThirtyTwoBytes txid_arg_conv = *(LDKThirtyTwoBytes*)txid_arg;
- FREE((void*)txid_arg);
- LDKOutPoint* ret = MALLOC(sizeof(LDKOutPoint), "LDKOutPoint");
- *ret = OutPoint_new(txid_arg_conv, index_arg);
- DO_ASSERT(ret->is_owned);
- ret->is_owned = false;
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutPoint_1to_1channel_1id(JNIEnv * _env, jclass _b, jlong this_arg) {
- LDKOutPoint* this_arg_conv = (LDKOutPoint*)this_arg;
- LDKThirtyTwoBytes* ret = MALLOC(sizeof(LDKThirtyTwoBytes), "LDKThirtyTwoBytes");
- *ret = OutPoint_to_channel_id(this_arg_conv);
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutPoint_1write(JNIEnv * _env, jclass _b, jlong obj) {
- LDKOutPoint* obj_conv = (LDKOutPoint*)obj;
- LDKCVec_u8Z* ret = MALLOC(sizeof(LDKCVec_u8Z), "LDKCVec_u8Z");
- *ret = OutPoint_write(obj_conv);
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutPoint_1read(JNIEnv * _env, jclass _b, jlong ser) {
- LDKu8slice ser_conv = *(LDKu8slice*)ser;
- LDKOutPoint* ret = MALLOC(sizeof(LDKOutPoint), "LDKOutPoint");
- *ret = OutPoint_read(ser_conv);
- DO_ASSERT(ret->is_owned);
- ret->is_owned = false;
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpendableOutputDescriptor_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKSpendableOutputDescriptor this_ptr_conv = *(LDKSpendableOutputDescriptor*)this_ptr;
- FREE((void*)this_ptr);
- return SpendableOutputDescriptor_free(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChannelKeys this_ptr_conv = *(LDKChannelKeys*)this_ptr;
- FREE((void*)this_ptr);
- return ChannelKeys_free(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_KeysInterface_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKKeysInterface this_ptr_conv = *(LDKKeysInterface*)this_ptr;
- FREE((void*)this_ptr);
- return KeysInterface_free(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKInMemoryChannelKeys this_ptr_conv = *(LDKInMemoryChannelKeys*)this_ptr;
- FREE((void*)this_ptr);
- this_ptr_conv.is_owned = true;
- return InMemoryChannelKeys_free(this_ptr_conv);
-}
-
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1funding_1key(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
- jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
- (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *InMemoryChannelKeys_get_funding_key(this_ptr_conv));
- return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1funding_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
- LDKSecretKey val_conv = *(LDKSecretKey*)val;
- FREE((void*)val);
- return InMemoryChannelKeys_set_funding_key(this_ptr_conv, val_conv);
-}
-
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1revocation_1base_1key(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
- jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
- (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *InMemoryChannelKeys_get_revocation_base_key(this_ptr_conv));
- return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1revocation_1base_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
- LDKSecretKey val_conv = *(LDKSecretKey*)val;
- FREE((void*)val);
- return InMemoryChannelKeys_set_revocation_base_key(this_ptr_conv, val_conv);
-}
-
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1payment_1key(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
- jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
- (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *InMemoryChannelKeys_get_payment_key(this_ptr_conv));
- return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1payment_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
- LDKSecretKey val_conv = *(LDKSecretKey*)val;
- FREE((void*)val);
- return InMemoryChannelKeys_set_payment_key(this_ptr_conv, val_conv);
-}
-
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1delayed_1payment_1base_1key(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
- jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
- (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *InMemoryChannelKeys_get_delayed_payment_base_key(this_ptr_conv));
- return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1delayed_1payment_1base_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
- LDKSecretKey val_conv = *(LDKSecretKey*)val;
- FREE((void*)val);
- return InMemoryChannelKeys_set_delayed_payment_base_key(this_ptr_conv, val_conv);
-}
-
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1htlc_1base_1key(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
- jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
- (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *InMemoryChannelKeys_get_htlc_base_key(this_ptr_conv));
- return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1htlc_1base_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
- LDKSecretKey val_conv = *(LDKSecretKey*)val;
- FREE((void*)val);
- return InMemoryChannelKeys_set_htlc_base_key(this_ptr_conv, val_conv);
-}
-
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1commitment_1seed(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
- jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
- (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *InMemoryChannelKeys_get_commitment_seed(this_ptr_conv));
- return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1commitment_1seed(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
- LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
- FREE((void*)val);
- return InMemoryChannelKeys_set_commitment_seed(this_ptr_conv, val_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1new(JNIEnv * _env, jclass _b, jlong funding_key, jlong revocation_base_key, jlong payment_key, jlong delayed_payment_base_key, jlong htlc_base_key, jlong commitment_seed, jlong channel_value_satoshis, jlong key_derivation_params) {
- LDKSecretKey funding_key_conv = *(LDKSecretKey*)funding_key;
- FREE((void*)funding_key);
- LDKSecretKey revocation_base_key_conv = *(LDKSecretKey*)revocation_base_key;
- FREE((void*)revocation_base_key);
- LDKSecretKey payment_key_conv = *(LDKSecretKey*)payment_key;
- FREE((void*)payment_key);
- LDKSecretKey delayed_payment_base_key_conv = *(LDKSecretKey*)delayed_payment_base_key;
- FREE((void*)delayed_payment_base_key);
- LDKSecretKey htlc_base_key_conv = *(LDKSecretKey*)htlc_base_key;
- FREE((void*)htlc_base_key);
- LDKThirtyTwoBytes commitment_seed_conv = *(LDKThirtyTwoBytes*)commitment_seed;
- FREE((void*)commitment_seed);
- LDKC2Tuple_u64u64Z key_derivation_params_conv = *(LDKC2Tuple_u64u64Z*)key_derivation_params;
- FREE((void*)key_derivation_params);
- LDKInMemoryChannelKeys* ret = MALLOC(sizeof(LDKInMemoryChannelKeys), "LDKInMemoryChannelKeys");
- *ret = InMemoryChannelKeys_new(funding_key_conv, revocation_base_key_conv, payment_key_conv, delayed_payment_base_key_conv, htlc_base_key_conv, commitment_seed_conv, channel_value_satoshis, key_derivation_params_conv);
- DO_ASSERT(ret->is_owned);
- ret->is_owned = false;
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1counterparty_1pubkeys(JNIEnv * _env, jclass _b, jlong this_arg) {
- LDKInMemoryChannelKeys* this_arg_conv = (LDKInMemoryChannelKeys*)this_arg;
- LDKChannelPublicKeys* ret = MALLOC(sizeof(LDKChannelPublicKeys), "LDKChannelPublicKeys");
- *ret = InMemoryChannelKeys_counterparty_pubkeys(this_arg_conv);
- DO_ASSERT(ret->is_owned);
- ret->is_owned = false;
- return (long)ret;
-}
-
-JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1counterparty_1selected_1contest_1delay(JNIEnv * _env, jclass _b, jlong this_arg) {
- LDKInMemoryChannelKeys* this_arg_conv = (LDKInMemoryChannelKeys*)this_arg;
- return InMemoryChannelKeys_counterparty_selected_contest_delay(this_arg_conv);
-}
-
-JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1holder_1selected_1contest_1delay(JNIEnv * _env, jclass _b, jlong this_arg) {
- LDKInMemoryChannelKeys* this_arg_conv = (LDKInMemoryChannelKeys*)this_arg;
- return InMemoryChannelKeys_holder_selected_contest_delay(this_arg_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1as_1ChannelKeys(JNIEnv * _env, jclass _b, jlong this_arg) {
- LDKInMemoryChannelKeys* this_arg_conv = (LDKInMemoryChannelKeys*)this_arg;
- LDKChannelKeys* ret = MALLOC(sizeof(LDKChannelKeys), "LDKChannelKeys");
- *ret = InMemoryChannelKeys_as_ChannelKeys(this_arg_conv);
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1write(JNIEnv * _env, jclass _b, jlong obj) {
- LDKInMemoryChannelKeys* obj_conv = (LDKInMemoryChannelKeys*)obj;
- LDKCVec_u8Z* ret = MALLOC(sizeof(LDKCVec_u8Z), "LDKCVec_u8Z");
- *ret = InMemoryChannelKeys_write(obj_conv);
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1read(JNIEnv * _env, jclass _b, jlong ser) {
- LDKu8slice ser_conv = *(LDKu8slice*)ser;
- LDKInMemoryChannelKeys* ret = MALLOC(sizeof(LDKInMemoryChannelKeys), "LDKInMemoryChannelKeys");
- *ret = InMemoryChannelKeys_read(ser_conv);
- DO_ASSERT(ret->is_owned);
- ret->is_owned = false;
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_KeysManager_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKKeysManager this_ptr_conv = *(LDKKeysManager*)this_ptr;
- FREE((void*)this_ptr);
- this_ptr_conv.is_owned = true;
- return KeysManager_free(this_ptr_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_KeysManager_1new(JNIEnv * _env, jclass _b, jbyteArray seed, jclass network, jlong starting_time_secs, jint starting_time_nanos) {
- unsigned char seed_arr[32];
- (*_env)->GetByteArrayRegion (_env, seed, 0, 32, seed_arr);
- unsigned char (*seed_ref)[32] = &seed_arr;
- LDKNetwork network_conv = LDKNetwork_from_java(_env, network);
- LDKKeysManager* ret = MALLOC(sizeof(LDKKeysManager), "LDKKeysManager");
- *ret = KeysManager_new(seed_ref, network_conv, starting_time_secs, starting_time_nanos);
- DO_ASSERT(ret->is_owned);
- ret->is_owned = false;
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_KeysManager_1derive_1channel_1keys(JNIEnv * _env, jclass _b, jlong this_arg, jlong channel_value_satoshis, jlong params_1, jlong params_2) {
- LDKKeysManager* this_arg_conv = (LDKKeysManager*)this_arg;
- LDKInMemoryChannelKeys* ret = MALLOC(sizeof(LDKInMemoryChannelKeys), "LDKInMemoryChannelKeys");
- *ret = KeysManager_derive_channel_keys(this_arg_conv, channel_value_satoshis, params_1, params_2);
- DO_ASSERT(ret->is_owned);
- ret->is_owned = false;
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1KeysInterface(JNIEnv * _env, jclass _b, jlong this_arg) {
- LDKKeysManager* this_arg_conv = (LDKKeysManager*)this_arg;
- LDKKeysInterface* ret = MALLOC(sizeof(LDKKeysInterface), "LDKKeysInterface");
- *ret = KeysManager_as_KeysInterface(this_arg_conv);
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChannelManager this_ptr_conv = *(LDKChannelManager*)this_ptr;
- FREE((void*)this_ptr);
- this_ptr_conv.is_owned = true;
- return ChannelManager_free(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChannelDetails this_ptr_conv = *(LDKChannelDetails*)this_ptr;
- FREE((void*)this_ptr);
- this_ptr_conv.is_owned = true;
- return ChannelDetails_free(this_ptr_conv);
-}
-
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
- jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
- (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *ChannelDetails_get_channel_id(this_ptr_conv));
- return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
- LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
- FREE((void*)val);
- return ChannelDetails_set_channel_id(this_ptr_conv, val_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1remote_1network_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
- LDKPublicKey* ret = MALLOC(sizeof(LDKPublicKey), "LDKPublicKey");
- *ret = ChannelDetails_get_remote_network_id(this_ptr_conv);
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1remote_1network_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
- LDKPublicKey val_conv = *(LDKPublicKey*)val;
- FREE((void*)val);
- return ChannelDetails_set_remote_network_id(this_ptr_conv, val_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1counterparty_1features(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
- LDKInitFeatures* ret = MALLOC(sizeof(LDKInitFeatures), "LDKInitFeatures");
- *ret = ChannelDetails_get_counterparty_features(this_ptr_conv);
- DO_ASSERT(ret->is_owned);
- ret->is_owned = false;
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1counterparty_1features(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
- LDKInitFeatures val_conv = *(LDKInitFeatures*)val;
- FREE((void*)val);
- val_conv.is_owned = true;
- return ChannelDetails_set_counterparty_features(this_ptr_conv, val_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1channel_1value_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
- return ChannelDetails_get_channel_value_satoshis(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1channel_1value_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
- return ChannelDetails_set_channel_value_satoshis(this_ptr_conv, val);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1user_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
- return ChannelDetails_get_user_id(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1user_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
- return ChannelDetails_set_user_id(this_ptr_conv, val);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1outbound_1capacity_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
- return ChannelDetails_get_outbound_capacity_msat(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1outbound_1capacity_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
- return ChannelDetails_set_outbound_capacity_msat(this_ptr_conv, val);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1inbound_1capacity_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
- return ChannelDetails_get_inbound_capacity_msat(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1inbound_1capacity_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
- return ChannelDetails_set_inbound_capacity_msat(this_ptr_conv, val);
-}
-
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1is_1live(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
- return ChannelDetails_get_is_live(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1is_1live(JNIEnv * _env, jclass _b, jlong this_ptr, jboolean val) {
- LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
- return ChannelDetails_set_is_live(this_ptr_conv, val);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PaymentSendFailure_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKPaymentSendFailure this_ptr_conv = *(LDKPaymentSendFailure*)this_ptr;
- FREE((void*)this_ptr);
- this_ptr_conv.is_owned = true;
- return PaymentSendFailure_free(this_ptr_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1new(JNIEnv * _env, jclass _b, jclass network, jlong fee_est, jlong chain_monitor, jlong tx_broadcaster, jlong logger, jlong keys_manager, jlong config, jlong current_blockchain_height) {
- LDKNetwork network_conv = LDKNetwork_from_java(_env, network);
- LDKFeeEstimator fee_est_conv = *(LDKFeeEstimator*)fee_est;
- if (fee_est_conv.free == LDKFeeEstimator_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKFeeEstimator_JCalls_clone(fee_est_conv.this_arg);
- }
- LDKWatch chain_monitor_conv = *(LDKWatch*)chain_monitor;
- if (chain_monitor_conv.free == LDKWatch_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKWatch_JCalls_clone(chain_monitor_conv.this_arg);
- }
- LDKBroadcasterInterface tx_broadcaster_conv = *(LDKBroadcasterInterface*)tx_broadcaster;
- if (tx_broadcaster_conv.free == LDKBroadcasterInterface_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKBroadcasterInterface_JCalls_clone(tx_broadcaster_conv.this_arg);
- }
- LDKLogger logger_conv = *(LDKLogger*)logger;
- if (logger_conv.free == LDKLogger_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKLogger_JCalls_clone(logger_conv.this_arg);
- }
- LDKKeysInterface keys_manager_conv = *(LDKKeysInterface*)keys_manager;
- if (keys_manager_conv.free == LDKKeysInterface_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKKeysInterface_JCalls_clone(keys_manager_conv.this_arg);
- }
- LDKUserConfig config_conv = *(LDKUserConfig*)config;
- FREE((void*)config);
- config_conv.is_owned = true;
- LDKChannelManager* ret = MALLOC(sizeof(LDKChannelManager), "LDKChannelManager");
- *ret = ChannelManager_new(network_conv, fee_est_conv, chain_monitor_conv, tx_broadcaster_conv, logger_conv, keys_manager_conv, config_conv, current_blockchain_height);
- DO_ASSERT(ret->is_owned);
- ret->is_owned = false;
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1create_1channel(JNIEnv * _env, jclass _b, jlong this_arg, jlong their_network_key, jlong channel_value_satoshis, jlong push_msat, jlong user_id, jlong override_config) {
- LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
- LDKPublicKey their_network_key_conv = *(LDKPublicKey*)their_network_key;
- FREE((void*)their_network_key);
- LDKUserConfig override_config_conv = *(LDKUserConfig*)override_config;
- FREE((void*)override_config);
- override_config_conv.is_owned = true;
- LDKCResult_NoneAPIErrorZ* ret = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
- *ret = ChannelManager_create_channel(this_arg_conv, their_network_key_conv, channel_value_satoshis, push_msat, user_id, override_config_conv);
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1list_1channels(JNIEnv * _env, jclass _b, jlong this_arg) {
- LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
- LDKCVec_ChannelDetailsZ* ret = MALLOC(sizeof(LDKCVec_ChannelDetailsZ), "LDKCVec_ChannelDetailsZ");
- *ret = ChannelManager_list_channels(this_arg_conv);
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1list_1usable_1channels(JNIEnv * _env, jclass _b, jlong this_arg) {
- LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
- LDKCVec_ChannelDetailsZ* ret = MALLOC(sizeof(LDKCVec_ChannelDetailsZ), "LDKCVec_ChannelDetailsZ");
- *ret = ChannelManager_list_usable_channels(this_arg_conv);
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1close_1channel(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray channel_id) {
- LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
- unsigned char channel_id_arr[32];
- (*_env)->GetByteArrayRegion (_env, channel_id, 0, 32, channel_id_arr);
- unsigned char (*channel_id_ref)[32] = &channel_id_arr;
- LDKCResult_NoneAPIErrorZ* ret = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
- *ret = ChannelManager_close_channel(this_arg_conv, channel_id_ref);
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1force_1close_1channel(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray channel_id) {
- LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
- unsigned char channel_id_arr[32];
- (*_env)->GetByteArrayRegion (_env, channel_id, 0, 32, channel_id_arr);
- unsigned char (*channel_id_ref)[32] = &channel_id_arr;
- return ChannelManager_force_close_channel(this_arg_conv, channel_id_ref);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1force_1close_1all_1channels(JNIEnv * _env, jclass _b, jlong this_arg) {
- LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
- return ChannelManager_force_close_all_channels(this_arg_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1send_1payment(JNIEnv * _env, jclass _b, jlong this_arg, jlong route, jlong payment_hash, jlong payment_secret) {
- LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
- LDKRoute* route_conv = (LDKRoute*)route;
- LDKThirtyTwoBytes payment_hash_conv = *(LDKThirtyTwoBytes*)payment_hash;
- FREE((void*)payment_hash);
- LDKThirtyTwoBytes payment_secret_conv = *(LDKThirtyTwoBytes*)payment_secret;
- FREE((void*)payment_secret);
- LDKCResult_NonePaymentSendFailureZ* ret = MALLOC(sizeof(LDKCResult_NonePaymentSendFailureZ), "LDKCResult_NonePaymentSendFailureZ");
- *ret = ChannelManager_send_payment(this_arg_conv, route_conv, payment_hash_conv, payment_secret_conv);
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1funding_1transaction_1generated(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray temporary_channel_id, jlong funding_txo) {
- LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
- unsigned char temporary_channel_id_arr[32];
- (*_env)->GetByteArrayRegion (_env, temporary_channel_id, 0, 32, temporary_channel_id_arr);
- unsigned char (*temporary_channel_id_ref)[32] = &temporary_channel_id_arr;
- LDKOutPoint funding_txo_conv = *(LDKOutPoint*)funding_txo;
- FREE((void*)funding_txo);
- funding_txo_conv.is_owned = true;
- return ChannelManager_funding_transaction_generated(this_arg_conv, temporary_channel_id_ref, funding_txo_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1broadcast_1node_1announcement(JNIEnv * _env, jclass _b, jlong this_arg, jlong rgb, jlong alias, jlong addresses) {
- LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
- LDKThreeBytes rgb_conv = *(LDKThreeBytes*)rgb;
- FREE((void*)rgb);
- LDKThirtyTwoBytes alias_conv = *(LDKThirtyTwoBytes*)alias;
- FREE((void*)alias);
- LDKCVec_NetAddressZ addresses_conv = *(LDKCVec_NetAddressZ*)addresses;
- FREE((void*)addresses);
- return ChannelManager_broadcast_node_announcement(this_arg_conv, rgb_conv, alias_conv, addresses_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1process_1pending_1htlc_1forwards(JNIEnv * _env, jclass _b, jlong this_arg) {
- LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
- return ChannelManager_process_pending_htlc_forwards(this_arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1timer_1chan_1freshness_1every_1min(JNIEnv * _env, jclass _b, jlong this_arg) {
- LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
- return ChannelManager_timer_chan_freshness_every_min(this_arg_conv);
-}
-
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelManager_1fail_1htlc_1backwards(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray payment_hash, jlong payment_secret) {
- LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
- unsigned char payment_hash_arr[32];
- (*_env)->GetByteArrayRegion (_env, payment_hash, 0, 32, payment_hash_arr);
- unsigned char (*payment_hash_ref)[32] = &payment_hash_arr;
- LDKThirtyTwoBytes payment_secret_conv = *(LDKThirtyTwoBytes*)payment_secret;
- FREE((void*)payment_secret);
- return ChannelManager_fail_htlc_backwards(this_arg_conv, payment_hash_ref, payment_secret_conv);
-}
-
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelManager_1claim_1funds(JNIEnv * _env, jclass _b, jlong this_arg, jlong payment_preimage, jlong payment_secret, jlong expected_amount) {
- LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
- LDKThirtyTwoBytes payment_preimage_conv = *(LDKThirtyTwoBytes*)payment_preimage;
- FREE((void*)payment_preimage);
- LDKThirtyTwoBytes payment_secret_conv = *(LDKThirtyTwoBytes*)payment_secret;
- FREE((void*)payment_secret);
- return ChannelManager_claim_funds(this_arg_conv, payment_preimage_conv, payment_secret_conv, expected_amount);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1get_1our_1node_1id(JNIEnv * _env, jclass _b, jlong this_arg) {
- LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
- LDKPublicKey* ret = MALLOC(sizeof(LDKPublicKey), "LDKPublicKey");
- *ret = ChannelManager_get_our_node_id(this_arg_conv);
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1channel_1monitor_1updated(JNIEnv * _env, jclass _b, jlong this_arg, jlong funding_txo, jlong highest_applied_update_id) {
- LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
- LDKOutPoint* funding_txo_conv = (LDKOutPoint*)funding_txo;
- return ChannelManager_channel_monitor_updated(this_arg_conv, funding_txo_conv, highest_applied_update_id);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1MessageSendEventsProvider(JNIEnv * _env, jclass _b, jlong this_arg) {
- LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
- LDKMessageSendEventsProvider* ret = MALLOC(sizeof(LDKMessageSendEventsProvider), "LDKMessageSendEventsProvider");
- *ret = ChannelManager_as_MessageSendEventsProvider(this_arg_conv);
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1EventsProvider(JNIEnv * _env, jclass _b, jlong this_arg) {
- LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
- LDKEventsProvider* ret = MALLOC(sizeof(LDKEventsProvider), "LDKEventsProvider");
- *ret = ChannelManager_as_EventsProvider(this_arg_conv);
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1block_1connected(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray header, jlong txdata, jint height) {
- LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
- unsigned char header_arr[80];
- (*_env)->GetByteArrayRegion (_env, header, 0, 80, header_arr);
- unsigned char (*header_ref)[80] = &header_arr;
- LDKCVec_C2Tuple_usizeTransactionZZ txdata_conv = *(LDKCVec_C2Tuple_usizeTransactionZZ*)txdata;
- FREE((void*)txdata);
- return ChannelManager_block_connected(this_arg_conv, header_ref, txdata_conv, height);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1block_1disconnected(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray header) {
- LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
- unsigned char header_arr[80];
- (*_env)->GetByteArrayRegion (_env, header, 0, 80, header_arr);
- unsigned char (*header_ref)[80] = &header_arr;
- return ChannelManager_block_disconnected(this_arg_conv, header_ref);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1ChannelMessageHandler(JNIEnv * _env, jclass _b, jlong this_arg) {
- LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
- LDKChannelMessageHandler* ret = MALLOC(sizeof(LDKChannelMessageHandler), "LDKChannelMessageHandler");
- *ret = ChannelManager_as_ChannelMessageHandler(this_arg_conv);
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChannelManagerReadArgs this_ptr_conv = *(LDKChannelManagerReadArgs*)this_ptr;
- FREE((void*)this_ptr);
- this_ptr_conv.is_owned = true;
- return ChannelManagerReadArgs_free(this_ptr_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1get_1keys_1manager(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
- long ret = (long)ChannelManagerReadArgs_get_keys_manager(this_ptr_conv);
- return ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1set_1keys_1manager(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
- LDKKeysInterface val_conv = *(LDKKeysInterface*)val;
- if (val_conv.free == LDKKeysInterface_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKKeysInterface_JCalls_clone(val_conv.this_arg);
- }
- return ChannelManagerReadArgs_set_keys_manager(this_ptr_conv, val_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1get_1fee_1estimator(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
- long ret = (long)ChannelManagerReadArgs_get_fee_estimator(this_ptr_conv);
- return ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1set_1fee_1estimator(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
- LDKFeeEstimator val_conv = *(LDKFeeEstimator*)val;
- if (val_conv.free == LDKFeeEstimator_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKFeeEstimator_JCalls_clone(val_conv.this_arg);
- }
- return ChannelManagerReadArgs_set_fee_estimator(this_ptr_conv, val_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1get_1chain_1monitor(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
- long ret = (long)ChannelManagerReadArgs_get_chain_monitor(this_ptr_conv);
- return ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1set_1chain_1monitor(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
- LDKWatch val_conv = *(LDKWatch*)val;
- if (val_conv.free == LDKWatch_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKWatch_JCalls_clone(val_conv.this_arg);
- }
- return ChannelManagerReadArgs_set_chain_monitor(this_ptr_conv, val_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1get_1tx_1broadcaster(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
- long ret = (long)ChannelManagerReadArgs_get_tx_broadcaster(this_ptr_conv);
- return ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1set_1tx_1broadcaster(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
- LDKBroadcasterInterface val_conv = *(LDKBroadcasterInterface*)val;
- if (val_conv.free == LDKBroadcasterInterface_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKBroadcasterInterface_JCalls_clone(val_conv.this_arg);
- }
- return ChannelManagerReadArgs_set_tx_broadcaster(this_ptr_conv, val_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1get_1logger(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
- long ret = (long)ChannelManagerReadArgs_get_logger(this_ptr_conv);
- return ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1set_1logger(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
- LDKLogger val_conv = *(LDKLogger*)val;
- if (val_conv.free == LDKLogger_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKLogger_JCalls_clone(val_conv.this_arg);
- }
- return ChannelManagerReadArgs_set_logger(this_ptr_conv, val_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1get_1default_1config(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
- LDKUserConfig* ret = MALLOC(sizeof(LDKUserConfig), "LDKUserConfig");
- *ret = ChannelManagerReadArgs_get_default_config(this_ptr_conv);
- DO_ASSERT(ret->is_owned);
- ret->is_owned = false;
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1set_1default_1config(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
- LDKUserConfig val_conv = *(LDKUserConfig*)val;
- FREE((void*)val);
- val_conv.is_owned = true;
- return ChannelManagerReadArgs_set_default_config(this_ptr_conv, val_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1new(JNIEnv * _env, jclass _b, jlong keys_manager, jlong fee_estimator, jlong chain_monitor, jlong tx_broadcaster, jlong logger, jlong default_config, jlong channel_monitors) {
- LDKKeysInterface keys_manager_conv = *(LDKKeysInterface*)keys_manager;
- if (keys_manager_conv.free == LDKKeysInterface_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKKeysInterface_JCalls_clone(keys_manager_conv.this_arg);
- }
- LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)fee_estimator;
- if (fee_estimator_conv.free == LDKFeeEstimator_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKFeeEstimator_JCalls_clone(fee_estimator_conv.this_arg);
- }
- LDKWatch chain_monitor_conv = *(LDKWatch*)chain_monitor;
- if (chain_monitor_conv.free == LDKWatch_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKWatch_JCalls_clone(chain_monitor_conv.this_arg);
- }
- LDKBroadcasterInterface tx_broadcaster_conv = *(LDKBroadcasterInterface*)tx_broadcaster;
- if (tx_broadcaster_conv.free == LDKBroadcasterInterface_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKBroadcasterInterface_JCalls_clone(tx_broadcaster_conv.this_arg);
- }
- LDKLogger logger_conv = *(LDKLogger*)logger;
- if (logger_conv.free == LDKLogger_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKLogger_JCalls_clone(logger_conv.this_arg);
- }
- LDKUserConfig default_config_conv = *(LDKUserConfig*)default_config;
- FREE((void*)default_config);
- default_config_conv.is_owned = true;
- LDKCVec_ChannelMonitorZ channel_monitors_conv = *(LDKCVec_ChannelMonitorZ*)channel_monitors;
- FREE((void*)channel_monitors);
- LDKChannelManagerReadArgs* ret = MALLOC(sizeof(LDKChannelManagerReadArgs), "LDKChannelManagerReadArgs");
- *ret = ChannelManagerReadArgs_new(keys_manager_conv, fee_estimator_conv, chain_monitor_conv, tx_broadcaster_conv, logger_conv, default_config_conv, channel_monitors_conv);
- DO_ASSERT(ret->is_owned);
- ret->is_owned = false;
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DecodeError_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKDecodeError this_ptr_conv = *(LDKDecodeError*)this_ptr;
- FREE((void*)this_ptr);
- this_ptr_conv.is_owned = true;
- return DecodeError_free(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Init_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKInit this_ptr_conv = *(LDKInit*)this_ptr;
- FREE((void*)this_ptr);
- this_ptr_conv.is_owned = true;
- return Init_free(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKErrorMessage this_ptr_conv = *(LDKErrorMessage*)this_ptr;
- FREE((void*)this_ptr);
- this_ptr_conv.is_owned = true;
- return ErrorMessage_free(this_ptr_conv);
-}
-
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKErrorMessage* this_ptr_conv = (LDKErrorMessage*)this_ptr;
- jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
- (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *ErrorMessage_get_channel_id(this_ptr_conv));
- return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKErrorMessage* this_ptr_conv = (LDKErrorMessage*)this_ptr;
- LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
- FREE((void*)val);
- return ErrorMessage_set_channel_id(this_ptr_conv, val_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1get_1data(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKErrorMessage* this_ptr_conv = (LDKErrorMessage*)this_ptr;
- LDKStr* ret = MALLOC(sizeof(LDKStr), "LDKStr");
- *ret = ErrorMessage_get_data(this_ptr_conv);
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1set_1data(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKErrorMessage* this_ptr_conv = (LDKErrorMessage*)this_ptr;
- LDKCVec_u8Z val_conv = *(LDKCVec_u8Z*)val;
- FREE((void*)val);
- return ErrorMessage_set_data(this_ptr_conv, val_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1new(JNIEnv * _env, jclass _b, jlong channel_id_arg, jlong data_arg) {
- LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
- FREE((void*)channel_id_arg);
- LDKCVec_u8Z data_arg_conv = *(LDKCVec_u8Z*)data_arg;
- FREE((void*)data_arg);
- LDKErrorMessage* ret = MALLOC(sizeof(LDKErrorMessage), "LDKErrorMessage");
- *ret = ErrorMessage_new(channel_id_arg_conv, data_arg_conv);
- DO_ASSERT(ret->is_owned);
- ret->is_owned = false;
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Ping_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKPing this_ptr_conv = *(LDKPing*)this_ptr;
- FREE((void*)this_ptr);
- this_ptr_conv.is_owned = true;
- return Ping_free(this_ptr_conv);
-}
-
-JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_Ping_1get_1ponglen(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKPing* this_ptr_conv = (LDKPing*)this_ptr;
- return Ping_get_ponglen(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Ping_1set_1ponglen(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
- LDKPing* this_ptr_conv = (LDKPing*)this_ptr;
- return Ping_set_ponglen(this_ptr_conv, val);
-}
-
-JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_Ping_1get_1byteslen(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKPing* this_ptr_conv = (LDKPing*)this_ptr;
- return Ping_get_byteslen(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Ping_1set_1byteslen(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
- LDKPing* this_ptr_conv = (LDKPing*)this_ptr;
- return Ping_set_byteslen(this_ptr_conv, val);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Ping_1new(JNIEnv * _env, jclass _b, jshort ponglen_arg, jshort byteslen_arg) {
- LDKPing* ret = MALLOC(sizeof(LDKPing), "LDKPing");
- *ret = Ping_new(ponglen_arg, byteslen_arg);
- DO_ASSERT(ret->is_owned);
- ret->is_owned = false;
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Pong_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKPong this_ptr_conv = *(LDKPong*)this_ptr;
- FREE((void*)this_ptr);
- this_ptr_conv.is_owned = true;
- return Pong_free(this_ptr_conv);
-}
-
-JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_Pong_1get_1byteslen(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKPong* this_ptr_conv = (LDKPong*)this_ptr;
- return Pong_get_byteslen(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Pong_1set_1byteslen(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
- LDKPong* this_ptr_conv = (LDKPong*)this_ptr;
- return Pong_set_byteslen(this_ptr_conv, val);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Pong_1new(JNIEnv * _env, jclass _b, jshort byteslen_arg) {
- LDKPong* ret = MALLOC(sizeof(LDKPong), "LDKPong");
- *ret = Pong_new(byteslen_arg);
- DO_ASSERT(ret->is_owned);
- ret->is_owned = false;
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKOpenChannel this_ptr_conv = *(LDKOpenChannel*)this_ptr;
- FREE((void*)this_ptr);
- this_ptr_conv.is_owned = true;
- return OpenChannel_free(this_ptr_conv);
-}
-
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
- jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
- (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *OpenChannel_get_chain_hash(this_ptr_conv));
- return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
- LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
- FREE((void*)val);
- return OpenChannel_set_chain_hash(this_ptr_conv, val_conv);
-}
-
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1temporary_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
- jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
- (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *OpenChannel_get_temporary_channel_id(this_ptr_conv));
- return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1temporary_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
- LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
- FREE((void*)val);
- return OpenChannel_set_temporary_channel_id(this_ptr_conv, val_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1funding_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
- return OpenChannel_get_funding_satoshis(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1funding_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
- return OpenChannel_set_funding_satoshis(this_ptr_conv, val);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1push_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
- return OpenChannel_get_push_msat(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1push_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
- return OpenChannel_set_push_msat(this_ptr_conv, val);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1dust_1limit_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
- return OpenChannel_get_dust_limit_satoshis(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1dust_1limit_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
- return OpenChannel_set_dust_limit_satoshis(this_ptr_conv, val);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
- return OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1max_1htlc_1value_1in_1flight_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
- return OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr_conv, val);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1reserve_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
- return OpenChannel_get_channel_reserve_satoshis(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1reserve_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
- return OpenChannel_set_channel_reserve_satoshis(this_ptr_conv, val);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
- return OpenChannel_get_htlc_minimum_msat(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
- return OpenChannel_set_htlc_minimum_msat(this_ptr_conv, val);
-}
-
-JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1feerate_1per_1kw(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
- return OpenChannel_get_feerate_per_kw(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1feerate_1per_1kw(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
- LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
- return OpenChannel_set_feerate_per_kw(this_ptr_conv, val);
-}
-
-JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
- return OpenChannel_get_to_self_delay(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
- LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
- return OpenChannel_set_to_self_delay(this_ptr_conv, val);
-}
-
-JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1max_1accepted_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
- return OpenChannel_get_max_accepted_htlcs(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1max_1accepted_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
- LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
- return OpenChannel_set_max_accepted_htlcs(this_ptr_conv, val);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1funding_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
- LDKPublicKey* ret = MALLOC(sizeof(LDKPublicKey), "LDKPublicKey");
- *ret = OpenChannel_get_funding_pubkey(this_ptr_conv);
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1funding_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
- LDKPublicKey val_conv = *(LDKPublicKey*)val;
- FREE((void*)val);
- return OpenChannel_set_funding_pubkey(this_ptr_conv, val_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1revocation_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
- LDKPublicKey* ret = MALLOC(sizeof(LDKPublicKey), "LDKPublicKey");
- *ret = OpenChannel_get_revocation_basepoint(this_ptr_conv);
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1revocation_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
- LDKPublicKey val_conv = *(LDKPublicKey*)val;
- FREE((void*)val);
- return OpenChannel_set_revocation_basepoint(this_ptr_conv, val_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1payment_1point(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
- LDKPublicKey* ret = MALLOC(sizeof(LDKPublicKey), "LDKPublicKey");
- *ret = OpenChannel_get_payment_point(this_ptr_conv);
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1payment_1point(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
- LDKPublicKey val_conv = *(LDKPublicKey*)val;
- FREE((void*)val);
- return OpenChannel_set_payment_point(this_ptr_conv, val_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1delayed_1payment_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
- LDKPublicKey* ret = MALLOC(sizeof(LDKPublicKey), "LDKPublicKey");
- *ret = OpenChannel_get_delayed_payment_basepoint(this_ptr_conv);
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1delayed_1payment_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
- LDKPublicKey val_conv = *(LDKPublicKey*)val;
- FREE((void*)val);
- return OpenChannel_set_delayed_payment_basepoint(this_ptr_conv, val_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1htlc_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
- LDKPublicKey* ret = MALLOC(sizeof(LDKPublicKey), "LDKPublicKey");
- *ret = OpenChannel_get_htlc_basepoint(this_ptr_conv);
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1htlc_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
- LDKPublicKey val_conv = *(LDKPublicKey*)val;
- FREE((void*)val);
- return OpenChannel_set_htlc_basepoint(this_ptr_conv, val_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1first_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
- LDKPublicKey* ret = MALLOC(sizeof(LDKPublicKey), "LDKPublicKey");
- *ret = OpenChannel_get_first_per_commitment_point(this_ptr_conv);
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1first_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
- LDKPublicKey val_conv = *(LDKPublicKey*)val;
- FREE((void*)val);
- return OpenChannel_set_first_per_commitment_point(this_ptr_conv, val_conv);
-}
-
-JNIEXPORT jbyte JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1flags(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
- return OpenChannel_get_channel_flags(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1flags(JNIEnv * _env, jclass _b, jlong this_ptr, jbyte val) {
- LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
- return OpenChannel_set_channel_flags(this_ptr_conv, val);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKAcceptChannel this_ptr_conv = *(LDKAcceptChannel*)this_ptr;
- FREE((void*)this_ptr);
- this_ptr_conv.is_owned = true;
- return AcceptChannel_free(this_ptr_conv);
-}
-
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1temporary_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
- jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
- (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *AcceptChannel_get_temporary_channel_id(this_ptr_conv));
- return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1temporary_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
- LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
- FREE((void*)val);
- return AcceptChannel_set_temporary_channel_id(this_ptr_conv, val_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1dust_1limit_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
- return AcceptChannel_get_dust_limit_satoshis(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1dust_1limit_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
- return AcceptChannel_set_dust_limit_satoshis(this_ptr_conv, val);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
- return AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1max_1htlc_1value_1in_1flight_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
- return AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr_conv, val);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1channel_1reserve_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
- return AcceptChannel_get_channel_reserve_satoshis(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1channel_1reserve_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
- return AcceptChannel_set_channel_reserve_satoshis(this_ptr_conv, val);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
- return AcceptChannel_get_htlc_minimum_msat(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
- return AcceptChannel_set_htlc_minimum_msat(this_ptr_conv, val);
-}
-
-JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1minimum_1depth(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
- return AcceptChannel_get_minimum_depth(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1minimum_1depth(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
- LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
- return AcceptChannel_set_minimum_depth(this_ptr_conv, val);
-}
-
-JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
- return AcceptChannel_get_to_self_delay(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
- LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
- return AcceptChannel_set_to_self_delay(this_ptr_conv, val);
-}
-
-JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1max_1accepted_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
- return AcceptChannel_get_max_accepted_htlcs(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1max_1accepted_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
- LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
- return AcceptChannel_set_max_accepted_htlcs(this_ptr_conv, val);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1funding_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
- LDKPublicKey* ret = MALLOC(sizeof(LDKPublicKey), "LDKPublicKey");
- *ret = AcceptChannel_get_funding_pubkey(this_ptr_conv);
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1funding_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
- LDKPublicKey val_conv = *(LDKPublicKey*)val;
- FREE((void*)val);
- return AcceptChannel_set_funding_pubkey(this_ptr_conv, val_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1revocation_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
- LDKPublicKey* ret = MALLOC(sizeof(LDKPublicKey), "LDKPublicKey");
- *ret = AcceptChannel_get_revocation_basepoint(this_ptr_conv);
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1revocation_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
- LDKPublicKey val_conv = *(LDKPublicKey*)val;
- FREE((void*)val);
- return AcceptChannel_set_revocation_basepoint(this_ptr_conv, val_conv);