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 jlong get_and_clear_pending_msg_events_jcall(void* this_arg/* TODO */) {
14 LDKMessageSendEventsProvider_JCalls *arg = (LDKMessageSendEventsProvider_JCalls*) this_arg;
15 return (*arg->env)->CallLongMethod(arg->env, arg->o, arg->get_and_clear_pending_msg_events_meth);
17 void LDKMessageSendEventsProvider_JCalls_free(void* this_arg) {
18 LDKMessageSendEventsProvider_JCalls *arg = (LDKMessageSendEventsProvider_JCalls*) this_arg;
19 (*arg->env)->DeleteGlobalRef(arg->env, arg->o);
22 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKMessageSendEventsProvider_1new (JNIEnv * env, jclass _a, jobject o) {
23 jclass c = (*env)->GetObjectClass(env, o);
25 LDKMessageSendEventsProvider_JCalls *calls = malloc(sizeof(LDKMessageSendEventsProvider_JCalls));
27 calls->o = (*env)->NewGlobalRef(env, o);
28 calls->get_and_clear_pending_msg_events_meth = (*env)->GetMethodID(env, c, "get_and_clear_pending_msg_events", "TODO");
29 assert(calls->get_and_clear_pending_msg_events_meth != NULL);
31 LDKMessageSendEventsProvider *ret = malloc(sizeof(LDKMessageSendEventsProvider));
32 ret->this_arg = (void*) calls;
33 ret->get_and_clear_pending_msg_events = get_and_clear_pending_msg_events_jcall;
34 ret->free = LDKMessageSendEventsProvider_JCalls_free;
38 typedef struct LDKEventsProvider_JCalls {
41 jmethodID get_and_clear_pending_events_meth;
42 } LDKEventsProvider_JCalls;
43 jlong get_and_clear_pending_events_jcall(void* this_arg/* TODO */) {
44 LDKEventsProvider_JCalls *arg = (LDKEventsProvider_JCalls*) this_arg;
45 return (*arg->env)->CallLongMethod(arg->env, arg->o, arg->get_and_clear_pending_events_meth);
47 void LDKEventsProvider_JCalls_free(void* this_arg) {
48 LDKEventsProvider_JCalls *arg = (LDKEventsProvider_JCalls*) this_arg;
49 (*arg->env)->DeleteGlobalRef(arg->env, arg->o);
52 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKEventsProvider_1new (JNIEnv * env, jclass _a, jobject o) {
53 jclass c = (*env)->GetObjectClass(env, o);
55 LDKEventsProvider_JCalls *calls = malloc(sizeof(LDKEventsProvider_JCalls));
57 calls->o = (*env)->NewGlobalRef(env, o);
58 calls->get_and_clear_pending_events_meth = (*env)->GetMethodID(env, c, "get_and_clear_pending_events", "TODO");
59 assert(calls->get_and_clear_pending_events_meth != NULL);
61 LDKEventsProvider *ret = malloc(sizeof(LDKEventsProvider));
62 ret->this_arg = (void*) calls;
63 ret->get_and_clear_pending_events = get_and_clear_pending_events_jcall;
64 ret->free = LDKEventsProvider_JCalls_free;
68 typedef struct LDKLogger_JCalls {
73 void log_jcall(void* this_arg/* TODO */) {
74 LDKLogger_JCalls *arg = (LDKLogger_JCalls*) this_arg;
75 return (*arg->env)->CallVoidMethod(arg->env, arg->o, arg->log_meth);
77 void LDKLogger_JCalls_free(void* this_arg) {
78 LDKLogger_JCalls *arg = (LDKLogger_JCalls*) this_arg;
79 (*arg->env)->DeleteGlobalRef(arg->env, arg->o);
82 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKLogger_1new (JNIEnv * env, jclass _a, jobject o) {
83 jclass c = (*env)->GetObjectClass(env, o);
85 LDKLogger_JCalls *calls = malloc(sizeof(LDKLogger_JCalls));
87 calls->o = (*env)->NewGlobalRef(env, o);
88 calls->log_meth = (*env)->GetMethodID(env, c, "log", "TODO");
89 assert(calls->log_meth != NULL);
91 LDKLogger *ret = malloc(sizeof(LDKLogger));
92 ret->this_arg = (void*) calls;
94 ret->free = LDKLogger_JCalls_free;
98 typedef struct LDKChainWatchInterface_JCalls {
101 jmethodID install_watch_tx_meth;
102 jmethodID install_watch_outpoint_meth;
103 jmethodID watch_all_txn_meth;
104 jmethodID get_chain_utxo_meth;
105 jmethodID filter_block_meth;
106 jmethodID reentered_meth;
107 } LDKChainWatchInterface_JCalls;
108 void install_watch_tx_jcall(void* this_arg/* TODO */) {
109 LDKChainWatchInterface_JCalls *arg = (LDKChainWatchInterface_JCalls*) this_arg;
110 return (*arg->env)->CallVoidMethod(arg->env, arg->o, arg->install_watch_tx_meth);
112 void install_watch_outpoint_jcall(void* this_arg/* TODO */) {
113 LDKChainWatchInterface_JCalls *arg = (LDKChainWatchInterface_JCalls*) this_arg;
114 return (*arg->env)->CallVoidMethod(arg->env, arg->o, arg->install_watch_outpoint_meth);
116 void watch_all_txn_jcall(void* this_arg/* TODO */) {
117 LDKChainWatchInterface_JCalls *arg = (LDKChainWatchInterface_JCalls*) this_arg;
118 return (*arg->env)->CallVoidMethod(arg->env, arg->o, arg->watch_all_txn_meth);
120 jlong get_chain_utxo_jcall(void* this_arg/* TODO */) {
121 LDKChainWatchInterface_JCalls *arg = (LDKChainWatchInterface_JCalls*) this_arg;
122 return (*arg->env)->CallLongMethod(arg->env, arg->o, arg->get_chain_utxo_meth);
124 jlong filter_block_jcall(void* this_arg/* TODO */) {
125 LDKChainWatchInterface_JCalls *arg = (LDKChainWatchInterface_JCalls*) this_arg;
126 return (*arg->env)->CallLongMethod(arg->env, arg->o, arg->filter_block_meth);
128 jlong reentered_jcall(void* this_arg/* TODO */) {
129 LDKChainWatchInterface_JCalls *arg = (LDKChainWatchInterface_JCalls*) this_arg;
130 return (*arg->env)->CallLongMethod(arg->env, arg->o, arg->reentered_meth);
132 void LDKChainWatchInterface_JCalls_free(void* this_arg) {
133 LDKChainWatchInterface_JCalls *arg = (LDKChainWatchInterface_JCalls*) this_arg;
134 (*arg->env)->DeleteGlobalRef(arg->env, arg->o);
137 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKChainWatchInterface_1new (JNIEnv * env, jclass _a, jobject o) {
138 jclass c = (*env)->GetObjectClass(env, o);
140 LDKChainWatchInterface_JCalls *calls = malloc(sizeof(LDKChainWatchInterface_JCalls));
142 calls->o = (*env)->NewGlobalRef(env, o);
143 calls->install_watch_tx_meth = (*env)->GetMethodID(env, c, "install_watch_tx", "TODO");
144 assert(calls->install_watch_tx_meth != NULL);
145 calls->install_watch_outpoint_meth = (*env)->GetMethodID(env, c, "install_watch_outpoint", "TODO");
146 assert(calls->install_watch_outpoint_meth != NULL);
147 calls->watch_all_txn_meth = (*env)->GetMethodID(env, c, "watch_all_txn", "TODO");
148 assert(calls->watch_all_txn_meth != NULL);
149 calls->get_chain_utxo_meth = (*env)->GetMethodID(env, c, "get_chain_utxo", "TODO");
150 assert(calls->get_chain_utxo_meth != NULL);
151 calls->filter_block_meth = (*env)->GetMethodID(env, c, "filter_block", "TODO");
152 assert(calls->filter_block_meth != NULL);
153 calls->reentered_meth = (*env)->GetMethodID(env, c, "reentered", "TODO");
154 assert(calls->reentered_meth != NULL);
156 LDKChainWatchInterface *ret = malloc(sizeof(LDKChainWatchInterface));
157 ret->this_arg = (void*) calls;
158 ret->install_watch_tx = install_watch_tx_jcall;
159 ret->install_watch_outpoint = install_watch_outpoint_jcall;
160 ret->watch_all_txn = watch_all_txn_jcall;
161 ret->get_chain_utxo = get_chain_utxo_jcall;
162 ret->filter_block = filter_block_jcall;
163 ret->reentered = reentered_jcall;
164 ret->free = LDKChainWatchInterface_JCalls_free;
168 typedef struct LDKBroadcasterInterface_JCalls {
171 jmethodID broadcast_transaction_meth;
172 } LDKBroadcasterInterface_JCalls;
173 void broadcast_transaction_jcall(void* this_arg/* TODO */) {
174 LDKBroadcasterInterface_JCalls *arg = (LDKBroadcasterInterface_JCalls*) this_arg;
175 return (*arg->env)->CallVoidMethod(arg->env, arg->o, arg->broadcast_transaction_meth);
177 void LDKBroadcasterInterface_JCalls_free(void* this_arg) {
178 LDKBroadcasterInterface_JCalls *arg = (LDKBroadcasterInterface_JCalls*) this_arg;
179 (*arg->env)->DeleteGlobalRef(arg->env, arg->o);
182 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKBroadcasterInterface_1new (JNIEnv * env, jclass _a, jobject o) {
183 jclass c = (*env)->GetObjectClass(env, o);
185 LDKBroadcasterInterface_JCalls *calls = malloc(sizeof(LDKBroadcasterInterface_JCalls));
187 calls->o = (*env)->NewGlobalRef(env, o);
188 calls->broadcast_transaction_meth = (*env)->GetMethodID(env, c, "broadcast_transaction", "TODO");
189 assert(calls->broadcast_transaction_meth != NULL);
191 LDKBroadcasterInterface *ret = malloc(sizeof(LDKBroadcasterInterface));
192 ret->this_arg = (void*) calls;
193 ret->broadcast_transaction = broadcast_transaction_jcall;
194 ret->free = LDKBroadcasterInterface_JCalls_free;
198 typedef struct LDKChainListener_JCalls {
201 jmethodID block_connected_meth;
202 jmethodID block_disconnected_meth;
203 } LDKChainListener_JCalls;
204 void block_connected_jcall(void* this_arg/* TODO */) {
205 LDKChainListener_JCalls *arg = (LDKChainListener_JCalls*) this_arg;
206 return (*arg->env)->CallVoidMethod(arg->env, arg->o, arg->block_connected_meth);
208 void block_disconnected_jcall(void* this_arg/* TODO */) {
209 LDKChainListener_JCalls *arg = (LDKChainListener_JCalls*) this_arg;
210 return (*arg->env)->CallVoidMethod(arg->env, arg->o, arg->block_disconnected_meth);
212 void LDKChainListener_JCalls_free(void* this_arg) {
213 LDKChainListener_JCalls *arg = (LDKChainListener_JCalls*) this_arg;
214 (*arg->env)->DeleteGlobalRef(arg->env, arg->o);
217 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKChainListener_1new (JNIEnv * env, jclass _a, jobject o) {
218 jclass c = (*env)->GetObjectClass(env, o);
220 LDKChainListener_JCalls *calls = malloc(sizeof(LDKChainListener_JCalls));
222 calls->o = (*env)->NewGlobalRef(env, o);
223 calls->block_connected_meth = (*env)->GetMethodID(env, c, "block_connected", "TODO");
224 assert(calls->block_connected_meth != NULL);
225 calls->block_disconnected_meth = (*env)->GetMethodID(env, c, "block_disconnected", "TODO");
226 assert(calls->block_disconnected_meth != NULL);
228 LDKChainListener *ret = malloc(sizeof(LDKChainListener));
229 ret->this_arg = (void*) calls;
230 ret->block_connected = block_connected_jcall;
231 ret->block_disconnected = block_disconnected_jcall;
232 ret->free = LDKChainListener_JCalls_free;
236 typedef struct LDKFeeEstimator_JCalls {
239 jmethodID get_est_sat_per_1000_weight_meth;
240 } LDKFeeEstimator_JCalls;
241 jint get_est_sat_per_1000_weight_jcall(void* this_arg/* TODO */) {
242 LDKFeeEstimator_JCalls *arg = (LDKFeeEstimator_JCalls*) this_arg;
243 return (*arg->env)->CallIntMethod(arg->env, arg->o, arg->get_est_sat_per_1000_weight_meth);
245 void LDKFeeEstimator_JCalls_free(void* this_arg) {
246 LDKFeeEstimator_JCalls *arg = (LDKFeeEstimator_JCalls*) this_arg;
247 (*arg->env)->DeleteGlobalRef(arg->env, arg->o);
250 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKFeeEstimator_1new (JNIEnv * env, jclass _a, jobject o) {
251 jclass c = (*env)->GetObjectClass(env, o);
253 LDKFeeEstimator_JCalls *calls = malloc(sizeof(LDKFeeEstimator_JCalls));
255 calls->o = (*env)->NewGlobalRef(env, o);
256 calls->get_est_sat_per_1000_weight_meth = (*env)->GetMethodID(env, c, "get_est_sat_per_1000_weight", "TODO");
257 assert(calls->get_est_sat_per_1000_weight_meth != NULL);
259 LDKFeeEstimator *ret = malloc(sizeof(LDKFeeEstimator));
260 ret->this_arg = (void*) calls;
261 ret->get_est_sat_per_1000_weight = get_est_sat_per_1000_weight_jcall;
262 ret->free = LDKFeeEstimator_JCalls_free;
266 typedef struct LDKChannelKeys_JCalls {
269 jmethodID get_per_commitment_point_meth;
270 jmethodID release_commitment_secret_meth;
271 jmethodID key_derivation_params_meth;
272 jmethodID sign_remote_commitment_meth;
273 jmethodID sign_local_commitment_meth;
274 jmethodID sign_local_commitment_htlc_transactions_meth;
275 jmethodID sign_justice_transaction_meth;
276 jmethodID sign_remote_htlc_transaction_meth;
277 jmethodID sign_closing_transaction_meth;
278 jmethodID sign_channel_announcement_meth;
279 jmethodID on_accept_meth;
280 } LDKChannelKeys_JCalls;
281 jlong get_per_commitment_point_jcall(void* this_arg/* TODO */) {
282 LDKChannelKeys_JCalls *arg = (LDKChannelKeys_JCalls*) this_arg;
283 return (*arg->env)->CallLongMethod(arg->env, arg->o, arg->get_per_commitment_point_meth);
285 jlong release_commitment_secret_jcall(void* this_arg/* TODO */) {
286 LDKChannelKeys_JCalls *arg = (LDKChannelKeys_JCalls*) this_arg;
287 return (*arg->env)->CallLongMethod(arg->env, arg->o, arg->release_commitment_secret_meth);
289 jlong key_derivation_params_jcall(void* this_arg/* TODO */) {
290 LDKChannelKeys_JCalls *arg = (LDKChannelKeys_JCalls*) this_arg;
291 return (*arg->env)->CallLongMethod(arg->env, arg->o, arg->key_derivation_params_meth);
293 jlong sign_remote_commitment_jcall(void* this_arg/* TODO */) {
294 LDKChannelKeys_JCalls *arg = (LDKChannelKeys_JCalls*) this_arg;
295 return (*arg->env)->CallLongMethod(arg->env, arg->o, arg->sign_remote_commitment_meth);
297 jlong sign_local_commitment_jcall(void* this_arg/* TODO */) {
298 LDKChannelKeys_JCalls *arg = (LDKChannelKeys_JCalls*) this_arg;
299 return (*arg->env)->CallLongMethod(arg->env, arg->o, arg->sign_local_commitment_meth);
301 jlong sign_local_commitment_htlc_transactions_jcall(void* this_arg/* TODO */) {
302 LDKChannelKeys_JCalls *arg = (LDKChannelKeys_JCalls*) this_arg;
303 return (*arg->env)->CallLongMethod(arg->env, arg->o, arg->sign_local_commitment_htlc_transactions_meth);
305 jlong sign_justice_transaction_jcall(void* this_arg/* TODO */) {
306 LDKChannelKeys_JCalls *arg = (LDKChannelKeys_JCalls*) this_arg;
307 return (*arg->env)->CallLongMethod(arg->env, arg->o, arg->sign_justice_transaction_meth);
309 jlong sign_remote_htlc_transaction_jcall(void* this_arg/* TODO */) {
310 LDKChannelKeys_JCalls *arg = (LDKChannelKeys_JCalls*) this_arg;
311 return (*arg->env)->CallLongMethod(arg->env, arg->o, arg->sign_remote_htlc_transaction_meth);
313 jlong sign_closing_transaction_jcall(void* this_arg/* TODO */) {
314 LDKChannelKeys_JCalls *arg = (LDKChannelKeys_JCalls*) this_arg;
315 return (*arg->env)->CallLongMethod(arg->env, arg->o, arg->sign_closing_transaction_meth);
317 jlong sign_channel_announcement_jcall(void* this_arg/* TODO */) {
318 LDKChannelKeys_JCalls *arg = (LDKChannelKeys_JCalls*) this_arg;
319 return (*arg->env)->CallLongMethod(arg->env, arg->o, arg->sign_channel_announcement_meth);
321 void on_accept_jcall(void* this_arg/* TODO */) {
322 LDKChannelKeys_JCalls *arg = (LDKChannelKeys_JCalls*) this_arg;
323 return (*arg->env)->CallVoidMethod(arg->env, arg->o, arg->on_accept_meth);
325 void* LDKChannelKeys_JCalls_clone(void* this_arg) {
326 LDKChannelKeys_JCalls *ret = malloc(sizeof(LDKChannelKeys_JCalls));
327 memcpy(ret, this_arg, sizeof(LDKChannelKeys_JCalls));
330 void LDKChannelKeys_JCalls_free(void* this_arg) {
331 LDKChannelKeys_JCalls *arg = (LDKChannelKeys_JCalls*) this_arg;
332 (*arg->env)->DeleteGlobalRef(arg->env, arg->o);
335 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKChannelKeys_1new (JNIEnv * env, jclass _a, jobject o) {
336 jclass c = (*env)->GetObjectClass(env, o);
338 LDKChannelKeys_JCalls *calls = malloc(sizeof(LDKChannelKeys_JCalls));
340 calls->o = (*env)->NewGlobalRef(env, o);
341 calls->get_per_commitment_point_meth = (*env)->GetMethodID(env, c, "get_per_commitment_point", "TODO");
342 assert(calls->get_per_commitment_point_meth != NULL);
343 calls->release_commitment_secret_meth = (*env)->GetMethodID(env, c, "release_commitment_secret", "TODO");
344 assert(calls->release_commitment_secret_meth != NULL);
345 calls->key_derivation_params_meth = (*env)->GetMethodID(env, c, "key_derivation_params", "TODO");
346 assert(calls->key_derivation_params_meth != NULL);
347 calls->sign_remote_commitment_meth = (*env)->GetMethodID(env, c, "sign_remote_commitment", "TODO");
348 assert(calls->sign_remote_commitment_meth != NULL);
349 calls->sign_local_commitment_meth = (*env)->GetMethodID(env, c, "sign_local_commitment", "TODO");
350 assert(calls->sign_local_commitment_meth != NULL);
351 calls->sign_local_commitment_htlc_transactions_meth = (*env)->GetMethodID(env, c, "sign_local_commitment_htlc_transactions", "TODO");
352 assert(calls->sign_local_commitment_htlc_transactions_meth != NULL);
353 calls->sign_justice_transaction_meth = (*env)->GetMethodID(env, c, "sign_justice_transaction", "TODO");
354 assert(calls->sign_justice_transaction_meth != NULL);
355 calls->sign_remote_htlc_transaction_meth = (*env)->GetMethodID(env, c, "sign_remote_htlc_transaction", "TODO");
356 assert(calls->sign_remote_htlc_transaction_meth != NULL);
357 calls->sign_closing_transaction_meth = (*env)->GetMethodID(env, c, "sign_closing_transaction", "TODO");
358 assert(calls->sign_closing_transaction_meth != NULL);
359 calls->sign_channel_announcement_meth = (*env)->GetMethodID(env, c, "sign_channel_announcement", "TODO");
360 assert(calls->sign_channel_announcement_meth != NULL);
361 calls->on_accept_meth = (*env)->GetMethodID(env, c, "on_accept", "TODO");
362 assert(calls->on_accept_meth != NULL);
364 LDKChannelKeys *ret = malloc(sizeof(LDKChannelKeys));
365 ret->this_arg = (void*) calls;
366 ret->get_per_commitment_point = get_per_commitment_point_jcall;
367 ret->release_commitment_secret = release_commitment_secret_jcall;
368 ret->key_derivation_params = key_derivation_params_jcall;
369 ret->sign_remote_commitment = sign_remote_commitment_jcall;
370 ret->sign_local_commitment = sign_local_commitment_jcall;
371 ret->sign_local_commitment_htlc_transactions = sign_local_commitment_htlc_transactions_jcall;
372 ret->sign_justice_transaction = sign_justice_transaction_jcall;
373 ret->sign_remote_htlc_transaction = sign_remote_htlc_transaction_jcall;
374 ret->sign_closing_transaction = sign_closing_transaction_jcall;
375 ret->sign_channel_announcement = sign_channel_announcement_jcall;
376 ret->on_accept = on_accept_jcall;
377 ret->clone = LDKChannelKeys_JCalls_clone;
378 ret->free = LDKChannelKeys_JCalls_free;
382 typedef struct LDKKeysInterface_JCalls {
385 jmethodID get_node_secret_meth;
386 jmethodID get_destination_script_meth;
387 jmethodID get_shutdown_pubkey_meth;
388 jmethodID get_channel_keys_meth;
389 jmethodID get_secure_random_bytes_meth;
390 } LDKKeysInterface_JCalls;
391 jlong get_node_secret_jcall(void* this_arg/* TODO */) {
392 LDKKeysInterface_JCalls *arg = (LDKKeysInterface_JCalls*) this_arg;
393 return (*arg->env)->CallLongMethod(arg->env, arg->o, arg->get_node_secret_meth);
395 jlong get_destination_script_jcall(void* this_arg/* TODO */) {
396 LDKKeysInterface_JCalls *arg = (LDKKeysInterface_JCalls*) this_arg;
397 return (*arg->env)->CallLongMethod(arg->env, arg->o, arg->get_destination_script_meth);
399 jlong get_shutdown_pubkey_jcall(void* this_arg/* TODO */) {
400 LDKKeysInterface_JCalls *arg = (LDKKeysInterface_JCalls*) this_arg;
401 return (*arg->env)->CallLongMethod(arg->env, arg->o, arg->get_shutdown_pubkey_meth);
403 jlong get_channel_keys_jcall(void* this_arg/* TODO */) {
404 LDKKeysInterface_JCalls *arg = (LDKKeysInterface_JCalls*) this_arg;
405 return (*arg->env)->CallLongMethod(arg->env, arg->o, arg->get_channel_keys_meth);
407 jlong get_secure_random_bytes_jcall(void* this_arg/* TODO */) {
408 LDKKeysInterface_JCalls *arg = (LDKKeysInterface_JCalls*) this_arg;
409 return (*arg->env)->CallLongMethod(arg->env, arg->o, arg->get_secure_random_bytes_meth);
411 void LDKKeysInterface_JCalls_free(void* this_arg) {
412 LDKKeysInterface_JCalls *arg = (LDKKeysInterface_JCalls*) this_arg;
413 (*arg->env)->DeleteGlobalRef(arg->env, arg->o);
416 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKKeysInterface_1new (JNIEnv * env, jclass _a, jobject o) {
417 jclass c = (*env)->GetObjectClass(env, o);
419 LDKKeysInterface_JCalls *calls = malloc(sizeof(LDKKeysInterface_JCalls));
421 calls->o = (*env)->NewGlobalRef(env, o);
422 calls->get_node_secret_meth = (*env)->GetMethodID(env, c, "get_node_secret", "TODO");
423 assert(calls->get_node_secret_meth != NULL);
424 calls->get_destination_script_meth = (*env)->GetMethodID(env, c, "get_destination_script", "TODO");
425 assert(calls->get_destination_script_meth != NULL);
426 calls->get_shutdown_pubkey_meth = (*env)->GetMethodID(env, c, "get_shutdown_pubkey", "TODO");
427 assert(calls->get_shutdown_pubkey_meth != NULL);
428 calls->get_channel_keys_meth = (*env)->GetMethodID(env, c, "get_channel_keys", "TODO");
429 assert(calls->get_channel_keys_meth != NULL);
430 calls->get_secure_random_bytes_meth = (*env)->GetMethodID(env, c, "get_secure_random_bytes", "TODO");
431 assert(calls->get_secure_random_bytes_meth != NULL);
433 LDKKeysInterface *ret = malloc(sizeof(LDKKeysInterface));
434 ret->this_arg = (void*) calls;
435 ret->get_node_secret = get_node_secret_jcall;
436 ret->get_destination_script = get_destination_script_jcall;
437 ret->get_shutdown_pubkey = get_shutdown_pubkey_jcall;
438 ret->get_channel_keys = get_channel_keys_jcall;
439 ret->get_secure_random_bytes = get_secure_random_bytes_jcall;
440 ret->free = LDKKeysInterface_JCalls_free;
444 typedef struct LDKManyChannelMonitor_JCalls {
447 jmethodID add_monitor_meth;
448 jmethodID update_monitor_meth;
449 jmethodID get_and_clear_pending_monitor_events_meth;
450 } LDKManyChannelMonitor_JCalls;
451 jlong add_monitor_jcall(void* this_arg/* TODO */) {
452 LDKManyChannelMonitor_JCalls *arg = (LDKManyChannelMonitor_JCalls*) this_arg;
453 return (*arg->env)->CallLongMethod(arg->env, arg->o, arg->add_monitor_meth);
455 jlong update_monitor_jcall(void* this_arg/* TODO */) {
456 LDKManyChannelMonitor_JCalls *arg = (LDKManyChannelMonitor_JCalls*) this_arg;
457 return (*arg->env)->CallLongMethod(arg->env, arg->o, arg->update_monitor_meth);
459 jlong get_and_clear_pending_monitor_events_jcall(void* this_arg/* TODO */) {
460 LDKManyChannelMonitor_JCalls *arg = (LDKManyChannelMonitor_JCalls*) this_arg;
461 return (*arg->env)->CallLongMethod(arg->env, arg->o, arg->get_and_clear_pending_monitor_events_meth);
463 void LDKManyChannelMonitor_JCalls_free(void* this_arg) {
464 LDKManyChannelMonitor_JCalls *arg = (LDKManyChannelMonitor_JCalls*) this_arg;
465 (*arg->env)->DeleteGlobalRef(arg->env, arg->o);
468 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKManyChannelMonitor_1new (JNIEnv * env, jclass _a, jobject o) {
469 jclass c = (*env)->GetObjectClass(env, o);
471 LDKManyChannelMonitor_JCalls *calls = malloc(sizeof(LDKManyChannelMonitor_JCalls));
473 calls->o = (*env)->NewGlobalRef(env, o);
474 calls->add_monitor_meth = (*env)->GetMethodID(env, c, "add_monitor", "TODO");
475 assert(calls->add_monitor_meth != NULL);
476 calls->update_monitor_meth = (*env)->GetMethodID(env, c, "update_monitor", "TODO");
477 assert(calls->update_monitor_meth != NULL);
478 calls->get_and_clear_pending_monitor_events_meth = (*env)->GetMethodID(env, c, "get_and_clear_pending_monitor_events", "TODO");
479 assert(calls->get_and_clear_pending_monitor_events_meth != NULL);
481 LDKManyChannelMonitor *ret = malloc(sizeof(LDKManyChannelMonitor));
482 ret->this_arg = (void*) calls;
483 ret->add_monitor = add_monitor_jcall;
484 ret->update_monitor = update_monitor_jcall;
485 ret->get_and_clear_pending_monitor_events = get_and_clear_pending_monitor_events_jcall;
486 ret->free = LDKManyChannelMonitor_JCalls_free;
490 typedef struct LDKChannelMessageHandler_JCalls {
493 jmethodID handle_open_channel_meth;
494 jmethodID handle_accept_channel_meth;
495 jmethodID handle_funding_created_meth;
496 jmethodID handle_funding_signed_meth;
497 jmethodID handle_funding_locked_meth;
498 jmethodID handle_shutdown_meth;
499 jmethodID handle_closing_signed_meth;
500 jmethodID handle_update_add_htlc_meth;
501 jmethodID handle_update_fulfill_htlc_meth;
502 jmethodID handle_update_fail_htlc_meth;
503 jmethodID handle_update_fail_malformed_htlc_meth;
504 jmethodID handle_commitment_signed_meth;
505 jmethodID handle_revoke_and_ack_meth;
506 jmethodID handle_update_fee_meth;
507 jmethodID handle_announcement_signatures_meth;
508 jmethodID peer_disconnected_meth;
509 jmethodID peer_connected_meth;
510 jmethodID handle_channel_reestablish_meth;
511 jmethodID handle_error_meth;
512 } LDKChannelMessageHandler_JCalls;
513 void handle_open_channel_jcall(void* this_arg/* TODO */) {
514 LDKChannelMessageHandler_JCalls *arg = (LDKChannelMessageHandler_JCalls*) this_arg;
515 return (*arg->env)->CallVoidMethod(arg->env, arg->o, arg->handle_open_channel_meth);
517 void handle_accept_channel_jcall(void* this_arg/* TODO */) {
518 LDKChannelMessageHandler_JCalls *arg = (LDKChannelMessageHandler_JCalls*) this_arg;
519 return (*arg->env)->CallVoidMethod(arg->env, arg->o, arg->handle_accept_channel_meth);
521 void handle_funding_created_jcall(void* this_arg/* TODO */) {
522 LDKChannelMessageHandler_JCalls *arg = (LDKChannelMessageHandler_JCalls*) this_arg;
523 return (*arg->env)->CallVoidMethod(arg->env, arg->o, arg->handle_funding_created_meth);
525 void handle_funding_signed_jcall(void* this_arg/* TODO */) {
526 LDKChannelMessageHandler_JCalls *arg = (LDKChannelMessageHandler_JCalls*) this_arg;
527 return (*arg->env)->CallVoidMethod(arg->env, arg->o, arg->handle_funding_signed_meth);
529 void handle_funding_locked_jcall(void* this_arg/* TODO */) {
530 LDKChannelMessageHandler_JCalls *arg = (LDKChannelMessageHandler_JCalls*) this_arg;
531 return (*arg->env)->CallVoidMethod(arg->env, arg->o, arg->handle_funding_locked_meth);
533 void handle_shutdown_jcall(void* this_arg/* TODO */) {
534 LDKChannelMessageHandler_JCalls *arg = (LDKChannelMessageHandler_JCalls*) this_arg;
535 return (*arg->env)->CallVoidMethod(arg->env, arg->o, arg->handle_shutdown_meth);
537 void handle_closing_signed_jcall(void* this_arg/* TODO */) {
538 LDKChannelMessageHandler_JCalls *arg = (LDKChannelMessageHandler_JCalls*) this_arg;
539 return (*arg->env)->CallVoidMethod(arg->env, arg->o, arg->handle_closing_signed_meth);
541 void handle_update_add_htlc_jcall(void* this_arg/* TODO */) {
542 LDKChannelMessageHandler_JCalls *arg = (LDKChannelMessageHandler_JCalls*) this_arg;
543 return (*arg->env)->CallVoidMethod(arg->env, arg->o, arg->handle_update_add_htlc_meth);
545 void handle_update_fulfill_htlc_jcall(void* this_arg/* TODO */) {
546 LDKChannelMessageHandler_JCalls *arg = (LDKChannelMessageHandler_JCalls*) this_arg;
547 return (*arg->env)->CallVoidMethod(arg->env, arg->o, arg->handle_update_fulfill_htlc_meth);
549 void handle_update_fail_htlc_jcall(void* this_arg/* TODO */) {
550 LDKChannelMessageHandler_JCalls *arg = (LDKChannelMessageHandler_JCalls*) this_arg;
551 return (*arg->env)->CallVoidMethod(arg->env, arg->o, arg->handle_update_fail_htlc_meth);
553 void handle_update_fail_malformed_htlc_jcall(void* this_arg/* TODO */) {
554 LDKChannelMessageHandler_JCalls *arg = (LDKChannelMessageHandler_JCalls*) this_arg;
555 return (*arg->env)->CallVoidMethod(arg->env, arg->o, arg->handle_update_fail_malformed_htlc_meth);
557 void handle_commitment_signed_jcall(void* this_arg/* TODO */) {
558 LDKChannelMessageHandler_JCalls *arg = (LDKChannelMessageHandler_JCalls*) this_arg;
559 return (*arg->env)->CallVoidMethod(arg->env, arg->o, arg->handle_commitment_signed_meth);
561 void handle_revoke_and_ack_jcall(void* this_arg/* TODO */) {
562 LDKChannelMessageHandler_JCalls *arg = (LDKChannelMessageHandler_JCalls*) this_arg;
563 return (*arg->env)->CallVoidMethod(arg->env, arg->o, arg->handle_revoke_and_ack_meth);
565 void handle_update_fee_jcall(void* this_arg/* TODO */) {
566 LDKChannelMessageHandler_JCalls *arg = (LDKChannelMessageHandler_JCalls*) this_arg;
567 return (*arg->env)->CallVoidMethod(arg->env, arg->o, arg->handle_update_fee_meth);
569 void handle_announcement_signatures_jcall(void* this_arg/* TODO */) {
570 LDKChannelMessageHandler_JCalls *arg = (LDKChannelMessageHandler_JCalls*) this_arg;
571 return (*arg->env)->CallVoidMethod(arg->env, arg->o, arg->handle_announcement_signatures_meth);
573 void peer_disconnected_jcall(void* this_arg/* TODO */) {
574 LDKChannelMessageHandler_JCalls *arg = (LDKChannelMessageHandler_JCalls*) this_arg;
575 return (*arg->env)->CallVoidMethod(arg->env, arg->o, arg->peer_disconnected_meth);
577 void peer_connected_jcall(void* this_arg/* TODO */) {
578 LDKChannelMessageHandler_JCalls *arg = (LDKChannelMessageHandler_JCalls*) this_arg;
579 return (*arg->env)->CallVoidMethod(arg->env, arg->o, arg->peer_connected_meth);
581 void handle_channel_reestablish_jcall(void* this_arg/* TODO */) {
582 LDKChannelMessageHandler_JCalls *arg = (LDKChannelMessageHandler_JCalls*) this_arg;
583 return (*arg->env)->CallVoidMethod(arg->env, arg->o, arg->handle_channel_reestablish_meth);
585 void handle_error_jcall(void* this_arg/* TODO */) {
586 LDKChannelMessageHandler_JCalls *arg = (LDKChannelMessageHandler_JCalls*) this_arg;
587 return (*arg->env)->CallVoidMethod(arg->env, arg->o, arg->handle_error_meth);
589 void LDKChannelMessageHandler_JCalls_free(void* this_arg) {
590 LDKChannelMessageHandler_JCalls *arg = (LDKChannelMessageHandler_JCalls*) this_arg;
591 (*arg->env)->DeleteGlobalRef(arg->env, arg->o);
594 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKChannelMessageHandler_1new (JNIEnv * env, jclass _a, jobject o) {
595 jclass c = (*env)->GetObjectClass(env, o);
597 LDKChannelMessageHandler_JCalls *calls = malloc(sizeof(LDKChannelMessageHandler_JCalls));
599 calls->o = (*env)->NewGlobalRef(env, o);
600 calls->handle_open_channel_meth = (*env)->GetMethodID(env, c, "handle_open_channel", "TODO");
601 assert(calls->handle_open_channel_meth != NULL);
602 calls->handle_accept_channel_meth = (*env)->GetMethodID(env, c, "handle_accept_channel", "TODO");
603 assert(calls->handle_accept_channel_meth != NULL);
604 calls->handle_funding_created_meth = (*env)->GetMethodID(env, c, "handle_funding_created", "TODO");
605 assert(calls->handle_funding_created_meth != NULL);
606 calls->handle_funding_signed_meth = (*env)->GetMethodID(env, c, "handle_funding_signed", "TODO");
607 assert(calls->handle_funding_signed_meth != NULL);
608 calls->handle_funding_locked_meth = (*env)->GetMethodID(env, c, "handle_funding_locked", "TODO");
609 assert(calls->handle_funding_locked_meth != NULL);
610 calls->handle_shutdown_meth = (*env)->GetMethodID(env, c, "handle_shutdown", "TODO");
611 assert(calls->handle_shutdown_meth != NULL);
612 calls->handle_closing_signed_meth = (*env)->GetMethodID(env, c, "handle_closing_signed", "TODO");
613 assert(calls->handle_closing_signed_meth != NULL);
614 calls->handle_update_add_htlc_meth = (*env)->GetMethodID(env, c, "handle_update_add_htlc", "TODO");
615 assert(calls->handle_update_add_htlc_meth != NULL);
616 calls->handle_update_fulfill_htlc_meth = (*env)->GetMethodID(env, c, "handle_update_fulfill_htlc", "TODO");
617 assert(calls->handle_update_fulfill_htlc_meth != NULL);
618 calls->handle_update_fail_htlc_meth = (*env)->GetMethodID(env, c, "handle_update_fail_htlc", "TODO");
619 assert(calls->handle_update_fail_htlc_meth != NULL);
620 calls->handle_update_fail_malformed_htlc_meth = (*env)->GetMethodID(env, c, "handle_update_fail_malformed_htlc", "TODO");
621 assert(calls->handle_update_fail_malformed_htlc_meth != NULL);
622 calls->handle_commitment_signed_meth = (*env)->GetMethodID(env, c, "handle_commitment_signed", "TODO");
623 assert(calls->handle_commitment_signed_meth != NULL);
624 calls->handle_revoke_and_ack_meth = (*env)->GetMethodID(env, c, "handle_revoke_and_ack", "TODO");
625 assert(calls->handle_revoke_and_ack_meth != NULL);
626 calls->handle_update_fee_meth = (*env)->GetMethodID(env, c, "handle_update_fee", "TODO");
627 assert(calls->handle_update_fee_meth != NULL);
628 calls->handle_announcement_signatures_meth = (*env)->GetMethodID(env, c, "handle_announcement_signatures", "TODO");
629 assert(calls->handle_announcement_signatures_meth != NULL);
630 calls->peer_disconnected_meth = (*env)->GetMethodID(env, c, "peer_disconnected", "TODO");
631 assert(calls->peer_disconnected_meth != NULL);
632 calls->peer_connected_meth = (*env)->GetMethodID(env, c, "peer_connected", "TODO");
633 assert(calls->peer_connected_meth != NULL);
634 calls->handle_channel_reestablish_meth = (*env)->GetMethodID(env, c, "handle_channel_reestablish", "TODO");
635 assert(calls->handle_channel_reestablish_meth != NULL);
636 calls->handle_error_meth = (*env)->GetMethodID(env, c, "handle_error", "TODO");
637 assert(calls->handle_error_meth != NULL);
639 LDKChannelMessageHandler *ret = malloc(sizeof(LDKChannelMessageHandler));
640 ret->this_arg = (void*) calls;
641 ret->handle_open_channel = handle_open_channel_jcall;
642 ret->handle_accept_channel = handle_accept_channel_jcall;
643 ret->handle_funding_created = handle_funding_created_jcall;
644 ret->handle_funding_signed = handle_funding_signed_jcall;
645 ret->handle_funding_locked = handle_funding_locked_jcall;
646 ret->handle_shutdown = handle_shutdown_jcall;
647 ret->handle_closing_signed = handle_closing_signed_jcall;
648 ret->handle_update_add_htlc = handle_update_add_htlc_jcall;
649 ret->handle_update_fulfill_htlc = handle_update_fulfill_htlc_jcall;
650 ret->handle_update_fail_htlc = handle_update_fail_htlc_jcall;
651 ret->handle_update_fail_malformed_htlc = handle_update_fail_malformed_htlc_jcall;
652 ret->handle_commitment_signed = handle_commitment_signed_jcall;
653 ret->handle_revoke_and_ack = handle_revoke_and_ack_jcall;
654 ret->handle_update_fee = handle_update_fee_jcall;
655 ret->handle_announcement_signatures = handle_announcement_signatures_jcall;
656 ret->peer_disconnected = peer_disconnected_jcall;
657 ret->peer_connected = peer_connected_jcall;
658 ret->handle_channel_reestablish = handle_channel_reestablish_jcall;
659 ret->handle_error = handle_error_jcall;
660 ret->free = LDKChannelMessageHandler_JCalls_free;
664 typedef struct LDKRoutingMessageHandler_JCalls {
667 jmethodID handle_node_announcement_meth;
668 jmethodID handle_channel_announcement_meth;
669 jmethodID handle_channel_update_meth;
670 jmethodID handle_htlc_fail_channel_update_meth;
671 jmethodID get_next_channel_announcements_meth;
672 jmethodID get_next_node_announcements_meth;
673 jmethodID should_request_full_sync_meth;
674 } LDKRoutingMessageHandler_JCalls;
675 jlong handle_node_announcement_jcall(void* this_arg/* TODO */) {
676 LDKRoutingMessageHandler_JCalls *arg = (LDKRoutingMessageHandler_JCalls*) this_arg;
677 return (*arg->env)->CallLongMethod(arg->env, arg->o, arg->handle_node_announcement_meth);
679 jlong handle_channel_announcement_jcall(void* this_arg/* TODO */) {
680 LDKRoutingMessageHandler_JCalls *arg = (LDKRoutingMessageHandler_JCalls*) this_arg;
681 return (*arg->env)->CallLongMethod(arg->env, arg->o, arg->handle_channel_announcement_meth);
683 jlong handle_channel_update_jcall(void* this_arg/* TODO */) {
684 LDKRoutingMessageHandler_JCalls *arg = (LDKRoutingMessageHandler_JCalls*) this_arg;
685 return (*arg->env)->CallLongMethod(arg->env, arg->o, arg->handle_channel_update_meth);
687 void handle_htlc_fail_channel_update_jcall(void* this_arg/* TODO */) {
688 LDKRoutingMessageHandler_JCalls *arg = (LDKRoutingMessageHandler_JCalls*) this_arg;
689 return (*arg->env)->CallVoidMethod(arg->env, arg->o, arg->handle_htlc_fail_channel_update_meth);
691 jlong get_next_channel_announcements_jcall(void* this_arg/* TODO */) {
692 LDKRoutingMessageHandler_JCalls *arg = (LDKRoutingMessageHandler_JCalls*) this_arg;
693 return (*arg->env)->CallLongMethod(arg->env, arg->o, arg->get_next_channel_announcements_meth);
695 jlong get_next_node_announcements_jcall(void* this_arg/* TODO */) {
696 LDKRoutingMessageHandler_JCalls *arg = (LDKRoutingMessageHandler_JCalls*) this_arg;
697 return (*arg->env)->CallLongMethod(arg->env, arg->o, arg->get_next_node_announcements_meth);
699 jboolean should_request_full_sync_jcall(void* this_arg/* TODO */) {
700 LDKRoutingMessageHandler_JCalls *arg = (LDKRoutingMessageHandler_JCalls*) this_arg;
701 return (*arg->env)->CallBooleanMethod(arg->env, arg->o, arg->should_request_full_sync_meth);
703 void LDKRoutingMessageHandler_JCalls_free(void* this_arg) {
704 LDKRoutingMessageHandler_JCalls *arg = (LDKRoutingMessageHandler_JCalls*) this_arg;
705 (*arg->env)->DeleteGlobalRef(arg->env, arg->o);
708 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKRoutingMessageHandler_1new (JNIEnv * env, jclass _a, jobject o) {
709 jclass c = (*env)->GetObjectClass(env, o);
711 LDKRoutingMessageHandler_JCalls *calls = malloc(sizeof(LDKRoutingMessageHandler_JCalls));
713 calls->o = (*env)->NewGlobalRef(env, o);
714 calls->handle_node_announcement_meth = (*env)->GetMethodID(env, c, "handle_node_announcement", "TODO");
715 assert(calls->handle_node_announcement_meth != NULL);
716 calls->handle_channel_announcement_meth = (*env)->GetMethodID(env, c, "handle_channel_announcement", "TODO");
717 assert(calls->handle_channel_announcement_meth != NULL);
718 calls->handle_channel_update_meth = (*env)->GetMethodID(env, c, "handle_channel_update", "TODO");
719 assert(calls->handle_channel_update_meth != NULL);
720 calls->handle_htlc_fail_channel_update_meth = (*env)->GetMethodID(env, c, "handle_htlc_fail_channel_update", "TODO");
721 assert(calls->handle_htlc_fail_channel_update_meth != NULL);
722 calls->get_next_channel_announcements_meth = (*env)->GetMethodID(env, c, "get_next_channel_announcements", "TODO");
723 assert(calls->get_next_channel_announcements_meth != NULL);
724 calls->get_next_node_announcements_meth = (*env)->GetMethodID(env, c, "get_next_node_announcements", "TODO");
725 assert(calls->get_next_node_announcements_meth != NULL);
726 calls->should_request_full_sync_meth = (*env)->GetMethodID(env, c, "should_request_full_sync", "TODO");
727 assert(calls->should_request_full_sync_meth != NULL);
729 LDKRoutingMessageHandler *ret = malloc(sizeof(LDKRoutingMessageHandler));
730 ret->this_arg = (void*) calls;
731 ret->handle_node_announcement = handle_node_announcement_jcall;
732 ret->handle_channel_announcement = handle_channel_announcement_jcall;
733 ret->handle_channel_update = handle_channel_update_jcall;
734 ret->handle_htlc_fail_channel_update = handle_htlc_fail_channel_update_jcall;
735 ret->get_next_channel_announcements = get_next_channel_announcements_jcall;
736 ret->get_next_node_announcements = get_next_node_announcements_jcall;
737 ret->should_request_full_sync = should_request_full_sync_jcall;
738 ret->free = LDKRoutingMessageHandler_JCalls_free;
742 typedef struct LDKSocketDescriptor_JCalls {
745 jmethodID send_data_meth;
746 jmethodID disconnect_socket_meth;
749 } LDKSocketDescriptor_JCalls;
750 jlong send_data_jcall(void* this_arg/* TODO */) {
751 LDKSocketDescriptor_JCalls *arg = (LDKSocketDescriptor_JCalls*) this_arg;
752 return (*arg->env)->CallLongMethod(arg->env, arg->o, arg->send_data_meth);
754 void disconnect_socket_jcall(void* this_arg/* TODO */) {
755 LDKSocketDescriptor_JCalls *arg = (LDKSocketDescriptor_JCalls*) this_arg;
756 return (*arg->env)->CallVoidMethod(arg->env, arg->o, arg->disconnect_socket_meth);
758 jboolean eq_jcall(void* this_arg/* TODO */) {
759 LDKSocketDescriptor_JCalls *arg = (LDKSocketDescriptor_JCalls*) this_arg;
760 return (*arg->env)->CallBooleanMethod(arg->env, arg->o, arg->eq_meth);
762 jlong hash_jcall(void* this_arg/* TODO */) {
763 LDKSocketDescriptor_JCalls *arg = (LDKSocketDescriptor_JCalls*) this_arg;
764 return (*arg->env)->CallLongMethod(arg->env, arg->o, arg->hash_meth);
766 void* LDKSocketDescriptor_JCalls_clone(void* this_arg) {
767 LDKSocketDescriptor_JCalls *ret = malloc(sizeof(LDKSocketDescriptor_JCalls));
768 memcpy(ret, this_arg, sizeof(LDKSocketDescriptor_JCalls));
771 void LDKSocketDescriptor_JCalls_free(void* this_arg) {
772 LDKSocketDescriptor_JCalls *arg = (LDKSocketDescriptor_JCalls*) this_arg;
773 (*arg->env)->DeleteGlobalRef(arg->env, arg->o);
776 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKSocketDescriptor_1new (JNIEnv * env, jclass _a, jobject o) {
777 jclass c = (*env)->GetObjectClass(env, o);
779 LDKSocketDescriptor_JCalls *calls = malloc(sizeof(LDKSocketDescriptor_JCalls));
781 calls->o = (*env)->NewGlobalRef(env, o);
782 calls->send_data_meth = (*env)->GetMethodID(env, c, "send_data", "TODO");
783 assert(calls->send_data_meth != NULL);
784 calls->disconnect_socket_meth = (*env)->GetMethodID(env, c, "disconnect_socket", "TODO");
785 assert(calls->disconnect_socket_meth != NULL);
786 calls->eq_meth = (*env)->GetMethodID(env, c, "eq", "TODO");
787 assert(calls->eq_meth != NULL);
788 calls->hash_meth = (*env)->GetMethodID(env, c, "hash", "TODO");
789 assert(calls->hash_meth != NULL);
791 LDKSocketDescriptor *ret = malloc(sizeof(LDKSocketDescriptor));
792 ret->this_arg = (void*) calls;
793 ret->send_data = send_data_jcall;
794 ret->disconnect_socket = disconnect_socket_jcall;
796 ret->hash = hash_jcall;
797 ret->clone = LDKSocketDescriptor_JCalls_clone;
798 ret->free = LDKSocketDescriptor_JCalls_free;
802 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1HTLCOutputInCommitmentSignatureZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
803 LDKC2Tuple_HTLCOutputInCommitmentSignatureZ arg_conv = *(LDKC2Tuple_HTLCOutputInCommitmentSignatureZ*)arg;
805 return C2Tuple_HTLCOutputInCommitmentSignatureZ_free(arg_conv);
808 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
809 LDKC2Tuple_OutPointScriptZ arg_conv = *(LDKC2Tuple_OutPointScriptZ*)arg;
811 return C2Tuple_OutPointScriptZ_free(arg_conv);
814 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1Scriptu64Z_1free(JNIEnv * _env, jclass _b, jlong arg) {
815 LDKC2Tuple_Scriptu64Z arg_conv = *(LDKC2Tuple_Scriptu64Z*)arg;
817 return C2Tuple_Scriptu64Z_free(arg_conv);
820 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
821 LDKC2Tuple_SignatureCVec_SignatureZZ arg_conv = *(LDKC2Tuple_SignatureCVec_SignatureZZ*)arg;
823 return C2Tuple_SignatureCVec_SignatureZZ_free(arg_conv);
826 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1Txidu32Z_1free(JNIEnv * _env, jclass _b, jlong arg) {
827 LDKC2Tuple_Txidu32Z arg_conv = *(LDKC2Tuple_Txidu32Z*)arg;
829 return C2Tuple_Txidu32Z_free(arg_conv);
832 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u64u64Z_1free(JNIEnv * _env, jclass _b, jlong arg) {
833 LDKC2Tuple_u64u64Z arg_conv = *(LDKC2Tuple_u64u64Z*)arg;
835 return C2Tuple_u64u64Z_free(arg_conv);
838 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
839 LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ arg_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)arg;
841 return C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(arg_conv);
844 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1Scriptu64ZChainErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
845 LDKChainError arg_conv = *(LDKChainError*)arg;
847 LDKCResult_C2Tuple_Scriptu64ZChainErrorZ* ret = malloc(sizeof(LDKCResult_C2Tuple_Scriptu64ZChainErrorZ));
848 *ret = CResult_C2Tuple_Scriptu64ZChainErrorZ_err(arg_conv);
852 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1Scriptu64ZChainErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
853 LDKCResult_C2Tuple_Scriptu64ZChainErrorZ arg_conv = *(LDKCResult_C2Tuple_Scriptu64ZChainErrorZ*)arg;
855 return CResult_C2Tuple_Scriptu64ZChainErrorZ_free(arg_conv);
858 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1Scriptu64ZChainErrorZ_1ok(JNIEnv * _env, jclass _b, jlong arg) {
859 LDKC2Tuple_Scriptu64Z arg_conv = *(LDKC2Tuple_Scriptu64Z*)arg;
861 LDKCResult_C2Tuple_Scriptu64ZChainErrorZ* ret = malloc(sizeof(LDKCResult_C2Tuple_Scriptu64ZChainErrorZ));
862 *ret = CResult_C2Tuple_Scriptu64ZChainErrorZ_ok(arg_conv);
866 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
867 LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ arg_conv = *(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)arg;
869 return CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(arg_conv);
872 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1ok(JNIEnv * _env, jclass _b, jlong arg) {
873 LDKC2Tuple_SignatureCVec_SignatureZZ arg_conv = *(LDKC2Tuple_SignatureCVec_SignatureZZ*)arg;
875 LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ* ret = malloc(sizeof(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ));
876 *ret = CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(arg_conv);
880 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
881 LDKCResult_CVec_SignatureZNoneZ arg_conv = *(LDKCResult_CVec_SignatureZNoneZ*)arg;
883 return CResult_CVec_SignatureZNoneZ_free(arg_conv);
886 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1ok(JNIEnv * _env, jclass _b, jlong arg) {
887 LDKCVec_SignatureZ arg_conv = *(LDKCVec_SignatureZ*)arg;
889 LDKCResult_CVec_SignatureZNoneZ* ret = malloc(sizeof(LDKCResult_CVec_SignatureZNoneZ));
890 *ret = CResult_CVec_SignatureZNoneZ_ok(arg_conv);
894 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
895 LDKPeerHandleError arg_conv = *(LDKPeerHandleError*)arg;
897 LDKCResult_CVec_u8ZPeerHandleErrorZ* ret = malloc(sizeof(LDKCResult_CVec_u8ZPeerHandleErrorZ));
898 *ret = CResult_CVec_u8ZPeerHandleErrorZ_err(arg_conv);
902 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
903 LDKCResult_CVec_u8ZPeerHandleErrorZ arg_conv = *(LDKCResult_CVec_u8ZPeerHandleErrorZ*)arg;
905 return CResult_CVec_u8ZPeerHandleErrorZ_free(arg_conv);
908 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1ok(JNIEnv * _env, jclass _b, jlong arg) {
909 LDKCVec_u8Z arg_conv = *(LDKCVec_u8Z*)arg;
911 LDKCResult_CVec_u8ZPeerHandleErrorZ* ret = malloc(sizeof(LDKCResult_CVec_u8ZPeerHandleErrorZ));
912 *ret = CResult_CVec_u8ZPeerHandleErrorZ_ok(arg_conv);
916 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneAPIErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
917 LDKAPIError arg_conv = *(LDKAPIError*)arg;
919 LDKCResult_NoneAPIErrorZ* ret = malloc(sizeof(LDKCResult_NoneAPIErrorZ));
920 *ret = CResult_NoneAPIErrorZ_err(arg_conv);
924 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneAPIErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
925 LDKCResult_NoneAPIErrorZ arg_conv = *(LDKCResult_NoneAPIErrorZ*)arg;
927 return CResult_NoneAPIErrorZ_free(arg_conv);
930 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
931 LDKChannelMonitorUpdateErr arg_conv = *(LDKChannelMonitorUpdateErr*)arg;
933 LDKCResult_NoneChannelMonitorUpdateErrZ* ret = malloc(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ));
934 *ret = CResult_NoneChannelMonitorUpdateErrZ_err(arg_conv);
938 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
939 LDKCResult_NoneChannelMonitorUpdateErrZ arg_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)arg;
941 return CResult_NoneChannelMonitorUpdateErrZ_free(arg_conv);
944 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
945 LDKMonitorUpdateError arg_conv = *(LDKMonitorUpdateError*)arg;
947 LDKCResult_NoneMonitorUpdateErrorZ* ret = malloc(sizeof(LDKCResult_NoneMonitorUpdateErrorZ));
948 *ret = CResult_NoneMonitorUpdateErrorZ_err(arg_conv);
952 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
953 LDKCResult_NoneMonitorUpdateErrorZ arg_conv = *(LDKCResult_NoneMonitorUpdateErrorZ*)arg;
955 return CResult_NoneMonitorUpdateErrorZ_free(arg_conv);
958 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
959 LDKPaymentSendFailure arg_conv = *(LDKPaymentSendFailure*)arg;
961 LDKCResult_NonePaymentSendFailureZ* ret = malloc(sizeof(LDKCResult_NonePaymentSendFailureZ));
962 *ret = CResult_NonePaymentSendFailureZ_err(arg_conv);
966 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
967 LDKCResult_NonePaymentSendFailureZ arg_conv = *(LDKCResult_NonePaymentSendFailureZ*)arg;
969 return CResult_NonePaymentSendFailureZ_free(arg_conv);
972 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
973 LDKPeerHandleError arg_conv = *(LDKPeerHandleError*)arg;
975 LDKCResult_NonePeerHandleErrorZ* ret = malloc(sizeof(LDKCResult_NonePeerHandleErrorZ));
976 *ret = CResult_NonePeerHandleErrorZ_err(arg_conv);
980 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
981 LDKCResult_NonePeerHandleErrorZ arg_conv = *(LDKCResult_NonePeerHandleErrorZ*)arg;
983 return CResult_NonePeerHandleErrorZ_free(arg_conv);
986 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
987 LDKLightningError arg_conv = *(LDKLightningError*)arg;
989 LDKCResult_RouteLightningErrorZ* ret = malloc(sizeof(LDKCResult_RouteLightningErrorZ));
990 *ret = CResult_RouteLightningErrorZ_err(arg_conv);
994 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
995 LDKCResult_RouteLightningErrorZ arg_conv = *(LDKCResult_RouteLightningErrorZ*)arg;
997 return CResult_RouteLightningErrorZ_free(arg_conv);
1000 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1ok(JNIEnv * _env, jclass _b, jlong arg) {
1001 LDKRoute arg_conv = *(LDKRoute*)arg;
1003 LDKCResult_RouteLightningErrorZ* ret = malloc(sizeof(LDKCResult_RouteLightningErrorZ));
1004 *ret = CResult_RouteLightningErrorZ_ok(arg_conv);
1008 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SignatureNoneZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1009 LDKCResult_SignatureNoneZ arg_conv = *(LDKCResult_SignatureNoneZ*)arg;
1011 return CResult_SignatureNoneZ_free(arg_conv);
1014 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SignatureNoneZ_1ok(JNIEnv * _env, jclass _b, jlong arg) {
1015 LDKSignature arg_conv = *(LDKSignature*)arg;
1017 LDKCResult_SignatureNoneZ* ret = malloc(sizeof(LDKCResult_SignatureNoneZ));
1018 *ret = CResult_SignatureNoneZ_ok(arg_conv);
1022 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysSecpErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
1023 LDKSecp256k1Error arg_conv = *(LDKSecp256k1Error*)arg;
1025 LDKCResult_TxCreationKeysSecpErrorZ* ret = malloc(sizeof(LDKCResult_TxCreationKeysSecpErrorZ));
1026 *ret = CResult_TxCreationKeysSecpErrorZ_err(arg_conv);
1030 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysSecpErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1031 LDKCResult_TxCreationKeysSecpErrorZ arg_conv = *(LDKCResult_TxCreationKeysSecpErrorZ*)arg;
1033 return CResult_TxCreationKeysSecpErrorZ_free(arg_conv);
1036 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysSecpErrorZ_1ok(JNIEnv * _env, jclass _b, jlong arg) {
1037 LDKTxCreationKeys arg_conv = *(LDKTxCreationKeys*)arg;
1039 LDKCResult_TxCreationKeysSecpErrorZ* ret = malloc(sizeof(LDKCResult_TxCreationKeysSecpErrorZ));
1040 *ret = CResult_TxCreationKeysSecpErrorZ_ok(arg_conv);
1044 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
1045 LDKLightningError arg_conv = *(LDKLightningError*)arg;
1047 LDKCResult_boolLightningErrorZ* ret = malloc(sizeof(LDKCResult_boolLightningErrorZ));
1048 *ret = CResult_boolLightningErrorZ_err(arg_conv);
1052 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1053 LDKCResult_boolLightningErrorZ arg_conv = *(LDKCResult_boolLightningErrorZ*)arg;
1055 return CResult_boolLightningErrorZ_free(arg_conv);
1058 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1ok(JNIEnv * _env, jclass _b, jboolean arg) {
1059 LDKCResult_boolLightningErrorZ* ret = malloc(sizeof(LDKCResult_boolLightningErrorZ));
1060 *ret = CResult_boolLightningErrorZ_ok(arg);
1064 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
1065 LDKPeerHandleError arg_conv = *(LDKPeerHandleError*)arg;
1067 LDKCResult_boolPeerHandleErrorZ* ret = malloc(sizeof(LDKCResult_boolPeerHandleErrorZ));
1068 *ret = CResult_boolPeerHandleErrorZ_err(arg_conv);
1072 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1073 LDKCResult_boolPeerHandleErrorZ arg_conv = *(LDKCResult_boolPeerHandleErrorZ*)arg;
1075 return CResult_boolPeerHandleErrorZ_free(arg_conv);
1078 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1ok(JNIEnv * _env, jclass _b, jboolean arg) {
1079 LDKCResult_boolPeerHandleErrorZ* ret = malloc(sizeof(LDKCResult_boolPeerHandleErrorZ));
1080 *ret = CResult_boolPeerHandleErrorZ_ok(arg);
1084 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1HTLCOutputInCommitmentSignatureZZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1085 LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ arg_conv = *(LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ*)arg;
1087 return CVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ_free(arg_conv);
1090 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1091 LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ arg_conv = *(LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ*)arg;
1093 return CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(arg_conv);
1096 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1CVec_1RouteHopZZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1097 LDKCVec_CVec_RouteHopZZ arg_conv = *(LDKCVec_CVec_RouteHopZZ*)arg;
1099 return CVec_CVec_RouteHopZZ_free(arg_conv);
1102 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ChannelDetailsZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1103 LDKCVec_ChannelDetailsZ arg_conv = *(LDKCVec_ChannelDetailsZ*)arg;
1105 return CVec_ChannelDetailsZ_free(arg_conv);
1108 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ChannelMonitorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1109 LDKCVec_ChannelMonitorZ arg_conv = *(LDKCVec_ChannelMonitorZ*)arg;
1111 return CVec_ChannelMonitorZ_free(arg_conv);
1114 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1EventZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1115 LDKCVec_EventZ arg_conv = *(LDKCVec_EventZ*)arg;
1117 return CVec_EventZ_free(arg_conv);
1120 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1HTLCOutputInCommitmentZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1121 LDKCVec_HTLCOutputInCommitmentZ arg_conv = *(LDKCVec_HTLCOutputInCommitmentZ*)arg;
1123 return CVec_HTLCOutputInCommitmentZ_free(arg_conv);
1126 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1MessageSendEventZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1127 LDKCVec_MessageSendEventZ arg_conv = *(LDKCVec_MessageSendEventZ*)arg;
1129 return CVec_MessageSendEventZ_free(arg_conv);
1132 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1MonitorEventZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1133 LDKCVec_MonitorEventZ arg_conv = *(LDKCVec_MonitorEventZ*)arg;
1135 return CVec_MonitorEventZ_free(arg_conv);
1138 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1NetAddressZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1139 LDKCVec_NetAddressZ arg_conv = *(LDKCVec_NetAddressZ*)arg;
1141 return CVec_NetAddressZ_free(arg_conv);
1144 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1NodeAnnouncementZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1145 LDKCVec_NodeAnnouncementZ arg_conv = *(LDKCVec_NodeAnnouncementZ*)arg;
1147 return CVec_NodeAnnouncementZ_free(arg_conv);
1150 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1PublicKeyZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1151 LDKCVec_PublicKeyZ arg_conv = *(LDKCVec_PublicKeyZ*)arg;
1153 return CVec_PublicKeyZ_free(arg_conv);
1156 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1RouteHintZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1157 LDKCVec_RouteHintZ arg_conv = *(LDKCVec_RouteHintZ*)arg;
1159 return CVec_RouteHintZ_free(arg_conv);
1162 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1RouteHopZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1163 LDKCVec_RouteHopZ arg_conv = *(LDKCVec_RouteHopZ*)arg;
1165 return CVec_RouteHopZ_free(arg_conv);
1168 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1SignatureZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1169 LDKCVec_SignatureZ arg_conv = *(LDKCVec_SignatureZ*)arg;
1171 return CVec_SignatureZ_free(arg_conv);
1174 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1SpendableOutputDescriptorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1175 LDKCVec_SpendableOutputDescriptorZ arg_conv = *(LDKCVec_SpendableOutputDescriptorZ*)arg;
1177 return CVec_SpendableOutputDescriptorZ_free(arg_conv);
1180 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TransactionZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1181 LDKCVec_TransactionZ arg_conv = *(LDKCVec_TransactionZ*)arg;
1183 return CVec_TransactionZ_free(arg_conv);
1186 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateAddHTLCZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1187 LDKCVec_UpdateAddHTLCZ arg_conv = *(LDKCVec_UpdateAddHTLCZ*)arg;
1189 return CVec_UpdateAddHTLCZ_free(arg_conv);
1192 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateFailHTLCZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1193 LDKCVec_UpdateFailHTLCZ arg_conv = *(LDKCVec_UpdateFailHTLCZ*)arg;
1195 return CVec_UpdateFailHTLCZ_free(arg_conv);
1198 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateFailMalformedHTLCZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1199 LDKCVec_UpdateFailMalformedHTLCZ arg_conv = *(LDKCVec_UpdateFailMalformedHTLCZ*)arg;
1201 return CVec_UpdateFailMalformedHTLCZ_free(arg_conv);
1204 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateFulfillHTLCZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1205 LDKCVec_UpdateFulfillHTLCZ arg_conv = *(LDKCVec_UpdateFulfillHTLCZ*)arg;
1207 return CVec_UpdateFulfillHTLCZ_free(arg_conv);
1210 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u64Z_1free(JNIEnv * _env, jclass _b, jlong arg) {
1211 LDKCVec_u64Z arg_conv = *(LDKCVec_u64Z*)arg;
1213 return CVec_u64Z_free(arg_conv);
1216 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u8Z_1free(JNIEnv * _env, jclass _b, jlong arg) {
1217 LDKCVec_u8Z arg_conv = *(LDKCVec_u8Z*)arg;
1219 return CVec_u8Z_free(arg_conv);
1222 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1usizeZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1223 LDKCVec_usizeZ arg_conv = *(LDKCVec_usizeZ*)arg;
1225 return CVec_usizeZ_free(arg_conv);
1228 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxOut_1free(JNIEnv * _env, jclass _b, jlong _res) {
1229 LDKTxOut _res_conv = *(LDKTxOut*)_res;
1231 return TxOut_free(_res_conv);
1234 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1Txidu32Z_1new(JNIEnv * _env, jclass _b, jlong a, jint b) {
1235 LDKThirtyTwoBytes a_conv = *(LDKThirtyTwoBytes*)a;
1237 LDKC2Tuple_Txidu32Z* ret = malloc(sizeof(LDKC2Tuple_Txidu32Z));
1238 *ret = C2Tuple_Txidu32Z_new(a_conv, b);
1242 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1Scriptu64Z_1new(JNIEnv * _env, jclass _b, jlong a, jlong b) {
1243 LDKCVec_u8Z a_conv = *(LDKCVec_u8Z*)a;
1245 LDKC2Tuple_Scriptu64Z* ret = malloc(sizeof(LDKC2Tuple_Scriptu64Z));
1246 *ret = C2Tuple_Scriptu64Z_new(a_conv, b);
1250 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u64u64Z_1new(JNIEnv * _env, jclass _b, jlong a, jlong b) {
1251 LDKC2Tuple_u64u64Z* ret = malloc(sizeof(LDKC2Tuple_u64u64Z));
1252 *ret = C2Tuple_u64u64Z_new(a, b);
1256 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1new(JNIEnv * _env, jclass _b, jlong a, jlong b) {
1257 LDKSignature a_conv = *(LDKSignature*)a;
1259 LDKCVec_SignatureZ b_conv = *(LDKCVec_SignatureZ*)b;
1261 LDKC2Tuple_SignatureCVec_SignatureZZ* ret = malloc(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ));
1262 *ret = C2Tuple_SignatureCVec_SignatureZZ_new(a_conv, b_conv);
1266 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1err(JNIEnv * _env, jclass _b) {
1267 LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ* ret = malloc(sizeof(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ));
1268 *ret = CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
1272 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SignatureNoneZ_1err(JNIEnv * _env, jclass _b) {
1273 LDKCResult_SignatureNoneZ* ret = malloc(sizeof(LDKCResult_SignatureNoneZ));
1274 *ret = CResult_SignatureNoneZ_err();
1278 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1err(JNIEnv * _env, jclass _b) {
1279 LDKCResult_CVec_SignatureZNoneZ* ret = malloc(sizeof(LDKCResult_CVec_SignatureZNoneZ));
1280 *ret = CResult_CVec_SignatureZNoneZ_err();
1284 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneAPIErrorZ_1ok(JNIEnv * _env, jclass _b) {
1285 LDKCResult_NoneAPIErrorZ* ret = malloc(sizeof(LDKCResult_NoneAPIErrorZ));
1286 *ret = CResult_NoneAPIErrorZ_ok();
1290 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1ok(JNIEnv * _env, jclass _b) {
1291 LDKCResult_NonePaymentSendFailureZ* ret = malloc(sizeof(LDKCResult_NonePaymentSendFailureZ));
1292 *ret = CResult_NonePaymentSendFailureZ_ok();
1296 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1ok(JNIEnv * _env, jclass _b) {
1297 LDKCResult_NoneChannelMonitorUpdateErrZ* ret = malloc(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ));
1298 *ret = CResult_NoneChannelMonitorUpdateErrZ_ok();
1302 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateErrorZ_1ok(JNIEnv * _env, jclass _b) {
1303 LDKCResult_NoneMonitorUpdateErrorZ* ret = malloc(sizeof(LDKCResult_NoneMonitorUpdateErrorZ));
1304 *ret = CResult_NoneMonitorUpdateErrorZ_ok();
1308 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1new(JNIEnv * _env, jclass _b, jlong a, jlong b) {
1309 LDKOutPoint a_conv = *(LDKOutPoint*)a;
1311 a_conv._underlying_ref = false;
1312 LDKCVec_u8Z b_conv = *(LDKCVec_u8Z*)b;
1314 LDKC2Tuple_OutPointScriptZ* ret = malloc(sizeof(LDKC2Tuple_OutPointScriptZ));
1315 *ret = C2Tuple_OutPointScriptZ_new(a_conv, b_conv);
1319 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1new(JNIEnv * _env, jclass _b, jlong a, jlong b, jlong c) {
1320 LDKChannelAnnouncement a_conv = *(LDKChannelAnnouncement*)a;
1322 a_conv._underlying_ref = false;
1323 LDKChannelUpdate b_conv = *(LDKChannelUpdate*)b;
1325 b_conv._underlying_ref = false;
1326 LDKChannelUpdate c_conv = *(LDKChannelUpdate*)c;
1328 c_conv._underlying_ref = false;
1329 LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret = malloc(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ));
1330 *ret = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a_conv, b_conv, c_conv);
1334 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1ok(JNIEnv * _env, jclass _b) {
1335 LDKCResult_NonePeerHandleErrorZ* ret = malloc(sizeof(LDKCResult_NonePeerHandleErrorZ));
1336 *ret = CResult_NonePeerHandleErrorZ_ok();
1340 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1HTLCOutputInCommitmentSignatureZ_1new(JNIEnv * _env, jclass _b, jlong a, jlong b) {
1341 LDKHTLCOutputInCommitment a_conv = *(LDKHTLCOutputInCommitment*)a;
1343 a_conv._underlying_ref = false;
1344 LDKSignature b_conv = *(LDKSignature*)b;
1346 LDKC2Tuple_HTLCOutputInCommitmentSignatureZ* ret = malloc(sizeof(LDKC2Tuple_HTLCOutputInCommitmentSignatureZ));
1347 *ret = C2Tuple_HTLCOutputInCommitmentSignatureZ_new(a_conv, b_conv);
1351 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Event_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1352 LDKEvent this_ptr_conv = *(LDKEvent*)this_ptr;
1353 free((void*)this_ptr);
1354 return Event_free(this_ptr_conv);
1357 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_MessageSendEvent_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1358 LDKMessageSendEvent this_ptr_conv = *(LDKMessageSendEvent*)this_ptr;
1359 free((void*)this_ptr);
1360 return MessageSendEvent_free(this_ptr_conv);
1363 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_MessageSendEventsProvider_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1364 LDKMessageSendEventsProvider this_ptr_conv = *(LDKMessageSendEventsProvider*)this_ptr;
1365 free((void*)this_ptr);
1366 return MessageSendEventsProvider_free(this_ptr_conv);
1369 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_EventsProvider_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1370 LDKEventsProvider this_ptr_conv = *(LDKEventsProvider*)this_ptr;
1371 free((void*)this_ptr);
1372 return EventsProvider_free(this_ptr_conv);
1375 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_APIError_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1376 LDKAPIError this_ptr_conv = *(LDKAPIError*)this_ptr;
1377 free((void*)this_ptr);
1378 return APIError_free(this_ptr_conv);
1381 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Level_1max(JNIEnv * _env, jclass _b) {
1382 LDKLevel* ret = malloc(sizeof(LDKLevel));
1387 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Logger_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1388 LDKLogger this_ptr_conv = *(LDKLogger*)this_ptr;
1389 free((void*)this_ptr);
1390 return Logger_free(this_ptr_conv);
1393 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1394 LDKChannelHandshakeConfig this_ptr_conv = *(LDKChannelHandshakeConfig*)this_ptr;
1395 free((void*)this_ptr);
1396 this_ptr_conv._underlying_ref = false;
1397 return ChannelHandshakeConfig_free(this_ptr_conv);
1400 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1get_1minimum_1depth(JNIEnv * _env, jclass _b, jlong this_ptr) {
1401 LDKChannelHandshakeConfig* this_ptr_conv = (LDKChannelHandshakeConfig*)this_ptr;
1402 return ChannelHandshakeConfig_get_minimum_depth(this_ptr_conv);
1405 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1set_1minimum_1depth(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
1406 LDKChannelHandshakeConfig* this_ptr_conv = (LDKChannelHandshakeConfig*)this_ptr;
1407 return ChannelHandshakeConfig_set_minimum_depth(this_ptr_conv, val);
1410 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1get_1our_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_ptr) {
1411 LDKChannelHandshakeConfig* this_ptr_conv = (LDKChannelHandshakeConfig*)this_ptr;
1412 uint16_t* ret = malloc(sizeof(uint16_t));
1413 *ret = ChannelHandshakeConfig_get_our_to_self_delay(this_ptr_conv);
1417 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1set_1our_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1418 LDKChannelHandshakeConfig* this_ptr_conv = (LDKChannelHandshakeConfig*)this_ptr;
1419 uint16_t val_conv = *(uint16_t*)val;
1421 return ChannelHandshakeConfig_set_our_to_self_delay(this_ptr_conv, val_conv);
1424 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1get_1our_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
1425 LDKChannelHandshakeConfig* this_ptr_conv = (LDKChannelHandshakeConfig*)this_ptr;
1426 return ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr_conv);
1429 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1set_1our_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1430 LDKChannelHandshakeConfig* this_ptr_conv = (LDKChannelHandshakeConfig*)this_ptr;
1431 return ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr_conv, val);
1434 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1new(JNIEnv * _env, jclass _b, jint minimum_depth_arg, jlong our_to_self_delay_arg, jlong our_htlc_minimum_msat_arg) {
1435 uint16_t our_to_self_delay_arg_conv = *(uint16_t*)our_to_self_delay_arg;
1436 free((void*)our_to_self_delay_arg);
1437 LDKChannelHandshakeConfig* ret = malloc(sizeof(LDKChannelHandshakeConfig));
1438 *ret = ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg_conv, our_htlc_minimum_msat_arg);
1439 assert(!ret->_underlying_ref);
1440 ret->_underlying_ref = true;
1444 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1default(JNIEnv * _env, jclass _b) {
1445 LDKChannelHandshakeConfig* ret = malloc(sizeof(LDKChannelHandshakeConfig));
1446 *ret = ChannelHandshakeConfig_default();
1447 assert(!ret->_underlying_ref);
1448 ret->_underlying_ref = true;
1452 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1453 LDKChannelHandshakeLimits this_ptr_conv = *(LDKChannelHandshakeLimits*)this_ptr;
1454 free((void*)this_ptr);
1455 this_ptr_conv._underlying_ref = false;
1456 return ChannelHandshakeLimits_free(this_ptr_conv);
1459 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1min_1funding_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
1460 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1461 return ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr_conv);
1464 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1min_1funding_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1465 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1466 return ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr_conv, val);
1469 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1max_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
1470 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1471 return ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr_conv);
1474 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1max_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1475 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1476 return ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr_conv, val);
1479 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1min_1max_1htlc_1value_1in_1flight_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
1480 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1481 return ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr_conv);
1484 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) {
1485 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1486 return ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr_conv, val);
1489 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1max_1channel_1reserve_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
1490 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1491 return ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr_conv);
1494 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1max_1channel_1reserve_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1495 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1496 return ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr_conv, val);
1499 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1min_1max_1accepted_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr) {
1500 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1501 uint16_t* ret = malloc(sizeof(uint16_t));
1502 *ret = ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr_conv);
1506 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1min_1max_1accepted_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1507 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1508 uint16_t val_conv = *(uint16_t*)val;
1510 return ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr_conv, val_conv);
1513 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1min_1dust_1limit_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
1514 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1515 return ChannelHandshakeLimits_get_min_dust_limit_satoshis(this_ptr_conv);
1518 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1min_1dust_1limit_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1519 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1520 return ChannelHandshakeLimits_set_min_dust_limit_satoshis(this_ptr_conv, val);
1523 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1max_1dust_1limit_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
1524 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1525 return ChannelHandshakeLimits_get_max_dust_limit_satoshis(this_ptr_conv);
1528 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1max_1dust_1limit_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1529 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1530 return ChannelHandshakeLimits_set_max_dust_limit_satoshis(this_ptr_conv, val);
1533 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1max_1minimum_1depth(JNIEnv * _env, jclass _b, jlong this_ptr) {
1534 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1535 return ChannelHandshakeLimits_get_max_minimum_depth(this_ptr_conv);
1538 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1max_1minimum_1depth(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
1539 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1540 return ChannelHandshakeLimits_set_max_minimum_depth(this_ptr_conv, val);
1543 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1force_1announced_1channel_1preference(JNIEnv * _env, jclass _b, jlong this_ptr) {
1544 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1545 return ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr_conv);
1548 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1force_1announced_1channel_1preference(JNIEnv * _env, jclass _b, jlong this_ptr, jboolean val) {
1549 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1550 return ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr_conv, val);
1553 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1their_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_ptr) {
1554 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1555 uint16_t* ret = malloc(sizeof(uint16_t));
1556 *ret = ChannelHandshakeLimits_get_their_to_self_delay(this_ptr_conv);
1560 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1their_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1561 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1562 uint16_t val_conv = *(uint16_t*)val;
1564 return ChannelHandshakeLimits_set_their_to_self_delay(this_ptr_conv, val_conv);
1567 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1new(JNIEnv * _env, jclass _b, jlong min_funding_satoshis_arg, jlong max_htlc_minimum_msat_arg, jlong min_max_htlc_value_in_flight_msat_arg, jlong max_channel_reserve_satoshis_arg, jlong min_max_accepted_htlcs_arg, jlong min_dust_limit_satoshis_arg, jlong max_dust_limit_satoshis_arg, jint max_minimum_depth_arg, jboolean force_announced_channel_preference_arg, jlong their_to_self_delay_arg) {
1568 uint16_t min_max_accepted_htlcs_arg_conv = *(uint16_t*)min_max_accepted_htlcs_arg;
1569 free((void*)min_max_accepted_htlcs_arg);
1570 uint16_t their_to_self_delay_arg_conv = *(uint16_t*)their_to_self_delay_arg;
1571 free((void*)their_to_self_delay_arg);
1572 LDKChannelHandshakeLimits* ret = malloc(sizeof(LDKChannelHandshakeLimits));
1573 *ret = ChannelHandshakeLimits_new(min_funding_satoshis_arg, max_htlc_minimum_msat_arg, min_max_htlc_value_in_flight_msat_arg, max_channel_reserve_satoshis_arg, min_max_accepted_htlcs_arg_conv, min_dust_limit_satoshis_arg, max_dust_limit_satoshis_arg, max_minimum_depth_arg, force_announced_channel_preference_arg, their_to_self_delay_arg_conv);
1574 assert(!ret->_underlying_ref);
1575 ret->_underlying_ref = true;
1579 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1default(JNIEnv * _env, jclass _b) {
1580 LDKChannelHandshakeLimits* ret = malloc(sizeof(LDKChannelHandshakeLimits));
1581 *ret = ChannelHandshakeLimits_default();
1582 assert(!ret->_underlying_ref);
1583 ret->_underlying_ref = true;
1587 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1588 LDKChannelConfig this_ptr_conv = *(LDKChannelConfig*)this_ptr;
1589 free((void*)this_ptr);
1590 this_ptr_conv._underlying_ref = false;
1591 return ChannelConfig_free(this_ptr_conv);
1594 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1get_1fee_1proportional_1millionths(JNIEnv * _env, jclass _b, jlong this_ptr) {
1595 LDKChannelConfig* this_ptr_conv = (LDKChannelConfig*)this_ptr;
1596 return ChannelConfig_get_fee_proportional_millionths(this_ptr_conv);
1599 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1set_1fee_1proportional_1millionths(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
1600 LDKChannelConfig* this_ptr_conv = (LDKChannelConfig*)this_ptr;
1601 return ChannelConfig_set_fee_proportional_millionths(this_ptr_conv, val);
1604 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1get_1announced_1channel(JNIEnv * _env, jclass _b, jlong this_ptr) {
1605 LDKChannelConfig* this_ptr_conv = (LDKChannelConfig*)this_ptr;
1606 return ChannelConfig_get_announced_channel(this_ptr_conv);
1609 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1set_1announced_1channel(JNIEnv * _env, jclass _b, jlong this_ptr, jboolean val) {
1610 LDKChannelConfig* this_ptr_conv = (LDKChannelConfig*)this_ptr;
1611 return ChannelConfig_set_announced_channel(this_ptr_conv, val);
1614 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1get_1commit_1upfront_1shutdown_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr) {
1615 LDKChannelConfig* this_ptr_conv = (LDKChannelConfig*)this_ptr;
1616 return ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr_conv);
1619 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1set_1commit_1upfront_1shutdown_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr, jboolean val) {
1620 LDKChannelConfig* this_ptr_conv = (LDKChannelConfig*)this_ptr;
1621 return ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr_conv, val);
1624 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) {
1625 LDKChannelConfig* ret = malloc(sizeof(LDKChannelConfig));
1626 *ret = ChannelConfig_new(fee_proportional_millionths_arg, announced_channel_arg, commit_upfront_shutdown_pubkey_arg);
1627 assert(!ret->_underlying_ref);
1628 ret->_underlying_ref = true;
1632 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1default(JNIEnv * _env, jclass _b) {
1633 LDKChannelConfig* ret = malloc(sizeof(LDKChannelConfig));
1634 *ret = ChannelConfig_default();
1635 assert(!ret->_underlying_ref);
1636 ret->_underlying_ref = true;
1640 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1write(JNIEnv * _env, jclass _b, jlong obj) {
1641 LDKChannelConfig* obj_conv = (LDKChannelConfig*)obj;
1642 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
1643 *ret = ChannelConfig_write(obj_conv);
1647 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1read(JNIEnv * _env, jclass _b, jlong ser) {
1648 LDKu8slice ser_conv = *(LDKu8slice*)ser;
1650 LDKChannelConfig* ret = malloc(sizeof(LDKChannelConfig));
1651 *ret = ChannelConfig_read(ser_conv);
1652 assert(!ret->_underlying_ref);
1653 ret->_underlying_ref = true;
1657 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UserConfig_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1658 LDKUserConfig this_ptr_conv = *(LDKUserConfig*)this_ptr;
1659 free((void*)this_ptr);
1660 this_ptr_conv._underlying_ref = false;
1661 return UserConfig_free(this_ptr_conv);
1664 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UserConfig_1get_1own_1channel_1config(JNIEnv * _env, jclass _b, jlong this_ptr) {
1665 LDKUserConfig* this_ptr_conv = (LDKUserConfig*)this_ptr;
1666 LDKChannelHandshakeConfig* ret = malloc(sizeof(LDKChannelHandshakeConfig));
1667 *ret = UserConfig_get_own_channel_config(this_ptr_conv);
1668 assert(!ret->_underlying_ref);
1669 ret->_underlying_ref = true;
1673 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UserConfig_1set_1own_1channel_1config(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1674 LDKUserConfig* this_ptr_conv = (LDKUserConfig*)this_ptr;
1675 LDKChannelHandshakeConfig val_conv = *(LDKChannelHandshakeConfig*)val;
1677 val_conv._underlying_ref = false;
1678 return UserConfig_set_own_channel_config(this_ptr_conv, val_conv);
1681 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UserConfig_1get_1peer_1channel_1config_1limits(JNIEnv * _env, jclass _b, jlong this_ptr) {
1682 LDKUserConfig* this_ptr_conv = (LDKUserConfig*)this_ptr;
1683 LDKChannelHandshakeLimits* ret = malloc(sizeof(LDKChannelHandshakeLimits));
1684 *ret = UserConfig_get_peer_channel_config_limits(this_ptr_conv);
1685 assert(!ret->_underlying_ref);
1686 ret->_underlying_ref = true;
1690 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UserConfig_1set_1peer_1channel_1config_1limits(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1691 LDKUserConfig* this_ptr_conv = (LDKUserConfig*)this_ptr;
1692 LDKChannelHandshakeLimits val_conv = *(LDKChannelHandshakeLimits*)val;
1694 val_conv._underlying_ref = false;
1695 return UserConfig_set_peer_channel_config_limits(this_ptr_conv, val_conv);
1698 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UserConfig_1get_1channel_1options(JNIEnv * _env, jclass _b, jlong this_ptr) {
1699 LDKUserConfig* this_ptr_conv = (LDKUserConfig*)this_ptr;
1700 LDKChannelConfig* ret = malloc(sizeof(LDKChannelConfig));
1701 *ret = UserConfig_get_channel_options(this_ptr_conv);
1702 assert(!ret->_underlying_ref);
1703 ret->_underlying_ref = true;
1707 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UserConfig_1set_1channel_1options(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1708 LDKUserConfig* this_ptr_conv = (LDKUserConfig*)this_ptr;
1709 LDKChannelConfig val_conv = *(LDKChannelConfig*)val;
1711 val_conv._underlying_ref = false;
1712 return UserConfig_set_channel_options(this_ptr_conv, val_conv);
1715 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) {
1716 LDKChannelHandshakeConfig own_channel_config_arg_conv = *(LDKChannelHandshakeConfig*)own_channel_config_arg;
1717 free((void*)own_channel_config_arg);
1718 own_channel_config_arg_conv._underlying_ref = false;
1719 LDKChannelHandshakeLimits peer_channel_config_limits_arg_conv = *(LDKChannelHandshakeLimits*)peer_channel_config_limits_arg;
1720 free((void*)peer_channel_config_limits_arg);
1721 peer_channel_config_limits_arg_conv._underlying_ref = false;
1722 LDKChannelConfig channel_options_arg_conv = *(LDKChannelConfig*)channel_options_arg;
1723 free((void*)channel_options_arg);
1724 channel_options_arg_conv._underlying_ref = false;
1725 LDKUserConfig* ret = malloc(sizeof(LDKUserConfig));
1726 *ret = UserConfig_new(own_channel_config_arg_conv, peer_channel_config_limits_arg_conv, channel_options_arg_conv);
1727 assert(!ret->_underlying_ref);
1728 ret->_underlying_ref = true;
1732 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UserConfig_1default(JNIEnv * _env, jclass _b) {
1733 LDKUserConfig* ret = malloc(sizeof(LDKUserConfig));
1734 *ret = UserConfig_default();
1735 assert(!ret->_underlying_ref);
1736 ret->_underlying_ref = true;
1740 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainWatchInterface_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1741 LDKChainWatchInterface this_ptr_conv = *(LDKChainWatchInterface*)this_ptr;
1742 free((void*)this_ptr);
1743 return ChainWatchInterface_free(this_ptr_conv);
1746 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BroadcasterInterface_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1747 LDKBroadcasterInterface this_ptr_conv = *(LDKBroadcasterInterface*)this_ptr;
1748 free((void*)this_ptr);
1749 return BroadcasterInterface_free(this_ptr_conv);
1752 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainListener_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1753 LDKChainListener this_ptr_conv = *(LDKChainListener*)this_ptr;
1754 free((void*)this_ptr);
1755 return ChainListener_free(this_ptr_conv);
1758 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FeeEstimator_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1759 LDKFeeEstimator this_ptr_conv = *(LDKFeeEstimator*)this_ptr;
1760 free((void*)this_ptr);
1761 return FeeEstimator_free(this_ptr_conv);
1764 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainWatchedUtil_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1765 LDKChainWatchedUtil this_ptr_conv = *(LDKChainWatchedUtil*)this_ptr;
1766 free((void*)this_ptr);
1767 this_ptr_conv._underlying_ref = false;
1768 return ChainWatchedUtil_free(this_ptr_conv);
1771 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChainWatchedUtil_1new(JNIEnv * _env, jclass _b) {
1772 LDKChainWatchedUtil* ret = malloc(sizeof(LDKChainWatchedUtil));
1773 *ret = ChainWatchedUtil_new();
1774 assert(!ret->_underlying_ref);
1775 ret->_underlying_ref = true;
1779 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChainWatchedUtil_1register_1tx(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray txid, jlong script_pub_key) {
1780 LDKChainWatchedUtil* this_arg_conv = (LDKChainWatchedUtil*)this_arg;
1781 unsigned char txid_arr[32];
1782 (*_env)->GetByteArrayRegion (_env, txid, 0, 32, txid_arr);
1783 unsigned char (*txid_ref)[32] = &txid_arr;
1784 LDKu8slice script_pub_key_conv = *(LDKu8slice*)script_pub_key;
1785 free((void*)script_pub_key);
1786 return ChainWatchedUtil_register_tx(this_arg_conv, txid_ref, script_pub_key_conv);
1789 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChainWatchedUtil_1register_1outpoint(JNIEnv * _env, jclass _b, jlong this_arg, jlong outpoint, jlong _script_pub_key) {
1790 LDKChainWatchedUtil* this_arg_conv = (LDKChainWatchedUtil*)this_arg;
1791 LDKC2Tuple_Txidu32Z outpoint_conv = *(LDKC2Tuple_Txidu32Z*)outpoint;
1792 free((void*)outpoint);
1793 LDKu8slice _script_pub_key_conv = *(LDKu8slice*)_script_pub_key;
1794 free((void*)_script_pub_key);
1795 return ChainWatchedUtil_register_outpoint(this_arg_conv, outpoint_conv, _script_pub_key_conv);
1798 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChainWatchedUtil_1watch_1all(JNIEnv * _env, jclass _b, jlong this_arg) {
1799 LDKChainWatchedUtil* this_arg_conv = (LDKChainWatchedUtil*)this_arg;
1800 return ChainWatchedUtil_watch_all(this_arg_conv);
1803 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChainWatchedUtil_1does_1match_1tx(JNIEnv * _env, jclass _b, jlong this_arg, jlong tx) {
1804 LDKChainWatchedUtil* this_arg_conv = (LDKChainWatchedUtil*)this_arg;
1805 LDKTransaction tx_conv = *(LDKTransaction*)tx;
1807 return ChainWatchedUtil_does_match_tx(this_arg_conv, tx_conv);
1810 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlockNotifier_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1811 LDKBlockNotifier this_ptr_conv = *(LDKBlockNotifier*)this_ptr;
1812 free((void*)this_ptr);
1813 this_ptr_conv._underlying_ref = false;
1814 return BlockNotifier_free(this_ptr_conv);
1817 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BlockNotifier_1new(JNIEnv * _env, jclass _b, jlong chain_monitor) {
1818 LDKChainWatchInterface chain_monitor_conv = *(LDKChainWatchInterface*)chain_monitor;
1819 free((void*)chain_monitor);
1820 LDKBlockNotifier* ret = malloc(sizeof(LDKBlockNotifier));
1821 *ret = BlockNotifier_new(chain_monitor_conv);
1822 assert(!ret->_underlying_ref);
1823 ret->_underlying_ref = true;
1827 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlockNotifier_1register_1listener(JNIEnv * _env, jclass _b, jlong this_arg, jlong listener) {
1828 LDKBlockNotifier* this_arg_conv = (LDKBlockNotifier*)this_arg;
1829 LDKChainListener listener_conv = *(LDKChainListener*)listener;
1830 free((void*)listener);
1831 return BlockNotifier_register_listener(this_arg_conv, listener_conv);
1834 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlockNotifier_1block_1connected(JNIEnv * _env, jclass _b, jlong this_arg, jlong block, jint height) {
1835 LDKBlockNotifier* this_arg_conv = (LDKBlockNotifier*)this_arg;
1836 LDKu8slice block_conv = *(LDKu8slice*)block;
1838 return BlockNotifier_block_connected(this_arg_conv, block_conv, height);
1841 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) {
1842 LDKBlockNotifier* this_arg_conv = (LDKBlockNotifier*)this_arg;
1843 unsigned char header_arr[80];
1844 (*_env)->GetByteArrayRegion (_env, header, 0, 80, header_arr);
1845 unsigned char (*header_ref)[80] = &header_arr;
1846 LDKCVec_TransactionZ txn_matched_conv = *(LDKCVec_TransactionZ*)txn_matched;
1847 free((void*)txn_matched);
1848 LDKusizeslice indexes_of_txn_matched_conv = *(LDKusizeslice*)indexes_of_txn_matched;
1849 free((void*)indexes_of_txn_matched);
1850 return BlockNotifier_block_connected_checked(this_arg_conv, header_ref, height, txn_matched_conv, indexes_of_txn_matched_conv);
1853 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlockNotifier_1block_1disconnected(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray header, jint disconnected_height) {
1854 LDKBlockNotifier* this_arg_conv = (LDKBlockNotifier*)this_arg;
1855 unsigned char header_arr[80];
1856 (*_env)->GetByteArrayRegion (_env, header, 0, 80, header_arr);
1857 unsigned char (*header_ref)[80] = &header_arr;
1858 return BlockNotifier_block_disconnected(this_arg_conv, header_ref, disconnected_height);
1861 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainWatchInterfaceUtil_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1862 LDKChainWatchInterfaceUtil this_ptr_conv = *(LDKChainWatchInterfaceUtil*)this_ptr;
1863 free((void*)this_ptr);
1864 this_ptr_conv._underlying_ref = false;
1865 return ChainWatchInterfaceUtil_free(this_ptr_conv);
1868 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChainWatchInterfaceUtil_1as_1ChainWatchInterface(JNIEnv * _env, jclass _b, jlong this_arg) {
1869 LDKChainWatchInterfaceUtil* this_arg_conv = (LDKChainWatchInterfaceUtil*)this_arg;
1870 LDKChainWatchInterface* ret = malloc(sizeof(LDKChainWatchInterface));
1871 *ret = ChainWatchInterfaceUtil_as_ChainWatchInterface(this_arg_conv);
1875 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChainWatchInterfaceUtil_1new(JNIEnv * _env, jclass _b, jlong network) {
1876 LDKNetwork network_conv = *(LDKNetwork*)network;
1877 free((void*)network);
1878 LDKChainWatchInterfaceUtil* ret = malloc(sizeof(LDKChainWatchInterfaceUtil));
1879 *ret = ChainWatchInterfaceUtil_new(network_conv);
1880 assert(!ret->_underlying_ref);
1881 ret->_underlying_ref = true;
1885 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChainWatchInterfaceUtil_1does_1match_1tx(JNIEnv * _env, jclass _b, jlong this_arg, jlong tx) {
1886 LDKChainWatchInterfaceUtil* this_arg_conv = (LDKChainWatchInterfaceUtil*)this_arg;
1887 LDKTransaction tx_conv = *(LDKTransaction*)tx;
1889 return ChainWatchInterfaceUtil_does_match_tx(this_arg_conv, tx_conv);
1892 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutPoint_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1893 LDKOutPoint this_ptr_conv = *(LDKOutPoint*)this_ptr;
1894 free((void*)this_ptr);
1895 this_ptr_conv._underlying_ref = false;
1896 return OutPoint_free(this_ptr_conv);
1899 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OutPoint_1get_1txid(JNIEnv * _env, jclass _b, jlong this_ptr) {
1900 LDKOutPoint* this_ptr_conv = (LDKOutPoint*)this_ptr;
1901 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
1902 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *OutPoint_get_txid(this_ptr_conv));
1906 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutPoint_1set_1txid(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1907 LDKOutPoint* this_ptr_conv = (LDKOutPoint*)this_ptr;
1908 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
1910 return OutPoint_set_txid(this_ptr_conv, val_conv);
1913 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutPoint_1get_1index(JNIEnv * _env, jclass _b, jlong this_ptr) {
1914 LDKOutPoint* this_ptr_conv = (LDKOutPoint*)this_ptr;
1915 uint16_t* ret = malloc(sizeof(uint16_t));
1916 *ret = OutPoint_get_index(this_ptr_conv);
1920 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutPoint_1set_1index(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1921 LDKOutPoint* this_ptr_conv = (LDKOutPoint*)this_ptr;
1922 uint16_t val_conv = *(uint16_t*)val;
1924 return OutPoint_set_index(this_ptr_conv, val_conv);
1927 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutPoint_1new(JNIEnv * _env, jclass _b, jlong txid_arg, jlong index_arg) {
1928 LDKThirtyTwoBytes txid_arg_conv = *(LDKThirtyTwoBytes*)txid_arg;
1929 free((void*)txid_arg);
1930 uint16_t index_arg_conv = *(uint16_t*)index_arg;
1931 free((void*)index_arg);
1932 LDKOutPoint* ret = malloc(sizeof(LDKOutPoint));
1933 *ret = OutPoint_new(txid_arg_conv, index_arg_conv);
1934 assert(!ret->_underlying_ref);
1935 ret->_underlying_ref = true;
1939 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutPoint_1to_1channel_1id(JNIEnv * _env, jclass _b, jlong this_arg) {
1940 LDKOutPoint* this_arg_conv = (LDKOutPoint*)this_arg;
1941 LDKThirtyTwoBytes* ret = malloc(sizeof(LDKThirtyTwoBytes));
1942 *ret = OutPoint_to_channel_id(this_arg_conv);
1946 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutPoint_1write(JNIEnv * _env, jclass _b, jlong obj) {
1947 LDKOutPoint* obj_conv = (LDKOutPoint*)obj;
1948 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
1949 *ret = OutPoint_write(obj_conv);
1953 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutPoint_1read(JNIEnv * _env, jclass _b, jlong ser) {
1954 LDKu8slice ser_conv = *(LDKu8slice*)ser;
1956 LDKOutPoint* ret = malloc(sizeof(LDKOutPoint));
1957 *ret = OutPoint_read(ser_conv);
1958 assert(!ret->_underlying_ref);
1959 ret->_underlying_ref = true;
1963 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpendableOutputDescriptor_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1964 LDKSpendableOutputDescriptor this_ptr_conv = *(LDKSpendableOutputDescriptor*)this_ptr;
1965 free((void*)this_ptr);
1966 return SpendableOutputDescriptor_free(this_ptr_conv);
1969 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1970 LDKChannelKeys this_ptr_conv = *(LDKChannelKeys*)this_ptr;
1971 free((void*)this_ptr);
1972 return ChannelKeys_free(this_ptr_conv);
1975 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_KeysInterface_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1976 LDKKeysInterface this_ptr_conv = *(LDKKeysInterface*)this_ptr;
1977 free((void*)this_ptr);
1978 return KeysInterface_free(this_ptr_conv);
1981 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1982 LDKInMemoryChannelKeys this_ptr_conv = *(LDKInMemoryChannelKeys*)this_ptr;
1983 free((void*)this_ptr);
1984 this_ptr_conv._underlying_ref = false;
1985 return InMemoryChannelKeys_free(this_ptr_conv);
1988 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1funding_1key(JNIEnv * _env, jclass _b, jlong this_ptr) {
1989 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
1990 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
1991 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *InMemoryChannelKeys_get_funding_key(this_ptr_conv));
1995 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1funding_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1996 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
1997 LDKSecretKey val_conv = *(LDKSecretKey*)val;
1999 return InMemoryChannelKeys_set_funding_key(this_ptr_conv, val_conv);
2002 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1revocation_1base_1key(JNIEnv * _env, jclass _b, jlong this_ptr) {
2003 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2004 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
2005 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *InMemoryChannelKeys_get_revocation_base_key(this_ptr_conv));
2009 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1revocation_1base_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2010 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2011 LDKSecretKey val_conv = *(LDKSecretKey*)val;
2013 return InMemoryChannelKeys_set_revocation_base_key(this_ptr_conv, val_conv);
2016 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1payment_1key(JNIEnv * _env, jclass _b, jlong this_ptr) {
2017 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2018 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
2019 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *InMemoryChannelKeys_get_payment_key(this_ptr_conv));
2023 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1payment_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2024 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2025 LDKSecretKey val_conv = *(LDKSecretKey*)val;
2027 return InMemoryChannelKeys_set_payment_key(this_ptr_conv, val_conv);
2030 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1delayed_1payment_1base_1key(JNIEnv * _env, jclass _b, jlong this_ptr) {
2031 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2032 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
2033 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *InMemoryChannelKeys_get_delayed_payment_base_key(this_ptr_conv));
2037 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1delayed_1payment_1base_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2038 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2039 LDKSecretKey val_conv = *(LDKSecretKey*)val;
2041 return InMemoryChannelKeys_set_delayed_payment_base_key(this_ptr_conv, val_conv);
2044 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1htlc_1base_1key(JNIEnv * _env, jclass _b, jlong this_ptr) {
2045 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2046 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
2047 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *InMemoryChannelKeys_get_htlc_base_key(this_ptr_conv));
2051 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1htlc_1base_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2052 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2053 LDKSecretKey val_conv = *(LDKSecretKey*)val;
2055 return InMemoryChannelKeys_set_htlc_base_key(this_ptr_conv, val_conv);
2058 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1commitment_1seed(JNIEnv * _env, jclass _b, jlong this_ptr) {
2059 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2060 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
2061 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *InMemoryChannelKeys_get_commitment_seed(this_ptr_conv));
2065 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1commitment_1seed(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2066 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2067 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
2069 return InMemoryChannelKeys_set_commitment_seed(this_ptr_conv, val_conv);
2072 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) {
2073 LDKSecretKey funding_key_conv = *(LDKSecretKey*)funding_key;
2074 free((void*)funding_key);
2075 LDKSecretKey revocation_base_key_conv = *(LDKSecretKey*)revocation_base_key;
2076 free((void*)revocation_base_key);
2077 LDKSecretKey payment_key_conv = *(LDKSecretKey*)payment_key;
2078 free((void*)payment_key);
2079 LDKSecretKey delayed_payment_base_key_conv = *(LDKSecretKey*)delayed_payment_base_key;
2080 free((void*)delayed_payment_base_key);
2081 LDKSecretKey htlc_base_key_conv = *(LDKSecretKey*)htlc_base_key;
2082 free((void*)htlc_base_key);
2083 LDKThirtyTwoBytes commitment_seed_conv = *(LDKThirtyTwoBytes*)commitment_seed;
2084 free((void*)commitment_seed);
2085 LDKC2Tuple_u64u64Z key_derivation_params_conv = *(LDKC2Tuple_u64u64Z*)key_derivation_params;
2086 free((void*)key_derivation_params);
2087 LDKInMemoryChannelKeys* ret = malloc(sizeof(LDKInMemoryChannelKeys));
2088 *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);
2089 assert(!ret->_underlying_ref);
2090 ret->_underlying_ref = true;
2094 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1remote_1pubkeys(JNIEnv * _env, jclass _b, jlong this_arg) {
2095 LDKInMemoryChannelKeys* this_arg_conv = (LDKInMemoryChannelKeys*)this_arg;
2096 LDKChannelPublicKeys* ret = malloc(sizeof(LDKChannelPublicKeys));
2097 *ret = InMemoryChannelKeys_remote_pubkeys(this_arg_conv);
2098 assert(!ret->_underlying_ref);
2099 ret->_underlying_ref = true;
2103 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1remote_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_arg) {
2104 LDKInMemoryChannelKeys* this_arg_conv = (LDKInMemoryChannelKeys*)this_arg;
2105 uint16_t* ret = malloc(sizeof(uint16_t));
2106 *ret = InMemoryChannelKeys_remote_to_self_delay(this_arg_conv);
2110 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1local_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_arg) {
2111 LDKInMemoryChannelKeys* this_arg_conv = (LDKInMemoryChannelKeys*)this_arg;
2112 uint16_t* ret = malloc(sizeof(uint16_t));
2113 *ret = InMemoryChannelKeys_local_to_self_delay(this_arg_conv);
2117 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1as_1ChannelKeys(JNIEnv * _env, jclass _b, jlong this_arg) {
2118 LDKInMemoryChannelKeys* this_arg_conv = (LDKInMemoryChannelKeys*)this_arg;
2119 LDKChannelKeys* ret = malloc(sizeof(LDKChannelKeys));
2120 *ret = InMemoryChannelKeys_as_ChannelKeys(this_arg_conv);
2124 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1write(JNIEnv * _env, jclass _b, jlong obj) {
2125 LDKInMemoryChannelKeys* obj_conv = (LDKInMemoryChannelKeys*)obj;
2126 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
2127 *ret = InMemoryChannelKeys_write(obj_conv);
2131 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1read(JNIEnv * _env, jclass _b, jlong ser) {
2132 LDKu8slice ser_conv = *(LDKu8slice*)ser;
2134 LDKInMemoryChannelKeys* ret = malloc(sizeof(LDKInMemoryChannelKeys));
2135 *ret = InMemoryChannelKeys_read(ser_conv);
2136 assert(!ret->_underlying_ref);
2137 ret->_underlying_ref = true;
2141 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_KeysManager_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2142 LDKKeysManager this_ptr_conv = *(LDKKeysManager*)this_ptr;
2143 free((void*)this_ptr);
2144 this_ptr_conv._underlying_ref = false;
2145 return KeysManager_free(this_ptr_conv);
2148 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) {
2149 unsigned char seed_arr[32];
2150 (*_env)->GetByteArrayRegion (_env, seed, 0, 32, seed_arr);
2151 unsigned char (*seed_ref)[32] = &seed_arr;
2152 LDKNetwork network_conv = *(LDKNetwork*)network;
2153 free((void*)network);
2154 LDKKeysManager* ret = malloc(sizeof(LDKKeysManager));
2155 *ret = KeysManager_new(seed_ref, network_conv, starting_time_secs, starting_time_nanos);
2156 assert(!ret->_underlying_ref);
2157 ret->_underlying_ref = true;
2161 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) {
2162 LDKKeysManager* this_arg_conv = (LDKKeysManager*)this_arg;
2163 LDKInMemoryChannelKeys* ret = malloc(sizeof(LDKInMemoryChannelKeys));
2164 *ret = KeysManager_derive_channel_keys(this_arg_conv, channel_value_satoshis, params_1, params_2);
2165 assert(!ret->_underlying_ref);
2166 ret->_underlying_ref = true;
2170 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1KeysInterface(JNIEnv * _env, jclass _b, jlong this_arg) {
2171 LDKKeysManager* this_arg_conv = (LDKKeysManager*)this_arg;
2172 LDKKeysInterface* ret = malloc(sizeof(LDKKeysInterface));
2173 *ret = KeysManager_as_KeysInterface(this_arg_conv);
2177 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2178 LDKChannelManager this_ptr_conv = *(LDKChannelManager*)this_ptr;
2179 free((void*)this_ptr);
2180 this_ptr_conv._underlying_ref = false;
2181 return ChannelManager_free(this_ptr_conv);
2184 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2185 LDKChannelDetails this_ptr_conv = *(LDKChannelDetails*)this_ptr;
2186 free((void*)this_ptr);
2187 this_ptr_conv._underlying_ref = false;
2188 return ChannelDetails_free(this_ptr_conv);
2191 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
2192 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2193 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
2194 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *ChannelDetails_get_channel_id(this_ptr_conv));
2198 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2199 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2200 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
2202 return ChannelDetails_set_channel_id(this_ptr_conv, val_conv);
2205 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1remote_1network_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
2206 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2207 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
2208 *ret = ChannelDetails_get_remote_network_id(this_ptr_conv);
2212 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1remote_1network_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2213 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2214 LDKPublicKey val_conv = *(LDKPublicKey*)val;
2216 return ChannelDetails_set_remote_network_id(this_ptr_conv, val_conv);
2219 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1counterparty_1features(JNIEnv * _env, jclass _b, jlong this_ptr) {
2220 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2221 LDKInitFeatures* ret = malloc(sizeof(LDKInitFeatures));
2222 *ret = ChannelDetails_get_counterparty_features(this_ptr_conv);
2223 assert(!ret->_underlying_ref);
2224 ret->_underlying_ref = true;
2228 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1counterparty_1features(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2229 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2230 LDKInitFeatures val_conv = *(LDKInitFeatures*)val;
2232 val_conv._underlying_ref = false;
2233 return ChannelDetails_set_counterparty_features(this_ptr_conv, val_conv);
2236 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1channel_1value_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
2237 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2238 return ChannelDetails_get_channel_value_satoshis(this_ptr_conv);
2241 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1channel_1value_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2242 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2243 return ChannelDetails_set_channel_value_satoshis(this_ptr_conv, val);
2246 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1user_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
2247 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2248 return ChannelDetails_get_user_id(this_ptr_conv);
2251 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1user_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2252 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2253 return ChannelDetails_set_user_id(this_ptr_conv, val);
2256 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1outbound_1capacity_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
2257 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2258 return ChannelDetails_get_outbound_capacity_msat(this_ptr_conv);
2261 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1outbound_1capacity_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2262 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2263 return ChannelDetails_set_outbound_capacity_msat(this_ptr_conv, val);
2266 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1inbound_1capacity_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
2267 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2268 return ChannelDetails_get_inbound_capacity_msat(this_ptr_conv);
2271 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1inbound_1capacity_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2272 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2273 return ChannelDetails_set_inbound_capacity_msat(this_ptr_conv, val);
2276 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1is_1live(JNIEnv * _env, jclass _b, jlong this_ptr) {
2277 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2278 return ChannelDetails_get_is_live(this_ptr_conv);
2281 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1is_1live(JNIEnv * _env, jclass _b, jlong this_ptr, jboolean val) {
2282 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2283 return ChannelDetails_set_is_live(this_ptr_conv, val);
2286 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PaymentSendFailure_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2287 LDKPaymentSendFailure this_ptr_conv = *(LDKPaymentSendFailure*)this_ptr;
2288 free((void*)this_ptr);
2289 this_ptr_conv._underlying_ref = false;
2290 return PaymentSendFailure_free(this_ptr_conv);
2293 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) {
2294 LDKNetwork network_conv = *(LDKNetwork*)network;
2295 free((void*)network);
2296 LDKFeeEstimator fee_est_conv = *(LDKFeeEstimator*)fee_est;
2297 free((void*)fee_est);
2298 LDKManyChannelMonitor monitor_conv = *(LDKManyChannelMonitor*)monitor;
2299 free((void*)monitor);
2300 LDKBroadcasterInterface tx_broadcaster_conv = *(LDKBroadcasterInterface*)tx_broadcaster;
2301 free((void*)tx_broadcaster);
2302 LDKLogger logger_conv = *(LDKLogger*)logger;
2303 free((void*)logger);
2304 LDKKeysInterface keys_manager_conv = *(LDKKeysInterface*)keys_manager;
2305 free((void*)keys_manager);
2306 LDKUserConfig config_conv = *(LDKUserConfig*)config;
2307 free((void*)config);
2308 config_conv._underlying_ref = false;
2309 uintptr_t current_blockchain_height_conv = *(uintptr_t*)current_blockchain_height;
2310 free((void*)current_blockchain_height);
2311 LDKChannelManager* ret = malloc(sizeof(LDKChannelManager));
2312 *ret = ChannelManager_new(network_conv, fee_est_conv, monitor_conv, tx_broadcaster_conv, logger_conv, keys_manager_conv, config_conv, current_blockchain_height_conv);
2313 assert(!ret->_underlying_ref);
2314 ret->_underlying_ref = true;
2318 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) {
2319 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2320 LDKPublicKey their_network_key_conv = *(LDKPublicKey*)their_network_key;
2321 free((void*)their_network_key);
2322 LDKUserConfig override_config_conv = *(LDKUserConfig*)override_config;
2323 free((void*)override_config);
2324 override_config_conv._underlying_ref = false;
2325 LDKCResult_NoneAPIErrorZ* ret = malloc(sizeof(LDKCResult_NoneAPIErrorZ));
2326 *ret = ChannelManager_create_channel(this_arg_conv, their_network_key_conv, channel_value_satoshis, push_msat, user_id, override_config_conv);
2330 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1list_1channels(JNIEnv * _env, jclass _b, jlong this_arg) {
2331 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2332 LDKCVec_ChannelDetailsZ* ret = malloc(sizeof(LDKCVec_ChannelDetailsZ));
2333 *ret = ChannelManager_list_channels(this_arg_conv);
2337 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1list_1usable_1channels(JNIEnv * _env, jclass _b, jlong this_arg) {
2338 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2339 LDKCVec_ChannelDetailsZ* ret = malloc(sizeof(LDKCVec_ChannelDetailsZ));
2340 *ret = ChannelManager_list_usable_channels(this_arg_conv);
2344 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1close_1channel(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray channel_id) {
2345 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2346 unsigned char channel_id_arr[32];
2347 (*_env)->GetByteArrayRegion (_env, channel_id, 0, 32, channel_id_arr);
2348 unsigned char (*channel_id_ref)[32] = &channel_id_arr;
2349 LDKCResult_NoneAPIErrorZ* ret = malloc(sizeof(LDKCResult_NoneAPIErrorZ));
2350 *ret = ChannelManager_close_channel(this_arg_conv, channel_id_ref);
2354 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1force_1close_1channel(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray channel_id) {
2355 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2356 unsigned char channel_id_arr[32];
2357 (*_env)->GetByteArrayRegion (_env, channel_id, 0, 32, channel_id_arr);
2358 unsigned char (*channel_id_ref)[32] = &channel_id_arr;
2359 return ChannelManager_force_close_channel(this_arg_conv, channel_id_ref);
2362 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1force_1close_1all_1channels(JNIEnv * _env, jclass _b, jlong this_arg) {
2363 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2364 return ChannelManager_force_close_all_channels(this_arg_conv);
2367 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) {
2368 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2369 LDKRoute* route_conv = (LDKRoute*)route;
2370 LDKThirtyTwoBytes payment_hash_conv = *(LDKThirtyTwoBytes*)payment_hash;
2371 free((void*)payment_hash);
2372 LDKThirtyTwoBytes payment_secret_conv = *(LDKThirtyTwoBytes*)payment_secret;
2373 free((void*)payment_secret);
2374 LDKCResult_NonePaymentSendFailureZ* ret = malloc(sizeof(LDKCResult_NonePaymentSendFailureZ));
2375 *ret = ChannelManager_send_payment(this_arg_conv, route_conv, payment_hash_conv, payment_secret_conv);
2379 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) {
2380 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2381 unsigned char temporary_channel_id_arr[32];
2382 (*_env)->GetByteArrayRegion (_env, temporary_channel_id, 0, 32, temporary_channel_id_arr);
2383 unsigned char (*temporary_channel_id_ref)[32] = &temporary_channel_id_arr;
2384 LDKOutPoint funding_txo_conv = *(LDKOutPoint*)funding_txo;
2385 free((void*)funding_txo);
2386 funding_txo_conv._underlying_ref = false;
2387 return ChannelManager_funding_transaction_generated(this_arg_conv, temporary_channel_id_ref, funding_txo_conv);
2390 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) {
2391 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2392 LDKThreeBytes rgb_conv = *(LDKThreeBytes*)rgb;
2394 LDKThirtyTwoBytes alias_conv = *(LDKThirtyTwoBytes*)alias;
2396 LDKCVec_NetAddressZ addresses_conv = *(LDKCVec_NetAddressZ*)addresses;
2397 free((void*)addresses);
2398 return ChannelManager_broadcast_node_announcement(this_arg_conv, rgb_conv, alias_conv, addresses_conv);
2401 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1process_1pending_1htlc_1forwards(JNIEnv * _env, jclass _b, jlong this_arg) {
2402 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2403 return ChannelManager_process_pending_htlc_forwards(this_arg_conv);
2406 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1timer_1chan_1freshness_1every_1min(JNIEnv * _env, jclass _b, jlong this_arg) {
2407 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2408 return ChannelManager_timer_chan_freshness_every_min(this_arg_conv);
2411 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) {
2412 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2413 unsigned char payment_hash_arr[32];
2414 (*_env)->GetByteArrayRegion (_env, payment_hash, 0, 32, payment_hash_arr);
2415 unsigned char (*payment_hash_ref)[32] = &payment_hash_arr;
2416 LDKThirtyTwoBytes payment_secret_conv = *(LDKThirtyTwoBytes*)payment_secret;
2417 free((void*)payment_secret);
2418 return ChannelManager_fail_htlc_backwards(this_arg_conv, payment_hash_ref, payment_secret_conv);
2421 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) {
2422 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2423 LDKThirtyTwoBytes payment_preimage_conv = *(LDKThirtyTwoBytes*)payment_preimage;
2424 free((void*)payment_preimage);
2425 LDKThirtyTwoBytes payment_secret_conv = *(LDKThirtyTwoBytes*)payment_secret;
2426 free((void*)payment_secret);
2427 return ChannelManager_claim_funds(this_arg_conv, payment_preimage_conv, payment_secret_conv, expected_amount);
2430 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1get_1our_1node_1id(JNIEnv * _env, jclass _b, jlong this_arg) {
2431 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2432 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
2433 *ret = ChannelManager_get_our_node_id(this_arg_conv);
2437 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) {
2438 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2439 LDKOutPoint* funding_txo_conv = (LDKOutPoint*)funding_txo;
2440 return ChannelManager_channel_monitor_updated(this_arg_conv, funding_txo_conv, highest_applied_update_id);
2443 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1MessageSendEventsProvider(JNIEnv * _env, jclass _b, jlong this_arg) {
2444 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2445 LDKMessageSendEventsProvider* ret = malloc(sizeof(LDKMessageSendEventsProvider));
2446 *ret = ChannelManager_as_MessageSendEventsProvider(this_arg_conv);
2450 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1EventsProvider(JNIEnv * _env, jclass _b, jlong this_arg) {
2451 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2452 LDKEventsProvider* ret = malloc(sizeof(LDKEventsProvider));
2453 *ret = ChannelManager_as_EventsProvider(this_arg_conv);
2457 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1ChainListener(JNIEnv * _env, jclass _b, jlong this_arg) {
2458 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2459 LDKChainListener* ret = malloc(sizeof(LDKChainListener));
2460 *ret = ChannelManager_as_ChainListener(this_arg_conv);
2464 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1ChannelMessageHandler(JNIEnv * _env, jclass _b, jlong this_arg) {
2465 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2466 LDKChannelMessageHandler* ret = malloc(sizeof(LDKChannelMessageHandler));
2467 *ret = ChannelManager_as_ChannelMessageHandler(this_arg_conv);
2471 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2472 LDKChannelManagerReadArgs this_ptr_conv = *(LDKChannelManagerReadArgs*)this_ptr;
2473 free((void*)this_ptr);
2474 this_ptr_conv._underlying_ref = false;
2475 return ChannelManagerReadArgs_free(this_ptr_conv);
2478 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1get_1keys_1manager(JNIEnv * _env, jclass _b, jlong this_ptr) {
2479 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2480 return (long) ChannelManagerReadArgs_get_keys_manager(this_ptr_conv);
2483 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1set_1keys_1manager(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2484 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2485 LDKKeysInterface val_conv = *(LDKKeysInterface*)val;
2487 return ChannelManagerReadArgs_set_keys_manager(this_ptr_conv, val_conv);
2490 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1get_1fee_1estimator(JNIEnv * _env, jclass _b, jlong this_ptr) {
2491 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2492 return (long) ChannelManagerReadArgs_get_fee_estimator(this_ptr_conv);
2495 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1set_1fee_1estimator(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2496 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2497 LDKFeeEstimator val_conv = *(LDKFeeEstimator*)val;
2499 return ChannelManagerReadArgs_set_fee_estimator(this_ptr_conv, val_conv);
2502 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1get_1monitor(JNIEnv * _env, jclass _b, jlong this_ptr) {
2503 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2504 return (long) ChannelManagerReadArgs_get_monitor(this_ptr_conv);
2507 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1set_1monitor(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2508 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2509 LDKManyChannelMonitor val_conv = *(LDKManyChannelMonitor*)val;
2511 return ChannelManagerReadArgs_set_monitor(this_ptr_conv, val_conv);
2514 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1get_1tx_1broadcaster(JNIEnv * _env, jclass _b, jlong this_ptr) {
2515 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2516 return (long) ChannelManagerReadArgs_get_tx_broadcaster(this_ptr_conv);
2519 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1set_1tx_1broadcaster(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2520 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2521 LDKBroadcasterInterface val_conv = *(LDKBroadcasterInterface*)val;
2523 return ChannelManagerReadArgs_set_tx_broadcaster(this_ptr_conv, val_conv);
2526 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1get_1logger(JNIEnv * _env, jclass _b, jlong this_ptr) {
2527 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2528 return (long) ChannelManagerReadArgs_get_logger(this_ptr_conv);
2531 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1set_1logger(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2532 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2533 LDKLogger val_conv = *(LDKLogger*)val;
2535 return ChannelManagerReadArgs_set_logger(this_ptr_conv, val_conv);
2538 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1get_1default_1config(JNIEnv * _env, jclass _b, jlong this_ptr) {
2539 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2540 LDKUserConfig* ret = malloc(sizeof(LDKUserConfig));
2541 *ret = ChannelManagerReadArgs_get_default_config(this_ptr_conv);
2542 assert(!ret->_underlying_ref);
2543 ret->_underlying_ref = true;
2547 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1set_1default_1config(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2548 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2549 LDKUserConfig val_conv = *(LDKUserConfig*)val;
2551 val_conv._underlying_ref = false;
2552 return ChannelManagerReadArgs_set_default_config(this_ptr_conv, val_conv);
2555 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) {
2556 LDKKeysInterface keys_manager_conv = *(LDKKeysInterface*)keys_manager;
2557 free((void*)keys_manager);
2558 LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)fee_estimator;
2559 free((void*)fee_estimator);
2560 LDKManyChannelMonitor monitor_conv = *(LDKManyChannelMonitor*)monitor;
2561 free((void*)monitor);
2562 LDKBroadcasterInterface tx_broadcaster_conv = *(LDKBroadcasterInterface*)tx_broadcaster;
2563 free((void*)tx_broadcaster);
2564 LDKLogger logger_conv = *(LDKLogger*)logger;
2565 free((void*)logger);
2566 LDKUserConfig default_config_conv = *(LDKUserConfig*)default_config;
2567 free((void*)default_config);
2568 default_config_conv._underlying_ref = false;
2569 LDKCVec_ChannelMonitorZ channel_monitors_conv = *(LDKCVec_ChannelMonitorZ*)channel_monitors;
2570 free((void*)channel_monitors);
2571 LDKChannelManagerReadArgs* ret = malloc(sizeof(LDKChannelManagerReadArgs));
2572 *ret = ChannelManagerReadArgs_new(keys_manager_conv, fee_estimator_conv, monitor_conv, tx_broadcaster_conv, logger_conv, default_config_conv, channel_monitors_conv);
2573 assert(!ret->_underlying_ref);
2574 ret->_underlying_ref = true;
2578 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2579 LDKChannelMonitorUpdate this_ptr_conv = *(LDKChannelMonitorUpdate*)this_ptr;
2580 free((void*)this_ptr);
2581 this_ptr_conv._underlying_ref = false;
2582 return ChannelMonitorUpdate_free(this_ptr_conv);
2585 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1get_1update_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
2586 LDKChannelMonitorUpdate* this_ptr_conv = (LDKChannelMonitorUpdate*)this_ptr;
2587 return ChannelMonitorUpdate_get_update_id(this_ptr_conv);
2590 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1set_1update_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2591 LDKChannelMonitorUpdate* this_ptr_conv = (LDKChannelMonitorUpdate*)this_ptr;
2592 return ChannelMonitorUpdate_set_update_id(this_ptr_conv, val);
2595 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1write(JNIEnv * _env, jclass _b, jlong obj) {
2596 LDKChannelMonitorUpdate* obj_conv = (LDKChannelMonitorUpdate*)obj;
2597 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
2598 *ret = ChannelMonitorUpdate_write(obj_conv);
2602 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1read(JNIEnv * _env, jclass _b, jlong ser) {
2603 LDKu8slice ser_conv = *(LDKu8slice*)ser;
2605 LDKChannelMonitorUpdate* ret = malloc(sizeof(LDKChannelMonitorUpdate));
2606 *ret = ChannelMonitorUpdate_read(ser_conv);
2607 assert(!ret->_underlying_ref);
2608 ret->_underlying_ref = true;
2612 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_MonitorUpdateError_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2613 LDKMonitorUpdateError this_ptr_conv = *(LDKMonitorUpdateError*)this_ptr;
2614 free((void*)this_ptr);
2615 this_ptr_conv._underlying_ref = false;
2616 return MonitorUpdateError_free(this_ptr_conv);
2619 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2620 LDKMonitorEvent this_ptr_conv = *(LDKMonitorEvent*)this_ptr;
2621 free((void*)this_ptr);
2622 this_ptr_conv._underlying_ref = false;
2623 return MonitorEvent_free(this_ptr_conv);
2626 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCUpdate_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2627 LDKHTLCUpdate this_ptr_conv = *(LDKHTLCUpdate*)this_ptr;
2628 free((void*)this_ptr);
2629 this_ptr_conv._underlying_ref = false;
2630 return HTLCUpdate_free(this_ptr_conv);
2633 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCUpdate_1write(JNIEnv * _env, jclass _b, jlong obj) {
2634 LDKHTLCUpdate* obj_conv = (LDKHTLCUpdate*)obj;
2635 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
2636 *ret = HTLCUpdate_write(obj_conv);
2640 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCUpdate_1read(JNIEnv * _env, jclass _b, jlong ser) {
2641 LDKu8slice ser_conv = *(LDKu8slice*)ser;
2643 LDKHTLCUpdate* ret = malloc(sizeof(LDKHTLCUpdate));
2644 *ret = HTLCUpdate_read(ser_conv);
2645 assert(!ret->_underlying_ref);
2646 ret->_underlying_ref = true;
2650 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2651 LDKChannelMonitor this_ptr_conv = *(LDKChannelMonitor*)this_ptr;
2652 free((void*)this_ptr);
2653 this_ptr_conv._underlying_ref = false;
2654 return ChannelMonitor_free(this_ptr_conv);
2657 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ManyChannelMonitor_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2658 LDKManyChannelMonitor this_ptr_conv = *(LDKManyChannelMonitor*)this_ptr;
2659 free((void*)this_ptr);
2660 return ManyChannelMonitor_free(this_ptr_conv);
2663 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1update_1monitor(JNIEnv * _env, jclass _b, jlong this_arg, jlong updates, jlong broadcaster, jlong logger) {
2664 LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg;
2665 LDKChannelMonitorUpdate updates_conv = *(LDKChannelMonitorUpdate*)updates;
2666 free((void*)updates);
2667 updates_conv._underlying_ref = false;
2668 LDKBroadcasterInterface* broadcaster_conv = (LDKBroadcasterInterface*)broadcaster;
2669 LDKLogger* logger_conv = (LDKLogger*)logger;
2670 LDKCResult_NoneMonitorUpdateErrorZ* ret = malloc(sizeof(LDKCResult_NoneMonitorUpdateErrorZ));
2671 *ret = ChannelMonitor_update_monitor(this_arg_conv, updates_conv, broadcaster_conv, logger_conv);
2675 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1latest_1update_1id(JNIEnv * _env, jclass _b, jlong this_arg) {
2676 LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg;
2677 return ChannelMonitor_get_latest_update_id(this_arg_conv);
2680 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1funding_1txo(JNIEnv * _env, jclass _b, jlong this_arg) {
2681 LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg;
2682 LDKC2Tuple_OutPointScriptZ* ret = malloc(sizeof(LDKC2Tuple_OutPointScriptZ));
2683 *ret = ChannelMonitor_get_funding_txo(this_arg_conv);
2687 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1and_1clear_1pending_1monitor_1events(JNIEnv * _env, jclass _b, jlong this_arg) {
2688 LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg;
2689 LDKCVec_MonitorEventZ* ret = malloc(sizeof(LDKCVec_MonitorEventZ));
2690 *ret = ChannelMonitor_get_and_clear_pending_monitor_events(this_arg_conv);
2694 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1and_1clear_1pending_1events(JNIEnv * _env, jclass _b, jlong this_arg) {
2695 LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg;
2696 LDKCVec_EventZ* ret = malloc(sizeof(LDKCVec_EventZ));
2697 *ret = ChannelMonitor_get_and_clear_pending_events(this_arg_conv);
2701 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1latest_1local_1commitment_1txn(JNIEnv * _env, jclass _b, jlong this_arg, jlong logger) {
2702 LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg;
2703 LDKLogger* logger_conv = (LDKLogger*)logger;
2704 LDKCVec_TransactionZ* ret = malloc(sizeof(LDKCVec_TransactionZ));
2705 *ret = ChannelMonitor_get_latest_local_commitment_txn(this_arg_conv, logger_conv);
2709 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DecodeError_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2710 LDKDecodeError this_ptr_conv = *(LDKDecodeError*)this_ptr;
2711 free((void*)this_ptr);
2712 this_ptr_conv._underlying_ref = false;
2713 return DecodeError_free(this_ptr_conv);
2716 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Init_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2717 LDKInit this_ptr_conv = *(LDKInit*)this_ptr;
2718 free((void*)this_ptr);
2719 this_ptr_conv._underlying_ref = false;
2720 return Init_free(this_ptr_conv);
2723 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2724 LDKErrorMessage this_ptr_conv = *(LDKErrorMessage*)this_ptr;
2725 free((void*)this_ptr);
2726 this_ptr_conv._underlying_ref = false;
2727 return ErrorMessage_free(this_ptr_conv);
2730 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
2731 LDKErrorMessage* this_ptr_conv = (LDKErrorMessage*)this_ptr;
2732 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
2733 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *ErrorMessage_get_channel_id(this_ptr_conv));
2737 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2738 LDKErrorMessage* this_ptr_conv = (LDKErrorMessage*)this_ptr;
2739 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
2741 return ErrorMessage_set_channel_id(this_ptr_conv, val_conv);
2744 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1get_1data(JNIEnv * _env, jclass _b, jlong this_ptr) {
2745 LDKErrorMessage* this_ptr_conv = (LDKErrorMessage*)this_ptr;
2746 LDKStr* ret = malloc(sizeof(LDKStr));
2747 *ret = ErrorMessage_get_data(this_ptr_conv);
2751 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1set_1data(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2752 LDKErrorMessage* this_ptr_conv = (LDKErrorMessage*)this_ptr;
2753 LDKCVec_u8Z val_conv = *(LDKCVec_u8Z*)val;
2755 return ErrorMessage_set_data(this_ptr_conv, val_conv);
2758 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1new(JNIEnv * _env, jclass _b, jlong channel_id_arg, jlong data_arg) {
2759 LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
2760 free((void*)channel_id_arg);
2761 LDKCVec_u8Z data_arg_conv = *(LDKCVec_u8Z*)data_arg;
2762 free((void*)data_arg);
2763 LDKErrorMessage* ret = malloc(sizeof(LDKErrorMessage));
2764 *ret = ErrorMessage_new(channel_id_arg_conv, data_arg_conv);
2765 assert(!ret->_underlying_ref);
2766 ret->_underlying_ref = true;
2770 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Ping_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2771 LDKPing this_ptr_conv = *(LDKPing*)this_ptr;
2772 free((void*)this_ptr);
2773 this_ptr_conv._underlying_ref = false;
2774 return Ping_free(this_ptr_conv);
2777 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Ping_1get_1ponglen(JNIEnv * _env, jclass _b, jlong this_ptr) {
2778 LDKPing* this_ptr_conv = (LDKPing*)this_ptr;
2779 uint16_t* ret = malloc(sizeof(uint16_t));
2780 *ret = Ping_get_ponglen(this_ptr_conv);
2784 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Ping_1set_1ponglen(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2785 LDKPing* this_ptr_conv = (LDKPing*)this_ptr;
2786 uint16_t val_conv = *(uint16_t*)val;
2788 return Ping_set_ponglen(this_ptr_conv, val_conv);
2791 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Ping_1get_1byteslen(JNIEnv * _env, jclass _b, jlong this_ptr) {
2792 LDKPing* this_ptr_conv = (LDKPing*)this_ptr;
2793 uint16_t* ret = malloc(sizeof(uint16_t));
2794 *ret = Ping_get_byteslen(this_ptr_conv);
2798 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Ping_1set_1byteslen(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2799 LDKPing* this_ptr_conv = (LDKPing*)this_ptr;
2800 uint16_t val_conv = *(uint16_t*)val;
2802 return Ping_set_byteslen(this_ptr_conv, val_conv);
2805 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Ping_1new(JNIEnv * _env, jclass _b, jlong ponglen_arg, jlong byteslen_arg) {
2806 uint16_t ponglen_arg_conv = *(uint16_t*)ponglen_arg;
2807 free((void*)ponglen_arg);
2808 uint16_t byteslen_arg_conv = *(uint16_t*)byteslen_arg;
2809 free((void*)byteslen_arg);
2810 LDKPing* ret = malloc(sizeof(LDKPing));
2811 *ret = Ping_new(ponglen_arg_conv, byteslen_arg_conv);
2812 assert(!ret->_underlying_ref);
2813 ret->_underlying_ref = true;
2817 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Pong_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2818 LDKPong this_ptr_conv = *(LDKPong*)this_ptr;
2819 free((void*)this_ptr);
2820 this_ptr_conv._underlying_ref = false;
2821 return Pong_free(this_ptr_conv);
2824 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Pong_1get_1byteslen(JNIEnv * _env, jclass _b, jlong this_ptr) {
2825 LDKPong* this_ptr_conv = (LDKPong*)this_ptr;
2826 uint16_t* ret = malloc(sizeof(uint16_t));
2827 *ret = Pong_get_byteslen(this_ptr_conv);
2831 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Pong_1set_1byteslen(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2832 LDKPong* this_ptr_conv = (LDKPong*)this_ptr;
2833 uint16_t val_conv = *(uint16_t*)val;
2835 return Pong_set_byteslen(this_ptr_conv, val_conv);
2838 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Pong_1new(JNIEnv * _env, jclass _b, jlong byteslen_arg) {
2839 uint16_t byteslen_arg_conv = *(uint16_t*)byteslen_arg;
2840 free((void*)byteslen_arg);
2841 LDKPong* ret = malloc(sizeof(LDKPong));
2842 *ret = Pong_new(byteslen_arg_conv);
2843 assert(!ret->_underlying_ref);
2844 ret->_underlying_ref = true;
2848 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2849 LDKOpenChannel this_ptr_conv = *(LDKOpenChannel*)this_ptr;
2850 free((void*)this_ptr);
2851 this_ptr_conv._underlying_ref = false;
2852 return OpenChannel_free(this_ptr_conv);
2855 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr) {
2856 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2857 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
2858 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *OpenChannel_get_chain_hash(this_ptr_conv));
2862 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2863 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2864 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
2866 return OpenChannel_set_chain_hash(this_ptr_conv, val_conv);
2869 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1temporary_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
2870 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2871 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
2872 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *OpenChannel_get_temporary_channel_id(this_ptr_conv));
2876 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1temporary_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2877 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2878 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
2880 return OpenChannel_set_temporary_channel_id(this_ptr_conv, val_conv);
2883 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1funding_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
2884 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2885 return OpenChannel_get_funding_satoshis(this_ptr_conv);
2888 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1funding_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2889 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2890 return OpenChannel_set_funding_satoshis(this_ptr_conv, val);
2893 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1push_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
2894 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2895 return OpenChannel_get_push_msat(this_ptr_conv);
2898 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1push_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2899 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2900 return OpenChannel_set_push_msat(this_ptr_conv, val);
2903 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1dust_1limit_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
2904 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2905 return OpenChannel_get_dust_limit_satoshis(this_ptr_conv);
2908 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1dust_1limit_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2909 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2910 return OpenChannel_set_dust_limit_satoshis(this_ptr_conv, val);
2913 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
2914 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2915 return OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr_conv);
2918 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) {
2919 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2920 return OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr_conv, val);
2923 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1reserve_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
2924 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2925 return OpenChannel_get_channel_reserve_satoshis(this_ptr_conv);
2928 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1reserve_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2929 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2930 return OpenChannel_set_channel_reserve_satoshis(this_ptr_conv, val);
2933 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
2934 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2935 return OpenChannel_get_htlc_minimum_msat(this_ptr_conv);
2938 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2939 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2940 return OpenChannel_set_htlc_minimum_msat(this_ptr_conv, val);
2943 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1feerate_1per_1kw(JNIEnv * _env, jclass _b, jlong this_ptr) {
2944 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2945 return OpenChannel_get_feerate_per_kw(this_ptr_conv);
2948 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1feerate_1per_1kw(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
2949 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2950 return OpenChannel_set_feerate_per_kw(this_ptr_conv, val);
2953 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_ptr) {
2954 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2955 uint16_t* ret = malloc(sizeof(uint16_t));
2956 *ret = OpenChannel_get_to_self_delay(this_ptr_conv);
2960 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2961 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2962 uint16_t val_conv = *(uint16_t*)val;
2964 return OpenChannel_set_to_self_delay(this_ptr_conv, val_conv);
2967 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1max_1accepted_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr) {
2968 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2969 uint16_t* ret = malloc(sizeof(uint16_t));
2970 *ret = OpenChannel_get_max_accepted_htlcs(this_ptr_conv);
2974 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1max_1accepted_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2975 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2976 uint16_t val_conv = *(uint16_t*)val;
2978 return OpenChannel_set_max_accepted_htlcs(this_ptr_conv, val_conv);
2981 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1funding_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr) {
2982 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2983 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
2984 *ret = OpenChannel_get_funding_pubkey(this_ptr_conv);
2988 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1funding_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2989 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2990 LDKPublicKey val_conv = *(LDKPublicKey*)val;
2992 return OpenChannel_set_funding_pubkey(this_ptr_conv, val_conv);
2995 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1revocation_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr) {
2996 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2997 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
2998 *ret = OpenChannel_get_revocation_basepoint(this_ptr_conv);
3002 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1revocation_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3003 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3004 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3006 return OpenChannel_set_revocation_basepoint(this_ptr_conv, val_conv);
3009 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1payment_1point(JNIEnv * _env, jclass _b, jlong this_ptr) {
3010 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3011 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3012 *ret = OpenChannel_get_payment_point(this_ptr_conv);
3016 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1payment_1point(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3017 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3018 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3020 return OpenChannel_set_payment_point(this_ptr_conv, val_conv);
3023 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1delayed_1payment_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr) {
3024 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3025 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3026 *ret = OpenChannel_get_delayed_payment_basepoint(this_ptr_conv);
3030 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1delayed_1payment_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3031 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3032 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3034 return OpenChannel_set_delayed_payment_basepoint(this_ptr_conv, val_conv);
3037 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1htlc_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr) {
3038 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3039 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3040 *ret = OpenChannel_get_htlc_basepoint(this_ptr_conv);
3044 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1htlc_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3045 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3046 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3048 return OpenChannel_set_htlc_basepoint(this_ptr_conv, val_conv);
3051 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1first_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr) {
3052 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3053 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3054 *ret = OpenChannel_get_first_per_commitment_point(this_ptr_conv);
3058 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1first_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3059 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3060 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3062 return OpenChannel_set_first_per_commitment_point(this_ptr_conv, val_conv);
3065 JNIEXPORT jbyte JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1flags(JNIEnv * _env, jclass _b, jlong this_ptr) {
3066 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3067 return OpenChannel_get_channel_flags(this_ptr_conv);
3070 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1flags(JNIEnv * _env, jclass _b, jlong this_ptr, jbyte val) {
3071 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3072 return OpenChannel_set_channel_flags(this_ptr_conv, val);
3075 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3076 LDKAcceptChannel this_ptr_conv = *(LDKAcceptChannel*)this_ptr;
3077 free((void*)this_ptr);
3078 this_ptr_conv._underlying_ref = false;
3079 return AcceptChannel_free(this_ptr_conv);
3082 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1temporary_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3083 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3084 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3085 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *AcceptChannel_get_temporary_channel_id(this_ptr_conv));
3089 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1temporary_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3090 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3091 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3093 return AcceptChannel_set_temporary_channel_id(this_ptr_conv, val_conv);
3096 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1dust_1limit_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
3097 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3098 return AcceptChannel_get_dust_limit_satoshis(this_ptr_conv);
3101 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1dust_1limit_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3102 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3103 return AcceptChannel_set_dust_limit_satoshis(this_ptr_conv, val);
3106 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
3107 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3108 return AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr_conv);
3111 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) {
3112 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3113 return AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr_conv, val);
3116 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1channel_1reserve_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
3117 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3118 return AcceptChannel_get_channel_reserve_satoshis(this_ptr_conv);
3121 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1channel_1reserve_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3122 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3123 return AcceptChannel_set_channel_reserve_satoshis(this_ptr_conv, val);
3126 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
3127 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3128 return AcceptChannel_get_htlc_minimum_msat(this_ptr_conv);
3131 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3132 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3133 return AcceptChannel_set_htlc_minimum_msat(this_ptr_conv, val);
3136 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1minimum_1depth(JNIEnv * _env, jclass _b, jlong this_ptr) {
3137 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3138 return AcceptChannel_get_minimum_depth(this_ptr_conv);
3141 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1minimum_1depth(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
3142 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3143 return AcceptChannel_set_minimum_depth(this_ptr_conv, val);
3146 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_ptr) {
3147 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3148 uint16_t* ret = malloc(sizeof(uint16_t));
3149 *ret = AcceptChannel_get_to_self_delay(this_ptr_conv);
3153 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3154 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3155 uint16_t val_conv = *(uint16_t*)val;
3157 return AcceptChannel_set_to_self_delay(this_ptr_conv, val_conv);
3160 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1max_1accepted_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr) {
3161 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3162 uint16_t* ret = malloc(sizeof(uint16_t));
3163 *ret = AcceptChannel_get_max_accepted_htlcs(this_ptr_conv);
3167 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1max_1accepted_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3168 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3169 uint16_t val_conv = *(uint16_t*)val;
3171 return AcceptChannel_set_max_accepted_htlcs(this_ptr_conv, val_conv);
3174 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1funding_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr) {
3175 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3176 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3177 *ret = AcceptChannel_get_funding_pubkey(this_ptr_conv);
3181 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1funding_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3182 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3183 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3185 return AcceptChannel_set_funding_pubkey(this_ptr_conv, val_conv);
3188 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1revocation_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr) {
3189 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3190 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3191 *ret = AcceptChannel_get_revocation_basepoint(this_ptr_conv);
3195 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1revocation_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3196 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3197 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3199 return AcceptChannel_set_revocation_basepoint(this_ptr_conv, val_conv);
3202 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1payment_1point(JNIEnv * _env, jclass _b, jlong this_ptr) {
3203 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3204 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3205 *ret = AcceptChannel_get_payment_point(this_ptr_conv);
3209 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1payment_1point(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3210 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3211 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3213 return AcceptChannel_set_payment_point(this_ptr_conv, val_conv);
3216 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1delayed_1payment_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr) {
3217 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3218 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3219 *ret = AcceptChannel_get_delayed_payment_basepoint(this_ptr_conv);
3223 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1delayed_1payment_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3224 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3225 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3227 return AcceptChannel_set_delayed_payment_basepoint(this_ptr_conv, val_conv);
3230 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1htlc_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr) {
3231 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3232 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3233 *ret = AcceptChannel_get_htlc_basepoint(this_ptr_conv);
3237 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1htlc_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3238 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3239 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3241 return AcceptChannel_set_htlc_basepoint(this_ptr_conv, val_conv);
3244 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1first_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr) {
3245 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3246 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3247 *ret = AcceptChannel_get_first_per_commitment_point(this_ptr_conv);
3251 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1first_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3252 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3253 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3255 return AcceptChannel_set_first_per_commitment_point(this_ptr_conv, val_conv);
3258 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3259 LDKFundingCreated this_ptr_conv = *(LDKFundingCreated*)this_ptr;
3260 free((void*)this_ptr);
3261 this_ptr_conv._underlying_ref = false;
3262 return FundingCreated_free(this_ptr_conv);
3265 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1temporary_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3266 LDKFundingCreated* this_ptr_conv = (LDKFundingCreated*)this_ptr;
3267 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3268 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *FundingCreated_get_temporary_channel_id(this_ptr_conv));
3272 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1temporary_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3273 LDKFundingCreated* this_ptr_conv = (LDKFundingCreated*)this_ptr;
3274 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3276 return FundingCreated_set_temporary_channel_id(this_ptr_conv, val_conv);
3279 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1funding_1txid(JNIEnv * _env, jclass _b, jlong this_ptr) {
3280 LDKFundingCreated* this_ptr_conv = (LDKFundingCreated*)this_ptr;
3281 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3282 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *FundingCreated_get_funding_txid(this_ptr_conv));
3286 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1funding_1txid(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3287 LDKFundingCreated* this_ptr_conv = (LDKFundingCreated*)this_ptr;
3288 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3290 return FundingCreated_set_funding_txid(this_ptr_conv, val_conv);
3293 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1funding_1output_1index(JNIEnv * _env, jclass _b, jlong this_ptr) {
3294 LDKFundingCreated* this_ptr_conv = (LDKFundingCreated*)this_ptr;
3295 uint16_t* ret = malloc(sizeof(uint16_t));
3296 *ret = FundingCreated_get_funding_output_index(this_ptr_conv);
3300 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1funding_1output_1index(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3301 LDKFundingCreated* this_ptr_conv = (LDKFundingCreated*)this_ptr;
3302 uint16_t val_conv = *(uint16_t*)val;
3304 return FundingCreated_set_funding_output_index(this_ptr_conv, val_conv);
3307 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1signature(JNIEnv * _env, jclass _b, jlong this_ptr) {
3308 LDKFundingCreated* this_ptr_conv = (LDKFundingCreated*)this_ptr;
3309 LDKSignature* ret = malloc(sizeof(LDKSignature));
3310 *ret = FundingCreated_get_signature(this_ptr_conv);
3314 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1signature(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3315 LDKFundingCreated* this_ptr_conv = (LDKFundingCreated*)this_ptr;
3316 LDKSignature val_conv = *(LDKSignature*)val;
3318 return FundingCreated_set_signature(this_ptr_conv, val_conv);
3321 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingCreated_1new(JNIEnv * _env, jclass _b, jlong temporary_channel_id_arg, jlong funding_txid_arg, jlong funding_output_index_arg, jlong signature_arg) {
3322 LDKThirtyTwoBytes temporary_channel_id_arg_conv = *(LDKThirtyTwoBytes*)temporary_channel_id_arg;
3323 free((void*)temporary_channel_id_arg);
3324 LDKThirtyTwoBytes funding_txid_arg_conv = *(LDKThirtyTwoBytes*)funding_txid_arg;
3325 free((void*)funding_txid_arg);
3326 uint16_t funding_output_index_arg_conv = *(uint16_t*)funding_output_index_arg;
3327 free((void*)funding_output_index_arg);
3328 LDKSignature signature_arg_conv = *(LDKSignature*)signature_arg;
3329 free((void*)signature_arg);
3330 LDKFundingCreated* ret = malloc(sizeof(LDKFundingCreated));
3331 *ret = FundingCreated_new(temporary_channel_id_arg_conv, funding_txid_arg_conv, funding_output_index_arg_conv, signature_arg_conv);
3332 assert(!ret->_underlying_ref);
3333 ret->_underlying_ref = true;
3337 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3338 LDKFundingSigned this_ptr_conv = *(LDKFundingSigned*)this_ptr;
3339 free((void*)this_ptr);
3340 this_ptr_conv._underlying_ref = false;
3341 return FundingSigned_free(this_ptr_conv);
3344 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_FundingSigned_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3345 LDKFundingSigned* this_ptr_conv = (LDKFundingSigned*)this_ptr;
3346 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3347 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *FundingSigned_get_channel_id(this_ptr_conv));
3351 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3352 LDKFundingSigned* this_ptr_conv = (LDKFundingSigned*)this_ptr;
3353 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3355 return FundingSigned_set_channel_id(this_ptr_conv, val_conv);
3358 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingSigned_1get_1signature(JNIEnv * _env, jclass _b, jlong this_ptr) {
3359 LDKFundingSigned* this_ptr_conv = (LDKFundingSigned*)this_ptr;
3360 LDKSignature* ret = malloc(sizeof(LDKSignature));
3361 *ret = FundingSigned_get_signature(this_ptr_conv);
3365 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1set_1signature(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3366 LDKFundingSigned* this_ptr_conv = (LDKFundingSigned*)this_ptr;
3367 LDKSignature val_conv = *(LDKSignature*)val;
3369 return FundingSigned_set_signature(this_ptr_conv, val_conv);
3372 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingSigned_1new(JNIEnv * _env, jclass _b, jlong channel_id_arg, jlong signature_arg) {
3373 LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
3374 free((void*)channel_id_arg);
3375 LDKSignature signature_arg_conv = *(LDKSignature*)signature_arg;
3376 free((void*)signature_arg);
3377 LDKFundingSigned* ret = malloc(sizeof(LDKFundingSigned));
3378 *ret = FundingSigned_new(channel_id_arg_conv, signature_arg_conv);
3379 assert(!ret->_underlying_ref);
3380 ret->_underlying_ref = true;
3384 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingLocked_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3385 LDKFundingLocked this_ptr_conv = *(LDKFundingLocked*)this_ptr;
3386 free((void*)this_ptr);
3387 this_ptr_conv._underlying_ref = false;
3388 return FundingLocked_free(this_ptr_conv);
3391 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_FundingLocked_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3392 LDKFundingLocked* this_ptr_conv = (LDKFundingLocked*)this_ptr;
3393 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3394 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *FundingLocked_get_channel_id(this_ptr_conv));
3398 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingLocked_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3399 LDKFundingLocked* this_ptr_conv = (LDKFundingLocked*)this_ptr;
3400 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3402 return FundingLocked_set_channel_id(this_ptr_conv, val_conv);
3405 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingLocked_1get_1next_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr) {
3406 LDKFundingLocked* this_ptr_conv = (LDKFundingLocked*)this_ptr;
3407 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3408 *ret = FundingLocked_get_next_per_commitment_point(this_ptr_conv);
3412 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingLocked_1set_1next_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3413 LDKFundingLocked* this_ptr_conv = (LDKFundingLocked*)this_ptr;
3414 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3416 return FundingLocked_set_next_per_commitment_point(this_ptr_conv, val_conv);
3419 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingLocked_1new(JNIEnv * _env, jclass _b, jlong channel_id_arg, jlong next_per_commitment_point_arg) {
3420 LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
3421 free((void*)channel_id_arg);
3422 LDKPublicKey next_per_commitment_point_arg_conv = *(LDKPublicKey*)next_per_commitment_point_arg;
3423 free((void*)next_per_commitment_point_arg);
3424 LDKFundingLocked* ret = malloc(sizeof(LDKFundingLocked));
3425 *ret = FundingLocked_new(channel_id_arg_conv, next_per_commitment_point_arg_conv);
3426 assert(!ret->_underlying_ref);
3427 ret->_underlying_ref = true;
3431 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3432 LDKShutdown this_ptr_conv = *(LDKShutdown*)this_ptr;
3433 free((void*)this_ptr);
3434 this_ptr_conv._underlying_ref = false;
3435 return Shutdown_free(this_ptr_conv);
3438 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Shutdown_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3439 LDKShutdown* this_ptr_conv = (LDKShutdown*)this_ptr;
3440 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3441 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *Shutdown_get_channel_id(this_ptr_conv));
3445 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3446 LDKShutdown* this_ptr_conv = (LDKShutdown*)this_ptr;
3447 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3449 return Shutdown_set_channel_id(this_ptr_conv, val_conv);
3452 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Shutdown_1get_1scriptpubkey(JNIEnv * _env, jclass _b, jlong this_ptr) {
3453 LDKShutdown* this_ptr_conv = (LDKShutdown*)this_ptr;
3454 LDKu8slice* ret = malloc(sizeof(LDKu8slice));
3455 *ret = Shutdown_get_scriptpubkey(this_ptr_conv);
3459 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1set_1scriptpubkey(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3460 LDKShutdown* this_ptr_conv = (LDKShutdown*)this_ptr;
3461 LDKCVec_u8Z val_conv = *(LDKCVec_u8Z*)val;
3463 return Shutdown_set_scriptpubkey(this_ptr_conv, val_conv);
3466 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Shutdown_1new(JNIEnv * _env, jclass _b, jlong channel_id_arg, jlong scriptpubkey_arg) {
3467 LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
3468 free((void*)channel_id_arg);
3469 LDKCVec_u8Z scriptpubkey_arg_conv = *(LDKCVec_u8Z*)scriptpubkey_arg;
3470 free((void*)scriptpubkey_arg);
3471 LDKShutdown* ret = malloc(sizeof(LDKShutdown));
3472 *ret = Shutdown_new(channel_id_arg_conv, scriptpubkey_arg_conv);
3473 assert(!ret->_underlying_ref);
3474 ret->_underlying_ref = true;
3478 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3479 LDKClosingSigned this_ptr_conv = *(LDKClosingSigned*)this_ptr;
3480 free((void*)this_ptr);
3481 this_ptr_conv._underlying_ref = false;
3482 return ClosingSigned_free(this_ptr_conv);
3485 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3486 LDKClosingSigned* this_ptr_conv = (LDKClosingSigned*)this_ptr;
3487 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3488 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *ClosingSigned_get_channel_id(this_ptr_conv));
3492 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3493 LDKClosingSigned* this_ptr_conv = (LDKClosingSigned*)this_ptr;
3494 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3496 return ClosingSigned_set_channel_id(this_ptr_conv, val_conv);
3499 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1get_1fee_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
3500 LDKClosingSigned* this_ptr_conv = (LDKClosingSigned*)this_ptr;
3501 return ClosingSigned_get_fee_satoshis(this_ptr_conv);
3504 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1set_1fee_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3505 LDKClosingSigned* this_ptr_conv = (LDKClosingSigned*)this_ptr;
3506 return ClosingSigned_set_fee_satoshis(this_ptr_conv, val);
3509 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1get_1signature(JNIEnv * _env, jclass _b, jlong this_ptr) {
3510 LDKClosingSigned* this_ptr_conv = (LDKClosingSigned*)this_ptr;
3511 LDKSignature* ret = malloc(sizeof(LDKSignature));
3512 *ret = ClosingSigned_get_signature(this_ptr_conv);
3516 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1set_1signature(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3517 LDKClosingSigned* this_ptr_conv = (LDKClosingSigned*)this_ptr;
3518 LDKSignature val_conv = *(LDKSignature*)val;
3520 return ClosingSigned_set_signature(this_ptr_conv, val_conv);
3523 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) {
3524 LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
3525 free((void*)channel_id_arg);
3526 LDKSignature signature_arg_conv = *(LDKSignature*)signature_arg;
3527 free((void*)signature_arg);
3528 LDKClosingSigned* ret = malloc(sizeof(LDKClosingSigned));
3529 *ret = ClosingSigned_new(channel_id_arg_conv, fee_satoshis_arg, signature_arg_conv);
3530 assert(!ret->_underlying_ref);
3531 ret->_underlying_ref = true;
3535 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3536 LDKUpdateAddHTLC this_ptr_conv = *(LDKUpdateAddHTLC*)this_ptr;
3537 free((void*)this_ptr);
3538 this_ptr_conv._underlying_ref = false;
3539 return UpdateAddHTLC_free(this_ptr_conv);
3542 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3543 LDKUpdateAddHTLC* this_ptr_conv = (LDKUpdateAddHTLC*)this_ptr;
3544 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3545 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *UpdateAddHTLC_get_channel_id(this_ptr_conv));
3549 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3550 LDKUpdateAddHTLC* this_ptr_conv = (LDKUpdateAddHTLC*)this_ptr;
3551 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3553 return UpdateAddHTLC_set_channel_id(this_ptr_conv, val_conv);
3556 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1htlc_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3557 LDKUpdateAddHTLC* this_ptr_conv = (LDKUpdateAddHTLC*)this_ptr;
3558 return UpdateAddHTLC_get_htlc_id(this_ptr_conv);
3561 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1htlc_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3562 LDKUpdateAddHTLC* this_ptr_conv = (LDKUpdateAddHTLC*)this_ptr;
3563 return UpdateAddHTLC_set_htlc_id(this_ptr_conv, val);
3566 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1amount_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
3567 LDKUpdateAddHTLC* this_ptr_conv = (LDKUpdateAddHTLC*)this_ptr;
3568 return UpdateAddHTLC_get_amount_msat(this_ptr_conv);
3571 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1amount_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3572 LDKUpdateAddHTLC* this_ptr_conv = (LDKUpdateAddHTLC*)this_ptr;
3573 return UpdateAddHTLC_set_amount_msat(this_ptr_conv, val);
3576 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1payment_1hash(JNIEnv * _env, jclass _b, jlong this_ptr) {
3577 LDKUpdateAddHTLC* this_ptr_conv = (LDKUpdateAddHTLC*)this_ptr;
3578 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3579 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *UpdateAddHTLC_get_payment_hash(this_ptr_conv));
3583 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1payment_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3584 LDKUpdateAddHTLC* this_ptr_conv = (LDKUpdateAddHTLC*)this_ptr;
3585 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3587 return UpdateAddHTLC_set_payment_hash(this_ptr_conv, val_conv);
3590 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1cltv_1expiry(JNIEnv * _env, jclass _b, jlong this_ptr) {
3591 LDKUpdateAddHTLC* this_ptr_conv = (LDKUpdateAddHTLC*)this_ptr;
3592 return UpdateAddHTLC_get_cltv_expiry(this_ptr_conv);
3595 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1cltv_1expiry(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
3596 LDKUpdateAddHTLC* this_ptr_conv = (LDKUpdateAddHTLC*)this_ptr;
3597 return UpdateAddHTLC_set_cltv_expiry(this_ptr_conv, val);
3600 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3601 LDKUpdateFulfillHTLC this_ptr_conv = *(LDKUpdateFulfillHTLC*)this_ptr;
3602 free((void*)this_ptr);
3603 this_ptr_conv._underlying_ref = false;
3604 return UpdateFulfillHTLC_free(this_ptr_conv);
3607 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3608 LDKUpdateFulfillHTLC* this_ptr_conv = (LDKUpdateFulfillHTLC*)this_ptr;
3609 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3610 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *UpdateFulfillHTLC_get_channel_id(this_ptr_conv));
3614 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3615 LDKUpdateFulfillHTLC* this_ptr_conv = (LDKUpdateFulfillHTLC*)this_ptr;
3616 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3618 return UpdateFulfillHTLC_set_channel_id(this_ptr_conv, val_conv);
3621 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1get_1htlc_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3622 LDKUpdateFulfillHTLC* this_ptr_conv = (LDKUpdateFulfillHTLC*)this_ptr;
3623 return UpdateFulfillHTLC_get_htlc_id(this_ptr_conv);
3626 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1set_1htlc_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3627 LDKUpdateFulfillHTLC* this_ptr_conv = (LDKUpdateFulfillHTLC*)this_ptr;
3628 return UpdateFulfillHTLC_set_htlc_id(this_ptr_conv, val);
3631 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1get_1payment_1preimage(JNIEnv * _env, jclass _b, jlong this_ptr) {
3632 LDKUpdateFulfillHTLC* this_ptr_conv = (LDKUpdateFulfillHTLC*)this_ptr;
3633 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3634 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *UpdateFulfillHTLC_get_payment_preimage(this_ptr_conv));
3638 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1set_1payment_1preimage(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3639 LDKUpdateFulfillHTLC* this_ptr_conv = (LDKUpdateFulfillHTLC*)this_ptr;
3640 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3642 return UpdateFulfillHTLC_set_payment_preimage(this_ptr_conv, val_conv);
3645 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) {
3646 LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
3647 free((void*)channel_id_arg);
3648 LDKThirtyTwoBytes payment_preimage_arg_conv = *(LDKThirtyTwoBytes*)payment_preimage_arg;
3649 free((void*)payment_preimage_arg);
3650 LDKUpdateFulfillHTLC* ret = malloc(sizeof(LDKUpdateFulfillHTLC));
3651 *ret = UpdateFulfillHTLC_new(channel_id_arg_conv, htlc_id_arg, payment_preimage_arg_conv);
3652 assert(!ret->_underlying_ref);
3653 ret->_underlying_ref = true;
3657 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3658 LDKUpdateFailHTLC this_ptr_conv = *(LDKUpdateFailHTLC*)this_ptr;
3659 free((void*)this_ptr);
3660 this_ptr_conv._underlying_ref = false;
3661 return UpdateFailHTLC_free(this_ptr_conv);
3664 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3665 LDKUpdateFailHTLC* this_ptr_conv = (LDKUpdateFailHTLC*)this_ptr;
3666 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3667 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *UpdateFailHTLC_get_channel_id(this_ptr_conv));
3671 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3672 LDKUpdateFailHTLC* this_ptr_conv = (LDKUpdateFailHTLC*)this_ptr;
3673 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3675 return UpdateFailHTLC_set_channel_id(this_ptr_conv, val_conv);
3678 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1get_1htlc_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3679 LDKUpdateFailHTLC* this_ptr_conv = (LDKUpdateFailHTLC*)this_ptr;
3680 return UpdateFailHTLC_get_htlc_id(this_ptr_conv);
3683 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1set_1htlc_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3684 LDKUpdateFailHTLC* this_ptr_conv = (LDKUpdateFailHTLC*)this_ptr;
3685 return UpdateFailHTLC_set_htlc_id(this_ptr_conv, val);
3688 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3689 LDKUpdateFailMalformedHTLC this_ptr_conv = *(LDKUpdateFailMalformedHTLC*)this_ptr;
3690 free((void*)this_ptr);
3691 this_ptr_conv._underlying_ref = false;
3692 return UpdateFailMalformedHTLC_free(this_ptr_conv);
3695 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3696 LDKUpdateFailMalformedHTLC* this_ptr_conv = (LDKUpdateFailMalformedHTLC*)this_ptr;
3697 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3698 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *UpdateFailMalformedHTLC_get_channel_id(this_ptr_conv));
3702 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3703 LDKUpdateFailMalformedHTLC* this_ptr_conv = (LDKUpdateFailMalformedHTLC*)this_ptr;
3704 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3706 return UpdateFailMalformedHTLC_set_channel_id(this_ptr_conv, val_conv);
3709 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1get_1htlc_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3710 LDKUpdateFailMalformedHTLC* this_ptr_conv = (LDKUpdateFailMalformedHTLC*)this_ptr;
3711 return UpdateFailMalformedHTLC_get_htlc_id(this_ptr_conv);
3714 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1set_1htlc_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3715 LDKUpdateFailMalformedHTLC* this_ptr_conv = (LDKUpdateFailMalformedHTLC*)this_ptr;
3716 return UpdateFailMalformedHTLC_set_htlc_id(this_ptr_conv, val);
3719 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1get_1failure_1code(JNIEnv * _env, jclass _b, jlong this_ptr) {
3720 LDKUpdateFailMalformedHTLC* this_ptr_conv = (LDKUpdateFailMalformedHTLC*)this_ptr;
3721 uint16_t* ret = malloc(sizeof(uint16_t));
3722 *ret = UpdateFailMalformedHTLC_get_failure_code(this_ptr_conv);
3726 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1set_1failure_1code(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3727 LDKUpdateFailMalformedHTLC* this_ptr_conv = (LDKUpdateFailMalformedHTLC*)this_ptr;
3728 uint16_t val_conv = *(uint16_t*)val;
3730 return UpdateFailMalformedHTLC_set_failure_code(this_ptr_conv, val_conv);
3733 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3734 LDKCommitmentSigned this_ptr_conv = *(LDKCommitmentSigned*)this_ptr;
3735 free((void*)this_ptr);
3736 this_ptr_conv._underlying_ref = false;
3737 return CommitmentSigned_free(this_ptr_conv);
3740 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3741 LDKCommitmentSigned* this_ptr_conv = (LDKCommitmentSigned*)this_ptr;
3742 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3743 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *CommitmentSigned_get_channel_id(this_ptr_conv));
3747 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3748 LDKCommitmentSigned* this_ptr_conv = (LDKCommitmentSigned*)this_ptr;
3749 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3751 return CommitmentSigned_set_channel_id(this_ptr_conv, val_conv);
3754 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1get_1signature(JNIEnv * _env, jclass _b, jlong this_ptr) {
3755 LDKCommitmentSigned* this_ptr_conv = (LDKCommitmentSigned*)this_ptr;
3756 LDKSignature* ret = malloc(sizeof(LDKSignature));
3757 *ret = CommitmentSigned_get_signature(this_ptr_conv);
3761 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1set_1signature(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3762 LDKCommitmentSigned* this_ptr_conv = (LDKCommitmentSigned*)this_ptr;
3763 LDKSignature val_conv = *(LDKSignature*)val;
3765 return CommitmentSigned_set_signature(this_ptr_conv, val_conv);
3768 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1set_1htlc_1signatures(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3769 LDKCommitmentSigned* this_ptr_conv = (LDKCommitmentSigned*)this_ptr;
3770 LDKCVec_SignatureZ val_conv = *(LDKCVec_SignatureZ*)val;
3772 return CommitmentSigned_set_htlc_signatures(this_ptr_conv, val_conv);
3775 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) {
3776 LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
3777 free((void*)channel_id_arg);
3778 LDKSignature signature_arg_conv = *(LDKSignature*)signature_arg;
3779 free((void*)signature_arg);
3780 LDKCVec_SignatureZ htlc_signatures_arg_conv = *(LDKCVec_SignatureZ*)htlc_signatures_arg;
3781 free((void*)htlc_signatures_arg);
3782 LDKCommitmentSigned* ret = malloc(sizeof(LDKCommitmentSigned));
3783 *ret = CommitmentSigned_new(channel_id_arg_conv, signature_arg_conv, htlc_signatures_arg_conv);
3784 assert(!ret->_underlying_ref);
3785 ret->_underlying_ref = true;
3789 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3790 LDKRevokeAndACK this_ptr_conv = *(LDKRevokeAndACK*)this_ptr;
3791 free((void*)this_ptr);
3792 this_ptr_conv._underlying_ref = false;
3793 return RevokeAndACK_free(this_ptr_conv);
3796 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3797 LDKRevokeAndACK* this_ptr_conv = (LDKRevokeAndACK*)this_ptr;
3798 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3799 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *RevokeAndACK_get_channel_id(this_ptr_conv));
3803 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3804 LDKRevokeAndACK* this_ptr_conv = (LDKRevokeAndACK*)this_ptr;
3805 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3807 return RevokeAndACK_set_channel_id(this_ptr_conv, val_conv);
3810 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1get_1per_1commitment_1secret(JNIEnv * _env, jclass _b, jlong this_ptr) {
3811 LDKRevokeAndACK* this_ptr_conv = (LDKRevokeAndACK*)this_ptr;
3812 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3813 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *RevokeAndACK_get_per_commitment_secret(this_ptr_conv));
3817 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1set_1per_1commitment_1secret(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3818 LDKRevokeAndACK* this_ptr_conv = (LDKRevokeAndACK*)this_ptr;
3819 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3821 return RevokeAndACK_set_per_commitment_secret(this_ptr_conv, val_conv);
3824 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1get_1next_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr) {
3825 LDKRevokeAndACK* this_ptr_conv = (LDKRevokeAndACK*)this_ptr;
3826 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3827 *ret = RevokeAndACK_get_next_per_commitment_point(this_ptr_conv);
3831 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1set_1next_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3832 LDKRevokeAndACK* this_ptr_conv = (LDKRevokeAndACK*)this_ptr;
3833 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3835 return RevokeAndACK_set_next_per_commitment_point(this_ptr_conv, val_conv);
3838 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) {
3839 LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
3840 free((void*)channel_id_arg);
3841 LDKThirtyTwoBytes per_commitment_secret_arg_conv = *(LDKThirtyTwoBytes*)per_commitment_secret_arg;
3842 free((void*)per_commitment_secret_arg);
3843 LDKPublicKey next_per_commitment_point_arg_conv = *(LDKPublicKey*)next_per_commitment_point_arg;
3844 free((void*)next_per_commitment_point_arg);
3845 LDKRevokeAndACK* ret = malloc(sizeof(LDKRevokeAndACK));
3846 *ret = RevokeAndACK_new(channel_id_arg_conv, per_commitment_secret_arg_conv, next_per_commitment_point_arg_conv);
3847 assert(!ret->_underlying_ref);
3848 ret->_underlying_ref = true;
3852 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3853 LDKUpdateFee this_ptr_conv = *(LDKUpdateFee*)this_ptr;
3854 free((void*)this_ptr);
3855 this_ptr_conv._underlying_ref = false;
3856 return UpdateFee_free(this_ptr_conv);
3859 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UpdateFee_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3860 LDKUpdateFee* this_ptr_conv = (LDKUpdateFee*)this_ptr;
3861 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3862 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *UpdateFee_get_channel_id(this_ptr_conv));
3866 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3867 LDKUpdateFee* this_ptr_conv = (LDKUpdateFee*)this_ptr;
3868 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3870 return UpdateFee_set_channel_id(this_ptr_conv, val_conv);
3873 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_UpdateFee_1get_1feerate_1per_1kw(JNIEnv * _env, jclass _b, jlong this_ptr) {
3874 LDKUpdateFee* this_ptr_conv = (LDKUpdateFee*)this_ptr;
3875 return UpdateFee_get_feerate_per_kw(this_ptr_conv);
3878 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1set_1feerate_1per_1kw(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
3879 LDKUpdateFee* this_ptr_conv = (LDKUpdateFee*)this_ptr;
3880 return UpdateFee_set_feerate_per_kw(this_ptr_conv, val);
3883 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFee_1new(JNIEnv * _env, jclass _b, jlong channel_id_arg, jint feerate_per_kw_arg) {
3884 LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
3885 free((void*)channel_id_arg);
3886 LDKUpdateFee* ret = malloc(sizeof(LDKUpdateFee));
3887 *ret = UpdateFee_new(channel_id_arg_conv, feerate_per_kw_arg);
3888 assert(!ret->_underlying_ref);
3889 ret->_underlying_ref = true;
3893 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3894 LDKDataLossProtect this_ptr_conv = *(LDKDataLossProtect*)this_ptr;
3895 free((void*)this_ptr);
3896 this_ptr_conv._underlying_ref = false;
3897 return DataLossProtect_free(this_ptr_conv);
3900 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1get_1your_1last_1per_1commitment_1secret(JNIEnv * _env, jclass _b, jlong this_ptr) {
3901 LDKDataLossProtect* this_ptr_conv = (LDKDataLossProtect*)this_ptr;
3902 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3903 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *DataLossProtect_get_your_last_per_commitment_secret(this_ptr_conv));
3907 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1set_1your_1last_1per_1commitment_1secret(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3908 LDKDataLossProtect* this_ptr_conv = (LDKDataLossProtect*)this_ptr;
3909 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3911 return DataLossProtect_set_your_last_per_commitment_secret(this_ptr_conv, val_conv);
3914 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1get_1my_1current_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr) {
3915 LDKDataLossProtect* this_ptr_conv = (LDKDataLossProtect*)this_ptr;
3916 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3917 *ret = DataLossProtect_get_my_current_per_commitment_point(this_ptr_conv);
3921 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1set_1my_1current_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3922 LDKDataLossProtect* this_ptr_conv = (LDKDataLossProtect*)this_ptr;
3923 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3925 return DataLossProtect_set_my_current_per_commitment_point(this_ptr_conv, val_conv);
3928 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) {
3929 LDKThirtyTwoBytes your_last_per_commitment_secret_arg_conv = *(LDKThirtyTwoBytes*)your_last_per_commitment_secret_arg;
3930 free((void*)your_last_per_commitment_secret_arg);
3931 LDKPublicKey my_current_per_commitment_point_arg_conv = *(LDKPublicKey*)my_current_per_commitment_point_arg;
3932 free((void*)my_current_per_commitment_point_arg);
3933 LDKDataLossProtect* ret = malloc(sizeof(LDKDataLossProtect));
3934 *ret = DataLossProtect_new(your_last_per_commitment_secret_arg_conv, my_current_per_commitment_point_arg_conv);
3935 assert(!ret->_underlying_ref);
3936 ret->_underlying_ref = true;
3940 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3941 LDKChannelReestablish this_ptr_conv = *(LDKChannelReestablish*)this_ptr;
3942 free((void*)this_ptr);
3943 this_ptr_conv._underlying_ref = false;
3944 return ChannelReestablish_free(this_ptr_conv);
3947 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3948 LDKChannelReestablish* this_ptr_conv = (LDKChannelReestablish*)this_ptr;
3949 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3950 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *ChannelReestablish_get_channel_id(this_ptr_conv));
3954 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3955 LDKChannelReestablish* this_ptr_conv = (LDKChannelReestablish*)this_ptr;
3956 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3958 return ChannelReestablish_set_channel_id(this_ptr_conv, val_conv);
3961 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1get_1next_1local_1commitment_1number(JNIEnv * _env, jclass _b, jlong this_ptr) {
3962 LDKChannelReestablish* this_ptr_conv = (LDKChannelReestablish*)this_ptr;
3963 return ChannelReestablish_get_next_local_commitment_number(this_ptr_conv);
3966 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1set_1next_1local_1commitment_1number(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3967 LDKChannelReestablish* this_ptr_conv = (LDKChannelReestablish*)this_ptr;
3968 return ChannelReestablish_set_next_local_commitment_number(this_ptr_conv, val);
3971 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1get_1next_1remote_1commitment_1number(JNIEnv * _env, jclass _b, jlong this_ptr) {
3972 LDKChannelReestablish* this_ptr_conv = (LDKChannelReestablish*)this_ptr;
3973 return ChannelReestablish_get_next_remote_commitment_number(this_ptr_conv);
3976 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1set_1next_1remote_1commitment_1number(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3977 LDKChannelReestablish* this_ptr_conv = (LDKChannelReestablish*)this_ptr;
3978 return ChannelReestablish_set_next_remote_commitment_number(this_ptr_conv, val);
3981 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3982 LDKAnnouncementSignatures this_ptr_conv = *(LDKAnnouncementSignatures*)this_ptr;
3983 free((void*)this_ptr);
3984 this_ptr_conv._underlying_ref = false;
3985 return AnnouncementSignatures_free(this_ptr_conv);
3988 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3989 LDKAnnouncementSignatures* this_ptr_conv = (LDKAnnouncementSignatures*)this_ptr;
3990 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3991 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *AnnouncementSignatures_get_channel_id(this_ptr_conv));
3995 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3996 LDKAnnouncementSignatures* this_ptr_conv = (LDKAnnouncementSignatures*)this_ptr;
3997 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3999 return AnnouncementSignatures_set_channel_id(this_ptr_conv, val_conv);
4002 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1get_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
4003 LDKAnnouncementSignatures* this_ptr_conv = (LDKAnnouncementSignatures*)this_ptr;
4004 return AnnouncementSignatures_get_short_channel_id(this_ptr_conv);
4007 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4008 LDKAnnouncementSignatures* this_ptr_conv = (LDKAnnouncementSignatures*)this_ptr;
4009 return AnnouncementSignatures_set_short_channel_id(this_ptr_conv, val);
4012 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1get_1node_1signature(JNIEnv * _env, jclass _b, jlong this_ptr) {
4013 LDKAnnouncementSignatures* this_ptr_conv = (LDKAnnouncementSignatures*)this_ptr;
4014 LDKSignature* ret = malloc(sizeof(LDKSignature));
4015 *ret = AnnouncementSignatures_get_node_signature(this_ptr_conv);
4019 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1node_1signature(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4020 LDKAnnouncementSignatures* this_ptr_conv = (LDKAnnouncementSignatures*)this_ptr;
4021 LDKSignature val_conv = *(LDKSignature*)val;
4023 return AnnouncementSignatures_set_node_signature(this_ptr_conv, val_conv);
4026 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1get_1bitcoin_1signature(JNIEnv * _env, jclass _b, jlong this_ptr) {
4027 LDKAnnouncementSignatures* this_ptr_conv = (LDKAnnouncementSignatures*)this_ptr;
4028 LDKSignature* ret = malloc(sizeof(LDKSignature));
4029 *ret = AnnouncementSignatures_get_bitcoin_signature(this_ptr_conv);
4033 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1bitcoin_1signature(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4034 LDKAnnouncementSignatures* this_ptr_conv = (LDKAnnouncementSignatures*)this_ptr;
4035 LDKSignature val_conv = *(LDKSignature*)val;
4037 return AnnouncementSignatures_set_bitcoin_signature(this_ptr_conv, val_conv);
4040 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) {
4041 LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
4042 free((void*)channel_id_arg);
4043 LDKSignature node_signature_arg_conv = *(LDKSignature*)node_signature_arg;
4044 free((void*)node_signature_arg);
4045 LDKSignature bitcoin_signature_arg_conv = *(LDKSignature*)bitcoin_signature_arg;
4046 free((void*)bitcoin_signature_arg);
4047 LDKAnnouncementSignatures* ret = malloc(sizeof(LDKAnnouncementSignatures));
4048 *ret = AnnouncementSignatures_new(channel_id_arg_conv, short_channel_id_arg, node_signature_arg_conv, bitcoin_signature_arg_conv);
4049 assert(!ret->_underlying_ref);
4050 ret->_underlying_ref = true;
4054 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetAddress_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4055 LDKNetAddress this_ptr_conv = *(LDKNetAddress*)this_ptr;
4056 free((void*)this_ptr);
4057 return NetAddress_free(this_ptr_conv);
4060 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4061 LDKUnsignedNodeAnnouncement this_ptr_conv = *(LDKUnsignedNodeAnnouncement*)this_ptr;
4062 free((void*)this_ptr);
4063 this_ptr_conv._underlying_ref = false;
4064 return UnsignedNodeAnnouncement_free(this_ptr_conv);
4067 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1get_1timestamp(JNIEnv * _env, jclass _b, jlong this_ptr) {
4068 LDKUnsignedNodeAnnouncement* this_ptr_conv = (LDKUnsignedNodeAnnouncement*)this_ptr;
4069 return UnsignedNodeAnnouncement_get_timestamp(this_ptr_conv);
4072 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1timestamp(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
4073 LDKUnsignedNodeAnnouncement* this_ptr_conv = (LDKUnsignedNodeAnnouncement*)this_ptr;
4074 return UnsignedNodeAnnouncement_set_timestamp(this_ptr_conv, val);
4077 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1get_1node_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
4078 LDKUnsignedNodeAnnouncement* this_ptr_conv = (LDKUnsignedNodeAnnouncement*)this_ptr;
4079 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
4080 *ret = UnsignedNodeAnnouncement_get_node_id(this_ptr_conv);
4084 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1node_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4085 LDKUnsignedNodeAnnouncement* this_ptr_conv = (LDKUnsignedNodeAnnouncement*)this_ptr;
4086 LDKPublicKey val_conv = *(LDKPublicKey*)val;
4088 return UnsignedNodeAnnouncement_set_node_id(this_ptr_conv, val_conv);
4091 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1get_1rgb(JNIEnv * _env, jclass _b, jlong this_ptr) {
4092 LDKUnsignedNodeAnnouncement* this_ptr_conv = (LDKUnsignedNodeAnnouncement*)this_ptr;
4093 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 3);
4094 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 3, *UnsignedNodeAnnouncement_get_rgb(this_ptr_conv));
4098 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1rgb(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4099 LDKUnsignedNodeAnnouncement* this_ptr_conv = (LDKUnsignedNodeAnnouncement*)this_ptr;
4100 LDKThreeBytes val_conv = *(LDKThreeBytes*)val;
4102 return UnsignedNodeAnnouncement_set_rgb(this_ptr_conv, val_conv);
4105 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1get_1alias(JNIEnv * _env, jclass _b, jlong this_ptr) {
4106 LDKUnsignedNodeAnnouncement* this_ptr_conv = (LDKUnsignedNodeAnnouncement*)this_ptr;
4107 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
4108 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *UnsignedNodeAnnouncement_get_alias(this_ptr_conv));
4112 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1alias(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4113 LDKUnsignedNodeAnnouncement* this_ptr_conv = (LDKUnsignedNodeAnnouncement*)this_ptr;
4114 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
4116 return UnsignedNodeAnnouncement_set_alias(this_ptr_conv, val_conv);
4119 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1addresses(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4120 LDKUnsignedNodeAnnouncement* this_ptr_conv = (LDKUnsignedNodeAnnouncement*)this_ptr;
4121 LDKCVec_NetAddressZ val_conv = *(LDKCVec_NetAddressZ*)val;
4123 return UnsignedNodeAnnouncement_set_addresses(this_ptr_conv, val_conv);
4126 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4127 LDKNodeAnnouncement this_ptr_conv = *(LDKNodeAnnouncement*)this_ptr;
4128 free((void*)this_ptr);
4129 this_ptr_conv._underlying_ref = false;
4130 return NodeAnnouncement_free(this_ptr_conv);
4133 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1get_1signature(JNIEnv * _env, jclass _b, jlong this_ptr) {
4134 LDKNodeAnnouncement* this_ptr_conv = (LDKNodeAnnouncement*)this_ptr;
4135 LDKSignature* ret = malloc(sizeof(LDKSignature));
4136 *ret = NodeAnnouncement_get_signature(this_ptr_conv);
4140 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1set_1signature(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4141 LDKNodeAnnouncement* this_ptr_conv = (LDKNodeAnnouncement*)this_ptr;
4142 LDKSignature val_conv = *(LDKSignature*)val;
4144 return NodeAnnouncement_set_signature(this_ptr_conv, val_conv);
4147 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1get_1contents(JNIEnv * _env, jclass _b, jlong this_ptr) {
4148 LDKNodeAnnouncement* this_ptr_conv = (LDKNodeAnnouncement*)this_ptr;
4149 LDKUnsignedNodeAnnouncement* ret = malloc(sizeof(LDKUnsignedNodeAnnouncement));
4150 *ret = NodeAnnouncement_get_contents(this_ptr_conv);
4151 assert(!ret->_underlying_ref);
4152 ret->_underlying_ref = true;
4156 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1set_1contents(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4157 LDKNodeAnnouncement* this_ptr_conv = (LDKNodeAnnouncement*)this_ptr;
4158 LDKUnsignedNodeAnnouncement val_conv = *(LDKUnsignedNodeAnnouncement*)val;
4160 val_conv._underlying_ref = false;
4161 return NodeAnnouncement_set_contents(this_ptr_conv, val_conv);
4164 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1new(JNIEnv * _env, jclass _b, jlong signature_arg, jlong contents_arg) {
4165 LDKSignature signature_arg_conv = *(LDKSignature*)signature_arg;
4166 free((void*)signature_arg);
4167 LDKUnsignedNodeAnnouncement contents_arg_conv = *(LDKUnsignedNodeAnnouncement*)contents_arg;
4168 free((void*)contents_arg);
4169 contents_arg_conv._underlying_ref = false;
4170 LDKNodeAnnouncement* ret = malloc(sizeof(LDKNodeAnnouncement));
4171 *ret = NodeAnnouncement_new(signature_arg_conv, contents_arg_conv);
4172 assert(!ret->_underlying_ref);
4173 ret->_underlying_ref = true;
4177 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4178 LDKUnsignedChannelAnnouncement this_ptr_conv = *(LDKUnsignedChannelAnnouncement*)this_ptr;
4179 free((void*)this_ptr);
4180 this_ptr_conv._underlying_ref = false;
4181 return UnsignedChannelAnnouncement_free(this_ptr_conv);
4184 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1get_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr) {
4185 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4186 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
4187 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *UnsignedChannelAnnouncement_get_chain_hash(this_ptr_conv));
4191 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1set_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4192 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4193 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
4195 return UnsignedChannelAnnouncement_set_chain_hash(this_ptr_conv, val_conv);
4198 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1get_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
4199 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4200 return UnsignedChannelAnnouncement_get_short_channel_id(this_ptr_conv);
4203 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1set_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4204 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4205 return UnsignedChannelAnnouncement_set_short_channel_id(this_ptr_conv, val);
4208 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1get_1node_1id_11(JNIEnv * _env, jclass _b, jlong this_ptr) {
4209 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4210 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
4211 *ret = UnsignedChannelAnnouncement_get_node_id_1(this_ptr_conv);
4215 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1set_1node_1id_11(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4216 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4217 LDKPublicKey val_conv = *(LDKPublicKey*)val;
4219 return UnsignedChannelAnnouncement_set_node_id_1(this_ptr_conv, val_conv);
4222 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1get_1node_1id_12(JNIEnv * _env, jclass _b, jlong this_ptr) {
4223 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4224 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
4225 *ret = UnsignedChannelAnnouncement_get_node_id_2(this_ptr_conv);
4229 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1set_1node_1id_12(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4230 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4231 LDKPublicKey val_conv = *(LDKPublicKey*)val;
4233 return UnsignedChannelAnnouncement_set_node_id_2(this_ptr_conv, val_conv);
4236 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1get_1bitcoin_1key_11(JNIEnv * _env, jclass _b, jlong this_ptr) {
4237 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4238 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
4239 *ret = UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr_conv);
4243 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1set_1bitcoin_1key_11(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4244 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4245 LDKPublicKey val_conv = *(LDKPublicKey*)val;
4247 return UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr_conv, val_conv);
4250 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1get_1bitcoin_1key_12(JNIEnv * _env, jclass _b, jlong this_ptr) {
4251 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4252 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
4253 *ret = UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr_conv);
4257 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1set_1bitcoin_1key_12(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4258 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4259 LDKPublicKey val_conv = *(LDKPublicKey*)val;
4261 return UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr_conv, val_conv);
4264 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4265 LDKChannelAnnouncement this_ptr_conv = *(LDKChannelAnnouncement*)this_ptr;
4266 free((void*)this_ptr);
4267 this_ptr_conv._underlying_ref = false;
4268 return ChannelAnnouncement_free(this_ptr_conv);
4271 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1get_1node_1signature_11(JNIEnv * _env, jclass _b, jlong this_ptr) {
4272 LDKChannelAnnouncement* this_ptr_conv = (LDKChannelAnnouncement*)this_ptr;
4273 LDKSignature* ret = malloc(sizeof(LDKSignature));
4274 *ret = ChannelAnnouncement_get_node_signature_1(this_ptr_conv);
4278 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1set_1node_1signature_11(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4279 LDKChannelAnnouncement* this_ptr_conv = (LDKChannelAnnouncement*)this_ptr;
4280 LDKSignature val_conv = *(LDKSignature*)val;
4282 return ChannelAnnouncement_set_node_signature_1(this_ptr_conv, val_conv);
4285 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1get_1node_1signature_12(JNIEnv * _env, jclass _b, jlong this_ptr) {
4286 LDKChannelAnnouncement* this_ptr_conv = (LDKChannelAnnouncement*)this_ptr;
4287 LDKSignature* ret = malloc(sizeof(LDKSignature));
4288 *ret = ChannelAnnouncement_get_node_signature_2(this_ptr_conv);
4292 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1set_1node_1signature_12(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4293 LDKChannelAnnouncement* this_ptr_conv = (LDKChannelAnnouncement*)this_ptr;
4294 LDKSignature val_conv = *(LDKSignature*)val;
4296 return ChannelAnnouncement_set_node_signature_2(this_ptr_conv, val_conv);
4299 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1get_1bitcoin_1signature_11(JNIEnv * _env, jclass _b, jlong this_ptr) {
4300 LDKChannelAnnouncement* this_ptr_conv = (LDKChannelAnnouncement*)this_ptr;
4301 LDKSignature* ret = malloc(sizeof(LDKSignature));
4302 *ret = ChannelAnnouncement_get_bitcoin_signature_1(this_ptr_conv);
4306 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1set_1bitcoin_1signature_11(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4307 LDKChannelAnnouncement* this_ptr_conv = (LDKChannelAnnouncement*)this_ptr;
4308 LDKSignature val_conv = *(LDKSignature*)val;
4310 return ChannelAnnouncement_set_bitcoin_signature_1(this_ptr_conv, val_conv);
4313 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1get_1bitcoin_1signature_12(JNIEnv * _env, jclass _b, jlong this_ptr) {
4314 LDKChannelAnnouncement* this_ptr_conv = (LDKChannelAnnouncement*)this_ptr;
4315 LDKSignature* ret = malloc(sizeof(LDKSignature));
4316 *ret = ChannelAnnouncement_get_bitcoin_signature_2(this_ptr_conv);
4320 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1set_1bitcoin_1signature_12(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4321 LDKChannelAnnouncement* this_ptr_conv = (LDKChannelAnnouncement*)this_ptr;
4322 LDKSignature val_conv = *(LDKSignature*)val;
4324 return ChannelAnnouncement_set_bitcoin_signature_2(this_ptr_conv, val_conv);
4327 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1get_1contents(JNIEnv * _env, jclass _b, jlong this_ptr) {
4328 LDKChannelAnnouncement* this_ptr_conv = (LDKChannelAnnouncement*)this_ptr;
4329 LDKUnsignedChannelAnnouncement* ret = malloc(sizeof(LDKUnsignedChannelAnnouncement));
4330 *ret = ChannelAnnouncement_get_contents(this_ptr_conv);
4331 assert(!ret->_underlying_ref);
4332 ret->_underlying_ref = true;
4336 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1set_1contents(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4337 LDKChannelAnnouncement* this_ptr_conv = (LDKChannelAnnouncement*)this_ptr;
4338 LDKUnsignedChannelAnnouncement val_conv = *(LDKUnsignedChannelAnnouncement*)val;
4340 val_conv._underlying_ref = false;
4341 return ChannelAnnouncement_set_contents(this_ptr_conv, val_conv);
4344 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) {
4345 LDKSignature node_signature_1_arg_conv = *(LDKSignature*)node_signature_1_arg;
4346 free((void*)node_signature_1_arg);
4347 LDKSignature node_signature_2_arg_conv = *(LDKSignature*)node_signature_2_arg;
4348 free((void*)node_signature_2_arg);
4349 LDKSignature bitcoin_signature_1_arg_conv = *(LDKSignature*)bitcoin_signature_1_arg;
4350 free((void*)bitcoin_signature_1_arg);
4351 LDKSignature bitcoin_signature_2_arg_conv = *(LDKSignature*)bitcoin_signature_2_arg;
4352 free((void*)bitcoin_signature_2_arg);
4353 LDKUnsignedChannelAnnouncement contents_arg_conv = *(LDKUnsignedChannelAnnouncement*)contents_arg;
4354 free((void*)contents_arg);
4355 contents_arg_conv._underlying_ref = false;
4356 LDKChannelAnnouncement* ret = malloc(sizeof(LDKChannelAnnouncement));
4357 *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);
4358 assert(!ret->_underlying_ref);
4359 ret->_underlying_ref = true;
4363 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4364 LDKUnsignedChannelUpdate this_ptr_conv = *(LDKUnsignedChannelUpdate*)this_ptr;
4365 free((void*)this_ptr);
4366 this_ptr_conv._underlying_ref = false;
4367 return UnsignedChannelUpdate_free(this_ptr_conv);
4370 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr) {
4371 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4372 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
4373 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *UnsignedChannelUpdate_get_chain_hash(this_ptr_conv));
4377 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4378 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4379 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
4381 return UnsignedChannelUpdate_set_chain_hash(this_ptr_conv, val_conv);
4384 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
4385 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4386 return UnsignedChannelUpdate_get_short_channel_id(this_ptr_conv);
4389 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4390 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4391 return UnsignedChannelUpdate_set_short_channel_id(this_ptr_conv, val);
4394 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1timestamp(JNIEnv * _env, jclass _b, jlong this_ptr) {
4395 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4396 return UnsignedChannelUpdate_get_timestamp(this_ptr_conv);
4399 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1timestamp(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
4400 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4401 return UnsignedChannelUpdate_set_timestamp(this_ptr_conv, val);
4404 JNIEXPORT jbyte JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1flags(JNIEnv * _env, jclass _b, jlong this_ptr) {
4405 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4406 return UnsignedChannelUpdate_get_flags(this_ptr_conv);
4409 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1flags(JNIEnv * _env, jclass _b, jlong this_ptr, jbyte val) {
4410 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4411 return UnsignedChannelUpdate_set_flags(this_ptr_conv, val);
4414 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1cltv_1expiry_1delta(JNIEnv * _env, jclass _b, jlong this_ptr) {
4415 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4416 uint16_t* ret = malloc(sizeof(uint16_t));
4417 *ret = UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr_conv);
4421 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1cltv_1expiry_1delta(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4422 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4423 uint16_t val_conv = *(uint16_t*)val;
4425 return UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr_conv, val_conv);
4428 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
4429 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4430 return UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr_conv);
4433 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4434 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4435 return UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr_conv, val);
4438 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1fee_1base_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
4439 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4440 return UnsignedChannelUpdate_get_fee_base_msat(this_ptr_conv);
4443 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1fee_1base_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
4444 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4445 return UnsignedChannelUpdate_set_fee_base_msat(this_ptr_conv, val);
4448 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1fee_1proportional_1millionths(JNIEnv * _env, jclass _b, jlong this_ptr) {
4449 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4450 return UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr_conv);
4453 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1fee_1proportional_1millionths(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
4454 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4455 return UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr_conv, val);
4458 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4459 LDKChannelUpdate this_ptr_conv = *(LDKChannelUpdate*)this_ptr;
4460 free((void*)this_ptr);
4461 this_ptr_conv._underlying_ref = false;
4462 return ChannelUpdate_free(this_ptr_conv);
4465 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1get_1signature(JNIEnv * _env, jclass _b, jlong this_ptr) {
4466 LDKChannelUpdate* this_ptr_conv = (LDKChannelUpdate*)this_ptr;
4467 LDKSignature* ret = malloc(sizeof(LDKSignature));
4468 *ret = ChannelUpdate_get_signature(this_ptr_conv);
4472 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1set_1signature(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4473 LDKChannelUpdate* this_ptr_conv = (LDKChannelUpdate*)this_ptr;
4474 LDKSignature val_conv = *(LDKSignature*)val;
4476 return ChannelUpdate_set_signature(this_ptr_conv, val_conv);
4479 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1get_1contents(JNIEnv * _env, jclass _b, jlong this_ptr) {
4480 LDKChannelUpdate* this_ptr_conv = (LDKChannelUpdate*)this_ptr;
4481 LDKUnsignedChannelUpdate* ret = malloc(sizeof(LDKUnsignedChannelUpdate));
4482 *ret = ChannelUpdate_get_contents(this_ptr_conv);
4483 assert(!ret->_underlying_ref);
4484 ret->_underlying_ref = true;
4488 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1set_1contents(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4489 LDKChannelUpdate* this_ptr_conv = (LDKChannelUpdate*)this_ptr;
4490 LDKUnsignedChannelUpdate val_conv = *(LDKUnsignedChannelUpdate*)val;
4492 val_conv._underlying_ref = false;
4493 return ChannelUpdate_set_contents(this_ptr_conv, val_conv);
4496 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1new(JNIEnv * _env, jclass _b, jlong signature_arg, jlong contents_arg) {
4497 LDKSignature signature_arg_conv = *(LDKSignature*)signature_arg;
4498 free((void*)signature_arg);
4499 LDKUnsignedChannelUpdate contents_arg_conv = *(LDKUnsignedChannelUpdate*)contents_arg;
4500 free((void*)contents_arg);
4501 contents_arg_conv._underlying_ref = false;
4502 LDKChannelUpdate* ret = malloc(sizeof(LDKChannelUpdate));
4503 *ret = ChannelUpdate_new(signature_arg_conv, contents_arg_conv);
4504 assert(!ret->_underlying_ref);
4505 ret->_underlying_ref = true;
4509 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorAction_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4510 LDKErrorAction this_ptr_conv = *(LDKErrorAction*)this_ptr;
4511 free((void*)this_ptr);
4512 return ErrorAction_free(this_ptr_conv);
4515 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LightningError_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4516 LDKLightningError this_ptr_conv = *(LDKLightningError*)this_ptr;
4517 free((void*)this_ptr);
4518 this_ptr_conv._underlying_ref = false;
4519 return LightningError_free(this_ptr_conv);
4522 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LightningError_1get_1err(JNIEnv * _env, jclass _b, jlong this_ptr) {
4523 LDKLightningError* this_ptr_conv = (LDKLightningError*)this_ptr;
4524 LDKStr* ret = malloc(sizeof(LDKStr));
4525 *ret = LightningError_get_err(this_ptr_conv);
4529 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LightningError_1set_1err(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4530 LDKLightningError* this_ptr_conv = (LDKLightningError*)this_ptr;
4531 LDKCVec_u8Z val_conv = *(LDKCVec_u8Z*)val;
4533 return LightningError_set_err(this_ptr_conv, val_conv);
4536 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LightningError_1get_1action(JNIEnv * _env, jclass _b, jlong this_ptr) {
4537 LDKLightningError* this_ptr_conv = (LDKLightningError*)this_ptr;
4538 LDKErrorAction* ret = malloc(sizeof(LDKErrorAction));
4539 *ret = LightningError_get_action(this_ptr_conv);
4543 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LightningError_1set_1action(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4544 LDKLightningError* this_ptr_conv = (LDKLightningError*)this_ptr;
4545 LDKErrorAction val_conv = *(LDKErrorAction*)val;
4547 return LightningError_set_action(this_ptr_conv, val_conv);
4550 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LightningError_1new(JNIEnv * _env, jclass _b, jlong err_arg, jlong action_arg) {
4551 LDKCVec_u8Z err_arg_conv = *(LDKCVec_u8Z*)err_arg;
4552 free((void*)err_arg);
4553 LDKErrorAction action_arg_conv = *(LDKErrorAction*)action_arg;
4554 free((void*)action_arg);
4555 LDKLightningError* ret = malloc(sizeof(LDKLightningError));
4556 *ret = LightningError_new(err_arg_conv, action_arg_conv);
4557 assert(!ret->_underlying_ref);
4558 ret->_underlying_ref = true;
4562 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4563 LDKCommitmentUpdate this_ptr_conv = *(LDKCommitmentUpdate*)this_ptr;
4564 free((void*)this_ptr);
4565 this_ptr_conv._underlying_ref = false;
4566 return CommitmentUpdate_free(this_ptr_conv);
4569 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1set_1update_1add_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4570 LDKCommitmentUpdate* this_ptr_conv = (LDKCommitmentUpdate*)this_ptr;
4571 LDKCVec_UpdateAddHTLCZ val_conv = *(LDKCVec_UpdateAddHTLCZ*)val;
4573 return CommitmentUpdate_set_update_add_htlcs(this_ptr_conv, val_conv);
4576 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1set_1update_1fulfill_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4577 LDKCommitmentUpdate* this_ptr_conv = (LDKCommitmentUpdate*)this_ptr;
4578 LDKCVec_UpdateFulfillHTLCZ val_conv = *(LDKCVec_UpdateFulfillHTLCZ*)val;
4580 return CommitmentUpdate_set_update_fulfill_htlcs(this_ptr_conv, val_conv);
4583 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1set_1update_1fail_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4584 LDKCommitmentUpdate* this_ptr_conv = (LDKCommitmentUpdate*)this_ptr;
4585 LDKCVec_UpdateFailHTLCZ val_conv = *(LDKCVec_UpdateFailHTLCZ*)val;
4587 return CommitmentUpdate_set_update_fail_htlcs(this_ptr_conv, val_conv);
4590 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1set_1update_1fail_1malformed_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4591 LDKCommitmentUpdate* this_ptr_conv = (LDKCommitmentUpdate*)this_ptr;
4592 LDKCVec_UpdateFailMalformedHTLCZ val_conv = *(LDKCVec_UpdateFailMalformedHTLCZ*)val;
4594 return CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr_conv, val_conv);
4597 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1get_1update_1fee(JNIEnv * _env, jclass _b, jlong this_ptr) {
4598 LDKCommitmentUpdate* this_ptr_conv = (LDKCommitmentUpdate*)this_ptr;
4599 LDKUpdateFee* ret = malloc(sizeof(LDKUpdateFee));
4600 *ret = CommitmentUpdate_get_update_fee(this_ptr_conv);
4601 assert(!ret->_underlying_ref);
4602 ret->_underlying_ref = true;
4606 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1set_1update_1fee(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4607 LDKCommitmentUpdate* this_ptr_conv = (LDKCommitmentUpdate*)this_ptr;
4608 LDKUpdateFee val_conv = *(LDKUpdateFee*)val;
4610 val_conv._underlying_ref = false;
4611 return CommitmentUpdate_set_update_fee(this_ptr_conv, val_conv);
4614 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1get_1commitment_1signed(JNIEnv * _env, jclass _b, jlong this_ptr) {
4615 LDKCommitmentUpdate* this_ptr_conv = (LDKCommitmentUpdate*)this_ptr;
4616 LDKCommitmentSigned* ret = malloc(sizeof(LDKCommitmentSigned));
4617 *ret = CommitmentUpdate_get_commitment_signed(this_ptr_conv);
4618 assert(!ret->_underlying_ref);
4619 ret->_underlying_ref = true;
4623 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1set_1commitment_1signed(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4624 LDKCommitmentUpdate* this_ptr_conv = (LDKCommitmentUpdate*)this_ptr;
4625 LDKCommitmentSigned val_conv = *(LDKCommitmentSigned*)val;
4627 val_conv._underlying_ref = false;
4628 return CommitmentUpdate_set_commitment_signed(this_ptr_conv, val_conv);
4631 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) {
4632 LDKCVec_UpdateAddHTLCZ update_add_htlcs_arg_conv = *(LDKCVec_UpdateAddHTLCZ*)update_add_htlcs_arg;
4633 free((void*)update_add_htlcs_arg);
4634 LDKCVec_UpdateFulfillHTLCZ update_fulfill_htlcs_arg_conv = *(LDKCVec_UpdateFulfillHTLCZ*)update_fulfill_htlcs_arg;
4635 free((void*)update_fulfill_htlcs_arg);
4636 LDKCVec_UpdateFailHTLCZ update_fail_htlcs_arg_conv = *(LDKCVec_UpdateFailHTLCZ*)update_fail_htlcs_arg;
4637 free((void*)update_fail_htlcs_arg);
4638 LDKCVec_UpdateFailMalformedHTLCZ update_fail_malformed_htlcs_arg_conv = *(LDKCVec_UpdateFailMalformedHTLCZ*)update_fail_malformed_htlcs_arg;
4639 free((void*)update_fail_malformed_htlcs_arg);
4640 LDKUpdateFee update_fee_arg_conv = *(LDKUpdateFee*)update_fee_arg;
4641 free((void*)update_fee_arg);
4642 update_fee_arg_conv._underlying_ref = false;
4643 LDKCommitmentSigned commitment_signed_arg_conv = *(LDKCommitmentSigned*)commitment_signed_arg;
4644 free((void*)commitment_signed_arg);
4645 commitment_signed_arg_conv._underlying_ref = false;
4646 LDKCommitmentUpdate* ret = malloc(sizeof(LDKCommitmentUpdate));
4647 *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);
4648 assert(!ret->_underlying_ref);
4649 ret->_underlying_ref = true;
4653 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCFailChannelUpdate_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4654 LDKHTLCFailChannelUpdate this_ptr_conv = *(LDKHTLCFailChannelUpdate*)this_ptr;
4655 free((void*)this_ptr);
4656 return HTLCFailChannelUpdate_free(this_ptr_conv);
4659 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4660 LDKChannelMessageHandler this_ptr_conv = *(LDKChannelMessageHandler*)this_ptr;
4661 free((void*)this_ptr);
4662 return ChannelMessageHandler_free(this_ptr_conv);
4665 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4666 LDKRoutingMessageHandler this_ptr_conv = *(LDKRoutingMessageHandler*)this_ptr;
4667 free((void*)this_ptr);
4668 return RoutingMessageHandler_free(this_ptr_conv);
4671 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1write(JNIEnv * _env, jclass _b, jlong obj) {
4672 LDKAcceptChannel* obj_conv = (LDKAcceptChannel*)obj;
4673 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4674 *ret = AcceptChannel_write(obj_conv);
4678 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1read(JNIEnv * _env, jclass _b, jlong ser) {
4679 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4681 LDKAcceptChannel* ret = malloc(sizeof(LDKAcceptChannel));
4682 *ret = AcceptChannel_read(ser_conv);
4683 assert(!ret->_underlying_ref);
4684 ret->_underlying_ref = true;
4688 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1write(JNIEnv * _env, jclass _b, jlong obj) {
4689 LDKAnnouncementSignatures* obj_conv = (LDKAnnouncementSignatures*)obj;
4690 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4691 *ret = AnnouncementSignatures_write(obj_conv);
4695 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1read(JNIEnv * _env, jclass _b, jlong ser) {
4696 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4698 LDKAnnouncementSignatures* ret = malloc(sizeof(LDKAnnouncementSignatures));
4699 *ret = AnnouncementSignatures_read(ser_conv);
4700 assert(!ret->_underlying_ref);
4701 ret->_underlying_ref = true;
4705 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1write(JNIEnv * _env, jclass _b, jlong obj) {
4706 LDKChannelReestablish* obj_conv = (LDKChannelReestablish*)obj;
4707 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4708 *ret = ChannelReestablish_write(obj_conv);
4712 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1read(JNIEnv * _env, jclass _b, jlong ser) {
4713 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4715 LDKChannelReestablish* ret = malloc(sizeof(LDKChannelReestablish));
4716 *ret = ChannelReestablish_read(ser_conv);
4717 assert(!ret->_underlying_ref);
4718 ret->_underlying_ref = true;
4722 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1write(JNIEnv * _env, jclass _b, jlong obj) {
4723 LDKClosingSigned* obj_conv = (LDKClosingSigned*)obj;
4724 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4725 *ret = ClosingSigned_write(obj_conv);
4729 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1read(JNIEnv * _env, jclass _b, jlong ser) {
4730 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4732 LDKClosingSigned* ret = malloc(sizeof(LDKClosingSigned));
4733 *ret = ClosingSigned_read(ser_conv);
4734 assert(!ret->_underlying_ref);
4735 ret->_underlying_ref = true;
4739 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1write(JNIEnv * _env, jclass _b, jlong obj) {
4740 LDKCommitmentSigned* obj_conv = (LDKCommitmentSigned*)obj;
4741 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4742 *ret = CommitmentSigned_write(obj_conv);
4746 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1read(JNIEnv * _env, jclass _b, jlong ser) {
4747 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4749 LDKCommitmentSigned* ret = malloc(sizeof(LDKCommitmentSigned));
4750 *ret = CommitmentSigned_read(ser_conv);
4751 assert(!ret->_underlying_ref);
4752 ret->_underlying_ref = true;
4756 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingCreated_1write(JNIEnv * _env, jclass _b, jlong obj) {
4757 LDKFundingCreated* obj_conv = (LDKFundingCreated*)obj;
4758 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4759 *ret = FundingCreated_write(obj_conv);
4763 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingCreated_1read(JNIEnv * _env, jclass _b, jlong ser) {
4764 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4766 LDKFundingCreated* ret = malloc(sizeof(LDKFundingCreated));
4767 *ret = FundingCreated_read(ser_conv);
4768 assert(!ret->_underlying_ref);
4769 ret->_underlying_ref = true;
4773 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingSigned_1write(JNIEnv * _env, jclass _b, jlong obj) {
4774 LDKFundingSigned* obj_conv = (LDKFundingSigned*)obj;
4775 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4776 *ret = FundingSigned_write(obj_conv);
4780 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingSigned_1read(JNIEnv * _env, jclass _b, jlong ser) {
4781 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4783 LDKFundingSigned* ret = malloc(sizeof(LDKFundingSigned));
4784 *ret = FundingSigned_read(ser_conv);
4785 assert(!ret->_underlying_ref);
4786 ret->_underlying_ref = true;
4790 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingLocked_1write(JNIEnv * _env, jclass _b, jlong obj) {
4791 LDKFundingLocked* obj_conv = (LDKFundingLocked*)obj;
4792 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4793 *ret = FundingLocked_write(obj_conv);
4797 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingLocked_1read(JNIEnv * _env, jclass _b, jlong ser) {
4798 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4800 LDKFundingLocked* ret = malloc(sizeof(LDKFundingLocked));
4801 *ret = FundingLocked_read(ser_conv);
4802 assert(!ret->_underlying_ref);
4803 ret->_underlying_ref = true;
4807 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Init_1write(JNIEnv * _env, jclass _b, jlong obj) {
4808 LDKInit* obj_conv = (LDKInit*)obj;
4809 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4810 *ret = Init_write(obj_conv);
4814 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Init_1read(JNIEnv * _env, jclass _b, jlong ser) {
4815 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4817 LDKInit* ret = malloc(sizeof(LDKInit));
4818 *ret = Init_read(ser_conv);
4819 assert(!ret->_underlying_ref);
4820 ret->_underlying_ref = true;
4824 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1write(JNIEnv * _env, jclass _b, jlong obj) {
4825 LDKOpenChannel* obj_conv = (LDKOpenChannel*)obj;
4826 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4827 *ret = OpenChannel_write(obj_conv);
4831 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1read(JNIEnv * _env, jclass _b, jlong ser) {
4832 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4834 LDKOpenChannel* ret = malloc(sizeof(LDKOpenChannel));
4835 *ret = OpenChannel_read(ser_conv);
4836 assert(!ret->_underlying_ref);
4837 ret->_underlying_ref = true;
4841 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1write(JNIEnv * _env, jclass _b, jlong obj) {
4842 LDKRevokeAndACK* obj_conv = (LDKRevokeAndACK*)obj;
4843 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4844 *ret = RevokeAndACK_write(obj_conv);
4848 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1read(JNIEnv * _env, jclass _b, jlong ser) {
4849 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4851 LDKRevokeAndACK* ret = malloc(sizeof(LDKRevokeAndACK));
4852 *ret = RevokeAndACK_read(ser_conv);
4853 assert(!ret->_underlying_ref);
4854 ret->_underlying_ref = true;
4858 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Shutdown_1write(JNIEnv * _env, jclass _b, jlong obj) {
4859 LDKShutdown* obj_conv = (LDKShutdown*)obj;
4860 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4861 *ret = Shutdown_write(obj_conv);
4865 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Shutdown_1read(JNIEnv * _env, jclass _b, jlong ser) {
4866 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4868 LDKShutdown* ret = malloc(sizeof(LDKShutdown));
4869 *ret = Shutdown_read(ser_conv);
4870 assert(!ret->_underlying_ref);
4871 ret->_underlying_ref = true;
4875 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1write(JNIEnv * _env, jclass _b, jlong obj) {
4876 LDKUpdateFailHTLC* obj_conv = (LDKUpdateFailHTLC*)obj;
4877 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4878 *ret = UpdateFailHTLC_write(obj_conv);
4882 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1read(JNIEnv * _env, jclass _b, jlong ser) {
4883 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4885 LDKUpdateFailHTLC* ret = malloc(sizeof(LDKUpdateFailHTLC));
4886 *ret = UpdateFailHTLC_read(ser_conv);
4887 assert(!ret->_underlying_ref);
4888 ret->_underlying_ref = true;
4892 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1write(JNIEnv * _env, jclass _b, jlong obj) {
4893 LDKUpdateFailMalformedHTLC* obj_conv = (LDKUpdateFailMalformedHTLC*)obj;
4894 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4895 *ret = UpdateFailMalformedHTLC_write(obj_conv);
4899 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1read(JNIEnv * _env, jclass _b, jlong ser) {
4900 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4902 LDKUpdateFailMalformedHTLC* ret = malloc(sizeof(LDKUpdateFailMalformedHTLC));
4903 *ret = UpdateFailMalformedHTLC_read(ser_conv);
4904 assert(!ret->_underlying_ref);
4905 ret->_underlying_ref = true;
4909 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFee_1write(JNIEnv * _env, jclass _b, jlong obj) {
4910 LDKUpdateFee* obj_conv = (LDKUpdateFee*)obj;
4911 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4912 *ret = UpdateFee_write(obj_conv);
4916 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFee_1read(JNIEnv * _env, jclass _b, jlong ser) {
4917 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4919 LDKUpdateFee* ret = malloc(sizeof(LDKUpdateFee));
4920 *ret = UpdateFee_read(ser_conv);
4921 assert(!ret->_underlying_ref);
4922 ret->_underlying_ref = true;
4926 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1write(JNIEnv * _env, jclass _b, jlong obj) {
4927 LDKUpdateFulfillHTLC* obj_conv = (LDKUpdateFulfillHTLC*)obj;
4928 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4929 *ret = UpdateFulfillHTLC_write(obj_conv);
4933 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1read(JNIEnv * _env, jclass _b, jlong ser) {
4934 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4936 LDKUpdateFulfillHTLC* ret = malloc(sizeof(LDKUpdateFulfillHTLC));
4937 *ret = UpdateFulfillHTLC_read(ser_conv);
4938 assert(!ret->_underlying_ref);
4939 ret->_underlying_ref = true;
4943 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1write(JNIEnv * _env, jclass _b, jlong obj) {
4944 LDKUpdateAddHTLC* obj_conv = (LDKUpdateAddHTLC*)obj;
4945 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4946 *ret = UpdateAddHTLC_write(obj_conv);
4950 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1read(JNIEnv * _env, jclass _b, jlong ser) {
4951 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4953 LDKUpdateAddHTLC* ret = malloc(sizeof(LDKUpdateAddHTLC));
4954 *ret = UpdateAddHTLC_read(ser_conv);
4955 assert(!ret->_underlying_ref);
4956 ret->_underlying_ref = true;
4960 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Ping_1write(JNIEnv * _env, jclass _b, jlong obj) {
4961 LDKPing* obj_conv = (LDKPing*)obj;
4962 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4963 *ret = Ping_write(obj_conv);
4967 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Ping_1read(JNIEnv * _env, jclass _b, jlong ser) {
4968 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4970 LDKPing* ret = malloc(sizeof(LDKPing));
4971 *ret = Ping_read(ser_conv);
4972 assert(!ret->_underlying_ref);
4973 ret->_underlying_ref = true;
4977 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Pong_1write(JNIEnv * _env, jclass _b, jlong obj) {
4978 LDKPong* obj_conv = (LDKPong*)obj;
4979 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4980 *ret = Pong_write(obj_conv);
4984 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Pong_1read(JNIEnv * _env, jclass _b, jlong ser) {
4985 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4987 LDKPong* ret = malloc(sizeof(LDKPong));
4988 *ret = Pong_read(ser_conv);
4989 assert(!ret->_underlying_ref);
4990 ret->_underlying_ref = true;
4994 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1write(JNIEnv * _env, jclass _b, jlong obj) {
4995 LDKUnsignedChannelAnnouncement* obj_conv = (LDKUnsignedChannelAnnouncement*)obj;
4996 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4997 *ret = UnsignedChannelAnnouncement_write(obj_conv);
5001 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1read(JNIEnv * _env, jclass _b, jlong ser) {
5002 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5004 LDKUnsignedChannelAnnouncement* ret = malloc(sizeof(LDKUnsignedChannelAnnouncement));
5005 *ret = UnsignedChannelAnnouncement_read(ser_conv);
5006 assert(!ret->_underlying_ref);
5007 ret->_underlying_ref = true;
5011 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1write(JNIEnv * _env, jclass _b, jlong obj) {
5012 LDKChannelAnnouncement* obj_conv = (LDKChannelAnnouncement*)obj;
5013 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5014 *ret = ChannelAnnouncement_write(obj_conv);
5018 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1read(JNIEnv * _env, jclass _b, jlong ser) {
5019 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5021 LDKChannelAnnouncement* ret = malloc(sizeof(LDKChannelAnnouncement));
5022 *ret = ChannelAnnouncement_read(ser_conv);
5023 assert(!ret->_underlying_ref);
5024 ret->_underlying_ref = true;
5028 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1write(JNIEnv * _env, jclass _b, jlong obj) {
5029 LDKUnsignedChannelUpdate* obj_conv = (LDKUnsignedChannelUpdate*)obj;
5030 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5031 *ret = UnsignedChannelUpdate_write(obj_conv);
5035 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1read(JNIEnv * _env, jclass _b, jlong ser) {
5036 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5038 LDKUnsignedChannelUpdate* ret = malloc(sizeof(LDKUnsignedChannelUpdate));
5039 *ret = UnsignedChannelUpdate_read(ser_conv);
5040 assert(!ret->_underlying_ref);
5041 ret->_underlying_ref = true;
5045 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1write(JNIEnv * _env, jclass _b, jlong obj) {
5046 LDKChannelUpdate* obj_conv = (LDKChannelUpdate*)obj;
5047 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5048 *ret = ChannelUpdate_write(obj_conv);
5052 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1read(JNIEnv * _env, jclass _b, jlong ser) {
5053 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5055 LDKChannelUpdate* ret = malloc(sizeof(LDKChannelUpdate));
5056 *ret = ChannelUpdate_read(ser_conv);
5057 assert(!ret->_underlying_ref);
5058 ret->_underlying_ref = true;
5062 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1write(JNIEnv * _env, jclass _b, jlong obj) {
5063 LDKErrorMessage* obj_conv = (LDKErrorMessage*)obj;
5064 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5065 *ret = ErrorMessage_write(obj_conv);
5069 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1read(JNIEnv * _env, jclass _b, jlong ser) {
5070 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5072 LDKErrorMessage* ret = malloc(sizeof(LDKErrorMessage));
5073 *ret = ErrorMessage_read(ser_conv);
5074 assert(!ret->_underlying_ref);
5075 ret->_underlying_ref = true;
5079 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1write(JNIEnv * _env, jclass _b, jlong obj) {
5080 LDKUnsignedNodeAnnouncement* obj_conv = (LDKUnsignedNodeAnnouncement*)obj;
5081 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5082 *ret = UnsignedNodeAnnouncement_write(obj_conv);
5086 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1read(JNIEnv * _env, jclass _b, jlong ser) {
5087 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5089 LDKUnsignedNodeAnnouncement* ret = malloc(sizeof(LDKUnsignedNodeAnnouncement));
5090 *ret = UnsignedNodeAnnouncement_read(ser_conv);
5091 assert(!ret->_underlying_ref);
5092 ret->_underlying_ref = true;
5096 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1write(JNIEnv * _env, jclass _b, jlong obj) {
5097 LDKNodeAnnouncement* obj_conv = (LDKNodeAnnouncement*)obj;
5098 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5099 *ret = NodeAnnouncement_write(obj_conv);
5103 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1read(JNIEnv * _env, jclass _b, jlong ser) {
5104 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5106 LDKNodeAnnouncement* ret = malloc(sizeof(LDKNodeAnnouncement));
5107 *ret = NodeAnnouncement_read(ser_conv);
5108 assert(!ret->_underlying_ref);
5109 ret->_underlying_ref = true;
5113 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_MessageHandler_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5114 LDKMessageHandler this_ptr_conv = *(LDKMessageHandler*)this_ptr;
5115 free((void*)this_ptr);
5116 this_ptr_conv._underlying_ref = false;
5117 return MessageHandler_free(this_ptr_conv);
5120 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_MessageHandler_1get_1chan_1handler(JNIEnv * _env, jclass _b, jlong this_ptr) {
5121 LDKMessageHandler* this_ptr_conv = (LDKMessageHandler*)this_ptr;
5122 return (long) MessageHandler_get_chan_handler(this_ptr_conv);
5125 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_MessageHandler_1set_1chan_1handler(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5126 LDKMessageHandler* this_ptr_conv = (LDKMessageHandler*)this_ptr;
5127 LDKChannelMessageHandler val_conv = *(LDKChannelMessageHandler*)val;
5129 return MessageHandler_set_chan_handler(this_ptr_conv, val_conv);
5132 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_MessageHandler_1get_1route_1handler(JNIEnv * _env, jclass _b, jlong this_ptr) {
5133 LDKMessageHandler* this_ptr_conv = (LDKMessageHandler*)this_ptr;
5134 return (long) MessageHandler_get_route_handler(this_ptr_conv);
5137 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_MessageHandler_1set_1route_1handler(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5138 LDKMessageHandler* this_ptr_conv = (LDKMessageHandler*)this_ptr;
5139 LDKRoutingMessageHandler val_conv = *(LDKRoutingMessageHandler*)val;
5141 return MessageHandler_set_route_handler(this_ptr_conv, val_conv);
5144 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_MessageHandler_1new(JNIEnv * _env, jclass _b, jlong chan_handler_arg, jlong route_handler_arg) {
5145 LDKChannelMessageHandler chan_handler_arg_conv = *(LDKChannelMessageHandler*)chan_handler_arg;
5146 free((void*)chan_handler_arg);
5147 LDKRoutingMessageHandler route_handler_arg_conv = *(LDKRoutingMessageHandler*)route_handler_arg;
5148 free((void*)route_handler_arg);
5149 LDKMessageHandler* ret = malloc(sizeof(LDKMessageHandler));
5150 *ret = MessageHandler_new(chan_handler_arg_conv, route_handler_arg_conv);
5151 assert(!ret->_underlying_ref);
5152 ret->_underlying_ref = true;
5156 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5157 LDKSocketDescriptor this_ptr_conv = *(LDKSocketDescriptor*)this_ptr;
5158 free((void*)this_ptr);
5159 return SocketDescriptor_free(this_ptr_conv);
5162 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerHandleError_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5163 LDKPeerHandleError this_ptr_conv = *(LDKPeerHandleError*)this_ptr;
5164 free((void*)this_ptr);
5165 this_ptr_conv._underlying_ref = false;
5166 return PeerHandleError_free(this_ptr_conv);
5169 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_PeerHandleError_1get_1no_1connection_1possible(JNIEnv * _env, jclass _b, jlong this_ptr) {
5170 LDKPeerHandleError* this_ptr_conv = (LDKPeerHandleError*)this_ptr;
5171 return PeerHandleError_get_no_connection_possible(this_ptr_conv);
5174 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerHandleError_1set_1no_1connection_1possible(JNIEnv * _env, jclass _b, jlong this_ptr, jboolean val) {
5175 LDKPeerHandleError* this_ptr_conv = (LDKPeerHandleError*)this_ptr;
5176 return PeerHandleError_set_no_connection_possible(this_ptr_conv, val);
5179 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeerHandleError_1new(JNIEnv * _env, jclass _b, jboolean no_connection_possible_arg) {
5180 LDKPeerHandleError* ret = malloc(sizeof(LDKPeerHandleError));
5181 *ret = PeerHandleError_new(no_connection_possible_arg);
5182 assert(!ret->_underlying_ref);
5183 ret->_underlying_ref = true;
5187 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerManager_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5188 LDKPeerManager this_ptr_conv = *(LDKPeerManager*)this_ptr;
5189 free((void*)this_ptr);
5190 this_ptr_conv._underlying_ref = false;
5191 return PeerManager_free(this_ptr_conv);
5194 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) {
5195 LDKMessageHandler message_handler_conv = *(LDKMessageHandler*)message_handler;
5196 free((void*)message_handler);
5197 message_handler_conv._underlying_ref = false;
5198 LDKSecretKey our_node_secret_conv = *(LDKSecretKey*)our_node_secret;
5199 free((void*)our_node_secret);
5200 unsigned char ephemeral_random_data_arr[32];
5201 (*_env)->GetByteArrayRegion (_env, ephemeral_random_data, 0, 32, ephemeral_random_data_arr);
5202 unsigned char (*ephemeral_random_data_ref)[32] = &ephemeral_random_data_arr;
5203 LDKLogger logger_conv = *(LDKLogger*)logger;
5204 free((void*)logger);
5205 LDKPeerManager* ret = malloc(sizeof(LDKPeerManager));
5206 *ret = PeerManager_new(message_handler_conv, our_node_secret_conv, ephemeral_random_data_ref, logger_conv);
5207 assert(!ret->_underlying_ref);
5208 ret->_underlying_ref = true;
5212 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeerManager_1get_1peer_1node_1ids(JNIEnv * _env, jclass _b, jlong this_arg) {
5213 LDKPeerManager* this_arg_conv = (LDKPeerManager*)this_arg;
5214 LDKCVec_PublicKeyZ* ret = malloc(sizeof(LDKCVec_PublicKeyZ));
5215 *ret = PeerManager_get_peer_node_ids(this_arg_conv);
5219 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) {
5220 LDKPeerManager* this_arg_conv = (LDKPeerManager*)this_arg;
5221 LDKPublicKey their_node_id_conv = *(LDKPublicKey*)their_node_id;
5222 free((void*)their_node_id);
5223 LDKSocketDescriptor descriptor_conv = *(LDKSocketDescriptor*)descriptor;
5224 free((void*)descriptor);
5225 LDKCResult_CVec_u8ZPeerHandleErrorZ* ret = malloc(sizeof(LDKCResult_CVec_u8ZPeerHandleErrorZ));
5226 *ret = PeerManager_new_outbound_connection(this_arg_conv, their_node_id_conv, descriptor_conv);
5230 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeerManager_1new_1inbound_1connection(JNIEnv * _env, jclass _b, jlong this_arg, jlong descriptor) {
5231 LDKPeerManager* this_arg_conv = (LDKPeerManager*)this_arg;
5232 LDKSocketDescriptor descriptor_conv = *(LDKSocketDescriptor*)descriptor;
5233 free((void*)descriptor);
5234 LDKCResult_NonePeerHandleErrorZ* ret = malloc(sizeof(LDKCResult_NonePeerHandleErrorZ));
5235 *ret = PeerManager_new_inbound_connection(this_arg_conv, descriptor_conv);
5239 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeerManager_1write_1buffer_1space_1avail(JNIEnv * _env, jclass _b, jlong this_arg, jlong descriptor) {
5240 LDKPeerManager* this_arg_conv = (LDKPeerManager*)this_arg;
5241 LDKSocketDescriptor* descriptor_conv = (LDKSocketDescriptor*)descriptor;
5242 LDKCResult_NonePeerHandleErrorZ* ret = malloc(sizeof(LDKCResult_NonePeerHandleErrorZ));
5243 *ret = PeerManager_write_buffer_space_avail(this_arg_conv, descriptor_conv);
5247 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeerManager_1read_1event(JNIEnv * _env, jclass _b, jlong this_arg, jlong peer_descriptor, jlong data) {
5248 LDKPeerManager* this_arg_conv = (LDKPeerManager*)this_arg;
5249 LDKSocketDescriptor* peer_descriptor_conv = (LDKSocketDescriptor*)peer_descriptor;
5250 LDKu8slice data_conv = *(LDKu8slice*)data;
5252 LDKCResult_boolPeerHandleErrorZ* ret = malloc(sizeof(LDKCResult_boolPeerHandleErrorZ));
5253 *ret = PeerManager_read_event(this_arg_conv, peer_descriptor_conv, data_conv);
5257 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerManager_1process_1events(JNIEnv * _env, jclass _b, jlong this_arg) {
5258 LDKPeerManager* this_arg_conv = (LDKPeerManager*)this_arg;
5259 return PeerManager_process_events(this_arg_conv);
5262 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerManager_1socket_1disconnected(JNIEnv * _env, jclass _b, jlong this_arg, jlong descriptor) {
5263 LDKPeerManager* this_arg_conv = (LDKPeerManager*)this_arg;
5264 LDKSocketDescriptor* descriptor_conv = (LDKSocketDescriptor*)descriptor;
5265 return PeerManager_socket_disconnected(this_arg_conv, descriptor_conv);
5268 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerManager_1timer_1tick_1occured(JNIEnv * _env, jclass _b, jlong this_arg) {
5269 LDKPeerManager* this_arg_conv = (LDKPeerManager*)this_arg;
5270 return PeerManager_timer_tick_occured(this_arg_conv);
5273 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_build_1commitment_1secret(JNIEnv * _env, jclass _b, jbyteArray commitment_seed, jlong idx) {
5274 unsigned char commitment_seed_arr[32];
5275 (*_env)->GetByteArrayRegion (_env, commitment_seed, 0, 32, commitment_seed_arr);
5276 unsigned char (*commitment_seed_ref)[32] = &commitment_seed_arr;
5277 LDKThirtyTwoBytes* ret = malloc(sizeof(LDKThirtyTwoBytes));
5278 *ret = build_commitment_secret(commitment_seed_ref, idx);
5282 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5283 LDKTxCreationKeys this_ptr_conv = *(LDKTxCreationKeys*)this_ptr;
5284 free((void*)this_ptr);
5285 this_ptr_conv._underlying_ref = false;
5286 return TxCreationKeys_free(this_ptr_conv);
5289 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1get_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr) {
5290 LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr;
5291 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5292 *ret = TxCreationKeys_get_per_commitment_point(this_ptr_conv);
5296 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1set_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5297 LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr;
5298 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5300 return TxCreationKeys_set_per_commitment_point(this_ptr_conv, val_conv);
5303 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1get_1revocation_1key(JNIEnv * _env, jclass _b, jlong this_ptr) {
5304 LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr;
5305 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5306 *ret = TxCreationKeys_get_revocation_key(this_ptr_conv);
5310 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1set_1revocation_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5311 LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr;
5312 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5314 return TxCreationKeys_set_revocation_key(this_ptr_conv, val_conv);
5317 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1get_1a_1htlc_1key(JNIEnv * _env, jclass _b, jlong this_ptr) {
5318 LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr;
5319 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5320 *ret = TxCreationKeys_get_a_htlc_key(this_ptr_conv);
5324 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1set_1a_1htlc_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5325 LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr;
5326 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5328 return TxCreationKeys_set_a_htlc_key(this_ptr_conv, val_conv);
5331 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1get_1b_1htlc_1key(JNIEnv * _env, jclass _b, jlong this_ptr) {
5332 LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr;
5333 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5334 *ret = TxCreationKeys_get_b_htlc_key(this_ptr_conv);
5338 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1set_1b_1htlc_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5339 LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr;
5340 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5342 return TxCreationKeys_set_b_htlc_key(this_ptr_conv, val_conv);
5345 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1get_1a_1delayed_1payment_1key(JNIEnv * _env, jclass _b, jlong this_ptr) {
5346 LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr;
5347 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5348 *ret = TxCreationKeys_get_a_delayed_payment_key(this_ptr_conv);
5352 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1set_1a_1delayed_1payment_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5353 LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr;
5354 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5356 return TxCreationKeys_set_a_delayed_payment_key(this_ptr_conv, val_conv);
5359 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) {
5360 LDKPublicKey per_commitment_point_arg_conv = *(LDKPublicKey*)per_commitment_point_arg;
5361 free((void*)per_commitment_point_arg);
5362 LDKPublicKey revocation_key_arg_conv = *(LDKPublicKey*)revocation_key_arg;
5363 free((void*)revocation_key_arg);
5364 LDKPublicKey a_htlc_key_arg_conv = *(LDKPublicKey*)a_htlc_key_arg;
5365 free((void*)a_htlc_key_arg);
5366 LDKPublicKey b_htlc_key_arg_conv = *(LDKPublicKey*)b_htlc_key_arg;
5367 free((void*)b_htlc_key_arg);
5368 LDKPublicKey a_delayed_payment_key_arg_conv = *(LDKPublicKey*)a_delayed_payment_key_arg;
5369 free((void*)a_delayed_payment_key_arg);
5370 LDKTxCreationKeys* ret = malloc(sizeof(LDKTxCreationKeys));
5371 *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);
5372 assert(!ret->_underlying_ref);
5373 ret->_underlying_ref = true;
5377 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1write(JNIEnv * _env, jclass _b, jlong obj) {
5378 LDKTxCreationKeys* obj_conv = (LDKTxCreationKeys*)obj;
5379 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5380 *ret = TxCreationKeys_write(obj_conv);
5384 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1read(JNIEnv * _env, jclass _b, jlong ser) {
5385 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5387 LDKTxCreationKeys* ret = malloc(sizeof(LDKTxCreationKeys));
5388 *ret = TxCreationKeys_read(ser_conv);
5389 assert(!ret->_underlying_ref);
5390 ret->_underlying_ref = true;
5394 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PreCalculatedTxCreationKeys_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5395 LDKPreCalculatedTxCreationKeys this_ptr_conv = *(LDKPreCalculatedTxCreationKeys*)this_ptr;
5396 free((void*)this_ptr);
5397 this_ptr_conv._underlying_ref = false;
5398 return PreCalculatedTxCreationKeys_free(this_ptr_conv);
5401 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PreCalculatedTxCreationKeys_1new(JNIEnv * _env, jclass _b, jlong keys) {
5402 LDKTxCreationKeys keys_conv = *(LDKTxCreationKeys*)keys;
5404 keys_conv._underlying_ref = false;
5405 LDKPreCalculatedTxCreationKeys* ret = malloc(sizeof(LDKPreCalculatedTxCreationKeys));
5406 *ret = PreCalculatedTxCreationKeys_new(keys_conv);
5407 assert(!ret->_underlying_ref);
5408 ret->_underlying_ref = true;
5412 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PreCalculatedTxCreationKeys_1trust_1key_1derivation(JNIEnv * _env, jclass _b, jlong this_arg) {
5413 LDKPreCalculatedTxCreationKeys* this_arg_conv = (LDKPreCalculatedTxCreationKeys*)this_arg;
5414 LDKTxCreationKeys* ret = malloc(sizeof(LDKTxCreationKeys));
5415 *ret = PreCalculatedTxCreationKeys_trust_key_derivation(this_arg_conv);
5416 assert(!ret->_underlying_ref);
5417 ret->_underlying_ref = true;
5421 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PreCalculatedTxCreationKeys_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_arg) {
5422 LDKPreCalculatedTxCreationKeys* this_arg_conv = (LDKPreCalculatedTxCreationKeys*)this_arg;
5423 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5424 *ret = PreCalculatedTxCreationKeys_per_commitment_point(this_arg_conv);
5428 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5429 LDKChannelPublicKeys this_ptr_conv = *(LDKChannelPublicKeys*)this_ptr;
5430 free((void*)this_ptr);
5431 this_ptr_conv._underlying_ref = false;
5432 return ChannelPublicKeys_free(this_ptr_conv);
5435 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1get_1funding_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr) {
5436 LDKChannelPublicKeys* this_ptr_conv = (LDKChannelPublicKeys*)this_ptr;
5437 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5438 *ret = ChannelPublicKeys_get_funding_pubkey(this_ptr_conv);
5442 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1set_1funding_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5443 LDKChannelPublicKeys* this_ptr_conv = (LDKChannelPublicKeys*)this_ptr;
5444 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5446 return ChannelPublicKeys_set_funding_pubkey(this_ptr_conv, val_conv);
5449 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1get_1revocation_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr) {
5450 LDKChannelPublicKeys* this_ptr_conv = (LDKChannelPublicKeys*)this_ptr;
5451 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5452 *ret = ChannelPublicKeys_get_revocation_basepoint(this_ptr_conv);
5456 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1set_1revocation_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5457 LDKChannelPublicKeys* this_ptr_conv = (LDKChannelPublicKeys*)this_ptr;
5458 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5460 return ChannelPublicKeys_set_revocation_basepoint(this_ptr_conv, val_conv);
5463 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1get_1payment_1point(JNIEnv * _env, jclass _b, jlong this_ptr) {
5464 LDKChannelPublicKeys* this_ptr_conv = (LDKChannelPublicKeys*)this_ptr;
5465 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5466 *ret = ChannelPublicKeys_get_payment_point(this_ptr_conv);
5470 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1set_1payment_1point(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5471 LDKChannelPublicKeys* this_ptr_conv = (LDKChannelPublicKeys*)this_ptr;
5472 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5474 return ChannelPublicKeys_set_payment_point(this_ptr_conv, val_conv);
5477 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1get_1delayed_1payment_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr) {
5478 LDKChannelPublicKeys* this_ptr_conv = (LDKChannelPublicKeys*)this_ptr;
5479 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5480 *ret = ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr_conv);
5484 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1set_1delayed_1payment_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5485 LDKChannelPublicKeys* this_ptr_conv = (LDKChannelPublicKeys*)this_ptr;
5486 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5488 return ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr_conv, val_conv);
5491 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1get_1htlc_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr) {
5492 LDKChannelPublicKeys* this_ptr_conv = (LDKChannelPublicKeys*)this_ptr;
5493 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5494 *ret = ChannelPublicKeys_get_htlc_basepoint(this_ptr_conv);
5498 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1set_1htlc_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5499 LDKChannelPublicKeys* this_ptr_conv = (LDKChannelPublicKeys*)this_ptr;
5500 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5502 return ChannelPublicKeys_set_htlc_basepoint(this_ptr_conv, val_conv);
5505 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) {
5506 LDKPublicKey funding_pubkey_arg_conv = *(LDKPublicKey*)funding_pubkey_arg;
5507 free((void*)funding_pubkey_arg);
5508 LDKPublicKey revocation_basepoint_arg_conv = *(LDKPublicKey*)revocation_basepoint_arg;
5509 free((void*)revocation_basepoint_arg);
5510 LDKPublicKey payment_point_arg_conv = *(LDKPublicKey*)payment_point_arg;
5511 free((void*)payment_point_arg);
5512 LDKPublicKey delayed_payment_basepoint_arg_conv = *(LDKPublicKey*)delayed_payment_basepoint_arg;
5513 free((void*)delayed_payment_basepoint_arg);
5514 LDKPublicKey htlc_basepoint_arg_conv = *(LDKPublicKey*)htlc_basepoint_arg;
5515 free((void*)htlc_basepoint_arg);
5516 LDKChannelPublicKeys* ret = malloc(sizeof(LDKChannelPublicKeys));
5517 *ret = ChannelPublicKeys_new(funding_pubkey_arg_conv, revocation_basepoint_arg_conv, payment_point_arg_conv, delayed_payment_basepoint_arg_conv, htlc_basepoint_arg_conv);
5518 assert(!ret->_underlying_ref);
5519 ret->_underlying_ref = true;
5523 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1write(JNIEnv * _env, jclass _b, jlong obj) {
5524 LDKChannelPublicKeys* obj_conv = (LDKChannelPublicKeys*)obj;
5525 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5526 *ret = ChannelPublicKeys_write(obj_conv);
5530 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1read(JNIEnv * _env, jclass _b, jlong ser) {
5531 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5533 LDKChannelPublicKeys* ret = malloc(sizeof(LDKChannelPublicKeys));
5534 *ret = ChannelPublicKeys_read(ser_conv);
5535 assert(!ret->_underlying_ref);
5536 ret->_underlying_ref = true;
5540 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) {
5541 LDKPublicKey per_commitment_point_conv = *(LDKPublicKey*)per_commitment_point;
5542 free((void*)per_commitment_point);
5543 LDKPublicKey a_delayed_payment_base_conv = *(LDKPublicKey*)a_delayed_payment_base;
5544 free((void*)a_delayed_payment_base);
5545 LDKPublicKey a_htlc_base_conv = *(LDKPublicKey*)a_htlc_base;
5546 free((void*)a_htlc_base);
5547 LDKPublicKey b_revocation_base_conv = *(LDKPublicKey*)b_revocation_base;
5548 free((void*)b_revocation_base);
5549 LDKPublicKey b_htlc_base_conv = *(LDKPublicKey*)b_htlc_base;
5550 free((void*)b_htlc_base);
5551 LDKCResult_TxCreationKeysSecpErrorZ* ret = malloc(sizeof(LDKCResult_TxCreationKeysSecpErrorZ));
5552 *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);
5556 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_get_1revokeable_1redeemscript(JNIEnv * _env, jclass _b, jlong revocation_key, jlong to_self_delay, jlong delayed_payment_key) {
5557 LDKPublicKey revocation_key_conv = *(LDKPublicKey*)revocation_key;
5558 free((void*)revocation_key);
5559 uint16_t to_self_delay_conv = *(uint16_t*)to_self_delay;
5560 free((void*)to_self_delay);
5561 LDKPublicKey delayed_payment_key_conv = *(LDKPublicKey*)delayed_payment_key;
5562 free((void*)delayed_payment_key);
5563 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5564 *ret = get_revokeable_redeemscript(revocation_key_conv, to_self_delay_conv, delayed_payment_key_conv);
5568 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5569 LDKHTLCOutputInCommitment this_ptr_conv = *(LDKHTLCOutputInCommitment*)this_ptr;
5570 free((void*)this_ptr);
5571 this_ptr_conv._underlying_ref = false;
5572 return HTLCOutputInCommitment_free(this_ptr_conv);
5575 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1get_1offered(JNIEnv * _env, jclass _b, jlong this_ptr) {
5576 LDKHTLCOutputInCommitment* this_ptr_conv = (LDKHTLCOutputInCommitment*)this_ptr;
5577 return HTLCOutputInCommitment_get_offered(this_ptr_conv);
5580 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1set_1offered(JNIEnv * _env, jclass _b, jlong this_ptr, jboolean val) {
5581 LDKHTLCOutputInCommitment* this_ptr_conv = (LDKHTLCOutputInCommitment*)this_ptr;
5582 return HTLCOutputInCommitment_set_offered(this_ptr_conv, val);
5585 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1get_1amount_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
5586 LDKHTLCOutputInCommitment* this_ptr_conv = (LDKHTLCOutputInCommitment*)this_ptr;
5587 return HTLCOutputInCommitment_get_amount_msat(this_ptr_conv);
5590 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1set_1amount_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5591 LDKHTLCOutputInCommitment* this_ptr_conv = (LDKHTLCOutputInCommitment*)this_ptr;
5592 return HTLCOutputInCommitment_set_amount_msat(this_ptr_conv, val);
5595 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1get_1cltv_1expiry(JNIEnv * _env, jclass _b, jlong this_ptr) {
5596 LDKHTLCOutputInCommitment* this_ptr_conv = (LDKHTLCOutputInCommitment*)this_ptr;
5597 return HTLCOutputInCommitment_get_cltv_expiry(this_ptr_conv);
5600 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1set_1cltv_1expiry(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
5601 LDKHTLCOutputInCommitment* this_ptr_conv = (LDKHTLCOutputInCommitment*)this_ptr;
5602 return HTLCOutputInCommitment_set_cltv_expiry(this_ptr_conv, val);
5605 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1get_1payment_1hash(JNIEnv * _env, jclass _b, jlong this_ptr) {
5606 LDKHTLCOutputInCommitment* this_ptr_conv = (LDKHTLCOutputInCommitment*)this_ptr;
5607 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
5608 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *HTLCOutputInCommitment_get_payment_hash(this_ptr_conv));
5612 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1set_1payment_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5613 LDKHTLCOutputInCommitment* this_ptr_conv = (LDKHTLCOutputInCommitment*)this_ptr;
5614 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
5616 return HTLCOutputInCommitment_set_payment_hash(this_ptr_conv, val_conv);
5619 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1write(JNIEnv * _env, jclass _b, jlong obj) {
5620 LDKHTLCOutputInCommitment* obj_conv = (LDKHTLCOutputInCommitment*)obj;
5621 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5622 *ret = HTLCOutputInCommitment_write(obj_conv);
5626 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1read(JNIEnv * _env, jclass _b, jlong ser) {
5627 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5629 LDKHTLCOutputInCommitment* ret = malloc(sizeof(LDKHTLCOutputInCommitment));
5630 *ret = HTLCOutputInCommitment_read(ser_conv);
5631 assert(!ret->_underlying_ref);
5632 ret->_underlying_ref = true;
5636 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_get_1htlc_1redeemscript(JNIEnv * _env, jclass _b, jlong htlc, jlong keys) {
5637 LDKHTLCOutputInCommitment* htlc_conv = (LDKHTLCOutputInCommitment*)htlc;
5638 LDKTxCreationKeys* keys_conv = (LDKTxCreationKeys*)keys;
5639 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5640 *ret = get_htlc_redeemscript(htlc_conv, keys_conv);
5644 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_make_1funding_1redeemscript(JNIEnv * _env, jclass _b, jlong a, jlong b) {
5645 LDKPublicKey a_conv = *(LDKPublicKey*)a;
5647 LDKPublicKey b_conv = *(LDKPublicKey*)b;
5649 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5650 *ret = make_funding_redeemscript(a_conv, b_conv);
5654 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_build_1htlc_1transaction(JNIEnv * _env, jclass _b, jbyteArray prev_hash, jint feerate_per_kw, jlong to_self_delay, jlong htlc, jlong a_delayed_payment_key, jlong revocation_key) {
5655 unsigned char prev_hash_arr[32];
5656 (*_env)->GetByteArrayRegion (_env, prev_hash, 0, 32, prev_hash_arr);
5657 unsigned char (*prev_hash_ref)[32] = &prev_hash_arr;
5658 uint16_t to_self_delay_conv = *(uint16_t*)to_self_delay;
5659 free((void*)to_self_delay);
5660 LDKHTLCOutputInCommitment* htlc_conv = (LDKHTLCOutputInCommitment*)htlc;
5661 LDKPublicKey a_delayed_payment_key_conv = *(LDKPublicKey*)a_delayed_payment_key;
5662 free((void*)a_delayed_payment_key);
5663 LDKPublicKey revocation_key_conv = *(LDKPublicKey*)revocation_key;
5664 free((void*)revocation_key);
5665 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5666 *ret = build_htlc_transaction(prev_hash_ref, feerate_per_kw, to_self_delay_conv, htlc_conv, a_delayed_payment_key_conv, revocation_key_conv);
5670 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5671 LDKLocalCommitmentTransaction this_ptr_conv = *(LDKLocalCommitmentTransaction*)this_ptr;
5672 free((void*)this_ptr);
5673 this_ptr_conv._underlying_ref = false;
5674 return LocalCommitmentTransaction_free(this_ptr_conv);
5677 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1get_1unsigned_1tx(JNIEnv * _env, jclass _b, jlong this_ptr) {
5678 LDKLocalCommitmentTransaction* this_ptr_conv = (LDKLocalCommitmentTransaction*)this_ptr;
5679 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5680 *ret = LocalCommitmentTransaction_get_unsigned_tx(this_ptr_conv);
5684 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1set_1unsigned_1tx(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5685 LDKLocalCommitmentTransaction* this_ptr_conv = (LDKLocalCommitmentTransaction*)this_ptr;
5686 LDKCVec_u8Z val_conv = *(LDKCVec_u8Z*)val;
5688 return LocalCommitmentTransaction_set_unsigned_tx(this_ptr_conv, val_conv);
5691 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1get_1their_1sig(JNIEnv * _env, jclass _b, jlong this_ptr) {
5692 LDKLocalCommitmentTransaction* this_ptr_conv = (LDKLocalCommitmentTransaction*)this_ptr;
5693 LDKSignature* ret = malloc(sizeof(LDKSignature));
5694 *ret = LocalCommitmentTransaction_get_their_sig(this_ptr_conv);
5698 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1set_1their_1sig(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5699 LDKLocalCommitmentTransaction* this_ptr_conv = (LDKLocalCommitmentTransaction*)this_ptr;
5700 LDKSignature val_conv = *(LDKSignature*)val;
5702 return LocalCommitmentTransaction_set_their_sig(this_ptr_conv, val_conv);
5705 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1get_1feerate_1per_1kw(JNIEnv * _env, jclass _b, jlong this_ptr) {
5706 LDKLocalCommitmentTransaction* this_ptr_conv = (LDKLocalCommitmentTransaction*)this_ptr;
5707 return LocalCommitmentTransaction_get_feerate_per_kw(this_ptr_conv);
5710 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1set_1feerate_1per_1kw(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
5711 LDKLocalCommitmentTransaction* this_ptr_conv = (LDKLocalCommitmentTransaction*)this_ptr;
5712 return LocalCommitmentTransaction_set_feerate_per_kw(this_ptr_conv, val);
5715 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1set_1per_1htlc(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5716 LDKLocalCommitmentTransaction* this_ptr_conv = (LDKLocalCommitmentTransaction*)this_ptr;
5717 LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ val_conv = *(LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ*)val;
5719 return LocalCommitmentTransaction_set_per_htlc(this_ptr_conv, val_conv);
5722 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) {
5723 LDKCVec_u8Z unsigned_tx_conv = *(LDKCVec_u8Z*)unsigned_tx;
5724 free((void*)unsigned_tx);
5725 LDKSignature their_sig_conv = *(LDKSignature*)their_sig;
5726 free((void*)their_sig);
5727 LDKPublicKey our_funding_key_conv = *(LDKPublicKey*)our_funding_key;
5728 free((void*)our_funding_key);
5729 LDKPublicKey their_funding_key_conv = *(LDKPublicKey*)their_funding_key;
5730 free((void*)their_funding_key);
5731 LDKTxCreationKeys local_keys_conv = *(LDKTxCreationKeys*)local_keys;
5732 free((void*)local_keys);
5733 local_keys_conv._underlying_ref = false;
5734 LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ htlc_data_conv = *(LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ*)htlc_data;
5735 free((void*)htlc_data);
5736 LDKLocalCommitmentTransaction* ret = malloc(sizeof(LDKLocalCommitmentTransaction));
5737 *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);
5738 assert(!ret->_underlying_ref);
5739 ret->_underlying_ref = true;
5743 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1trust_1key_1derivation(JNIEnv * _env, jclass _b, jlong this_arg) {
5744 LDKLocalCommitmentTransaction* this_arg_conv = (LDKLocalCommitmentTransaction*)this_arg;
5745 LDKTxCreationKeys* ret = malloc(sizeof(LDKTxCreationKeys));
5746 *ret = LocalCommitmentTransaction_trust_key_derivation(this_arg_conv);
5747 assert(!ret->_underlying_ref);
5748 ret->_underlying_ref = true;
5752 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1txid(JNIEnv * _env, jclass _b, jlong this_arg) {
5753 LDKLocalCommitmentTransaction* this_arg_conv = (LDKLocalCommitmentTransaction*)this_arg;
5754 LDKThirtyTwoBytes* ret = malloc(sizeof(LDKThirtyTwoBytes));
5755 *ret = LocalCommitmentTransaction_txid(this_arg_conv);
5759 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) {
5760 LDKLocalCommitmentTransaction* this_arg_conv = (LDKLocalCommitmentTransaction*)this_arg;
5761 unsigned char funding_key_arr[32];
5762 (*_env)->GetByteArrayRegion (_env, funding_key, 0, 32, funding_key_arr);
5763 unsigned char (*funding_key_ref)[32] = &funding_key_arr;
5764 LDKu8slice funding_redeemscript_conv = *(LDKu8slice*)funding_redeemscript;
5765 free((void*)funding_redeemscript);
5766 LDKSignature* ret = malloc(sizeof(LDKSignature));
5767 *ret = LocalCommitmentTransaction_get_local_sig(this_arg_conv, funding_key_ref, funding_redeemscript_conv, channel_value_satoshis);
5771 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1get_1htlc_1sigs(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray htlc_base_key, jlong local_csv) {
5772 LDKLocalCommitmentTransaction* this_arg_conv = (LDKLocalCommitmentTransaction*)this_arg;
5773 unsigned char htlc_base_key_arr[32];
5774 (*_env)->GetByteArrayRegion (_env, htlc_base_key, 0, 32, htlc_base_key_arr);
5775 unsigned char (*htlc_base_key_ref)[32] = &htlc_base_key_arr;
5776 uint16_t local_csv_conv = *(uint16_t*)local_csv;
5777 free((void*)local_csv);
5778 LDKCResult_CVec_SignatureZNoneZ* ret = malloc(sizeof(LDKCResult_CVec_SignatureZNoneZ));
5779 *ret = LocalCommitmentTransaction_get_htlc_sigs(this_arg_conv, htlc_base_key_ref, local_csv_conv);
5783 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1write(JNIEnv * _env, jclass _b, jlong obj) {
5784 LDKLocalCommitmentTransaction* obj_conv = (LDKLocalCommitmentTransaction*)obj;
5785 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5786 *ret = LocalCommitmentTransaction_write(obj_conv);
5790 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1read(JNIEnv * _env, jclass _b, jlong ser) {
5791 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5793 LDKLocalCommitmentTransaction* ret = malloc(sizeof(LDKLocalCommitmentTransaction));
5794 *ret = LocalCommitmentTransaction_read(ser_conv);
5795 assert(!ret->_underlying_ref);
5796 ret->_underlying_ref = true;
5800 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InitFeatures_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5801 LDKInitFeatures this_ptr_conv = *(LDKInitFeatures*)this_ptr;
5802 free((void*)this_ptr);
5803 this_ptr_conv._underlying_ref = false;
5804 return InitFeatures_free(this_ptr_conv);
5807 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5808 LDKNodeFeatures this_ptr_conv = *(LDKNodeFeatures*)this_ptr;
5809 free((void*)this_ptr);
5810 this_ptr_conv._underlying_ref = false;
5811 return NodeFeatures_free(this_ptr_conv);
5814 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelFeatures_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5815 LDKChannelFeatures this_ptr_conv = *(LDKChannelFeatures*)this_ptr;
5816 free((void*)this_ptr);
5817 this_ptr_conv._underlying_ref = false;
5818 return ChannelFeatures_free(this_ptr_conv);
5821 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHop_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5822 LDKRouteHop this_ptr_conv = *(LDKRouteHop*)this_ptr;
5823 free((void*)this_ptr);
5824 this_ptr_conv._underlying_ref = false;
5825 return RouteHop_free(this_ptr_conv);
5828 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHop_1get_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr) {
5829 LDKRouteHop* this_ptr_conv = (LDKRouteHop*)this_ptr;
5830 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5831 *ret = RouteHop_get_pubkey(this_ptr_conv);
5835 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHop_1set_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5836 LDKRouteHop* this_ptr_conv = (LDKRouteHop*)this_ptr;
5837 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5839 return RouteHop_set_pubkey(this_ptr_conv, val_conv);
5842 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHop_1get_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
5843 LDKRouteHop* this_ptr_conv = (LDKRouteHop*)this_ptr;
5844 return RouteHop_get_short_channel_id(this_ptr_conv);
5847 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHop_1set_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5848 LDKRouteHop* this_ptr_conv = (LDKRouteHop*)this_ptr;
5849 return RouteHop_set_short_channel_id(this_ptr_conv, val);
5852 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHop_1get_1fee_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
5853 LDKRouteHop* this_ptr_conv = (LDKRouteHop*)this_ptr;
5854 return RouteHop_get_fee_msat(this_ptr_conv);
5857 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHop_1set_1fee_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5858 LDKRouteHop* this_ptr_conv = (LDKRouteHop*)this_ptr;
5859 return RouteHop_set_fee_msat(this_ptr_conv, val);
5862 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_RouteHop_1get_1cltv_1expiry_1delta(JNIEnv * _env, jclass _b, jlong this_ptr) {
5863 LDKRouteHop* this_ptr_conv = (LDKRouteHop*)this_ptr;
5864 return RouteHop_get_cltv_expiry_delta(this_ptr_conv);
5867 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHop_1set_1cltv_1expiry_1delta(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
5868 LDKRouteHop* this_ptr_conv = (LDKRouteHop*)this_ptr;
5869 return RouteHop_set_cltv_expiry_delta(this_ptr_conv, val);
5872 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Route_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5873 LDKRoute this_ptr_conv = *(LDKRoute*)this_ptr;
5874 free((void*)this_ptr);
5875 this_ptr_conv._underlying_ref = false;
5876 return Route_free(this_ptr_conv);
5879 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Route_1set_1paths(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5880 LDKRoute* this_ptr_conv = (LDKRoute*)this_ptr;
5881 LDKCVec_CVec_RouteHopZZ val_conv = *(LDKCVec_CVec_RouteHopZZ*)val;
5883 return Route_set_paths(this_ptr_conv, val_conv);
5886 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Route_1new(JNIEnv * _env, jclass _b, jlong paths_arg) {
5887 LDKCVec_CVec_RouteHopZZ paths_arg_conv = *(LDKCVec_CVec_RouteHopZZ*)paths_arg;
5888 free((void*)paths_arg);
5889 LDKRoute* ret = malloc(sizeof(LDKRoute));
5890 *ret = Route_new(paths_arg_conv);
5891 assert(!ret->_underlying_ref);
5892 ret->_underlying_ref = true;
5896 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Route_1write(JNIEnv * _env, jclass _b, jlong obj) {
5897 LDKRoute* obj_conv = (LDKRoute*)obj;
5898 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5899 *ret = Route_write(obj_conv);
5903 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Route_1read(JNIEnv * _env, jclass _b, jlong ser) {
5904 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5906 LDKRoute* ret = malloc(sizeof(LDKRoute));
5907 *ret = Route_read(ser_conv);
5908 assert(!ret->_underlying_ref);
5909 ret->_underlying_ref = true;
5913 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5914 LDKRouteHint this_ptr_conv = *(LDKRouteHint*)this_ptr;
5915 free((void*)this_ptr);
5916 this_ptr_conv._underlying_ref = false;
5917 return RouteHint_free(this_ptr_conv);
5920 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHint_1get_1src_1node_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
5921 LDKRouteHint* this_ptr_conv = (LDKRouteHint*)this_ptr;
5922 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5923 *ret = RouteHint_get_src_node_id(this_ptr_conv);
5927 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1set_1src_1node_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5928 LDKRouteHint* this_ptr_conv = (LDKRouteHint*)this_ptr;
5929 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5931 return RouteHint_set_src_node_id(this_ptr_conv, val_conv);
5934 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHint_1get_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
5935 LDKRouteHint* this_ptr_conv = (LDKRouteHint*)this_ptr;
5936 return RouteHint_get_short_channel_id(this_ptr_conv);
5939 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1set_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5940 LDKRouteHint* this_ptr_conv = (LDKRouteHint*)this_ptr;
5941 return RouteHint_set_short_channel_id(this_ptr_conv, val);
5944 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHint_1get_1fees(JNIEnv * _env, jclass _b, jlong this_ptr) {
5945 LDKRouteHint* this_ptr_conv = (LDKRouteHint*)this_ptr;
5946 LDKRoutingFees* ret = malloc(sizeof(LDKRoutingFees));
5947 *ret = RouteHint_get_fees(this_ptr_conv);
5948 assert(!ret->_underlying_ref);
5949 ret->_underlying_ref = true;
5953 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1set_1fees(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5954 LDKRouteHint* this_ptr_conv = (LDKRouteHint*)this_ptr;
5955 LDKRoutingFees val_conv = *(LDKRoutingFees*)val;
5957 val_conv._underlying_ref = false;
5958 return RouteHint_set_fees(this_ptr_conv, val_conv);
5961 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHint_1get_1cltv_1expiry_1delta(JNIEnv * _env, jclass _b, jlong this_ptr) {
5962 LDKRouteHint* this_ptr_conv = (LDKRouteHint*)this_ptr;
5963 uint16_t* ret = malloc(sizeof(uint16_t));
5964 *ret = RouteHint_get_cltv_expiry_delta(this_ptr_conv);
5968 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1set_1cltv_1expiry_1delta(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5969 LDKRouteHint* this_ptr_conv = (LDKRouteHint*)this_ptr;
5970 uint16_t val_conv = *(uint16_t*)val;
5972 return RouteHint_set_cltv_expiry_delta(this_ptr_conv, val_conv);
5975 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHint_1get_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
5976 LDKRouteHint* this_ptr_conv = (LDKRouteHint*)this_ptr;
5977 return RouteHint_get_htlc_minimum_msat(this_ptr_conv);
5980 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1set_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5981 LDKRouteHint* this_ptr_conv = (LDKRouteHint*)this_ptr;
5982 return RouteHint_set_htlc_minimum_msat(this_ptr_conv, val);
5985 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, jlong cltv_expiry_delta_arg, jlong htlc_minimum_msat_arg) {
5986 LDKPublicKey src_node_id_arg_conv = *(LDKPublicKey*)src_node_id_arg;
5987 free((void*)src_node_id_arg);
5988 LDKRoutingFees fees_arg_conv = *(LDKRoutingFees*)fees_arg;
5989 free((void*)fees_arg);
5990 fees_arg_conv._underlying_ref = false;
5991 uint16_t cltv_expiry_delta_arg_conv = *(uint16_t*)cltv_expiry_delta_arg;
5992 free((void*)cltv_expiry_delta_arg);
5993 LDKRouteHint* ret = malloc(sizeof(LDKRouteHint));
5994 *ret = RouteHint_new(src_node_id_arg_conv, short_channel_id_arg, fees_arg_conv, cltv_expiry_delta_arg_conv, htlc_minimum_msat_arg);
5995 assert(!ret->_underlying_ref);
5996 ret->_underlying_ref = true;
6000 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) {
6001 LDKPublicKey our_node_id_conv = *(LDKPublicKey*)our_node_id;
6002 free((void*)our_node_id);
6003 LDKNetworkGraph* network_conv = (LDKNetworkGraph*)network;
6004 LDKPublicKey target_conv = *(LDKPublicKey*)target;
6005 free((void*)target);
6006 LDKCVec_ChannelDetailsZ* first_hops_conv = (LDKCVec_ChannelDetailsZ*)first_hops;
6007 LDKCVec_RouteHintZ last_hops_conv = *(LDKCVec_RouteHintZ*)last_hops;
6008 free((void*)last_hops);
6009 LDKLogger logger_conv = *(LDKLogger*)logger;
6010 free((void*)logger);
6011 LDKCResult_RouteLightningErrorZ* ret = malloc(sizeof(LDKCResult_RouteLightningErrorZ));
6012 *ret = get_route(our_node_id_conv, network_conv, target_conv, first_hops_conv, last_hops_conv, final_value_msat, final_cltv, logger_conv);
6016 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
6017 LDKNetworkGraph this_ptr_conv = *(LDKNetworkGraph*)this_ptr;
6018 free((void*)this_ptr);
6019 this_ptr_conv._underlying_ref = false;
6020 return NetworkGraph_free(this_ptr_conv);
6023 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LockedNetworkGraph_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
6024 LDKLockedNetworkGraph this_ptr_conv = *(LDKLockedNetworkGraph*)this_ptr;
6025 free((void*)this_ptr);
6026 this_ptr_conv._underlying_ref = false;
6027 return LockedNetworkGraph_free(this_ptr_conv);
6030 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetGraphMsgHandler_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
6031 LDKNetGraphMsgHandler this_ptr_conv = *(LDKNetGraphMsgHandler*)this_ptr;
6032 free((void*)this_ptr);
6033 this_ptr_conv._underlying_ref = false;
6034 return NetGraphMsgHandler_free(this_ptr_conv);
6037 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetGraphMsgHandler_1new(JNIEnv * _env, jclass _b, jlong chain_monitor, jlong logger) {
6038 LDKChainWatchInterface chain_monitor_conv = *(LDKChainWatchInterface*)chain_monitor;
6039 free((void*)chain_monitor);
6040 LDKLogger logger_conv = *(LDKLogger*)logger;
6041 free((void*)logger);
6042 LDKNetGraphMsgHandler* ret = malloc(sizeof(LDKNetGraphMsgHandler));
6043 *ret = NetGraphMsgHandler_new(chain_monitor_conv, logger_conv);
6044 assert(!ret->_underlying_ref);
6045 ret->_underlying_ref = true;
6049 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetGraphMsgHandler_1from_1net_1graph(JNIEnv * _env, jclass _b, jlong chain_monitor, jlong logger, jlong network_graph) {
6050 LDKChainWatchInterface chain_monitor_conv = *(LDKChainWatchInterface*)chain_monitor;
6051 free((void*)chain_monitor);
6052 LDKLogger logger_conv = *(LDKLogger*)logger;
6053 free((void*)logger);
6054 LDKNetworkGraph network_graph_conv = *(LDKNetworkGraph*)network_graph;
6055 free((void*)network_graph);
6056 network_graph_conv._underlying_ref = false;
6057 LDKNetGraphMsgHandler* ret = malloc(sizeof(LDKNetGraphMsgHandler));
6058 *ret = NetGraphMsgHandler_from_net_graph(chain_monitor_conv, logger_conv, network_graph_conv);
6059 assert(!ret->_underlying_ref);
6060 ret->_underlying_ref = true;
6064 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetGraphMsgHandler_1read_1locked_1graph(JNIEnv * _env, jclass _b, jlong this_arg) {
6065 LDKNetGraphMsgHandler* this_arg_conv = (LDKNetGraphMsgHandler*)this_arg;
6066 LDKLockedNetworkGraph* ret = malloc(sizeof(LDKLockedNetworkGraph));
6067 *ret = NetGraphMsgHandler_read_locked_graph(this_arg_conv);
6068 assert(!ret->_underlying_ref);
6069 ret->_underlying_ref = true;
6073 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LockedNetworkGraph_1graph(JNIEnv * _env, jclass _b, jlong this_arg) {
6074 LDKLockedNetworkGraph* this_arg_conv = (LDKLockedNetworkGraph*)this_arg;
6075 LDKNetworkGraph* ret = malloc(sizeof(LDKNetworkGraph));
6076 *ret = LockedNetworkGraph_graph(this_arg_conv);
6077 assert(!ret->_underlying_ref);
6078 ret->_underlying_ref = true;
6082 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetGraphMsgHandler_1as_1RoutingMessageHandler(JNIEnv * _env, jclass _b, jlong this_arg) {
6083 LDKNetGraphMsgHandler* this_arg_conv = (LDKNetGraphMsgHandler*)this_arg;
6084 LDKRoutingMessageHandler* ret = malloc(sizeof(LDKRoutingMessageHandler));
6085 *ret = NetGraphMsgHandler_as_RoutingMessageHandler(this_arg_conv);
6089 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
6090 LDKDirectionalChannelInfo this_ptr_conv = *(LDKDirectionalChannelInfo*)this_ptr;
6091 free((void*)this_ptr);
6092 this_ptr_conv._underlying_ref = false;
6093 return DirectionalChannelInfo_free(this_ptr_conv);
6096 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1get_1last_1update(JNIEnv * _env, jclass _b, jlong this_ptr) {
6097 LDKDirectionalChannelInfo* this_ptr_conv = (LDKDirectionalChannelInfo*)this_ptr;
6098 return DirectionalChannelInfo_get_last_update(this_ptr_conv);
6101 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1set_1last_1update(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
6102 LDKDirectionalChannelInfo* this_ptr_conv = (LDKDirectionalChannelInfo*)this_ptr;
6103 return DirectionalChannelInfo_set_last_update(this_ptr_conv, val);
6106 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1get_1enabled(JNIEnv * _env, jclass _b, jlong this_ptr) {
6107 LDKDirectionalChannelInfo* this_ptr_conv = (LDKDirectionalChannelInfo*)this_ptr;
6108 return DirectionalChannelInfo_get_enabled(this_ptr_conv);
6111 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1set_1enabled(JNIEnv * _env, jclass _b, jlong this_ptr, jboolean val) {
6112 LDKDirectionalChannelInfo* this_ptr_conv = (LDKDirectionalChannelInfo*)this_ptr;
6113 return DirectionalChannelInfo_set_enabled(this_ptr_conv, val);
6116 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1get_1cltv_1expiry_1delta(JNIEnv * _env, jclass _b, jlong this_ptr) {
6117 LDKDirectionalChannelInfo* this_ptr_conv = (LDKDirectionalChannelInfo*)this_ptr;
6118 uint16_t* ret = malloc(sizeof(uint16_t));
6119 *ret = DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr_conv);
6123 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1set_1cltv_1expiry_1delta(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6124 LDKDirectionalChannelInfo* this_ptr_conv = (LDKDirectionalChannelInfo*)this_ptr;
6125 uint16_t val_conv = *(uint16_t*)val;
6127 return DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr_conv, val_conv);
6130 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1get_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
6131 LDKDirectionalChannelInfo* this_ptr_conv = (LDKDirectionalChannelInfo*)this_ptr;
6132 return DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr_conv);
6135 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1set_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6136 LDKDirectionalChannelInfo* this_ptr_conv = (LDKDirectionalChannelInfo*)this_ptr;
6137 return DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr_conv, val);
6140 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1write(JNIEnv * _env, jclass _b, jlong obj) {
6141 LDKDirectionalChannelInfo* obj_conv = (LDKDirectionalChannelInfo*)obj;
6142 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
6143 *ret = DirectionalChannelInfo_write(obj_conv);
6147 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1read(JNIEnv * _env, jclass _b, jlong ser) {
6148 LDKu8slice ser_conv = *(LDKu8slice*)ser;
6150 LDKDirectionalChannelInfo* ret = malloc(sizeof(LDKDirectionalChannelInfo));
6151 *ret = DirectionalChannelInfo_read(ser_conv);
6152 assert(!ret->_underlying_ref);
6153 ret->_underlying_ref = true;
6157 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
6158 LDKChannelInfo this_ptr_conv = *(LDKChannelInfo*)this_ptr;
6159 free((void*)this_ptr);
6160 this_ptr_conv._underlying_ref = false;
6161 return ChannelInfo_free(this_ptr_conv);
6164 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1get_1node_1one(JNIEnv * _env, jclass _b, jlong this_ptr) {
6165 LDKChannelInfo* this_ptr_conv = (LDKChannelInfo*)this_ptr;
6166 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
6167 *ret = ChannelInfo_get_node_one(this_ptr_conv);
6171 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1set_1node_1one(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6172 LDKChannelInfo* this_ptr_conv = (LDKChannelInfo*)this_ptr;
6173 LDKPublicKey val_conv = *(LDKPublicKey*)val;
6175 return ChannelInfo_set_node_one(this_ptr_conv, val_conv);
6178 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1get_1one_1to_1two(JNIEnv * _env, jclass _b, jlong this_ptr) {
6179 LDKChannelInfo* this_ptr_conv = (LDKChannelInfo*)this_ptr;
6180 LDKDirectionalChannelInfo* ret = malloc(sizeof(LDKDirectionalChannelInfo));
6181 *ret = ChannelInfo_get_one_to_two(this_ptr_conv);
6182 assert(!ret->_underlying_ref);
6183 ret->_underlying_ref = true;
6187 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1set_1one_1to_1two(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6188 LDKChannelInfo* this_ptr_conv = (LDKChannelInfo*)this_ptr;
6189 LDKDirectionalChannelInfo val_conv = *(LDKDirectionalChannelInfo*)val;
6191 val_conv._underlying_ref = false;
6192 return ChannelInfo_set_one_to_two(this_ptr_conv, val_conv);
6195 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1get_1node_1two(JNIEnv * _env, jclass _b, jlong this_ptr) {
6196 LDKChannelInfo* this_ptr_conv = (LDKChannelInfo*)this_ptr;
6197 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
6198 *ret = ChannelInfo_get_node_two(this_ptr_conv);
6202 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1set_1node_1two(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6203 LDKChannelInfo* this_ptr_conv = (LDKChannelInfo*)this_ptr;
6204 LDKPublicKey val_conv = *(LDKPublicKey*)val;
6206 return ChannelInfo_set_node_two(this_ptr_conv, val_conv);
6209 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1get_1two_1to_1one(JNIEnv * _env, jclass _b, jlong this_ptr) {
6210 LDKChannelInfo* this_ptr_conv = (LDKChannelInfo*)this_ptr;
6211 LDKDirectionalChannelInfo* ret = malloc(sizeof(LDKDirectionalChannelInfo));
6212 *ret = ChannelInfo_get_two_to_one(this_ptr_conv);
6213 assert(!ret->_underlying_ref);
6214 ret->_underlying_ref = true;
6218 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1set_1two_1to_1one(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6219 LDKChannelInfo* this_ptr_conv = (LDKChannelInfo*)this_ptr;
6220 LDKDirectionalChannelInfo val_conv = *(LDKDirectionalChannelInfo*)val;
6222 val_conv._underlying_ref = false;
6223 return ChannelInfo_set_two_to_one(this_ptr_conv, val_conv);
6226 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1write(JNIEnv * _env, jclass _b, jlong obj) {
6227 LDKChannelInfo* obj_conv = (LDKChannelInfo*)obj;
6228 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
6229 *ret = ChannelInfo_write(obj_conv);
6233 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1read(JNIEnv * _env, jclass _b, jlong ser) {
6234 LDKu8slice ser_conv = *(LDKu8slice*)ser;
6236 LDKChannelInfo* ret = malloc(sizeof(LDKChannelInfo));
6237 *ret = ChannelInfo_read(ser_conv);
6238 assert(!ret->_underlying_ref);
6239 ret->_underlying_ref = true;
6243 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingFees_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
6244 LDKRoutingFees this_ptr_conv = *(LDKRoutingFees*)this_ptr;
6245 free((void*)this_ptr);
6246 this_ptr_conv._underlying_ref = false;
6247 return RoutingFees_free(this_ptr_conv);
6250 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_RoutingFees_1get_1base_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
6251 LDKRoutingFees* this_ptr_conv = (LDKRoutingFees*)this_ptr;
6252 return RoutingFees_get_base_msat(this_ptr_conv);
6255 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingFees_1set_1base_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
6256 LDKRoutingFees* this_ptr_conv = (LDKRoutingFees*)this_ptr;
6257 return RoutingFees_set_base_msat(this_ptr_conv, val);
6260 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_RoutingFees_1get_1proportional_1millionths(JNIEnv * _env, jclass _b, jlong this_ptr) {
6261 LDKRoutingFees* this_ptr_conv = (LDKRoutingFees*)this_ptr;
6262 return RoutingFees_get_proportional_millionths(this_ptr_conv);
6265 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingFees_1set_1proportional_1millionths(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
6266 LDKRoutingFees* this_ptr_conv = (LDKRoutingFees*)this_ptr;
6267 return RoutingFees_set_proportional_millionths(this_ptr_conv, val);
6270 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingFees_1new(JNIEnv * _env, jclass _b, jint base_msat_arg, jint proportional_millionths_arg) {
6271 LDKRoutingFees* ret = malloc(sizeof(LDKRoutingFees));
6272 *ret = RoutingFees_new(base_msat_arg, proportional_millionths_arg);
6273 assert(!ret->_underlying_ref);
6274 ret->_underlying_ref = true;
6278 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingFees_1read(JNIEnv * _env, jclass _b, jlong ser) {
6279 LDKu8slice ser_conv = *(LDKu8slice*)ser;
6281 LDKRoutingFees* ret = malloc(sizeof(LDKRoutingFees));
6282 *ret = RoutingFees_read(ser_conv);
6283 assert(!ret->_underlying_ref);
6284 ret->_underlying_ref = true;
6288 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingFees_1write(JNIEnv * _env, jclass _b, jlong obj) {
6289 LDKRoutingFees* obj_conv = (LDKRoutingFees*)obj;
6290 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
6291 *ret = RoutingFees_write(obj_conv);
6295 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
6296 LDKNodeAnnouncementInfo this_ptr_conv = *(LDKNodeAnnouncementInfo*)this_ptr;
6297 free((void*)this_ptr);
6298 this_ptr_conv._underlying_ref = false;
6299 return NodeAnnouncementInfo_free(this_ptr_conv);
6302 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1get_1last_1update(JNIEnv * _env, jclass _b, jlong this_ptr) {
6303 LDKNodeAnnouncementInfo* this_ptr_conv = (LDKNodeAnnouncementInfo*)this_ptr;
6304 return NodeAnnouncementInfo_get_last_update(this_ptr_conv);
6307 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1set_1last_1update(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
6308 LDKNodeAnnouncementInfo* this_ptr_conv = (LDKNodeAnnouncementInfo*)this_ptr;
6309 return NodeAnnouncementInfo_set_last_update(this_ptr_conv, val);
6312 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1get_1rgb(JNIEnv * _env, jclass _b, jlong this_ptr) {
6313 LDKNodeAnnouncementInfo* this_ptr_conv = (LDKNodeAnnouncementInfo*)this_ptr;
6314 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 3);
6315 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 3, *NodeAnnouncementInfo_get_rgb(this_ptr_conv));
6319 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1set_1rgb(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6320 LDKNodeAnnouncementInfo* this_ptr_conv = (LDKNodeAnnouncementInfo*)this_ptr;
6321 LDKThreeBytes val_conv = *(LDKThreeBytes*)val;
6323 return NodeAnnouncementInfo_set_rgb(this_ptr_conv, val_conv);
6326 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1get_1alias(JNIEnv * _env, jclass _b, jlong this_ptr) {
6327 LDKNodeAnnouncementInfo* this_ptr_conv = (LDKNodeAnnouncementInfo*)this_ptr;
6328 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
6329 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *NodeAnnouncementInfo_get_alias(this_ptr_conv));
6333 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1set_1alias(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6334 LDKNodeAnnouncementInfo* this_ptr_conv = (LDKNodeAnnouncementInfo*)this_ptr;
6335 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
6337 return NodeAnnouncementInfo_set_alias(this_ptr_conv, val_conv);
6340 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1set_1addresses(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6341 LDKNodeAnnouncementInfo* this_ptr_conv = (LDKNodeAnnouncementInfo*)this_ptr;
6342 LDKCVec_NetAddressZ val_conv = *(LDKCVec_NetAddressZ*)val;
6344 return NodeAnnouncementInfo_set_addresses(this_ptr_conv, val_conv);
6347 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1write(JNIEnv * _env, jclass _b, jlong obj) {
6348 LDKNodeAnnouncementInfo* obj_conv = (LDKNodeAnnouncementInfo*)obj;
6349 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
6350 *ret = NodeAnnouncementInfo_write(obj_conv);
6354 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1read(JNIEnv * _env, jclass _b, jlong ser) {
6355 LDKu8slice ser_conv = *(LDKu8slice*)ser;
6357 LDKNodeAnnouncementInfo* ret = malloc(sizeof(LDKNodeAnnouncementInfo));
6358 *ret = NodeAnnouncementInfo_read(ser_conv);
6359 assert(!ret->_underlying_ref);
6360 ret->_underlying_ref = true;
6364 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeInfo_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
6365 LDKNodeInfo this_ptr_conv = *(LDKNodeInfo*)this_ptr;
6366 free((void*)this_ptr);
6367 this_ptr_conv._underlying_ref = false;
6368 return NodeInfo_free(this_ptr_conv);
6371 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeInfo_1set_1channels(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6372 LDKNodeInfo* this_ptr_conv = (LDKNodeInfo*)this_ptr;
6373 LDKCVec_u64Z val_conv = *(LDKCVec_u64Z*)val;
6375 return NodeInfo_set_channels(this_ptr_conv, val_conv);
6378 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeInfo_1get_1lowest_1inbound_1channel_1fees(JNIEnv * _env, jclass _b, jlong this_ptr) {
6379 LDKNodeInfo* this_ptr_conv = (LDKNodeInfo*)this_ptr;
6380 LDKRoutingFees* ret = malloc(sizeof(LDKRoutingFees));
6381 *ret = NodeInfo_get_lowest_inbound_channel_fees(this_ptr_conv);
6382 assert(!ret->_underlying_ref);
6383 ret->_underlying_ref = true;
6387 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeInfo_1set_1lowest_1inbound_1channel_1fees(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6388 LDKNodeInfo* this_ptr_conv = (LDKNodeInfo*)this_ptr;
6389 LDKRoutingFees val_conv = *(LDKRoutingFees*)val;
6391 val_conv._underlying_ref = false;
6392 return NodeInfo_set_lowest_inbound_channel_fees(this_ptr_conv, val_conv);
6395 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeInfo_1get_1announcement_1info(JNIEnv * _env, jclass _b, jlong this_ptr) {
6396 LDKNodeInfo* this_ptr_conv = (LDKNodeInfo*)this_ptr;
6397 LDKNodeAnnouncementInfo* ret = malloc(sizeof(LDKNodeAnnouncementInfo));
6398 *ret = NodeInfo_get_announcement_info(this_ptr_conv);
6399 assert(!ret->_underlying_ref);
6400 ret->_underlying_ref = true;
6404 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeInfo_1set_1announcement_1info(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6405 LDKNodeInfo* this_ptr_conv = (LDKNodeInfo*)this_ptr;
6406 LDKNodeAnnouncementInfo val_conv = *(LDKNodeAnnouncementInfo*)val;
6408 val_conv._underlying_ref = false;
6409 return NodeInfo_set_announcement_info(this_ptr_conv, val_conv);
6412 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) {
6413 LDKCVec_u64Z channels_arg_conv = *(LDKCVec_u64Z*)channels_arg;
6414 free((void*)channels_arg);
6415 LDKRoutingFees lowest_inbound_channel_fees_arg_conv = *(LDKRoutingFees*)lowest_inbound_channel_fees_arg;
6416 free((void*)lowest_inbound_channel_fees_arg);
6417 lowest_inbound_channel_fees_arg_conv._underlying_ref = false;
6418 LDKNodeAnnouncementInfo announcement_info_arg_conv = *(LDKNodeAnnouncementInfo*)announcement_info_arg;
6419 free((void*)announcement_info_arg);
6420 announcement_info_arg_conv._underlying_ref = false;
6421 LDKNodeInfo* ret = malloc(sizeof(LDKNodeInfo));
6422 *ret = NodeInfo_new(channels_arg_conv, lowest_inbound_channel_fees_arg_conv, announcement_info_arg_conv);
6423 assert(!ret->_underlying_ref);
6424 ret->_underlying_ref = true;
6428 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeInfo_1write(JNIEnv * _env, jclass _b, jlong obj) {
6429 LDKNodeInfo* obj_conv = (LDKNodeInfo*)obj;
6430 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
6431 *ret = NodeInfo_write(obj_conv);
6435 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeInfo_1read(JNIEnv * _env, jclass _b, jlong ser) {
6436 LDKu8slice ser_conv = *(LDKu8slice*)ser;
6438 LDKNodeInfo* ret = malloc(sizeof(LDKNodeInfo));
6439 *ret = NodeInfo_read(ser_conv);
6440 assert(!ret->_underlying_ref);
6441 ret->_underlying_ref = true;
6445 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1write(JNIEnv * _env, jclass _b, jlong obj) {
6446 LDKNetworkGraph* obj_conv = (LDKNetworkGraph*)obj;
6447 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
6448 *ret = NetworkGraph_write(obj_conv);
6452 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1read(JNIEnv * _env, jclass _b, jlong ser) {
6453 LDKu8slice ser_conv = *(LDKu8slice*)ser;
6455 LDKNetworkGraph* ret = malloc(sizeof(LDKNetworkGraph));
6456 *ret = NetworkGraph_read(ser_conv);
6457 assert(!ret->_underlying_ref);
6458 ret->_underlying_ref = true;
6462 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1new(JNIEnv * _env, jclass _b) {
6463 LDKNetworkGraph* ret = malloc(sizeof(LDKNetworkGraph));
6464 *ret = NetworkGraph_new();
6465 assert(!ret->_underlying_ref);
6466 ret->_underlying_ref = true;
6470 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) {
6471 LDKNetworkGraph* this_arg_conv = (LDKNetworkGraph*)this_arg;
6472 return NetworkGraph_close_channel_from_update(this_arg_conv, short_channel_id, is_permanent);