-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
- LDKChannelMonitorUpdateErr arg_conv = *(LDKChannelMonitorUpdateErr*)arg;
- FREE((void*)arg);
- LDKCResult_NoneChannelMonitorUpdateErrZ* ret = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
- *ret = CResult_NoneChannelMonitorUpdateErrZ_err(arg_conv);
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCResult_NoneChannelMonitorUpdateErrZ arg_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)arg;
- FREE((void*)arg);
- return CResult_NoneChannelMonitorUpdateErrZ_free(arg_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
- LDKMonitorUpdateError arg_conv = *(LDKMonitorUpdateError*)arg;
- FREE((void*)arg);
- LDKCResult_NoneMonitorUpdateErrorZ* ret = MALLOC(sizeof(LDKCResult_NoneMonitorUpdateErrorZ), "LDKCResult_NoneMonitorUpdateErrorZ");
- *ret = CResult_NoneMonitorUpdateErrorZ_err(arg_conv);
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCResult_NoneMonitorUpdateErrorZ arg_conv = *(LDKCResult_NoneMonitorUpdateErrorZ*)arg;
- FREE((void*)arg);
- return CResult_NoneMonitorUpdateErrorZ_free(arg_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
- LDKPaymentSendFailure arg_conv = *(LDKPaymentSendFailure*)arg;
- FREE((void*)arg);
- LDKCResult_NonePaymentSendFailureZ* ret = MALLOC(sizeof(LDKCResult_NonePaymentSendFailureZ), "LDKCResult_NonePaymentSendFailureZ");
- *ret = CResult_NonePaymentSendFailureZ_err(arg_conv);
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCResult_NonePaymentSendFailureZ arg_conv = *(LDKCResult_NonePaymentSendFailureZ*)arg;
- FREE((void*)arg);
- return CResult_NonePaymentSendFailureZ_free(arg_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
- LDKPeerHandleError arg_conv = *(LDKPeerHandleError*)arg;
- FREE((void*)arg);
- LDKCResult_NonePeerHandleErrorZ* ret = MALLOC(sizeof(LDKCResult_NonePeerHandleErrorZ), "LDKCResult_NonePeerHandleErrorZ");
- *ret = CResult_NonePeerHandleErrorZ_err(arg_conv);
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCResult_NonePeerHandleErrorZ arg_conv = *(LDKCResult_NonePeerHandleErrorZ*)arg;
- FREE((void*)arg);
- return CResult_NonePeerHandleErrorZ_free(arg_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
- LDKLightningError arg_conv = *(LDKLightningError*)arg;
- FREE((void*)arg);
- LDKCResult_RouteLightningErrorZ* ret = MALLOC(sizeof(LDKCResult_RouteLightningErrorZ), "LDKCResult_RouteLightningErrorZ");
- *ret = CResult_RouteLightningErrorZ_err(arg_conv);
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCResult_RouteLightningErrorZ arg_conv = *(LDKCResult_RouteLightningErrorZ*)arg;
- FREE((void*)arg);
- return CResult_RouteLightningErrorZ_free(arg_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1ok(JNIEnv * _env, jclass _b, jlong arg) {
- LDKRoute arg_conv = *(LDKRoute*)arg;
- FREE((void*)arg);
- LDKCResult_RouteLightningErrorZ* ret = MALLOC(sizeof(LDKCResult_RouteLightningErrorZ), "LDKCResult_RouteLightningErrorZ");
- *ret = CResult_RouteLightningErrorZ_ok(arg_conv);
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SignatureNoneZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCResult_SignatureNoneZ arg_conv = *(LDKCResult_SignatureNoneZ*)arg;
- FREE((void*)arg);
- return CResult_SignatureNoneZ_free(arg_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SignatureNoneZ_1ok(JNIEnv * _env, jclass _b, jlong arg) {
- LDKSignature arg_conv = *(LDKSignature*)arg;
- FREE((void*)arg);
- LDKCResult_SignatureNoneZ* ret = MALLOC(sizeof(LDKCResult_SignatureNoneZ), "LDKCResult_SignatureNoneZ");
- *ret = CResult_SignatureNoneZ_ok(arg_conv);
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysSecpErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
- LDKSecp256k1Error arg_conv = *(LDKSecp256k1Error*)arg;
- FREE((void*)arg);
- LDKCResult_TxCreationKeysSecpErrorZ* ret = MALLOC(sizeof(LDKCResult_TxCreationKeysSecpErrorZ), "LDKCResult_TxCreationKeysSecpErrorZ");
- *ret = CResult_TxCreationKeysSecpErrorZ_err(arg_conv);
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysSecpErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCResult_TxCreationKeysSecpErrorZ arg_conv = *(LDKCResult_TxCreationKeysSecpErrorZ*)arg;
- FREE((void*)arg);
- return CResult_TxCreationKeysSecpErrorZ_free(arg_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysSecpErrorZ_1ok(JNIEnv * _env, jclass _b, jlong arg) {
- LDKTxCreationKeys arg_conv = *(LDKTxCreationKeys*)arg;
- FREE((void*)arg);
- LDKCResult_TxCreationKeysSecpErrorZ* ret = MALLOC(sizeof(LDKCResult_TxCreationKeysSecpErrorZ), "LDKCResult_TxCreationKeysSecpErrorZ");
- *ret = CResult_TxCreationKeysSecpErrorZ_ok(arg_conv);
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
- LDKLightningError arg_conv = *(LDKLightningError*)arg;
- FREE((void*)arg);
- LDKCResult_boolLightningErrorZ* ret = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
- *ret = CResult_boolLightningErrorZ_err(arg_conv);
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCResult_boolLightningErrorZ arg_conv = *(LDKCResult_boolLightningErrorZ*)arg;
- FREE((void*)arg);
- return CResult_boolLightningErrorZ_free(arg_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1ok(JNIEnv * _env, jclass _b, jboolean arg) {
- LDKCResult_boolLightningErrorZ* ret = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
- *ret = CResult_boolLightningErrorZ_ok(arg);
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
- LDKPeerHandleError arg_conv = *(LDKPeerHandleError*)arg;
- FREE((void*)arg);
- LDKCResult_boolPeerHandleErrorZ* ret = MALLOC(sizeof(LDKCResult_boolPeerHandleErrorZ), "LDKCResult_boolPeerHandleErrorZ");
- *ret = CResult_boolPeerHandleErrorZ_err(arg_conv);
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCResult_boolPeerHandleErrorZ arg_conv = *(LDKCResult_boolPeerHandleErrorZ*)arg;
- FREE((void*)arg);
- return CResult_boolPeerHandleErrorZ_free(arg_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1ok(JNIEnv * _env, jclass _b, jboolean arg) {
- LDKCResult_boolPeerHandleErrorZ* ret = MALLOC(sizeof(LDKCResult_boolPeerHandleErrorZ), "LDKCResult_boolPeerHandleErrorZ");
- *ret = CResult_boolPeerHandleErrorZ_ok(arg);
- return (long)ret;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1HTLCOutputInCommitmentSignatureZZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ arg_conv = *(LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ*)arg;
- FREE((void*)arg);
- return CVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ arg_conv = *(LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ*)arg;
- FREE((void*)arg);
- return CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1CVec_1RouteHopZZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_CVec_RouteHopZZ arg_conv = *(LDKCVec_CVec_RouteHopZZ*)arg;
- FREE((void*)arg);
- return CVec_CVec_RouteHopZZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ChannelDetailsZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_ChannelDetailsZ arg_conv = *(LDKCVec_ChannelDetailsZ*)arg;
- FREE((void*)arg);
- return CVec_ChannelDetailsZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ChannelMonitorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_ChannelMonitorZ arg_conv = *(LDKCVec_ChannelMonitorZ*)arg;
- FREE((void*)arg);
- return CVec_ChannelMonitorZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1EventZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_EventZ arg_conv = *(LDKCVec_EventZ*)arg;
- FREE((void*)arg);
- return CVec_EventZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1HTLCOutputInCommitmentZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_HTLCOutputInCommitmentZ arg_conv = *(LDKCVec_HTLCOutputInCommitmentZ*)arg;
- FREE((void*)arg);
- return CVec_HTLCOutputInCommitmentZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1MessageSendEventZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_MessageSendEventZ arg_conv = *(LDKCVec_MessageSendEventZ*)arg;
- FREE((void*)arg);
- return CVec_MessageSendEventZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1MonitorEventZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_MonitorEventZ arg_conv = *(LDKCVec_MonitorEventZ*)arg;
- FREE((void*)arg);
- return CVec_MonitorEventZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1NetAddressZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_NetAddressZ arg_conv = *(LDKCVec_NetAddressZ*)arg;
- FREE((void*)arg);
- return CVec_NetAddressZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1NodeAnnouncementZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_NodeAnnouncementZ arg_conv = *(LDKCVec_NodeAnnouncementZ*)arg;
- FREE((void*)arg);
- return CVec_NodeAnnouncementZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1PublicKeyZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_PublicKeyZ arg_conv = *(LDKCVec_PublicKeyZ*)arg;
- FREE((void*)arg);
- return CVec_PublicKeyZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1RouteHintZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_RouteHintZ arg_conv = *(LDKCVec_RouteHintZ*)arg;
- FREE((void*)arg);
- return CVec_RouteHintZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1RouteHopZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_RouteHopZ arg_conv = *(LDKCVec_RouteHopZ*)arg;
- FREE((void*)arg);
- return CVec_RouteHopZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1SignatureZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_SignatureZ arg_conv = *(LDKCVec_SignatureZ*)arg;
- FREE((void*)arg);
- return CVec_SignatureZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1SpendableOutputDescriptorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_SpendableOutputDescriptorZ arg_conv = *(LDKCVec_SpendableOutputDescriptorZ*)arg;
- FREE((void*)arg);
- return CVec_SpendableOutputDescriptorZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TransactionZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_TransactionZ arg_conv = *(LDKCVec_TransactionZ*)arg;
- FREE((void*)arg);
- return CVec_TransactionZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateAddHTLCZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_UpdateAddHTLCZ arg_conv = *(LDKCVec_UpdateAddHTLCZ*)arg;
- FREE((void*)arg);
- return CVec_UpdateAddHTLCZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateFailHTLCZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_UpdateFailHTLCZ arg_conv = *(LDKCVec_UpdateFailHTLCZ*)arg;
- FREE((void*)arg);
- return CVec_UpdateFailHTLCZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateFailMalformedHTLCZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_UpdateFailMalformedHTLCZ arg_conv = *(LDKCVec_UpdateFailMalformedHTLCZ*)arg;
- FREE((void*)arg);
- return CVec_UpdateFailMalformedHTLCZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateFulfillHTLCZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_UpdateFulfillHTLCZ arg_conv = *(LDKCVec_UpdateFulfillHTLCZ*)arg;
- FREE((void*)arg);
- return CVec_UpdateFulfillHTLCZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u64Z_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_u64Z arg_conv = *(LDKCVec_u64Z*)arg;
- FREE((void*)arg);
- return CVec_u64Z_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u8Z_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_u8Z arg_conv = *(LDKCVec_u8Z*)arg;
- FREE((void*)arg);
- return CVec_u8Z_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1usizeZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
- LDKCVec_usizeZ arg_conv = *(LDKCVec_usizeZ*)arg;
- FREE((void*)arg);
- return CVec_usizeZ_free(arg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxOut_1free(JNIEnv * _env, jclass _b, jlong _res) {
- LDKTxOut _res_conv = *(LDKTxOut*)_res;
- FREE((void*)_res);
- return TxOut_free(_res_conv);
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1Txidu32Z_1new(JNIEnv * _env, jclass _b, jlong a, jint b) {
- LDKThirtyTwoBytes a_conv = *(LDKThirtyTwoBytes*)a;
- FREE((void*)a);
- LDKC2Tuple_Txidu32Z* ret = MALLOC(sizeof(LDKC2Tuple_Txidu32Z), "LDKC2Tuple_Txidu32Z");
- *ret = C2Tuple_Txidu32Z_new(a_conv, b);
- return (long)ret;
-}
-
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1Scriptu64Z_1new(JNIEnv * _env, jclass _b, jlong a, jlong b) {
- LDKCVec_u8Z a_conv = *(LDKCVec_u8Z*)a;
- FREE((void*)a);
- LDKC2Tuple_Scriptu64Z* ret = MALLOC(sizeof(LDKC2Tuple_Scriptu64Z), "LDKC2Tuple_Scriptu64Z");
- *ret = C2Tuple_Scriptu64Z_new(a_conv, b);
- 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_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._underlying_ref = false;
- 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_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), "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._underlying_ref = false;
- 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 jlong JNICALL Java_org_ldk_impl_bindings_Level_1max(JNIEnv * _env, jclass _b) {
- LDKLevel* ret = MALLOC(sizeof(LDKLevel), "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 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);
- 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), "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 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);
- 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), "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), "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), "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), "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), "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), "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), "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), "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), "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), "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), "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;
- LDKChainWatchInterface_JCalls_clone(chain_monitor_conv.this_arg);
- LDKBlockNotifier* ret = MALLOC(sizeof(LDKBlockNotifier), "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;
- LDKChainListener_JCalls_clone(listener_conv.this_arg);
- 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), "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), "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 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);
- 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), "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;
- FREE((void*)ser);
- LDKOutPoint* ret = MALLOC(sizeof(LDKOutPoint), "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), "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), "LDKChannelPublicKeys");
- *ret = InMemoryChannelKeys_remote_pubkeys(this_arg_conv);
- assert(!ret->_underlying_ref);
- ret->_underlying_ref = true;
- return (long)ret;
-}
-
-JNIEXPORT jshort 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;
- return InMemoryChannelKeys_remote_to_self_delay(this_arg_conv);
-}
-
-JNIEXPORT jshort 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;
- return InMemoryChannelKeys_local_to_self_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;
- FREE((void*)ser);
- LDKInMemoryChannelKeys* ret = MALLOC(sizeof(LDKInMemoryChannelKeys), "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), "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), "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), "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), "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);
- 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;
- LDKFeeEstimator_JCalls_clone(fee_est_conv.this_arg);
- LDKManyChannelMonitor monitor_conv = *(LDKManyChannelMonitor*)monitor;
- LDKManyChannelMonitor_JCalls_clone(monitor_conv.this_arg);
- LDKBroadcasterInterface tx_broadcaster_conv = *(LDKBroadcasterInterface*)tx_broadcaster;
- LDKBroadcasterInterface_JCalls_clone(tx_broadcaster_conv.this_arg);
- LDKLogger logger_conv = *(LDKLogger*)logger;
- LDKLogger_JCalls_clone(logger_conv.this_arg);
- LDKKeysInterface keys_manager_conv = *(LDKKeysInterface*)keys_manager;
- LDKKeysInterface_JCalls_clone(keys_manager_conv.this_arg);
- 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), "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;
-}
-
-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._underlying_ref = false;
- 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._underlying_ref = false;
- 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);