- LDKCResult_SignatureNoneZ* ret = malloc(sizeof(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));
- *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));
- *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));
- *ret = CResult_NonePaymentSendFailureZ_ok();
- 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));
- *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));
- *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._underlying_ref = false;
- LDKCVec_u8Z b_conv = *(LDKCVec_u8Z*)b;
- free((void*)b);
- LDKC2Tuple_OutPointScriptZ* ret = malloc(sizeof(LDKC2Tuple_OutPointScriptZ));
- *ret = C2Tuple_OutPointScriptZ_new(a_conv, b_conv);
- 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._underlying_ref = false;
- LDKChannelUpdate b_conv = *(LDKChannelUpdate*)b;
- free((void*)b);
- b_conv._underlying_ref = false;
- LDKChannelUpdate c_conv = *(LDKChannelUpdate*)c;
- free((void*)c);
- c_conv._underlying_ref = false;
- LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret = malloc(sizeof(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));
- *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._underlying_ref = false;
- LDKSignature b_conv = *(LDKSignature*)b;
- free((void*)b);
- LDKC2Tuple_HTLCOutputInCommitmentSignatureZ* ret = malloc(sizeof(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 jlong JNICALL Java_org_ldk_impl_bindings_Level_1max(JNIEnv * _env, jclass _b) {
- LDKLevel* ret = malloc(sizeof(LDKLevel));
- *ret = Level_max();
- return (long)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._underlying_ref = false;
- 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 jlong 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;
- uint16_t* ret = malloc(sizeof(uint16_t));
- *ret = ChannelHandshakeConfig_get_our_to_self_delay(this_ptr_conv);
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1set_1our_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKChannelHandshakeConfig* this_ptr_conv = (LDKChannelHandshakeConfig*)this_ptr;
- uint16_t val_conv = *(uint16_t*)val;
- free((void*)val);
- return ChannelHandshakeConfig_set_our_to_self_delay(this_ptr_conv, val_conv);
-}
-
-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, jlong our_to_self_delay_arg, jlong our_htlc_minimum_msat_arg) {
- uint16_t our_to_self_delay_arg_conv = *(uint16_t*)our_to_self_delay_arg;
- free((void*)our_to_self_delay_arg);
- LDKChannelHandshakeConfig* ret = malloc(sizeof(LDKChannelHandshakeConfig));
- *ret = ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg_conv, our_htlc_minimum_msat_arg);
- assert(!ret->_underlying_ref);
- ret->_underlying_ref = true;
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1default(JNIEnv * _env, jclass _b) {
- LDKChannelHandshakeConfig* ret = malloc(sizeof(LDKChannelHandshakeConfig));
- *ret = ChannelHandshakeConfig_default();
- assert(!ret->_underlying_ref);
- ret->_underlying_ref = true;
- 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._underlying_ref = false;
- 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 jlong 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;
- uint16_t* ret = malloc(sizeof(uint16_t));
- *ret = ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr_conv);
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1min_1max_1accepted_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
- uint16_t val_conv = *(uint16_t*)val;
- free((void*)val);
- return ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr_conv, val_conv);
-}
-
-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 jlong 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;
- uint16_t* ret = malloc(sizeof(uint16_t));
- *ret = ChannelHandshakeLimits_get_their_to_self_delay(this_ptr_conv);
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1their_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
- uint16_t val_conv = *(uint16_t*)val;
- free((void*)val);
- return ChannelHandshakeLimits_set_their_to_self_delay(this_ptr_conv, val_conv);
-}
-
-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, jlong 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, jlong their_to_self_delay_arg) {
- uint16_t min_max_accepted_htlcs_arg_conv = *(uint16_t*)min_max_accepted_htlcs_arg;
- free((void*)min_max_accepted_htlcs_arg);
- uint16_t their_to_self_delay_arg_conv = *(uint16_t*)their_to_self_delay_arg;
- free((void*)their_to_self_delay_arg);
- LDKChannelHandshakeLimits* ret = malloc(sizeof(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_conv, min_dust_limit_satoshis_arg, max_dust_limit_satoshis_arg, max_minimum_depth_arg, force_announced_channel_preference_arg, their_to_self_delay_arg_conv);
- assert(!ret->_underlying_ref);
- ret->_underlying_ref = true;
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1default(JNIEnv * _env, jclass _b) {
- LDKChannelHandshakeLimits* ret = malloc(sizeof(LDKChannelHandshakeLimits));
- *ret = ChannelHandshakeLimits_default();
- assert(!ret->_underlying_ref);
- ret->_underlying_ref = true;
- 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._underlying_ref = false;
- 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));
- *ret = ChannelConfig_new(fee_proportional_millionths_arg, announced_channel_arg, commit_upfront_shutdown_pubkey_arg);
- assert(!ret->_underlying_ref);
- ret->_underlying_ref = true;
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1default(JNIEnv * _env, jclass _b) {
- LDKChannelConfig* ret = malloc(sizeof(LDKChannelConfig));
- *ret = ChannelConfig_default();
- assert(!ret->_underlying_ref);
- ret->_underlying_ref = true;
- 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));
- *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;
- free((void*)ser);
- LDKChannelConfig* ret = malloc(sizeof(LDKChannelConfig));
- *ret = ChannelConfig_read(ser_conv);
- assert(!ret->_underlying_ref);
- ret->_underlying_ref = true;
- 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._underlying_ref = false;
- 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));
- *ret = UserConfig_get_own_channel_config(this_ptr_conv);
- assert(!ret->_underlying_ref);
- ret->_underlying_ref = true;
- 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._underlying_ref = false;
- 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));
- *ret = UserConfig_get_peer_channel_config_limits(this_ptr_conv);
- assert(!ret->_underlying_ref);
- ret->_underlying_ref = true;
- 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._underlying_ref = false;
- 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));
- *ret = UserConfig_get_channel_options(this_ptr_conv);
- assert(!ret->_underlying_ref);
- ret->_underlying_ref = true;
- 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._underlying_ref = false;
- 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._underlying_ref = false;
- 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._underlying_ref = false;
- LDKChannelConfig channel_options_arg_conv = *(LDKChannelConfig*)channel_options_arg;
- free((void*)channel_options_arg);
- channel_options_arg_conv._underlying_ref = false;
- LDKUserConfig* ret = malloc(sizeof(LDKUserConfig));
- *ret = UserConfig_new(own_channel_config_arg_conv, peer_channel_config_limits_arg_conv, channel_options_arg_conv);
- assert(!ret->_underlying_ref);
- ret->_underlying_ref = true;
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UserConfig_1default(JNIEnv * _env, jclass _b) {
- LDKUserConfig* ret = malloc(sizeof(LDKUserConfig));
- *ret = UserConfig_default();
- assert(!ret->_underlying_ref);
- ret->_underlying_ref = true;
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainWatchInterface_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChainWatchInterface this_ptr_conv = *(LDKChainWatchInterface*)this_ptr;
- free((void*)this_ptr);
- return ChainWatchInterface_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_ChainListener_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChainListener this_ptr_conv = *(LDKChainListener*)this_ptr;
- free((void*)this_ptr);
- return ChainListener_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_ChainWatchedUtil_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChainWatchedUtil this_ptr_conv = *(LDKChainWatchedUtil*)this_ptr;
- free((void*)this_ptr);
- this_ptr_conv._underlying_ref = false;
- return ChainWatchedUtil_free(this_ptr_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChainWatchedUtil_1new(JNIEnv * _env, jclass _b) {
- LDKChainWatchedUtil* ret = malloc(sizeof(LDKChainWatchedUtil));
- *ret = ChainWatchedUtil_new();
- assert(!ret->_underlying_ref);
- ret->_underlying_ref = true;
- return (long)ret;
-}
-
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChainWatchedUtil_1register_1tx(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray txid, jlong script_pub_key) {
- LDKChainWatchedUtil* this_arg_conv = (LDKChainWatchedUtil*)this_arg;
- unsigned char txid_arr[32];
- (*_env)->GetByteArrayRegion (_env, txid, 0, 32, txid_arr);
- unsigned char (*txid_ref)[32] = &txid_arr;
- LDKu8slice script_pub_key_conv = *(LDKu8slice*)script_pub_key;
- free((void*)script_pub_key);
- return ChainWatchedUtil_register_tx(this_arg_conv, txid_ref, script_pub_key_conv);
-}
-
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChainWatchedUtil_1register_1outpoint(JNIEnv * _env, jclass _b, jlong this_arg, jlong outpoint, jlong _script_pub_key) {
- LDKChainWatchedUtil* this_arg_conv = (LDKChainWatchedUtil*)this_arg;
- LDKC2Tuple_Txidu32Z outpoint_conv = *(LDKC2Tuple_Txidu32Z*)outpoint;
- free((void*)outpoint);
- LDKu8slice _script_pub_key_conv = *(LDKu8slice*)_script_pub_key;
- free((void*)_script_pub_key);
- return ChainWatchedUtil_register_outpoint(this_arg_conv, outpoint_conv, _script_pub_key_conv);
-}
-
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChainWatchedUtil_1watch_1all(JNIEnv * _env, jclass _b, jlong this_arg) {
- LDKChainWatchedUtil* this_arg_conv = (LDKChainWatchedUtil*)this_arg;
- return ChainWatchedUtil_watch_all(this_arg_conv);
-}
-
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChainWatchedUtil_1does_1match_1tx(JNIEnv * _env, jclass _b, jlong this_arg, jlong tx) {
- LDKChainWatchedUtil* this_arg_conv = (LDKChainWatchedUtil*)this_arg;
- LDKTransaction tx_conv = *(LDKTransaction*)tx;
- free((void*)tx);
- return ChainWatchedUtil_does_match_tx(this_arg_conv, tx_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlockNotifier_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKBlockNotifier this_ptr_conv = *(LDKBlockNotifier*)this_ptr;
- free((void*)this_ptr);
- this_ptr_conv._underlying_ref = false;
- return BlockNotifier_free(this_ptr_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BlockNotifier_1new(JNIEnv * _env, jclass _b, jlong chain_monitor) {
- LDKChainWatchInterface chain_monitor_conv = *(LDKChainWatchInterface*)chain_monitor;
- free((void*)chain_monitor);
- LDKBlockNotifier* ret = malloc(sizeof(LDKBlockNotifier));
- *ret = BlockNotifier_new(chain_monitor_conv);
- assert(!ret->_underlying_ref);
- ret->_underlying_ref = true;
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlockNotifier_1register_1listener(JNIEnv * _env, jclass _b, jlong this_arg, jlong listener) {
- LDKBlockNotifier* this_arg_conv = (LDKBlockNotifier*)this_arg;
- LDKChainListener listener_conv = *(LDKChainListener*)listener;
- free((void*)listener);
- return BlockNotifier_register_listener(this_arg_conv, listener_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlockNotifier_1block_1connected(JNIEnv * _env, jclass _b, jlong this_arg, jlong block, jint height) {
- LDKBlockNotifier* this_arg_conv = (LDKBlockNotifier*)this_arg;
- LDKu8slice block_conv = *(LDKu8slice*)block;
- free((void*)block);
- return BlockNotifier_block_connected(this_arg_conv, block_conv, height);
-}
-
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_BlockNotifier_1block_1connected_1checked(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray header, jint height, jlong txn_matched, jlong indexes_of_txn_matched) {
- LDKBlockNotifier* this_arg_conv = (LDKBlockNotifier*)this_arg;
- unsigned char header_arr[80];
- (*_env)->GetByteArrayRegion (_env, header, 0, 80, header_arr);
- unsigned char (*header_ref)[80] = &header_arr;
- LDKCVec_TransactionZ txn_matched_conv = *(LDKCVec_TransactionZ*)txn_matched;
- free((void*)txn_matched);
- LDKusizeslice indexes_of_txn_matched_conv = *(LDKusizeslice*)indexes_of_txn_matched;
- free((void*)indexes_of_txn_matched);
- return BlockNotifier_block_connected_checked(this_arg_conv, header_ref, height, txn_matched_conv, indexes_of_txn_matched_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlockNotifier_1block_1disconnected(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray header, jint disconnected_height) {
- LDKBlockNotifier* this_arg_conv = (LDKBlockNotifier*)this_arg;
- unsigned char header_arr[80];
- (*_env)->GetByteArrayRegion (_env, header, 0, 80, header_arr);
- unsigned char (*header_ref)[80] = &header_arr;
- return BlockNotifier_block_disconnected(this_arg_conv, header_ref, disconnected_height);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainWatchInterfaceUtil_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKChainWatchInterfaceUtil this_ptr_conv = *(LDKChainWatchInterfaceUtil*)this_ptr;
- free((void*)this_ptr);
- this_ptr_conv._underlying_ref = false;
- return ChainWatchInterfaceUtil_free(this_ptr_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChainWatchInterfaceUtil_1as_1ChainWatchInterface(JNIEnv * _env, jclass _b, jlong this_arg) {
- LDKChainWatchInterfaceUtil* this_arg_conv = (LDKChainWatchInterfaceUtil*)this_arg;
- LDKChainWatchInterface* ret = malloc(sizeof(LDKChainWatchInterface));
- *ret = ChainWatchInterfaceUtil_as_ChainWatchInterface(this_arg_conv);
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChainWatchInterfaceUtil_1new(JNIEnv * _env, jclass _b, jlong network) {
- LDKNetwork network_conv = *(LDKNetwork*)network;
- free((void*)network);
- LDKChainWatchInterfaceUtil* ret = malloc(sizeof(LDKChainWatchInterfaceUtil));
- *ret = ChainWatchInterfaceUtil_new(network_conv);
- assert(!ret->_underlying_ref);
- ret->_underlying_ref = true;
- return (long)ret;
-}
-
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChainWatchInterfaceUtil_1does_1match_1tx(JNIEnv * _env, jclass _b, jlong this_arg, jlong tx) {
- LDKChainWatchInterfaceUtil* this_arg_conv = (LDKChainWatchInterfaceUtil*)this_arg;
- LDKTransaction tx_conv = *(LDKTransaction*)tx;
- free((void*)tx);
- return ChainWatchInterfaceUtil_does_match_tx(this_arg_conv, tx_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._underlying_ref = false;
- 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 jlong JNICALL Java_org_ldk_impl_bindings_OutPoint_1get_1index(JNIEnv * _env, jclass _b, jlong this_ptr) {
- LDKOutPoint* this_ptr_conv = (LDKOutPoint*)this_ptr;
- uint16_t* ret = malloc(sizeof(uint16_t));
- *ret = OutPoint_get_index(this_ptr_conv);
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutPoint_1set_1index(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
- LDKOutPoint* this_ptr_conv = (LDKOutPoint*)this_ptr;
- uint16_t val_conv = *(uint16_t*)val;
- free((void*)val);
- return OutPoint_set_index(this_ptr_conv, val_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutPoint_1new(JNIEnv * _env, jclass _b, jlong txid_arg, jlong index_arg) {
- LDKThirtyTwoBytes txid_arg_conv = *(LDKThirtyTwoBytes*)txid_arg;
- free((void*)txid_arg);
- uint16_t index_arg_conv = *(uint16_t*)index_arg;
- free((void*)index_arg);
- LDKOutPoint* ret = malloc(sizeof(LDKOutPoint));
- *ret = OutPoint_new(txid_arg_conv, index_arg_conv);
- assert(!ret->_underlying_ref);
- ret->_underlying_ref = true;
- 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));
- *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));
- *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;
- free((void*)ser);
- LDKOutPoint* ret = malloc(sizeof(LDKOutPoint));
- *ret = OutPoint_read(ser_conv);
- assert(!ret->_underlying_ref);
- ret->_underlying_ref = true;
- 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._underlying_ref = false;
- 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));
- *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);
- assert(!ret->_underlying_ref);
- ret->_underlying_ref = true;
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1remote_1pubkeys(JNIEnv * _env, jclass _b, jlong this_arg) {
- LDKInMemoryChannelKeys* this_arg_conv = (LDKInMemoryChannelKeys*)this_arg;
- LDKChannelPublicKeys* ret = malloc(sizeof(LDKChannelPublicKeys));
- *ret = InMemoryChannelKeys_remote_pubkeys(this_arg_conv);
- assert(!ret->_underlying_ref);
- ret->_underlying_ref = true;
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1remote_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_arg) {
- LDKInMemoryChannelKeys* this_arg_conv = (LDKInMemoryChannelKeys*)this_arg;
- uint16_t* ret = malloc(sizeof(uint16_t));
- *ret = InMemoryChannelKeys_remote_to_self_delay(this_arg_conv);
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1local_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_arg) {
- LDKInMemoryChannelKeys* this_arg_conv = (LDKInMemoryChannelKeys*)this_arg;
- uint16_t* ret = malloc(sizeof(uint16_t));
- *ret = InMemoryChannelKeys_local_to_self_delay(this_arg_conv);
- return (long)ret;
-}
-
-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));
- *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));
- *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;
- free((void*)ser);
- LDKInMemoryChannelKeys* ret = malloc(sizeof(LDKInMemoryChannelKeys));
- *ret = InMemoryChannelKeys_read(ser_conv);
- assert(!ret->_underlying_ref);
- ret->_underlying_ref = true;
- 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._underlying_ref = false;
- return KeysManager_free(this_ptr_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_KeysManager_1new(JNIEnv * _env, jclass _b, jbyteArray seed, jlong 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*)network;
- free((void*)network);
- LDKKeysManager* ret = malloc(sizeof(LDKKeysManager));
- *ret = KeysManager_new(seed_ref, network_conv, starting_time_secs, starting_time_nanos);
- assert(!ret->_underlying_ref);
- ret->_underlying_ref = true;
- 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));
- *ret = KeysManager_derive_channel_keys(this_arg_conv, channel_value_satoshis, params_1, params_2);
- assert(!ret->_underlying_ref);
- ret->_underlying_ref = true;
- 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));
- *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._underlying_ref = false;
- 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._underlying_ref = false;
- 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));
- *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));
- *ret = ChannelDetails_get_counterparty_features(this_ptr_conv);
- assert(!ret->_underlying_ref);
- ret->_underlying_ref = true;
- 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._underlying_ref = false;
- 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._underlying_ref = false;
- return PaymentSendFailure_free(this_ptr_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1new(JNIEnv * _env, jclass _b, jlong network, jlong fee_est, jlong monitor, jlong tx_broadcaster, jlong logger, jlong keys_manager, jlong config, jlong current_blockchain_height) {
- LDKNetwork network_conv = *(LDKNetwork*)network;
- free((void*)network);
- LDKFeeEstimator fee_est_conv = *(LDKFeeEstimator*)fee_est;
- free((void*)fee_est);
- LDKManyChannelMonitor monitor_conv = *(LDKManyChannelMonitor*)monitor;
- free((void*)monitor);
- LDKBroadcasterInterface tx_broadcaster_conv = *(LDKBroadcasterInterface*)tx_broadcaster;
- free((void*)tx_broadcaster);
- LDKLogger logger_conv = *(LDKLogger*)logger;
- free((void*)logger);
- LDKKeysInterface keys_manager_conv = *(LDKKeysInterface*)keys_manager;
- free((void*)keys_manager);
- LDKUserConfig config_conv = *(LDKUserConfig*)config;
- free((void*)config);
- config_conv._underlying_ref = false;
- uintptr_t current_blockchain_height_conv = *(uintptr_t*)current_blockchain_height;
- free((void*)current_blockchain_height);
- LDKChannelManager* ret = malloc(sizeof(LDKChannelManager));
- *ret = ChannelManager_new(network_conv, fee_est_conv, monitor_conv, tx_broadcaster_conv, logger_conv, keys_manager_conv, config_conv, current_blockchain_height_conv);
- assert(!ret->_underlying_ref);
- ret->_underlying_ref = true;
- return (long)ret;