1 #include "org_ldk_impl_bindings.h"
2 #include <rust_types.h>
8 typedef struct LDKMessageSendEventsProvider_JCalls {
11 jmethodID get_and_clear_pending_msg_events_meth;
12 } LDKMessageSendEventsProvider_JCalls;
13 LDKCVec_MessageSendEventZ get_and_clear_pending_msg_events_jcall(const void* this_arg) {
14 LDKMessageSendEventsProvider_JCalls *j_calls = (LDKMessageSendEventsProvider_JCalls*) this_arg;
15 LDKCVec_MessageSendEventZ* ret = (LDKCVec_MessageSendEventZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->get_and_clear_pending_msg_events_meth);
16 LDKCVec_MessageSendEventZ res = *ret;
20 void LDKMessageSendEventsProvider_JCalls_free(void* this_arg) {
21 LDKMessageSendEventsProvider_JCalls *j_calls = (LDKMessageSendEventsProvider_JCalls*) this_arg;
22 (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o);
25 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKMessageSendEventsProvider_1new (JNIEnv * env, jclass _a, jobject o) {
26 jclass c = (*env)->GetObjectClass(env, o);
28 LDKMessageSendEventsProvider_JCalls *calls = malloc(sizeof(LDKMessageSendEventsProvider_JCalls));
30 calls->o = (*env)->NewGlobalRef(env, o);
31 calls->get_and_clear_pending_msg_events_meth = (*env)->GetMethodID(env, c, "get_and_clear_pending_msg_events", "()J");
32 assert(calls->get_and_clear_pending_msg_events_meth != NULL);
34 LDKMessageSendEventsProvider *ret = malloc(sizeof(LDKMessageSendEventsProvider));
35 ret->this_arg = (void*) calls;
36 ret->get_and_clear_pending_msg_events = get_and_clear_pending_msg_events_jcall;
37 ret->free = LDKMessageSendEventsProvider_JCalls_free;
41 typedef struct LDKEventsProvider_JCalls {
44 jmethodID get_and_clear_pending_events_meth;
45 } LDKEventsProvider_JCalls;
46 LDKCVec_EventZ get_and_clear_pending_events_jcall(const void* this_arg) {
47 LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) this_arg;
48 LDKCVec_EventZ* ret = (LDKCVec_EventZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->get_and_clear_pending_events_meth);
49 LDKCVec_EventZ res = *ret;
53 void LDKEventsProvider_JCalls_free(void* this_arg) {
54 LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) this_arg;
55 (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o);
58 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKEventsProvider_1new (JNIEnv * env, jclass _a, jobject o) {
59 jclass c = (*env)->GetObjectClass(env, o);
61 LDKEventsProvider_JCalls *calls = malloc(sizeof(LDKEventsProvider_JCalls));
63 calls->o = (*env)->NewGlobalRef(env, o);
64 calls->get_and_clear_pending_events_meth = (*env)->GetMethodID(env, c, "get_and_clear_pending_events", "()J");
65 assert(calls->get_and_clear_pending_events_meth != NULL);
67 LDKEventsProvider *ret = malloc(sizeof(LDKEventsProvider));
68 ret->this_arg = (void*) calls;
69 ret->get_and_clear_pending_events = get_and_clear_pending_events_jcall;
70 ret->free = LDKEventsProvider_JCalls_free;
74 typedef struct LDKLogger_JCalls {
79 void log_jcall(const void* this_arg, const char *record) {
80 LDKLogger_JCalls *j_calls = (LDKLogger_JCalls*) this_arg;
81 jstring record_conv = (*j_calls->env)->NewStringUTF(j_calls->env, record);
82 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->log_meth, record_conv);
84 void LDKLogger_JCalls_free(void* this_arg) {
85 LDKLogger_JCalls *j_calls = (LDKLogger_JCalls*) this_arg;
86 (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o);
89 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKLogger_1new (JNIEnv * env, jclass _a, jobject o) {
90 jclass c = (*env)->GetObjectClass(env, o);
92 LDKLogger_JCalls *calls = malloc(sizeof(LDKLogger_JCalls));
94 calls->o = (*env)->NewGlobalRef(env, o);
95 calls->log_meth = (*env)->GetMethodID(env, c, "log", "(Ljava/lang/String;)V");
96 assert(calls->log_meth != NULL);
98 LDKLogger *ret = malloc(sizeof(LDKLogger));
99 ret->this_arg = (void*) calls;
100 ret->log = log_jcall;
101 ret->free = LDKLogger_JCalls_free;
105 typedef struct LDKChainWatchInterface_JCalls {
108 jmethodID install_watch_tx_meth;
109 jmethodID install_watch_outpoint_meth;
110 jmethodID watch_all_txn_meth;
111 jmethodID get_chain_utxo_meth;
112 jmethodID filter_block_meth;
113 jmethodID reentered_meth;
114 } LDKChainWatchInterface_JCalls;
115 void install_watch_tx_jcall(const void* this_arg, const uint8_t (*txid)[32], LDKu8slice script_pub_key) {
116 LDKChainWatchInterface_JCalls *j_calls = (LDKChainWatchInterface_JCalls*) this_arg;
117 jbyteArray txid_arr = (*j_calls->env)->NewByteArray(j_calls->env, 32);
118 (*j_calls->env)->SetByteArrayRegion(j_calls->env, txid_arr, 0, 32, *txid);
119 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->install_watch_tx_meth, txid_arr, script_pub_key);
121 void install_watch_outpoint_jcall(const void* this_arg, LDKC2Tuple_Txidu32Z outpoint, LDKu8slice out_script) {
122 LDKChainWatchInterface_JCalls *j_calls = (LDKChainWatchInterface_JCalls*) this_arg;
123 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->install_watch_outpoint_meth, outpoint, out_script);
125 void watch_all_txn_jcall(const void* this_arg) {
126 LDKChainWatchInterface_JCalls *j_calls = (LDKChainWatchInterface_JCalls*) this_arg;
127 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->watch_all_txn_meth);
129 LDKCResult_C2Tuple_Scriptu64ZChainErrorZ get_chain_utxo_jcall(const void* this_arg, LDKThirtyTwoBytes genesis_hash, uint64_t unspent_tx_output_identifier) {
130 LDKChainWatchInterface_JCalls *j_calls = (LDKChainWatchInterface_JCalls*) this_arg;
131 LDKCResult_C2Tuple_Scriptu64ZChainErrorZ* ret = (LDKCResult_C2Tuple_Scriptu64ZChainErrorZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->get_chain_utxo_meth, genesis_hash, unspent_tx_output_identifier);
132 LDKCResult_C2Tuple_Scriptu64ZChainErrorZ res = *ret;
136 LDKCVec_usizeZ filter_block_jcall(const void* this_arg, LDKu8slice block) {
137 LDKChainWatchInterface_JCalls *j_calls = (LDKChainWatchInterface_JCalls*) this_arg;
138 LDKCVec_usizeZ* ret = (LDKCVec_usizeZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->filter_block_meth, block);
139 LDKCVec_usizeZ res = *ret;
143 uintptr_t reentered_jcall(const void* this_arg) {
144 LDKChainWatchInterface_JCalls *j_calls = (LDKChainWatchInterface_JCalls*) this_arg;
145 uintptr_t* ret = (uintptr_t*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->reentered_meth);
146 uintptr_t res = *ret;
150 void LDKChainWatchInterface_JCalls_free(void* this_arg) {
151 LDKChainWatchInterface_JCalls *j_calls = (LDKChainWatchInterface_JCalls*) this_arg;
152 (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o);
155 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKChainWatchInterface_1new (JNIEnv * env, jclass _a, jobject o) {
156 jclass c = (*env)->GetObjectClass(env, o);
158 LDKChainWatchInterface_JCalls *calls = malloc(sizeof(LDKChainWatchInterface_JCalls));
160 calls->o = (*env)->NewGlobalRef(env, o);
161 calls->install_watch_tx_meth = (*env)->GetMethodID(env, c, "install_watch_tx", "([BJ)V");
162 assert(calls->install_watch_tx_meth != NULL);
163 calls->install_watch_outpoint_meth = (*env)->GetMethodID(env, c, "install_watch_outpoint", "(JJ)V");
164 assert(calls->install_watch_outpoint_meth != NULL);
165 calls->watch_all_txn_meth = (*env)->GetMethodID(env, c, "watch_all_txn", "()V");
166 assert(calls->watch_all_txn_meth != NULL);
167 calls->get_chain_utxo_meth = (*env)->GetMethodID(env, c, "get_chain_utxo", "(JJ)J");
168 assert(calls->get_chain_utxo_meth != NULL);
169 calls->filter_block_meth = (*env)->GetMethodID(env, c, "filter_block", "(J)J");
170 assert(calls->filter_block_meth != NULL);
171 calls->reentered_meth = (*env)->GetMethodID(env, c, "reentered", "()J");
172 assert(calls->reentered_meth != NULL);
174 LDKChainWatchInterface *ret = malloc(sizeof(LDKChainWatchInterface));
175 ret->this_arg = (void*) calls;
176 ret->install_watch_tx = install_watch_tx_jcall;
177 ret->install_watch_outpoint = install_watch_outpoint_jcall;
178 ret->watch_all_txn = watch_all_txn_jcall;
179 ret->get_chain_utxo = get_chain_utxo_jcall;
180 ret->filter_block = filter_block_jcall;
181 ret->reentered = reentered_jcall;
182 ret->free = LDKChainWatchInterface_JCalls_free;
186 typedef struct LDKBroadcasterInterface_JCalls {
189 jmethodID broadcast_transaction_meth;
190 } LDKBroadcasterInterface_JCalls;
191 void broadcast_transaction_jcall(const void* this_arg, LDKTransaction tx) {
192 LDKBroadcasterInterface_JCalls *j_calls = (LDKBroadcasterInterface_JCalls*) this_arg;
193 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->broadcast_transaction_meth, tx);
195 void LDKBroadcasterInterface_JCalls_free(void* this_arg) {
196 LDKBroadcasterInterface_JCalls *j_calls = (LDKBroadcasterInterface_JCalls*) this_arg;
197 (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o);
200 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKBroadcasterInterface_1new (JNIEnv * env, jclass _a, jobject o) {
201 jclass c = (*env)->GetObjectClass(env, o);
203 LDKBroadcasterInterface_JCalls *calls = malloc(sizeof(LDKBroadcasterInterface_JCalls));
205 calls->o = (*env)->NewGlobalRef(env, o);
206 calls->broadcast_transaction_meth = (*env)->GetMethodID(env, c, "broadcast_transaction", "(J)V");
207 assert(calls->broadcast_transaction_meth != NULL);
209 LDKBroadcasterInterface *ret = malloc(sizeof(LDKBroadcasterInterface));
210 ret->this_arg = (void*) calls;
211 ret->broadcast_transaction = broadcast_transaction_jcall;
212 ret->free = LDKBroadcasterInterface_JCalls_free;
216 typedef struct LDKChainListener_JCalls {
219 jmethodID block_connected_meth;
220 jmethodID block_disconnected_meth;
221 } LDKChainListener_JCalls;
222 void block_connected_jcall(const void* this_arg, const uint8_t (*header)[80], uint32_t height, LDKCVec_TransactionZ txn_matched, LDKusizeslice indexes_of_txn_matched) {
223 LDKChainListener_JCalls *j_calls = (LDKChainListener_JCalls*) this_arg;
224 jbyteArray header_arr = (*j_calls->env)->NewByteArray(j_calls->env, 80);
225 (*j_calls->env)->SetByteArrayRegion(j_calls->env, header_arr, 0, 80, *header);
226 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->block_connected_meth, header_arr, height, txn_matched, indexes_of_txn_matched);
228 void block_disconnected_jcall(const void* this_arg, const uint8_t (*header)[80], uint32_t disconnected_height) {
229 LDKChainListener_JCalls *j_calls = (LDKChainListener_JCalls*) this_arg;
230 jbyteArray header_arr = (*j_calls->env)->NewByteArray(j_calls->env, 80);
231 (*j_calls->env)->SetByteArrayRegion(j_calls->env, header_arr, 0, 80, *header);
232 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->block_disconnected_meth, header_arr, disconnected_height);
234 void LDKChainListener_JCalls_free(void* this_arg) {
235 LDKChainListener_JCalls *j_calls = (LDKChainListener_JCalls*) this_arg;
236 (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o);
239 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKChainListener_1new (JNIEnv * env, jclass _a, jobject o) {
240 jclass c = (*env)->GetObjectClass(env, o);
242 LDKChainListener_JCalls *calls = malloc(sizeof(LDKChainListener_JCalls));
244 calls->o = (*env)->NewGlobalRef(env, o);
245 calls->block_connected_meth = (*env)->GetMethodID(env, c, "block_connected", "([BIJJ)V");
246 assert(calls->block_connected_meth != NULL);
247 calls->block_disconnected_meth = (*env)->GetMethodID(env, c, "block_disconnected", "([BI)V");
248 assert(calls->block_disconnected_meth != NULL);
250 LDKChainListener *ret = malloc(sizeof(LDKChainListener));
251 ret->this_arg = (void*) calls;
252 ret->block_connected = block_connected_jcall;
253 ret->block_disconnected = block_disconnected_jcall;
254 ret->free = LDKChainListener_JCalls_free;
258 typedef struct LDKFeeEstimator_JCalls {
261 jmethodID get_est_sat_per_1000_weight_meth;
262 } LDKFeeEstimator_JCalls;
263 uint32_t get_est_sat_per_1000_weight_jcall(const void* this_arg, LDKConfirmationTarget confirmation_target) {
264 LDKFeeEstimator_JCalls *j_calls = (LDKFeeEstimator_JCalls*) this_arg;
265 return (*j_calls->env)->CallIntMethod(j_calls->env, j_calls->o, j_calls->get_est_sat_per_1000_weight_meth, confirmation_target);
267 void LDKFeeEstimator_JCalls_free(void* this_arg) {
268 LDKFeeEstimator_JCalls *j_calls = (LDKFeeEstimator_JCalls*) this_arg;
269 (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o);
272 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKFeeEstimator_1new (JNIEnv * env, jclass _a, jobject o) {
273 jclass c = (*env)->GetObjectClass(env, o);
275 LDKFeeEstimator_JCalls *calls = malloc(sizeof(LDKFeeEstimator_JCalls));
277 calls->o = (*env)->NewGlobalRef(env, o);
278 calls->get_est_sat_per_1000_weight_meth = (*env)->GetMethodID(env, c, "get_est_sat_per_1000_weight", "(J)I");
279 assert(calls->get_est_sat_per_1000_weight_meth != NULL);
281 LDKFeeEstimator *ret = malloc(sizeof(LDKFeeEstimator));
282 ret->this_arg = (void*) calls;
283 ret->get_est_sat_per_1000_weight = get_est_sat_per_1000_weight_jcall;
284 ret->free = LDKFeeEstimator_JCalls_free;
288 typedef struct LDKChannelKeys_JCalls {
291 jmethodID get_per_commitment_point_meth;
292 jmethodID release_commitment_secret_meth;
293 jmethodID key_derivation_params_meth;
294 jmethodID sign_remote_commitment_meth;
295 jmethodID sign_local_commitment_meth;
296 jmethodID sign_local_commitment_htlc_transactions_meth;
297 jmethodID sign_justice_transaction_meth;
298 jmethodID sign_remote_htlc_transaction_meth;
299 jmethodID sign_closing_transaction_meth;
300 jmethodID sign_channel_announcement_meth;
301 jmethodID on_accept_meth;
302 } LDKChannelKeys_JCalls;
303 LDKPublicKey get_per_commitment_point_jcall(const void* this_arg, uint64_t idx) {
304 LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
305 LDKPublicKey* ret = (LDKPublicKey*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->get_per_commitment_point_meth, idx);
306 LDKPublicKey res = *ret;
310 LDKThirtyTwoBytes release_commitment_secret_jcall(const void* this_arg, uint64_t idx) {
311 LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
312 LDKThirtyTwoBytes* ret = (LDKThirtyTwoBytes*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->release_commitment_secret_meth, idx);
313 LDKThirtyTwoBytes res = *ret;
317 LDKC2Tuple_u64u64Z key_derivation_params_jcall(const void* this_arg) {
318 LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
319 LDKC2Tuple_u64u64Z* ret = (LDKC2Tuple_u64u64Z*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->key_derivation_params_meth);
320 LDKC2Tuple_u64u64Z res = *ret;
324 LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ sign_remote_commitment_jcall(const void* this_arg, uint32_t feerate_per_kw, LDKTransaction commitment_tx, const LDKPreCalculatedTxCreationKeys *keys, LDKCVec_HTLCOutputInCommitmentZ htlcs) {
325 LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
326 LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ* ret = (LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->sign_remote_commitment_meth, feerate_per_kw, commitment_tx, keys, htlcs);
327 LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ res = *ret;
331 LDKCResult_SignatureNoneZ sign_local_commitment_jcall(const void* this_arg, const LDKLocalCommitmentTransaction *local_commitment_tx) {
332 LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
333 LDKCResult_SignatureNoneZ* ret = (LDKCResult_SignatureNoneZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->sign_local_commitment_meth, local_commitment_tx);
334 LDKCResult_SignatureNoneZ res = *ret;
338 LDKCResult_CVec_SignatureZNoneZ sign_local_commitment_htlc_transactions_jcall(const void* this_arg, const LDKLocalCommitmentTransaction *local_commitment_tx) {
339 LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
340 LDKCResult_CVec_SignatureZNoneZ* ret = (LDKCResult_CVec_SignatureZNoneZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->sign_local_commitment_htlc_transactions_meth, local_commitment_tx);
341 LDKCResult_CVec_SignatureZNoneZ res = *ret;
345 LDKCResult_SignatureNoneZ sign_justice_transaction_jcall(const void* this_arg, LDKTransaction justice_tx, uintptr_t input, uint64_t amount, const uint8_t (*per_commitment_key)[32], const LDKHTLCOutputInCommitment *htlc) {
346 LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
347 jbyteArray per_commitment_key_arr = (*j_calls->env)->NewByteArray(j_calls->env, 32);
348 (*j_calls->env)->SetByteArrayRegion(j_calls->env, per_commitment_key_arr, 0, 32, *per_commitment_key);
349 LDKCResult_SignatureNoneZ* ret = (LDKCResult_SignatureNoneZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->sign_justice_transaction_meth, justice_tx, input, amount, per_commitment_key_arr, htlc);
350 LDKCResult_SignatureNoneZ res = *ret;
354 LDKCResult_SignatureNoneZ sign_remote_htlc_transaction_jcall(const void* this_arg, LDKTransaction htlc_tx, uintptr_t input, uint64_t amount, LDKPublicKey per_commitment_point, const LDKHTLCOutputInCommitment *htlc) {
355 LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
356 LDKCResult_SignatureNoneZ* ret = (LDKCResult_SignatureNoneZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->sign_remote_htlc_transaction_meth, htlc_tx, input, amount, per_commitment_point, htlc);
357 LDKCResult_SignatureNoneZ res = *ret;
361 LDKCResult_SignatureNoneZ sign_closing_transaction_jcall(const void* this_arg, LDKTransaction closing_tx) {
362 LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
363 LDKCResult_SignatureNoneZ* ret = (LDKCResult_SignatureNoneZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->sign_closing_transaction_meth, closing_tx);
364 LDKCResult_SignatureNoneZ res = *ret;
368 LDKCResult_SignatureNoneZ sign_channel_announcement_jcall(const void* this_arg, const LDKUnsignedChannelAnnouncement *msg) {
369 LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
370 LDKCResult_SignatureNoneZ* ret = (LDKCResult_SignatureNoneZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->sign_channel_announcement_meth, msg);
371 LDKCResult_SignatureNoneZ res = *ret;
375 void on_accept_jcall(void* this_arg, const LDKChannelPublicKeys *channel_points, uint16_t remote_to_self_delay, uint16_t local_to_self_delay) {
376 LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
377 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->on_accept_meth, channel_points, remote_to_self_delay, local_to_self_delay);
379 void* LDKChannelKeys_JCalls_clone(const void* this_arg) {
380 LDKChannelKeys_JCalls *ret = malloc(sizeof(LDKChannelKeys_JCalls));
381 memcpy(ret, this_arg, sizeof(LDKChannelKeys_JCalls));
384 void LDKChannelKeys_JCalls_free(void* this_arg) {
385 LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
386 (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o);
389 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKChannelKeys_1new (JNIEnv * env, jclass _a, jobject o) {
390 jclass c = (*env)->GetObjectClass(env, o);
392 LDKChannelKeys_JCalls *calls = malloc(sizeof(LDKChannelKeys_JCalls));
394 calls->o = (*env)->NewGlobalRef(env, o);
395 calls->get_per_commitment_point_meth = (*env)->GetMethodID(env, c, "get_per_commitment_point", "(J)J");
396 assert(calls->get_per_commitment_point_meth != NULL);
397 calls->release_commitment_secret_meth = (*env)->GetMethodID(env, c, "release_commitment_secret", "(J)J");
398 assert(calls->release_commitment_secret_meth != NULL);
399 calls->key_derivation_params_meth = (*env)->GetMethodID(env, c, "key_derivation_params", "()J");
400 assert(calls->key_derivation_params_meth != NULL);
401 calls->sign_remote_commitment_meth = (*env)->GetMethodID(env, c, "sign_remote_commitment", "(IJJJ)J");
402 assert(calls->sign_remote_commitment_meth != NULL);
403 calls->sign_local_commitment_meth = (*env)->GetMethodID(env, c, "sign_local_commitment", "(J)J");
404 assert(calls->sign_local_commitment_meth != NULL);
405 calls->sign_local_commitment_htlc_transactions_meth = (*env)->GetMethodID(env, c, "sign_local_commitment_htlc_transactions", "(J)J");
406 assert(calls->sign_local_commitment_htlc_transactions_meth != NULL);
407 calls->sign_justice_transaction_meth = (*env)->GetMethodID(env, c, "sign_justice_transaction", "(JJJ[BJ)J");
408 assert(calls->sign_justice_transaction_meth != NULL);
409 calls->sign_remote_htlc_transaction_meth = (*env)->GetMethodID(env, c, "sign_remote_htlc_transaction", "(JJJJJ)J");
410 assert(calls->sign_remote_htlc_transaction_meth != NULL);
411 calls->sign_closing_transaction_meth = (*env)->GetMethodID(env, c, "sign_closing_transaction", "(J)J");
412 assert(calls->sign_closing_transaction_meth != NULL);
413 calls->sign_channel_announcement_meth = (*env)->GetMethodID(env, c, "sign_channel_announcement", "(J)J");
414 assert(calls->sign_channel_announcement_meth != NULL);
415 calls->on_accept_meth = (*env)->GetMethodID(env, c, "on_accept", "(JSS)V");
416 assert(calls->on_accept_meth != NULL);
418 LDKChannelKeys *ret = malloc(sizeof(LDKChannelKeys));
419 ret->this_arg = (void*) calls;
420 ret->get_per_commitment_point = get_per_commitment_point_jcall;
421 ret->release_commitment_secret = release_commitment_secret_jcall;
422 ret->key_derivation_params = key_derivation_params_jcall;
423 ret->sign_remote_commitment = sign_remote_commitment_jcall;
424 ret->sign_local_commitment = sign_local_commitment_jcall;
425 ret->sign_local_commitment_htlc_transactions = sign_local_commitment_htlc_transactions_jcall;
426 ret->sign_justice_transaction = sign_justice_transaction_jcall;
427 ret->sign_remote_htlc_transaction = sign_remote_htlc_transaction_jcall;
428 ret->sign_closing_transaction = sign_closing_transaction_jcall;
429 ret->sign_channel_announcement = sign_channel_announcement_jcall;
430 ret->on_accept = on_accept_jcall;
431 ret->clone = LDKChannelKeys_JCalls_clone;
432 ret->free = LDKChannelKeys_JCalls_free;
436 typedef struct LDKKeysInterface_JCalls {
439 jmethodID get_node_secret_meth;
440 jmethodID get_destination_script_meth;
441 jmethodID get_shutdown_pubkey_meth;
442 jmethodID get_channel_keys_meth;
443 jmethodID get_secure_random_bytes_meth;
444 } LDKKeysInterface_JCalls;
445 LDKSecretKey get_node_secret_jcall(const void* this_arg) {
446 LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
447 LDKSecretKey* ret = (LDKSecretKey*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->get_node_secret_meth);
448 LDKSecretKey res = *ret;
452 LDKCVec_u8Z get_destination_script_jcall(const void* this_arg) {
453 LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
454 LDKCVec_u8Z* ret = (LDKCVec_u8Z*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->get_destination_script_meth);
455 LDKCVec_u8Z res = *ret;
459 LDKPublicKey get_shutdown_pubkey_jcall(const void* this_arg) {
460 LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
461 LDKPublicKey* ret = (LDKPublicKey*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->get_shutdown_pubkey_meth);
462 LDKPublicKey res = *ret;
466 LDKChannelKeys get_channel_keys_jcall(const void* this_arg, bool inbound, uint64_t channel_value_satoshis) {
467 LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
468 LDKChannelKeys* ret = (LDKChannelKeys*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->get_channel_keys_meth, inbound, channel_value_satoshis);
469 LDKChannelKeys res = *ret;
473 LDKThirtyTwoBytes get_secure_random_bytes_jcall(const void* this_arg) {
474 LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
475 LDKThirtyTwoBytes* ret = (LDKThirtyTwoBytes*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->get_secure_random_bytes_meth);
476 LDKThirtyTwoBytes res = *ret;
480 void LDKKeysInterface_JCalls_free(void* this_arg) {
481 LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
482 (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o);
485 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKKeysInterface_1new (JNIEnv * env, jclass _a, jobject o) {
486 jclass c = (*env)->GetObjectClass(env, o);
488 LDKKeysInterface_JCalls *calls = malloc(sizeof(LDKKeysInterface_JCalls));
490 calls->o = (*env)->NewGlobalRef(env, o);
491 calls->get_node_secret_meth = (*env)->GetMethodID(env, c, "get_node_secret", "()J");
492 assert(calls->get_node_secret_meth != NULL);
493 calls->get_destination_script_meth = (*env)->GetMethodID(env, c, "get_destination_script", "()J");
494 assert(calls->get_destination_script_meth != NULL);
495 calls->get_shutdown_pubkey_meth = (*env)->GetMethodID(env, c, "get_shutdown_pubkey", "()J");
496 assert(calls->get_shutdown_pubkey_meth != NULL);
497 calls->get_channel_keys_meth = (*env)->GetMethodID(env, c, "get_channel_keys", "(ZJ)J");
498 assert(calls->get_channel_keys_meth != NULL);
499 calls->get_secure_random_bytes_meth = (*env)->GetMethodID(env, c, "get_secure_random_bytes", "()J");
500 assert(calls->get_secure_random_bytes_meth != NULL);
502 LDKKeysInterface *ret = malloc(sizeof(LDKKeysInterface));
503 ret->this_arg = (void*) calls;
504 ret->get_node_secret = get_node_secret_jcall;
505 ret->get_destination_script = get_destination_script_jcall;
506 ret->get_shutdown_pubkey = get_shutdown_pubkey_jcall;
507 ret->get_channel_keys = get_channel_keys_jcall;
508 ret->get_secure_random_bytes = get_secure_random_bytes_jcall;
509 ret->free = LDKKeysInterface_JCalls_free;
513 typedef struct LDKManyChannelMonitor_JCalls {
516 jmethodID add_monitor_meth;
517 jmethodID update_monitor_meth;
518 jmethodID get_and_clear_pending_monitor_events_meth;
519 } LDKManyChannelMonitor_JCalls;
520 LDKCResult_NoneChannelMonitorUpdateErrZ add_monitor_jcall(const void* this_arg, LDKOutPoint funding_txo, LDKChannelMonitor monitor) {
521 LDKManyChannelMonitor_JCalls *j_calls = (LDKManyChannelMonitor_JCalls*) this_arg;
522 LDKCResult_NoneChannelMonitorUpdateErrZ* ret = (LDKCResult_NoneChannelMonitorUpdateErrZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->add_monitor_meth, funding_txo, monitor);
523 LDKCResult_NoneChannelMonitorUpdateErrZ res = *ret;
527 LDKCResult_NoneChannelMonitorUpdateErrZ update_monitor_jcall(const void* this_arg, LDKOutPoint funding_txo, LDKChannelMonitorUpdate monitor) {
528 LDKManyChannelMonitor_JCalls *j_calls = (LDKManyChannelMonitor_JCalls*) this_arg;
529 LDKCResult_NoneChannelMonitorUpdateErrZ* ret = (LDKCResult_NoneChannelMonitorUpdateErrZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->update_monitor_meth, funding_txo, monitor);
530 LDKCResult_NoneChannelMonitorUpdateErrZ res = *ret;
534 LDKCVec_MonitorEventZ get_and_clear_pending_monitor_events_jcall(const void* this_arg) {
535 LDKManyChannelMonitor_JCalls *j_calls = (LDKManyChannelMonitor_JCalls*) this_arg;
536 LDKCVec_MonitorEventZ* ret = (LDKCVec_MonitorEventZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->get_and_clear_pending_monitor_events_meth);
537 LDKCVec_MonitorEventZ res = *ret;
541 void LDKManyChannelMonitor_JCalls_free(void* this_arg) {
542 LDKManyChannelMonitor_JCalls *j_calls = (LDKManyChannelMonitor_JCalls*) this_arg;
543 (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o);
546 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKManyChannelMonitor_1new (JNIEnv * env, jclass _a, jobject o) {
547 jclass c = (*env)->GetObjectClass(env, o);
549 LDKManyChannelMonitor_JCalls *calls = malloc(sizeof(LDKManyChannelMonitor_JCalls));
551 calls->o = (*env)->NewGlobalRef(env, o);
552 calls->add_monitor_meth = (*env)->GetMethodID(env, c, "add_monitor", "(JJ)J");
553 assert(calls->add_monitor_meth != NULL);
554 calls->update_monitor_meth = (*env)->GetMethodID(env, c, "update_monitor", "(JJ)J");
555 assert(calls->update_monitor_meth != NULL);
556 calls->get_and_clear_pending_monitor_events_meth = (*env)->GetMethodID(env, c, "get_and_clear_pending_monitor_events", "()J");
557 assert(calls->get_and_clear_pending_monitor_events_meth != NULL);
559 LDKManyChannelMonitor *ret = malloc(sizeof(LDKManyChannelMonitor));
560 ret->this_arg = (void*) calls;
561 ret->add_monitor = add_monitor_jcall;
562 ret->update_monitor = update_monitor_jcall;
563 ret->get_and_clear_pending_monitor_events = get_and_clear_pending_monitor_events_jcall;
564 ret->free = LDKManyChannelMonitor_JCalls_free;
568 typedef struct LDKChannelMessageHandler_JCalls {
571 jmethodID handle_open_channel_meth;
572 jmethodID handle_accept_channel_meth;
573 jmethodID handle_funding_created_meth;
574 jmethodID handle_funding_signed_meth;
575 jmethodID handle_funding_locked_meth;
576 jmethodID handle_shutdown_meth;
577 jmethodID handle_closing_signed_meth;
578 jmethodID handle_update_add_htlc_meth;
579 jmethodID handle_update_fulfill_htlc_meth;
580 jmethodID handle_update_fail_htlc_meth;
581 jmethodID handle_update_fail_malformed_htlc_meth;
582 jmethodID handle_commitment_signed_meth;
583 jmethodID handle_revoke_and_ack_meth;
584 jmethodID handle_update_fee_meth;
585 jmethodID handle_announcement_signatures_meth;
586 jmethodID peer_disconnected_meth;
587 jmethodID peer_connected_meth;
588 jmethodID handle_channel_reestablish_meth;
589 jmethodID handle_error_meth;
590 } LDKChannelMessageHandler_JCalls;
591 void handle_open_channel_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKInitFeatures their_features, const LDKOpenChannel *msg) {
592 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
593 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->handle_open_channel_meth, their_node_id, their_features, msg);
595 void handle_accept_channel_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKInitFeatures their_features, const LDKAcceptChannel *msg) {
596 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
597 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->handle_accept_channel_meth, their_node_id, their_features, msg);
599 void handle_funding_created_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingCreated *msg) {
600 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
601 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->handle_funding_created_meth, their_node_id, msg);
603 void handle_funding_signed_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingSigned *msg) {
604 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
605 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->handle_funding_signed_meth, their_node_id, msg);
607 void handle_funding_locked_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingLocked *msg) {
608 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
609 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->handle_funding_locked_meth, their_node_id, msg);
611 void handle_shutdown_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKShutdown *msg) {
612 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
613 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->handle_shutdown_meth, their_node_id, msg);
615 void handle_closing_signed_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKClosingSigned *msg) {
616 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
617 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->handle_closing_signed_meth, their_node_id, msg);
619 void handle_update_add_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateAddHTLC *msg) {
620 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
621 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->handle_update_add_htlc_meth, their_node_id, msg);
623 void handle_update_fulfill_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFulfillHTLC *msg) {
624 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
625 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->handle_update_fulfill_htlc_meth, their_node_id, msg);
627 void handle_update_fail_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFailHTLC *msg) {
628 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
629 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->handle_update_fail_htlc_meth, their_node_id, msg);
631 void handle_update_fail_malformed_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFailMalformedHTLC *msg) {
632 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
633 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->handle_update_fail_malformed_htlc_meth, their_node_id, msg);
635 void handle_commitment_signed_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKCommitmentSigned *msg) {
636 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
637 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->handle_commitment_signed_meth, their_node_id, msg);
639 void handle_revoke_and_ack_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKRevokeAndACK *msg) {
640 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
641 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->handle_revoke_and_ack_meth, their_node_id, msg);
643 void handle_update_fee_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFee *msg) {
644 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
645 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->handle_update_fee_meth, their_node_id, msg);
647 void handle_announcement_signatures_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKAnnouncementSignatures *msg) {
648 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
649 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->handle_announcement_signatures_meth, their_node_id, msg);
651 void peer_disconnected_jcall(const void* this_arg, LDKPublicKey their_node_id, bool no_connection_possible) {
652 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
653 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->peer_disconnected_meth, their_node_id, no_connection_possible);
655 void peer_connected_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit *msg) {
656 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
657 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->peer_connected_meth, their_node_id, msg);
659 void handle_channel_reestablish_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelReestablish *msg) {
660 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
661 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->handle_channel_reestablish_meth, their_node_id, msg);
663 void handle_error_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKErrorMessage *msg) {
664 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
665 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->handle_error_meth, their_node_id, msg);
667 void LDKChannelMessageHandler_JCalls_free(void* this_arg) {
668 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
669 (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o);
672 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKChannelMessageHandler_1new (JNIEnv * env, jclass _a, jobject o) {
673 jclass c = (*env)->GetObjectClass(env, o);
675 LDKChannelMessageHandler_JCalls *calls = malloc(sizeof(LDKChannelMessageHandler_JCalls));
677 calls->o = (*env)->NewGlobalRef(env, o);
678 calls->handle_open_channel_meth = (*env)->GetMethodID(env, c, "handle_open_channel", "(JJJ)V");
679 assert(calls->handle_open_channel_meth != NULL);
680 calls->handle_accept_channel_meth = (*env)->GetMethodID(env, c, "handle_accept_channel", "(JJJ)V");
681 assert(calls->handle_accept_channel_meth != NULL);
682 calls->handle_funding_created_meth = (*env)->GetMethodID(env, c, "handle_funding_created", "(JJ)V");
683 assert(calls->handle_funding_created_meth != NULL);
684 calls->handle_funding_signed_meth = (*env)->GetMethodID(env, c, "handle_funding_signed", "(JJ)V");
685 assert(calls->handle_funding_signed_meth != NULL);
686 calls->handle_funding_locked_meth = (*env)->GetMethodID(env, c, "handle_funding_locked", "(JJ)V");
687 assert(calls->handle_funding_locked_meth != NULL);
688 calls->handle_shutdown_meth = (*env)->GetMethodID(env, c, "handle_shutdown", "(JJ)V");
689 assert(calls->handle_shutdown_meth != NULL);
690 calls->handle_closing_signed_meth = (*env)->GetMethodID(env, c, "handle_closing_signed", "(JJ)V");
691 assert(calls->handle_closing_signed_meth != NULL);
692 calls->handle_update_add_htlc_meth = (*env)->GetMethodID(env, c, "handle_update_add_htlc", "(JJ)V");
693 assert(calls->handle_update_add_htlc_meth != NULL);
694 calls->handle_update_fulfill_htlc_meth = (*env)->GetMethodID(env, c, "handle_update_fulfill_htlc", "(JJ)V");
695 assert(calls->handle_update_fulfill_htlc_meth != NULL);
696 calls->handle_update_fail_htlc_meth = (*env)->GetMethodID(env, c, "handle_update_fail_htlc", "(JJ)V");
697 assert(calls->handle_update_fail_htlc_meth != NULL);
698 calls->handle_update_fail_malformed_htlc_meth = (*env)->GetMethodID(env, c, "handle_update_fail_malformed_htlc", "(JJ)V");
699 assert(calls->handle_update_fail_malformed_htlc_meth != NULL);
700 calls->handle_commitment_signed_meth = (*env)->GetMethodID(env, c, "handle_commitment_signed", "(JJ)V");
701 assert(calls->handle_commitment_signed_meth != NULL);
702 calls->handle_revoke_and_ack_meth = (*env)->GetMethodID(env, c, "handle_revoke_and_ack", "(JJ)V");
703 assert(calls->handle_revoke_and_ack_meth != NULL);
704 calls->handle_update_fee_meth = (*env)->GetMethodID(env, c, "handle_update_fee", "(JJ)V");
705 assert(calls->handle_update_fee_meth != NULL);
706 calls->handle_announcement_signatures_meth = (*env)->GetMethodID(env, c, "handle_announcement_signatures", "(JJ)V");
707 assert(calls->handle_announcement_signatures_meth != NULL);
708 calls->peer_disconnected_meth = (*env)->GetMethodID(env, c, "peer_disconnected", "(JZ)V");
709 assert(calls->peer_disconnected_meth != NULL);
710 calls->peer_connected_meth = (*env)->GetMethodID(env, c, "peer_connected", "(JJ)V");
711 assert(calls->peer_connected_meth != NULL);
712 calls->handle_channel_reestablish_meth = (*env)->GetMethodID(env, c, "handle_channel_reestablish", "(JJ)V");
713 assert(calls->handle_channel_reestablish_meth != NULL);
714 calls->handle_error_meth = (*env)->GetMethodID(env, c, "handle_error", "(JJ)V");
715 assert(calls->handle_error_meth != NULL);
717 LDKChannelMessageHandler *ret = malloc(sizeof(LDKChannelMessageHandler));
718 ret->this_arg = (void*) calls;
719 ret->handle_open_channel = handle_open_channel_jcall;
720 ret->handle_accept_channel = handle_accept_channel_jcall;
721 ret->handle_funding_created = handle_funding_created_jcall;
722 ret->handle_funding_signed = handle_funding_signed_jcall;
723 ret->handle_funding_locked = handle_funding_locked_jcall;
724 ret->handle_shutdown = handle_shutdown_jcall;
725 ret->handle_closing_signed = handle_closing_signed_jcall;
726 ret->handle_update_add_htlc = handle_update_add_htlc_jcall;
727 ret->handle_update_fulfill_htlc = handle_update_fulfill_htlc_jcall;
728 ret->handle_update_fail_htlc = handle_update_fail_htlc_jcall;
729 ret->handle_update_fail_malformed_htlc = handle_update_fail_malformed_htlc_jcall;
730 ret->handle_commitment_signed = handle_commitment_signed_jcall;
731 ret->handle_revoke_and_ack = handle_revoke_and_ack_jcall;
732 ret->handle_update_fee = handle_update_fee_jcall;
733 ret->handle_announcement_signatures = handle_announcement_signatures_jcall;
734 ret->peer_disconnected = peer_disconnected_jcall;
735 ret->peer_connected = peer_connected_jcall;
736 ret->handle_channel_reestablish = handle_channel_reestablish_jcall;
737 ret->handle_error = handle_error_jcall;
738 ret->free = LDKChannelMessageHandler_JCalls_free;
742 typedef struct LDKRoutingMessageHandler_JCalls {
745 jmethodID handle_node_announcement_meth;
746 jmethodID handle_channel_announcement_meth;
747 jmethodID handle_channel_update_meth;
748 jmethodID handle_htlc_fail_channel_update_meth;
749 jmethodID get_next_channel_announcements_meth;
750 jmethodID get_next_node_announcements_meth;
751 jmethodID should_request_full_sync_meth;
752 } LDKRoutingMessageHandler_JCalls;
753 LDKCResult_boolLightningErrorZ handle_node_announcement_jcall(const void* this_arg, const LDKNodeAnnouncement *msg) {
754 LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
755 LDKCResult_boolLightningErrorZ* ret = (LDKCResult_boolLightningErrorZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->handle_node_announcement_meth, msg);
756 LDKCResult_boolLightningErrorZ res = *ret;
760 LDKCResult_boolLightningErrorZ handle_channel_announcement_jcall(const void* this_arg, const LDKChannelAnnouncement *msg) {
761 LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
762 LDKCResult_boolLightningErrorZ* ret = (LDKCResult_boolLightningErrorZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->handle_channel_announcement_meth, msg);
763 LDKCResult_boolLightningErrorZ res = *ret;
767 LDKCResult_boolLightningErrorZ handle_channel_update_jcall(const void* this_arg, const LDKChannelUpdate *msg) {
768 LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
769 LDKCResult_boolLightningErrorZ* ret = (LDKCResult_boolLightningErrorZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->handle_channel_update_meth, msg);
770 LDKCResult_boolLightningErrorZ res = *ret;
774 void handle_htlc_fail_channel_update_jcall(const void* this_arg, const LDKHTLCFailChannelUpdate *update) {
775 LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
776 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->handle_htlc_fail_channel_update_meth, update);
778 LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ get_next_channel_announcements_jcall(const void* this_arg, uint64_t starting_point, uint8_t batch_amount) {
779 LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
780 LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ* ret = (LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->get_next_channel_announcements_meth, starting_point, batch_amount);
781 LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ res = *ret;
785 LDKCVec_NodeAnnouncementZ get_next_node_announcements_jcall(const void* this_arg, LDKPublicKey starting_point, uint8_t batch_amount) {
786 LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
787 LDKCVec_NodeAnnouncementZ* ret = (LDKCVec_NodeAnnouncementZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->get_next_node_announcements_meth, starting_point, batch_amount);
788 LDKCVec_NodeAnnouncementZ res = *ret;
792 bool should_request_full_sync_jcall(const void* this_arg, LDKPublicKey node_id) {
793 LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
794 return (*j_calls->env)->CallBooleanMethod(j_calls->env, j_calls->o, j_calls->should_request_full_sync_meth, node_id);
796 void LDKRoutingMessageHandler_JCalls_free(void* this_arg) {
797 LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
798 (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o);
801 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKRoutingMessageHandler_1new (JNIEnv * env, jclass _a, jobject o) {
802 jclass c = (*env)->GetObjectClass(env, o);
804 LDKRoutingMessageHandler_JCalls *calls = malloc(sizeof(LDKRoutingMessageHandler_JCalls));
806 calls->o = (*env)->NewGlobalRef(env, o);
807 calls->handle_node_announcement_meth = (*env)->GetMethodID(env, c, "handle_node_announcement", "(J)J");
808 assert(calls->handle_node_announcement_meth != NULL);
809 calls->handle_channel_announcement_meth = (*env)->GetMethodID(env, c, "handle_channel_announcement", "(J)J");
810 assert(calls->handle_channel_announcement_meth != NULL);
811 calls->handle_channel_update_meth = (*env)->GetMethodID(env, c, "handle_channel_update", "(J)J");
812 assert(calls->handle_channel_update_meth != NULL);
813 calls->handle_htlc_fail_channel_update_meth = (*env)->GetMethodID(env, c, "handle_htlc_fail_channel_update", "(J)V");
814 assert(calls->handle_htlc_fail_channel_update_meth != NULL);
815 calls->get_next_channel_announcements_meth = (*env)->GetMethodID(env, c, "get_next_channel_announcements", "(JB)J");
816 assert(calls->get_next_channel_announcements_meth != NULL);
817 calls->get_next_node_announcements_meth = (*env)->GetMethodID(env, c, "get_next_node_announcements", "(JB)J");
818 assert(calls->get_next_node_announcements_meth != NULL);
819 calls->should_request_full_sync_meth = (*env)->GetMethodID(env, c, "should_request_full_sync", "(J)Z");
820 assert(calls->should_request_full_sync_meth != NULL);
822 LDKRoutingMessageHandler *ret = malloc(sizeof(LDKRoutingMessageHandler));
823 ret->this_arg = (void*) calls;
824 ret->handle_node_announcement = handle_node_announcement_jcall;
825 ret->handle_channel_announcement = handle_channel_announcement_jcall;
826 ret->handle_channel_update = handle_channel_update_jcall;
827 ret->handle_htlc_fail_channel_update = handle_htlc_fail_channel_update_jcall;
828 ret->get_next_channel_announcements = get_next_channel_announcements_jcall;
829 ret->get_next_node_announcements = get_next_node_announcements_jcall;
830 ret->should_request_full_sync = should_request_full_sync_jcall;
831 ret->free = LDKRoutingMessageHandler_JCalls_free;
835 typedef struct LDKSocketDescriptor_JCalls {
838 jmethodID send_data_meth;
839 jmethodID disconnect_socket_meth;
842 } LDKSocketDescriptor_JCalls;
843 uintptr_t send_data_jcall(void* this_arg, LDKu8slice data, bool resume_read) {
844 LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
845 uintptr_t* ret = (uintptr_t*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->send_data_meth, data, resume_read);
846 uintptr_t res = *ret;
850 void disconnect_socket_jcall(void* this_arg) {
851 LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
852 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->disconnect_socket_meth);
854 bool eq_jcall(const void* this_arg, const void *other_arg) {
855 LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
856 return (*j_calls->env)->CallBooleanMethod(j_calls->env, j_calls->o, j_calls->eq_meth, other_arg);
858 uint64_t hash_jcall(const void* this_arg) {
859 LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
860 return (*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->hash_meth);
862 void* LDKSocketDescriptor_JCalls_clone(const void* this_arg) {
863 LDKSocketDescriptor_JCalls *ret = malloc(sizeof(LDKSocketDescriptor_JCalls));
864 memcpy(ret, this_arg, sizeof(LDKSocketDescriptor_JCalls));
867 void LDKSocketDescriptor_JCalls_free(void* this_arg) {
868 LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
869 (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o);
872 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKSocketDescriptor_1new (JNIEnv * env, jclass _a, jobject o) {
873 jclass c = (*env)->GetObjectClass(env, o);
875 LDKSocketDescriptor_JCalls *calls = malloc(sizeof(LDKSocketDescriptor_JCalls));
877 calls->o = (*env)->NewGlobalRef(env, o);
878 calls->send_data_meth = (*env)->GetMethodID(env, c, "send_data", "(JZ)J");
879 assert(calls->send_data_meth != NULL);
880 calls->disconnect_socket_meth = (*env)->GetMethodID(env, c, "disconnect_socket", "()V");
881 assert(calls->disconnect_socket_meth != NULL);
882 calls->eq_meth = (*env)->GetMethodID(env, c, "eq", "(V)Z");
883 assert(calls->eq_meth != NULL);
884 calls->hash_meth = (*env)->GetMethodID(env, c, "hash", "()J");
885 assert(calls->hash_meth != NULL);
887 LDKSocketDescriptor *ret = malloc(sizeof(LDKSocketDescriptor));
888 ret->this_arg = (void*) calls;
889 ret->send_data = send_data_jcall;
890 ret->disconnect_socket = disconnect_socket_jcall;
892 ret->hash = hash_jcall;
893 ret->clone = LDKSocketDescriptor_JCalls_clone;
894 ret->free = LDKSocketDescriptor_JCalls_free;
898 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1HTLCOutputInCommitmentSignatureZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
899 LDKC2Tuple_HTLCOutputInCommitmentSignatureZ arg_conv = *(LDKC2Tuple_HTLCOutputInCommitmentSignatureZ*)arg;
901 return C2Tuple_HTLCOutputInCommitmentSignatureZ_free(arg_conv);
904 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
905 LDKC2Tuple_OutPointScriptZ arg_conv = *(LDKC2Tuple_OutPointScriptZ*)arg;
907 return C2Tuple_OutPointScriptZ_free(arg_conv);
910 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1Scriptu64Z_1free(JNIEnv * _env, jclass _b, jlong arg) {
911 LDKC2Tuple_Scriptu64Z arg_conv = *(LDKC2Tuple_Scriptu64Z*)arg;
913 return C2Tuple_Scriptu64Z_free(arg_conv);
916 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
917 LDKC2Tuple_SignatureCVec_SignatureZZ arg_conv = *(LDKC2Tuple_SignatureCVec_SignatureZZ*)arg;
919 return C2Tuple_SignatureCVec_SignatureZZ_free(arg_conv);
922 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1Txidu32Z_1free(JNIEnv * _env, jclass _b, jlong arg) {
923 LDKC2Tuple_Txidu32Z arg_conv = *(LDKC2Tuple_Txidu32Z*)arg;
925 return C2Tuple_Txidu32Z_free(arg_conv);
928 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u64u64Z_1free(JNIEnv * _env, jclass _b, jlong arg) {
929 LDKC2Tuple_u64u64Z arg_conv = *(LDKC2Tuple_u64u64Z*)arg;
931 return C2Tuple_u64u64Z_free(arg_conv);
934 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
935 LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ arg_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)arg;
937 return C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(arg_conv);
940 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1Scriptu64ZChainErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
941 LDKChainError arg_conv = *(LDKChainError*)arg;
943 LDKCResult_C2Tuple_Scriptu64ZChainErrorZ* ret = malloc(sizeof(LDKCResult_C2Tuple_Scriptu64ZChainErrorZ));
944 *ret = CResult_C2Tuple_Scriptu64ZChainErrorZ_err(arg_conv);
948 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1Scriptu64ZChainErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
949 LDKCResult_C2Tuple_Scriptu64ZChainErrorZ arg_conv = *(LDKCResult_C2Tuple_Scriptu64ZChainErrorZ*)arg;
951 return CResult_C2Tuple_Scriptu64ZChainErrorZ_free(arg_conv);
954 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1Scriptu64ZChainErrorZ_1ok(JNIEnv * _env, jclass _b, jlong arg) {
955 LDKC2Tuple_Scriptu64Z arg_conv = *(LDKC2Tuple_Scriptu64Z*)arg;
957 LDKCResult_C2Tuple_Scriptu64ZChainErrorZ* ret = malloc(sizeof(LDKCResult_C2Tuple_Scriptu64ZChainErrorZ));
958 *ret = CResult_C2Tuple_Scriptu64ZChainErrorZ_ok(arg_conv);
962 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
963 LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ arg_conv = *(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)arg;
965 return CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(arg_conv);
968 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1ok(JNIEnv * _env, jclass _b, jlong arg) {
969 LDKC2Tuple_SignatureCVec_SignatureZZ arg_conv = *(LDKC2Tuple_SignatureCVec_SignatureZZ*)arg;
971 LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ* ret = malloc(sizeof(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ));
972 *ret = CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(arg_conv);
976 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
977 LDKCResult_CVec_SignatureZNoneZ arg_conv = *(LDKCResult_CVec_SignatureZNoneZ*)arg;
979 return CResult_CVec_SignatureZNoneZ_free(arg_conv);
982 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1ok(JNIEnv * _env, jclass _b, jlong arg) {
983 LDKCVec_SignatureZ arg_conv = *(LDKCVec_SignatureZ*)arg;
985 LDKCResult_CVec_SignatureZNoneZ* ret = malloc(sizeof(LDKCResult_CVec_SignatureZNoneZ));
986 *ret = CResult_CVec_SignatureZNoneZ_ok(arg_conv);
990 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
991 LDKPeerHandleError arg_conv = *(LDKPeerHandleError*)arg;
993 LDKCResult_CVec_u8ZPeerHandleErrorZ* ret = malloc(sizeof(LDKCResult_CVec_u8ZPeerHandleErrorZ));
994 *ret = CResult_CVec_u8ZPeerHandleErrorZ_err(arg_conv);
998 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
999 LDKCResult_CVec_u8ZPeerHandleErrorZ arg_conv = *(LDKCResult_CVec_u8ZPeerHandleErrorZ*)arg;
1001 return CResult_CVec_u8ZPeerHandleErrorZ_free(arg_conv);
1004 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1ok(JNIEnv * _env, jclass _b, jlong arg) {
1005 LDKCVec_u8Z arg_conv = *(LDKCVec_u8Z*)arg;
1007 LDKCResult_CVec_u8ZPeerHandleErrorZ* ret = malloc(sizeof(LDKCResult_CVec_u8ZPeerHandleErrorZ));
1008 *ret = CResult_CVec_u8ZPeerHandleErrorZ_ok(arg_conv);
1012 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneAPIErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
1013 LDKAPIError arg_conv = *(LDKAPIError*)arg;
1015 LDKCResult_NoneAPIErrorZ* ret = malloc(sizeof(LDKCResult_NoneAPIErrorZ));
1016 *ret = CResult_NoneAPIErrorZ_err(arg_conv);
1020 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneAPIErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1021 LDKCResult_NoneAPIErrorZ arg_conv = *(LDKCResult_NoneAPIErrorZ*)arg;
1023 return CResult_NoneAPIErrorZ_free(arg_conv);
1026 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
1027 LDKChannelMonitorUpdateErr arg_conv = *(LDKChannelMonitorUpdateErr*)arg;
1029 LDKCResult_NoneChannelMonitorUpdateErrZ* ret = malloc(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ));
1030 *ret = CResult_NoneChannelMonitorUpdateErrZ_err(arg_conv);
1034 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1035 LDKCResult_NoneChannelMonitorUpdateErrZ arg_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)arg;
1037 return CResult_NoneChannelMonitorUpdateErrZ_free(arg_conv);
1040 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
1041 LDKMonitorUpdateError arg_conv = *(LDKMonitorUpdateError*)arg;
1043 LDKCResult_NoneMonitorUpdateErrorZ* ret = malloc(sizeof(LDKCResult_NoneMonitorUpdateErrorZ));
1044 *ret = CResult_NoneMonitorUpdateErrorZ_err(arg_conv);
1048 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1049 LDKCResult_NoneMonitorUpdateErrorZ arg_conv = *(LDKCResult_NoneMonitorUpdateErrorZ*)arg;
1051 return CResult_NoneMonitorUpdateErrorZ_free(arg_conv);
1054 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
1055 LDKPaymentSendFailure arg_conv = *(LDKPaymentSendFailure*)arg;
1057 LDKCResult_NonePaymentSendFailureZ* ret = malloc(sizeof(LDKCResult_NonePaymentSendFailureZ));
1058 *ret = CResult_NonePaymentSendFailureZ_err(arg_conv);
1062 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1063 LDKCResult_NonePaymentSendFailureZ arg_conv = *(LDKCResult_NonePaymentSendFailureZ*)arg;
1065 return CResult_NonePaymentSendFailureZ_free(arg_conv);
1068 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
1069 LDKPeerHandleError arg_conv = *(LDKPeerHandleError*)arg;
1071 LDKCResult_NonePeerHandleErrorZ* ret = malloc(sizeof(LDKCResult_NonePeerHandleErrorZ));
1072 *ret = CResult_NonePeerHandleErrorZ_err(arg_conv);
1076 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1077 LDKCResult_NonePeerHandleErrorZ arg_conv = *(LDKCResult_NonePeerHandleErrorZ*)arg;
1079 return CResult_NonePeerHandleErrorZ_free(arg_conv);
1082 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
1083 LDKLightningError arg_conv = *(LDKLightningError*)arg;
1085 LDKCResult_RouteLightningErrorZ* ret = malloc(sizeof(LDKCResult_RouteLightningErrorZ));
1086 *ret = CResult_RouteLightningErrorZ_err(arg_conv);
1090 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1091 LDKCResult_RouteLightningErrorZ arg_conv = *(LDKCResult_RouteLightningErrorZ*)arg;
1093 return CResult_RouteLightningErrorZ_free(arg_conv);
1096 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1ok(JNIEnv * _env, jclass _b, jlong arg) {
1097 LDKRoute arg_conv = *(LDKRoute*)arg;
1099 LDKCResult_RouteLightningErrorZ* ret = malloc(sizeof(LDKCResult_RouteLightningErrorZ));
1100 *ret = CResult_RouteLightningErrorZ_ok(arg_conv);
1104 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SignatureNoneZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1105 LDKCResult_SignatureNoneZ arg_conv = *(LDKCResult_SignatureNoneZ*)arg;
1107 return CResult_SignatureNoneZ_free(arg_conv);
1110 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SignatureNoneZ_1ok(JNIEnv * _env, jclass _b, jlong arg) {
1111 LDKSignature arg_conv = *(LDKSignature*)arg;
1113 LDKCResult_SignatureNoneZ* ret = malloc(sizeof(LDKCResult_SignatureNoneZ));
1114 *ret = CResult_SignatureNoneZ_ok(arg_conv);
1118 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysSecpErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
1119 LDKSecp256k1Error arg_conv = *(LDKSecp256k1Error*)arg;
1121 LDKCResult_TxCreationKeysSecpErrorZ* ret = malloc(sizeof(LDKCResult_TxCreationKeysSecpErrorZ));
1122 *ret = CResult_TxCreationKeysSecpErrorZ_err(arg_conv);
1126 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysSecpErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1127 LDKCResult_TxCreationKeysSecpErrorZ arg_conv = *(LDKCResult_TxCreationKeysSecpErrorZ*)arg;
1129 return CResult_TxCreationKeysSecpErrorZ_free(arg_conv);
1132 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysSecpErrorZ_1ok(JNIEnv * _env, jclass _b, jlong arg) {
1133 LDKTxCreationKeys arg_conv = *(LDKTxCreationKeys*)arg;
1135 LDKCResult_TxCreationKeysSecpErrorZ* ret = malloc(sizeof(LDKCResult_TxCreationKeysSecpErrorZ));
1136 *ret = CResult_TxCreationKeysSecpErrorZ_ok(arg_conv);
1140 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
1141 LDKLightningError arg_conv = *(LDKLightningError*)arg;
1143 LDKCResult_boolLightningErrorZ* ret = malloc(sizeof(LDKCResult_boolLightningErrorZ));
1144 *ret = CResult_boolLightningErrorZ_err(arg_conv);
1148 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1149 LDKCResult_boolLightningErrorZ arg_conv = *(LDKCResult_boolLightningErrorZ*)arg;
1151 return CResult_boolLightningErrorZ_free(arg_conv);
1154 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1ok(JNIEnv * _env, jclass _b, jboolean arg) {
1155 LDKCResult_boolLightningErrorZ* ret = malloc(sizeof(LDKCResult_boolLightningErrorZ));
1156 *ret = CResult_boolLightningErrorZ_ok(arg);
1160 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
1161 LDKPeerHandleError arg_conv = *(LDKPeerHandleError*)arg;
1163 LDKCResult_boolPeerHandleErrorZ* ret = malloc(sizeof(LDKCResult_boolPeerHandleErrorZ));
1164 *ret = CResult_boolPeerHandleErrorZ_err(arg_conv);
1168 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1169 LDKCResult_boolPeerHandleErrorZ arg_conv = *(LDKCResult_boolPeerHandleErrorZ*)arg;
1171 return CResult_boolPeerHandleErrorZ_free(arg_conv);
1174 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1ok(JNIEnv * _env, jclass _b, jboolean arg) {
1175 LDKCResult_boolPeerHandleErrorZ* ret = malloc(sizeof(LDKCResult_boolPeerHandleErrorZ));
1176 *ret = CResult_boolPeerHandleErrorZ_ok(arg);
1180 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1HTLCOutputInCommitmentSignatureZZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1181 LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ arg_conv = *(LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ*)arg;
1183 return CVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ_free(arg_conv);
1186 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1187 LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ arg_conv = *(LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ*)arg;
1189 return CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(arg_conv);
1192 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1CVec_1RouteHopZZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1193 LDKCVec_CVec_RouteHopZZ arg_conv = *(LDKCVec_CVec_RouteHopZZ*)arg;
1195 return CVec_CVec_RouteHopZZ_free(arg_conv);
1198 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ChannelDetailsZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1199 LDKCVec_ChannelDetailsZ arg_conv = *(LDKCVec_ChannelDetailsZ*)arg;
1201 return CVec_ChannelDetailsZ_free(arg_conv);
1204 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ChannelMonitorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1205 LDKCVec_ChannelMonitorZ arg_conv = *(LDKCVec_ChannelMonitorZ*)arg;
1207 return CVec_ChannelMonitorZ_free(arg_conv);
1210 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1EventZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1211 LDKCVec_EventZ arg_conv = *(LDKCVec_EventZ*)arg;
1213 return CVec_EventZ_free(arg_conv);
1216 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1HTLCOutputInCommitmentZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1217 LDKCVec_HTLCOutputInCommitmentZ arg_conv = *(LDKCVec_HTLCOutputInCommitmentZ*)arg;
1219 return CVec_HTLCOutputInCommitmentZ_free(arg_conv);
1222 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1MessageSendEventZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1223 LDKCVec_MessageSendEventZ arg_conv = *(LDKCVec_MessageSendEventZ*)arg;
1225 return CVec_MessageSendEventZ_free(arg_conv);
1228 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1MonitorEventZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1229 LDKCVec_MonitorEventZ arg_conv = *(LDKCVec_MonitorEventZ*)arg;
1231 return CVec_MonitorEventZ_free(arg_conv);
1234 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1NetAddressZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1235 LDKCVec_NetAddressZ arg_conv = *(LDKCVec_NetAddressZ*)arg;
1237 return CVec_NetAddressZ_free(arg_conv);
1240 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1NodeAnnouncementZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1241 LDKCVec_NodeAnnouncementZ arg_conv = *(LDKCVec_NodeAnnouncementZ*)arg;
1243 return CVec_NodeAnnouncementZ_free(arg_conv);
1246 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1PublicKeyZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1247 LDKCVec_PublicKeyZ arg_conv = *(LDKCVec_PublicKeyZ*)arg;
1249 return CVec_PublicKeyZ_free(arg_conv);
1252 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1RouteHintZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1253 LDKCVec_RouteHintZ arg_conv = *(LDKCVec_RouteHintZ*)arg;
1255 return CVec_RouteHintZ_free(arg_conv);
1258 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1RouteHopZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1259 LDKCVec_RouteHopZ arg_conv = *(LDKCVec_RouteHopZ*)arg;
1261 return CVec_RouteHopZ_free(arg_conv);
1264 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1SignatureZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1265 LDKCVec_SignatureZ arg_conv = *(LDKCVec_SignatureZ*)arg;
1267 return CVec_SignatureZ_free(arg_conv);
1270 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1SpendableOutputDescriptorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1271 LDKCVec_SpendableOutputDescriptorZ arg_conv = *(LDKCVec_SpendableOutputDescriptorZ*)arg;
1273 return CVec_SpendableOutputDescriptorZ_free(arg_conv);
1276 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TransactionZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1277 LDKCVec_TransactionZ arg_conv = *(LDKCVec_TransactionZ*)arg;
1279 return CVec_TransactionZ_free(arg_conv);
1282 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateAddHTLCZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1283 LDKCVec_UpdateAddHTLCZ arg_conv = *(LDKCVec_UpdateAddHTLCZ*)arg;
1285 return CVec_UpdateAddHTLCZ_free(arg_conv);
1288 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateFailHTLCZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1289 LDKCVec_UpdateFailHTLCZ arg_conv = *(LDKCVec_UpdateFailHTLCZ*)arg;
1291 return CVec_UpdateFailHTLCZ_free(arg_conv);
1294 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateFailMalformedHTLCZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1295 LDKCVec_UpdateFailMalformedHTLCZ arg_conv = *(LDKCVec_UpdateFailMalformedHTLCZ*)arg;
1297 return CVec_UpdateFailMalformedHTLCZ_free(arg_conv);
1300 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateFulfillHTLCZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1301 LDKCVec_UpdateFulfillHTLCZ arg_conv = *(LDKCVec_UpdateFulfillHTLCZ*)arg;
1303 return CVec_UpdateFulfillHTLCZ_free(arg_conv);
1306 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u64Z_1free(JNIEnv * _env, jclass _b, jlong arg) {
1307 LDKCVec_u64Z arg_conv = *(LDKCVec_u64Z*)arg;
1309 return CVec_u64Z_free(arg_conv);
1312 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u8Z_1free(JNIEnv * _env, jclass _b, jlong arg) {
1313 LDKCVec_u8Z arg_conv = *(LDKCVec_u8Z*)arg;
1315 return CVec_u8Z_free(arg_conv);
1318 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1usizeZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1319 LDKCVec_usizeZ arg_conv = *(LDKCVec_usizeZ*)arg;
1321 return CVec_usizeZ_free(arg_conv);
1324 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxOut_1free(JNIEnv * _env, jclass _b, jlong _res) {
1325 LDKTxOut _res_conv = *(LDKTxOut*)_res;
1327 return TxOut_free(_res_conv);
1330 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1Txidu32Z_1new(JNIEnv * _env, jclass _b, jlong a, jint b) {
1331 LDKThirtyTwoBytes a_conv = *(LDKThirtyTwoBytes*)a;
1333 LDKC2Tuple_Txidu32Z* ret = malloc(sizeof(LDKC2Tuple_Txidu32Z));
1334 *ret = C2Tuple_Txidu32Z_new(a_conv, b);
1338 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1Scriptu64Z_1new(JNIEnv * _env, jclass _b, jlong a, jlong b) {
1339 LDKCVec_u8Z a_conv = *(LDKCVec_u8Z*)a;
1341 LDKC2Tuple_Scriptu64Z* ret = malloc(sizeof(LDKC2Tuple_Scriptu64Z));
1342 *ret = C2Tuple_Scriptu64Z_new(a_conv, b);
1346 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u64u64Z_1new(JNIEnv * _env, jclass _b, jlong a, jlong b) {
1347 LDKC2Tuple_u64u64Z* ret = malloc(sizeof(LDKC2Tuple_u64u64Z));
1348 *ret = C2Tuple_u64u64Z_new(a, b);
1352 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1new(JNIEnv * _env, jclass _b, jlong a, jlong b) {
1353 LDKSignature a_conv = *(LDKSignature*)a;
1355 LDKCVec_SignatureZ b_conv = *(LDKCVec_SignatureZ*)b;
1357 LDKC2Tuple_SignatureCVec_SignatureZZ* ret = malloc(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ));
1358 *ret = C2Tuple_SignatureCVec_SignatureZZ_new(a_conv, b_conv);
1362 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1err(JNIEnv * _env, jclass _b) {
1363 LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ* ret = malloc(sizeof(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ));
1364 *ret = CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
1368 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SignatureNoneZ_1err(JNIEnv * _env, jclass _b) {
1369 LDKCResult_SignatureNoneZ* ret = malloc(sizeof(LDKCResult_SignatureNoneZ));
1370 *ret = CResult_SignatureNoneZ_err();
1374 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1err(JNIEnv * _env, jclass _b) {
1375 LDKCResult_CVec_SignatureZNoneZ* ret = malloc(sizeof(LDKCResult_CVec_SignatureZNoneZ));
1376 *ret = CResult_CVec_SignatureZNoneZ_err();
1380 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneAPIErrorZ_1ok(JNIEnv * _env, jclass _b) {
1381 LDKCResult_NoneAPIErrorZ* ret = malloc(sizeof(LDKCResult_NoneAPIErrorZ));
1382 *ret = CResult_NoneAPIErrorZ_ok();
1386 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1ok(JNIEnv * _env, jclass _b) {
1387 LDKCResult_NonePaymentSendFailureZ* ret = malloc(sizeof(LDKCResult_NonePaymentSendFailureZ));
1388 *ret = CResult_NonePaymentSendFailureZ_ok();
1392 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1ok(JNIEnv * _env, jclass _b) {
1393 LDKCResult_NoneChannelMonitorUpdateErrZ* ret = malloc(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ));
1394 *ret = CResult_NoneChannelMonitorUpdateErrZ_ok();
1398 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateErrorZ_1ok(JNIEnv * _env, jclass _b) {
1399 LDKCResult_NoneMonitorUpdateErrorZ* ret = malloc(sizeof(LDKCResult_NoneMonitorUpdateErrorZ));
1400 *ret = CResult_NoneMonitorUpdateErrorZ_ok();
1404 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1new(JNIEnv * _env, jclass _b, jlong a, jlong b) {
1405 LDKOutPoint a_conv = *(LDKOutPoint*)a;
1407 a_conv._underlying_ref = false;
1408 LDKCVec_u8Z b_conv = *(LDKCVec_u8Z*)b;
1410 LDKC2Tuple_OutPointScriptZ* ret = malloc(sizeof(LDKC2Tuple_OutPointScriptZ));
1411 *ret = C2Tuple_OutPointScriptZ_new(a_conv, b_conv);
1415 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1new(JNIEnv * _env, jclass _b, jlong a, jlong b, jlong c) {
1416 LDKChannelAnnouncement a_conv = *(LDKChannelAnnouncement*)a;
1418 a_conv._underlying_ref = false;
1419 LDKChannelUpdate b_conv = *(LDKChannelUpdate*)b;
1421 b_conv._underlying_ref = false;
1422 LDKChannelUpdate c_conv = *(LDKChannelUpdate*)c;
1424 c_conv._underlying_ref = false;
1425 LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret = malloc(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ));
1426 *ret = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a_conv, b_conv, c_conv);
1430 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1ok(JNIEnv * _env, jclass _b) {
1431 LDKCResult_NonePeerHandleErrorZ* ret = malloc(sizeof(LDKCResult_NonePeerHandleErrorZ));
1432 *ret = CResult_NonePeerHandleErrorZ_ok();
1436 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1HTLCOutputInCommitmentSignatureZ_1new(JNIEnv * _env, jclass _b, jlong a, jlong b) {
1437 LDKHTLCOutputInCommitment a_conv = *(LDKHTLCOutputInCommitment*)a;
1439 a_conv._underlying_ref = false;
1440 LDKSignature b_conv = *(LDKSignature*)b;
1442 LDKC2Tuple_HTLCOutputInCommitmentSignatureZ* ret = malloc(sizeof(LDKC2Tuple_HTLCOutputInCommitmentSignatureZ));
1443 *ret = C2Tuple_HTLCOutputInCommitmentSignatureZ_new(a_conv, b_conv);
1447 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Event_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1448 LDKEvent this_ptr_conv = *(LDKEvent*)this_ptr;
1449 free((void*)this_ptr);
1450 return Event_free(this_ptr_conv);
1453 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_MessageSendEvent_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1454 LDKMessageSendEvent this_ptr_conv = *(LDKMessageSendEvent*)this_ptr;
1455 free((void*)this_ptr);
1456 return MessageSendEvent_free(this_ptr_conv);
1459 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_MessageSendEventsProvider_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1460 LDKMessageSendEventsProvider this_ptr_conv = *(LDKMessageSendEventsProvider*)this_ptr;
1461 free((void*)this_ptr);
1462 return MessageSendEventsProvider_free(this_ptr_conv);
1465 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_EventsProvider_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1466 LDKEventsProvider this_ptr_conv = *(LDKEventsProvider*)this_ptr;
1467 free((void*)this_ptr);
1468 return EventsProvider_free(this_ptr_conv);
1471 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_APIError_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1472 LDKAPIError this_ptr_conv = *(LDKAPIError*)this_ptr;
1473 free((void*)this_ptr);
1474 return APIError_free(this_ptr_conv);
1477 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Level_1max(JNIEnv * _env, jclass _b) {
1478 LDKLevel* ret = malloc(sizeof(LDKLevel));
1483 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Logger_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1484 LDKLogger this_ptr_conv = *(LDKLogger*)this_ptr;
1485 free((void*)this_ptr);
1486 return Logger_free(this_ptr_conv);
1489 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1490 LDKChannelHandshakeConfig this_ptr_conv = *(LDKChannelHandshakeConfig*)this_ptr;
1491 free((void*)this_ptr);
1492 this_ptr_conv._underlying_ref = false;
1493 return ChannelHandshakeConfig_free(this_ptr_conv);
1496 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1get_1minimum_1depth(JNIEnv * _env, jclass _b, jlong this_ptr) {
1497 LDKChannelHandshakeConfig* this_ptr_conv = (LDKChannelHandshakeConfig*)this_ptr;
1498 return ChannelHandshakeConfig_get_minimum_depth(this_ptr_conv);
1501 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1set_1minimum_1depth(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
1502 LDKChannelHandshakeConfig* this_ptr_conv = (LDKChannelHandshakeConfig*)this_ptr;
1503 return ChannelHandshakeConfig_set_minimum_depth(this_ptr_conv, val);
1506 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1get_1our_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_ptr) {
1507 LDKChannelHandshakeConfig* this_ptr_conv = (LDKChannelHandshakeConfig*)this_ptr;
1508 return ChannelHandshakeConfig_get_our_to_self_delay(this_ptr_conv);
1511 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1set_1our_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
1512 LDKChannelHandshakeConfig* this_ptr_conv = (LDKChannelHandshakeConfig*)this_ptr;
1513 return ChannelHandshakeConfig_set_our_to_self_delay(this_ptr_conv, val);
1516 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1get_1our_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
1517 LDKChannelHandshakeConfig* this_ptr_conv = (LDKChannelHandshakeConfig*)this_ptr;
1518 return ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr_conv);
1521 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1set_1our_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1522 LDKChannelHandshakeConfig* this_ptr_conv = (LDKChannelHandshakeConfig*)this_ptr;
1523 return ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr_conv, val);
1526 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) {
1527 LDKChannelHandshakeConfig* ret = malloc(sizeof(LDKChannelHandshakeConfig));
1528 *ret = ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg);
1529 assert(!ret->_underlying_ref);
1530 ret->_underlying_ref = true;
1534 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1default(JNIEnv * _env, jclass _b) {
1535 LDKChannelHandshakeConfig* ret = malloc(sizeof(LDKChannelHandshakeConfig));
1536 *ret = ChannelHandshakeConfig_default();
1537 assert(!ret->_underlying_ref);
1538 ret->_underlying_ref = true;
1542 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1543 LDKChannelHandshakeLimits this_ptr_conv = *(LDKChannelHandshakeLimits*)this_ptr;
1544 free((void*)this_ptr);
1545 this_ptr_conv._underlying_ref = false;
1546 return ChannelHandshakeLimits_free(this_ptr_conv);
1549 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1min_1funding_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
1550 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1551 return ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr_conv);
1554 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1min_1funding_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1555 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1556 return ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr_conv, val);
1559 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1max_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
1560 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1561 return ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr_conv);
1564 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1max_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1565 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1566 return ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr_conv, val);
1569 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1min_1max_1htlc_1value_1in_1flight_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
1570 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1571 return ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr_conv);
1574 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) {
1575 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1576 return ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr_conv, val);
1579 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1max_1channel_1reserve_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
1580 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1581 return ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr_conv);
1584 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1max_1channel_1reserve_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1585 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1586 return ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr_conv, val);
1589 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1min_1max_1accepted_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr) {
1590 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1591 return ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr_conv);
1594 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1min_1max_1accepted_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
1595 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1596 return ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr_conv, val);
1599 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1min_1dust_1limit_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
1600 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1601 return ChannelHandshakeLimits_get_min_dust_limit_satoshis(this_ptr_conv);
1604 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1min_1dust_1limit_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1605 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1606 return ChannelHandshakeLimits_set_min_dust_limit_satoshis(this_ptr_conv, val);
1609 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1max_1dust_1limit_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
1610 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1611 return ChannelHandshakeLimits_get_max_dust_limit_satoshis(this_ptr_conv);
1614 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1max_1dust_1limit_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1615 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1616 return ChannelHandshakeLimits_set_max_dust_limit_satoshis(this_ptr_conv, val);
1619 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1max_1minimum_1depth(JNIEnv * _env, jclass _b, jlong this_ptr) {
1620 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1621 return ChannelHandshakeLimits_get_max_minimum_depth(this_ptr_conv);
1624 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1max_1minimum_1depth(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
1625 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1626 return ChannelHandshakeLimits_set_max_minimum_depth(this_ptr_conv, val);
1629 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1force_1announced_1channel_1preference(JNIEnv * _env, jclass _b, jlong this_ptr) {
1630 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1631 return ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr_conv);
1634 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1force_1announced_1channel_1preference(JNIEnv * _env, jclass _b, jlong this_ptr, jboolean val) {
1635 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1636 return ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr_conv, val);
1639 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1their_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_ptr) {
1640 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1641 return ChannelHandshakeLimits_get_their_to_self_delay(this_ptr_conv);
1644 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1their_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
1645 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1646 return ChannelHandshakeLimits_set_their_to_self_delay(this_ptr_conv, val);
1649 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) {
1650 LDKChannelHandshakeLimits* ret = malloc(sizeof(LDKChannelHandshakeLimits));
1651 *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);
1652 assert(!ret->_underlying_ref);
1653 ret->_underlying_ref = true;
1657 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1default(JNIEnv * _env, jclass _b) {
1658 LDKChannelHandshakeLimits* ret = malloc(sizeof(LDKChannelHandshakeLimits));
1659 *ret = ChannelHandshakeLimits_default();
1660 assert(!ret->_underlying_ref);
1661 ret->_underlying_ref = true;
1665 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1666 LDKChannelConfig this_ptr_conv = *(LDKChannelConfig*)this_ptr;
1667 free((void*)this_ptr);
1668 this_ptr_conv._underlying_ref = false;
1669 return ChannelConfig_free(this_ptr_conv);
1672 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1get_1fee_1proportional_1millionths(JNIEnv * _env, jclass _b, jlong this_ptr) {
1673 LDKChannelConfig* this_ptr_conv = (LDKChannelConfig*)this_ptr;
1674 return ChannelConfig_get_fee_proportional_millionths(this_ptr_conv);
1677 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1set_1fee_1proportional_1millionths(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
1678 LDKChannelConfig* this_ptr_conv = (LDKChannelConfig*)this_ptr;
1679 return ChannelConfig_set_fee_proportional_millionths(this_ptr_conv, val);
1682 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1get_1announced_1channel(JNIEnv * _env, jclass _b, jlong this_ptr) {
1683 LDKChannelConfig* this_ptr_conv = (LDKChannelConfig*)this_ptr;
1684 return ChannelConfig_get_announced_channel(this_ptr_conv);
1687 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1set_1announced_1channel(JNIEnv * _env, jclass _b, jlong this_ptr, jboolean val) {
1688 LDKChannelConfig* this_ptr_conv = (LDKChannelConfig*)this_ptr;
1689 return ChannelConfig_set_announced_channel(this_ptr_conv, val);
1692 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1get_1commit_1upfront_1shutdown_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr) {
1693 LDKChannelConfig* this_ptr_conv = (LDKChannelConfig*)this_ptr;
1694 return ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr_conv);
1697 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1set_1commit_1upfront_1shutdown_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr, jboolean val) {
1698 LDKChannelConfig* this_ptr_conv = (LDKChannelConfig*)this_ptr;
1699 return ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr_conv, val);
1702 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) {
1703 LDKChannelConfig* ret = malloc(sizeof(LDKChannelConfig));
1704 *ret = ChannelConfig_new(fee_proportional_millionths_arg, announced_channel_arg, commit_upfront_shutdown_pubkey_arg);
1705 assert(!ret->_underlying_ref);
1706 ret->_underlying_ref = true;
1710 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1default(JNIEnv * _env, jclass _b) {
1711 LDKChannelConfig* ret = malloc(sizeof(LDKChannelConfig));
1712 *ret = ChannelConfig_default();
1713 assert(!ret->_underlying_ref);
1714 ret->_underlying_ref = true;
1718 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1write(JNIEnv * _env, jclass _b, jlong obj) {
1719 LDKChannelConfig* obj_conv = (LDKChannelConfig*)obj;
1720 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
1721 *ret = ChannelConfig_write(obj_conv);
1725 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1read(JNIEnv * _env, jclass _b, jlong ser) {
1726 LDKu8slice ser_conv = *(LDKu8slice*)ser;
1728 LDKChannelConfig* ret = malloc(sizeof(LDKChannelConfig));
1729 *ret = ChannelConfig_read(ser_conv);
1730 assert(!ret->_underlying_ref);
1731 ret->_underlying_ref = true;
1735 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UserConfig_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1736 LDKUserConfig this_ptr_conv = *(LDKUserConfig*)this_ptr;
1737 free((void*)this_ptr);
1738 this_ptr_conv._underlying_ref = false;
1739 return UserConfig_free(this_ptr_conv);
1742 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UserConfig_1get_1own_1channel_1config(JNIEnv * _env, jclass _b, jlong this_ptr) {
1743 LDKUserConfig* this_ptr_conv = (LDKUserConfig*)this_ptr;
1744 LDKChannelHandshakeConfig* ret = malloc(sizeof(LDKChannelHandshakeConfig));
1745 *ret = UserConfig_get_own_channel_config(this_ptr_conv);
1746 assert(!ret->_underlying_ref);
1747 ret->_underlying_ref = true;
1751 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UserConfig_1set_1own_1channel_1config(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1752 LDKUserConfig* this_ptr_conv = (LDKUserConfig*)this_ptr;
1753 LDKChannelHandshakeConfig val_conv = *(LDKChannelHandshakeConfig*)val;
1755 val_conv._underlying_ref = false;
1756 return UserConfig_set_own_channel_config(this_ptr_conv, val_conv);
1759 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UserConfig_1get_1peer_1channel_1config_1limits(JNIEnv * _env, jclass _b, jlong this_ptr) {
1760 LDKUserConfig* this_ptr_conv = (LDKUserConfig*)this_ptr;
1761 LDKChannelHandshakeLimits* ret = malloc(sizeof(LDKChannelHandshakeLimits));
1762 *ret = UserConfig_get_peer_channel_config_limits(this_ptr_conv);
1763 assert(!ret->_underlying_ref);
1764 ret->_underlying_ref = true;
1768 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UserConfig_1set_1peer_1channel_1config_1limits(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1769 LDKUserConfig* this_ptr_conv = (LDKUserConfig*)this_ptr;
1770 LDKChannelHandshakeLimits val_conv = *(LDKChannelHandshakeLimits*)val;
1772 val_conv._underlying_ref = false;
1773 return UserConfig_set_peer_channel_config_limits(this_ptr_conv, val_conv);
1776 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UserConfig_1get_1channel_1options(JNIEnv * _env, jclass _b, jlong this_ptr) {
1777 LDKUserConfig* this_ptr_conv = (LDKUserConfig*)this_ptr;
1778 LDKChannelConfig* ret = malloc(sizeof(LDKChannelConfig));
1779 *ret = UserConfig_get_channel_options(this_ptr_conv);
1780 assert(!ret->_underlying_ref);
1781 ret->_underlying_ref = true;
1785 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UserConfig_1set_1channel_1options(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1786 LDKUserConfig* this_ptr_conv = (LDKUserConfig*)this_ptr;
1787 LDKChannelConfig val_conv = *(LDKChannelConfig*)val;
1789 val_conv._underlying_ref = false;
1790 return UserConfig_set_channel_options(this_ptr_conv, val_conv);
1793 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) {
1794 LDKChannelHandshakeConfig own_channel_config_arg_conv = *(LDKChannelHandshakeConfig*)own_channel_config_arg;
1795 free((void*)own_channel_config_arg);
1796 own_channel_config_arg_conv._underlying_ref = false;
1797 LDKChannelHandshakeLimits peer_channel_config_limits_arg_conv = *(LDKChannelHandshakeLimits*)peer_channel_config_limits_arg;
1798 free((void*)peer_channel_config_limits_arg);
1799 peer_channel_config_limits_arg_conv._underlying_ref = false;
1800 LDKChannelConfig channel_options_arg_conv = *(LDKChannelConfig*)channel_options_arg;
1801 free((void*)channel_options_arg);
1802 channel_options_arg_conv._underlying_ref = false;
1803 LDKUserConfig* ret = malloc(sizeof(LDKUserConfig));
1804 *ret = UserConfig_new(own_channel_config_arg_conv, peer_channel_config_limits_arg_conv, channel_options_arg_conv);
1805 assert(!ret->_underlying_ref);
1806 ret->_underlying_ref = true;
1810 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UserConfig_1default(JNIEnv * _env, jclass _b) {
1811 LDKUserConfig* ret = malloc(sizeof(LDKUserConfig));
1812 *ret = UserConfig_default();
1813 assert(!ret->_underlying_ref);
1814 ret->_underlying_ref = true;
1818 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainWatchInterface_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1819 LDKChainWatchInterface this_ptr_conv = *(LDKChainWatchInterface*)this_ptr;
1820 free((void*)this_ptr);
1821 return ChainWatchInterface_free(this_ptr_conv);
1824 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BroadcasterInterface_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1825 LDKBroadcasterInterface this_ptr_conv = *(LDKBroadcasterInterface*)this_ptr;
1826 free((void*)this_ptr);
1827 return BroadcasterInterface_free(this_ptr_conv);
1830 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainListener_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1831 LDKChainListener this_ptr_conv = *(LDKChainListener*)this_ptr;
1832 free((void*)this_ptr);
1833 return ChainListener_free(this_ptr_conv);
1836 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FeeEstimator_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1837 LDKFeeEstimator this_ptr_conv = *(LDKFeeEstimator*)this_ptr;
1838 free((void*)this_ptr);
1839 return FeeEstimator_free(this_ptr_conv);
1842 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainWatchedUtil_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1843 LDKChainWatchedUtil this_ptr_conv = *(LDKChainWatchedUtil*)this_ptr;
1844 free((void*)this_ptr);
1845 this_ptr_conv._underlying_ref = false;
1846 return ChainWatchedUtil_free(this_ptr_conv);
1849 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChainWatchedUtil_1new(JNIEnv * _env, jclass _b) {
1850 LDKChainWatchedUtil* ret = malloc(sizeof(LDKChainWatchedUtil));
1851 *ret = ChainWatchedUtil_new();
1852 assert(!ret->_underlying_ref);
1853 ret->_underlying_ref = true;
1857 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChainWatchedUtil_1register_1tx(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray txid, jlong script_pub_key) {
1858 LDKChainWatchedUtil* this_arg_conv = (LDKChainWatchedUtil*)this_arg;
1859 unsigned char txid_arr[32];
1860 (*_env)->GetByteArrayRegion (_env, txid, 0, 32, txid_arr);
1861 unsigned char (*txid_ref)[32] = &txid_arr;
1862 LDKu8slice script_pub_key_conv = *(LDKu8slice*)script_pub_key;
1863 free((void*)script_pub_key);
1864 return ChainWatchedUtil_register_tx(this_arg_conv, txid_ref, script_pub_key_conv);
1867 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChainWatchedUtil_1register_1outpoint(JNIEnv * _env, jclass _b, jlong this_arg, jlong outpoint, jlong _script_pub_key) {
1868 LDKChainWatchedUtil* this_arg_conv = (LDKChainWatchedUtil*)this_arg;
1869 LDKC2Tuple_Txidu32Z outpoint_conv = *(LDKC2Tuple_Txidu32Z*)outpoint;
1870 free((void*)outpoint);
1871 LDKu8slice _script_pub_key_conv = *(LDKu8slice*)_script_pub_key;
1872 free((void*)_script_pub_key);
1873 return ChainWatchedUtil_register_outpoint(this_arg_conv, outpoint_conv, _script_pub_key_conv);
1876 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChainWatchedUtil_1watch_1all(JNIEnv * _env, jclass _b, jlong this_arg) {
1877 LDKChainWatchedUtil* this_arg_conv = (LDKChainWatchedUtil*)this_arg;
1878 return ChainWatchedUtil_watch_all(this_arg_conv);
1881 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChainWatchedUtil_1does_1match_1tx(JNIEnv * _env, jclass _b, jlong this_arg, jlong tx) {
1882 LDKChainWatchedUtil* this_arg_conv = (LDKChainWatchedUtil*)this_arg;
1883 LDKTransaction tx_conv = *(LDKTransaction*)tx;
1885 return ChainWatchedUtil_does_match_tx(this_arg_conv, tx_conv);
1888 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlockNotifier_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1889 LDKBlockNotifier this_ptr_conv = *(LDKBlockNotifier*)this_ptr;
1890 free((void*)this_ptr);
1891 this_ptr_conv._underlying_ref = false;
1892 return BlockNotifier_free(this_ptr_conv);
1895 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BlockNotifier_1new(JNIEnv * _env, jclass _b, jlong chain_monitor) {
1896 LDKChainWatchInterface chain_monitor_conv = *(LDKChainWatchInterface*)chain_monitor;
1897 free((void*)chain_monitor);
1898 LDKBlockNotifier* ret = malloc(sizeof(LDKBlockNotifier));
1899 *ret = BlockNotifier_new(chain_monitor_conv);
1900 assert(!ret->_underlying_ref);
1901 ret->_underlying_ref = true;
1905 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlockNotifier_1register_1listener(JNIEnv * _env, jclass _b, jlong this_arg, jlong listener) {
1906 LDKBlockNotifier* this_arg_conv = (LDKBlockNotifier*)this_arg;
1907 LDKChainListener listener_conv = *(LDKChainListener*)listener;
1908 free((void*)listener);
1909 return BlockNotifier_register_listener(this_arg_conv, listener_conv);
1912 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlockNotifier_1block_1connected(JNIEnv * _env, jclass _b, jlong this_arg, jlong block, jint height) {
1913 LDKBlockNotifier* this_arg_conv = (LDKBlockNotifier*)this_arg;
1914 LDKu8slice block_conv = *(LDKu8slice*)block;
1916 return BlockNotifier_block_connected(this_arg_conv, block_conv, height);
1919 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) {
1920 LDKBlockNotifier* this_arg_conv = (LDKBlockNotifier*)this_arg;
1921 unsigned char header_arr[80];
1922 (*_env)->GetByteArrayRegion (_env, header, 0, 80, header_arr);
1923 unsigned char (*header_ref)[80] = &header_arr;
1924 LDKCVec_TransactionZ txn_matched_conv = *(LDKCVec_TransactionZ*)txn_matched;
1925 free((void*)txn_matched);
1926 LDKusizeslice indexes_of_txn_matched_conv = *(LDKusizeslice*)indexes_of_txn_matched;
1927 free((void*)indexes_of_txn_matched);
1928 return BlockNotifier_block_connected_checked(this_arg_conv, header_ref, height, txn_matched_conv, indexes_of_txn_matched_conv);
1931 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlockNotifier_1block_1disconnected(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray header, jint disconnected_height) {
1932 LDKBlockNotifier* this_arg_conv = (LDKBlockNotifier*)this_arg;
1933 unsigned char header_arr[80];
1934 (*_env)->GetByteArrayRegion (_env, header, 0, 80, header_arr);
1935 unsigned char (*header_ref)[80] = &header_arr;
1936 return BlockNotifier_block_disconnected(this_arg_conv, header_ref, disconnected_height);
1939 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainWatchInterfaceUtil_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1940 LDKChainWatchInterfaceUtil this_ptr_conv = *(LDKChainWatchInterfaceUtil*)this_ptr;
1941 free((void*)this_ptr);
1942 this_ptr_conv._underlying_ref = false;
1943 return ChainWatchInterfaceUtil_free(this_ptr_conv);
1946 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChainWatchInterfaceUtil_1as_1ChainWatchInterface(JNIEnv * _env, jclass _b, jlong this_arg) {
1947 LDKChainWatchInterfaceUtil* this_arg_conv = (LDKChainWatchInterfaceUtil*)this_arg;
1948 LDKChainWatchInterface* ret = malloc(sizeof(LDKChainWatchInterface));
1949 *ret = ChainWatchInterfaceUtil_as_ChainWatchInterface(this_arg_conv);
1953 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChainWatchInterfaceUtil_1new(JNIEnv * _env, jclass _b, jlong network) {
1954 LDKNetwork network_conv = *(LDKNetwork*)network;
1955 free((void*)network);
1956 LDKChainWatchInterfaceUtil* ret = malloc(sizeof(LDKChainWatchInterfaceUtil));
1957 *ret = ChainWatchInterfaceUtil_new(network_conv);
1958 assert(!ret->_underlying_ref);
1959 ret->_underlying_ref = true;
1963 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChainWatchInterfaceUtil_1does_1match_1tx(JNIEnv * _env, jclass _b, jlong this_arg, jlong tx) {
1964 LDKChainWatchInterfaceUtil* this_arg_conv = (LDKChainWatchInterfaceUtil*)this_arg;
1965 LDKTransaction tx_conv = *(LDKTransaction*)tx;
1967 return ChainWatchInterfaceUtil_does_match_tx(this_arg_conv, tx_conv);
1970 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutPoint_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1971 LDKOutPoint this_ptr_conv = *(LDKOutPoint*)this_ptr;
1972 free((void*)this_ptr);
1973 this_ptr_conv._underlying_ref = false;
1974 return OutPoint_free(this_ptr_conv);
1977 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OutPoint_1get_1txid(JNIEnv * _env, jclass _b, jlong this_ptr) {
1978 LDKOutPoint* this_ptr_conv = (LDKOutPoint*)this_ptr;
1979 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
1980 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *OutPoint_get_txid(this_ptr_conv));
1984 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutPoint_1set_1txid(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1985 LDKOutPoint* this_ptr_conv = (LDKOutPoint*)this_ptr;
1986 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
1988 return OutPoint_set_txid(this_ptr_conv, val_conv);
1991 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_OutPoint_1get_1index(JNIEnv * _env, jclass _b, jlong this_ptr) {
1992 LDKOutPoint* this_ptr_conv = (LDKOutPoint*)this_ptr;
1993 return OutPoint_get_index(this_ptr_conv);
1996 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutPoint_1set_1index(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
1997 LDKOutPoint* this_ptr_conv = (LDKOutPoint*)this_ptr;
1998 return OutPoint_set_index(this_ptr_conv, val);
2001 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutPoint_1new(JNIEnv * _env, jclass _b, jlong txid_arg, jshort index_arg) {
2002 LDKThirtyTwoBytes txid_arg_conv = *(LDKThirtyTwoBytes*)txid_arg;
2003 free((void*)txid_arg);
2004 LDKOutPoint* ret = malloc(sizeof(LDKOutPoint));
2005 *ret = OutPoint_new(txid_arg_conv, index_arg);
2006 assert(!ret->_underlying_ref);
2007 ret->_underlying_ref = true;
2011 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutPoint_1to_1channel_1id(JNIEnv * _env, jclass _b, jlong this_arg) {
2012 LDKOutPoint* this_arg_conv = (LDKOutPoint*)this_arg;
2013 LDKThirtyTwoBytes* ret = malloc(sizeof(LDKThirtyTwoBytes));
2014 *ret = OutPoint_to_channel_id(this_arg_conv);
2018 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutPoint_1write(JNIEnv * _env, jclass _b, jlong obj) {
2019 LDKOutPoint* obj_conv = (LDKOutPoint*)obj;
2020 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
2021 *ret = OutPoint_write(obj_conv);
2025 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutPoint_1read(JNIEnv * _env, jclass _b, jlong ser) {
2026 LDKu8slice ser_conv = *(LDKu8slice*)ser;
2028 LDKOutPoint* ret = malloc(sizeof(LDKOutPoint));
2029 *ret = OutPoint_read(ser_conv);
2030 assert(!ret->_underlying_ref);
2031 ret->_underlying_ref = true;
2035 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpendableOutputDescriptor_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2036 LDKSpendableOutputDescriptor this_ptr_conv = *(LDKSpendableOutputDescriptor*)this_ptr;
2037 free((void*)this_ptr);
2038 return SpendableOutputDescriptor_free(this_ptr_conv);
2041 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2042 LDKChannelKeys this_ptr_conv = *(LDKChannelKeys*)this_ptr;
2043 free((void*)this_ptr);
2044 return ChannelKeys_free(this_ptr_conv);
2047 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_KeysInterface_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2048 LDKKeysInterface this_ptr_conv = *(LDKKeysInterface*)this_ptr;
2049 free((void*)this_ptr);
2050 return KeysInterface_free(this_ptr_conv);
2053 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2054 LDKInMemoryChannelKeys this_ptr_conv = *(LDKInMemoryChannelKeys*)this_ptr;
2055 free((void*)this_ptr);
2056 this_ptr_conv._underlying_ref = false;
2057 return InMemoryChannelKeys_free(this_ptr_conv);
2060 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1funding_1key(JNIEnv * _env, jclass _b, jlong this_ptr) {
2061 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2062 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
2063 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *InMemoryChannelKeys_get_funding_key(this_ptr_conv));
2067 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1funding_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2068 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2069 LDKSecretKey val_conv = *(LDKSecretKey*)val;
2071 return InMemoryChannelKeys_set_funding_key(this_ptr_conv, val_conv);
2074 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1revocation_1base_1key(JNIEnv * _env, jclass _b, jlong this_ptr) {
2075 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2076 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
2077 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *InMemoryChannelKeys_get_revocation_base_key(this_ptr_conv));
2081 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1revocation_1base_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2082 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2083 LDKSecretKey val_conv = *(LDKSecretKey*)val;
2085 return InMemoryChannelKeys_set_revocation_base_key(this_ptr_conv, val_conv);
2088 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1payment_1key(JNIEnv * _env, jclass _b, jlong this_ptr) {
2089 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2090 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
2091 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *InMemoryChannelKeys_get_payment_key(this_ptr_conv));
2095 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1payment_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2096 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2097 LDKSecretKey val_conv = *(LDKSecretKey*)val;
2099 return InMemoryChannelKeys_set_payment_key(this_ptr_conv, val_conv);
2102 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1delayed_1payment_1base_1key(JNIEnv * _env, jclass _b, jlong this_ptr) {
2103 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2104 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
2105 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *InMemoryChannelKeys_get_delayed_payment_base_key(this_ptr_conv));
2109 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1delayed_1payment_1base_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2110 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2111 LDKSecretKey val_conv = *(LDKSecretKey*)val;
2113 return InMemoryChannelKeys_set_delayed_payment_base_key(this_ptr_conv, val_conv);
2116 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1htlc_1base_1key(JNIEnv * _env, jclass _b, jlong this_ptr) {
2117 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2118 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
2119 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *InMemoryChannelKeys_get_htlc_base_key(this_ptr_conv));
2123 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1htlc_1base_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2124 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2125 LDKSecretKey val_conv = *(LDKSecretKey*)val;
2127 return InMemoryChannelKeys_set_htlc_base_key(this_ptr_conv, val_conv);
2130 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1commitment_1seed(JNIEnv * _env, jclass _b, jlong this_ptr) {
2131 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2132 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
2133 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *InMemoryChannelKeys_get_commitment_seed(this_ptr_conv));
2137 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1commitment_1seed(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2138 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2139 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
2141 return InMemoryChannelKeys_set_commitment_seed(this_ptr_conv, val_conv);
2144 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) {
2145 LDKSecretKey funding_key_conv = *(LDKSecretKey*)funding_key;
2146 free((void*)funding_key);
2147 LDKSecretKey revocation_base_key_conv = *(LDKSecretKey*)revocation_base_key;
2148 free((void*)revocation_base_key);
2149 LDKSecretKey payment_key_conv = *(LDKSecretKey*)payment_key;
2150 free((void*)payment_key);
2151 LDKSecretKey delayed_payment_base_key_conv = *(LDKSecretKey*)delayed_payment_base_key;
2152 free((void*)delayed_payment_base_key);
2153 LDKSecretKey htlc_base_key_conv = *(LDKSecretKey*)htlc_base_key;
2154 free((void*)htlc_base_key);
2155 LDKThirtyTwoBytes commitment_seed_conv = *(LDKThirtyTwoBytes*)commitment_seed;
2156 free((void*)commitment_seed);
2157 LDKC2Tuple_u64u64Z key_derivation_params_conv = *(LDKC2Tuple_u64u64Z*)key_derivation_params;
2158 free((void*)key_derivation_params);
2159 LDKInMemoryChannelKeys* ret = malloc(sizeof(LDKInMemoryChannelKeys));
2160 *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);
2161 assert(!ret->_underlying_ref);
2162 ret->_underlying_ref = true;
2166 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1remote_1pubkeys(JNIEnv * _env, jclass _b, jlong this_arg) {
2167 LDKInMemoryChannelKeys* this_arg_conv = (LDKInMemoryChannelKeys*)this_arg;
2168 LDKChannelPublicKeys* ret = malloc(sizeof(LDKChannelPublicKeys));
2169 *ret = InMemoryChannelKeys_remote_pubkeys(this_arg_conv);
2170 assert(!ret->_underlying_ref);
2171 ret->_underlying_ref = true;
2175 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1remote_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_arg) {
2176 LDKInMemoryChannelKeys* this_arg_conv = (LDKInMemoryChannelKeys*)this_arg;
2177 return InMemoryChannelKeys_remote_to_self_delay(this_arg_conv);
2180 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1local_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_arg) {
2181 LDKInMemoryChannelKeys* this_arg_conv = (LDKInMemoryChannelKeys*)this_arg;
2182 return InMemoryChannelKeys_local_to_self_delay(this_arg_conv);
2185 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1as_1ChannelKeys(JNIEnv * _env, jclass _b, jlong this_arg) {
2186 LDKInMemoryChannelKeys* this_arg_conv = (LDKInMemoryChannelKeys*)this_arg;
2187 LDKChannelKeys* ret = malloc(sizeof(LDKChannelKeys));
2188 *ret = InMemoryChannelKeys_as_ChannelKeys(this_arg_conv);
2192 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1write(JNIEnv * _env, jclass _b, jlong obj) {
2193 LDKInMemoryChannelKeys* obj_conv = (LDKInMemoryChannelKeys*)obj;
2194 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
2195 *ret = InMemoryChannelKeys_write(obj_conv);
2199 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1read(JNIEnv * _env, jclass _b, jlong ser) {
2200 LDKu8slice ser_conv = *(LDKu8slice*)ser;
2202 LDKInMemoryChannelKeys* ret = malloc(sizeof(LDKInMemoryChannelKeys));
2203 *ret = InMemoryChannelKeys_read(ser_conv);
2204 assert(!ret->_underlying_ref);
2205 ret->_underlying_ref = true;
2209 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_KeysManager_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2210 LDKKeysManager this_ptr_conv = *(LDKKeysManager*)this_ptr;
2211 free((void*)this_ptr);
2212 this_ptr_conv._underlying_ref = false;
2213 return KeysManager_free(this_ptr_conv);
2216 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) {
2217 unsigned char seed_arr[32];
2218 (*_env)->GetByteArrayRegion (_env, seed, 0, 32, seed_arr);
2219 unsigned char (*seed_ref)[32] = &seed_arr;
2220 LDKNetwork network_conv = *(LDKNetwork*)network;
2221 free((void*)network);
2222 LDKKeysManager* ret = malloc(sizeof(LDKKeysManager));
2223 *ret = KeysManager_new(seed_ref, network_conv, starting_time_secs, starting_time_nanos);
2224 assert(!ret->_underlying_ref);
2225 ret->_underlying_ref = true;
2229 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) {
2230 LDKKeysManager* this_arg_conv = (LDKKeysManager*)this_arg;
2231 LDKInMemoryChannelKeys* ret = malloc(sizeof(LDKInMemoryChannelKeys));
2232 *ret = KeysManager_derive_channel_keys(this_arg_conv, channel_value_satoshis, params_1, params_2);
2233 assert(!ret->_underlying_ref);
2234 ret->_underlying_ref = true;
2238 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1KeysInterface(JNIEnv * _env, jclass _b, jlong this_arg) {
2239 LDKKeysManager* this_arg_conv = (LDKKeysManager*)this_arg;
2240 LDKKeysInterface* ret = malloc(sizeof(LDKKeysInterface));
2241 *ret = KeysManager_as_KeysInterface(this_arg_conv);
2245 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2246 LDKChannelManager this_ptr_conv = *(LDKChannelManager*)this_ptr;
2247 free((void*)this_ptr);
2248 this_ptr_conv._underlying_ref = false;
2249 return ChannelManager_free(this_ptr_conv);
2252 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2253 LDKChannelDetails this_ptr_conv = *(LDKChannelDetails*)this_ptr;
2254 free((void*)this_ptr);
2255 this_ptr_conv._underlying_ref = false;
2256 return ChannelDetails_free(this_ptr_conv);
2259 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
2260 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2261 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
2262 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *ChannelDetails_get_channel_id(this_ptr_conv));
2266 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2267 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2268 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
2270 return ChannelDetails_set_channel_id(this_ptr_conv, val_conv);
2273 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1remote_1network_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
2274 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2275 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
2276 *ret = ChannelDetails_get_remote_network_id(this_ptr_conv);
2280 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1remote_1network_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2281 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2282 LDKPublicKey val_conv = *(LDKPublicKey*)val;
2284 return ChannelDetails_set_remote_network_id(this_ptr_conv, val_conv);
2287 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1counterparty_1features(JNIEnv * _env, jclass _b, jlong this_ptr) {
2288 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2289 LDKInitFeatures* ret = malloc(sizeof(LDKInitFeatures));
2290 *ret = ChannelDetails_get_counterparty_features(this_ptr_conv);
2291 assert(!ret->_underlying_ref);
2292 ret->_underlying_ref = true;
2296 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1counterparty_1features(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2297 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2298 LDKInitFeatures val_conv = *(LDKInitFeatures*)val;
2300 val_conv._underlying_ref = false;
2301 return ChannelDetails_set_counterparty_features(this_ptr_conv, val_conv);
2304 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1channel_1value_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
2305 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2306 return ChannelDetails_get_channel_value_satoshis(this_ptr_conv);
2309 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1channel_1value_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2310 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2311 return ChannelDetails_set_channel_value_satoshis(this_ptr_conv, val);
2314 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1user_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
2315 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2316 return ChannelDetails_get_user_id(this_ptr_conv);
2319 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1user_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2320 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2321 return ChannelDetails_set_user_id(this_ptr_conv, val);
2324 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1outbound_1capacity_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
2325 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2326 return ChannelDetails_get_outbound_capacity_msat(this_ptr_conv);
2329 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1outbound_1capacity_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2330 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2331 return ChannelDetails_set_outbound_capacity_msat(this_ptr_conv, val);
2334 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1inbound_1capacity_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
2335 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2336 return ChannelDetails_get_inbound_capacity_msat(this_ptr_conv);
2339 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1inbound_1capacity_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2340 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2341 return ChannelDetails_set_inbound_capacity_msat(this_ptr_conv, val);
2344 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1is_1live(JNIEnv * _env, jclass _b, jlong this_ptr) {
2345 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2346 return ChannelDetails_get_is_live(this_ptr_conv);
2349 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1is_1live(JNIEnv * _env, jclass _b, jlong this_ptr, jboolean val) {
2350 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2351 return ChannelDetails_set_is_live(this_ptr_conv, val);
2354 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PaymentSendFailure_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2355 LDKPaymentSendFailure this_ptr_conv = *(LDKPaymentSendFailure*)this_ptr;
2356 free((void*)this_ptr);
2357 this_ptr_conv._underlying_ref = false;
2358 return PaymentSendFailure_free(this_ptr_conv);
2361 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) {
2362 LDKNetwork network_conv = *(LDKNetwork*)network;
2363 free((void*)network);
2364 LDKFeeEstimator fee_est_conv = *(LDKFeeEstimator*)fee_est;
2365 free((void*)fee_est);
2366 LDKManyChannelMonitor monitor_conv = *(LDKManyChannelMonitor*)monitor;
2367 free((void*)monitor);
2368 LDKBroadcasterInterface tx_broadcaster_conv = *(LDKBroadcasterInterface*)tx_broadcaster;
2369 free((void*)tx_broadcaster);
2370 LDKLogger logger_conv = *(LDKLogger*)logger;
2371 free((void*)logger);
2372 LDKKeysInterface keys_manager_conv = *(LDKKeysInterface*)keys_manager;
2373 free((void*)keys_manager);
2374 LDKUserConfig config_conv = *(LDKUserConfig*)config;
2375 free((void*)config);
2376 config_conv._underlying_ref = false;
2377 uintptr_t current_blockchain_height_conv = *(uintptr_t*)current_blockchain_height;
2378 free((void*)current_blockchain_height);
2379 LDKChannelManager* ret = malloc(sizeof(LDKChannelManager));
2380 *ret = ChannelManager_new(network_conv, fee_est_conv, monitor_conv, tx_broadcaster_conv, logger_conv, keys_manager_conv, config_conv, current_blockchain_height_conv);
2381 assert(!ret->_underlying_ref);
2382 ret->_underlying_ref = true;
2386 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) {
2387 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2388 LDKPublicKey their_network_key_conv = *(LDKPublicKey*)their_network_key;
2389 free((void*)their_network_key);
2390 LDKUserConfig override_config_conv = *(LDKUserConfig*)override_config;
2391 free((void*)override_config);
2392 override_config_conv._underlying_ref = false;
2393 LDKCResult_NoneAPIErrorZ* ret = malloc(sizeof(LDKCResult_NoneAPIErrorZ));
2394 *ret = ChannelManager_create_channel(this_arg_conv, their_network_key_conv, channel_value_satoshis, push_msat, user_id, override_config_conv);
2398 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1list_1channels(JNIEnv * _env, jclass _b, jlong this_arg) {
2399 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2400 LDKCVec_ChannelDetailsZ* ret = malloc(sizeof(LDKCVec_ChannelDetailsZ));
2401 *ret = ChannelManager_list_channels(this_arg_conv);
2405 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1list_1usable_1channels(JNIEnv * _env, jclass _b, jlong this_arg) {
2406 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2407 LDKCVec_ChannelDetailsZ* ret = malloc(sizeof(LDKCVec_ChannelDetailsZ));
2408 *ret = ChannelManager_list_usable_channels(this_arg_conv);
2412 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1close_1channel(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray channel_id) {
2413 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2414 unsigned char channel_id_arr[32];
2415 (*_env)->GetByteArrayRegion (_env, channel_id, 0, 32, channel_id_arr);
2416 unsigned char (*channel_id_ref)[32] = &channel_id_arr;
2417 LDKCResult_NoneAPIErrorZ* ret = malloc(sizeof(LDKCResult_NoneAPIErrorZ));
2418 *ret = ChannelManager_close_channel(this_arg_conv, channel_id_ref);
2422 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1force_1close_1channel(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray channel_id) {
2423 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2424 unsigned char channel_id_arr[32];
2425 (*_env)->GetByteArrayRegion (_env, channel_id, 0, 32, channel_id_arr);
2426 unsigned char (*channel_id_ref)[32] = &channel_id_arr;
2427 return ChannelManager_force_close_channel(this_arg_conv, channel_id_ref);
2430 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1force_1close_1all_1channels(JNIEnv * _env, jclass _b, jlong this_arg) {
2431 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2432 return ChannelManager_force_close_all_channels(this_arg_conv);
2435 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) {
2436 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2437 LDKRoute* route_conv = (LDKRoute*)route;
2438 LDKThirtyTwoBytes payment_hash_conv = *(LDKThirtyTwoBytes*)payment_hash;
2439 free((void*)payment_hash);
2440 LDKThirtyTwoBytes payment_secret_conv = *(LDKThirtyTwoBytes*)payment_secret;
2441 free((void*)payment_secret);
2442 LDKCResult_NonePaymentSendFailureZ* ret = malloc(sizeof(LDKCResult_NonePaymentSendFailureZ));
2443 *ret = ChannelManager_send_payment(this_arg_conv, route_conv, payment_hash_conv, payment_secret_conv);
2447 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) {
2448 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2449 unsigned char temporary_channel_id_arr[32];
2450 (*_env)->GetByteArrayRegion (_env, temporary_channel_id, 0, 32, temporary_channel_id_arr);
2451 unsigned char (*temporary_channel_id_ref)[32] = &temporary_channel_id_arr;
2452 LDKOutPoint funding_txo_conv = *(LDKOutPoint*)funding_txo;
2453 free((void*)funding_txo);
2454 funding_txo_conv._underlying_ref = false;
2455 return ChannelManager_funding_transaction_generated(this_arg_conv, temporary_channel_id_ref, funding_txo_conv);
2458 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) {
2459 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2460 LDKThreeBytes rgb_conv = *(LDKThreeBytes*)rgb;
2462 LDKThirtyTwoBytes alias_conv = *(LDKThirtyTwoBytes*)alias;
2464 LDKCVec_NetAddressZ addresses_conv = *(LDKCVec_NetAddressZ*)addresses;
2465 free((void*)addresses);
2466 return ChannelManager_broadcast_node_announcement(this_arg_conv, rgb_conv, alias_conv, addresses_conv);
2469 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1process_1pending_1htlc_1forwards(JNIEnv * _env, jclass _b, jlong this_arg) {
2470 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2471 return ChannelManager_process_pending_htlc_forwards(this_arg_conv);
2474 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1timer_1chan_1freshness_1every_1min(JNIEnv * _env, jclass _b, jlong this_arg) {
2475 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2476 return ChannelManager_timer_chan_freshness_every_min(this_arg_conv);
2479 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) {
2480 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2481 unsigned char payment_hash_arr[32];
2482 (*_env)->GetByteArrayRegion (_env, payment_hash, 0, 32, payment_hash_arr);
2483 unsigned char (*payment_hash_ref)[32] = &payment_hash_arr;
2484 LDKThirtyTwoBytes payment_secret_conv = *(LDKThirtyTwoBytes*)payment_secret;
2485 free((void*)payment_secret);
2486 return ChannelManager_fail_htlc_backwards(this_arg_conv, payment_hash_ref, payment_secret_conv);
2489 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelManager_1claim_1funds(JNIEnv * _env, jclass _b, jlong this_arg, jlong payment_preimage, jlong payment_secret, jlong expected_amount) {
2490 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2491 LDKThirtyTwoBytes payment_preimage_conv = *(LDKThirtyTwoBytes*)payment_preimage;
2492 free((void*)payment_preimage);
2493 LDKThirtyTwoBytes payment_secret_conv = *(LDKThirtyTwoBytes*)payment_secret;
2494 free((void*)payment_secret);
2495 return ChannelManager_claim_funds(this_arg_conv, payment_preimage_conv, payment_secret_conv, expected_amount);
2498 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1get_1our_1node_1id(JNIEnv * _env, jclass _b, jlong this_arg) {
2499 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2500 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
2501 *ret = ChannelManager_get_our_node_id(this_arg_conv);
2505 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1channel_1monitor_1updated(JNIEnv * _env, jclass _b, jlong this_arg, jlong funding_txo, jlong highest_applied_update_id) {
2506 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2507 LDKOutPoint* funding_txo_conv = (LDKOutPoint*)funding_txo;
2508 return ChannelManager_channel_monitor_updated(this_arg_conv, funding_txo_conv, highest_applied_update_id);
2511 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1MessageSendEventsProvider(JNIEnv * _env, jclass _b, jlong this_arg) {
2512 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2513 LDKMessageSendEventsProvider* ret = malloc(sizeof(LDKMessageSendEventsProvider));
2514 *ret = ChannelManager_as_MessageSendEventsProvider(this_arg_conv);
2518 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1EventsProvider(JNIEnv * _env, jclass _b, jlong this_arg) {
2519 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2520 LDKEventsProvider* ret = malloc(sizeof(LDKEventsProvider));
2521 *ret = ChannelManager_as_EventsProvider(this_arg_conv);
2525 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1ChainListener(JNIEnv * _env, jclass _b, jlong this_arg) {
2526 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2527 LDKChainListener* ret = malloc(sizeof(LDKChainListener));
2528 *ret = ChannelManager_as_ChainListener(this_arg_conv);
2532 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1ChannelMessageHandler(JNIEnv * _env, jclass _b, jlong this_arg) {
2533 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2534 LDKChannelMessageHandler* ret = malloc(sizeof(LDKChannelMessageHandler));
2535 *ret = ChannelManager_as_ChannelMessageHandler(this_arg_conv);
2539 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2540 LDKChannelManagerReadArgs this_ptr_conv = *(LDKChannelManagerReadArgs*)this_ptr;
2541 free((void*)this_ptr);
2542 this_ptr_conv._underlying_ref = false;
2543 return ChannelManagerReadArgs_free(this_ptr_conv);
2546 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1get_1keys_1manager(JNIEnv * _env, jclass _b, jlong this_ptr) {
2547 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2548 long ret = (long)ChannelManagerReadArgs_get_keys_manager(this_ptr_conv);
2552 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1set_1keys_1manager(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2553 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2554 LDKKeysInterface val_conv = *(LDKKeysInterface*)val;
2556 return ChannelManagerReadArgs_set_keys_manager(this_ptr_conv, val_conv);
2559 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1get_1fee_1estimator(JNIEnv * _env, jclass _b, jlong this_ptr) {
2560 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2561 long ret = (long)ChannelManagerReadArgs_get_fee_estimator(this_ptr_conv);
2565 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1set_1fee_1estimator(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2566 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2567 LDKFeeEstimator val_conv = *(LDKFeeEstimator*)val;
2569 return ChannelManagerReadArgs_set_fee_estimator(this_ptr_conv, val_conv);
2572 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1get_1monitor(JNIEnv * _env, jclass _b, jlong this_ptr) {
2573 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2574 long ret = (long)ChannelManagerReadArgs_get_monitor(this_ptr_conv);
2578 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1set_1monitor(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2579 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2580 LDKManyChannelMonitor val_conv = *(LDKManyChannelMonitor*)val;
2582 return ChannelManagerReadArgs_set_monitor(this_ptr_conv, val_conv);
2585 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1get_1tx_1broadcaster(JNIEnv * _env, jclass _b, jlong this_ptr) {
2586 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2587 long ret = (long)ChannelManagerReadArgs_get_tx_broadcaster(this_ptr_conv);
2591 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1set_1tx_1broadcaster(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2592 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2593 LDKBroadcasterInterface val_conv = *(LDKBroadcasterInterface*)val;
2595 return ChannelManagerReadArgs_set_tx_broadcaster(this_ptr_conv, val_conv);
2598 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1get_1logger(JNIEnv * _env, jclass _b, jlong this_ptr) {
2599 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2600 long ret = (long)ChannelManagerReadArgs_get_logger(this_ptr_conv);
2604 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1set_1logger(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2605 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2606 LDKLogger val_conv = *(LDKLogger*)val;
2608 return ChannelManagerReadArgs_set_logger(this_ptr_conv, val_conv);
2611 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1get_1default_1config(JNIEnv * _env, jclass _b, jlong this_ptr) {
2612 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2613 LDKUserConfig* ret = malloc(sizeof(LDKUserConfig));
2614 *ret = ChannelManagerReadArgs_get_default_config(this_ptr_conv);
2615 assert(!ret->_underlying_ref);
2616 ret->_underlying_ref = true;
2620 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1set_1default_1config(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2621 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2622 LDKUserConfig val_conv = *(LDKUserConfig*)val;
2624 val_conv._underlying_ref = false;
2625 return ChannelManagerReadArgs_set_default_config(this_ptr_conv, val_conv);
2628 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1new(JNIEnv * _env, jclass _b, jlong keys_manager, jlong fee_estimator, jlong monitor, jlong tx_broadcaster, jlong logger, jlong default_config, jlong channel_monitors) {
2629 LDKKeysInterface keys_manager_conv = *(LDKKeysInterface*)keys_manager;
2630 free((void*)keys_manager);
2631 LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)fee_estimator;
2632 free((void*)fee_estimator);
2633 LDKManyChannelMonitor monitor_conv = *(LDKManyChannelMonitor*)monitor;
2634 free((void*)monitor);
2635 LDKBroadcasterInterface tx_broadcaster_conv = *(LDKBroadcasterInterface*)tx_broadcaster;
2636 free((void*)tx_broadcaster);
2637 LDKLogger logger_conv = *(LDKLogger*)logger;
2638 free((void*)logger);
2639 LDKUserConfig default_config_conv = *(LDKUserConfig*)default_config;
2640 free((void*)default_config);
2641 default_config_conv._underlying_ref = false;
2642 LDKCVec_ChannelMonitorZ channel_monitors_conv = *(LDKCVec_ChannelMonitorZ*)channel_monitors;
2643 free((void*)channel_monitors);
2644 LDKChannelManagerReadArgs* ret = malloc(sizeof(LDKChannelManagerReadArgs));
2645 *ret = ChannelManagerReadArgs_new(keys_manager_conv, fee_estimator_conv, monitor_conv, tx_broadcaster_conv, logger_conv, default_config_conv, channel_monitors_conv);
2646 assert(!ret->_underlying_ref);
2647 ret->_underlying_ref = true;
2651 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2652 LDKChannelMonitorUpdate this_ptr_conv = *(LDKChannelMonitorUpdate*)this_ptr;
2653 free((void*)this_ptr);
2654 this_ptr_conv._underlying_ref = false;
2655 return ChannelMonitorUpdate_free(this_ptr_conv);
2658 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1get_1update_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
2659 LDKChannelMonitorUpdate* this_ptr_conv = (LDKChannelMonitorUpdate*)this_ptr;
2660 return ChannelMonitorUpdate_get_update_id(this_ptr_conv);
2663 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1set_1update_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2664 LDKChannelMonitorUpdate* this_ptr_conv = (LDKChannelMonitorUpdate*)this_ptr;
2665 return ChannelMonitorUpdate_set_update_id(this_ptr_conv, val);
2668 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1write(JNIEnv * _env, jclass _b, jlong obj) {
2669 LDKChannelMonitorUpdate* obj_conv = (LDKChannelMonitorUpdate*)obj;
2670 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
2671 *ret = ChannelMonitorUpdate_write(obj_conv);
2675 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1read(JNIEnv * _env, jclass _b, jlong ser) {
2676 LDKu8slice ser_conv = *(LDKu8slice*)ser;
2678 LDKChannelMonitorUpdate* ret = malloc(sizeof(LDKChannelMonitorUpdate));
2679 *ret = ChannelMonitorUpdate_read(ser_conv);
2680 assert(!ret->_underlying_ref);
2681 ret->_underlying_ref = true;
2685 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_MonitorUpdateError_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2686 LDKMonitorUpdateError this_ptr_conv = *(LDKMonitorUpdateError*)this_ptr;
2687 free((void*)this_ptr);
2688 this_ptr_conv._underlying_ref = false;
2689 return MonitorUpdateError_free(this_ptr_conv);
2692 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2693 LDKMonitorEvent this_ptr_conv = *(LDKMonitorEvent*)this_ptr;
2694 free((void*)this_ptr);
2695 this_ptr_conv._underlying_ref = false;
2696 return MonitorEvent_free(this_ptr_conv);
2699 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCUpdate_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2700 LDKHTLCUpdate this_ptr_conv = *(LDKHTLCUpdate*)this_ptr;
2701 free((void*)this_ptr);
2702 this_ptr_conv._underlying_ref = false;
2703 return HTLCUpdate_free(this_ptr_conv);
2706 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCUpdate_1write(JNIEnv * _env, jclass _b, jlong obj) {
2707 LDKHTLCUpdate* obj_conv = (LDKHTLCUpdate*)obj;
2708 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
2709 *ret = HTLCUpdate_write(obj_conv);
2713 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCUpdate_1read(JNIEnv * _env, jclass _b, jlong ser) {
2714 LDKu8slice ser_conv = *(LDKu8slice*)ser;
2716 LDKHTLCUpdate* ret = malloc(sizeof(LDKHTLCUpdate));
2717 *ret = HTLCUpdate_read(ser_conv);
2718 assert(!ret->_underlying_ref);
2719 ret->_underlying_ref = true;
2723 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2724 LDKChannelMonitor this_ptr_conv = *(LDKChannelMonitor*)this_ptr;
2725 free((void*)this_ptr);
2726 this_ptr_conv._underlying_ref = false;
2727 return ChannelMonitor_free(this_ptr_conv);
2730 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ManyChannelMonitor_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2731 LDKManyChannelMonitor this_ptr_conv = *(LDKManyChannelMonitor*)this_ptr;
2732 free((void*)this_ptr);
2733 return ManyChannelMonitor_free(this_ptr_conv);
2736 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1update_1monitor(JNIEnv * _env, jclass _b, jlong this_arg, jlong updates, jlong broadcaster, jlong logger) {
2737 LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg;
2738 LDKChannelMonitorUpdate updates_conv = *(LDKChannelMonitorUpdate*)updates;
2739 free((void*)updates);
2740 updates_conv._underlying_ref = false;
2741 LDKBroadcasterInterface* broadcaster_conv = (LDKBroadcasterInterface*)broadcaster;
2742 LDKLogger* logger_conv = (LDKLogger*)logger;
2743 LDKCResult_NoneMonitorUpdateErrorZ* ret = malloc(sizeof(LDKCResult_NoneMonitorUpdateErrorZ));
2744 *ret = ChannelMonitor_update_monitor(this_arg_conv, updates_conv, broadcaster_conv, logger_conv);
2748 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1latest_1update_1id(JNIEnv * _env, jclass _b, jlong this_arg) {
2749 LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg;
2750 return ChannelMonitor_get_latest_update_id(this_arg_conv);
2753 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1funding_1txo(JNIEnv * _env, jclass _b, jlong this_arg) {
2754 LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg;
2755 LDKC2Tuple_OutPointScriptZ* ret = malloc(sizeof(LDKC2Tuple_OutPointScriptZ));
2756 *ret = ChannelMonitor_get_funding_txo(this_arg_conv);
2760 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1and_1clear_1pending_1monitor_1events(JNIEnv * _env, jclass _b, jlong this_arg) {
2761 LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg;
2762 LDKCVec_MonitorEventZ* ret = malloc(sizeof(LDKCVec_MonitorEventZ));
2763 *ret = ChannelMonitor_get_and_clear_pending_monitor_events(this_arg_conv);
2767 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1and_1clear_1pending_1events(JNIEnv * _env, jclass _b, jlong this_arg) {
2768 LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg;
2769 LDKCVec_EventZ* ret = malloc(sizeof(LDKCVec_EventZ));
2770 *ret = ChannelMonitor_get_and_clear_pending_events(this_arg_conv);
2774 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1latest_1local_1commitment_1txn(JNIEnv * _env, jclass _b, jlong this_arg, jlong logger) {
2775 LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg;
2776 LDKLogger* logger_conv = (LDKLogger*)logger;
2777 LDKCVec_TransactionZ* ret = malloc(sizeof(LDKCVec_TransactionZ));
2778 *ret = ChannelMonitor_get_latest_local_commitment_txn(this_arg_conv, logger_conv);
2782 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DecodeError_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2783 LDKDecodeError this_ptr_conv = *(LDKDecodeError*)this_ptr;
2784 free((void*)this_ptr);
2785 this_ptr_conv._underlying_ref = false;
2786 return DecodeError_free(this_ptr_conv);
2789 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Init_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2790 LDKInit this_ptr_conv = *(LDKInit*)this_ptr;
2791 free((void*)this_ptr);
2792 this_ptr_conv._underlying_ref = false;
2793 return Init_free(this_ptr_conv);
2796 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2797 LDKErrorMessage this_ptr_conv = *(LDKErrorMessage*)this_ptr;
2798 free((void*)this_ptr);
2799 this_ptr_conv._underlying_ref = false;
2800 return ErrorMessage_free(this_ptr_conv);
2803 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
2804 LDKErrorMessage* this_ptr_conv = (LDKErrorMessage*)this_ptr;
2805 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
2806 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *ErrorMessage_get_channel_id(this_ptr_conv));
2810 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2811 LDKErrorMessage* this_ptr_conv = (LDKErrorMessage*)this_ptr;
2812 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
2814 return ErrorMessage_set_channel_id(this_ptr_conv, val_conv);
2817 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1get_1data(JNIEnv * _env, jclass _b, jlong this_ptr) {
2818 LDKErrorMessage* this_ptr_conv = (LDKErrorMessage*)this_ptr;
2819 LDKStr* ret = malloc(sizeof(LDKStr));
2820 *ret = ErrorMessage_get_data(this_ptr_conv);
2824 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1set_1data(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2825 LDKErrorMessage* this_ptr_conv = (LDKErrorMessage*)this_ptr;
2826 LDKCVec_u8Z val_conv = *(LDKCVec_u8Z*)val;
2828 return ErrorMessage_set_data(this_ptr_conv, val_conv);
2831 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1new(JNIEnv * _env, jclass _b, jlong channel_id_arg, jlong data_arg) {
2832 LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
2833 free((void*)channel_id_arg);
2834 LDKCVec_u8Z data_arg_conv = *(LDKCVec_u8Z*)data_arg;
2835 free((void*)data_arg);
2836 LDKErrorMessage* ret = malloc(sizeof(LDKErrorMessage));
2837 *ret = ErrorMessage_new(channel_id_arg_conv, data_arg_conv);
2838 assert(!ret->_underlying_ref);
2839 ret->_underlying_ref = true;
2843 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Ping_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2844 LDKPing this_ptr_conv = *(LDKPing*)this_ptr;
2845 free((void*)this_ptr);
2846 this_ptr_conv._underlying_ref = false;
2847 return Ping_free(this_ptr_conv);
2850 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_Ping_1get_1ponglen(JNIEnv * _env, jclass _b, jlong this_ptr) {
2851 LDKPing* this_ptr_conv = (LDKPing*)this_ptr;
2852 return Ping_get_ponglen(this_ptr_conv);
2855 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Ping_1set_1ponglen(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
2856 LDKPing* this_ptr_conv = (LDKPing*)this_ptr;
2857 return Ping_set_ponglen(this_ptr_conv, val);
2860 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_Ping_1get_1byteslen(JNIEnv * _env, jclass _b, jlong this_ptr) {
2861 LDKPing* this_ptr_conv = (LDKPing*)this_ptr;
2862 return Ping_get_byteslen(this_ptr_conv);
2865 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Ping_1set_1byteslen(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
2866 LDKPing* this_ptr_conv = (LDKPing*)this_ptr;
2867 return Ping_set_byteslen(this_ptr_conv, val);
2870 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Ping_1new(JNIEnv * _env, jclass _b, jshort ponglen_arg, jshort byteslen_arg) {
2871 LDKPing* ret = malloc(sizeof(LDKPing));
2872 *ret = Ping_new(ponglen_arg, byteslen_arg);
2873 assert(!ret->_underlying_ref);
2874 ret->_underlying_ref = true;
2878 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Pong_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2879 LDKPong this_ptr_conv = *(LDKPong*)this_ptr;
2880 free((void*)this_ptr);
2881 this_ptr_conv._underlying_ref = false;
2882 return Pong_free(this_ptr_conv);
2885 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_Pong_1get_1byteslen(JNIEnv * _env, jclass _b, jlong this_ptr) {
2886 LDKPong* this_ptr_conv = (LDKPong*)this_ptr;
2887 return Pong_get_byteslen(this_ptr_conv);
2890 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Pong_1set_1byteslen(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
2891 LDKPong* this_ptr_conv = (LDKPong*)this_ptr;
2892 return Pong_set_byteslen(this_ptr_conv, val);
2895 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Pong_1new(JNIEnv * _env, jclass _b, jshort byteslen_arg) {
2896 LDKPong* ret = malloc(sizeof(LDKPong));
2897 *ret = Pong_new(byteslen_arg);
2898 assert(!ret->_underlying_ref);
2899 ret->_underlying_ref = true;
2903 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2904 LDKOpenChannel this_ptr_conv = *(LDKOpenChannel*)this_ptr;
2905 free((void*)this_ptr);
2906 this_ptr_conv._underlying_ref = false;
2907 return OpenChannel_free(this_ptr_conv);
2910 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr) {
2911 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2912 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
2913 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *OpenChannel_get_chain_hash(this_ptr_conv));
2917 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2918 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2919 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
2921 return OpenChannel_set_chain_hash(this_ptr_conv, val_conv);
2924 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1temporary_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
2925 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2926 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
2927 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *OpenChannel_get_temporary_channel_id(this_ptr_conv));
2931 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1temporary_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2932 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2933 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
2935 return OpenChannel_set_temporary_channel_id(this_ptr_conv, val_conv);
2938 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1funding_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
2939 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2940 return OpenChannel_get_funding_satoshis(this_ptr_conv);
2943 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1funding_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2944 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2945 return OpenChannel_set_funding_satoshis(this_ptr_conv, val);
2948 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1push_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
2949 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2950 return OpenChannel_get_push_msat(this_ptr_conv);
2953 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1push_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2954 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2955 return OpenChannel_set_push_msat(this_ptr_conv, val);
2958 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1dust_1limit_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
2959 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2960 return OpenChannel_get_dust_limit_satoshis(this_ptr_conv);
2963 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1dust_1limit_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2964 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2965 return OpenChannel_set_dust_limit_satoshis(this_ptr_conv, val);
2968 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
2969 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2970 return OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr_conv);
2973 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1max_1htlc_1value_1in_1flight_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2974 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2975 return OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr_conv, val);
2978 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1reserve_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
2979 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2980 return OpenChannel_get_channel_reserve_satoshis(this_ptr_conv);
2983 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1reserve_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2984 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2985 return OpenChannel_set_channel_reserve_satoshis(this_ptr_conv, val);
2988 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
2989 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2990 return OpenChannel_get_htlc_minimum_msat(this_ptr_conv);
2993 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2994 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2995 return OpenChannel_set_htlc_minimum_msat(this_ptr_conv, val);
2998 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1feerate_1per_1kw(JNIEnv * _env, jclass _b, jlong this_ptr) {
2999 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3000 return OpenChannel_get_feerate_per_kw(this_ptr_conv);
3003 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1feerate_1per_1kw(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
3004 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3005 return OpenChannel_set_feerate_per_kw(this_ptr_conv, val);
3008 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_ptr) {
3009 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3010 return OpenChannel_get_to_self_delay(this_ptr_conv);
3013 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
3014 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3015 return OpenChannel_set_to_self_delay(this_ptr_conv, val);
3018 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1max_1accepted_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr) {
3019 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3020 return OpenChannel_get_max_accepted_htlcs(this_ptr_conv);
3023 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1max_1accepted_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
3024 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3025 return OpenChannel_set_max_accepted_htlcs(this_ptr_conv, val);
3028 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1funding_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr) {
3029 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3030 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3031 *ret = OpenChannel_get_funding_pubkey(this_ptr_conv);
3035 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1funding_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3036 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3037 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3039 return OpenChannel_set_funding_pubkey(this_ptr_conv, val_conv);
3042 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1revocation_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr) {
3043 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3044 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3045 *ret = OpenChannel_get_revocation_basepoint(this_ptr_conv);
3049 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1revocation_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3050 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3051 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3053 return OpenChannel_set_revocation_basepoint(this_ptr_conv, val_conv);
3056 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1payment_1point(JNIEnv * _env, jclass _b, jlong this_ptr) {
3057 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3058 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3059 *ret = OpenChannel_get_payment_point(this_ptr_conv);
3063 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1payment_1point(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3064 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3065 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3067 return OpenChannel_set_payment_point(this_ptr_conv, val_conv);
3070 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1delayed_1payment_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr) {
3071 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3072 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3073 *ret = OpenChannel_get_delayed_payment_basepoint(this_ptr_conv);
3077 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1delayed_1payment_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3078 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3079 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3081 return OpenChannel_set_delayed_payment_basepoint(this_ptr_conv, val_conv);
3084 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1htlc_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr) {
3085 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3086 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3087 *ret = OpenChannel_get_htlc_basepoint(this_ptr_conv);
3091 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1htlc_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3092 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3093 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3095 return OpenChannel_set_htlc_basepoint(this_ptr_conv, val_conv);
3098 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1first_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr) {
3099 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3100 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3101 *ret = OpenChannel_get_first_per_commitment_point(this_ptr_conv);
3105 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1first_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3106 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3107 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3109 return OpenChannel_set_first_per_commitment_point(this_ptr_conv, val_conv);
3112 JNIEXPORT jbyte JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1flags(JNIEnv * _env, jclass _b, jlong this_ptr) {
3113 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3114 return OpenChannel_get_channel_flags(this_ptr_conv);
3117 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1flags(JNIEnv * _env, jclass _b, jlong this_ptr, jbyte val) {
3118 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3119 return OpenChannel_set_channel_flags(this_ptr_conv, val);
3122 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3123 LDKAcceptChannel this_ptr_conv = *(LDKAcceptChannel*)this_ptr;
3124 free((void*)this_ptr);
3125 this_ptr_conv._underlying_ref = false;
3126 return AcceptChannel_free(this_ptr_conv);
3129 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1temporary_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3130 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3131 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3132 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *AcceptChannel_get_temporary_channel_id(this_ptr_conv));
3136 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1temporary_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3137 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3138 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3140 return AcceptChannel_set_temporary_channel_id(this_ptr_conv, val_conv);
3143 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1dust_1limit_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
3144 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3145 return AcceptChannel_get_dust_limit_satoshis(this_ptr_conv);
3148 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1dust_1limit_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3149 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3150 return AcceptChannel_set_dust_limit_satoshis(this_ptr_conv, val);
3153 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
3154 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3155 return AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr_conv);
3158 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1max_1htlc_1value_1in_1flight_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3159 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3160 return AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr_conv, val);
3163 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1channel_1reserve_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
3164 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3165 return AcceptChannel_get_channel_reserve_satoshis(this_ptr_conv);
3168 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1channel_1reserve_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3169 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3170 return AcceptChannel_set_channel_reserve_satoshis(this_ptr_conv, val);
3173 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
3174 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3175 return AcceptChannel_get_htlc_minimum_msat(this_ptr_conv);
3178 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3179 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3180 return AcceptChannel_set_htlc_minimum_msat(this_ptr_conv, val);
3183 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1minimum_1depth(JNIEnv * _env, jclass _b, jlong this_ptr) {
3184 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3185 return AcceptChannel_get_minimum_depth(this_ptr_conv);
3188 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1minimum_1depth(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
3189 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3190 return AcceptChannel_set_minimum_depth(this_ptr_conv, val);
3193 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_ptr) {
3194 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3195 return AcceptChannel_get_to_self_delay(this_ptr_conv);
3198 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
3199 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3200 return AcceptChannel_set_to_self_delay(this_ptr_conv, val);
3203 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1max_1accepted_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr) {
3204 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3205 return AcceptChannel_get_max_accepted_htlcs(this_ptr_conv);
3208 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1max_1accepted_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
3209 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3210 return AcceptChannel_set_max_accepted_htlcs(this_ptr_conv, val);
3213 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1funding_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr) {
3214 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3215 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3216 *ret = AcceptChannel_get_funding_pubkey(this_ptr_conv);
3220 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1funding_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3221 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3222 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3224 return AcceptChannel_set_funding_pubkey(this_ptr_conv, val_conv);
3227 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1revocation_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr) {
3228 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3229 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3230 *ret = AcceptChannel_get_revocation_basepoint(this_ptr_conv);
3234 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1revocation_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3235 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3236 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3238 return AcceptChannel_set_revocation_basepoint(this_ptr_conv, val_conv);
3241 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1payment_1point(JNIEnv * _env, jclass _b, jlong this_ptr) {
3242 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3243 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3244 *ret = AcceptChannel_get_payment_point(this_ptr_conv);
3248 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1payment_1point(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3249 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3250 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3252 return AcceptChannel_set_payment_point(this_ptr_conv, val_conv);
3255 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1delayed_1payment_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr) {
3256 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3257 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3258 *ret = AcceptChannel_get_delayed_payment_basepoint(this_ptr_conv);
3262 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1delayed_1payment_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3263 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3264 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3266 return AcceptChannel_set_delayed_payment_basepoint(this_ptr_conv, val_conv);
3269 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1htlc_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr) {
3270 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3271 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3272 *ret = AcceptChannel_get_htlc_basepoint(this_ptr_conv);
3276 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1htlc_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3277 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3278 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3280 return AcceptChannel_set_htlc_basepoint(this_ptr_conv, val_conv);
3283 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1first_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr) {
3284 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3285 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3286 *ret = AcceptChannel_get_first_per_commitment_point(this_ptr_conv);
3290 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1first_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3291 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3292 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3294 return AcceptChannel_set_first_per_commitment_point(this_ptr_conv, val_conv);
3297 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3298 LDKFundingCreated this_ptr_conv = *(LDKFundingCreated*)this_ptr;
3299 free((void*)this_ptr);
3300 this_ptr_conv._underlying_ref = false;
3301 return FundingCreated_free(this_ptr_conv);
3304 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1temporary_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3305 LDKFundingCreated* this_ptr_conv = (LDKFundingCreated*)this_ptr;
3306 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3307 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *FundingCreated_get_temporary_channel_id(this_ptr_conv));
3311 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1temporary_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3312 LDKFundingCreated* this_ptr_conv = (LDKFundingCreated*)this_ptr;
3313 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3315 return FundingCreated_set_temporary_channel_id(this_ptr_conv, val_conv);
3318 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1funding_1txid(JNIEnv * _env, jclass _b, jlong this_ptr) {
3319 LDKFundingCreated* this_ptr_conv = (LDKFundingCreated*)this_ptr;
3320 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3321 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *FundingCreated_get_funding_txid(this_ptr_conv));
3325 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1funding_1txid(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3326 LDKFundingCreated* this_ptr_conv = (LDKFundingCreated*)this_ptr;
3327 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3329 return FundingCreated_set_funding_txid(this_ptr_conv, val_conv);
3332 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1funding_1output_1index(JNIEnv * _env, jclass _b, jlong this_ptr) {
3333 LDKFundingCreated* this_ptr_conv = (LDKFundingCreated*)this_ptr;
3334 return FundingCreated_get_funding_output_index(this_ptr_conv);
3337 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1funding_1output_1index(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
3338 LDKFundingCreated* this_ptr_conv = (LDKFundingCreated*)this_ptr;
3339 return FundingCreated_set_funding_output_index(this_ptr_conv, val);
3342 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1signature(JNIEnv * _env, jclass _b, jlong this_ptr) {
3343 LDKFundingCreated* this_ptr_conv = (LDKFundingCreated*)this_ptr;
3344 LDKSignature* ret = malloc(sizeof(LDKSignature));
3345 *ret = FundingCreated_get_signature(this_ptr_conv);
3349 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1signature(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3350 LDKFundingCreated* this_ptr_conv = (LDKFundingCreated*)this_ptr;
3351 LDKSignature val_conv = *(LDKSignature*)val;
3353 return FundingCreated_set_signature(this_ptr_conv, val_conv);
3356 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingCreated_1new(JNIEnv * _env, jclass _b, jlong temporary_channel_id_arg, jlong funding_txid_arg, jshort funding_output_index_arg, jlong signature_arg) {
3357 LDKThirtyTwoBytes temporary_channel_id_arg_conv = *(LDKThirtyTwoBytes*)temporary_channel_id_arg;
3358 free((void*)temporary_channel_id_arg);
3359 LDKThirtyTwoBytes funding_txid_arg_conv = *(LDKThirtyTwoBytes*)funding_txid_arg;
3360 free((void*)funding_txid_arg);
3361 LDKSignature signature_arg_conv = *(LDKSignature*)signature_arg;
3362 free((void*)signature_arg);
3363 LDKFundingCreated* ret = malloc(sizeof(LDKFundingCreated));
3364 *ret = FundingCreated_new(temporary_channel_id_arg_conv, funding_txid_arg_conv, funding_output_index_arg, signature_arg_conv);
3365 assert(!ret->_underlying_ref);
3366 ret->_underlying_ref = true;
3370 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3371 LDKFundingSigned this_ptr_conv = *(LDKFundingSigned*)this_ptr;
3372 free((void*)this_ptr);
3373 this_ptr_conv._underlying_ref = false;
3374 return FundingSigned_free(this_ptr_conv);
3377 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_FundingSigned_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3378 LDKFundingSigned* this_ptr_conv = (LDKFundingSigned*)this_ptr;
3379 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3380 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *FundingSigned_get_channel_id(this_ptr_conv));
3384 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3385 LDKFundingSigned* this_ptr_conv = (LDKFundingSigned*)this_ptr;
3386 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3388 return FundingSigned_set_channel_id(this_ptr_conv, val_conv);
3391 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingSigned_1get_1signature(JNIEnv * _env, jclass _b, jlong this_ptr) {
3392 LDKFundingSigned* this_ptr_conv = (LDKFundingSigned*)this_ptr;
3393 LDKSignature* ret = malloc(sizeof(LDKSignature));
3394 *ret = FundingSigned_get_signature(this_ptr_conv);
3398 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1set_1signature(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3399 LDKFundingSigned* this_ptr_conv = (LDKFundingSigned*)this_ptr;
3400 LDKSignature val_conv = *(LDKSignature*)val;
3402 return FundingSigned_set_signature(this_ptr_conv, val_conv);
3405 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingSigned_1new(JNIEnv * _env, jclass _b, jlong channel_id_arg, jlong signature_arg) {
3406 LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
3407 free((void*)channel_id_arg);
3408 LDKSignature signature_arg_conv = *(LDKSignature*)signature_arg;
3409 free((void*)signature_arg);
3410 LDKFundingSigned* ret = malloc(sizeof(LDKFundingSigned));
3411 *ret = FundingSigned_new(channel_id_arg_conv, signature_arg_conv);
3412 assert(!ret->_underlying_ref);
3413 ret->_underlying_ref = true;
3417 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingLocked_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3418 LDKFundingLocked this_ptr_conv = *(LDKFundingLocked*)this_ptr;
3419 free((void*)this_ptr);
3420 this_ptr_conv._underlying_ref = false;
3421 return FundingLocked_free(this_ptr_conv);
3424 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_FundingLocked_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3425 LDKFundingLocked* this_ptr_conv = (LDKFundingLocked*)this_ptr;
3426 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3427 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *FundingLocked_get_channel_id(this_ptr_conv));
3431 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingLocked_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3432 LDKFundingLocked* this_ptr_conv = (LDKFundingLocked*)this_ptr;
3433 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3435 return FundingLocked_set_channel_id(this_ptr_conv, val_conv);
3438 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingLocked_1get_1next_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr) {
3439 LDKFundingLocked* this_ptr_conv = (LDKFundingLocked*)this_ptr;
3440 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3441 *ret = FundingLocked_get_next_per_commitment_point(this_ptr_conv);
3445 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingLocked_1set_1next_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3446 LDKFundingLocked* this_ptr_conv = (LDKFundingLocked*)this_ptr;
3447 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3449 return FundingLocked_set_next_per_commitment_point(this_ptr_conv, val_conv);
3452 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingLocked_1new(JNIEnv * _env, jclass _b, jlong channel_id_arg, jlong next_per_commitment_point_arg) {
3453 LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
3454 free((void*)channel_id_arg);
3455 LDKPublicKey next_per_commitment_point_arg_conv = *(LDKPublicKey*)next_per_commitment_point_arg;
3456 free((void*)next_per_commitment_point_arg);
3457 LDKFundingLocked* ret = malloc(sizeof(LDKFundingLocked));
3458 *ret = FundingLocked_new(channel_id_arg_conv, next_per_commitment_point_arg_conv);
3459 assert(!ret->_underlying_ref);
3460 ret->_underlying_ref = true;
3464 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3465 LDKShutdown this_ptr_conv = *(LDKShutdown*)this_ptr;
3466 free((void*)this_ptr);
3467 this_ptr_conv._underlying_ref = false;
3468 return Shutdown_free(this_ptr_conv);
3471 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Shutdown_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3472 LDKShutdown* this_ptr_conv = (LDKShutdown*)this_ptr;
3473 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3474 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *Shutdown_get_channel_id(this_ptr_conv));
3478 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3479 LDKShutdown* this_ptr_conv = (LDKShutdown*)this_ptr;
3480 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3482 return Shutdown_set_channel_id(this_ptr_conv, val_conv);
3485 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Shutdown_1get_1scriptpubkey(JNIEnv * _env, jclass _b, jlong this_ptr) {
3486 LDKShutdown* this_ptr_conv = (LDKShutdown*)this_ptr;
3487 LDKu8slice* ret = malloc(sizeof(LDKu8slice));
3488 *ret = Shutdown_get_scriptpubkey(this_ptr_conv);
3492 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1set_1scriptpubkey(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3493 LDKShutdown* this_ptr_conv = (LDKShutdown*)this_ptr;
3494 LDKCVec_u8Z val_conv = *(LDKCVec_u8Z*)val;
3496 return Shutdown_set_scriptpubkey(this_ptr_conv, val_conv);
3499 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Shutdown_1new(JNIEnv * _env, jclass _b, jlong channel_id_arg, jlong scriptpubkey_arg) {
3500 LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
3501 free((void*)channel_id_arg);
3502 LDKCVec_u8Z scriptpubkey_arg_conv = *(LDKCVec_u8Z*)scriptpubkey_arg;
3503 free((void*)scriptpubkey_arg);
3504 LDKShutdown* ret = malloc(sizeof(LDKShutdown));
3505 *ret = Shutdown_new(channel_id_arg_conv, scriptpubkey_arg_conv);
3506 assert(!ret->_underlying_ref);
3507 ret->_underlying_ref = true;
3511 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3512 LDKClosingSigned this_ptr_conv = *(LDKClosingSigned*)this_ptr;
3513 free((void*)this_ptr);
3514 this_ptr_conv._underlying_ref = false;
3515 return ClosingSigned_free(this_ptr_conv);
3518 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3519 LDKClosingSigned* this_ptr_conv = (LDKClosingSigned*)this_ptr;
3520 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3521 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *ClosingSigned_get_channel_id(this_ptr_conv));
3525 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3526 LDKClosingSigned* this_ptr_conv = (LDKClosingSigned*)this_ptr;
3527 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3529 return ClosingSigned_set_channel_id(this_ptr_conv, val_conv);
3532 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1get_1fee_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
3533 LDKClosingSigned* this_ptr_conv = (LDKClosingSigned*)this_ptr;
3534 return ClosingSigned_get_fee_satoshis(this_ptr_conv);
3537 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1set_1fee_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3538 LDKClosingSigned* this_ptr_conv = (LDKClosingSigned*)this_ptr;
3539 return ClosingSigned_set_fee_satoshis(this_ptr_conv, val);
3542 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1get_1signature(JNIEnv * _env, jclass _b, jlong this_ptr) {
3543 LDKClosingSigned* this_ptr_conv = (LDKClosingSigned*)this_ptr;
3544 LDKSignature* ret = malloc(sizeof(LDKSignature));
3545 *ret = ClosingSigned_get_signature(this_ptr_conv);
3549 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1set_1signature(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3550 LDKClosingSigned* this_ptr_conv = (LDKClosingSigned*)this_ptr;
3551 LDKSignature val_conv = *(LDKSignature*)val;
3553 return ClosingSigned_set_signature(this_ptr_conv, val_conv);
3556 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1new(JNIEnv * _env, jclass _b, jlong channel_id_arg, jlong fee_satoshis_arg, jlong signature_arg) {
3557 LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
3558 free((void*)channel_id_arg);
3559 LDKSignature signature_arg_conv = *(LDKSignature*)signature_arg;
3560 free((void*)signature_arg);
3561 LDKClosingSigned* ret = malloc(sizeof(LDKClosingSigned));
3562 *ret = ClosingSigned_new(channel_id_arg_conv, fee_satoshis_arg, signature_arg_conv);
3563 assert(!ret->_underlying_ref);
3564 ret->_underlying_ref = true;
3568 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3569 LDKUpdateAddHTLC this_ptr_conv = *(LDKUpdateAddHTLC*)this_ptr;
3570 free((void*)this_ptr);
3571 this_ptr_conv._underlying_ref = false;
3572 return UpdateAddHTLC_free(this_ptr_conv);
3575 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3576 LDKUpdateAddHTLC* this_ptr_conv = (LDKUpdateAddHTLC*)this_ptr;
3577 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3578 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *UpdateAddHTLC_get_channel_id(this_ptr_conv));
3582 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3583 LDKUpdateAddHTLC* this_ptr_conv = (LDKUpdateAddHTLC*)this_ptr;
3584 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3586 return UpdateAddHTLC_set_channel_id(this_ptr_conv, val_conv);
3589 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1htlc_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3590 LDKUpdateAddHTLC* this_ptr_conv = (LDKUpdateAddHTLC*)this_ptr;
3591 return UpdateAddHTLC_get_htlc_id(this_ptr_conv);
3594 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1htlc_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3595 LDKUpdateAddHTLC* this_ptr_conv = (LDKUpdateAddHTLC*)this_ptr;
3596 return UpdateAddHTLC_set_htlc_id(this_ptr_conv, val);
3599 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1amount_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
3600 LDKUpdateAddHTLC* this_ptr_conv = (LDKUpdateAddHTLC*)this_ptr;
3601 return UpdateAddHTLC_get_amount_msat(this_ptr_conv);
3604 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1amount_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3605 LDKUpdateAddHTLC* this_ptr_conv = (LDKUpdateAddHTLC*)this_ptr;
3606 return UpdateAddHTLC_set_amount_msat(this_ptr_conv, val);
3609 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1payment_1hash(JNIEnv * _env, jclass _b, jlong this_ptr) {
3610 LDKUpdateAddHTLC* this_ptr_conv = (LDKUpdateAddHTLC*)this_ptr;
3611 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3612 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *UpdateAddHTLC_get_payment_hash(this_ptr_conv));
3616 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1payment_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3617 LDKUpdateAddHTLC* this_ptr_conv = (LDKUpdateAddHTLC*)this_ptr;
3618 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3620 return UpdateAddHTLC_set_payment_hash(this_ptr_conv, val_conv);
3623 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1cltv_1expiry(JNIEnv * _env, jclass _b, jlong this_ptr) {
3624 LDKUpdateAddHTLC* this_ptr_conv = (LDKUpdateAddHTLC*)this_ptr;
3625 return UpdateAddHTLC_get_cltv_expiry(this_ptr_conv);
3628 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1cltv_1expiry(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
3629 LDKUpdateAddHTLC* this_ptr_conv = (LDKUpdateAddHTLC*)this_ptr;
3630 return UpdateAddHTLC_set_cltv_expiry(this_ptr_conv, val);
3633 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3634 LDKUpdateFulfillHTLC this_ptr_conv = *(LDKUpdateFulfillHTLC*)this_ptr;
3635 free((void*)this_ptr);
3636 this_ptr_conv._underlying_ref = false;
3637 return UpdateFulfillHTLC_free(this_ptr_conv);
3640 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3641 LDKUpdateFulfillHTLC* this_ptr_conv = (LDKUpdateFulfillHTLC*)this_ptr;
3642 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3643 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *UpdateFulfillHTLC_get_channel_id(this_ptr_conv));
3647 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3648 LDKUpdateFulfillHTLC* this_ptr_conv = (LDKUpdateFulfillHTLC*)this_ptr;
3649 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3651 return UpdateFulfillHTLC_set_channel_id(this_ptr_conv, val_conv);
3654 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1get_1htlc_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3655 LDKUpdateFulfillHTLC* this_ptr_conv = (LDKUpdateFulfillHTLC*)this_ptr;
3656 return UpdateFulfillHTLC_get_htlc_id(this_ptr_conv);
3659 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1set_1htlc_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3660 LDKUpdateFulfillHTLC* this_ptr_conv = (LDKUpdateFulfillHTLC*)this_ptr;
3661 return UpdateFulfillHTLC_set_htlc_id(this_ptr_conv, val);
3664 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1get_1payment_1preimage(JNIEnv * _env, jclass _b, jlong this_ptr) {
3665 LDKUpdateFulfillHTLC* this_ptr_conv = (LDKUpdateFulfillHTLC*)this_ptr;
3666 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3667 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *UpdateFulfillHTLC_get_payment_preimage(this_ptr_conv));
3671 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1set_1payment_1preimage(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3672 LDKUpdateFulfillHTLC* this_ptr_conv = (LDKUpdateFulfillHTLC*)this_ptr;
3673 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3675 return UpdateFulfillHTLC_set_payment_preimage(this_ptr_conv, val_conv);
3678 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1new(JNIEnv * _env, jclass _b, jlong channel_id_arg, jlong htlc_id_arg, jlong payment_preimage_arg) {
3679 LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
3680 free((void*)channel_id_arg);
3681 LDKThirtyTwoBytes payment_preimage_arg_conv = *(LDKThirtyTwoBytes*)payment_preimage_arg;
3682 free((void*)payment_preimage_arg);
3683 LDKUpdateFulfillHTLC* ret = malloc(sizeof(LDKUpdateFulfillHTLC));
3684 *ret = UpdateFulfillHTLC_new(channel_id_arg_conv, htlc_id_arg, payment_preimage_arg_conv);
3685 assert(!ret->_underlying_ref);
3686 ret->_underlying_ref = true;
3690 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3691 LDKUpdateFailHTLC this_ptr_conv = *(LDKUpdateFailHTLC*)this_ptr;
3692 free((void*)this_ptr);
3693 this_ptr_conv._underlying_ref = false;
3694 return UpdateFailHTLC_free(this_ptr_conv);
3697 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3698 LDKUpdateFailHTLC* this_ptr_conv = (LDKUpdateFailHTLC*)this_ptr;
3699 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3700 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *UpdateFailHTLC_get_channel_id(this_ptr_conv));
3704 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3705 LDKUpdateFailHTLC* this_ptr_conv = (LDKUpdateFailHTLC*)this_ptr;
3706 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3708 return UpdateFailHTLC_set_channel_id(this_ptr_conv, val_conv);
3711 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1get_1htlc_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3712 LDKUpdateFailHTLC* this_ptr_conv = (LDKUpdateFailHTLC*)this_ptr;
3713 return UpdateFailHTLC_get_htlc_id(this_ptr_conv);
3716 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1set_1htlc_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3717 LDKUpdateFailHTLC* this_ptr_conv = (LDKUpdateFailHTLC*)this_ptr;
3718 return UpdateFailHTLC_set_htlc_id(this_ptr_conv, val);
3721 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3722 LDKUpdateFailMalformedHTLC this_ptr_conv = *(LDKUpdateFailMalformedHTLC*)this_ptr;
3723 free((void*)this_ptr);
3724 this_ptr_conv._underlying_ref = false;
3725 return UpdateFailMalformedHTLC_free(this_ptr_conv);
3728 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3729 LDKUpdateFailMalformedHTLC* this_ptr_conv = (LDKUpdateFailMalformedHTLC*)this_ptr;
3730 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3731 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *UpdateFailMalformedHTLC_get_channel_id(this_ptr_conv));
3735 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3736 LDKUpdateFailMalformedHTLC* this_ptr_conv = (LDKUpdateFailMalformedHTLC*)this_ptr;
3737 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3739 return UpdateFailMalformedHTLC_set_channel_id(this_ptr_conv, val_conv);
3742 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1get_1htlc_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3743 LDKUpdateFailMalformedHTLC* this_ptr_conv = (LDKUpdateFailMalformedHTLC*)this_ptr;
3744 return UpdateFailMalformedHTLC_get_htlc_id(this_ptr_conv);
3747 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1set_1htlc_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3748 LDKUpdateFailMalformedHTLC* this_ptr_conv = (LDKUpdateFailMalformedHTLC*)this_ptr;
3749 return UpdateFailMalformedHTLC_set_htlc_id(this_ptr_conv, val);
3752 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1get_1failure_1code(JNIEnv * _env, jclass _b, jlong this_ptr) {
3753 LDKUpdateFailMalformedHTLC* this_ptr_conv = (LDKUpdateFailMalformedHTLC*)this_ptr;
3754 return UpdateFailMalformedHTLC_get_failure_code(this_ptr_conv);
3757 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1set_1failure_1code(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
3758 LDKUpdateFailMalformedHTLC* this_ptr_conv = (LDKUpdateFailMalformedHTLC*)this_ptr;
3759 return UpdateFailMalformedHTLC_set_failure_code(this_ptr_conv, val);
3762 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3763 LDKCommitmentSigned this_ptr_conv = *(LDKCommitmentSigned*)this_ptr;
3764 free((void*)this_ptr);
3765 this_ptr_conv._underlying_ref = false;
3766 return CommitmentSigned_free(this_ptr_conv);
3769 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3770 LDKCommitmentSigned* this_ptr_conv = (LDKCommitmentSigned*)this_ptr;
3771 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3772 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *CommitmentSigned_get_channel_id(this_ptr_conv));
3776 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3777 LDKCommitmentSigned* this_ptr_conv = (LDKCommitmentSigned*)this_ptr;
3778 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3780 return CommitmentSigned_set_channel_id(this_ptr_conv, val_conv);
3783 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1get_1signature(JNIEnv * _env, jclass _b, jlong this_ptr) {
3784 LDKCommitmentSigned* this_ptr_conv = (LDKCommitmentSigned*)this_ptr;
3785 LDKSignature* ret = malloc(sizeof(LDKSignature));
3786 *ret = CommitmentSigned_get_signature(this_ptr_conv);
3790 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1set_1signature(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3791 LDKCommitmentSigned* this_ptr_conv = (LDKCommitmentSigned*)this_ptr;
3792 LDKSignature val_conv = *(LDKSignature*)val;
3794 return CommitmentSigned_set_signature(this_ptr_conv, val_conv);
3797 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1set_1htlc_1signatures(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3798 LDKCommitmentSigned* this_ptr_conv = (LDKCommitmentSigned*)this_ptr;
3799 LDKCVec_SignatureZ val_conv = *(LDKCVec_SignatureZ*)val;
3801 return CommitmentSigned_set_htlc_signatures(this_ptr_conv, val_conv);
3804 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1new(JNIEnv * _env, jclass _b, jlong channel_id_arg, jlong signature_arg, jlong htlc_signatures_arg) {
3805 LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
3806 free((void*)channel_id_arg);
3807 LDKSignature signature_arg_conv = *(LDKSignature*)signature_arg;
3808 free((void*)signature_arg);
3809 LDKCVec_SignatureZ htlc_signatures_arg_conv = *(LDKCVec_SignatureZ*)htlc_signatures_arg;
3810 free((void*)htlc_signatures_arg);
3811 LDKCommitmentSigned* ret = malloc(sizeof(LDKCommitmentSigned));
3812 *ret = CommitmentSigned_new(channel_id_arg_conv, signature_arg_conv, htlc_signatures_arg_conv);
3813 assert(!ret->_underlying_ref);
3814 ret->_underlying_ref = true;
3818 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3819 LDKRevokeAndACK this_ptr_conv = *(LDKRevokeAndACK*)this_ptr;
3820 free((void*)this_ptr);
3821 this_ptr_conv._underlying_ref = false;
3822 return RevokeAndACK_free(this_ptr_conv);
3825 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3826 LDKRevokeAndACK* this_ptr_conv = (LDKRevokeAndACK*)this_ptr;
3827 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3828 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *RevokeAndACK_get_channel_id(this_ptr_conv));
3832 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3833 LDKRevokeAndACK* this_ptr_conv = (LDKRevokeAndACK*)this_ptr;
3834 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3836 return RevokeAndACK_set_channel_id(this_ptr_conv, val_conv);
3839 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1get_1per_1commitment_1secret(JNIEnv * _env, jclass _b, jlong this_ptr) {
3840 LDKRevokeAndACK* this_ptr_conv = (LDKRevokeAndACK*)this_ptr;
3841 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3842 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *RevokeAndACK_get_per_commitment_secret(this_ptr_conv));
3846 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1set_1per_1commitment_1secret(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3847 LDKRevokeAndACK* this_ptr_conv = (LDKRevokeAndACK*)this_ptr;
3848 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3850 return RevokeAndACK_set_per_commitment_secret(this_ptr_conv, val_conv);
3853 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1get_1next_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr) {
3854 LDKRevokeAndACK* this_ptr_conv = (LDKRevokeAndACK*)this_ptr;
3855 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3856 *ret = RevokeAndACK_get_next_per_commitment_point(this_ptr_conv);
3860 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1set_1next_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3861 LDKRevokeAndACK* this_ptr_conv = (LDKRevokeAndACK*)this_ptr;
3862 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3864 return RevokeAndACK_set_next_per_commitment_point(this_ptr_conv, val_conv);
3867 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1new(JNIEnv * _env, jclass _b, jlong channel_id_arg, jlong per_commitment_secret_arg, jlong next_per_commitment_point_arg) {
3868 LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
3869 free((void*)channel_id_arg);
3870 LDKThirtyTwoBytes per_commitment_secret_arg_conv = *(LDKThirtyTwoBytes*)per_commitment_secret_arg;
3871 free((void*)per_commitment_secret_arg);
3872 LDKPublicKey next_per_commitment_point_arg_conv = *(LDKPublicKey*)next_per_commitment_point_arg;
3873 free((void*)next_per_commitment_point_arg);
3874 LDKRevokeAndACK* ret = malloc(sizeof(LDKRevokeAndACK));
3875 *ret = RevokeAndACK_new(channel_id_arg_conv, per_commitment_secret_arg_conv, next_per_commitment_point_arg_conv);
3876 assert(!ret->_underlying_ref);
3877 ret->_underlying_ref = true;
3881 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3882 LDKUpdateFee this_ptr_conv = *(LDKUpdateFee*)this_ptr;
3883 free((void*)this_ptr);
3884 this_ptr_conv._underlying_ref = false;
3885 return UpdateFee_free(this_ptr_conv);
3888 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UpdateFee_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3889 LDKUpdateFee* this_ptr_conv = (LDKUpdateFee*)this_ptr;
3890 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3891 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *UpdateFee_get_channel_id(this_ptr_conv));
3895 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3896 LDKUpdateFee* this_ptr_conv = (LDKUpdateFee*)this_ptr;
3897 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3899 return UpdateFee_set_channel_id(this_ptr_conv, val_conv);
3902 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_UpdateFee_1get_1feerate_1per_1kw(JNIEnv * _env, jclass _b, jlong this_ptr) {
3903 LDKUpdateFee* this_ptr_conv = (LDKUpdateFee*)this_ptr;
3904 return UpdateFee_get_feerate_per_kw(this_ptr_conv);
3907 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1set_1feerate_1per_1kw(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
3908 LDKUpdateFee* this_ptr_conv = (LDKUpdateFee*)this_ptr;
3909 return UpdateFee_set_feerate_per_kw(this_ptr_conv, val);
3912 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFee_1new(JNIEnv * _env, jclass _b, jlong channel_id_arg, jint feerate_per_kw_arg) {
3913 LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
3914 free((void*)channel_id_arg);
3915 LDKUpdateFee* ret = malloc(sizeof(LDKUpdateFee));
3916 *ret = UpdateFee_new(channel_id_arg_conv, feerate_per_kw_arg);
3917 assert(!ret->_underlying_ref);
3918 ret->_underlying_ref = true;
3922 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3923 LDKDataLossProtect this_ptr_conv = *(LDKDataLossProtect*)this_ptr;
3924 free((void*)this_ptr);
3925 this_ptr_conv._underlying_ref = false;
3926 return DataLossProtect_free(this_ptr_conv);
3929 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1get_1your_1last_1per_1commitment_1secret(JNIEnv * _env, jclass _b, jlong this_ptr) {
3930 LDKDataLossProtect* this_ptr_conv = (LDKDataLossProtect*)this_ptr;
3931 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3932 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *DataLossProtect_get_your_last_per_commitment_secret(this_ptr_conv));
3936 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1set_1your_1last_1per_1commitment_1secret(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3937 LDKDataLossProtect* this_ptr_conv = (LDKDataLossProtect*)this_ptr;
3938 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3940 return DataLossProtect_set_your_last_per_commitment_secret(this_ptr_conv, val_conv);
3943 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1get_1my_1current_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr) {
3944 LDKDataLossProtect* this_ptr_conv = (LDKDataLossProtect*)this_ptr;
3945 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3946 *ret = DataLossProtect_get_my_current_per_commitment_point(this_ptr_conv);
3950 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1set_1my_1current_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3951 LDKDataLossProtect* this_ptr_conv = (LDKDataLossProtect*)this_ptr;
3952 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3954 return DataLossProtect_set_my_current_per_commitment_point(this_ptr_conv, val_conv);
3957 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1new(JNIEnv * _env, jclass _b, jlong your_last_per_commitment_secret_arg, jlong my_current_per_commitment_point_arg) {
3958 LDKThirtyTwoBytes your_last_per_commitment_secret_arg_conv = *(LDKThirtyTwoBytes*)your_last_per_commitment_secret_arg;
3959 free((void*)your_last_per_commitment_secret_arg);
3960 LDKPublicKey my_current_per_commitment_point_arg_conv = *(LDKPublicKey*)my_current_per_commitment_point_arg;
3961 free((void*)my_current_per_commitment_point_arg);
3962 LDKDataLossProtect* ret = malloc(sizeof(LDKDataLossProtect));
3963 *ret = DataLossProtect_new(your_last_per_commitment_secret_arg_conv, my_current_per_commitment_point_arg_conv);
3964 assert(!ret->_underlying_ref);
3965 ret->_underlying_ref = true;
3969 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3970 LDKChannelReestablish this_ptr_conv = *(LDKChannelReestablish*)this_ptr;
3971 free((void*)this_ptr);
3972 this_ptr_conv._underlying_ref = false;
3973 return ChannelReestablish_free(this_ptr_conv);
3976 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3977 LDKChannelReestablish* this_ptr_conv = (LDKChannelReestablish*)this_ptr;
3978 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3979 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *ChannelReestablish_get_channel_id(this_ptr_conv));
3983 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3984 LDKChannelReestablish* this_ptr_conv = (LDKChannelReestablish*)this_ptr;
3985 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3987 return ChannelReestablish_set_channel_id(this_ptr_conv, val_conv);
3990 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1get_1next_1local_1commitment_1number(JNIEnv * _env, jclass _b, jlong this_ptr) {
3991 LDKChannelReestablish* this_ptr_conv = (LDKChannelReestablish*)this_ptr;
3992 return ChannelReestablish_get_next_local_commitment_number(this_ptr_conv);
3995 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1set_1next_1local_1commitment_1number(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3996 LDKChannelReestablish* this_ptr_conv = (LDKChannelReestablish*)this_ptr;
3997 return ChannelReestablish_set_next_local_commitment_number(this_ptr_conv, val);
4000 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1get_1next_1remote_1commitment_1number(JNIEnv * _env, jclass _b, jlong this_ptr) {
4001 LDKChannelReestablish* this_ptr_conv = (LDKChannelReestablish*)this_ptr;
4002 return ChannelReestablish_get_next_remote_commitment_number(this_ptr_conv);
4005 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1set_1next_1remote_1commitment_1number(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4006 LDKChannelReestablish* this_ptr_conv = (LDKChannelReestablish*)this_ptr;
4007 return ChannelReestablish_set_next_remote_commitment_number(this_ptr_conv, val);
4010 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4011 LDKAnnouncementSignatures this_ptr_conv = *(LDKAnnouncementSignatures*)this_ptr;
4012 free((void*)this_ptr);
4013 this_ptr_conv._underlying_ref = false;
4014 return AnnouncementSignatures_free(this_ptr_conv);
4017 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
4018 LDKAnnouncementSignatures* this_ptr_conv = (LDKAnnouncementSignatures*)this_ptr;
4019 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
4020 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *AnnouncementSignatures_get_channel_id(this_ptr_conv));
4024 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4025 LDKAnnouncementSignatures* this_ptr_conv = (LDKAnnouncementSignatures*)this_ptr;
4026 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
4028 return AnnouncementSignatures_set_channel_id(this_ptr_conv, val_conv);
4031 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1get_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
4032 LDKAnnouncementSignatures* this_ptr_conv = (LDKAnnouncementSignatures*)this_ptr;
4033 return AnnouncementSignatures_get_short_channel_id(this_ptr_conv);
4036 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4037 LDKAnnouncementSignatures* this_ptr_conv = (LDKAnnouncementSignatures*)this_ptr;
4038 return AnnouncementSignatures_set_short_channel_id(this_ptr_conv, val);
4041 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1get_1node_1signature(JNIEnv * _env, jclass _b, jlong this_ptr) {
4042 LDKAnnouncementSignatures* this_ptr_conv = (LDKAnnouncementSignatures*)this_ptr;
4043 LDKSignature* ret = malloc(sizeof(LDKSignature));
4044 *ret = AnnouncementSignatures_get_node_signature(this_ptr_conv);
4048 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1node_1signature(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4049 LDKAnnouncementSignatures* this_ptr_conv = (LDKAnnouncementSignatures*)this_ptr;
4050 LDKSignature val_conv = *(LDKSignature*)val;
4052 return AnnouncementSignatures_set_node_signature(this_ptr_conv, val_conv);
4055 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1get_1bitcoin_1signature(JNIEnv * _env, jclass _b, jlong this_ptr) {
4056 LDKAnnouncementSignatures* this_ptr_conv = (LDKAnnouncementSignatures*)this_ptr;
4057 LDKSignature* ret = malloc(sizeof(LDKSignature));
4058 *ret = AnnouncementSignatures_get_bitcoin_signature(this_ptr_conv);
4062 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1bitcoin_1signature(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4063 LDKAnnouncementSignatures* this_ptr_conv = (LDKAnnouncementSignatures*)this_ptr;
4064 LDKSignature val_conv = *(LDKSignature*)val;
4066 return AnnouncementSignatures_set_bitcoin_signature(this_ptr_conv, val_conv);
4069 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1new(JNIEnv * _env, jclass _b, jlong channel_id_arg, jlong short_channel_id_arg, jlong node_signature_arg, jlong bitcoin_signature_arg) {
4070 LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
4071 free((void*)channel_id_arg);
4072 LDKSignature node_signature_arg_conv = *(LDKSignature*)node_signature_arg;
4073 free((void*)node_signature_arg);
4074 LDKSignature bitcoin_signature_arg_conv = *(LDKSignature*)bitcoin_signature_arg;
4075 free((void*)bitcoin_signature_arg);
4076 LDKAnnouncementSignatures* ret = malloc(sizeof(LDKAnnouncementSignatures));
4077 *ret = AnnouncementSignatures_new(channel_id_arg_conv, short_channel_id_arg, node_signature_arg_conv, bitcoin_signature_arg_conv);
4078 assert(!ret->_underlying_ref);
4079 ret->_underlying_ref = true;
4083 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetAddress_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4084 LDKNetAddress this_ptr_conv = *(LDKNetAddress*)this_ptr;
4085 free((void*)this_ptr);
4086 return NetAddress_free(this_ptr_conv);
4089 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4090 LDKUnsignedNodeAnnouncement this_ptr_conv = *(LDKUnsignedNodeAnnouncement*)this_ptr;
4091 free((void*)this_ptr);
4092 this_ptr_conv._underlying_ref = false;
4093 return UnsignedNodeAnnouncement_free(this_ptr_conv);
4096 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1get_1timestamp(JNIEnv * _env, jclass _b, jlong this_ptr) {
4097 LDKUnsignedNodeAnnouncement* this_ptr_conv = (LDKUnsignedNodeAnnouncement*)this_ptr;
4098 return UnsignedNodeAnnouncement_get_timestamp(this_ptr_conv);
4101 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1timestamp(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
4102 LDKUnsignedNodeAnnouncement* this_ptr_conv = (LDKUnsignedNodeAnnouncement*)this_ptr;
4103 return UnsignedNodeAnnouncement_set_timestamp(this_ptr_conv, val);
4106 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1get_1node_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
4107 LDKUnsignedNodeAnnouncement* this_ptr_conv = (LDKUnsignedNodeAnnouncement*)this_ptr;
4108 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
4109 *ret = UnsignedNodeAnnouncement_get_node_id(this_ptr_conv);
4113 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1node_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4114 LDKUnsignedNodeAnnouncement* this_ptr_conv = (LDKUnsignedNodeAnnouncement*)this_ptr;
4115 LDKPublicKey val_conv = *(LDKPublicKey*)val;
4117 return UnsignedNodeAnnouncement_set_node_id(this_ptr_conv, val_conv);
4120 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1get_1rgb(JNIEnv * _env, jclass _b, jlong this_ptr) {
4121 LDKUnsignedNodeAnnouncement* this_ptr_conv = (LDKUnsignedNodeAnnouncement*)this_ptr;
4122 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 3);
4123 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 3, *UnsignedNodeAnnouncement_get_rgb(this_ptr_conv));
4127 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1rgb(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4128 LDKUnsignedNodeAnnouncement* this_ptr_conv = (LDKUnsignedNodeAnnouncement*)this_ptr;
4129 LDKThreeBytes val_conv = *(LDKThreeBytes*)val;
4131 return UnsignedNodeAnnouncement_set_rgb(this_ptr_conv, val_conv);
4134 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1get_1alias(JNIEnv * _env, jclass _b, jlong this_ptr) {
4135 LDKUnsignedNodeAnnouncement* this_ptr_conv = (LDKUnsignedNodeAnnouncement*)this_ptr;
4136 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
4137 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *UnsignedNodeAnnouncement_get_alias(this_ptr_conv));
4141 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1alias(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4142 LDKUnsignedNodeAnnouncement* this_ptr_conv = (LDKUnsignedNodeAnnouncement*)this_ptr;
4143 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
4145 return UnsignedNodeAnnouncement_set_alias(this_ptr_conv, val_conv);
4148 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1addresses(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4149 LDKUnsignedNodeAnnouncement* this_ptr_conv = (LDKUnsignedNodeAnnouncement*)this_ptr;
4150 LDKCVec_NetAddressZ val_conv = *(LDKCVec_NetAddressZ*)val;
4152 return UnsignedNodeAnnouncement_set_addresses(this_ptr_conv, val_conv);
4155 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4156 LDKNodeAnnouncement this_ptr_conv = *(LDKNodeAnnouncement*)this_ptr;
4157 free((void*)this_ptr);
4158 this_ptr_conv._underlying_ref = false;
4159 return NodeAnnouncement_free(this_ptr_conv);
4162 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1get_1signature(JNIEnv * _env, jclass _b, jlong this_ptr) {
4163 LDKNodeAnnouncement* this_ptr_conv = (LDKNodeAnnouncement*)this_ptr;
4164 LDKSignature* ret = malloc(sizeof(LDKSignature));
4165 *ret = NodeAnnouncement_get_signature(this_ptr_conv);
4169 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1set_1signature(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4170 LDKNodeAnnouncement* this_ptr_conv = (LDKNodeAnnouncement*)this_ptr;
4171 LDKSignature val_conv = *(LDKSignature*)val;
4173 return NodeAnnouncement_set_signature(this_ptr_conv, val_conv);
4176 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1get_1contents(JNIEnv * _env, jclass _b, jlong this_ptr) {
4177 LDKNodeAnnouncement* this_ptr_conv = (LDKNodeAnnouncement*)this_ptr;
4178 LDKUnsignedNodeAnnouncement* ret = malloc(sizeof(LDKUnsignedNodeAnnouncement));
4179 *ret = NodeAnnouncement_get_contents(this_ptr_conv);
4180 assert(!ret->_underlying_ref);
4181 ret->_underlying_ref = true;
4185 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1set_1contents(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4186 LDKNodeAnnouncement* this_ptr_conv = (LDKNodeAnnouncement*)this_ptr;
4187 LDKUnsignedNodeAnnouncement val_conv = *(LDKUnsignedNodeAnnouncement*)val;
4189 val_conv._underlying_ref = false;
4190 return NodeAnnouncement_set_contents(this_ptr_conv, val_conv);
4193 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1new(JNIEnv * _env, jclass _b, jlong signature_arg, jlong contents_arg) {
4194 LDKSignature signature_arg_conv = *(LDKSignature*)signature_arg;
4195 free((void*)signature_arg);
4196 LDKUnsignedNodeAnnouncement contents_arg_conv = *(LDKUnsignedNodeAnnouncement*)contents_arg;
4197 free((void*)contents_arg);
4198 contents_arg_conv._underlying_ref = false;
4199 LDKNodeAnnouncement* ret = malloc(sizeof(LDKNodeAnnouncement));
4200 *ret = NodeAnnouncement_new(signature_arg_conv, contents_arg_conv);
4201 assert(!ret->_underlying_ref);
4202 ret->_underlying_ref = true;
4206 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4207 LDKUnsignedChannelAnnouncement this_ptr_conv = *(LDKUnsignedChannelAnnouncement*)this_ptr;
4208 free((void*)this_ptr);
4209 this_ptr_conv._underlying_ref = false;
4210 return UnsignedChannelAnnouncement_free(this_ptr_conv);
4213 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1get_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr) {
4214 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4215 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
4216 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *UnsignedChannelAnnouncement_get_chain_hash(this_ptr_conv));
4220 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1set_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4221 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4222 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
4224 return UnsignedChannelAnnouncement_set_chain_hash(this_ptr_conv, val_conv);
4227 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1get_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
4228 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4229 return UnsignedChannelAnnouncement_get_short_channel_id(this_ptr_conv);
4232 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1set_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4233 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4234 return UnsignedChannelAnnouncement_set_short_channel_id(this_ptr_conv, val);
4237 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1get_1node_1id_11(JNIEnv * _env, jclass _b, jlong this_ptr) {
4238 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4239 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
4240 *ret = UnsignedChannelAnnouncement_get_node_id_1(this_ptr_conv);
4244 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1set_1node_1id_11(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4245 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4246 LDKPublicKey val_conv = *(LDKPublicKey*)val;
4248 return UnsignedChannelAnnouncement_set_node_id_1(this_ptr_conv, val_conv);
4251 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1get_1node_1id_12(JNIEnv * _env, jclass _b, jlong this_ptr) {
4252 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4253 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
4254 *ret = UnsignedChannelAnnouncement_get_node_id_2(this_ptr_conv);
4258 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1set_1node_1id_12(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4259 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4260 LDKPublicKey val_conv = *(LDKPublicKey*)val;
4262 return UnsignedChannelAnnouncement_set_node_id_2(this_ptr_conv, val_conv);
4265 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1get_1bitcoin_1key_11(JNIEnv * _env, jclass _b, jlong this_ptr) {
4266 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4267 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
4268 *ret = UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr_conv);
4272 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1set_1bitcoin_1key_11(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4273 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4274 LDKPublicKey val_conv = *(LDKPublicKey*)val;
4276 return UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr_conv, val_conv);
4279 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1get_1bitcoin_1key_12(JNIEnv * _env, jclass _b, jlong this_ptr) {
4280 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4281 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
4282 *ret = UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr_conv);
4286 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1set_1bitcoin_1key_12(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4287 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4288 LDKPublicKey val_conv = *(LDKPublicKey*)val;
4290 return UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr_conv, val_conv);
4293 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4294 LDKChannelAnnouncement this_ptr_conv = *(LDKChannelAnnouncement*)this_ptr;
4295 free((void*)this_ptr);
4296 this_ptr_conv._underlying_ref = false;
4297 return ChannelAnnouncement_free(this_ptr_conv);
4300 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1get_1node_1signature_11(JNIEnv * _env, jclass _b, jlong this_ptr) {
4301 LDKChannelAnnouncement* this_ptr_conv = (LDKChannelAnnouncement*)this_ptr;
4302 LDKSignature* ret = malloc(sizeof(LDKSignature));
4303 *ret = ChannelAnnouncement_get_node_signature_1(this_ptr_conv);
4307 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1set_1node_1signature_11(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4308 LDKChannelAnnouncement* this_ptr_conv = (LDKChannelAnnouncement*)this_ptr;
4309 LDKSignature val_conv = *(LDKSignature*)val;
4311 return ChannelAnnouncement_set_node_signature_1(this_ptr_conv, val_conv);
4314 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1get_1node_1signature_12(JNIEnv * _env, jclass _b, jlong this_ptr) {
4315 LDKChannelAnnouncement* this_ptr_conv = (LDKChannelAnnouncement*)this_ptr;
4316 LDKSignature* ret = malloc(sizeof(LDKSignature));
4317 *ret = ChannelAnnouncement_get_node_signature_2(this_ptr_conv);
4321 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1set_1node_1signature_12(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4322 LDKChannelAnnouncement* this_ptr_conv = (LDKChannelAnnouncement*)this_ptr;
4323 LDKSignature val_conv = *(LDKSignature*)val;
4325 return ChannelAnnouncement_set_node_signature_2(this_ptr_conv, val_conv);
4328 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1get_1bitcoin_1signature_11(JNIEnv * _env, jclass _b, jlong this_ptr) {
4329 LDKChannelAnnouncement* this_ptr_conv = (LDKChannelAnnouncement*)this_ptr;
4330 LDKSignature* ret = malloc(sizeof(LDKSignature));
4331 *ret = ChannelAnnouncement_get_bitcoin_signature_1(this_ptr_conv);
4335 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1set_1bitcoin_1signature_11(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4336 LDKChannelAnnouncement* this_ptr_conv = (LDKChannelAnnouncement*)this_ptr;
4337 LDKSignature val_conv = *(LDKSignature*)val;
4339 return ChannelAnnouncement_set_bitcoin_signature_1(this_ptr_conv, val_conv);
4342 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1get_1bitcoin_1signature_12(JNIEnv * _env, jclass _b, jlong this_ptr) {
4343 LDKChannelAnnouncement* this_ptr_conv = (LDKChannelAnnouncement*)this_ptr;
4344 LDKSignature* ret = malloc(sizeof(LDKSignature));
4345 *ret = ChannelAnnouncement_get_bitcoin_signature_2(this_ptr_conv);
4349 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1set_1bitcoin_1signature_12(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4350 LDKChannelAnnouncement* this_ptr_conv = (LDKChannelAnnouncement*)this_ptr;
4351 LDKSignature val_conv = *(LDKSignature*)val;
4353 return ChannelAnnouncement_set_bitcoin_signature_2(this_ptr_conv, val_conv);
4356 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1get_1contents(JNIEnv * _env, jclass _b, jlong this_ptr) {
4357 LDKChannelAnnouncement* this_ptr_conv = (LDKChannelAnnouncement*)this_ptr;
4358 LDKUnsignedChannelAnnouncement* ret = malloc(sizeof(LDKUnsignedChannelAnnouncement));
4359 *ret = ChannelAnnouncement_get_contents(this_ptr_conv);
4360 assert(!ret->_underlying_ref);
4361 ret->_underlying_ref = true;
4365 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1set_1contents(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4366 LDKChannelAnnouncement* this_ptr_conv = (LDKChannelAnnouncement*)this_ptr;
4367 LDKUnsignedChannelAnnouncement val_conv = *(LDKUnsignedChannelAnnouncement*)val;
4369 val_conv._underlying_ref = false;
4370 return ChannelAnnouncement_set_contents(this_ptr_conv, val_conv);
4373 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1new(JNIEnv * _env, jclass _b, jlong node_signature_1_arg, jlong node_signature_2_arg, jlong bitcoin_signature_1_arg, jlong bitcoin_signature_2_arg, jlong contents_arg) {
4374 LDKSignature node_signature_1_arg_conv = *(LDKSignature*)node_signature_1_arg;
4375 free((void*)node_signature_1_arg);
4376 LDKSignature node_signature_2_arg_conv = *(LDKSignature*)node_signature_2_arg;
4377 free((void*)node_signature_2_arg);
4378 LDKSignature bitcoin_signature_1_arg_conv = *(LDKSignature*)bitcoin_signature_1_arg;
4379 free((void*)bitcoin_signature_1_arg);
4380 LDKSignature bitcoin_signature_2_arg_conv = *(LDKSignature*)bitcoin_signature_2_arg;
4381 free((void*)bitcoin_signature_2_arg);
4382 LDKUnsignedChannelAnnouncement contents_arg_conv = *(LDKUnsignedChannelAnnouncement*)contents_arg;
4383 free((void*)contents_arg);
4384 contents_arg_conv._underlying_ref = false;
4385 LDKChannelAnnouncement* ret = malloc(sizeof(LDKChannelAnnouncement));
4386 *ret = ChannelAnnouncement_new(node_signature_1_arg_conv, node_signature_2_arg_conv, bitcoin_signature_1_arg_conv, bitcoin_signature_2_arg_conv, contents_arg_conv);
4387 assert(!ret->_underlying_ref);
4388 ret->_underlying_ref = true;
4392 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4393 LDKUnsignedChannelUpdate this_ptr_conv = *(LDKUnsignedChannelUpdate*)this_ptr;
4394 free((void*)this_ptr);
4395 this_ptr_conv._underlying_ref = false;
4396 return UnsignedChannelUpdate_free(this_ptr_conv);
4399 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr) {
4400 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4401 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
4402 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *UnsignedChannelUpdate_get_chain_hash(this_ptr_conv));
4406 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4407 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4408 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
4410 return UnsignedChannelUpdate_set_chain_hash(this_ptr_conv, val_conv);
4413 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
4414 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4415 return UnsignedChannelUpdate_get_short_channel_id(this_ptr_conv);
4418 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4419 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4420 return UnsignedChannelUpdate_set_short_channel_id(this_ptr_conv, val);
4423 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1timestamp(JNIEnv * _env, jclass _b, jlong this_ptr) {
4424 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4425 return UnsignedChannelUpdate_get_timestamp(this_ptr_conv);
4428 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1timestamp(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
4429 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4430 return UnsignedChannelUpdate_set_timestamp(this_ptr_conv, val);
4433 JNIEXPORT jbyte JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1flags(JNIEnv * _env, jclass _b, jlong this_ptr) {
4434 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4435 return UnsignedChannelUpdate_get_flags(this_ptr_conv);
4438 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1flags(JNIEnv * _env, jclass _b, jlong this_ptr, jbyte val) {
4439 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4440 return UnsignedChannelUpdate_set_flags(this_ptr_conv, val);
4443 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1cltv_1expiry_1delta(JNIEnv * _env, jclass _b, jlong this_ptr) {
4444 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4445 return UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr_conv);
4448 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1cltv_1expiry_1delta(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
4449 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4450 return UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr_conv, val);
4453 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
4454 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4455 return UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr_conv);
4458 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4459 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4460 return UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr_conv, val);
4463 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1fee_1base_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
4464 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4465 return UnsignedChannelUpdate_get_fee_base_msat(this_ptr_conv);
4468 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1fee_1base_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
4469 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4470 return UnsignedChannelUpdate_set_fee_base_msat(this_ptr_conv, val);
4473 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1fee_1proportional_1millionths(JNIEnv * _env, jclass _b, jlong this_ptr) {
4474 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4475 return UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr_conv);
4478 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1fee_1proportional_1millionths(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
4479 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4480 return UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr_conv, val);
4483 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4484 LDKChannelUpdate this_ptr_conv = *(LDKChannelUpdate*)this_ptr;
4485 free((void*)this_ptr);
4486 this_ptr_conv._underlying_ref = false;
4487 return ChannelUpdate_free(this_ptr_conv);
4490 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1get_1signature(JNIEnv * _env, jclass _b, jlong this_ptr) {
4491 LDKChannelUpdate* this_ptr_conv = (LDKChannelUpdate*)this_ptr;
4492 LDKSignature* ret = malloc(sizeof(LDKSignature));
4493 *ret = ChannelUpdate_get_signature(this_ptr_conv);
4497 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1set_1signature(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4498 LDKChannelUpdate* this_ptr_conv = (LDKChannelUpdate*)this_ptr;
4499 LDKSignature val_conv = *(LDKSignature*)val;
4501 return ChannelUpdate_set_signature(this_ptr_conv, val_conv);
4504 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1get_1contents(JNIEnv * _env, jclass _b, jlong this_ptr) {
4505 LDKChannelUpdate* this_ptr_conv = (LDKChannelUpdate*)this_ptr;
4506 LDKUnsignedChannelUpdate* ret = malloc(sizeof(LDKUnsignedChannelUpdate));
4507 *ret = ChannelUpdate_get_contents(this_ptr_conv);
4508 assert(!ret->_underlying_ref);
4509 ret->_underlying_ref = true;
4513 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1set_1contents(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4514 LDKChannelUpdate* this_ptr_conv = (LDKChannelUpdate*)this_ptr;
4515 LDKUnsignedChannelUpdate val_conv = *(LDKUnsignedChannelUpdate*)val;
4517 val_conv._underlying_ref = false;
4518 return ChannelUpdate_set_contents(this_ptr_conv, val_conv);
4521 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1new(JNIEnv * _env, jclass _b, jlong signature_arg, jlong contents_arg) {
4522 LDKSignature signature_arg_conv = *(LDKSignature*)signature_arg;
4523 free((void*)signature_arg);
4524 LDKUnsignedChannelUpdate contents_arg_conv = *(LDKUnsignedChannelUpdate*)contents_arg;
4525 free((void*)contents_arg);
4526 contents_arg_conv._underlying_ref = false;
4527 LDKChannelUpdate* ret = malloc(sizeof(LDKChannelUpdate));
4528 *ret = ChannelUpdate_new(signature_arg_conv, contents_arg_conv);
4529 assert(!ret->_underlying_ref);
4530 ret->_underlying_ref = true;
4534 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorAction_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4535 LDKErrorAction this_ptr_conv = *(LDKErrorAction*)this_ptr;
4536 free((void*)this_ptr);
4537 return ErrorAction_free(this_ptr_conv);
4540 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LightningError_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4541 LDKLightningError this_ptr_conv = *(LDKLightningError*)this_ptr;
4542 free((void*)this_ptr);
4543 this_ptr_conv._underlying_ref = false;
4544 return LightningError_free(this_ptr_conv);
4547 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LightningError_1get_1err(JNIEnv * _env, jclass _b, jlong this_ptr) {
4548 LDKLightningError* this_ptr_conv = (LDKLightningError*)this_ptr;
4549 LDKStr* ret = malloc(sizeof(LDKStr));
4550 *ret = LightningError_get_err(this_ptr_conv);
4554 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LightningError_1set_1err(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4555 LDKLightningError* this_ptr_conv = (LDKLightningError*)this_ptr;
4556 LDKCVec_u8Z val_conv = *(LDKCVec_u8Z*)val;
4558 return LightningError_set_err(this_ptr_conv, val_conv);
4561 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LightningError_1get_1action(JNIEnv * _env, jclass _b, jlong this_ptr) {
4562 LDKLightningError* this_ptr_conv = (LDKLightningError*)this_ptr;
4563 LDKErrorAction* ret = malloc(sizeof(LDKErrorAction));
4564 *ret = LightningError_get_action(this_ptr_conv);
4568 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LightningError_1set_1action(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4569 LDKLightningError* this_ptr_conv = (LDKLightningError*)this_ptr;
4570 LDKErrorAction val_conv = *(LDKErrorAction*)val;
4572 return LightningError_set_action(this_ptr_conv, val_conv);
4575 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LightningError_1new(JNIEnv * _env, jclass _b, jlong err_arg, jlong action_arg) {
4576 LDKCVec_u8Z err_arg_conv = *(LDKCVec_u8Z*)err_arg;
4577 free((void*)err_arg);
4578 LDKErrorAction action_arg_conv = *(LDKErrorAction*)action_arg;
4579 free((void*)action_arg);
4580 LDKLightningError* ret = malloc(sizeof(LDKLightningError));
4581 *ret = LightningError_new(err_arg_conv, action_arg_conv);
4582 assert(!ret->_underlying_ref);
4583 ret->_underlying_ref = true;
4587 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4588 LDKCommitmentUpdate this_ptr_conv = *(LDKCommitmentUpdate*)this_ptr;
4589 free((void*)this_ptr);
4590 this_ptr_conv._underlying_ref = false;
4591 return CommitmentUpdate_free(this_ptr_conv);
4594 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1set_1update_1add_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4595 LDKCommitmentUpdate* this_ptr_conv = (LDKCommitmentUpdate*)this_ptr;
4596 LDKCVec_UpdateAddHTLCZ val_conv = *(LDKCVec_UpdateAddHTLCZ*)val;
4598 return CommitmentUpdate_set_update_add_htlcs(this_ptr_conv, val_conv);
4601 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1set_1update_1fulfill_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4602 LDKCommitmentUpdate* this_ptr_conv = (LDKCommitmentUpdate*)this_ptr;
4603 LDKCVec_UpdateFulfillHTLCZ val_conv = *(LDKCVec_UpdateFulfillHTLCZ*)val;
4605 return CommitmentUpdate_set_update_fulfill_htlcs(this_ptr_conv, val_conv);
4608 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1set_1update_1fail_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4609 LDKCommitmentUpdate* this_ptr_conv = (LDKCommitmentUpdate*)this_ptr;
4610 LDKCVec_UpdateFailHTLCZ val_conv = *(LDKCVec_UpdateFailHTLCZ*)val;
4612 return CommitmentUpdate_set_update_fail_htlcs(this_ptr_conv, val_conv);
4615 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1set_1update_1fail_1malformed_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4616 LDKCommitmentUpdate* this_ptr_conv = (LDKCommitmentUpdate*)this_ptr;
4617 LDKCVec_UpdateFailMalformedHTLCZ val_conv = *(LDKCVec_UpdateFailMalformedHTLCZ*)val;
4619 return CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr_conv, val_conv);
4622 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1get_1update_1fee(JNIEnv * _env, jclass _b, jlong this_ptr) {
4623 LDKCommitmentUpdate* this_ptr_conv = (LDKCommitmentUpdate*)this_ptr;
4624 LDKUpdateFee* ret = malloc(sizeof(LDKUpdateFee));
4625 *ret = CommitmentUpdate_get_update_fee(this_ptr_conv);
4626 assert(!ret->_underlying_ref);
4627 ret->_underlying_ref = true;
4631 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1set_1update_1fee(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4632 LDKCommitmentUpdate* this_ptr_conv = (LDKCommitmentUpdate*)this_ptr;
4633 LDKUpdateFee val_conv = *(LDKUpdateFee*)val;
4635 val_conv._underlying_ref = false;
4636 return CommitmentUpdate_set_update_fee(this_ptr_conv, val_conv);
4639 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1get_1commitment_1signed(JNIEnv * _env, jclass _b, jlong this_ptr) {
4640 LDKCommitmentUpdate* this_ptr_conv = (LDKCommitmentUpdate*)this_ptr;
4641 LDKCommitmentSigned* ret = malloc(sizeof(LDKCommitmentSigned));
4642 *ret = CommitmentUpdate_get_commitment_signed(this_ptr_conv);
4643 assert(!ret->_underlying_ref);
4644 ret->_underlying_ref = true;
4648 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1set_1commitment_1signed(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4649 LDKCommitmentUpdate* this_ptr_conv = (LDKCommitmentUpdate*)this_ptr;
4650 LDKCommitmentSigned val_conv = *(LDKCommitmentSigned*)val;
4652 val_conv._underlying_ref = false;
4653 return CommitmentUpdate_set_commitment_signed(this_ptr_conv, val_conv);
4656 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1new(JNIEnv * _env, jclass _b, jlong update_add_htlcs_arg, jlong update_fulfill_htlcs_arg, jlong update_fail_htlcs_arg, jlong update_fail_malformed_htlcs_arg, jlong update_fee_arg, jlong commitment_signed_arg) {
4657 LDKCVec_UpdateAddHTLCZ update_add_htlcs_arg_conv = *(LDKCVec_UpdateAddHTLCZ*)update_add_htlcs_arg;
4658 free((void*)update_add_htlcs_arg);
4659 LDKCVec_UpdateFulfillHTLCZ update_fulfill_htlcs_arg_conv = *(LDKCVec_UpdateFulfillHTLCZ*)update_fulfill_htlcs_arg;
4660 free((void*)update_fulfill_htlcs_arg);
4661 LDKCVec_UpdateFailHTLCZ update_fail_htlcs_arg_conv = *(LDKCVec_UpdateFailHTLCZ*)update_fail_htlcs_arg;
4662 free((void*)update_fail_htlcs_arg);
4663 LDKCVec_UpdateFailMalformedHTLCZ update_fail_malformed_htlcs_arg_conv = *(LDKCVec_UpdateFailMalformedHTLCZ*)update_fail_malformed_htlcs_arg;
4664 free((void*)update_fail_malformed_htlcs_arg);
4665 LDKUpdateFee update_fee_arg_conv = *(LDKUpdateFee*)update_fee_arg;
4666 free((void*)update_fee_arg);
4667 update_fee_arg_conv._underlying_ref = false;
4668 LDKCommitmentSigned commitment_signed_arg_conv = *(LDKCommitmentSigned*)commitment_signed_arg;
4669 free((void*)commitment_signed_arg);
4670 commitment_signed_arg_conv._underlying_ref = false;
4671 LDKCommitmentUpdate* ret = malloc(sizeof(LDKCommitmentUpdate));
4672 *ret = CommitmentUpdate_new(update_add_htlcs_arg_conv, update_fulfill_htlcs_arg_conv, update_fail_htlcs_arg_conv, update_fail_malformed_htlcs_arg_conv, update_fee_arg_conv, commitment_signed_arg_conv);
4673 assert(!ret->_underlying_ref);
4674 ret->_underlying_ref = true;
4678 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCFailChannelUpdate_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4679 LDKHTLCFailChannelUpdate this_ptr_conv = *(LDKHTLCFailChannelUpdate*)this_ptr;
4680 free((void*)this_ptr);
4681 return HTLCFailChannelUpdate_free(this_ptr_conv);
4684 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4685 LDKChannelMessageHandler this_ptr_conv = *(LDKChannelMessageHandler*)this_ptr;
4686 free((void*)this_ptr);
4687 return ChannelMessageHandler_free(this_ptr_conv);
4690 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4691 LDKRoutingMessageHandler this_ptr_conv = *(LDKRoutingMessageHandler*)this_ptr;
4692 free((void*)this_ptr);
4693 return RoutingMessageHandler_free(this_ptr_conv);
4696 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1write(JNIEnv * _env, jclass _b, jlong obj) {
4697 LDKAcceptChannel* obj_conv = (LDKAcceptChannel*)obj;
4698 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4699 *ret = AcceptChannel_write(obj_conv);
4703 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1read(JNIEnv * _env, jclass _b, jlong ser) {
4704 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4706 LDKAcceptChannel* ret = malloc(sizeof(LDKAcceptChannel));
4707 *ret = AcceptChannel_read(ser_conv);
4708 assert(!ret->_underlying_ref);
4709 ret->_underlying_ref = true;
4713 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1write(JNIEnv * _env, jclass _b, jlong obj) {
4714 LDKAnnouncementSignatures* obj_conv = (LDKAnnouncementSignatures*)obj;
4715 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4716 *ret = AnnouncementSignatures_write(obj_conv);
4720 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1read(JNIEnv * _env, jclass _b, jlong ser) {
4721 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4723 LDKAnnouncementSignatures* ret = malloc(sizeof(LDKAnnouncementSignatures));
4724 *ret = AnnouncementSignatures_read(ser_conv);
4725 assert(!ret->_underlying_ref);
4726 ret->_underlying_ref = true;
4730 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1write(JNIEnv * _env, jclass _b, jlong obj) {
4731 LDKChannelReestablish* obj_conv = (LDKChannelReestablish*)obj;
4732 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4733 *ret = ChannelReestablish_write(obj_conv);
4737 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1read(JNIEnv * _env, jclass _b, jlong ser) {
4738 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4740 LDKChannelReestablish* ret = malloc(sizeof(LDKChannelReestablish));
4741 *ret = ChannelReestablish_read(ser_conv);
4742 assert(!ret->_underlying_ref);
4743 ret->_underlying_ref = true;
4747 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1write(JNIEnv * _env, jclass _b, jlong obj) {
4748 LDKClosingSigned* obj_conv = (LDKClosingSigned*)obj;
4749 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4750 *ret = ClosingSigned_write(obj_conv);
4754 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1read(JNIEnv * _env, jclass _b, jlong ser) {
4755 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4757 LDKClosingSigned* ret = malloc(sizeof(LDKClosingSigned));
4758 *ret = ClosingSigned_read(ser_conv);
4759 assert(!ret->_underlying_ref);
4760 ret->_underlying_ref = true;
4764 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1write(JNIEnv * _env, jclass _b, jlong obj) {
4765 LDKCommitmentSigned* obj_conv = (LDKCommitmentSigned*)obj;
4766 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4767 *ret = CommitmentSigned_write(obj_conv);
4771 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1read(JNIEnv * _env, jclass _b, jlong ser) {
4772 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4774 LDKCommitmentSigned* ret = malloc(sizeof(LDKCommitmentSigned));
4775 *ret = CommitmentSigned_read(ser_conv);
4776 assert(!ret->_underlying_ref);
4777 ret->_underlying_ref = true;
4781 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingCreated_1write(JNIEnv * _env, jclass _b, jlong obj) {
4782 LDKFundingCreated* obj_conv = (LDKFundingCreated*)obj;
4783 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4784 *ret = FundingCreated_write(obj_conv);
4788 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingCreated_1read(JNIEnv * _env, jclass _b, jlong ser) {
4789 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4791 LDKFundingCreated* ret = malloc(sizeof(LDKFundingCreated));
4792 *ret = FundingCreated_read(ser_conv);
4793 assert(!ret->_underlying_ref);
4794 ret->_underlying_ref = true;
4798 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingSigned_1write(JNIEnv * _env, jclass _b, jlong obj) {
4799 LDKFundingSigned* obj_conv = (LDKFundingSigned*)obj;
4800 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4801 *ret = FundingSigned_write(obj_conv);
4805 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingSigned_1read(JNIEnv * _env, jclass _b, jlong ser) {
4806 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4808 LDKFundingSigned* ret = malloc(sizeof(LDKFundingSigned));
4809 *ret = FundingSigned_read(ser_conv);
4810 assert(!ret->_underlying_ref);
4811 ret->_underlying_ref = true;
4815 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingLocked_1write(JNIEnv * _env, jclass _b, jlong obj) {
4816 LDKFundingLocked* obj_conv = (LDKFundingLocked*)obj;
4817 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4818 *ret = FundingLocked_write(obj_conv);
4822 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingLocked_1read(JNIEnv * _env, jclass _b, jlong ser) {
4823 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4825 LDKFundingLocked* ret = malloc(sizeof(LDKFundingLocked));
4826 *ret = FundingLocked_read(ser_conv);
4827 assert(!ret->_underlying_ref);
4828 ret->_underlying_ref = true;
4832 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Init_1write(JNIEnv * _env, jclass _b, jlong obj) {
4833 LDKInit* obj_conv = (LDKInit*)obj;
4834 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4835 *ret = Init_write(obj_conv);
4839 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Init_1read(JNIEnv * _env, jclass _b, jlong ser) {
4840 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4842 LDKInit* ret = malloc(sizeof(LDKInit));
4843 *ret = Init_read(ser_conv);
4844 assert(!ret->_underlying_ref);
4845 ret->_underlying_ref = true;
4849 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1write(JNIEnv * _env, jclass _b, jlong obj) {
4850 LDKOpenChannel* obj_conv = (LDKOpenChannel*)obj;
4851 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4852 *ret = OpenChannel_write(obj_conv);
4856 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1read(JNIEnv * _env, jclass _b, jlong ser) {
4857 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4859 LDKOpenChannel* ret = malloc(sizeof(LDKOpenChannel));
4860 *ret = OpenChannel_read(ser_conv);
4861 assert(!ret->_underlying_ref);
4862 ret->_underlying_ref = true;
4866 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1write(JNIEnv * _env, jclass _b, jlong obj) {
4867 LDKRevokeAndACK* obj_conv = (LDKRevokeAndACK*)obj;
4868 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4869 *ret = RevokeAndACK_write(obj_conv);
4873 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1read(JNIEnv * _env, jclass _b, jlong ser) {
4874 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4876 LDKRevokeAndACK* ret = malloc(sizeof(LDKRevokeAndACK));
4877 *ret = RevokeAndACK_read(ser_conv);
4878 assert(!ret->_underlying_ref);
4879 ret->_underlying_ref = true;
4883 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Shutdown_1write(JNIEnv * _env, jclass _b, jlong obj) {
4884 LDKShutdown* obj_conv = (LDKShutdown*)obj;
4885 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4886 *ret = Shutdown_write(obj_conv);
4890 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Shutdown_1read(JNIEnv * _env, jclass _b, jlong ser) {
4891 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4893 LDKShutdown* ret = malloc(sizeof(LDKShutdown));
4894 *ret = Shutdown_read(ser_conv);
4895 assert(!ret->_underlying_ref);
4896 ret->_underlying_ref = true;
4900 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1write(JNIEnv * _env, jclass _b, jlong obj) {
4901 LDKUpdateFailHTLC* obj_conv = (LDKUpdateFailHTLC*)obj;
4902 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4903 *ret = UpdateFailHTLC_write(obj_conv);
4907 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1read(JNIEnv * _env, jclass _b, jlong ser) {
4908 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4910 LDKUpdateFailHTLC* ret = malloc(sizeof(LDKUpdateFailHTLC));
4911 *ret = UpdateFailHTLC_read(ser_conv);
4912 assert(!ret->_underlying_ref);
4913 ret->_underlying_ref = true;
4917 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1write(JNIEnv * _env, jclass _b, jlong obj) {
4918 LDKUpdateFailMalformedHTLC* obj_conv = (LDKUpdateFailMalformedHTLC*)obj;
4919 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4920 *ret = UpdateFailMalformedHTLC_write(obj_conv);
4924 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1read(JNIEnv * _env, jclass _b, jlong ser) {
4925 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4927 LDKUpdateFailMalformedHTLC* ret = malloc(sizeof(LDKUpdateFailMalformedHTLC));
4928 *ret = UpdateFailMalformedHTLC_read(ser_conv);
4929 assert(!ret->_underlying_ref);
4930 ret->_underlying_ref = true;
4934 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFee_1write(JNIEnv * _env, jclass _b, jlong obj) {
4935 LDKUpdateFee* obj_conv = (LDKUpdateFee*)obj;
4936 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4937 *ret = UpdateFee_write(obj_conv);
4941 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFee_1read(JNIEnv * _env, jclass _b, jlong ser) {
4942 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4944 LDKUpdateFee* ret = malloc(sizeof(LDKUpdateFee));
4945 *ret = UpdateFee_read(ser_conv);
4946 assert(!ret->_underlying_ref);
4947 ret->_underlying_ref = true;
4951 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1write(JNIEnv * _env, jclass _b, jlong obj) {
4952 LDKUpdateFulfillHTLC* obj_conv = (LDKUpdateFulfillHTLC*)obj;
4953 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4954 *ret = UpdateFulfillHTLC_write(obj_conv);
4958 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1read(JNIEnv * _env, jclass _b, jlong ser) {
4959 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4961 LDKUpdateFulfillHTLC* ret = malloc(sizeof(LDKUpdateFulfillHTLC));
4962 *ret = UpdateFulfillHTLC_read(ser_conv);
4963 assert(!ret->_underlying_ref);
4964 ret->_underlying_ref = true;
4968 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1write(JNIEnv * _env, jclass _b, jlong obj) {
4969 LDKUpdateAddHTLC* obj_conv = (LDKUpdateAddHTLC*)obj;
4970 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4971 *ret = UpdateAddHTLC_write(obj_conv);
4975 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1read(JNIEnv * _env, jclass _b, jlong ser) {
4976 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4978 LDKUpdateAddHTLC* ret = malloc(sizeof(LDKUpdateAddHTLC));
4979 *ret = UpdateAddHTLC_read(ser_conv);
4980 assert(!ret->_underlying_ref);
4981 ret->_underlying_ref = true;
4985 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Ping_1write(JNIEnv * _env, jclass _b, jlong obj) {
4986 LDKPing* obj_conv = (LDKPing*)obj;
4987 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4988 *ret = Ping_write(obj_conv);
4992 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Ping_1read(JNIEnv * _env, jclass _b, jlong ser) {
4993 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4995 LDKPing* ret = malloc(sizeof(LDKPing));
4996 *ret = Ping_read(ser_conv);
4997 assert(!ret->_underlying_ref);
4998 ret->_underlying_ref = true;
5002 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Pong_1write(JNIEnv * _env, jclass _b, jlong obj) {
5003 LDKPong* obj_conv = (LDKPong*)obj;
5004 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5005 *ret = Pong_write(obj_conv);
5009 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Pong_1read(JNIEnv * _env, jclass _b, jlong ser) {
5010 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5012 LDKPong* ret = malloc(sizeof(LDKPong));
5013 *ret = Pong_read(ser_conv);
5014 assert(!ret->_underlying_ref);
5015 ret->_underlying_ref = true;
5019 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1write(JNIEnv * _env, jclass _b, jlong obj) {
5020 LDKUnsignedChannelAnnouncement* obj_conv = (LDKUnsignedChannelAnnouncement*)obj;
5021 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5022 *ret = UnsignedChannelAnnouncement_write(obj_conv);
5026 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1read(JNIEnv * _env, jclass _b, jlong ser) {
5027 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5029 LDKUnsignedChannelAnnouncement* ret = malloc(sizeof(LDKUnsignedChannelAnnouncement));
5030 *ret = UnsignedChannelAnnouncement_read(ser_conv);
5031 assert(!ret->_underlying_ref);
5032 ret->_underlying_ref = true;
5036 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1write(JNIEnv * _env, jclass _b, jlong obj) {
5037 LDKChannelAnnouncement* obj_conv = (LDKChannelAnnouncement*)obj;
5038 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5039 *ret = ChannelAnnouncement_write(obj_conv);
5043 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1read(JNIEnv * _env, jclass _b, jlong ser) {
5044 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5046 LDKChannelAnnouncement* ret = malloc(sizeof(LDKChannelAnnouncement));
5047 *ret = ChannelAnnouncement_read(ser_conv);
5048 assert(!ret->_underlying_ref);
5049 ret->_underlying_ref = true;
5053 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1write(JNIEnv * _env, jclass _b, jlong obj) {
5054 LDKUnsignedChannelUpdate* obj_conv = (LDKUnsignedChannelUpdate*)obj;
5055 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5056 *ret = UnsignedChannelUpdate_write(obj_conv);
5060 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1read(JNIEnv * _env, jclass _b, jlong ser) {
5061 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5063 LDKUnsignedChannelUpdate* ret = malloc(sizeof(LDKUnsignedChannelUpdate));
5064 *ret = UnsignedChannelUpdate_read(ser_conv);
5065 assert(!ret->_underlying_ref);
5066 ret->_underlying_ref = true;
5070 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1write(JNIEnv * _env, jclass _b, jlong obj) {
5071 LDKChannelUpdate* obj_conv = (LDKChannelUpdate*)obj;
5072 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5073 *ret = ChannelUpdate_write(obj_conv);
5077 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1read(JNIEnv * _env, jclass _b, jlong ser) {
5078 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5080 LDKChannelUpdate* ret = malloc(sizeof(LDKChannelUpdate));
5081 *ret = ChannelUpdate_read(ser_conv);
5082 assert(!ret->_underlying_ref);
5083 ret->_underlying_ref = true;
5087 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1write(JNIEnv * _env, jclass _b, jlong obj) {
5088 LDKErrorMessage* obj_conv = (LDKErrorMessage*)obj;
5089 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5090 *ret = ErrorMessage_write(obj_conv);
5094 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1read(JNIEnv * _env, jclass _b, jlong ser) {
5095 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5097 LDKErrorMessage* ret = malloc(sizeof(LDKErrorMessage));
5098 *ret = ErrorMessage_read(ser_conv);
5099 assert(!ret->_underlying_ref);
5100 ret->_underlying_ref = true;
5104 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1write(JNIEnv * _env, jclass _b, jlong obj) {
5105 LDKUnsignedNodeAnnouncement* obj_conv = (LDKUnsignedNodeAnnouncement*)obj;
5106 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5107 *ret = UnsignedNodeAnnouncement_write(obj_conv);
5111 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1read(JNIEnv * _env, jclass _b, jlong ser) {
5112 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5114 LDKUnsignedNodeAnnouncement* ret = malloc(sizeof(LDKUnsignedNodeAnnouncement));
5115 *ret = UnsignedNodeAnnouncement_read(ser_conv);
5116 assert(!ret->_underlying_ref);
5117 ret->_underlying_ref = true;
5121 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1write(JNIEnv * _env, jclass _b, jlong obj) {
5122 LDKNodeAnnouncement* obj_conv = (LDKNodeAnnouncement*)obj;
5123 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5124 *ret = NodeAnnouncement_write(obj_conv);
5128 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1read(JNIEnv * _env, jclass _b, jlong ser) {
5129 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5131 LDKNodeAnnouncement* ret = malloc(sizeof(LDKNodeAnnouncement));
5132 *ret = NodeAnnouncement_read(ser_conv);
5133 assert(!ret->_underlying_ref);
5134 ret->_underlying_ref = true;
5138 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_MessageHandler_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5139 LDKMessageHandler this_ptr_conv = *(LDKMessageHandler*)this_ptr;
5140 free((void*)this_ptr);
5141 this_ptr_conv._underlying_ref = false;
5142 return MessageHandler_free(this_ptr_conv);
5145 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_MessageHandler_1get_1chan_1handler(JNIEnv * _env, jclass _b, jlong this_ptr) {
5146 LDKMessageHandler* this_ptr_conv = (LDKMessageHandler*)this_ptr;
5147 long ret = (long)MessageHandler_get_chan_handler(this_ptr_conv);
5151 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_MessageHandler_1set_1chan_1handler(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5152 LDKMessageHandler* this_ptr_conv = (LDKMessageHandler*)this_ptr;
5153 LDKChannelMessageHandler val_conv = *(LDKChannelMessageHandler*)val;
5155 return MessageHandler_set_chan_handler(this_ptr_conv, val_conv);
5158 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_MessageHandler_1get_1route_1handler(JNIEnv * _env, jclass _b, jlong this_ptr) {
5159 LDKMessageHandler* this_ptr_conv = (LDKMessageHandler*)this_ptr;
5160 long ret = (long)MessageHandler_get_route_handler(this_ptr_conv);
5164 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_MessageHandler_1set_1route_1handler(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5165 LDKMessageHandler* this_ptr_conv = (LDKMessageHandler*)this_ptr;
5166 LDKRoutingMessageHandler val_conv = *(LDKRoutingMessageHandler*)val;
5168 return MessageHandler_set_route_handler(this_ptr_conv, val_conv);
5171 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_MessageHandler_1new(JNIEnv * _env, jclass _b, jlong chan_handler_arg, jlong route_handler_arg) {
5172 LDKChannelMessageHandler chan_handler_arg_conv = *(LDKChannelMessageHandler*)chan_handler_arg;
5173 free((void*)chan_handler_arg);
5174 LDKRoutingMessageHandler route_handler_arg_conv = *(LDKRoutingMessageHandler*)route_handler_arg;
5175 free((void*)route_handler_arg);
5176 LDKMessageHandler* ret = malloc(sizeof(LDKMessageHandler));
5177 *ret = MessageHandler_new(chan_handler_arg_conv, route_handler_arg_conv);
5178 assert(!ret->_underlying_ref);
5179 ret->_underlying_ref = true;
5183 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5184 LDKSocketDescriptor this_ptr_conv = *(LDKSocketDescriptor*)this_ptr;
5185 free((void*)this_ptr);
5186 return SocketDescriptor_free(this_ptr_conv);
5189 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerHandleError_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5190 LDKPeerHandleError this_ptr_conv = *(LDKPeerHandleError*)this_ptr;
5191 free((void*)this_ptr);
5192 this_ptr_conv._underlying_ref = false;
5193 return PeerHandleError_free(this_ptr_conv);
5196 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_PeerHandleError_1get_1no_1connection_1possible(JNIEnv * _env, jclass _b, jlong this_ptr) {
5197 LDKPeerHandleError* this_ptr_conv = (LDKPeerHandleError*)this_ptr;
5198 return PeerHandleError_get_no_connection_possible(this_ptr_conv);
5201 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerHandleError_1set_1no_1connection_1possible(JNIEnv * _env, jclass _b, jlong this_ptr, jboolean val) {
5202 LDKPeerHandleError* this_ptr_conv = (LDKPeerHandleError*)this_ptr;
5203 return PeerHandleError_set_no_connection_possible(this_ptr_conv, val);
5206 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeerHandleError_1new(JNIEnv * _env, jclass _b, jboolean no_connection_possible_arg) {
5207 LDKPeerHandleError* ret = malloc(sizeof(LDKPeerHandleError));
5208 *ret = PeerHandleError_new(no_connection_possible_arg);
5209 assert(!ret->_underlying_ref);
5210 ret->_underlying_ref = true;
5214 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerManager_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5215 LDKPeerManager this_ptr_conv = *(LDKPeerManager*)this_ptr;
5216 free((void*)this_ptr);
5217 this_ptr_conv._underlying_ref = false;
5218 return PeerManager_free(this_ptr_conv);
5221 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeerManager_1new(JNIEnv * _env, jclass _b, jlong message_handler, jlong our_node_secret, jbyteArray ephemeral_random_data, jlong logger) {
5222 LDKMessageHandler message_handler_conv = *(LDKMessageHandler*)message_handler;
5223 free((void*)message_handler);
5224 message_handler_conv._underlying_ref = false;
5225 LDKSecretKey our_node_secret_conv = *(LDKSecretKey*)our_node_secret;
5226 free((void*)our_node_secret);
5227 unsigned char ephemeral_random_data_arr[32];
5228 (*_env)->GetByteArrayRegion (_env, ephemeral_random_data, 0, 32, ephemeral_random_data_arr);
5229 unsigned char (*ephemeral_random_data_ref)[32] = &ephemeral_random_data_arr;
5230 LDKLogger logger_conv = *(LDKLogger*)logger;
5231 free((void*)logger);
5232 LDKPeerManager* ret = malloc(sizeof(LDKPeerManager));
5233 *ret = PeerManager_new(message_handler_conv, our_node_secret_conv, ephemeral_random_data_ref, logger_conv);
5234 assert(!ret->_underlying_ref);
5235 ret->_underlying_ref = true;
5239 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeerManager_1get_1peer_1node_1ids(JNIEnv * _env, jclass _b, jlong this_arg) {
5240 LDKPeerManager* this_arg_conv = (LDKPeerManager*)this_arg;
5241 LDKCVec_PublicKeyZ* ret = malloc(sizeof(LDKCVec_PublicKeyZ));
5242 *ret = PeerManager_get_peer_node_ids(this_arg_conv);
5246 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeerManager_1new_1outbound_1connection(JNIEnv * _env, jclass _b, jlong this_arg, jlong their_node_id, jlong descriptor) {
5247 LDKPeerManager* this_arg_conv = (LDKPeerManager*)this_arg;
5248 LDKPublicKey their_node_id_conv = *(LDKPublicKey*)their_node_id;
5249 free((void*)their_node_id);
5250 LDKSocketDescriptor descriptor_conv = *(LDKSocketDescriptor*)descriptor;
5251 free((void*)descriptor);
5252 LDKCResult_CVec_u8ZPeerHandleErrorZ* ret = malloc(sizeof(LDKCResult_CVec_u8ZPeerHandleErrorZ));
5253 *ret = PeerManager_new_outbound_connection(this_arg_conv, their_node_id_conv, descriptor_conv);
5257 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeerManager_1new_1inbound_1connection(JNIEnv * _env, jclass _b, jlong this_arg, jlong descriptor) {
5258 LDKPeerManager* this_arg_conv = (LDKPeerManager*)this_arg;
5259 LDKSocketDescriptor descriptor_conv = *(LDKSocketDescriptor*)descriptor;
5260 free((void*)descriptor);
5261 LDKCResult_NonePeerHandleErrorZ* ret = malloc(sizeof(LDKCResult_NonePeerHandleErrorZ));
5262 *ret = PeerManager_new_inbound_connection(this_arg_conv, descriptor_conv);
5266 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeerManager_1write_1buffer_1space_1avail(JNIEnv * _env, jclass _b, jlong this_arg, jlong descriptor) {
5267 LDKPeerManager* this_arg_conv = (LDKPeerManager*)this_arg;
5268 LDKSocketDescriptor* descriptor_conv = (LDKSocketDescriptor*)descriptor;
5269 LDKCResult_NonePeerHandleErrorZ* ret = malloc(sizeof(LDKCResult_NonePeerHandleErrorZ));
5270 *ret = PeerManager_write_buffer_space_avail(this_arg_conv, descriptor_conv);
5274 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeerManager_1read_1event(JNIEnv * _env, jclass _b, jlong this_arg, jlong peer_descriptor, jlong data) {
5275 LDKPeerManager* this_arg_conv = (LDKPeerManager*)this_arg;
5276 LDKSocketDescriptor* peer_descriptor_conv = (LDKSocketDescriptor*)peer_descriptor;
5277 LDKu8slice data_conv = *(LDKu8slice*)data;
5279 LDKCResult_boolPeerHandleErrorZ* ret = malloc(sizeof(LDKCResult_boolPeerHandleErrorZ));
5280 *ret = PeerManager_read_event(this_arg_conv, peer_descriptor_conv, data_conv);
5284 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerManager_1process_1events(JNIEnv * _env, jclass _b, jlong this_arg) {
5285 LDKPeerManager* this_arg_conv = (LDKPeerManager*)this_arg;
5286 return PeerManager_process_events(this_arg_conv);
5289 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerManager_1socket_1disconnected(JNIEnv * _env, jclass _b, jlong this_arg, jlong descriptor) {
5290 LDKPeerManager* this_arg_conv = (LDKPeerManager*)this_arg;
5291 LDKSocketDescriptor* descriptor_conv = (LDKSocketDescriptor*)descriptor;
5292 return PeerManager_socket_disconnected(this_arg_conv, descriptor_conv);
5295 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerManager_1timer_1tick_1occured(JNIEnv * _env, jclass _b, jlong this_arg) {
5296 LDKPeerManager* this_arg_conv = (LDKPeerManager*)this_arg;
5297 return PeerManager_timer_tick_occured(this_arg_conv);
5300 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_build_1commitment_1secret(JNIEnv * _env, jclass _b, jbyteArray commitment_seed, jlong idx) {
5301 unsigned char commitment_seed_arr[32];
5302 (*_env)->GetByteArrayRegion (_env, commitment_seed, 0, 32, commitment_seed_arr);
5303 unsigned char (*commitment_seed_ref)[32] = &commitment_seed_arr;
5304 LDKThirtyTwoBytes* ret = malloc(sizeof(LDKThirtyTwoBytes));
5305 *ret = build_commitment_secret(commitment_seed_ref, idx);
5309 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5310 LDKTxCreationKeys this_ptr_conv = *(LDKTxCreationKeys*)this_ptr;
5311 free((void*)this_ptr);
5312 this_ptr_conv._underlying_ref = false;
5313 return TxCreationKeys_free(this_ptr_conv);
5316 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1get_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr) {
5317 LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr;
5318 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5319 *ret = TxCreationKeys_get_per_commitment_point(this_ptr_conv);
5323 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1set_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5324 LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr;
5325 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5327 return TxCreationKeys_set_per_commitment_point(this_ptr_conv, val_conv);
5330 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1get_1revocation_1key(JNIEnv * _env, jclass _b, jlong this_ptr) {
5331 LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr;
5332 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5333 *ret = TxCreationKeys_get_revocation_key(this_ptr_conv);
5337 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1set_1revocation_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5338 LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr;
5339 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5341 return TxCreationKeys_set_revocation_key(this_ptr_conv, val_conv);
5344 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1get_1a_1htlc_1key(JNIEnv * _env, jclass _b, jlong this_ptr) {
5345 LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr;
5346 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5347 *ret = TxCreationKeys_get_a_htlc_key(this_ptr_conv);
5351 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1set_1a_1htlc_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5352 LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr;
5353 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5355 return TxCreationKeys_set_a_htlc_key(this_ptr_conv, val_conv);
5358 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1get_1b_1htlc_1key(JNIEnv * _env, jclass _b, jlong this_ptr) {
5359 LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr;
5360 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5361 *ret = TxCreationKeys_get_b_htlc_key(this_ptr_conv);
5365 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1set_1b_1htlc_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5366 LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr;
5367 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5369 return TxCreationKeys_set_b_htlc_key(this_ptr_conv, val_conv);
5372 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1get_1a_1delayed_1payment_1key(JNIEnv * _env, jclass _b, jlong this_ptr) {
5373 LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr;
5374 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5375 *ret = TxCreationKeys_get_a_delayed_payment_key(this_ptr_conv);
5379 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1set_1a_1delayed_1payment_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5380 LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr;
5381 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5383 return TxCreationKeys_set_a_delayed_payment_key(this_ptr_conv, val_conv);
5386 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1new(JNIEnv * _env, jclass _b, jlong per_commitment_point_arg, jlong revocation_key_arg, jlong a_htlc_key_arg, jlong b_htlc_key_arg, jlong a_delayed_payment_key_arg) {
5387 LDKPublicKey per_commitment_point_arg_conv = *(LDKPublicKey*)per_commitment_point_arg;
5388 free((void*)per_commitment_point_arg);
5389 LDKPublicKey revocation_key_arg_conv = *(LDKPublicKey*)revocation_key_arg;
5390 free((void*)revocation_key_arg);
5391 LDKPublicKey a_htlc_key_arg_conv = *(LDKPublicKey*)a_htlc_key_arg;
5392 free((void*)a_htlc_key_arg);
5393 LDKPublicKey b_htlc_key_arg_conv = *(LDKPublicKey*)b_htlc_key_arg;
5394 free((void*)b_htlc_key_arg);
5395 LDKPublicKey a_delayed_payment_key_arg_conv = *(LDKPublicKey*)a_delayed_payment_key_arg;
5396 free((void*)a_delayed_payment_key_arg);
5397 LDKTxCreationKeys* ret = malloc(sizeof(LDKTxCreationKeys));
5398 *ret = TxCreationKeys_new(per_commitment_point_arg_conv, revocation_key_arg_conv, a_htlc_key_arg_conv, b_htlc_key_arg_conv, a_delayed_payment_key_arg_conv);
5399 assert(!ret->_underlying_ref);
5400 ret->_underlying_ref = true;
5404 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1write(JNIEnv * _env, jclass _b, jlong obj) {
5405 LDKTxCreationKeys* obj_conv = (LDKTxCreationKeys*)obj;
5406 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5407 *ret = TxCreationKeys_write(obj_conv);
5411 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1read(JNIEnv * _env, jclass _b, jlong ser) {
5412 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5414 LDKTxCreationKeys* ret = malloc(sizeof(LDKTxCreationKeys));
5415 *ret = TxCreationKeys_read(ser_conv);
5416 assert(!ret->_underlying_ref);
5417 ret->_underlying_ref = true;
5421 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PreCalculatedTxCreationKeys_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5422 LDKPreCalculatedTxCreationKeys this_ptr_conv = *(LDKPreCalculatedTxCreationKeys*)this_ptr;
5423 free((void*)this_ptr);
5424 this_ptr_conv._underlying_ref = false;
5425 return PreCalculatedTxCreationKeys_free(this_ptr_conv);
5428 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PreCalculatedTxCreationKeys_1new(JNIEnv * _env, jclass _b, jlong keys) {
5429 LDKTxCreationKeys keys_conv = *(LDKTxCreationKeys*)keys;
5431 keys_conv._underlying_ref = false;
5432 LDKPreCalculatedTxCreationKeys* ret = malloc(sizeof(LDKPreCalculatedTxCreationKeys));
5433 *ret = PreCalculatedTxCreationKeys_new(keys_conv);
5434 assert(!ret->_underlying_ref);
5435 ret->_underlying_ref = true;
5439 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PreCalculatedTxCreationKeys_1trust_1key_1derivation(JNIEnv * _env, jclass _b, jlong this_arg) {
5440 LDKPreCalculatedTxCreationKeys* this_arg_conv = (LDKPreCalculatedTxCreationKeys*)this_arg;
5441 LDKTxCreationKeys* ret = malloc(sizeof(LDKTxCreationKeys));
5442 *ret = PreCalculatedTxCreationKeys_trust_key_derivation(this_arg_conv);
5443 assert(!ret->_underlying_ref);
5444 ret->_underlying_ref = true;
5448 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PreCalculatedTxCreationKeys_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_arg) {
5449 LDKPreCalculatedTxCreationKeys* this_arg_conv = (LDKPreCalculatedTxCreationKeys*)this_arg;
5450 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5451 *ret = PreCalculatedTxCreationKeys_per_commitment_point(this_arg_conv);
5455 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5456 LDKChannelPublicKeys this_ptr_conv = *(LDKChannelPublicKeys*)this_ptr;
5457 free((void*)this_ptr);
5458 this_ptr_conv._underlying_ref = false;
5459 return ChannelPublicKeys_free(this_ptr_conv);
5462 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1get_1funding_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr) {
5463 LDKChannelPublicKeys* this_ptr_conv = (LDKChannelPublicKeys*)this_ptr;
5464 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5465 *ret = ChannelPublicKeys_get_funding_pubkey(this_ptr_conv);
5469 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1set_1funding_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5470 LDKChannelPublicKeys* this_ptr_conv = (LDKChannelPublicKeys*)this_ptr;
5471 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5473 return ChannelPublicKeys_set_funding_pubkey(this_ptr_conv, val_conv);
5476 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1get_1revocation_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr) {
5477 LDKChannelPublicKeys* this_ptr_conv = (LDKChannelPublicKeys*)this_ptr;
5478 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5479 *ret = ChannelPublicKeys_get_revocation_basepoint(this_ptr_conv);
5483 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1set_1revocation_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5484 LDKChannelPublicKeys* this_ptr_conv = (LDKChannelPublicKeys*)this_ptr;
5485 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5487 return ChannelPublicKeys_set_revocation_basepoint(this_ptr_conv, val_conv);
5490 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1get_1payment_1point(JNIEnv * _env, jclass _b, jlong this_ptr) {
5491 LDKChannelPublicKeys* this_ptr_conv = (LDKChannelPublicKeys*)this_ptr;
5492 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5493 *ret = ChannelPublicKeys_get_payment_point(this_ptr_conv);
5497 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1set_1payment_1point(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5498 LDKChannelPublicKeys* this_ptr_conv = (LDKChannelPublicKeys*)this_ptr;
5499 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5501 return ChannelPublicKeys_set_payment_point(this_ptr_conv, val_conv);
5504 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1get_1delayed_1payment_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr) {
5505 LDKChannelPublicKeys* this_ptr_conv = (LDKChannelPublicKeys*)this_ptr;
5506 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5507 *ret = ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr_conv);
5511 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1set_1delayed_1payment_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5512 LDKChannelPublicKeys* this_ptr_conv = (LDKChannelPublicKeys*)this_ptr;
5513 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5515 return ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr_conv, val_conv);
5518 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1get_1htlc_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr) {
5519 LDKChannelPublicKeys* this_ptr_conv = (LDKChannelPublicKeys*)this_ptr;
5520 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5521 *ret = ChannelPublicKeys_get_htlc_basepoint(this_ptr_conv);
5525 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1set_1htlc_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5526 LDKChannelPublicKeys* this_ptr_conv = (LDKChannelPublicKeys*)this_ptr;
5527 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5529 return ChannelPublicKeys_set_htlc_basepoint(this_ptr_conv, val_conv);
5532 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1new(JNIEnv * _env, jclass _b, jlong funding_pubkey_arg, jlong revocation_basepoint_arg, jlong payment_point_arg, jlong delayed_payment_basepoint_arg, jlong htlc_basepoint_arg) {
5533 LDKPublicKey funding_pubkey_arg_conv = *(LDKPublicKey*)funding_pubkey_arg;
5534 free((void*)funding_pubkey_arg);
5535 LDKPublicKey revocation_basepoint_arg_conv = *(LDKPublicKey*)revocation_basepoint_arg;
5536 free((void*)revocation_basepoint_arg);
5537 LDKPublicKey payment_point_arg_conv = *(LDKPublicKey*)payment_point_arg;
5538 free((void*)payment_point_arg);
5539 LDKPublicKey delayed_payment_basepoint_arg_conv = *(LDKPublicKey*)delayed_payment_basepoint_arg;
5540 free((void*)delayed_payment_basepoint_arg);
5541 LDKPublicKey htlc_basepoint_arg_conv = *(LDKPublicKey*)htlc_basepoint_arg;
5542 free((void*)htlc_basepoint_arg);
5543 LDKChannelPublicKeys* ret = malloc(sizeof(LDKChannelPublicKeys));
5544 *ret = ChannelPublicKeys_new(funding_pubkey_arg_conv, revocation_basepoint_arg_conv, payment_point_arg_conv, delayed_payment_basepoint_arg_conv, htlc_basepoint_arg_conv);
5545 assert(!ret->_underlying_ref);
5546 ret->_underlying_ref = true;
5550 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1write(JNIEnv * _env, jclass _b, jlong obj) {
5551 LDKChannelPublicKeys* obj_conv = (LDKChannelPublicKeys*)obj;
5552 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5553 *ret = ChannelPublicKeys_write(obj_conv);
5557 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1read(JNIEnv * _env, jclass _b, jlong ser) {
5558 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5560 LDKChannelPublicKeys* ret = malloc(sizeof(LDKChannelPublicKeys));
5561 *ret = ChannelPublicKeys_read(ser_conv);
5562 assert(!ret->_underlying_ref);
5563 ret->_underlying_ref = true;
5567 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1derive_1new(JNIEnv * _env, jclass _b, jlong per_commitment_point, jlong a_delayed_payment_base, jlong a_htlc_base, jlong b_revocation_base, jlong b_htlc_base) {
5568 LDKPublicKey per_commitment_point_conv = *(LDKPublicKey*)per_commitment_point;
5569 free((void*)per_commitment_point);
5570 LDKPublicKey a_delayed_payment_base_conv = *(LDKPublicKey*)a_delayed_payment_base;
5571 free((void*)a_delayed_payment_base);
5572 LDKPublicKey a_htlc_base_conv = *(LDKPublicKey*)a_htlc_base;
5573 free((void*)a_htlc_base);
5574 LDKPublicKey b_revocation_base_conv = *(LDKPublicKey*)b_revocation_base;
5575 free((void*)b_revocation_base);
5576 LDKPublicKey b_htlc_base_conv = *(LDKPublicKey*)b_htlc_base;
5577 free((void*)b_htlc_base);
5578 LDKCResult_TxCreationKeysSecpErrorZ* ret = malloc(sizeof(LDKCResult_TxCreationKeysSecpErrorZ));
5579 *ret = TxCreationKeys_derive_new(per_commitment_point_conv, a_delayed_payment_base_conv, a_htlc_base_conv, b_revocation_base_conv, b_htlc_base_conv);
5583 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_get_1revokeable_1redeemscript(JNIEnv * _env, jclass _b, jlong revocation_key, jshort to_self_delay, jlong delayed_payment_key) {
5584 LDKPublicKey revocation_key_conv = *(LDKPublicKey*)revocation_key;
5585 free((void*)revocation_key);
5586 LDKPublicKey delayed_payment_key_conv = *(LDKPublicKey*)delayed_payment_key;
5587 free((void*)delayed_payment_key);
5588 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5589 *ret = get_revokeable_redeemscript(revocation_key_conv, to_self_delay, delayed_payment_key_conv);
5593 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5594 LDKHTLCOutputInCommitment this_ptr_conv = *(LDKHTLCOutputInCommitment*)this_ptr;
5595 free((void*)this_ptr);
5596 this_ptr_conv._underlying_ref = false;
5597 return HTLCOutputInCommitment_free(this_ptr_conv);
5600 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1get_1offered(JNIEnv * _env, jclass _b, jlong this_ptr) {
5601 LDKHTLCOutputInCommitment* this_ptr_conv = (LDKHTLCOutputInCommitment*)this_ptr;
5602 return HTLCOutputInCommitment_get_offered(this_ptr_conv);
5605 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1set_1offered(JNIEnv * _env, jclass _b, jlong this_ptr, jboolean val) {
5606 LDKHTLCOutputInCommitment* this_ptr_conv = (LDKHTLCOutputInCommitment*)this_ptr;
5607 return HTLCOutputInCommitment_set_offered(this_ptr_conv, val);
5610 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1get_1amount_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
5611 LDKHTLCOutputInCommitment* this_ptr_conv = (LDKHTLCOutputInCommitment*)this_ptr;
5612 return HTLCOutputInCommitment_get_amount_msat(this_ptr_conv);
5615 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1set_1amount_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5616 LDKHTLCOutputInCommitment* this_ptr_conv = (LDKHTLCOutputInCommitment*)this_ptr;
5617 return HTLCOutputInCommitment_set_amount_msat(this_ptr_conv, val);
5620 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1get_1cltv_1expiry(JNIEnv * _env, jclass _b, jlong this_ptr) {
5621 LDKHTLCOutputInCommitment* this_ptr_conv = (LDKHTLCOutputInCommitment*)this_ptr;
5622 return HTLCOutputInCommitment_get_cltv_expiry(this_ptr_conv);
5625 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1set_1cltv_1expiry(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
5626 LDKHTLCOutputInCommitment* this_ptr_conv = (LDKHTLCOutputInCommitment*)this_ptr;
5627 return HTLCOutputInCommitment_set_cltv_expiry(this_ptr_conv, val);
5630 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1get_1payment_1hash(JNIEnv * _env, jclass _b, jlong this_ptr) {
5631 LDKHTLCOutputInCommitment* this_ptr_conv = (LDKHTLCOutputInCommitment*)this_ptr;
5632 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
5633 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *HTLCOutputInCommitment_get_payment_hash(this_ptr_conv));
5637 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1set_1payment_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5638 LDKHTLCOutputInCommitment* this_ptr_conv = (LDKHTLCOutputInCommitment*)this_ptr;
5639 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
5641 return HTLCOutputInCommitment_set_payment_hash(this_ptr_conv, val_conv);
5644 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1write(JNIEnv * _env, jclass _b, jlong obj) {
5645 LDKHTLCOutputInCommitment* obj_conv = (LDKHTLCOutputInCommitment*)obj;
5646 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5647 *ret = HTLCOutputInCommitment_write(obj_conv);
5651 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1read(JNIEnv * _env, jclass _b, jlong ser) {
5652 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5654 LDKHTLCOutputInCommitment* ret = malloc(sizeof(LDKHTLCOutputInCommitment));
5655 *ret = HTLCOutputInCommitment_read(ser_conv);
5656 assert(!ret->_underlying_ref);
5657 ret->_underlying_ref = true;
5661 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_get_1htlc_1redeemscript(JNIEnv * _env, jclass _b, jlong htlc, jlong keys) {
5662 LDKHTLCOutputInCommitment* htlc_conv = (LDKHTLCOutputInCommitment*)htlc;
5663 LDKTxCreationKeys* keys_conv = (LDKTxCreationKeys*)keys;
5664 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5665 *ret = get_htlc_redeemscript(htlc_conv, keys_conv);
5669 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_make_1funding_1redeemscript(JNIEnv * _env, jclass _b, jlong a, jlong b) {
5670 LDKPublicKey a_conv = *(LDKPublicKey*)a;
5672 LDKPublicKey b_conv = *(LDKPublicKey*)b;
5674 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5675 *ret = make_funding_redeemscript(a_conv, b_conv);
5679 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_build_1htlc_1transaction(JNIEnv * _env, jclass _b, jbyteArray prev_hash, jint feerate_per_kw, jshort to_self_delay, jlong htlc, jlong a_delayed_payment_key, jlong revocation_key) {
5680 unsigned char prev_hash_arr[32];
5681 (*_env)->GetByteArrayRegion (_env, prev_hash, 0, 32, prev_hash_arr);
5682 unsigned char (*prev_hash_ref)[32] = &prev_hash_arr;
5683 LDKHTLCOutputInCommitment* htlc_conv = (LDKHTLCOutputInCommitment*)htlc;
5684 LDKPublicKey a_delayed_payment_key_conv = *(LDKPublicKey*)a_delayed_payment_key;
5685 free((void*)a_delayed_payment_key);
5686 LDKPublicKey revocation_key_conv = *(LDKPublicKey*)revocation_key;
5687 free((void*)revocation_key);
5688 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5689 *ret = build_htlc_transaction(prev_hash_ref, feerate_per_kw, to_self_delay, htlc_conv, a_delayed_payment_key_conv, revocation_key_conv);
5693 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5694 LDKLocalCommitmentTransaction this_ptr_conv = *(LDKLocalCommitmentTransaction*)this_ptr;
5695 free((void*)this_ptr);
5696 this_ptr_conv._underlying_ref = false;
5697 return LocalCommitmentTransaction_free(this_ptr_conv);
5700 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1get_1unsigned_1tx(JNIEnv * _env, jclass _b, jlong this_ptr) {
5701 LDKLocalCommitmentTransaction* this_ptr_conv = (LDKLocalCommitmentTransaction*)this_ptr;
5702 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5703 *ret = LocalCommitmentTransaction_get_unsigned_tx(this_ptr_conv);
5707 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1set_1unsigned_1tx(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5708 LDKLocalCommitmentTransaction* this_ptr_conv = (LDKLocalCommitmentTransaction*)this_ptr;
5709 LDKCVec_u8Z val_conv = *(LDKCVec_u8Z*)val;
5711 return LocalCommitmentTransaction_set_unsigned_tx(this_ptr_conv, val_conv);
5714 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1get_1their_1sig(JNIEnv * _env, jclass _b, jlong this_ptr) {
5715 LDKLocalCommitmentTransaction* this_ptr_conv = (LDKLocalCommitmentTransaction*)this_ptr;
5716 LDKSignature* ret = malloc(sizeof(LDKSignature));
5717 *ret = LocalCommitmentTransaction_get_their_sig(this_ptr_conv);
5721 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1set_1their_1sig(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5722 LDKLocalCommitmentTransaction* this_ptr_conv = (LDKLocalCommitmentTransaction*)this_ptr;
5723 LDKSignature val_conv = *(LDKSignature*)val;
5725 return LocalCommitmentTransaction_set_their_sig(this_ptr_conv, val_conv);
5728 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1get_1feerate_1per_1kw(JNIEnv * _env, jclass _b, jlong this_ptr) {
5729 LDKLocalCommitmentTransaction* this_ptr_conv = (LDKLocalCommitmentTransaction*)this_ptr;
5730 return LocalCommitmentTransaction_get_feerate_per_kw(this_ptr_conv);
5733 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1set_1feerate_1per_1kw(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
5734 LDKLocalCommitmentTransaction* this_ptr_conv = (LDKLocalCommitmentTransaction*)this_ptr;
5735 return LocalCommitmentTransaction_set_feerate_per_kw(this_ptr_conv, val);
5738 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1set_1per_1htlc(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5739 LDKLocalCommitmentTransaction* this_ptr_conv = (LDKLocalCommitmentTransaction*)this_ptr;
5740 LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ val_conv = *(LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ*)val;
5742 return LocalCommitmentTransaction_set_per_htlc(this_ptr_conv, val_conv);
5745 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1new_1missing_1local_1sig(JNIEnv * _env, jclass _b, jlong unsigned_tx, jlong their_sig, jlong our_funding_key, jlong their_funding_key, jlong local_keys, jint feerate_per_kw, jlong htlc_data) {
5746 LDKCVec_u8Z unsigned_tx_conv = *(LDKCVec_u8Z*)unsigned_tx;
5747 free((void*)unsigned_tx);
5748 LDKSignature their_sig_conv = *(LDKSignature*)their_sig;
5749 free((void*)their_sig);
5750 LDKPublicKey our_funding_key_conv = *(LDKPublicKey*)our_funding_key;
5751 free((void*)our_funding_key);
5752 LDKPublicKey their_funding_key_conv = *(LDKPublicKey*)their_funding_key;
5753 free((void*)their_funding_key);
5754 LDKTxCreationKeys local_keys_conv = *(LDKTxCreationKeys*)local_keys;
5755 free((void*)local_keys);
5756 local_keys_conv._underlying_ref = false;
5757 LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ htlc_data_conv = *(LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ*)htlc_data;
5758 free((void*)htlc_data);
5759 LDKLocalCommitmentTransaction* ret = malloc(sizeof(LDKLocalCommitmentTransaction));
5760 *ret = LocalCommitmentTransaction_new_missing_local_sig(unsigned_tx_conv, their_sig_conv, our_funding_key_conv, their_funding_key_conv, local_keys_conv, feerate_per_kw, htlc_data_conv);
5761 assert(!ret->_underlying_ref);
5762 ret->_underlying_ref = true;
5766 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1trust_1key_1derivation(JNIEnv * _env, jclass _b, jlong this_arg) {
5767 LDKLocalCommitmentTransaction* this_arg_conv = (LDKLocalCommitmentTransaction*)this_arg;
5768 LDKTxCreationKeys* ret = malloc(sizeof(LDKTxCreationKeys));
5769 *ret = LocalCommitmentTransaction_trust_key_derivation(this_arg_conv);
5770 assert(!ret->_underlying_ref);
5771 ret->_underlying_ref = true;
5775 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1txid(JNIEnv * _env, jclass _b, jlong this_arg) {
5776 LDKLocalCommitmentTransaction* this_arg_conv = (LDKLocalCommitmentTransaction*)this_arg;
5777 LDKThirtyTwoBytes* ret = malloc(sizeof(LDKThirtyTwoBytes));
5778 *ret = LocalCommitmentTransaction_txid(this_arg_conv);
5782 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1get_1local_1sig(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray funding_key, jlong funding_redeemscript, jlong channel_value_satoshis) {
5783 LDKLocalCommitmentTransaction* this_arg_conv = (LDKLocalCommitmentTransaction*)this_arg;
5784 unsigned char funding_key_arr[32];
5785 (*_env)->GetByteArrayRegion (_env, funding_key, 0, 32, funding_key_arr);
5786 unsigned char (*funding_key_ref)[32] = &funding_key_arr;
5787 LDKu8slice funding_redeemscript_conv = *(LDKu8slice*)funding_redeemscript;
5788 free((void*)funding_redeemscript);
5789 LDKSignature* ret = malloc(sizeof(LDKSignature));
5790 *ret = LocalCommitmentTransaction_get_local_sig(this_arg_conv, funding_key_ref, funding_redeemscript_conv, channel_value_satoshis);
5794 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1get_1htlc_1sigs(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray htlc_base_key, jshort local_csv) {
5795 LDKLocalCommitmentTransaction* this_arg_conv = (LDKLocalCommitmentTransaction*)this_arg;
5796 unsigned char htlc_base_key_arr[32];
5797 (*_env)->GetByteArrayRegion (_env, htlc_base_key, 0, 32, htlc_base_key_arr);
5798 unsigned char (*htlc_base_key_ref)[32] = &htlc_base_key_arr;
5799 LDKCResult_CVec_SignatureZNoneZ* ret = malloc(sizeof(LDKCResult_CVec_SignatureZNoneZ));
5800 *ret = LocalCommitmentTransaction_get_htlc_sigs(this_arg_conv, htlc_base_key_ref, local_csv);
5804 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1write(JNIEnv * _env, jclass _b, jlong obj) {
5805 LDKLocalCommitmentTransaction* obj_conv = (LDKLocalCommitmentTransaction*)obj;
5806 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5807 *ret = LocalCommitmentTransaction_write(obj_conv);
5811 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1read(JNIEnv * _env, jclass _b, jlong ser) {
5812 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5814 LDKLocalCommitmentTransaction* ret = malloc(sizeof(LDKLocalCommitmentTransaction));
5815 *ret = LocalCommitmentTransaction_read(ser_conv);
5816 assert(!ret->_underlying_ref);
5817 ret->_underlying_ref = true;
5821 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InitFeatures_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5822 LDKInitFeatures this_ptr_conv = *(LDKInitFeatures*)this_ptr;
5823 free((void*)this_ptr);
5824 this_ptr_conv._underlying_ref = false;
5825 return InitFeatures_free(this_ptr_conv);
5828 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5829 LDKNodeFeatures this_ptr_conv = *(LDKNodeFeatures*)this_ptr;
5830 free((void*)this_ptr);
5831 this_ptr_conv._underlying_ref = false;
5832 return NodeFeatures_free(this_ptr_conv);
5835 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelFeatures_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5836 LDKChannelFeatures this_ptr_conv = *(LDKChannelFeatures*)this_ptr;
5837 free((void*)this_ptr);
5838 this_ptr_conv._underlying_ref = false;
5839 return ChannelFeatures_free(this_ptr_conv);
5842 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHop_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5843 LDKRouteHop this_ptr_conv = *(LDKRouteHop*)this_ptr;
5844 free((void*)this_ptr);
5845 this_ptr_conv._underlying_ref = false;
5846 return RouteHop_free(this_ptr_conv);
5849 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHop_1get_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr) {
5850 LDKRouteHop* this_ptr_conv = (LDKRouteHop*)this_ptr;
5851 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5852 *ret = RouteHop_get_pubkey(this_ptr_conv);
5856 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHop_1set_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5857 LDKRouteHop* this_ptr_conv = (LDKRouteHop*)this_ptr;
5858 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5860 return RouteHop_set_pubkey(this_ptr_conv, val_conv);
5863 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHop_1get_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
5864 LDKRouteHop* this_ptr_conv = (LDKRouteHop*)this_ptr;
5865 return RouteHop_get_short_channel_id(this_ptr_conv);
5868 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHop_1set_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5869 LDKRouteHop* this_ptr_conv = (LDKRouteHop*)this_ptr;
5870 return RouteHop_set_short_channel_id(this_ptr_conv, val);
5873 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHop_1get_1fee_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
5874 LDKRouteHop* this_ptr_conv = (LDKRouteHop*)this_ptr;
5875 return RouteHop_get_fee_msat(this_ptr_conv);
5878 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHop_1set_1fee_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5879 LDKRouteHop* this_ptr_conv = (LDKRouteHop*)this_ptr;
5880 return RouteHop_set_fee_msat(this_ptr_conv, val);
5883 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_RouteHop_1get_1cltv_1expiry_1delta(JNIEnv * _env, jclass _b, jlong this_ptr) {
5884 LDKRouteHop* this_ptr_conv = (LDKRouteHop*)this_ptr;
5885 return RouteHop_get_cltv_expiry_delta(this_ptr_conv);
5888 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHop_1set_1cltv_1expiry_1delta(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
5889 LDKRouteHop* this_ptr_conv = (LDKRouteHop*)this_ptr;
5890 return RouteHop_set_cltv_expiry_delta(this_ptr_conv, val);
5893 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Route_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5894 LDKRoute this_ptr_conv = *(LDKRoute*)this_ptr;
5895 free((void*)this_ptr);
5896 this_ptr_conv._underlying_ref = false;
5897 return Route_free(this_ptr_conv);
5900 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Route_1set_1paths(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5901 LDKRoute* this_ptr_conv = (LDKRoute*)this_ptr;
5902 LDKCVec_CVec_RouteHopZZ val_conv = *(LDKCVec_CVec_RouteHopZZ*)val;
5904 return Route_set_paths(this_ptr_conv, val_conv);
5907 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Route_1new(JNIEnv * _env, jclass _b, jlong paths_arg) {
5908 LDKCVec_CVec_RouteHopZZ paths_arg_conv = *(LDKCVec_CVec_RouteHopZZ*)paths_arg;
5909 free((void*)paths_arg);
5910 LDKRoute* ret = malloc(sizeof(LDKRoute));
5911 *ret = Route_new(paths_arg_conv);
5912 assert(!ret->_underlying_ref);
5913 ret->_underlying_ref = true;
5917 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Route_1write(JNIEnv * _env, jclass _b, jlong obj) {
5918 LDKRoute* obj_conv = (LDKRoute*)obj;
5919 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5920 *ret = Route_write(obj_conv);
5924 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Route_1read(JNIEnv * _env, jclass _b, jlong ser) {
5925 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5927 LDKRoute* ret = malloc(sizeof(LDKRoute));
5928 *ret = Route_read(ser_conv);
5929 assert(!ret->_underlying_ref);
5930 ret->_underlying_ref = true;
5934 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5935 LDKRouteHint this_ptr_conv = *(LDKRouteHint*)this_ptr;
5936 free((void*)this_ptr);
5937 this_ptr_conv._underlying_ref = false;
5938 return RouteHint_free(this_ptr_conv);
5941 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHint_1get_1src_1node_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
5942 LDKRouteHint* this_ptr_conv = (LDKRouteHint*)this_ptr;
5943 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5944 *ret = RouteHint_get_src_node_id(this_ptr_conv);
5948 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1set_1src_1node_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5949 LDKRouteHint* this_ptr_conv = (LDKRouteHint*)this_ptr;
5950 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5952 return RouteHint_set_src_node_id(this_ptr_conv, val_conv);
5955 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHint_1get_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
5956 LDKRouteHint* this_ptr_conv = (LDKRouteHint*)this_ptr;
5957 return RouteHint_get_short_channel_id(this_ptr_conv);
5960 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1set_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5961 LDKRouteHint* this_ptr_conv = (LDKRouteHint*)this_ptr;
5962 return RouteHint_set_short_channel_id(this_ptr_conv, val);
5965 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHint_1get_1fees(JNIEnv * _env, jclass _b, jlong this_ptr) {
5966 LDKRouteHint* this_ptr_conv = (LDKRouteHint*)this_ptr;
5967 LDKRoutingFees* ret = malloc(sizeof(LDKRoutingFees));
5968 *ret = RouteHint_get_fees(this_ptr_conv);
5969 assert(!ret->_underlying_ref);
5970 ret->_underlying_ref = true;
5974 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1set_1fees(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5975 LDKRouteHint* this_ptr_conv = (LDKRouteHint*)this_ptr;
5976 LDKRoutingFees val_conv = *(LDKRoutingFees*)val;
5978 val_conv._underlying_ref = false;
5979 return RouteHint_set_fees(this_ptr_conv, val_conv);
5982 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_RouteHint_1get_1cltv_1expiry_1delta(JNIEnv * _env, jclass _b, jlong this_ptr) {
5983 LDKRouteHint* this_ptr_conv = (LDKRouteHint*)this_ptr;
5984 return RouteHint_get_cltv_expiry_delta(this_ptr_conv);
5987 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1set_1cltv_1expiry_1delta(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
5988 LDKRouteHint* this_ptr_conv = (LDKRouteHint*)this_ptr;
5989 return RouteHint_set_cltv_expiry_delta(this_ptr_conv, val);
5992 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHint_1get_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
5993 LDKRouteHint* this_ptr_conv = (LDKRouteHint*)this_ptr;
5994 return RouteHint_get_htlc_minimum_msat(this_ptr_conv);
5997 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1set_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5998 LDKRouteHint* this_ptr_conv = (LDKRouteHint*)this_ptr;
5999 return RouteHint_set_htlc_minimum_msat(this_ptr_conv, val);
6002 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHint_1new(JNIEnv * _env, jclass _b, jlong src_node_id_arg, jlong short_channel_id_arg, jlong fees_arg, jshort cltv_expiry_delta_arg, jlong htlc_minimum_msat_arg) {
6003 LDKPublicKey src_node_id_arg_conv = *(LDKPublicKey*)src_node_id_arg;
6004 free((void*)src_node_id_arg);
6005 LDKRoutingFees fees_arg_conv = *(LDKRoutingFees*)fees_arg;
6006 free((void*)fees_arg);
6007 fees_arg_conv._underlying_ref = false;
6008 LDKRouteHint* ret = malloc(sizeof(LDKRouteHint));
6009 *ret = RouteHint_new(src_node_id_arg_conv, short_channel_id_arg, fees_arg_conv, cltv_expiry_delta_arg, htlc_minimum_msat_arg);
6010 assert(!ret->_underlying_ref);
6011 ret->_underlying_ref = true;
6015 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_get_1route(JNIEnv * _env, jclass _b, jlong our_node_id, jlong network, jlong target, jlong first_hops, jlong last_hops, jlong final_value_msat, jint final_cltv, jlong logger) {
6016 LDKPublicKey our_node_id_conv = *(LDKPublicKey*)our_node_id;
6017 free((void*)our_node_id);
6018 LDKNetworkGraph* network_conv = (LDKNetworkGraph*)network;
6019 LDKPublicKey target_conv = *(LDKPublicKey*)target;
6020 free((void*)target);
6021 LDKCVec_ChannelDetailsZ* first_hops_conv = (LDKCVec_ChannelDetailsZ*)first_hops;
6022 LDKCVec_RouteHintZ last_hops_conv = *(LDKCVec_RouteHintZ*)last_hops;
6023 free((void*)last_hops);
6024 LDKLogger logger_conv = *(LDKLogger*)logger;
6025 free((void*)logger);
6026 LDKCResult_RouteLightningErrorZ* ret = malloc(sizeof(LDKCResult_RouteLightningErrorZ));
6027 *ret = get_route(our_node_id_conv, network_conv, target_conv, first_hops_conv, last_hops_conv, final_value_msat, final_cltv, logger_conv);
6031 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
6032 LDKNetworkGraph this_ptr_conv = *(LDKNetworkGraph*)this_ptr;
6033 free((void*)this_ptr);
6034 this_ptr_conv._underlying_ref = false;
6035 return NetworkGraph_free(this_ptr_conv);
6038 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LockedNetworkGraph_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
6039 LDKLockedNetworkGraph this_ptr_conv = *(LDKLockedNetworkGraph*)this_ptr;
6040 free((void*)this_ptr);
6041 this_ptr_conv._underlying_ref = false;
6042 return LockedNetworkGraph_free(this_ptr_conv);
6045 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetGraphMsgHandler_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
6046 LDKNetGraphMsgHandler this_ptr_conv = *(LDKNetGraphMsgHandler*)this_ptr;
6047 free((void*)this_ptr);
6048 this_ptr_conv._underlying_ref = false;
6049 return NetGraphMsgHandler_free(this_ptr_conv);
6052 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetGraphMsgHandler_1new(JNIEnv * _env, jclass _b, jlong chain_monitor, jlong logger) {
6053 LDKChainWatchInterface chain_monitor_conv = *(LDKChainWatchInterface*)chain_monitor;
6054 free((void*)chain_monitor);
6055 LDKLogger logger_conv = *(LDKLogger*)logger;
6056 free((void*)logger);
6057 LDKNetGraphMsgHandler* ret = malloc(sizeof(LDKNetGraphMsgHandler));
6058 *ret = NetGraphMsgHandler_new(chain_monitor_conv, logger_conv);
6059 assert(!ret->_underlying_ref);
6060 ret->_underlying_ref = true;
6064 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetGraphMsgHandler_1from_1net_1graph(JNIEnv * _env, jclass _b, jlong chain_monitor, jlong logger, jlong network_graph) {
6065 LDKChainWatchInterface chain_monitor_conv = *(LDKChainWatchInterface*)chain_monitor;
6066 free((void*)chain_monitor);
6067 LDKLogger logger_conv = *(LDKLogger*)logger;
6068 free((void*)logger);
6069 LDKNetworkGraph network_graph_conv = *(LDKNetworkGraph*)network_graph;
6070 free((void*)network_graph);
6071 network_graph_conv._underlying_ref = false;
6072 LDKNetGraphMsgHandler* ret = malloc(sizeof(LDKNetGraphMsgHandler));
6073 *ret = NetGraphMsgHandler_from_net_graph(chain_monitor_conv, logger_conv, network_graph_conv);
6074 assert(!ret->_underlying_ref);
6075 ret->_underlying_ref = true;
6079 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetGraphMsgHandler_1read_1locked_1graph(JNIEnv * _env, jclass _b, jlong this_arg) {
6080 LDKNetGraphMsgHandler* this_arg_conv = (LDKNetGraphMsgHandler*)this_arg;
6081 LDKLockedNetworkGraph* ret = malloc(sizeof(LDKLockedNetworkGraph));
6082 *ret = NetGraphMsgHandler_read_locked_graph(this_arg_conv);
6083 assert(!ret->_underlying_ref);
6084 ret->_underlying_ref = true;
6088 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LockedNetworkGraph_1graph(JNIEnv * _env, jclass _b, jlong this_arg) {
6089 LDKLockedNetworkGraph* this_arg_conv = (LDKLockedNetworkGraph*)this_arg;
6090 LDKNetworkGraph* ret = malloc(sizeof(LDKNetworkGraph));
6091 *ret = LockedNetworkGraph_graph(this_arg_conv);
6092 assert(!ret->_underlying_ref);
6093 ret->_underlying_ref = true;
6097 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetGraphMsgHandler_1as_1RoutingMessageHandler(JNIEnv * _env, jclass _b, jlong this_arg) {
6098 LDKNetGraphMsgHandler* this_arg_conv = (LDKNetGraphMsgHandler*)this_arg;
6099 LDKRoutingMessageHandler* ret = malloc(sizeof(LDKRoutingMessageHandler));
6100 *ret = NetGraphMsgHandler_as_RoutingMessageHandler(this_arg_conv);
6104 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
6105 LDKDirectionalChannelInfo this_ptr_conv = *(LDKDirectionalChannelInfo*)this_ptr;
6106 free((void*)this_ptr);
6107 this_ptr_conv._underlying_ref = false;
6108 return DirectionalChannelInfo_free(this_ptr_conv);
6111 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1get_1last_1update(JNIEnv * _env, jclass _b, jlong this_ptr) {
6112 LDKDirectionalChannelInfo* this_ptr_conv = (LDKDirectionalChannelInfo*)this_ptr;
6113 return DirectionalChannelInfo_get_last_update(this_ptr_conv);
6116 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1set_1last_1update(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
6117 LDKDirectionalChannelInfo* this_ptr_conv = (LDKDirectionalChannelInfo*)this_ptr;
6118 return DirectionalChannelInfo_set_last_update(this_ptr_conv, val);
6121 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1get_1enabled(JNIEnv * _env, jclass _b, jlong this_ptr) {
6122 LDKDirectionalChannelInfo* this_ptr_conv = (LDKDirectionalChannelInfo*)this_ptr;
6123 return DirectionalChannelInfo_get_enabled(this_ptr_conv);
6126 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1set_1enabled(JNIEnv * _env, jclass _b, jlong this_ptr, jboolean val) {
6127 LDKDirectionalChannelInfo* this_ptr_conv = (LDKDirectionalChannelInfo*)this_ptr;
6128 return DirectionalChannelInfo_set_enabled(this_ptr_conv, val);
6131 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1get_1cltv_1expiry_1delta(JNIEnv * _env, jclass _b, jlong this_ptr) {
6132 LDKDirectionalChannelInfo* this_ptr_conv = (LDKDirectionalChannelInfo*)this_ptr;
6133 return DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr_conv);
6136 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1set_1cltv_1expiry_1delta(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
6137 LDKDirectionalChannelInfo* this_ptr_conv = (LDKDirectionalChannelInfo*)this_ptr;
6138 return DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr_conv, val);
6141 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1get_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
6142 LDKDirectionalChannelInfo* this_ptr_conv = (LDKDirectionalChannelInfo*)this_ptr;
6143 return DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr_conv);
6146 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1set_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6147 LDKDirectionalChannelInfo* this_ptr_conv = (LDKDirectionalChannelInfo*)this_ptr;
6148 return DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr_conv, val);
6151 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1write(JNIEnv * _env, jclass _b, jlong obj) {
6152 LDKDirectionalChannelInfo* obj_conv = (LDKDirectionalChannelInfo*)obj;
6153 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
6154 *ret = DirectionalChannelInfo_write(obj_conv);
6158 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1read(JNIEnv * _env, jclass _b, jlong ser) {
6159 LDKu8slice ser_conv = *(LDKu8slice*)ser;
6161 LDKDirectionalChannelInfo* ret = malloc(sizeof(LDKDirectionalChannelInfo));
6162 *ret = DirectionalChannelInfo_read(ser_conv);
6163 assert(!ret->_underlying_ref);
6164 ret->_underlying_ref = true;
6168 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
6169 LDKChannelInfo this_ptr_conv = *(LDKChannelInfo*)this_ptr;
6170 free((void*)this_ptr);
6171 this_ptr_conv._underlying_ref = false;
6172 return ChannelInfo_free(this_ptr_conv);
6175 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1get_1node_1one(JNIEnv * _env, jclass _b, jlong this_ptr) {
6176 LDKChannelInfo* this_ptr_conv = (LDKChannelInfo*)this_ptr;
6177 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
6178 *ret = ChannelInfo_get_node_one(this_ptr_conv);
6182 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1set_1node_1one(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6183 LDKChannelInfo* this_ptr_conv = (LDKChannelInfo*)this_ptr;
6184 LDKPublicKey val_conv = *(LDKPublicKey*)val;
6186 return ChannelInfo_set_node_one(this_ptr_conv, val_conv);
6189 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1get_1one_1to_1two(JNIEnv * _env, jclass _b, jlong this_ptr) {
6190 LDKChannelInfo* this_ptr_conv = (LDKChannelInfo*)this_ptr;
6191 LDKDirectionalChannelInfo* ret = malloc(sizeof(LDKDirectionalChannelInfo));
6192 *ret = ChannelInfo_get_one_to_two(this_ptr_conv);
6193 assert(!ret->_underlying_ref);
6194 ret->_underlying_ref = true;
6198 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1set_1one_1to_1two(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6199 LDKChannelInfo* this_ptr_conv = (LDKChannelInfo*)this_ptr;
6200 LDKDirectionalChannelInfo val_conv = *(LDKDirectionalChannelInfo*)val;
6202 val_conv._underlying_ref = false;
6203 return ChannelInfo_set_one_to_two(this_ptr_conv, val_conv);
6206 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1get_1node_1two(JNIEnv * _env, jclass _b, jlong this_ptr) {
6207 LDKChannelInfo* this_ptr_conv = (LDKChannelInfo*)this_ptr;
6208 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
6209 *ret = ChannelInfo_get_node_two(this_ptr_conv);
6213 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1set_1node_1two(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6214 LDKChannelInfo* this_ptr_conv = (LDKChannelInfo*)this_ptr;
6215 LDKPublicKey val_conv = *(LDKPublicKey*)val;
6217 return ChannelInfo_set_node_two(this_ptr_conv, val_conv);
6220 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1get_1two_1to_1one(JNIEnv * _env, jclass _b, jlong this_ptr) {
6221 LDKChannelInfo* this_ptr_conv = (LDKChannelInfo*)this_ptr;
6222 LDKDirectionalChannelInfo* ret = malloc(sizeof(LDKDirectionalChannelInfo));
6223 *ret = ChannelInfo_get_two_to_one(this_ptr_conv);
6224 assert(!ret->_underlying_ref);
6225 ret->_underlying_ref = true;
6229 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1set_1two_1to_1one(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6230 LDKChannelInfo* this_ptr_conv = (LDKChannelInfo*)this_ptr;
6231 LDKDirectionalChannelInfo val_conv = *(LDKDirectionalChannelInfo*)val;
6233 val_conv._underlying_ref = false;
6234 return ChannelInfo_set_two_to_one(this_ptr_conv, val_conv);
6237 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1write(JNIEnv * _env, jclass _b, jlong obj) {
6238 LDKChannelInfo* obj_conv = (LDKChannelInfo*)obj;
6239 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
6240 *ret = ChannelInfo_write(obj_conv);
6244 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1read(JNIEnv * _env, jclass _b, jlong ser) {
6245 LDKu8slice ser_conv = *(LDKu8slice*)ser;
6247 LDKChannelInfo* ret = malloc(sizeof(LDKChannelInfo));
6248 *ret = ChannelInfo_read(ser_conv);
6249 assert(!ret->_underlying_ref);
6250 ret->_underlying_ref = true;
6254 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingFees_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
6255 LDKRoutingFees this_ptr_conv = *(LDKRoutingFees*)this_ptr;
6256 free((void*)this_ptr);
6257 this_ptr_conv._underlying_ref = false;
6258 return RoutingFees_free(this_ptr_conv);
6261 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_RoutingFees_1get_1base_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
6262 LDKRoutingFees* this_ptr_conv = (LDKRoutingFees*)this_ptr;
6263 return RoutingFees_get_base_msat(this_ptr_conv);
6266 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingFees_1set_1base_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
6267 LDKRoutingFees* this_ptr_conv = (LDKRoutingFees*)this_ptr;
6268 return RoutingFees_set_base_msat(this_ptr_conv, val);
6271 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_RoutingFees_1get_1proportional_1millionths(JNIEnv * _env, jclass _b, jlong this_ptr) {
6272 LDKRoutingFees* this_ptr_conv = (LDKRoutingFees*)this_ptr;
6273 return RoutingFees_get_proportional_millionths(this_ptr_conv);
6276 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingFees_1set_1proportional_1millionths(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
6277 LDKRoutingFees* this_ptr_conv = (LDKRoutingFees*)this_ptr;
6278 return RoutingFees_set_proportional_millionths(this_ptr_conv, val);
6281 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingFees_1new(JNIEnv * _env, jclass _b, jint base_msat_arg, jint proportional_millionths_arg) {
6282 LDKRoutingFees* ret = malloc(sizeof(LDKRoutingFees));
6283 *ret = RoutingFees_new(base_msat_arg, proportional_millionths_arg);
6284 assert(!ret->_underlying_ref);
6285 ret->_underlying_ref = true;
6289 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingFees_1read(JNIEnv * _env, jclass _b, jlong ser) {
6290 LDKu8slice ser_conv = *(LDKu8slice*)ser;
6292 LDKRoutingFees* ret = malloc(sizeof(LDKRoutingFees));
6293 *ret = RoutingFees_read(ser_conv);
6294 assert(!ret->_underlying_ref);
6295 ret->_underlying_ref = true;
6299 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingFees_1write(JNIEnv * _env, jclass _b, jlong obj) {
6300 LDKRoutingFees* obj_conv = (LDKRoutingFees*)obj;
6301 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
6302 *ret = RoutingFees_write(obj_conv);
6306 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
6307 LDKNodeAnnouncementInfo this_ptr_conv = *(LDKNodeAnnouncementInfo*)this_ptr;
6308 free((void*)this_ptr);
6309 this_ptr_conv._underlying_ref = false;
6310 return NodeAnnouncementInfo_free(this_ptr_conv);
6313 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1get_1last_1update(JNIEnv * _env, jclass _b, jlong this_ptr) {
6314 LDKNodeAnnouncementInfo* this_ptr_conv = (LDKNodeAnnouncementInfo*)this_ptr;
6315 return NodeAnnouncementInfo_get_last_update(this_ptr_conv);
6318 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1set_1last_1update(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
6319 LDKNodeAnnouncementInfo* this_ptr_conv = (LDKNodeAnnouncementInfo*)this_ptr;
6320 return NodeAnnouncementInfo_set_last_update(this_ptr_conv, val);
6323 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1get_1rgb(JNIEnv * _env, jclass _b, jlong this_ptr) {
6324 LDKNodeAnnouncementInfo* this_ptr_conv = (LDKNodeAnnouncementInfo*)this_ptr;
6325 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 3);
6326 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 3, *NodeAnnouncementInfo_get_rgb(this_ptr_conv));
6330 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1set_1rgb(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6331 LDKNodeAnnouncementInfo* this_ptr_conv = (LDKNodeAnnouncementInfo*)this_ptr;
6332 LDKThreeBytes val_conv = *(LDKThreeBytes*)val;
6334 return NodeAnnouncementInfo_set_rgb(this_ptr_conv, val_conv);
6337 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1get_1alias(JNIEnv * _env, jclass _b, jlong this_ptr) {
6338 LDKNodeAnnouncementInfo* this_ptr_conv = (LDKNodeAnnouncementInfo*)this_ptr;
6339 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
6340 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *NodeAnnouncementInfo_get_alias(this_ptr_conv));
6344 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1set_1alias(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6345 LDKNodeAnnouncementInfo* this_ptr_conv = (LDKNodeAnnouncementInfo*)this_ptr;
6346 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
6348 return NodeAnnouncementInfo_set_alias(this_ptr_conv, val_conv);
6351 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1set_1addresses(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6352 LDKNodeAnnouncementInfo* this_ptr_conv = (LDKNodeAnnouncementInfo*)this_ptr;
6353 LDKCVec_NetAddressZ val_conv = *(LDKCVec_NetAddressZ*)val;
6355 return NodeAnnouncementInfo_set_addresses(this_ptr_conv, val_conv);
6358 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1write(JNIEnv * _env, jclass _b, jlong obj) {
6359 LDKNodeAnnouncementInfo* obj_conv = (LDKNodeAnnouncementInfo*)obj;
6360 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
6361 *ret = NodeAnnouncementInfo_write(obj_conv);
6365 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1read(JNIEnv * _env, jclass _b, jlong ser) {
6366 LDKu8slice ser_conv = *(LDKu8slice*)ser;
6368 LDKNodeAnnouncementInfo* ret = malloc(sizeof(LDKNodeAnnouncementInfo));
6369 *ret = NodeAnnouncementInfo_read(ser_conv);
6370 assert(!ret->_underlying_ref);
6371 ret->_underlying_ref = true;
6375 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeInfo_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
6376 LDKNodeInfo this_ptr_conv = *(LDKNodeInfo*)this_ptr;
6377 free((void*)this_ptr);
6378 this_ptr_conv._underlying_ref = false;
6379 return NodeInfo_free(this_ptr_conv);
6382 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeInfo_1set_1channels(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6383 LDKNodeInfo* this_ptr_conv = (LDKNodeInfo*)this_ptr;
6384 LDKCVec_u64Z val_conv = *(LDKCVec_u64Z*)val;
6386 return NodeInfo_set_channels(this_ptr_conv, val_conv);
6389 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeInfo_1get_1lowest_1inbound_1channel_1fees(JNIEnv * _env, jclass _b, jlong this_ptr) {
6390 LDKNodeInfo* this_ptr_conv = (LDKNodeInfo*)this_ptr;
6391 LDKRoutingFees* ret = malloc(sizeof(LDKRoutingFees));
6392 *ret = NodeInfo_get_lowest_inbound_channel_fees(this_ptr_conv);
6393 assert(!ret->_underlying_ref);
6394 ret->_underlying_ref = true;
6398 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeInfo_1set_1lowest_1inbound_1channel_1fees(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6399 LDKNodeInfo* this_ptr_conv = (LDKNodeInfo*)this_ptr;
6400 LDKRoutingFees val_conv = *(LDKRoutingFees*)val;
6402 val_conv._underlying_ref = false;
6403 return NodeInfo_set_lowest_inbound_channel_fees(this_ptr_conv, val_conv);
6406 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeInfo_1get_1announcement_1info(JNIEnv * _env, jclass _b, jlong this_ptr) {
6407 LDKNodeInfo* this_ptr_conv = (LDKNodeInfo*)this_ptr;
6408 LDKNodeAnnouncementInfo* ret = malloc(sizeof(LDKNodeAnnouncementInfo));
6409 *ret = NodeInfo_get_announcement_info(this_ptr_conv);
6410 assert(!ret->_underlying_ref);
6411 ret->_underlying_ref = true;
6415 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeInfo_1set_1announcement_1info(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6416 LDKNodeInfo* this_ptr_conv = (LDKNodeInfo*)this_ptr;
6417 LDKNodeAnnouncementInfo val_conv = *(LDKNodeAnnouncementInfo*)val;
6419 val_conv._underlying_ref = false;
6420 return NodeInfo_set_announcement_info(this_ptr_conv, val_conv);
6423 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeInfo_1new(JNIEnv * _env, jclass _b, jlong channels_arg, jlong lowest_inbound_channel_fees_arg, jlong announcement_info_arg) {
6424 LDKCVec_u64Z channels_arg_conv = *(LDKCVec_u64Z*)channels_arg;
6425 free((void*)channels_arg);
6426 LDKRoutingFees lowest_inbound_channel_fees_arg_conv = *(LDKRoutingFees*)lowest_inbound_channel_fees_arg;
6427 free((void*)lowest_inbound_channel_fees_arg);
6428 lowest_inbound_channel_fees_arg_conv._underlying_ref = false;
6429 LDKNodeAnnouncementInfo announcement_info_arg_conv = *(LDKNodeAnnouncementInfo*)announcement_info_arg;
6430 free((void*)announcement_info_arg);
6431 announcement_info_arg_conv._underlying_ref = false;
6432 LDKNodeInfo* ret = malloc(sizeof(LDKNodeInfo));
6433 *ret = NodeInfo_new(channels_arg_conv, lowest_inbound_channel_fees_arg_conv, announcement_info_arg_conv);
6434 assert(!ret->_underlying_ref);
6435 ret->_underlying_ref = true;
6439 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeInfo_1write(JNIEnv * _env, jclass _b, jlong obj) {
6440 LDKNodeInfo* obj_conv = (LDKNodeInfo*)obj;
6441 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
6442 *ret = NodeInfo_write(obj_conv);
6446 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeInfo_1read(JNIEnv * _env, jclass _b, jlong ser) {
6447 LDKu8slice ser_conv = *(LDKu8slice*)ser;
6449 LDKNodeInfo* ret = malloc(sizeof(LDKNodeInfo));
6450 *ret = NodeInfo_read(ser_conv);
6451 assert(!ret->_underlying_ref);
6452 ret->_underlying_ref = true;
6456 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1write(JNIEnv * _env, jclass _b, jlong obj) {
6457 LDKNetworkGraph* obj_conv = (LDKNetworkGraph*)obj;
6458 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
6459 *ret = NetworkGraph_write(obj_conv);
6463 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1read(JNIEnv * _env, jclass _b, jlong ser) {
6464 LDKu8slice ser_conv = *(LDKu8slice*)ser;
6466 LDKNetworkGraph* ret = malloc(sizeof(LDKNetworkGraph));
6467 *ret = NetworkGraph_read(ser_conv);
6468 assert(!ret->_underlying_ref);
6469 ret->_underlying_ref = true;
6473 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1new(JNIEnv * _env, jclass _b) {
6474 LDKNetworkGraph* ret = malloc(sizeof(LDKNetworkGraph));
6475 *ret = NetworkGraph_new();
6476 assert(!ret->_underlying_ref);
6477 ret->_underlying_ref = true;
6481 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1close_1channel_1from_1update(JNIEnv * _env, jclass _b, jlong this_arg, jlong short_channel_id, jboolean is_permanent) {
6482 LDKNetworkGraph* this_arg_conv = (LDKNetworkGraph*)this_arg;
6483 return NetworkGraph_close_channel_from_update(this_arg_conv, short_channel_id, is_permanent);