1 #include "org_ldk_impl_bindings.h"
2 #include <rust_types.h>
8 typedef struct LDKMessageSendEventsProvider_JCalls {
11 jmethodID get_and_clear_pending_msg_events_meth;
12 } LDKMessageSendEventsProvider_JCalls;
13 LDKCVec_MessageSendEventZ get_and_clear_pending_msg_events_jcall(const void* this_arg) {
14 LDKMessageSendEventsProvider_JCalls *j_calls = (LDKMessageSendEventsProvider_JCalls*) this_arg;
15 LDKCVec_MessageSendEventZ* ret = (LDKCVec_MessageSendEventZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->get_and_clear_pending_msg_events_meth);
16 LDKCVec_MessageSendEventZ res = *ret;
20 void LDKMessageSendEventsProvider_JCalls_free(void* this_arg) {
21 LDKMessageSendEventsProvider_JCalls *j_calls = (LDKMessageSendEventsProvider_JCalls*) this_arg;
22 (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o);
25 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKMessageSendEventsProvider_1new (JNIEnv * env, jclass _a, jobject o) {
26 jclass c = (*env)->GetObjectClass(env, o);
28 LDKMessageSendEventsProvider_JCalls *calls = malloc(sizeof(LDKMessageSendEventsProvider_JCalls));
30 calls->o = (*env)->NewGlobalRef(env, o);
31 calls->get_and_clear_pending_msg_events_meth = (*env)->GetMethodID(env, c, "get_and_clear_pending_msg_events", "TODO");
32 assert(calls->get_and_clear_pending_msg_events_meth != NULL);
34 LDKMessageSendEventsProvider *ret = malloc(sizeof(LDKMessageSendEventsProvider));
35 ret->this_arg = (void*) calls;
36 ret->get_and_clear_pending_msg_events = get_and_clear_pending_msg_events_jcall;
37 ret->free = LDKMessageSendEventsProvider_JCalls_free;
41 typedef struct LDKEventsProvider_JCalls {
44 jmethodID get_and_clear_pending_events_meth;
45 } LDKEventsProvider_JCalls;
46 LDKCVec_EventZ get_and_clear_pending_events_jcall(const void* this_arg) {
47 LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) this_arg;
48 LDKCVec_EventZ* ret = (LDKCVec_EventZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->get_and_clear_pending_events_meth);
49 LDKCVec_EventZ res = *ret;
53 void LDKEventsProvider_JCalls_free(void* this_arg) {
54 LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) this_arg;
55 (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o);
58 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKEventsProvider_1new (JNIEnv * env, jclass _a, jobject o) {
59 jclass c = (*env)->GetObjectClass(env, o);
61 LDKEventsProvider_JCalls *calls = malloc(sizeof(LDKEventsProvider_JCalls));
63 calls->o = (*env)->NewGlobalRef(env, o);
64 calls->get_and_clear_pending_events_meth = (*env)->GetMethodID(env, c, "get_and_clear_pending_events", "TODO");
65 assert(calls->get_and_clear_pending_events_meth != NULL);
67 LDKEventsProvider *ret = malloc(sizeof(LDKEventsProvider));
68 ret->this_arg = (void*) calls;
69 ret->get_and_clear_pending_events = get_and_clear_pending_events_jcall;
70 ret->free = LDKEventsProvider_JCalls_free;
74 typedef struct LDKLogger_JCalls {
79 void log_jcall(const void* this_arg, const char *record) {
80 LDKLogger_JCalls *j_calls = (LDKLogger_JCalls*) this_arg;
81 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->log_meth, record);
83 void LDKLogger_JCalls_free(void* this_arg) {
84 LDKLogger_JCalls *j_calls = (LDKLogger_JCalls*) this_arg;
85 (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o);
88 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKLogger_1new (JNIEnv * env, jclass _a, jobject o) {
89 jclass c = (*env)->GetObjectClass(env, o);
91 LDKLogger_JCalls *calls = malloc(sizeof(LDKLogger_JCalls));
93 calls->o = (*env)->NewGlobalRef(env, o);
94 calls->log_meth = (*env)->GetMethodID(env, c, "log", "TODO");
95 assert(calls->log_meth != NULL);
97 LDKLogger *ret = malloc(sizeof(LDKLogger));
98 ret->this_arg = (void*) calls;
100 ret->free = LDKLogger_JCalls_free;
104 typedef struct LDKChainWatchInterface_JCalls {
107 jmethodID install_watch_tx_meth;
108 jmethodID install_watch_outpoint_meth;
109 jmethodID watch_all_txn_meth;
110 jmethodID get_chain_utxo_meth;
111 jmethodID filter_block_meth;
112 jmethodID reentered_meth;
113 } LDKChainWatchInterface_JCalls;
114 void install_watch_tx_jcall(const void* this_arg, const uint8_t (*txid)[32], LDKu8slice script_pub_key) {
115 LDKChainWatchInterface_JCalls *j_calls = (LDKChainWatchInterface_JCalls*) this_arg;
116 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->install_watch_tx_meth, txid, script_pub_key);
118 void install_watch_outpoint_jcall(const void* this_arg, LDKC2Tuple_Txidu32Z outpoint, LDKu8slice out_script) {
119 LDKChainWatchInterface_JCalls *j_calls = (LDKChainWatchInterface_JCalls*) this_arg;
120 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->install_watch_outpoint_meth, outpoint, out_script);
122 void watch_all_txn_jcall(const void* this_arg) {
123 LDKChainWatchInterface_JCalls *j_calls = (LDKChainWatchInterface_JCalls*) this_arg;
124 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->watch_all_txn_meth);
126 LDKCResult_C2Tuple_Scriptu64ZChainErrorZ get_chain_utxo_jcall(const void* this_arg, LDKThirtyTwoBytes genesis_hash, uint64_t unspent_tx_output_identifier) {
127 LDKChainWatchInterface_JCalls *j_calls = (LDKChainWatchInterface_JCalls*) this_arg;
128 LDKCResult_C2Tuple_Scriptu64ZChainErrorZ* ret = (LDKCResult_C2Tuple_Scriptu64ZChainErrorZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->get_chain_utxo_meth, genesis_hash, unspent_tx_output_identifier);
129 LDKCResult_C2Tuple_Scriptu64ZChainErrorZ res = *ret;
133 LDKCVec_usizeZ filter_block_jcall(const void* this_arg, LDKu8slice block) {
134 LDKChainWatchInterface_JCalls *j_calls = (LDKChainWatchInterface_JCalls*) this_arg;
135 LDKCVec_usizeZ* ret = (LDKCVec_usizeZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->filter_block_meth, block);
136 LDKCVec_usizeZ res = *ret;
140 uintptr_t reentered_jcall(const void* this_arg) {
141 LDKChainWatchInterface_JCalls *j_calls = (LDKChainWatchInterface_JCalls*) this_arg;
142 uintptr_t* ret = (uintptr_t*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->reentered_meth);
143 uintptr_t res = *ret;
147 void LDKChainWatchInterface_JCalls_free(void* this_arg) {
148 LDKChainWatchInterface_JCalls *j_calls = (LDKChainWatchInterface_JCalls*) this_arg;
149 (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o);
152 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKChainWatchInterface_1new (JNIEnv * env, jclass _a, jobject o) {
153 jclass c = (*env)->GetObjectClass(env, o);
155 LDKChainWatchInterface_JCalls *calls = malloc(sizeof(LDKChainWatchInterface_JCalls));
157 calls->o = (*env)->NewGlobalRef(env, o);
158 calls->install_watch_tx_meth = (*env)->GetMethodID(env, c, "install_watch_tx", "TODO");
159 assert(calls->install_watch_tx_meth != NULL);
160 calls->install_watch_outpoint_meth = (*env)->GetMethodID(env, c, "install_watch_outpoint", "TODO");
161 assert(calls->install_watch_outpoint_meth != NULL);
162 calls->watch_all_txn_meth = (*env)->GetMethodID(env, c, "watch_all_txn", "TODO");
163 assert(calls->watch_all_txn_meth != NULL);
164 calls->get_chain_utxo_meth = (*env)->GetMethodID(env, c, "get_chain_utxo", "TODO");
165 assert(calls->get_chain_utxo_meth != NULL);
166 calls->filter_block_meth = (*env)->GetMethodID(env, c, "filter_block", "TODO");
167 assert(calls->filter_block_meth != NULL);
168 calls->reentered_meth = (*env)->GetMethodID(env, c, "reentered", "TODO");
169 assert(calls->reentered_meth != NULL);
171 LDKChainWatchInterface *ret = malloc(sizeof(LDKChainWatchInterface));
172 ret->this_arg = (void*) calls;
173 ret->install_watch_tx = install_watch_tx_jcall;
174 ret->install_watch_outpoint = install_watch_outpoint_jcall;
175 ret->watch_all_txn = watch_all_txn_jcall;
176 ret->get_chain_utxo = get_chain_utxo_jcall;
177 ret->filter_block = filter_block_jcall;
178 ret->reentered = reentered_jcall;
179 ret->free = LDKChainWatchInterface_JCalls_free;
183 typedef struct LDKBroadcasterInterface_JCalls {
186 jmethodID broadcast_transaction_meth;
187 } LDKBroadcasterInterface_JCalls;
188 void broadcast_transaction_jcall(const void* this_arg, LDKTransaction tx) {
189 LDKBroadcasterInterface_JCalls *j_calls = (LDKBroadcasterInterface_JCalls*) this_arg;
190 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->broadcast_transaction_meth, tx);
192 void LDKBroadcasterInterface_JCalls_free(void* this_arg) {
193 LDKBroadcasterInterface_JCalls *j_calls = (LDKBroadcasterInterface_JCalls*) this_arg;
194 (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o);
197 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKBroadcasterInterface_1new (JNIEnv * env, jclass _a, jobject o) {
198 jclass c = (*env)->GetObjectClass(env, o);
200 LDKBroadcasterInterface_JCalls *calls = malloc(sizeof(LDKBroadcasterInterface_JCalls));
202 calls->o = (*env)->NewGlobalRef(env, o);
203 calls->broadcast_transaction_meth = (*env)->GetMethodID(env, c, "broadcast_transaction", "TODO");
204 assert(calls->broadcast_transaction_meth != NULL);
206 LDKBroadcasterInterface *ret = malloc(sizeof(LDKBroadcasterInterface));
207 ret->this_arg = (void*) calls;
208 ret->broadcast_transaction = broadcast_transaction_jcall;
209 ret->free = LDKBroadcasterInterface_JCalls_free;
213 typedef struct LDKChainListener_JCalls {
216 jmethodID block_connected_meth;
217 jmethodID block_disconnected_meth;
218 } LDKChainListener_JCalls;
219 void block_connected_jcall(const void* this_arg, const uint8_t (*header)[80], uint32_t height, LDKCVec_TransactionZ txn_matched, LDKusizeslice indexes_of_txn_matched) {
220 LDKChainListener_JCalls *j_calls = (LDKChainListener_JCalls*) this_arg;
221 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->block_connected_meth, header, height, txn_matched, indexes_of_txn_matched);
223 void block_disconnected_jcall(const void* this_arg, const uint8_t (*header)[80], uint32_t disconnected_height) {
224 LDKChainListener_JCalls *j_calls = (LDKChainListener_JCalls*) this_arg;
225 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->block_disconnected_meth, header, disconnected_height);
227 void LDKChainListener_JCalls_free(void* this_arg) {
228 LDKChainListener_JCalls *j_calls = (LDKChainListener_JCalls*) this_arg;
229 (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o);
232 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKChainListener_1new (JNIEnv * env, jclass _a, jobject o) {
233 jclass c = (*env)->GetObjectClass(env, o);
235 LDKChainListener_JCalls *calls = malloc(sizeof(LDKChainListener_JCalls));
237 calls->o = (*env)->NewGlobalRef(env, o);
238 calls->block_connected_meth = (*env)->GetMethodID(env, c, "block_connected", "TODO");
239 assert(calls->block_connected_meth != NULL);
240 calls->block_disconnected_meth = (*env)->GetMethodID(env, c, "block_disconnected", "TODO");
241 assert(calls->block_disconnected_meth != NULL);
243 LDKChainListener *ret = malloc(sizeof(LDKChainListener));
244 ret->this_arg = (void*) calls;
245 ret->block_connected = block_connected_jcall;
246 ret->block_disconnected = block_disconnected_jcall;
247 ret->free = LDKChainListener_JCalls_free;
251 typedef struct LDKFeeEstimator_JCalls {
254 jmethodID get_est_sat_per_1000_weight_meth;
255 } LDKFeeEstimator_JCalls;
256 uint32_t get_est_sat_per_1000_weight_jcall(const void* this_arg, LDKConfirmationTarget confirmation_target) {
257 LDKFeeEstimator_JCalls *j_calls = (LDKFeeEstimator_JCalls*) this_arg;
258 return (*j_calls->env)->CallIntMethod(j_calls->env, j_calls->o, j_calls->get_est_sat_per_1000_weight_meth, confirmation_target);
260 void LDKFeeEstimator_JCalls_free(void* this_arg) {
261 LDKFeeEstimator_JCalls *j_calls = (LDKFeeEstimator_JCalls*) this_arg;
262 (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o);
265 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKFeeEstimator_1new (JNIEnv * env, jclass _a, jobject o) {
266 jclass c = (*env)->GetObjectClass(env, o);
268 LDKFeeEstimator_JCalls *calls = malloc(sizeof(LDKFeeEstimator_JCalls));
270 calls->o = (*env)->NewGlobalRef(env, o);
271 calls->get_est_sat_per_1000_weight_meth = (*env)->GetMethodID(env, c, "get_est_sat_per_1000_weight", "TODO");
272 assert(calls->get_est_sat_per_1000_weight_meth != NULL);
274 LDKFeeEstimator *ret = malloc(sizeof(LDKFeeEstimator));
275 ret->this_arg = (void*) calls;
276 ret->get_est_sat_per_1000_weight = get_est_sat_per_1000_weight_jcall;
277 ret->free = LDKFeeEstimator_JCalls_free;
281 typedef struct LDKChannelKeys_JCalls {
284 jmethodID get_per_commitment_point_meth;
285 jmethodID release_commitment_secret_meth;
286 jmethodID key_derivation_params_meth;
287 jmethodID sign_remote_commitment_meth;
288 jmethodID sign_local_commitment_meth;
289 jmethodID sign_local_commitment_htlc_transactions_meth;
290 jmethodID sign_justice_transaction_meth;
291 jmethodID sign_remote_htlc_transaction_meth;
292 jmethodID sign_closing_transaction_meth;
293 jmethodID sign_channel_announcement_meth;
294 jmethodID on_accept_meth;
295 } LDKChannelKeys_JCalls;
296 LDKPublicKey get_per_commitment_point_jcall(const void* this_arg, uint64_t idx) {
297 LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
298 LDKPublicKey* ret = (LDKPublicKey*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->get_per_commitment_point_meth, idx);
299 LDKPublicKey res = *ret;
303 LDKThirtyTwoBytes release_commitment_secret_jcall(const void* this_arg, uint64_t idx) {
304 LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
305 LDKThirtyTwoBytes* ret = (LDKThirtyTwoBytes*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->release_commitment_secret_meth, idx);
306 LDKThirtyTwoBytes res = *ret;
310 LDKC2Tuple_u64u64Z key_derivation_params_jcall(const void* this_arg) {
311 LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
312 LDKC2Tuple_u64u64Z* ret = (LDKC2Tuple_u64u64Z*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->key_derivation_params_meth);
313 LDKC2Tuple_u64u64Z res = *ret;
317 LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ sign_remote_commitment_jcall(const void* this_arg, uint32_t feerate_per_kw, LDKTransaction commitment_tx, const LDKPreCalculatedTxCreationKeys *keys, LDKCVec_HTLCOutputInCommitmentZ htlcs) {
318 LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
319 LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ* ret = (LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->sign_remote_commitment_meth, feerate_per_kw, commitment_tx, keys, htlcs);
320 LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ res = *ret;
324 LDKCResult_SignatureNoneZ sign_local_commitment_jcall(const void* this_arg, const LDKLocalCommitmentTransaction *local_commitment_tx) {
325 LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
326 LDKCResult_SignatureNoneZ* ret = (LDKCResult_SignatureNoneZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->sign_local_commitment_meth, local_commitment_tx);
327 LDKCResult_SignatureNoneZ res = *ret;
331 LDKCResult_CVec_SignatureZNoneZ sign_local_commitment_htlc_transactions_jcall(const void* this_arg, const LDKLocalCommitmentTransaction *local_commitment_tx) {
332 LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
333 LDKCResult_CVec_SignatureZNoneZ* ret = (LDKCResult_CVec_SignatureZNoneZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->sign_local_commitment_htlc_transactions_meth, local_commitment_tx);
334 LDKCResult_CVec_SignatureZNoneZ res = *ret;
338 LDKCResult_SignatureNoneZ sign_justice_transaction_jcall(const void* this_arg, LDKTransaction justice_tx, uintptr_t input, uint64_t amount, const uint8_t (*per_commitment_key)[32], const LDKHTLCOutputInCommitment *htlc) {
339 LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
340 LDKCResult_SignatureNoneZ* ret = (LDKCResult_SignatureNoneZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->sign_justice_transaction_meth, justice_tx, input, amount, per_commitment_key, htlc);
341 LDKCResult_SignatureNoneZ res = *ret;
345 LDKCResult_SignatureNoneZ sign_remote_htlc_transaction_jcall(const void* this_arg, LDKTransaction htlc_tx, uintptr_t input, uint64_t amount, LDKPublicKey per_commitment_point, const LDKHTLCOutputInCommitment *htlc) {
346 LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
347 LDKCResult_SignatureNoneZ* ret = (LDKCResult_SignatureNoneZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->sign_remote_htlc_transaction_meth, htlc_tx, input, amount, per_commitment_point, htlc);
348 LDKCResult_SignatureNoneZ res = *ret;
352 LDKCResult_SignatureNoneZ sign_closing_transaction_jcall(const void* this_arg, LDKTransaction closing_tx) {
353 LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
354 LDKCResult_SignatureNoneZ* ret = (LDKCResult_SignatureNoneZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->sign_closing_transaction_meth, closing_tx);
355 LDKCResult_SignatureNoneZ res = *ret;
359 LDKCResult_SignatureNoneZ sign_channel_announcement_jcall(const void* this_arg, const LDKUnsignedChannelAnnouncement *msg) {
360 LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
361 LDKCResult_SignatureNoneZ* ret = (LDKCResult_SignatureNoneZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->sign_channel_announcement_meth, msg);
362 LDKCResult_SignatureNoneZ res = *ret;
366 void on_accept_jcall(void* this_arg, const LDKChannelPublicKeys *channel_points, uint16_t remote_to_self_delay, uint16_t local_to_self_delay) {
367 LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
368 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->on_accept_meth, channel_points, remote_to_self_delay, local_to_self_delay);
370 void* LDKChannelKeys_JCalls_clone(const void* this_arg) {
371 LDKChannelKeys_JCalls *ret = malloc(sizeof(LDKChannelKeys_JCalls));
372 memcpy(ret, this_arg, sizeof(LDKChannelKeys_JCalls));
375 void LDKChannelKeys_JCalls_free(void* this_arg) {
376 LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
377 (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o);
380 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKChannelKeys_1new (JNIEnv * env, jclass _a, jobject o) {
381 jclass c = (*env)->GetObjectClass(env, o);
383 LDKChannelKeys_JCalls *calls = malloc(sizeof(LDKChannelKeys_JCalls));
385 calls->o = (*env)->NewGlobalRef(env, o);
386 calls->get_per_commitment_point_meth = (*env)->GetMethodID(env, c, "get_per_commitment_point", "TODO");
387 assert(calls->get_per_commitment_point_meth != NULL);
388 calls->release_commitment_secret_meth = (*env)->GetMethodID(env, c, "release_commitment_secret", "TODO");
389 assert(calls->release_commitment_secret_meth != NULL);
390 calls->key_derivation_params_meth = (*env)->GetMethodID(env, c, "key_derivation_params", "TODO");
391 assert(calls->key_derivation_params_meth != NULL);
392 calls->sign_remote_commitment_meth = (*env)->GetMethodID(env, c, "sign_remote_commitment", "TODO");
393 assert(calls->sign_remote_commitment_meth != NULL);
394 calls->sign_local_commitment_meth = (*env)->GetMethodID(env, c, "sign_local_commitment", "TODO");
395 assert(calls->sign_local_commitment_meth != NULL);
396 calls->sign_local_commitment_htlc_transactions_meth = (*env)->GetMethodID(env, c, "sign_local_commitment_htlc_transactions", "TODO");
397 assert(calls->sign_local_commitment_htlc_transactions_meth != NULL);
398 calls->sign_justice_transaction_meth = (*env)->GetMethodID(env, c, "sign_justice_transaction", "TODO");
399 assert(calls->sign_justice_transaction_meth != NULL);
400 calls->sign_remote_htlc_transaction_meth = (*env)->GetMethodID(env, c, "sign_remote_htlc_transaction", "TODO");
401 assert(calls->sign_remote_htlc_transaction_meth != NULL);
402 calls->sign_closing_transaction_meth = (*env)->GetMethodID(env, c, "sign_closing_transaction", "TODO");
403 assert(calls->sign_closing_transaction_meth != NULL);
404 calls->sign_channel_announcement_meth = (*env)->GetMethodID(env, c, "sign_channel_announcement", "TODO");
405 assert(calls->sign_channel_announcement_meth != NULL);
406 calls->on_accept_meth = (*env)->GetMethodID(env, c, "on_accept", "TODO");
407 assert(calls->on_accept_meth != NULL);
409 LDKChannelKeys *ret = malloc(sizeof(LDKChannelKeys));
410 ret->this_arg = (void*) calls;
411 ret->get_per_commitment_point = get_per_commitment_point_jcall;
412 ret->release_commitment_secret = release_commitment_secret_jcall;
413 ret->key_derivation_params = key_derivation_params_jcall;
414 ret->sign_remote_commitment = sign_remote_commitment_jcall;
415 ret->sign_local_commitment = sign_local_commitment_jcall;
416 ret->sign_local_commitment_htlc_transactions = sign_local_commitment_htlc_transactions_jcall;
417 ret->sign_justice_transaction = sign_justice_transaction_jcall;
418 ret->sign_remote_htlc_transaction = sign_remote_htlc_transaction_jcall;
419 ret->sign_closing_transaction = sign_closing_transaction_jcall;
420 ret->sign_channel_announcement = sign_channel_announcement_jcall;
421 ret->on_accept = on_accept_jcall;
422 ret->clone = LDKChannelKeys_JCalls_clone;
423 ret->free = LDKChannelKeys_JCalls_free;
427 typedef struct LDKKeysInterface_JCalls {
430 jmethodID get_node_secret_meth;
431 jmethodID get_destination_script_meth;
432 jmethodID get_shutdown_pubkey_meth;
433 jmethodID get_channel_keys_meth;
434 jmethodID get_secure_random_bytes_meth;
435 } LDKKeysInterface_JCalls;
436 LDKSecretKey get_node_secret_jcall(const void* this_arg) {
437 LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
438 LDKSecretKey* ret = (LDKSecretKey*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->get_node_secret_meth);
439 LDKSecretKey res = *ret;
443 LDKCVec_u8Z get_destination_script_jcall(const void* this_arg) {
444 LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
445 LDKCVec_u8Z* ret = (LDKCVec_u8Z*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->get_destination_script_meth);
446 LDKCVec_u8Z res = *ret;
450 LDKPublicKey get_shutdown_pubkey_jcall(const void* this_arg) {
451 LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
452 LDKPublicKey* ret = (LDKPublicKey*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->get_shutdown_pubkey_meth);
453 LDKPublicKey res = *ret;
457 LDKChannelKeys get_channel_keys_jcall(const void* this_arg, bool inbound, uint64_t channel_value_satoshis) {
458 LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
459 LDKChannelKeys* ret = (LDKChannelKeys*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->get_channel_keys_meth, inbound, channel_value_satoshis);
460 LDKChannelKeys res = *ret;
464 LDKThirtyTwoBytes get_secure_random_bytes_jcall(const void* this_arg) {
465 LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
466 LDKThirtyTwoBytes* ret = (LDKThirtyTwoBytes*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->get_secure_random_bytes_meth);
467 LDKThirtyTwoBytes res = *ret;
471 void LDKKeysInterface_JCalls_free(void* this_arg) {
472 LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
473 (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o);
476 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKKeysInterface_1new (JNIEnv * env, jclass _a, jobject o) {
477 jclass c = (*env)->GetObjectClass(env, o);
479 LDKKeysInterface_JCalls *calls = malloc(sizeof(LDKKeysInterface_JCalls));
481 calls->o = (*env)->NewGlobalRef(env, o);
482 calls->get_node_secret_meth = (*env)->GetMethodID(env, c, "get_node_secret", "TODO");
483 assert(calls->get_node_secret_meth != NULL);
484 calls->get_destination_script_meth = (*env)->GetMethodID(env, c, "get_destination_script", "TODO");
485 assert(calls->get_destination_script_meth != NULL);
486 calls->get_shutdown_pubkey_meth = (*env)->GetMethodID(env, c, "get_shutdown_pubkey", "TODO");
487 assert(calls->get_shutdown_pubkey_meth != NULL);
488 calls->get_channel_keys_meth = (*env)->GetMethodID(env, c, "get_channel_keys", "TODO");
489 assert(calls->get_channel_keys_meth != NULL);
490 calls->get_secure_random_bytes_meth = (*env)->GetMethodID(env, c, "get_secure_random_bytes", "TODO");
491 assert(calls->get_secure_random_bytes_meth != NULL);
493 LDKKeysInterface *ret = malloc(sizeof(LDKKeysInterface));
494 ret->this_arg = (void*) calls;
495 ret->get_node_secret = get_node_secret_jcall;
496 ret->get_destination_script = get_destination_script_jcall;
497 ret->get_shutdown_pubkey = get_shutdown_pubkey_jcall;
498 ret->get_channel_keys = get_channel_keys_jcall;
499 ret->get_secure_random_bytes = get_secure_random_bytes_jcall;
500 ret->free = LDKKeysInterface_JCalls_free;
504 typedef struct LDKManyChannelMonitor_JCalls {
507 jmethodID add_monitor_meth;
508 jmethodID update_monitor_meth;
509 jmethodID get_and_clear_pending_monitor_events_meth;
510 } LDKManyChannelMonitor_JCalls;
511 LDKCResult_NoneChannelMonitorUpdateErrZ add_monitor_jcall(const void* this_arg, LDKOutPoint funding_txo, LDKChannelMonitor monitor) {
512 LDKManyChannelMonitor_JCalls *j_calls = (LDKManyChannelMonitor_JCalls*) this_arg;
513 LDKCResult_NoneChannelMonitorUpdateErrZ* ret = (LDKCResult_NoneChannelMonitorUpdateErrZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->add_monitor_meth, funding_txo, monitor);
514 LDKCResult_NoneChannelMonitorUpdateErrZ res = *ret;
518 LDKCResult_NoneChannelMonitorUpdateErrZ update_monitor_jcall(const void* this_arg, LDKOutPoint funding_txo, LDKChannelMonitorUpdate monitor) {
519 LDKManyChannelMonitor_JCalls *j_calls = (LDKManyChannelMonitor_JCalls*) this_arg;
520 LDKCResult_NoneChannelMonitorUpdateErrZ* ret = (LDKCResult_NoneChannelMonitorUpdateErrZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->update_monitor_meth, funding_txo, monitor);
521 LDKCResult_NoneChannelMonitorUpdateErrZ res = *ret;
525 LDKCVec_MonitorEventZ get_and_clear_pending_monitor_events_jcall(const void* this_arg) {
526 LDKManyChannelMonitor_JCalls *j_calls = (LDKManyChannelMonitor_JCalls*) this_arg;
527 LDKCVec_MonitorEventZ* ret = (LDKCVec_MonitorEventZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->get_and_clear_pending_monitor_events_meth);
528 LDKCVec_MonitorEventZ res = *ret;
532 void LDKManyChannelMonitor_JCalls_free(void* this_arg) {
533 LDKManyChannelMonitor_JCalls *j_calls = (LDKManyChannelMonitor_JCalls*) this_arg;
534 (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o);
537 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKManyChannelMonitor_1new (JNIEnv * env, jclass _a, jobject o) {
538 jclass c = (*env)->GetObjectClass(env, o);
540 LDKManyChannelMonitor_JCalls *calls = malloc(sizeof(LDKManyChannelMonitor_JCalls));
542 calls->o = (*env)->NewGlobalRef(env, o);
543 calls->add_monitor_meth = (*env)->GetMethodID(env, c, "add_monitor", "TODO");
544 assert(calls->add_monitor_meth != NULL);
545 calls->update_monitor_meth = (*env)->GetMethodID(env, c, "update_monitor", "TODO");
546 assert(calls->update_monitor_meth != NULL);
547 calls->get_and_clear_pending_monitor_events_meth = (*env)->GetMethodID(env, c, "get_and_clear_pending_monitor_events", "TODO");
548 assert(calls->get_and_clear_pending_monitor_events_meth != NULL);
550 LDKManyChannelMonitor *ret = malloc(sizeof(LDKManyChannelMonitor));
551 ret->this_arg = (void*) calls;
552 ret->add_monitor = add_monitor_jcall;
553 ret->update_monitor = update_monitor_jcall;
554 ret->get_and_clear_pending_monitor_events = get_and_clear_pending_monitor_events_jcall;
555 ret->free = LDKManyChannelMonitor_JCalls_free;
559 typedef struct LDKChannelMessageHandler_JCalls {
562 jmethodID handle_open_channel_meth;
563 jmethodID handle_accept_channel_meth;
564 jmethodID handle_funding_created_meth;
565 jmethodID handle_funding_signed_meth;
566 jmethodID handle_funding_locked_meth;
567 jmethodID handle_shutdown_meth;
568 jmethodID handle_closing_signed_meth;
569 jmethodID handle_update_add_htlc_meth;
570 jmethodID handle_update_fulfill_htlc_meth;
571 jmethodID handle_update_fail_htlc_meth;
572 jmethodID handle_update_fail_malformed_htlc_meth;
573 jmethodID handle_commitment_signed_meth;
574 jmethodID handle_revoke_and_ack_meth;
575 jmethodID handle_update_fee_meth;
576 jmethodID handle_announcement_signatures_meth;
577 jmethodID peer_disconnected_meth;
578 jmethodID peer_connected_meth;
579 jmethodID handle_channel_reestablish_meth;
580 jmethodID handle_error_meth;
581 } LDKChannelMessageHandler_JCalls;
582 void handle_open_channel_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKInitFeatures their_features, const LDKOpenChannel *msg) {
583 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
584 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->handle_open_channel_meth, their_node_id, their_features, msg);
586 void handle_accept_channel_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKInitFeatures their_features, const LDKAcceptChannel *msg) {
587 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
588 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->handle_accept_channel_meth, their_node_id, their_features, msg);
590 void handle_funding_created_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingCreated *msg) {
591 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
592 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->handle_funding_created_meth, their_node_id, msg);
594 void handle_funding_signed_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingSigned *msg) {
595 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
596 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->handle_funding_signed_meth, their_node_id, msg);
598 void handle_funding_locked_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingLocked *msg) {
599 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
600 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->handle_funding_locked_meth, their_node_id, msg);
602 void handle_shutdown_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKShutdown *msg) {
603 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
604 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->handle_shutdown_meth, their_node_id, msg);
606 void handle_closing_signed_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKClosingSigned *msg) {
607 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
608 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->handle_closing_signed_meth, their_node_id, msg);
610 void handle_update_add_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateAddHTLC *msg) {
611 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
612 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->handle_update_add_htlc_meth, their_node_id, msg);
614 void handle_update_fulfill_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFulfillHTLC *msg) {
615 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
616 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->handle_update_fulfill_htlc_meth, their_node_id, msg);
618 void handle_update_fail_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFailHTLC *msg) {
619 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
620 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->handle_update_fail_htlc_meth, their_node_id, msg);
622 void handle_update_fail_malformed_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFailMalformedHTLC *msg) {
623 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
624 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->handle_update_fail_malformed_htlc_meth, their_node_id, msg);
626 void handle_commitment_signed_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKCommitmentSigned *msg) {
627 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
628 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->handle_commitment_signed_meth, their_node_id, msg);
630 void handle_revoke_and_ack_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKRevokeAndACK *msg) {
631 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
632 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->handle_revoke_and_ack_meth, their_node_id, msg);
634 void handle_update_fee_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFee *msg) {
635 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
636 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->handle_update_fee_meth, their_node_id, msg);
638 void handle_announcement_signatures_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKAnnouncementSignatures *msg) {
639 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
640 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->handle_announcement_signatures_meth, their_node_id, msg);
642 void peer_disconnected_jcall(const void* this_arg, LDKPublicKey their_node_id, bool no_connection_possible) {
643 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
644 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->peer_disconnected_meth, their_node_id, no_connection_possible);
646 void peer_connected_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit *msg) {
647 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
648 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->peer_connected_meth, their_node_id, msg);
650 void handle_channel_reestablish_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelReestablish *msg) {
651 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
652 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->handle_channel_reestablish_meth, their_node_id, msg);
654 void handle_error_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKErrorMessage *msg) {
655 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
656 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->handle_error_meth, their_node_id, msg);
658 void LDKChannelMessageHandler_JCalls_free(void* this_arg) {
659 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
660 (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o);
663 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKChannelMessageHandler_1new (JNIEnv * env, jclass _a, jobject o) {
664 jclass c = (*env)->GetObjectClass(env, o);
666 LDKChannelMessageHandler_JCalls *calls = malloc(sizeof(LDKChannelMessageHandler_JCalls));
668 calls->o = (*env)->NewGlobalRef(env, o);
669 calls->handle_open_channel_meth = (*env)->GetMethodID(env, c, "handle_open_channel", "TODO");
670 assert(calls->handle_open_channel_meth != NULL);
671 calls->handle_accept_channel_meth = (*env)->GetMethodID(env, c, "handle_accept_channel", "TODO");
672 assert(calls->handle_accept_channel_meth != NULL);
673 calls->handle_funding_created_meth = (*env)->GetMethodID(env, c, "handle_funding_created", "TODO");
674 assert(calls->handle_funding_created_meth != NULL);
675 calls->handle_funding_signed_meth = (*env)->GetMethodID(env, c, "handle_funding_signed", "TODO");
676 assert(calls->handle_funding_signed_meth != NULL);
677 calls->handle_funding_locked_meth = (*env)->GetMethodID(env, c, "handle_funding_locked", "TODO");
678 assert(calls->handle_funding_locked_meth != NULL);
679 calls->handle_shutdown_meth = (*env)->GetMethodID(env, c, "handle_shutdown", "TODO");
680 assert(calls->handle_shutdown_meth != NULL);
681 calls->handle_closing_signed_meth = (*env)->GetMethodID(env, c, "handle_closing_signed", "TODO");
682 assert(calls->handle_closing_signed_meth != NULL);
683 calls->handle_update_add_htlc_meth = (*env)->GetMethodID(env, c, "handle_update_add_htlc", "TODO");
684 assert(calls->handle_update_add_htlc_meth != NULL);
685 calls->handle_update_fulfill_htlc_meth = (*env)->GetMethodID(env, c, "handle_update_fulfill_htlc", "TODO");
686 assert(calls->handle_update_fulfill_htlc_meth != NULL);
687 calls->handle_update_fail_htlc_meth = (*env)->GetMethodID(env, c, "handle_update_fail_htlc", "TODO");
688 assert(calls->handle_update_fail_htlc_meth != NULL);
689 calls->handle_update_fail_malformed_htlc_meth = (*env)->GetMethodID(env, c, "handle_update_fail_malformed_htlc", "TODO");
690 assert(calls->handle_update_fail_malformed_htlc_meth != NULL);
691 calls->handle_commitment_signed_meth = (*env)->GetMethodID(env, c, "handle_commitment_signed", "TODO");
692 assert(calls->handle_commitment_signed_meth != NULL);
693 calls->handle_revoke_and_ack_meth = (*env)->GetMethodID(env, c, "handle_revoke_and_ack", "TODO");
694 assert(calls->handle_revoke_and_ack_meth != NULL);
695 calls->handle_update_fee_meth = (*env)->GetMethodID(env, c, "handle_update_fee", "TODO");
696 assert(calls->handle_update_fee_meth != NULL);
697 calls->handle_announcement_signatures_meth = (*env)->GetMethodID(env, c, "handle_announcement_signatures", "TODO");
698 assert(calls->handle_announcement_signatures_meth != NULL);
699 calls->peer_disconnected_meth = (*env)->GetMethodID(env, c, "peer_disconnected", "TODO");
700 assert(calls->peer_disconnected_meth != NULL);
701 calls->peer_connected_meth = (*env)->GetMethodID(env, c, "peer_connected", "TODO");
702 assert(calls->peer_connected_meth != NULL);
703 calls->handle_channel_reestablish_meth = (*env)->GetMethodID(env, c, "handle_channel_reestablish", "TODO");
704 assert(calls->handle_channel_reestablish_meth != NULL);
705 calls->handle_error_meth = (*env)->GetMethodID(env, c, "handle_error", "TODO");
706 assert(calls->handle_error_meth != NULL);
708 LDKChannelMessageHandler *ret = malloc(sizeof(LDKChannelMessageHandler));
709 ret->this_arg = (void*) calls;
710 ret->handle_open_channel = handle_open_channel_jcall;
711 ret->handle_accept_channel = handle_accept_channel_jcall;
712 ret->handle_funding_created = handle_funding_created_jcall;
713 ret->handle_funding_signed = handle_funding_signed_jcall;
714 ret->handle_funding_locked = handle_funding_locked_jcall;
715 ret->handle_shutdown = handle_shutdown_jcall;
716 ret->handle_closing_signed = handle_closing_signed_jcall;
717 ret->handle_update_add_htlc = handle_update_add_htlc_jcall;
718 ret->handle_update_fulfill_htlc = handle_update_fulfill_htlc_jcall;
719 ret->handle_update_fail_htlc = handle_update_fail_htlc_jcall;
720 ret->handle_update_fail_malformed_htlc = handle_update_fail_malformed_htlc_jcall;
721 ret->handle_commitment_signed = handle_commitment_signed_jcall;
722 ret->handle_revoke_and_ack = handle_revoke_and_ack_jcall;
723 ret->handle_update_fee = handle_update_fee_jcall;
724 ret->handle_announcement_signatures = handle_announcement_signatures_jcall;
725 ret->peer_disconnected = peer_disconnected_jcall;
726 ret->peer_connected = peer_connected_jcall;
727 ret->handle_channel_reestablish = handle_channel_reestablish_jcall;
728 ret->handle_error = handle_error_jcall;
729 ret->free = LDKChannelMessageHandler_JCalls_free;
733 typedef struct LDKRoutingMessageHandler_JCalls {
736 jmethodID handle_node_announcement_meth;
737 jmethodID handle_channel_announcement_meth;
738 jmethodID handle_channel_update_meth;
739 jmethodID handle_htlc_fail_channel_update_meth;
740 jmethodID get_next_channel_announcements_meth;
741 jmethodID get_next_node_announcements_meth;
742 jmethodID should_request_full_sync_meth;
743 } LDKRoutingMessageHandler_JCalls;
744 LDKCResult_boolLightningErrorZ handle_node_announcement_jcall(const void* this_arg, const LDKNodeAnnouncement *msg) {
745 LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
746 LDKCResult_boolLightningErrorZ* ret = (LDKCResult_boolLightningErrorZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->handle_node_announcement_meth, msg);
747 LDKCResult_boolLightningErrorZ res = *ret;
751 LDKCResult_boolLightningErrorZ handle_channel_announcement_jcall(const void* this_arg, const LDKChannelAnnouncement *msg) {
752 LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
753 LDKCResult_boolLightningErrorZ* ret = (LDKCResult_boolLightningErrorZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->handle_channel_announcement_meth, msg);
754 LDKCResult_boolLightningErrorZ res = *ret;
758 LDKCResult_boolLightningErrorZ handle_channel_update_jcall(const void* this_arg, const LDKChannelUpdate *msg) {
759 LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
760 LDKCResult_boolLightningErrorZ* ret = (LDKCResult_boolLightningErrorZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->handle_channel_update_meth, msg);
761 LDKCResult_boolLightningErrorZ res = *ret;
765 void handle_htlc_fail_channel_update_jcall(const void* this_arg, const LDKHTLCFailChannelUpdate *update) {
766 LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
767 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->handle_htlc_fail_channel_update_meth, update);
769 LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ get_next_channel_announcements_jcall(const void* this_arg, uint64_t starting_point, uint8_t batch_amount) {
770 LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
771 LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ* ret = (LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->get_next_channel_announcements_meth, starting_point, batch_amount);
772 LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ res = *ret;
776 LDKCVec_NodeAnnouncementZ get_next_node_announcements_jcall(const void* this_arg, LDKPublicKey starting_point, uint8_t batch_amount) {
777 LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
778 LDKCVec_NodeAnnouncementZ* ret = (LDKCVec_NodeAnnouncementZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->get_next_node_announcements_meth, starting_point, batch_amount);
779 LDKCVec_NodeAnnouncementZ res = *ret;
783 bool should_request_full_sync_jcall(const void* this_arg, LDKPublicKey node_id) {
784 LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
785 return (*j_calls->env)->CallBooleanMethod(j_calls->env, j_calls->o, j_calls->should_request_full_sync_meth, node_id);
787 void LDKRoutingMessageHandler_JCalls_free(void* this_arg) {
788 LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
789 (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o);
792 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKRoutingMessageHandler_1new (JNIEnv * env, jclass _a, jobject o) {
793 jclass c = (*env)->GetObjectClass(env, o);
795 LDKRoutingMessageHandler_JCalls *calls = malloc(sizeof(LDKRoutingMessageHandler_JCalls));
797 calls->o = (*env)->NewGlobalRef(env, o);
798 calls->handle_node_announcement_meth = (*env)->GetMethodID(env, c, "handle_node_announcement", "TODO");
799 assert(calls->handle_node_announcement_meth != NULL);
800 calls->handle_channel_announcement_meth = (*env)->GetMethodID(env, c, "handle_channel_announcement", "TODO");
801 assert(calls->handle_channel_announcement_meth != NULL);
802 calls->handle_channel_update_meth = (*env)->GetMethodID(env, c, "handle_channel_update", "TODO");
803 assert(calls->handle_channel_update_meth != NULL);
804 calls->handle_htlc_fail_channel_update_meth = (*env)->GetMethodID(env, c, "handle_htlc_fail_channel_update", "TODO");
805 assert(calls->handle_htlc_fail_channel_update_meth != NULL);
806 calls->get_next_channel_announcements_meth = (*env)->GetMethodID(env, c, "get_next_channel_announcements", "TODO");
807 assert(calls->get_next_channel_announcements_meth != NULL);
808 calls->get_next_node_announcements_meth = (*env)->GetMethodID(env, c, "get_next_node_announcements", "TODO");
809 assert(calls->get_next_node_announcements_meth != NULL);
810 calls->should_request_full_sync_meth = (*env)->GetMethodID(env, c, "should_request_full_sync", "TODO");
811 assert(calls->should_request_full_sync_meth != NULL);
813 LDKRoutingMessageHandler *ret = malloc(sizeof(LDKRoutingMessageHandler));
814 ret->this_arg = (void*) calls;
815 ret->handle_node_announcement = handle_node_announcement_jcall;
816 ret->handle_channel_announcement = handle_channel_announcement_jcall;
817 ret->handle_channel_update = handle_channel_update_jcall;
818 ret->handle_htlc_fail_channel_update = handle_htlc_fail_channel_update_jcall;
819 ret->get_next_channel_announcements = get_next_channel_announcements_jcall;
820 ret->get_next_node_announcements = get_next_node_announcements_jcall;
821 ret->should_request_full_sync = should_request_full_sync_jcall;
822 ret->free = LDKRoutingMessageHandler_JCalls_free;
826 typedef struct LDKSocketDescriptor_JCalls {
829 jmethodID send_data_meth;
830 jmethodID disconnect_socket_meth;
833 } LDKSocketDescriptor_JCalls;
834 uintptr_t send_data_jcall(void* this_arg, LDKu8slice data, bool resume_read) {
835 LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
836 uintptr_t* ret = (uintptr_t*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->send_data_meth, data, resume_read);
837 uintptr_t res = *ret;
841 void disconnect_socket_jcall(void* this_arg) {
842 LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
843 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->disconnect_socket_meth);
845 bool eq_jcall(const void* this_arg, const void *other_arg) {
846 LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
847 return (*j_calls->env)->CallBooleanMethod(j_calls->env, j_calls->o, j_calls->eq_meth, other_arg);
849 uint64_t hash_jcall(const void* this_arg) {
850 LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
851 return (*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->hash_meth);
853 void* LDKSocketDescriptor_JCalls_clone(const void* this_arg) {
854 LDKSocketDescriptor_JCalls *ret = malloc(sizeof(LDKSocketDescriptor_JCalls));
855 memcpy(ret, this_arg, sizeof(LDKSocketDescriptor_JCalls));
858 void LDKSocketDescriptor_JCalls_free(void* this_arg) {
859 LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
860 (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o);
863 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKSocketDescriptor_1new (JNIEnv * env, jclass _a, jobject o) {
864 jclass c = (*env)->GetObjectClass(env, o);
866 LDKSocketDescriptor_JCalls *calls = malloc(sizeof(LDKSocketDescriptor_JCalls));
868 calls->o = (*env)->NewGlobalRef(env, o);
869 calls->send_data_meth = (*env)->GetMethodID(env, c, "send_data", "TODO");
870 assert(calls->send_data_meth != NULL);
871 calls->disconnect_socket_meth = (*env)->GetMethodID(env, c, "disconnect_socket", "TODO");
872 assert(calls->disconnect_socket_meth != NULL);
873 calls->eq_meth = (*env)->GetMethodID(env, c, "eq", "TODO");
874 assert(calls->eq_meth != NULL);
875 calls->hash_meth = (*env)->GetMethodID(env, c, "hash", "TODO");
876 assert(calls->hash_meth != NULL);
878 LDKSocketDescriptor *ret = malloc(sizeof(LDKSocketDescriptor));
879 ret->this_arg = (void*) calls;
880 ret->send_data = send_data_jcall;
881 ret->disconnect_socket = disconnect_socket_jcall;
883 ret->hash = hash_jcall;
884 ret->clone = LDKSocketDescriptor_JCalls_clone;
885 ret->free = LDKSocketDescriptor_JCalls_free;
889 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1HTLCOutputInCommitmentSignatureZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
890 LDKC2Tuple_HTLCOutputInCommitmentSignatureZ arg_conv = *(LDKC2Tuple_HTLCOutputInCommitmentSignatureZ*)arg;
892 return C2Tuple_HTLCOutputInCommitmentSignatureZ_free(arg_conv);
895 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
896 LDKC2Tuple_OutPointScriptZ arg_conv = *(LDKC2Tuple_OutPointScriptZ*)arg;
898 return C2Tuple_OutPointScriptZ_free(arg_conv);
901 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1Scriptu64Z_1free(JNIEnv * _env, jclass _b, jlong arg) {
902 LDKC2Tuple_Scriptu64Z arg_conv = *(LDKC2Tuple_Scriptu64Z*)arg;
904 return C2Tuple_Scriptu64Z_free(arg_conv);
907 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
908 LDKC2Tuple_SignatureCVec_SignatureZZ arg_conv = *(LDKC2Tuple_SignatureCVec_SignatureZZ*)arg;
910 return C2Tuple_SignatureCVec_SignatureZZ_free(arg_conv);
913 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1Txidu32Z_1free(JNIEnv * _env, jclass _b, jlong arg) {
914 LDKC2Tuple_Txidu32Z arg_conv = *(LDKC2Tuple_Txidu32Z*)arg;
916 return C2Tuple_Txidu32Z_free(arg_conv);
919 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u64u64Z_1free(JNIEnv * _env, jclass _b, jlong arg) {
920 LDKC2Tuple_u64u64Z arg_conv = *(LDKC2Tuple_u64u64Z*)arg;
922 return C2Tuple_u64u64Z_free(arg_conv);
925 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
926 LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ arg_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)arg;
928 return C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(arg_conv);
931 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1Scriptu64ZChainErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
932 LDKChainError arg_conv = *(LDKChainError*)arg;
934 LDKCResult_C2Tuple_Scriptu64ZChainErrorZ* ret = malloc(sizeof(LDKCResult_C2Tuple_Scriptu64ZChainErrorZ));
935 *ret = CResult_C2Tuple_Scriptu64ZChainErrorZ_err(arg_conv);
939 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1Scriptu64ZChainErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
940 LDKCResult_C2Tuple_Scriptu64ZChainErrorZ arg_conv = *(LDKCResult_C2Tuple_Scriptu64ZChainErrorZ*)arg;
942 return CResult_C2Tuple_Scriptu64ZChainErrorZ_free(arg_conv);
945 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1Scriptu64ZChainErrorZ_1ok(JNIEnv * _env, jclass _b, jlong arg) {
946 LDKC2Tuple_Scriptu64Z arg_conv = *(LDKC2Tuple_Scriptu64Z*)arg;
948 LDKCResult_C2Tuple_Scriptu64ZChainErrorZ* ret = malloc(sizeof(LDKCResult_C2Tuple_Scriptu64ZChainErrorZ));
949 *ret = CResult_C2Tuple_Scriptu64ZChainErrorZ_ok(arg_conv);
953 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
954 LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ arg_conv = *(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)arg;
956 return CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(arg_conv);
959 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1ok(JNIEnv * _env, jclass _b, jlong arg) {
960 LDKC2Tuple_SignatureCVec_SignatureZZ arg_conv = *(LDKC2Tuple_SignatureCVec_SignatureZZ*)arg;
962 LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ* ret = malloc(sizeof(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ));
963 *ret = CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(arg_conv);
967 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
968 LDKCResult_CVec_SignatureZNoneZ arg_conv = *(LDKCResult_CVec_SignatureZNoneZ*)arg;
970 return CResult_CVec_SignatureZNoneZ_free(arg_conv);
973 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1ok(JNIEnv * _env, jclass _b, jlong arg) {
974 LDKCVec_SignatureZ arg_conv = *(LDKCVec_SignatureZ*)arg;
976 LDKCResult_CVec_SignatureZNoneZ* ret = malloc(sizeof(LDKCResult_CVec_SignatureZNoneZ));
977 *ret = CResult_CVec_SignatureZNoneZ_ok(arg_conv);
981 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
982 LDKPeerHandleError arg_conv = *(LDKPeerHandleError*)arg;
984 LDKCResult_CVec_u8ZPeerHandleErrorZ* ret = malloc(sizeof(LDKCResult_CVec_u8ZPeerHandleErrorZ));
985 *ret = CResult_CVec_u8ZPeerHandleErrorZ_err(arg_conv);
989 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
990 LDKCResult_CVec_u8ZPeerHandleErrorZ arg_conv = *(LDKCResult_CVec_u8ZPeerHandleErrorZ*)arg;
992 return CResult_CVec_u8ZPeerHandleErrorZ_free(arg_conv);
995 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1ok(JNIEnv * _env, jclass _b, jlong arg) {
996 LDKCVec_u8Z arg_conv = *(LDKCVec_u8Z*)arg;
998 LDKCResult_CVec_u8ZPeerHandleErrorZ* ret = malloc(sizeof(LDKCResult_CVec_u8ZPeerHandleErrorZ));
999 *ret = CResult_CVec_u8ZPeerHandleErrorZ_ok(arg_conv);
1003 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneAPIErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
1004 LDKAPIError arg_conv = *(LDKAPIError*)arg;
1006 LDKCResult_NoneAPIErrorZ* ret = malloc(sizeof(LDKCResult_NoneAPIErrorZ));
1007 *ret = CResult_NoneAPIErrorZ_err(arg_conv);
1011 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneAPIErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1012 LDKCResult_NoneAPIErrorZ arg_conv = *(LDKCResult_NoneAPIErrorZ*)arg;
1014 return CResult_NoneAPIErrorZ_free(arg_conv);
1017 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
1018 LDKChannelMonitorUpdateErr arg_conv = *(LDKChannelMonitorUpdateErr*)arg;
1020 LDKCResult_NoneChannelMonitorUpdateErrZ* ret = malloc(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ));
1021 *ret = CResult_NoneChannelMonitorUpdateErrZ_err(arg_conv);
1025 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1026 LDKCResult_NoneChannelMonitorUpdateErrZ arg_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)arg;
1028 return CResult_NoneChannelMonitorUpdateErrZ_free(arg_conv);
1031 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
1032 LDKMonitorUpdateError arg_conv = *(LDKMonitorUpdateError*)arg;
1034 LDKCResult_NoneMonitorUpdateErrorZ* ret = malloc(sizeof(LDKCResult_NoneMonitorUpdateErrorZ));
1035 *ret = CResult_NoneMonitorUpdateErrorZ_err(arg_conv);
1039 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1040 LDKCResult_NoneMonitorUpdateErrorZ arg_conv = *(LDKCResult_NoneMonitorUpdateErrorZ*)arg;
1042 return CResult_NoneMonitorUpdateErrorZ_free(arg_conv);
1045 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
1046 LDKPaymentSendFailure arg_conv = *(LDKPaymentSendFailure*)arg;
1048 LDKCResult_NonePaymentSendFailureZ* ret = malloc(sizeof(LDKCResult_NonePaymentSendFailureZ));
1049 *ret = CResult_NonePaymentSendFailureZ_err(arg_conv);
1053 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1054 LDKCResult_NonePaymentSendFailureZ arg_conv = *(LDKCResult_NonePaymentSendFailureZ*)arg;
1056 return CResult_NonePaymentSendFailureZ_free(arg_conv);
1059 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
1060 LDKPeerHandleError arg_conv = *(LDKPeerHandleError*)arg;
1062 LDKCResult_NonePeerHandleErrorZ* ret = malloc(sizeof(LDKCResult_NonePeerHandleErrorZ));
1063 *ret = CResult_NonePeerHandleErrorZ_err(arg_conv);
1067 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1068 LDKCResult_NonePeerHandleErrorZ arg_conv = *(LDKCResult_NonePeerHandleErrorZ*)arg;
1070 return CResult_NonePeerHandleErrorZ_free(arg_conv);
1073 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
1074 LDKLightningError arg_conv = *(LDKLightningError*)arg;
1076 LDKCResult_RouteLightningErrorZ* ret = malloc(sizeof(LDKCResult_RouteLightningErrorZ));
1077 *ret = CResult_RouteLightningErrorZ_err(arg_conv);
1081 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1082 LDKCResult_RouteLightningErrorZ arg_conv = *(LDKCResult_RouteLightningErrorZ*)arg;
1084 return CResult_RouteLightningErrorZ_free(arg_conv);
1087 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1ok(JNIEnv * _env, jclass _b, jlong arg) {
1088 LDKRoute arg_conv = *(LDKRoute*)arg;
1090 LDKCResult_RouteLightningErrorZ* ret = malloc(sizeof(LDKCResult_RouteLightningErrorZ));
1091 *ret = CResult_RouteLightningErrorZ_ok(arg_conv);
1095 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SignatureNoneZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1096 LDKCResult_SignatureNoneZ arg_conv = *(LDKCResult_SignatureNoneZ*)arg;
1098 return CResult_SignatureNoneZ_free(arg_conv);
1101 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SignatureNoneZ_1ok(JNIEnv * _env, jclass _b, jlong arg) {
1102 LDKSignature arg_conv = *(LDKSignature*)arg;
1104 LDKCResult_SignatureNoneZ* ret = malloc(sizeof(LDKCResult_SignatureNoneZ));
1105 *ret = CResult_SignatureNoneZ_ok(arg_conv);
1109 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysSecpErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
1110 LDKSecp256k1Error arg_conv = *(LDKSecp256k1Error*)arg;
1112 LDKCResult_TxCreationKeysSecpErrorZ* ret = malloc(sizeof(LDKCResult_TxCreationKeysSecpErrorZ));
1113 *ret = CResult_TxCreationKeysSecpErrorZ_err(arg_conv);
1117 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysSecpErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1118 LDKCResult_TxCreationKeysSecpErrorZ arg_conv = *(LDKCResult_TxCreationKeysSecpErrorZ*)arg;
1120 return CResult_TxCreationKeysSecpErrorZ_free(arg_conv);
1123 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysSecpErrorZ_1ok(JNIEnv * _env, jclass _b, jlong arg) {
1124 LDKTxCreationKeys arg_conv = *(LDKTxCreationKeys*)arg;
1126 LDKCResult_TxCreationKeysSecpErrorZ* ret = malloc(sizeof(LDKCResult_TxCreationKeysSecpErrorZ));
1127 *ret = CResult_TxCreationKeysSecpErrorZ_ok(arg_conv);
1131 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
1132 LDKLightningError arg_conv = *(LDKLightningError*)arg;
1134 LDKCResult_boolLightningErrorZ* ret = malloc(sizeof(LDKCResult_boolLightningErrorZ));
1135 *ret = CResult_boolLightningErrorZ_err(arg_conv);
1139 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1140 LDKCResult_boolLightningErrorZ arg_conv = *(LDKCResult_boolLightningErrorZ*)arg;
1142 return CResult_boolLightningErrorZ_free(arg_conv);
1145 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1ok(JNIEnv * _env, jclass _b, jboolean arg) {
1146 LDKCResult_boolLightningErrorZ* ret = malloc(sizeof(LDKCResult_boolLightningErrorZ));
1147 *ret = CResult_boolLightningErrorZ_ok(arg);
1151 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
1152 LDKPeerHandleError arg_conv = *(LDKPeerHandleError*)arg;
1154 LDKCResult_boolPeerHandleErrorZ* ret = malloc(sizeof(LDKCResult_boolPeerHandleErrorZ));
1155 *ret = CResult_boolPeerHandleErrorZ_err(arg_conv);
1159 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1160 LDKCResult_boolPeerHandleErrorZ arg_conv = *(LDKCResult_boolPeerHandleErrorZ*)arg;
1162 return CResult_boolPeerHandleErrorZ_free(arg_conv);
1165 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1ok(JNIEnv * _env, jclass _b, jboolean arg) {
1166 LDKCResult_boolPeerHandleErrorZ* ret = malloc(sizeof(LDKCResult_boolPeerHandleErrorZ));
1167 *ret = CResult_boolPeerHandleErrorZ_ok(arg);
1171 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1HTLCOutputInCommitmentSignatureZZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1172 LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ arg_conv = *(LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ*)arg;
1174 return CVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ_free(arg_conv);
1177 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1178 LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ arg_conv = *(LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ*)arg;
1180 return CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(arg_conv);
1183 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1CVec_1RouteHopZZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1184 LDKCVec_CVec_RouteHopZZ arg_conv = *(LDKCVec_CVec_RouteHopZZ*)arg;
1186 return CVec_CVec_RouteHopZZ_free(arg_conv);
1189 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ChannelDetailsZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1190 LDKCVec_ChannelDetailsZ arg_conv = *(LDKCVec_ChannelDetailsZ*)arg;
1192 return CVec_ChannelDetailsZ_free(arg_conv);
1195 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ChannelMonitorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1196 LDKCVec_ChannelMonitorZ arg_conv = *(LDKCVec_ChannelMonitorZ*)arg;
1198 return CVec_ChannelMonitorZ_free(arg_conv);
1201 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1EventZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1202 LDKCVec_EventZ arg_conv = *(LDKCVec_EventZ*)arg;
1204 return CVec_EventZ_free(arg_conv);
1207 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1HTLCOutputInCommitmentZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1208 LDKCVec_HTLCOutputInCommitmentZ arg_conv = *(LDKCVec_HTLCOutputInCommitmentZ*)arg;
1210 return CVec_HTLCOutputInCommitmentZ_free(arg_conv);
1213 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1MessageSendEventZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1214 LDKCVec_MessageSendEventZ arg_conv = *(LDKCVec_MessageSendEventZ*)arg;
1216 return CVec_MessageSendEventZ_free(arg_conv);
1219 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1MonitorEventZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1220 LDKCVec_MonitorEventZ arg_conv = *(LDKCVec_MonitorEventZ*)arg;
1222 return CVec_MonitorEventZ_free(arg_conv);
1225 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1NetAddressZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1226 LDKCVec_NetAddressZ arg_conv = *(LDKCVec_NetAddressZ*)arg;
1228 return CVec_NetAddressZ_free(arg_conv);
1231 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1NodeAnnouncementZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1232 LDKCVec_NodeAnnouncementZ arg_conv = *(LDKCVec_NodeAnnouncementZ*)arg;
1234 return CVec_NodeAnnouncementZ_free(arg_conv);
1237 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1PublicKeyZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1238 LDKCVec_PublicKeyZ arg_conv = *(LDKCVec_PublicKeyZ*)arg;
1240 return CVec_PublicKeyZ_free(arg_conv);
1243 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1RouteHintZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1244 LDKCVec_RouteHintZ arg_conv = *(LDKCVec_RouteHintZ*)arg;
1246 return CVec_RouteHintZ_free(arg_conv);
1249 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1RouteHopZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1250 LDKCVec_RouteHopZ arg_conv = *(LDKCVec_RouteHopZ*)arg;
1252 return CVec_RouteHopZ_free(arg_conv);
1255 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1SignatureZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1256 LDKCVec_SignatureZ arg_conv = *(LDKCVec_SignatureZ*)arg;
1258 return CVec_SignatureZ_free(arg_conv);
1261 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1SpendableOutputDescriptorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1262 LDKCVec_SpendableOutputDescriptorZ arg_conv = *(LDKCVec_SpendableOutputDescriptorZ*)arg;
1264 return CVec_SpendableOutputDescriptorZ_free(arg_conv);
1267 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TransactionZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1268 LDKCVec_TransactionZ arg_conv = *(LDKCVec_TransactionZ*)arg;
1270 return CVec_TransactionZ_free(arg_conv);
1273 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateAddHTLCZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1274 LDKCVec_UpdateAddHTLCZ arg_conv = *(LDKCVec_UpdateAddHTLCZ*)arg;
1276 return CVec_UpdateAddHTLCZ_free(arg_conv);
1279 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateFailHTLCZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1280 LDKCVec_UpdateFailHTLCZ arg_conv = *(LDKCVec_UpdateFailHTLCZ*)arg;
1282 return CVec_UpdateFailHTLCZ_free(arg_conv);
1285 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateFailMalformedHTLCZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1286 LDKCVec_UpdateFailMalformedHTLCZ arg_conv = *(LDKCVec_UpdateFailMalformedHTLCZ*)arg;
1288 return CVec_UpdateFailMalformedHTLCZ_free(arg_conv);
1291 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateFulfillHTLCZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1292 LDKCVec_UpdateFulfillHTLCZ arg_conv = *(LDKCVec_UpdateFulfillHTLCZ*)arg;
1294 return CVec_UpdateFulfillHTLCZ_free(arg_conv);
1297 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u64Z_1free(JNIEnv * _env, jclass _b, jlong arg) {
1298 LDKCVec_u64Z arg_conv = *(LDKCVec_u64Z*)arg;
1300 return CVec_u64Z_free(arg_conv);
1303 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u8Z_1free(JNIEnv * _env, jclass _b, jlong arg) {
1304 LDKCVec_u8Z arg_conv = *(LDKCVec_u8Z*)arg;
1306 return CVec_u8Z_free(arg_conv);
1309 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1usizeZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1310 LDKCVec_usizeZ arg_conv = *(LDKCVec_usizeZ*)arg;
1312 return CVec_usizeZ_free(arg_conv);
1315 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxOut_1free(JNIEnv * _env, jclass _b, jlong _res) {
1316 LDKTxOut _res_conv = *(LDKTxOut*)_res;
1318 return TxOut_free(_res_conv);
1321 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1Txidu32Z_1new(JNIEnv * _env, jclass _b, jlong a, jint b) {
1322 LDKThirtyTwoBytes a_conv = *(LDKThirtyTwoBytes*)a;
1324 LDKC2Tuple_Txidu32Z* ret = malloc(sizeof(LDKC2Tuple_Txidu32Z));
1325 *ret = C2Tuple_Txidu32Z_new(a_conv, b);
1329 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1Scriptu64Z_1new(JNIEnv * _env, jclass _b, jlong a, jlong b) {
1330 LDKCVec_u8Z a_conv = *(LDKCVec_u8Z*)a;
1332 LDKC2Tuple_Scriptu64Z* ret = malloc(sizeof(LDKC2Tuple_Scriptu64Z));
1333 *ret = C2Tuple_Scriptu64Z_new(a_conv, b);
1337 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u64u64Z_1new(JNIEnv * _env, jclass _b, jlong a, jlong b) {
1338 LDKC2Tuple_u64u64Z* ret = malloc(sizeof(LDKC2Tuple_u64u64Z));
1339 *ret = C2Tuple_u64u64Z_new(a, b);
1343 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1new(JNIEnv * _env, jclass _b, jlong a, jlong b) {
1344 LDKSignature a_conv = *(LDKSignature*)a;
1346 LDKCVec_SignatureZ b_conv = *(LDKCVec_SignatureZ*)b;
1348 LDKC2Tuple_SignatureCVec_SignatureZZ* ret = malloc(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ));
1349 *ret = C2Tuple_SignatureCVec_SignatureZZ_new(a_conv, b_conv);
1353 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1err(JNIEnv * _env, jclass _b) {
1354 LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ* ret = malloc(sizeof(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ));
1355 *ret = CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
1359 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SignatureNoneZ_1err(JNIEnv * _env, jclass _b) {
1360 LDKCResult_SignatureNoneZ* ret = malloc(sizeof(LDKCResult_SignatureNoneZ));
1361 *ret = CResult_SignatureNoneZ_err();
1365 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1err(JNIEnv * _env, jclass _b) {
1366 LDKCResult_CVec_SignatureZNoneZ* ret = malloc(sizeof(LDKCResult_CVec_SignatureZNoneZ));
1367 *ret = CResult_CVec_SignatureZNoneZ_err();
1371 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneAPIErrorZ_1ok(JNIEnv * _env, jclass _b) {
1372 LDKCResult_NoneAPIErrorZ* ret = malloc(sizeof(LDKCResult_NoneAPIErrorZ));
1373 *ret = CResult_NoneAPIErrorZ_ok();
1377 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1ok(JNIEnv * _env, jclass _b) {
1378 LDKCResult_NonePaymentSendFailureZ* ret = malloc(sizeof(LDKCResult_NonePaymentSendFailureZ));
1379 *ret = CResult_NonePaymentSendFailureZ_ok();
1383 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1ok(JNIEnv * _env, jclass _b) {
1384 LDKCResult_NoneChannelMonitorUpdateErrZ* ret = malloc(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ));
1385 *ret = CResult_NoneChannelMonitorUpdateErrZ_ok();
1389 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateErrorZ_1ok(JNIEnv * _env, jclass _b) {
1390 LDKCResult_NoneMonitorUpdateErrorZ* ret = malloc(sizeof(LDKCResult_NoneMonitorUpdateErrorZ));
1391 *ret = CResult_NoneMonitorUpdateErrorZ_ok();
1395 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1new(JNIEnv * _env, jclass _b, jlong a, jlong b) {
1396 LDKOutPoint a_conv = *(LDKOutPoint*)a;
1398 a_conv._underlying_ref = false;
1399 LDKCVec_u8Z b_conv = *(LDKCVec_u8Z*)b;
1401 LDKC2Tuple_OutPointScriptZ* ret = malloc(sizeof(LDKC2Tuple_OutPointScriptZ));
1402 *ret = C2Tuple_OutPointScriptZ_new(a_conv, b_conv);
1406 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1new(JNIEnv * _env, jclass _b, jlong a, jlong b, jlong c) {
1407 LDKChannelAnnouncement a_conv = *(LDKChannelAnnouncement*)a;
1409 a_conv._underlying_ref = false;
1410 LDKChannelUpdate b_conv = *(LDKChannelUpdate*)b;
1412 b_conv._underlying_ref = false;
1413 LDKChannelUpdate c_conv = *(LDKChannelUpdate*)c;
1415 c_conv._underlying_ref = false;
1416 LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret = malloc(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ));
1417 *ret = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a_conv, b_conv, c_conv);
1421 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1ok(JNIEnv * _env, jclass _b) {
1422 LDKCResult_NonePeerHandleErrorZ* ret = malloc(sizeof(LDKCResult_NonePeerHandleErrorZ));
1423 *ret = CResult_NonePeerHandleErrorZ_ok();
1427 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1HTLCOutputInCommitmentSignatureZ_1new(JNIEnv * _env, jclass _b, jlong a, jlong b) {
1428 LDKHTLCOutputInCommitment a_conv = *(LDKHTLCOutputInCommitment*)a;
1430 a_conv._underlying_ref = false;
1431 LDKSignature b_conv = *(LDKSignature*)b;
1433 LDKC2Tuple_HTLCOutputInCommitmentSignatureZ* ret = malloc(sizeof(LDKC2Tuple_HTLCOutputInCommitmentSignatureZ));
1434 *ret = C2Tuple_HTLCOutputInCommitmentSignatureZ_new(a_conv, b_conv);
1438 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Event_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1439 LDKEvent this_ptr_conv = *(LDKEvent*)this_ptr;
1440 free((void*)this_ptr);
1441 return Event_free(this_ptr_conv);
1444 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_MessageSendEvent_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1445 LDKMessageSendEvent this_ptr_conv = *(LDKMessageSendEvent*)this_ptr;
1446 free((void*)this_ptr);
1447 return MessageSendEvent_free(this_ptr_conv);
1450 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_MessageSendEventsProvider_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1451 LDKMessageSendEventsProvider this_ptr_conv = *(LDKMessageSendEventsProvider*)this_ptr;
1452 free((void*)this_ptr);
1453 return MessageSendEventsProvider_free(this_ptr_conv);
1456 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_EventsProvider_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1457 LDKEventsProvider this_ptr_conv = *(LDKEventsProvider*)this_ptr;
1458 free((void*)this_ptr);
1459 return EventsProvider_free(this_ptr_conv);
1462 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_APIError_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1463 LDKAPIError this_ptr_conv = *(LDKAPIError*)this_ptr;
1464 free((void*)this_ptr);
1465 return APIError_free(this_ptr_conv);
1468 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Level_1max(JNIEnv * _env, jclass _b) {
1469 LDKLevel* ret = malloc(sizeof(LDKLevel));
1474 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Logger_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1475 LDKLogger this_ptr_conv = *(LDKLogger*)this_ptr;
1476 free((void*)this_ptr);
1477 return Logger_free(this_ptr_conv);
1480 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1481 LDKChannelHandshakeConfig this_ptr_conv = *(LDKChannelHandshakeConfig*)this_ptr;
1482 free((void*)this_ptr);
1483 this_ptr_conv._underlying_ref = false;
1484 return ChannelHandshakeConfig_free(this_ptr_conv);
1487 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1get_1minimum_1depth(JNIEnv * _env, jclass _b, jlong this_ptr) {
1488 LDKChannelHandshakeConfig* this_ptr_conv = (LDKChannelHandshakeConfig*)this_ptr;
1489 return ChannelHandshakeConfig_get_minimum_depth(this_ptr_conv);
1492 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1set_1minimum_1depth(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
1493 LDKChannelHandshakeConfig* this_ptr_conv = (LDKChannelHandshakeConfig*)this_ptr;
1494 return ChannelHandshakeConfig_set_minimum_depth(this_ptr_conv, val);
1497 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1get_1our_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_ptr) {
1498 LDKChannelHandshakeConfig* this_ptr_conv = (LDKChannelHandshakeConfig*)this_ptr;
1499 return ChannelHandshakeConfig_get_our_to_self_delay(this_ptr_conv);
1502 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1set_1our_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
1503 LDKChannelHandshakeConfig* this_ptr_conv = (LDKChannelHandshakeConfig*)this_ptr;
1504 return ChannelHandshakeConfig_set_our_to_self_delay(this_ptr_conv, val);
1507 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1get_1our_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
1508 LDKChannelHandshakeConfig* this_ptr_conv = (LDKChannelHandshakeConfig*)this_ptr;
1509 return ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr_conv);
1512 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1set_1our_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1513 LDKChannelHandshakeConfig* this_ptr_conv = (LDKChannelHandshakeConfig*)this_ptr;
1514 return ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr_conv, val);
1517 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1new(JNIEnv * _env, jclass _b, jint minimum_depth_arg, jshort our_to_self_delay_arg, jlong our_htlc_minimum_msat_arg) {
1518 LDKChannelHandshakeConfig* ret = malloc(sizeof(LDKChannelHandshakeConfig));
1519 *ret = ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg);
1520 assert(!ret->_underlying_ref);
1521 ret->_underlying_ref = true;
1525 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1default(JNIEnv * _env, jclass _b) {
1526 LDKChannelHandshakeConfig* ret = malloc(sizeof(LDKChannelHandshakeConfig));
1527 *ret = ChannelHandshakeConfig_default();
1528 assert(!ret->_underlying_ref);
1529 ret->_underlying_ref = true;
1533 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1534 LDKChannelHandshakeLimits this_ptr_conv = *(LDKChannelHandshakeLimits*)this_ptr;
1535 free((void*)this_ptr);
1536 this_ptr_conv._underlying_ref = false;
1537 return ChannelHandshakeLimits_free(this_ptr_conv);
1540 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1min_1funding_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
1541 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1542 return ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr_conv);
1545 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1min_1funding_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1546 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1547 return ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr_conv, val);
1550 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1max_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
1551 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1552 return ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr_conv);
1555 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1max_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1556 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1557 return ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr_conv, val);
1560 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1min_1max_1htlc_1value_1in_1flight_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
1561 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1562 return ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr_conv);
1565 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) {
1566 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1567 return ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr_conv, val);
1570 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1max_1channel_1reserve_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
1571 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1572 return ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr_conv);
1575 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1max_1channel_1reserve_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1576 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1577 return ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr_conv, val);
1580 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1min_1max_1accepted_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr) {
1581 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1582 return ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr_conv);
1585 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1min_1max_1accepted_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
1586 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1587 return ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr_conv, val);
1590 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1min_1dust_1limit_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
1591 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1592 return ChannelHandshakeLimits_get_min_dust_limit_satoshis(this_ptr_conv);
1595 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1min_1dust_1limit_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1596 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1597 return ChannelHandshakeLimits_set_min_dust_limit_satoshis(this_ptr_conv, val);
1600 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1max_1dust_1limit_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
1601 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1602 return ChannelHandshakeLimits_get_max_dust_limit_satoshis(this_ptr_conv);
1605 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1max_1dust_1limit_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1606 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1607 return ChannelHandshakeLimits_set_max_dust_limit_satoshis(this_ptr_conv, val);
1610 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1max_1minimum_1depth(JNIEnv * _env, jclass _b, jlong this_ptr) {
1611 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1612 return ChannelHandshakeLimits_get_max_minimum_depth(this_ptr_conv);
1615 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1max_1minimum_1depth(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
1616 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1617 return ChannelHandshakeLimits_set_max_minimum_depth(this_ptr_conv, val);
1620 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1force_1announced_1channel_1preference(JNIEnv * _env, jclass _b, jlong this_ptr) {
1621 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1622 return ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr_conv);
1625 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1force_1announced_1channel_1preference(JNIEnv * _env, jclass _b, jlong this_ptr, jboolean val) {
1626 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1627 return ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr_conv, val);
1630 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1their_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_ptr) {
1631 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1632 return ChannelHandshakeLimits_get_their_to_self_delay(this_ptr_conv);
1635 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1their_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
1636 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1637 return ChannelHandshakeLimits_set_their_to_self_delay(this_ptr_conv, val);
1640 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1new(JNIEnv * _env, jclass _b, jlong min_funding_satoshis_arg, jlong max_htlc_minimum_msat_arg, jlong min_max_htlc_value_in_flight_msat_arg, jlong max_channel_reserve_satoshis_arg, jshort min_max_accepted_htlcs_arg, jlong min_dust_limit_satoshis_arg, jlong max_dust_limit_satoshis_arg, jint max_minimum_depth_arg, jboolean force_announced_channel_preference_arg, jshort their_to_self_delay_arg) {
1641 LDKChannelHandshakeLimits* ret = malloc(sizeof(LDKChannelHandshakeLimits));
1642 *ret = ChannelHandshakeLimits_new(min_funding_satoshis_arg, max_htlc_minimum_msat_arg, min_max_htlc_value_in_flight_msat_arg, max_channel_reserve_satoshis_arg, min_max_accepted_htlcs_arg, min_dust_limit_satoshis_arg, max_dust_limit_satoshis_arg, max_minimum_depth_arg, force_announced_channel_preference_arg, their_to_self_delay_arg);
1643 assert(!ret->_underlying_ref);
1644 ret->_underlying_ref = true;
1648 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1default(JNIEnv * _env, jclass _b) {
1649 LDKChannelHandshakeLimits* ret = malloc(sizeof(LDKChannelHandshakeLimits));
1650 *ret = ChannelHandshakeLimits_default();
1651 assert(!ret->_underlying_ref);
1652 ret->_underlying_ref = true;
1656 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1657 LDKChannelConfig this_ptr_conv = *(LDKChannelConfig*)this_ptr;
1658 free((void*)this_ptr);
1659 this_ptr_conv._underlying_ref = false;
1660 return ChannelConfig_free(this_ptr_conv);
1663 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1get_1fee_1proportional_1millionths(JNIEnv * _env, jclass _b, jlong this_ptr) {
1664 LDKChannelConfig* this_ptr_conv = (LDKChannelConfig*)this_ptr;
1665 return ChannelConfig_get_fee_proportional_millionths(this_ptr_conv);
1668 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1set_1fee_1proportional_1millionths(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
1669 LDKChannelConfig* this_ptr_conv = (LDKChannelConfig*)this_ptr;
1670 return ChannelConfig_set_fee_proportional_millionths(this_ptr_conv, val);
1673 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1get_1announced_1channel(JNIEnv * _env, jclass _b, jlong this_ptr) {
1674 LDKChannelConfig* this_ptr_conv = (LDKChannelConfig*)this_ptr;
1675 return ChannelConfig_get_announced_channel(this_ptr_conv);
1678 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1set_1announced_1channel(JNIEnv * _env, jclass _b, jlong this_ptr, jboolean val) {
1679 LDKChannelConfig* this_ptr_conv = (LDKChannelConfig*)this_ptr;
1680 return ChannelConfig_set_announced_channel(this_ptr_conv, val);
1683 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1get_1commit_1upfront_1shutdown_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr) {
1684 LDKChannelConfig* this_ptr_conv = (LDKChannelConfig*)this_ptr;
1685 return ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr_conv);
1688 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1set_1commit_1upfront_1shutdown_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr, jboolean val) {
1689 LDKChannelConfig* this_ptr_conv = (LDKChannelConfig*)this_ptr;
1690 return ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr_conv, val);
1693 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) {
1694 LDKChannelConfig* ret = malloc(sizeof(LDKChannelConfig));
1695 *ret = ChannelConfig_new(fee_proportional_millionths_arg, announced_channel_arg, commit_upfront_shutdown_pubkey_arg);
1696 assert(!ret->_underlying_ref);
1697 ret->_underlying_ref = true;
1701 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1default(JNIEnv * _env, jclass _b) {
1702 LDKChannelConfig* ret = malloc(sizeof(LDKChannelConfig));
1703 *ret = ChannelConfig_default();
1704 assert(!ret->_underlying_ref);
1705 ret->_underlying_ref = true;
1709 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1write(JNIEnv * _env, jclass _b, jlong obj) {
1710 LDKChannelConfig* obj_conv = (LDKChannelConfig*)obj;
1711 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
1712 *ret = ChannelConfig_write(obj_conv);
1716 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1read(JNIEnv * _env, jclass _b, jlong ser) {
1717 LDKu8slice ser_conv = *(LDKu8slice*)ser;
1719 LDKChannelConfig* ret = malloc(sizeof(LDKChannelConfig));
1720 *ret = ChannelConfig_read(ser_conv);
1721 assert(!ret->_underlying_ref);
1722 ret->_underlying_ref = true;
1726 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UserConfig_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1727 LDKUserConfig this_ptr_conv = *(LDKUserConfig*)this_ptr;
1728 free((void*)this_ptr);
1729 this_ptr_conv._underlying_ref = false;
1730 return UserConfig_free(this_ptr_conv);
1733 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UserConfig_1get_1own_1channel_1config(JNIEnv * _env, jclass _b, jlong this_ptr) {
1734 LDKUserConfig* this_ptr_conv = (LDKUserConfig*)this_ptr;
1735 LDKChannelHandshakeConfig* ret = malloc(sizeof(LDKChannelHandshakeConfig));
1736 *ret = UserConfig_get_own_channel_config(this_ptr_conv);
1737 assert(!ret->_underlying_ref);
1738 ret->_underlying_ref = true;
1742 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UserConfig_1set_1own_1channel_1config(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1743 LDKUserConfig* this_ptr_conv = (LDKUserConfig*)this_ptr;
1744 LDKChannelHandshakeConfig val_conv = *(LDKChannelHandshakeConfig*)val;
1746 val_conv._underlying_ref = false;
1747 return UserConfig_set_own_channel_config(this_ptr_conv, val_conv);
1750 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UserConfig_1get_1peer_1channel_1config_1limits(JNIEnv * _env, jclass _b, jlong this_ptr) {
1751 LDKUserConfig* this_ptr_conv = (LDKUserConfig*)this_ptr;
1752 LDKChannelHandshakeLimits* ret = malloc(sizeof(LDKChannelHandshakeLimits));
1753 *ret = UserConfig_get_peer_channel_config_limits(this_ptr_conv);
1754 assert(!ret->_underlying_ref);
1755 ret->_underlying_ref = true;
1759 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UserConfig_1set_1peer_1channel_1config_1limits(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1760 LDKUserConfig* this_ptr_conv = (LDKUserConfig*)this_ptr;
1761 LDKChannelHandshakeLimits val_conv = *(LDKChannelHandshakeLimits*)val;
1763 val_conv._underlying_ref = false;
1764 return UserConfig_set_peer_channel_config_limits(this_ptr_conv, val_conv);
1767 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UserConfig_1get_1channel_1options(JNIEnv * _env, jclass _b, jlong this_ptr) {
1768 LDKUserConfig* this_ptr_conv = (LDKUserConfig*)this_ptr;
1769 LDKChannelConfig* ret = malloc(sizeof(LDKChannelConfig));
1770 *ret = UserConfig_get_channel_options(this_ptr_conv);
1771 assert(!ret->_underlying_ref);
1772 ret->_underlying_ref = true;
1776 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UserConfig_1set_1channel_1options(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1777 LDKUserConfig* this_ptr_conv = (LDKUserConfig*)this_ptr;
1778 LDKChannelConfig val_conv = *(LDKChannelConfig*)val;
1780 val_conv._underlying_ref = false;
1781 return UserConfig_set_channel_options(this_ptr_conv, val_conv);
1784 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) {
1785 LDKChannelHandshakeConfig own_channel_config_arg_conv = *(LDKChannelHandshakeConfig*)own_channel_config_arg;
1786 free((void*)own_channel_config_arg);
1787 own_channel_config_arg_conv._underlying_ref = false;
1788 LDKChannelHandshakeLimits peer_channel_config_limits_arg_conv = *(LDKChannelHandshakeLimits*)peer_channel_config_limits_arg;
1789 free((void*)peer_channel_config_limits_arg);
1790 peer_channel_config_limits_arg_conv._underlying_ref = false;
1791 LDKChannelConfig channel_options_arg_conv = *(LDKChannelConfig*)channel_options_arg;
1792 free((void*)channel_options_arg);
1793 channel_options_arg_conv._underlying_ref = false;
1794 LDKUserConfig* ret = malloc(sizeof(LDKUserConfig));
1795 *ret = UserConfig_new(own_channel_config_arg_conv, peer_channel_config_limits_arg_conv, channel_options_arg_conv);
1796 assert(!ret->_underlying_ref);
1797 ret->_underlying_ref = true;
1801 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UserConfig_1default(JNIEnv * _env, jclass _b) {
1802 LDKUserConfig* ret = malloc(sizeof(LDKUserConfig));
1803 *ret = UserConfig_default();
1804 assert(!ret->_underlying_ref);
1805 ret->_underlying_ref = true;
1809 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainWatchInterface_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1810 LDKChainWatchInterface this_ptr_conv = *(LDKChainWatchInterface*)this_ptr;
1811 free((void*)this_ptr);
1812 return ChainWatchInterface_free(this_ptr_conv);
1815 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BroadcasterInterface_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1816 LDKBroadcasterInterface this_ptr_conv = *(LDKBroadcasterInterface*)this_ptr;
1817 free((void*)this_ptr);
1818 return BroadcasterInterface_free(this_ptr_conv);
1821 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainListener_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1822 LDKChainListener this_ptr_conv = *(LDKChainListener*)this_ptr;
1823 free((void*)this_ptr);
1824 return ChainListener_free(this_ptr_conv);
1827 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FeeEstimator_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1828 LDKFeeEstimator this_ptr_conv = *(LDKFeeEstimator*)this_ptr;
1829 free((void*)this_ptr);
1830 return FeeEstimator_free(this_ptr_conv);
1833 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainWatchedUtil_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1834 LDKChainWatchedUtil this_ptr_conv = *(LDKChainWatchedUtil*)this_ptr;
1835 free((void*)this_ptr);
1836 this_ptr_conv._underlying_ref = false;
1837 return ChainWatchedUtil_free(this_ptr_conv);
1840 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChainWatchedUtil_1new(JNIEnv * _env, jclass _b) {
1841 LDKChainWatchedUtil* ret = malloc(sizeof(LDKChainWatchedUtil));
1842 *ret = ChainWatchedUtil_new();
1843 assert(!ret->_underlying_ref);
1844 ret->_underlying_ref = true;
1848 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChainWatchedUtil_1register_1tx(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray txid, jlong script_pub_key) {
1849 LDKChainWatchedUtil* this_arg_conv = (LDKChainWatchedUtil*)this_arg;
1850 unsigned char txid_arr[32];
1851 (*_env)->GetByteArrayRegion (_env, txid, 0, 32, txid_arr);
1852 unsigned char (*txid_ref)[32] = &txid_arr;
1853 LDKu8slice script_pub_key_conv = *(LDKu8slice*)script_pub_key;
1854 free((void*)script_pub_key);
1855 return ChainWatchedUtil_register_tx(this_arg_conv, txid_ref, script_pub_key_conv);
1858 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChainWatchedUtil_1register_1outpoint(JNIEnv * _env, jclass _b, jlong this_arg, jlong outpoint, jlong _script_pub_key) {
1859 LDKChainWatchedUtil* this_arg_conv = (LDKChainWatchedUtil*)this_arg;
1860 LDKC2Tuple_Txidu32Z outpoint_conv = *(LDKC2Tuple_Txidu32Z*)outpoint;
1861 free((void*)outpoint);
1862 LDKu8slice _script_pub_key_conv = *(LDKu8slice*)_script_pub_key;
1863 free((void*)_script_pub_key);
1864 return ChainWatchedUtil_register_outpoint(this_arg_conv, outpoint_conv, _script_pub_key_conv);
1867 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChainWatchedUtil_1watch_1all(JNIEnv * _env, jclass _b, jlong this_arg) {
1868 LDKChainWatchedUtil* this_arg_conv = (LDKChainWatchedUtil*)this_arg;
1869 return ChainWatchedUtil_watch_all(this_arg_conv);
1872 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChainWatchedUtil_1does_1match_1tx(JNIEnv * _env, jclass _b, jlong this_arg, jlong tx) {
1873 LDKChainWatchedUtil* this_arg_conv = (LDKChainWatchedUtil*)this_arg;
1874 LDKTransaction tx_conv = *(LDKTransaction*)tx;
1876 return ChainWatchedUtil_does_match_tx(this_arg_conv, tx_conv);
1879 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlockNotifier_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1880 LDKBlockNotifier this_ptr_conv = *(LDKBlockNotifier*)this_ptr;
1881 free((void*)this_ptr);
1882 this_ptr_conv._underlying_ref = false;
1883 return BlockNotifier_free(this_ptr_conv);
1886 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BlockNotifier_1new(JNIEnv * _env, jclass _b, jlong chain_monitor) {
1887 LDKChainWatchInterface chain_monitor_conv = *(LDKChainWatchInterface*)chain_monitor;
1888 free((void*)chain_monitor);
1889 LDKBlockNotifier* ret = malloc(sizeof(LDKBlockNotifier));
1890 *ret = BlockNotifier_new(chain_monitor_conv);
1891 assert(!ret->_underlying_ref);
1892 ret->_underlying_ref = true;
1896 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlockNotifier_1register_1listener(JNIEnv * _env, jclass _b, jlong this_arg, jlong listener) {
1897 LDKBlockNotifier* this_arg_conv = (LDKBlockNotifier*)this_arg;
1898 LDKChainListener listener_conv = *(LDKChainListener*)listener;
1899 free((void*)listener);
1900 return BlockNotifier_register_listener(this_arg_conv, listener_conv);
1903 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlockNotifier_1block_1connected(JNIEnv * _env, jclass _b, jlong this_arg, jlong block, jint height) {
1904 LDKBlockNotifier* this_arg_conv = (LDKBlockNotifier*)this_arg;
1905 LDKu8slice block_conv = *(LDKu8slice*)block;
1907 return BlockNotifier_block_connected(this_arg_conv, block_conv, height);
1910 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) {
1911 LDKBlockNotifier* this_arg_conv = (LDKBlockNotifier*)this_arg;
1912 unsigned char header_arr[80];
1913 (*_env)->GetByteArrayRegion (_env, header, 0, 80, header_arr);
1914 unsigned char (*header_ref)[80] = &header_arr;
1915 LDKCVec_TransactionZ txn_matched_conv = *(LDKCVec_TransactionZ*)txn_matched;
1916 free((void*)txn_matched);
1917 LDKusizeslice indexes_of_txn_matched_conv = *(LDKusizeslice*)indexes_of_txn_matched;
1918 free((void*)indexes_of_txn_matched);
1919 return BlockNotifier_block_connected_checked(this_arg_conv, header_ref, height, txn_matched_conv, indexes_of_txn_matched_conv);
1922 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlockNotifier_1block_1disconnected(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray header, jint disconnected_height) {
1923 LDKBlockNotifier* this_arg_conv = (LDKBlockNotifier*)this_arg;
1924 unsigned char header_arr[80];
1925 (*_env)->GetByteArrayRegion (_env, header, 0, 80, header_arr);
1926 unsigned char (*header_ref)[80] = &header_arr;
1927 return BlockNotifier_block_disconnected(this_arg_conv, header_ref, disconnected_height);
1930 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainWatchInterfaceUtil_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1931 LDKChainWatchInterfaceUtil this_ptr_conv = *(LDKChainWatchInterfaceUtil*)this_ptr;
1932 free((void*)this_ptr);
1933 this_ptr_conv._underlying_ref = false;
1934 return ChainWatchInterfaceUtil_free(this_ptr_conv);
1937 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChainWatchInterfaceUtil_1as_1ChainWatchInterface(JNIEnv * _env, jclass _b, jlong this_arg) {
1938 LDKChainWatchInterfaceUtil* this_arg_conv = (LDKChainWatchInterfaceUtil*)this_arg;
1939 LDKChainWatchInterface* ret = malloc(sizeof(LDKChainWatchInterface));
1940 *ret = ChainWatchInterfaceUtil_as_ChainWatchInterface(this_arg_conv);
1944 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChainWatchInterfaceUtil_1new(JNIEnv * _env, jclass _b, jlong network) {
1945 LDKNetwork network_conv = *(LDKNetwork*)network;
1946 free((void*)network);
1947 LDKChainWatchInterfaceUtil* ret = malloc(sizeof(LDKChainWatchInterfaceUtil));
1948 *ret = ChainWatchInterfaceUtil_new(network_conv);
1949 assert(!ret->_underlying_ref);
1950 ret->_underlying_ref = true;
1954 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChainWatchInterfaceUtil_1does_1match_1tx(JNIEnv * _env, jclass _b, jlong this_arg, jlong tx) {
1955 LDKChainWatchInterfaceUtil* this_arg_conv = (LDKChainWatchInterfaceUtil*)this_arg;
1956 LDKTransaction tx_conv = *(LDKTransaction*)tx;
1958 return ChainWatchInterfaceUtil_does_match_tx(this_arg_conv, tx_conv);
1961 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutPoint_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1962 LDKOutPoint this_ptr_conv = *(LDKOutPoint*)this_ptr;
1963 free((void*)this_ptr);
1964 this_ptr_conv._underlying_ref = false;
1965 return OutPoint_free(this_ptr_conv);
1968 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OutPoint_1get_1txid(JNIEnv * _env, jclass _b, jlong this_ptr) {
1969 LDKOutPoint* this_ptr_conv = (LDKOutPoint*)this_ptr;
1970 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
1971 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *OutPoint_get_txid(this_ptr_conv));
1975 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutPoint_1set_1txid(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1976 LDKOutPoint* this_ptr_conv = (LDKOutPoint*)this_ptr;
1977 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
1979 return OutPoint_set_txid(this_ptr_conv, val_conv);
1982 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_OutPoint_1get_1index(JNIEnv * _env, jclass _b, jlong this_ptr) {
1983 LDKOutPoint* this_ptr_conv = (LDKOutPoint*)this_ptr;
1984 return OutPoint_get_index(this_ptr_conv);
1987 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutPoint_1set_1index(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
1988 LDKOutPoint* this_ptr_conv = (LDKOutPoint*)this_ptr;
1989 return OutPoint_set_index(this_ptr_conv, val);
1992 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutPoint_1new(JNIEnv * _env, jclass _b, jlong txid_arg, jshort index_arg) {
1993 LDKThirtyTwoBytes txid_arg_conv = *(LDKThirtyTwoBytes*)txid_arg;
1994 free((void*)txid_arg);
1995 LDKOutPoint* ret = malloc(sizeof(LDKOutPoint));
1996 *ret = OutPoint_new(txid_arg_conv, index_arg);
1997 assert(!ret->_underlying_ref);
1998 ret->_underlying_ref = true;
2002 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutPoint_1to_1channel_1id(JNIEnv * _env, jclass _b, jlong this_arg) {
2003 LDKOutPoint* this_arg_conv = (LDKOutPoint*)this_arg;
2004 LDKThirtyTwoBytes* ret = malloc(sizeof(LDKThirtyTwoBytes));
2005 *ret = OutPoint_to_channel_id(this_arg_conv);
2009 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutPoint_1write(JNIEnv * _env, jclass _b, jlong obj) {
2010 LDKOutPoint* obj_conv = (LDKOutPoint*)obj;
2011 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
2012 *ret = OutPoint_write(obj_conv);
2016 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutPoint_1read(JNIEnv * _env, jclass _b, jlong ser) {
2017 LDKu8slice ser_conv = *(LDKu8slice*)ser;
2019 LDKOutPoint* ret = malloc(sizeof(LDKOutPoint));
2020 *ret = OutPoint_read(ser_conv);
2021 assert(!ret->_underlying_ref);
2022 ret->_underlying_ref = true;
2026 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpendableOutputDescriptor_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2027 LDKSpendableOutputDescriptor this_ptr_conv = *(LDKSpendableOutputDescriptor*)this_ptr;
2028 free((void*)this_ptr);
2029 return SpendableOutputDescriptor_free(this_ptr_conv);
2032 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2033 LDKChannelKeys this_ptr_conv = *(LDKChannelKeys*)this_ptr;
2034 free((void*)this_ptr);
2035 return ChannelKeys_free(this_ptr_conv);
2038 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_KeysInterface_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2039 LDKKeysInterface this_ptr_conv = *(LDKKeysInterface*)this_ptr;
2040 free((void*)this_ptr);
2041 return KeysInterface_free(this_ptr_conv);
2044 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2045 LDKInMemoryChannelKeys this_ptr_conv = *(LDKInMemoryChannelKeys*)this_ptr;
2046 free((void*)this_ptr);
2047 this_ptr_conv._underlying_ref = false;
2048 return InMemoryChannelKeys_free(this_ptr_conv);
2051 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1funding_1key(JNIEnv * _env, jclass _b, jlong this_ptr) {
2052 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2053 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
2054 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *InMemoryChannelKeys_get_funding_key(this_ptr_conv));
2058 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1funding_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2059 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2060 LDKSecretKey val_conv = *(LDKSecretKey*)val;
2062 return InMemoryChannelKeys_set_funding_key(this_ptr_conv, val_conv);
2065 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1revocation_1base_1key(JNIEnv * _env, jclass _b, jlong this_ptr) {
2066 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2067 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
2068 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *InMemoryChannelKeys_get_revocation_base_key(this_ptr_conv));
2072 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1revocation_1base_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2073 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2074 LDKSecretKey val_conv = *(LDKSecretKey*)val;
2076 return InMemoryChannelKeys_set_revocation_base_key(this_ptr_conv, val_conv);
2079 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1payment_1key(JNIEnv * _env, jclass _b, jlong this_ptr) {
2080 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2081 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
2082 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *InMemoryChannelKeys_get_payment_key(this_ptr_conv));
2086 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1payment_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2087 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2088 LDKSecretKey val_conv = *(LDKSecretKey*)val;
2090 return InMemoryChannelKeys_set_payment_key(this_ptr_conv, val_conv);
2093 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1delayed_1payment_1base_1key(JNIEnv * _env, jclass _b, jlong this_ptr) {
2094 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2095 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
2096 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *InMemoryChannelKeys_get_delayed_payment_base_key(this_ptr_conv));
2100 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1delayed_1payment_1base_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2101 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2102 LDKSecretKey val_conv = *(LDKSecretKey*)val;
2104 return InMemoryChannelKeys_set_delayed_payment_base_key(this_ptr_conv, val_conv);
2107 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1htlc_1base_1key(JNIEnv * _env, jclass _b, jlong this_ptr) {
2108 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2109 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
2110 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *InMemoryChannelKeys_get_htlc_base_key(this_ptr_conv));
2114 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1htlc_1base_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2115 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2116 LDKSecretKey val_conv = *(LDKSecretKey*)val;
2118 return InMemoryChannelKeys_set_htlc_base_key(this_ptr_conv, val_conv);
2121 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1commitment_1seed(JNIEnv * _env, jclass _b, jlong this_ptr) {
2122 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2123 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
2124 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *InMemoryChannelKeys_get_commitment_seed(this_ptr_conv));
2128 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1commitment_1seed(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2129 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2130 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
2132 return InMemoryChannelKeys_set_commitment_seed(this_ptr_conv, val_conv);
2135 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) {
2136 LDKSecretKey funding_key_conv = *(LDKSecretKey*)funding_key;
2137 free((void*)funding_key);
2138 LDKSecretKey revocation_base_key_conv = *(LDKSecretKey*)revocation_base_key;
2139 free((void*)revocation_base_key);
2140 LDKSecretKey payment_key_conv = *(LDKSecretKey*)payment_key;
2141 free((void*)payment_key);
2142 LDKSecretKey delayed_payment_base_key_conv = *(LDKSecretKey*)delayed_payment_base_key;
2143 free((void*)delayed_payment_base_key);
2144 LDKSecretKey htlc_base_key_conv = *(LDKSecretKey*)htlc_base_key;
2145 free((void*)htlc_base_key);
2146 LDKThirtyTwoBytes commitment_seed_conv = *(LDKThirtyTwoBytes*)commitment_seed;
2147 free((void*)commitment_seed);
2148 LDKC2Tuple_u64u64Z key_derivation_params_conv = *(LDKC2Tuple_u64u64Z*)key_derivation_params;
2149 free((void*)key_derivation_params);
2150 LDKInMemoryChannelKeys* ret = malloc(sizeof(LDKInMemoryChannelKeys));
2151 *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);
2152 assert(!ret->_underlying_ref);
2153 ret->_underlying_ref = true;
2157 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1remote_1pubkeys(JNIEnv * _env, jclass _b, jlong this_arg) {
2158 LDKInMemoryChannelKeys* this_arg_conv = (LDKInMemoryChannelKeys*)this_arg;
2159 LDKChannelPublicKeys* ret = malloc(sizeof(LDKChannelPublicKeys));
2160 *ret = InMemoryChannelKeys_remote_pubkeys(this_arg_conv);
2161 assert(!ret->_underlying_ref);
2162 ret->_underlying_ref = true;
2166 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1remote_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_arg) {
2167 LDKInMemoryChannelKeys* this_arg_conv = (LDKInMemoryChannelKeys*)this_arg;
2168 return InMemoryChannelKeys_remote_to_self_delay(this_arg_conv);
2171 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1local_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_arg) {
2172 LDKInMemoryChannelKeys* this_arg_conv = (LDKInMemoryChannelKeys*)this_arg;
2173 return InMemoryChannelKeys_local_to_self_delay(this_arg_conv);
2176 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1as_1ChannelKeys(JNIEnv * _env, jclass _b, jlong this_arg) {
2177 LDKInMemoryChannelKeys* this_arg_conv = (LDKInMemoryChannelKeys*)this_arg;
2178 LDKChannelKeys* ret = malloc(sizeof(LDKChannelKeys));
2179 *ret = InMemoryChannelKeys_as_ChannelKeys(this_arg_conv);
2183 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1write(JNIEnv * _env, jclass _b, jlong obj) {
2184 LDKInMemoryChannelKeys* obj_conv = (LDKInMemoryChannelKeys*)obj;
2185 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
2186 *ret = InMemoryChannelKeys_write(obj_conv);
2190 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1read(JNIEnv * _env, jclass _b, jlong ser) {
2191 LDKu8slice ser_conv = *(LDKu8slice*)ser;
2193 LDKInMemoryChannelKeys* ret = malloc(sizeof(LDKInMemoryChannelKeys));
2194 *ret = InMemoryChannelKeys_read(ser_conv);
2195 assert(!ret->_underlying_ref);
2196 ret->_underlying_ref = true;
2200 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_KeysManager_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2201 LDKKeysManager this_ptr_conv = *(LDKKeysManager*)this_ptr;
2202 free((void*)this_ptr);
2203 this_ptr_conv._underlying_ref = false;
2204 return KeysManager_free(this_ptr_conv);
2207 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) {
2208 unsigned char seed_arr[32];
2209 (*_env)->GetByteArrayRegion (_env, seed, 0, 32, seed_arr);
2210 unsigned char (*seed_ref)[32] = &seed_arr;
2211 LDKNetwork network_conv = *(LDKNetwork*)network;
2212 free((void*)network);
2213 LDKKeysManager* ret = malloc(sizeof(LDKKeysManager));
2214 *ret = KeysManager_new(seed_ref, network_conv, starting_time_secs, starting_time_nanos);
2215 assert(!ret->_underlying_ref);
2216 ret->_underlying_ref = true;
2220 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) {
2221 LDKKeysManager* this_arg_conv = (LDKKeysManager*)this_arg;
2222 LDKInMemoryChannelKeys* ret = malloc(sizeof(LDKInMemoryChannelKeys));
2223 *ret = KeysManager_derive_channel_keys(this_arg_conv, channel_value_satoshis, params_1, params_2);
2224 assert(!ret->_underlying_ref);
2225 ret->_underlying_ref = true;
2229 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1KeysInterface(JNIEnv * _env, jclass _b, jlong this_arg) {
2230 LDKKeysManager* this_arg_conv = (LDKKeysManager*)this_arg;
2231 LDKKeysInterface* ret = malloc(sizeof(LDKKeysInterface));
2232 *ret = KeysManager_as_KeysInterface(this_arg_conv);
2236 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2237 LDKChannelManager this_ptr_conv = *(LDKChannelManager*)this_ptr;
2238 free((void*)this_ptr);
2239 this_ptr_conv._underlying_ref = false;
2240 return ChannelManager_free(this_ptr_conv);
2243 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2244 LDKChannelDetails this_ptr_conv = *(LDKChannelDetails*)this_ptr;
2245 free((void*)this_ptr);
2246 this_ptr_conv._underlying_ref = false;
2247 return ChannelDetails_free(this_ptr_conv);
2250 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
2251 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2252 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
2253 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *ChannelDetails_get_channel_id(this_ptr_conv));
2257 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2258 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2259 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
2261 return ChannelDetails_set_channel_id(this_ptr_conv, val_conv);
2264 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1remote_1network_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
2265 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2266 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
2267 *ret = ChannelDetails_get_remote_network_id(this_ptr_conv);
2271 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1remote_1network_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2272 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2273 LDKPublicKey val_conv = *(LDKPublicKey*)val;
2275 return ChannelDetails_set_remote_network_id(this_ptr_conv, val_conv);
2278 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1counterparty_1features(JNIEnv * _env, jclass _b, jlong this_ptr) {
2279 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2280 LDKInitFeatures* ret = malloc(sizeof(LDKInitFeatures));
2281 *ret = ChannelDetails_get_counterparty_features(this_ptr_conv);
2282 assert(!ret->_underlying_ref);
2283 ret->_underlying_ref = true;
2287 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1counterparty_1features(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2288 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2289 LDKInitFeatures val_conv = *(LDKInitFeatures*)val;
2291 val_conv._underlying_ref = false;
2292 return ChannelDetails_set_counterparty_features(this_ptr_conv, val_conv);
2295 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1channel_1value_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
2296 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2297 return ChannelDetails_get_channel_value_satoshis(this_ptr_conv);
2300 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1channel_1value_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2301 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2302 return ChannelDetails_set_channel_value_satoshis(this_ptr_conv, val);
2305 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1user_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
2306 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2307 return ChannelDetails_get_user_id(this_ptr_conv);
2310 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1user_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2311 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2312 return ChannelDetails_set_user_id(this_ptr_conv, val);
2315 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1outbound_1capacity_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
2316 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2317 return ChannelDetails_get_outbound_capacity_msat(this_ptr_conv);
2320 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1outbound_1capacity_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2321 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2322 return ChannelDetails_set_outbound_capacity_msat(this_ptr_conv, val);
2325 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1inbound_1capacity_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
2326 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2327 return ChannelDetails_get_inbound_capacity_msat(this_ptr_conv);
2330 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1inbound_1capacity_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2331 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2332 return ChannelDetails_set_inbound_capacity_msat(this_ptr_conv, val);
2335 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1is_1live(JNIEnv * _env, jclass _b, jlong this_ptr) {
2336 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2337 return ChannelDetails_get_is_live(this_ptr_conv);
2340 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1is_1live(JNIEnv * _env, jclass _b, jlong this_ptr, jboolean val) {
2341 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2342 return ChannelDetails_set_is_live(this_ptr_conv, val);
2345 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PaymentSendFailure_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2346 LDKPaymentSendFailure this_ptr_conv = *(LDKPaymentSendFailure*)this_ptr;
2347 free((void*)this_ptr);
2348 this_ptr_conv._underlying_ref = false;
2349 return PaymentSendFailure_free(this_ptr_conv);
2352 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) {
2353 LDKNetwork network_conv = *(LDKNetwork*)network;
2354 free((void*)network);
2355 LDKFeeEstimator fee_est_conv = *(LDKFeeEstimator*)fee_est;
2356 free((void*)fee_est);
2357 LDKManyChannelMonitor monitor_conv = *(LDKManyChannelMonitor*)monitor;
2358 free((void*)monitor);
2359 LDKBroadcasterInterface tx_broadcaster_conv = *(LDKBroadcasterInterface*)tx_broadcaster;
2360 free((void*)tx_broadcaster);
2361 LDKLogger logger_conv = *(LDKLogger*)logger;
2362 free((void*)logger);
2363 LDKKeysInterface keys_manager_conv = *(LDKKeysInterface*)keys_manager;
2364 free((void*)keys_manager);
2365 LDKUserConfig config_conv = *(LDKUserConfig*)config;
2366 free((void*)config);
2367 config_conv._underlying_ref = false;
2368 uintptr_t current_blockchain_height_conv = *(uintptr_t*)current_blockchain_height;
2369 free((void*)current_blockchain_height);
2370 LDKChannelManager* ret = malloc(sizeof(LDKChannelManager));
2371 *ret = ChannelManager_new(network_conv, fee_est_conv, monitor_conv, tx_broadcaster_conv, logger_conv, keys_manager_conv, config_conv, current_blockchain_height_conv);
2372 assert(!ret->_underlying_ref);
2373 ret->_underlying_ref = true;
2377 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) {
2378 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2379 LDKPublicKey their_network_key_conv = *(LDKPublicKey*)their_network_key;
2380 free((void*)their_network_key);
2381 LDKUserConfig override_config_conv = *(LDKUserConfig*)override_config;
2382 free((void*)override_config);
2383 override_config_conv._underlying_ref = false;
2384 LDKCResult_NoneAPIErrorZ* ret = malloc(sizeof(LDKCResult_NoneAPIErrorZ));
2385 *ret = ChannelManager_create_channel(this_arg_conv, their_network_key_conv, channel_value_satoshis, push_msat, user_id, override_config_conv);
2389 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1list_1channels(JNIEnv * _env, jclass _b, jlong this_arg) {
2390 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2391 LDKCVec_ChannelDetailsZ* ret = malloc(sizeof(LDKCVec_ChannelDetailsZ));
2392 *ret = ChannelManager_list_channels(this_arg_conv);
2396 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1list_1usable_1channels(JNIEnv * _env, jclass _b, jlong this_arg) {
2397 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2398 LDKCVec_ChannelDetailsZ* ret = malloc(sizeof(LDKCVec_ChannelDetailsZ));
2399 *ret = ChannelManager_list_usable_channels(this_arg_conv);
2403 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1close_1channel(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray channel_id) {
2404 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2405 unsigned char channel_id_arr[32];
2406 (*_env)->GetByteArrayRegion (_env, channel_id, 0, 32, channel_id_arr);
2407 unsigned char (*channel_id_ref)[32] = &channel_id_arr;
2408 LDKCResult_NoneAPIErrorZ* ret = malloc(sizeof(LDKCResult_NoneAPIErrorZ));
2409 *ret = ChannelManager_close_channel(this_arg_conv, channel_id_ref);
2413 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1force_1close_1channel(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray channel_id) {
2414 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2415 unsigned char channel_id_arr[32];
2416 (*_env)->GetByteArrayRegion (_env, channel_id, 0, 32, channel_id_arr);
2417 unsigned char (*channel_id_ref)[32] = &channel_id_arr;
2418 return ChannelManager_force_close_channel(this_arg_conv, channel_id_ref);
2421 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1force_1close_1all_1channels(JNIEnv * _env, jclass _b, jlong this_arg) {
2422 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2423 return ChannelManager_force_close_all_channels(this_arg_conv);
2426 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) {
2427 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2428 LDKRoute* route_conv = (LDKRoute*)route;
2429 LDKThirtyTwoBytes payment_hash_conv = *(LDKThirtyTwoBytes*)payment_hash;
2430 free((void*)payment_hash);
2431 LDKThirtyTwoBytes payment_secret_conv = *(LDKThirtyTwoBytes*)payment_secret;
2432 free((void*)payment_secret);
2433 LDKCResult_NonePaymentSendFailureZ* ret = malloc(sizeof(LDKCResult_NonePaymentSendFailureZ));
2434 *ret = ChannelManager_send_payment(this_arg_conv, route_conv, payment_hash_conv, payment_secret_conv);
2438 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) {
2439 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2440 unsigned char temporary_channel_id_arr[32];
2441 (*_env)->GetByteArrayRegion (_env, temporary_channel_id, 0, 32, temporary_channel_id_arr);
2442 unsigned char (*temporary_channel_id_ref)[32] = &temporary_channel_id_arr;
2443 LDKOutPoint funding_txo_conv = *(LDKOutPoint*)funding_txo;
2444 free((void*)funding_txo);
2445 funding_txo_conv._underlying_ref = false;
2446 return ChannelManager_funding_transaction_generated(this_arg_conv, temporary_channel_id_ref, funding_txo_conv);
2449 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) {
2450 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2451 LDKThreeBytes rgb_conv = *(LDKThreeBytes*)rgb;
2453 LDKThirtyTwoBytes alias_conv = *(LDKThirtyTwoBytes*)alias;
2455 LDKCVec_NetAddressZ addresses_conv = *(LDKCVec_NetAddressZ*)addresses;
2456 free((void*)addresses);
2457 return ChannelManager_broadcast_node_announcement(this_arg_conv, rgb_conv, alias_conv, addresses_conv);
2460 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1process_1pending_1htlc_1forwards(JNIEnv * _env, jclass _b, jlong this_arg) {
2461 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2462 return ChannelManager_process_pending_htlc_forwards(this_arg_conv);
2465 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1timer_1chan_1freshness_1every_1min(JNIEnv * _env, jclass _b, jlong this_arg) {
2466 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2467 return ChannelManager_timer_chan_freshness_every_min(this_arg_conv);
2470 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) {
2471 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2472 unsigned char payment_hash_arr[32];
2473 (*_env)->GetByteArrayRegion (_env, payment_hash, 0, 32, payment_hash_arr);
2474 unsigned char (*payment_hash_ref)[32] = &payment_hash_arr;
2475 LDKThirtyTwoBytes payment_secret_conv = *(LDKThirtyTwoBytes*)payment_secret;
2476 free((void*)payment_secret);
2477 return ChannelManager_fail_htlc_backwards(this_arg_conv, payment_hash_ref, payment_secret_conv);
2480 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) {
2481 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2482 LDKThirtyTwoBytes payment_preimage_conv = *(LDKThirtyTwoBytes*)payment_preimage;
2483 free((void*)payment_preimage);
2484 LDKThirtyTwoBytes payment_secret_conv = *(LDKThirtyTwoBytes*)payment_secret;
2485 free((void*)payment_secret);
2486 return ChannelManager_claim_funds(this_arg_conv, payment_preimage_conv, payment_secret_conv, expected_amount);
2489 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1get_1our_1node_1id(JNIEnv * _env, jclass _b, jlong this_arg) {
2490 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2491 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
2492 *ret = ChannelManager_get_our_node_id(this_arg_conv);
2496 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) {
2497 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2498 LDKOutPoint* funding_txo_conv = (LDKOutPoint*)funding_txo;
2499 return ChannelManager_channel_monitor_updated(this_arg_conv, funding_txo_conv, highest_applied_update_id);
2502 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1MessageSendEventsProvider(JNIEnv * _env, jclass _b, jlong this_arg) {
2503 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2504 LDKMessageSendEventsProvider* ret = malloc(sizeof(LDKMessageSendEventsProvider));
2505 *ret = ChannelManager_as_MessageSendEventsProvider(this_arg_conv);
2509 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1EventsProvider(JNIEnv * _env, jclass _b, jlong this_arg) {
2510 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2511 LDKEventsProvider* ret = malloc(sizeof(LDKEventsProvider));
2512 *ret = ChannelManager_as_EventsProvider(this_arg_conv);
2516 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1ChainListener(JNIEnv * _env, jclass _b, jlong this_arg) {
2517 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2518 LDKChainListener* ret = malloc(sizeof(LDKChainListener));
2519 *ret = ChannelManager_as_ChainListener(this_arg_conv);
2523 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1ChannelMessageHandler(JNIEnv * _env, jclass _b, jlong this_arg) {
2524 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2525 LDKChannelMessageHandler* ret = malloc(sizeof(LDKChannelMessageHandler));
2526 *ret = ChannelManager_as_ChannelMessageHandler(this_arg_conv);
2530 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2531 LDKChannelManagerReadArgs this_ptr_conv = *(LDKChannelManagerReadArgs*)this_ptr;
2532 free((void*)this_ptr);
2533 this_ptr_conv._underlying_ref = false;
2534 return ChannelManagerReadArgs_free(this_ptr_conv);
2537 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1get_1keys_1manager(JNIEnv * _env, jclass _b, jlong this_ptr) {
2538 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2539 return (long) ChannelManagerReadArgs_get_keys_manager(this_ptr_conv);
2542 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1set_1keys_1manager(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2543 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2544 LDKKeysInterface val_conv = *(LDKKeysInterface*)val;
2546 return ChannelManagerReadArgs_set_keys_manager(this_ptr_conv, val_conv);
2549 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1get_1fee_1estimator(JNIEnv * _env, jclass _b, jlong this_ptr) {
2550 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2551 return (long) ChannelManagerReadArgs_get_fee_estimator(this_ptr_conv);
2554 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1set_1fee_1estimator(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2555 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2556 LDKFeeEstimator val_conv = *(LDKFeeEstimator*)val;
2558 return ChannelManagerReadArgs_set_fee_estimator(this_ptr_conv, val_conv);
2561 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1get_1monitor(JNIEnv * _env, jclass _b, jlong this_ptr) {
2562 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2563 return (long) ChannelManagerReadArgs_get_monitor(this_ptr_conv);
2566 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1set_1monitor(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2567 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2568 LDKManyChannelMonitor val_conv = *(LDKManyChannelMonitor*)val;
2570 return ChannelManagerReadArgs_set_monitor(this_ptr_conv, val_conv);
2573 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1get_1tx_1broadcaster(JNIEnv * _env, jclass _b, jlong this_ptr) {
2574 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2575 return (long) ChannelManagerReadArgs_get_tx_broadcaster(this_ptr_conv);
2578 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1set_1tx_1broadcaster(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2579 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2580 LDKBroadcasterInterface val_conv = *(LDKBroadcasterInterface*)val;
2582 return ChannelManagerReadArgs_set_tx_broadcaster(this_ptr_conv, val_conv);
2585 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1get_1logger(JNIEnv * _env, jclass _b, jlong this_ptr) {
2586 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2587 return (long) ChannelManagerReadArgs_get_logger(this_ptr_conv);
2590 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1set_1logger(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2591 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2592 LDKLogger val_conv = *(LDKLogger*)val;
2594 return ChannelManagerReadArgs_set_logger(this_ptr_conv, val_conv);
2597 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1get_1default_1config(JNIEnv * _env, jclass _b, jlong this_ptr) {
2598 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2599 LDKUserConfig* ret = malloc(sizeof(LDKUserConfig));
2600 *ret = ChannelManagerReadArgs_get_default_config(this_ptr_conv);
2601 assert(!ret->_underlying_ref);
2602 ret->_underlying_ref = true;
2606 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1set_1default_1config(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2607 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2608 LDKUserConfig val_conv = *(LDKUserConfig*)val;
2610 val_conv._underlying_ref = false;
2611 return ChannelManagerReadArgs_set_default_config(this_ptr_conv, val_conv);
2614 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) {
2615 LDKKeysInterface keys_manager_conv = *(LDKKeysInterface*)keys_manager;
2616 free((void*)keys_manager);
2617 LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)fee_estimator;
2618 free((void*)fee_estimator);
2619 LDKManyChannelMonitor monitor_conv = *(LDKManyChannelMonitor*)monitor;
2620 free((void*)monitor);
2621 LDKBroadcasterInterface tx_broadcaster_conv = *(LDKBroadcasterInterface*)tx_broadcaster;
2622 free((void*)tx_broadcaster);
2623 LDKLogger logger_conv = *(LDKLogger*)logger;
2624 free((void*)logger);
2625 LDKUserConfig default_config_conv = *(LDKUserConfig*)default_config;
2626 free((void*)default_config);
2627 default_config_conv._underlying_ref = false;
2628 LDKCVec_ChannelMonitorZ channel_monitors_conv = *(LDKCVec_ChannelMonitorZ*)channel_monitors;
2629 free((void*)channel_monitors);
2630 LDKChannelManagerReadArgs* ret = malloc(sizeof(LDKChannelManagerReadArgs));
2631 *ret = ChannelManagerReadArgs_new(keys_manager_conv, fee_estimator_conv, monitor_conv, tx_broadcaster_conv, logger_conv, default_config_conv, channel_monitors_conv);
2632 assert(!ret->_underlying_ref);
2633 ret->_underlying_ref = true;
2637 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2638 LDKChannelMonitorUpdate this_ptr_conv = *(LDKChannelMonitorUpdate*)this_ptr;
2639 free((void*)this_ptr);
2640 this_ptr_conv._underlying_ref = false;
2641 return ChannelMonitorUpdate_free(this_ptr_conv);
2644 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1get_1update_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
2645 LDKChannelMonitorUpdate* this_ptr_conv = (LDKChannelMonitorUpdate*)this_ptr;
2646 return ChannelMonitorUpdate_get_update_id(this_ptr_conv);
2649 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1set_1update_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2650 LDKChannelMonitorUpdate* this_ptr_conv = (LDKChannelMonitorUpdate*)this_ptr;
2651 return ChannelMonitorUpdate_set_update_id(this_ptr_conv, val);
2654 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1write(JNIEnv * _env, jclass _b, jlong obj) {
2655 LDKChannelMonitorUpdate* obj_conv = (LDKChannelMonitorUpdate*)obj;
2656 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
2657 *ret = ChannelMonitorUpdate_write(obj_conv);
2661 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1read(JNIEnv * _env, jclass _b, jlong ser) {
2662 LDKu8slice ser_conv = *(LDKu8slice*)ser;
2664 LDKChannelMonitorUpdate* ret = malloc(sizeof(LDKChannelMonitorUpdate));
2665 *ret = ChannelMonitorUpdate_read(ser_conv);
2666 assert(!ret->_underlying_ref);
2667 ret->_underlying_ref = true;
2671 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_MonitorUpdateError_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2672 LDKMonitorUpdateError this_ptr_conv = *(LDKMonitorUpdateError*)this_ptr;
2673 free((void*)this_ptr);
2674 this_ptr_conv._underlying_ref = false;
2675 return MonitorUpdateError_free(this_ptr_conv);
2678 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2679 LDKMonitorEvent this_ptr_conv = *(LDKMonitorEvent*)this_ptr;
2680 free((void*)this_ptr);
2681 this_ptr_conv._underlying_ref = false;
2682 return MonitorEvent_free(this_ptr_conv);
2685 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCUpdate_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2686 LDKHTLCUpdate this_ptr_conv = *(LDKHTLCUpdate*)this_ptr;
2687 free((void*)this_ptr);
2688 this_ptr_conv._underlying_ref = false;
2689 return HTLCUpdate_free(this_ptr_conv);
2692 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCUpdate_1write(JNIEnv * _env, jclass _b, jlong obj) {
2693 LDKHTLCUpdate* obj_conv = (LDKHTLCUpdate*)obj;
2694 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
2695 *ret = HTLCUpdate_write(obj_conv);
2699 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCUpdate_1read(JNIEnv * _env, jclass _b, jlong ser) {
2700 LDKu8slice ser_conv = *(LDKu8slice*)ser;
2702 LDKHTLCUpdate* ret = malloc(sizeof(LDKHTLCUpdate));
2703 *ret = HTLCUpdate_read(ser_conv);
2704 assert(!ret->_underlying_ref);
2705 ret->_underlying_ref = true;
2709 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2710 LDKChannelMonitor this_ptr_conv = *(LDKChannelMonitor*)this_ptr;
2711 free((void*)this_ptr);
2712 this_ptr_conv._underlying_ref = false;
2713 return ChannelMonitor_free(this_ptr_conv);
2716 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ManyChannelMonitor_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2717 LDKManyChannelMonitor this_ptr_conv = *(LDKManyChannelMonitor*)this_ptr;
2718 free((void*)this_ptr);
2719 return ManyChannelMonitor_free(this_ptr_conv);
2722 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1update_1monitor(JNIEnv * _env, jclass _b, jlong this_arg, jlong updates, jlong broadcaster, jlong logger) {
2723 LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg;
2724 LDKChannelMonitorUpdate updates_conv = *(LDKChannelMonitorUpdate*)updates;
2725 free((void*)updates);
2726 updates_conv._underlying_ref = false;
2727 LDKBroadcasterInterface* broadcaster_conv = (LDKBroadcasterInterface*)broadcaster;
2728 LDKLogger* logger_conv = (LDKLogger*)logger;
2729 LDKCResult_NoneMonitorUpdateErrorZ* ret = malloc(sizeof(LDKCResult_NoneMonitorUpdateErrorZ));
2730 *ret = ChannelMonitor_update_monitor(this_arg_conv, updates_conv, broadcaster_conv, logger_conv);
2734 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1latest_1update_1id(JNIEnv * _env, jclass _b, jlong this_arg) {
2735 LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg;
2736 return ChannelMonitor_get_latest_update_id(this_arg_conv);
2739 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1funding_1txo(JNIEnv * _env, jclass _b, jlong this_arg) {
2740 LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg;
2741 LDKC2Tuple_OutPointScriptZ* ret = malloc(sizeof(LDKC2Tuple_OutPointScriptZ));
2742 *ret = ChannelMonitor_get_funding_txo(this_arg_conv);
2746 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1and_1clear_1pending_1monitor_1events(JNIEnv * _env, jclass _b, jlong this_arg) {
2747 LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg;
2748 LDKCVec_MonitorEventZ* ret = malloc(sizeof(LDKCVec_MonitorEventZ));
2749 *ret = ChannelMonitor_get_and_clear_pending_monitor_events(this_arg_conv);
2753 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1and_1clear_1pending_1events(JNIEnv * _env, jclass _b, jlong this_arg) {
2754 LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg;
2755 LDKCVec_EventZ* ret = malloc(sizeof(LDKCVec_EventZ));
2756 *ret = ChannelMonitor_get_and_clear_pending_events(this_arg_conv);
2760 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1latest_1local_1commitment_1txn(JNIEnv * _env, jclass _b, jlong this_arg, jlong logger) {
2761 LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg;
2762 LDKLogger* logger_conv = (LDKLogger*)logger;
2763 LDKCVec_TransactionZ* ret = malloc(sizeof(LDKCVec_TransactionZ));
2764 *ret = ChannelMonitor_get_latest_local_commitment_txn(this_arg_conv, logger_conv);
2768 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DecodeError_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2769 LDKDecodeError this_ptr_conv = *(LDKDecodeError*)this_ptr;
2770 free((void*)this_ptr);
2771 this_ptr_conv._underlying_ref = false;
2772 return DecodeError_free(this_ptr_conv);
2775 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Init_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2776 LDKInit this_ptr_conv = *(LDKInit*)this_ptr;
2777 free((void*)this_ptr);
2778 this_ptr_conv._underlying_ref = false;
2779 return Init_free(this_ptr_conv);
2782 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2783 LDKErrorMessage this_ptr_conv = *(LDKErrorMessage*)this_ptr;
2784 free((void*)this_ptr);
2785 this_ptr_conv._underlying_ref = false;
2786 return ErrorMessage_free(this_ptr_conv);
2789 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
2790 LDKErrorMessage* this_ptr_conv = (LDKErrorMessage*)this_ptr;
2791 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
2792 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *ErrorMessage_get_channel_id(this_ptr_conv));
2796 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2797 LDKErrorMessage* this_ptr_conv = (LDKErrorMessage*)this_ptr;
2798 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
2800 return ErrorMessage_set_channel_id(this_ptr_conv, val_conv);
2803 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1get_1data(JNIEnv * _env, jclass _b, jlong this_ptr) {
2804 LDKErrorMessage* this_ptr_conv = (LDKErrorMessage*)this_ptr;
2805 LDKStr* ret = malloc(sizeof(LDKStr));
2806 *ret = ErrorMessage_get_data(this_ptr_conv);
2810 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1set_1data(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2811 LDKErrorMessage* this_ptr_conv = (LDKErrorMessage*)this_ptr;
2812 LDKCVec_u8Z val_conv = *(LDKCVec_u8Z*)val;
2814 return ErrorMessage_set_data(this_ptr_conv, val_conv);
2817 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1new(JNIEnv * _env, jclass _b, jlong channel_id_arg, jlong data_arg) {
2818 LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
2819 free((void*)channel_id_arg);
2820 LDKCVec_u8Z data_arg_conv = *(LDKCVec_u8Z*)data_arg;
2821 free((void*)data_arg);
2822 LDKErrorMessage* ret = malloc(sizeof(LDKErrorMessage));
2823 *ret = ErrorMessage_new(channel_id_arg_conv, data_arg_conv);
2824 assert(!ret->_underlying_ref);
2825 ret->_underlying_ref = true;
2829 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Ping_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2830 LDKPing this_ptr_conv = *(LDKPing*)this_ptr;
2831 free((void*)this_ptr);
2832 this_ptr_conv._underlying_ref = false;
2833 return Ping_free(this_ptr_conv);
2836 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_Ping_1get_1ponglen(JNIEnv * _env, jclass _b, jlong this_ptr) {
2837 LDKPing* this_ptr_conv = (LDKPing*)this_ptr;
2838 return Ping_get_ponglen(this_ptr_conv);
2841 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Ping_1set_1ponglen(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
2842 LDKPing* this_ptr_conv = (LDKPing*)this_ptr;
2843 return Ping_set_ponglen(this_ptr_conv, val);
2846 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_Ping_1get_1byteslen(JNIEnv * _env, jclass _b, jlong this_ptr) {
2847 LDKPing* this_ptr_conv = (LDKPing*)this_ptr;
2848 return Ping_get_byteslen(this_ptr_conv);
2851 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Ping_1set_1byteslen(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
2852 LDKPing* this_ptr_conv = (LDKPing*)this_ptr;
2853 return Ping_set_byteslen(this_ptr_conv, val);
2856 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Ping_1new(JNIEnv * _env, jclass _b, jshort ponglen_arg, jshort byteslen_arg) {
2857 LDKPing* ret = malloc(sizeof(LDKPing));
2858 *ret = Ping_new(ponglen_arg, byteslen_arg);
2859 assert(!ret->_underlying_ref);
2860 ret->_underlying_ref = true;
2864 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Pong_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2865 LDKPong this_ptr_conv = *(LDKPong*)this_ptr;
2866 free((void*)this_ptr);
2867 this_ptr_conv._underlying_ref = false;
2868 return Pong_free(this_ptr_conv);
2871 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_Pong_1get_1byteslen(JNIEnv * _env, jclass _b, jlong this_ptr) {
2872 LDKPong* this_ptr_conv = (LDKPong*)this_ptr;
2873 return Pong_get_byteslen(this_ptr_conv);
2876 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Pong_1set_1byteslen(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
2877 LDKPong* this_ptr_conv = (LDKPong*)this_ptr;
2878 return Pong_set_byteslen(this_ptr_conv, val);
2881 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Pong_1new(JNIEnv * _env, jclass _b, jshort byteslen_arg) {
2882 LDKPong* ret = malloc(sizeof(LDKPong));
2883 *ret = Pong_new(byteslen_arg);
2884 assert(!ret->_underlying_ref);
2885 ret->_underlying_ref = true;
2889 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2890 LDKOpenChannel this_ptr_conv = *(LDKOpenChannel*)this_ptr;
2891 free((void*)this_ptr);
2892 this_ptr_conv._underlying_ref = false;
2893 return OpenChannel_free(this_ptr_conv);
2896 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr) {
2897 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2898 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
2899 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *OpenChannel_get_chain_hash(this_ptr_conv));
2903 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2904 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2905 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
2907 return OpenChannel_set_chain_hash(this_ptr_conv, val_conv);
2910 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1temporary_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
2911 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2912 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
2913 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *OpenChannel_get_temporary_channel_id(this_ptr_conv));
2917 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1temporary_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2918 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2919 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
2921 return OpenChannel_set_temporary_channel_id(this_ptr_conv, val_conv);
2924 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1funding_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
2925 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2926 return OpenChannel_get_funding_satoshis(this_ptr_conv);
2929 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1funding_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2930 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2931 return OpenChannel_set_funding_satoshis(this_ptr_conv, val);
2934 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1push_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
2935 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2936 return OpenChannel_get_push_msat(this_ptr_conv);
2939 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1push_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2940 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2941 return OpenChannel_set_push_msat(this_ptr_conv, val);
2944 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1dust_1limit_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
2945 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2946 return OpenChannel_get_dust_limit_satoshis(this_ptr_conv);
2949 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1dust_1limit_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2950 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2951 return OpenChannel_set_dust_limit_satoshis(this_ptr_conv, val);
2954 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
2955 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2956 return OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr_conv);
2959 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) {
2960 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2961 return OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr_conv, val);
2964 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1reserve_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
2965 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2966 return OpenChannel_get_channel_reserve_satoshis(this_ptr_conv);
2969 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1reserve_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2970 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2971 return OpenChannel_set_channel_reserve_satoshis(this_ptr_conv, val);
2974 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
2975 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2976 return OpenChannel_get_htlc_minimum_msat(this_ptr_conv);
2979 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2980 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2981 return OpenChannel_set_htlc_minimum_msat(this_ptr_conv, val);
2984 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1feerate_1per_1kw(JNIEnv * _env, jclass _b, jlong this_ptr) {
2985 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2986 return OpenChannel_get_feerate_per_kw(this_ptr_conv);
2989 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1feerate_1per_1kw(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
2990 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2991 return OpenChannel_set_feerate_per_kw(this_ptr_conv, val);
2994 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_ptr) {
2995 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2996 return OpenChannel_get_to_self_delay(this_ptr_conv);
2999 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
3000 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3001 return OpenChannel_set_to_self_delay(this_ptr_conv, val);
3004 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1max_1accepted_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr) {
3005 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3006 return OpenChannel_get_max_accepted_htlcs(this_ptr_conv);
3009 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1max_1accepted_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
3010 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3011 return OpenChannel_set_max_accepted_htlcs(this_ptr_conv, val);
3014 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1funding_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr) {
3015 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3016 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3017 *ret = OpenChannel_get_funding_pubkey(this_ptr_conv);
3021 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1funding_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3022 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3023 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3025 return OpenChannel_set_funding_pubkey(this_ptr_conv, val_conv);
3028 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1revocation_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr) {
3029 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3030 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3031 *ret = OpenChannel_get_revocation_basepoint(this_ptr_conv);
3035 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1revocation_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3036 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3037 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3039 return OpenChannel_set_revocation_basepoint(this_ptr_conv, val_conv);
3042 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1payment_1point(JNIEnv * _env, jclass _b, jlong this_ptr) {
3043 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3044 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3045 *ret = OpenChannel_get_payment_point(this_ptr_conv);
3049 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1payment_1point(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3050 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3051 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3053 return OpenChannel_set_payment_point(this_ptr_conv, val_conv);
3056 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1delayed_1payment_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr) {
3057 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3058 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3059 *ret = OpenChannel_get_delayed_payment_basepoint(this_ptr_conv);
3063 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1delayed_1payment_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3064 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3065 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3067 return OpenChannel_set_delayed_payment_basepoint(this_ptr_conv, val_conv);
3070 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1htlc_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr) {
3071 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3072 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3073 *ret = OpenChannel_get_htlc_basepoint(this_ptr_conv);
3077 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1htlc_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3078 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3079 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3081 return OpenChannel_set_htlc_basepoint(this_ptr_conv, val_conv);
3084 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1first_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr) {
3085 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3086 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3087 *ret = OpenChannel_get_first_per_commitment_point(this_ptr_conv);
3091 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1first_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3092 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3093 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3095 return OpenChannel_set_first_per_commitment_point(this_ptr_conv, val_conv);
3098 JNIEXPORT jbyte JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1flags(JNIEnv * _env, jclass _b, jlong this_ptr) {
3099 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3100 return OpenChannel_get_channel_flags(this_ptr_conv);
3103 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1flags(JNIEnv * _env, jclass _b, jlong this_ptr, jbyte val) {
3104 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3105 return OpenChannel_set_channel_flags(this_ptr_conv, val);
3108 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3109 LDKAcceptChannel this_ptr_conv = *(LDKAcceptChannel*)this_ptr;
3110 free((void*)this_ptr);
3111 this_ptr_conv._underlying_ref = false;
3112 return AcceptChannel_free(this_ptr_conv);
3115 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1temporary_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3116 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3117 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3118 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *AcceptChannel_get_temporary_channel_id(this_ptr_conv));
3122 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1temporary_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3123 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3124 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3126 return AcceptChannel_set_temporary_channel_id(this_ptr_conv, val_conv);
3129 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1dust_1limit_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
3130 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3131 return AcceptChannel_get_dust_limit_satoshis(this_ptr_conv);
3134 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1dust_1limit_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3135 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3136 return AcceptChannel_set_dust_limit_satoshis(this_ptr_conv, val);
3139 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
3140 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3141 return AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr_conv);
3144 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) {
3145 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3146 return AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr_conv, val);
3149 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1channel_1reserve_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
3150 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3151 return AcceptChannel_get_channel_reserve_satoshis(this_ptr_conv);
3154 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1channel_1reserve_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3155 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3156 return AcceptChannel_set_channel_reserve_satoshis(this_ptr_conv, val);
3159 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
3160 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3161 return AcceptChannel_get_htlc_minimum_msat(this_ptr_conv);
3164 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3165 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3166 return AcceptChannel_set_htlc_minimum_msat(this_ptr_conv, val);
3169 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1minimum_1depth(JNIEnv * _env, jclass _b, jlong this_ptr) {
3170 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3171 return AcceptChannel_get_minimum_depth(this_ptr_conv);
3174 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1minimum_1depth(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
3175 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3176 return AcceptChannel_set_minimum_depth(this_ptr_conv, val);
3179 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_ptr) {
3180 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3181 return AcceptChannel_get_to_self_delay(this_ptr_conv);
3184 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
3185 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3186 return AcceptChannel_set_to_self_delay(this_ptr_conv, val);
3189 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1max_1accepted_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr) {
3190 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3191 return AcceptChannel_get_max_accepted_htlcs(this_ptr_conv);
3194 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1max_1accepted_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
3195 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3196 return AcceptChannel_set_max_accepted_htlcs(this_ptr_conv, val);
3199 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1funding_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr) {
3200 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3201 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3202 *ret = AcceptChannel_get_funding_pubkey(this_ptr_conv);
3206 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1funding_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3207 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3208 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3210 return AcceptChannel_set_funding_pubkey(this_ptr_conv, val_conv);
3213 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1revocation_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr) {
3214 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3215 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3216 *ret = AcceptChannel_get_revocation_basepoint(this_ptr_conv);
3220 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1revocation_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3221 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3222 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3224 return AcceptChannel_set_revocation_basepoint(this_ptr_conv, val_conv);
3227 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1payment_1point(JNIEnv * _env, jclass _b, jlong this_ptr) {
3228 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3229 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3230 *ret = AcceptChannel_get_payment_point(this_ptr_conv);
3234 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1payment_1point(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3235 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3236 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3238 return AcceptChannel_set_payment_point(this_ptr_conv, val_conv);
3241 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1delayed_1payment_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr) {
3242 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3243 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3244 *ret = AcceptChannel_get_delayed_payment_basepoint(this_ptr_conv);
3248 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1delayed_1payment_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3249 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3250 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3252 return AcceptChannel_set_delayed_payment_basepoint(this_ptr_conv, val_conv);
3255 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1htlc_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr) {
3256 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3257 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3258 *ret = AcceptChannel_get_htlc_basepoint(this_ptr_conv);
3262 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1htlc_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3263 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3264 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3266 return AcceptChannel_set_htlc_basepoint(this_ptr_conv, val_conv);
3269 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1first_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr) {
3270 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3271 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3272 *ret = AcceptChannel_get_first_per_commitment_point(this_ptr_conv);
3276 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1first_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3277 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3278 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3280 return AcceptChannel_set_first_per_commitment_point(this_ptr_conv, val_conv);
3283 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3284 LDKFundingCreated this_ptr_conv = *(LDKFundingCreated*)this_ptr;
3285 free((void*)this_ptr);
3286 this_ptr_conv._underlying_ref = false;
3287 return FundingCreated_free(this_ptr_conv);
3290 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1temporary_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3291 LDKFundingCreated* this_ptr_conv = (LDKFundingCreated*)this_ptr;
3292 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3293 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *FundingCreated_get_temporary_channel_id(this_ptr_conv));
3297 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1temporary_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3298 LDKFundingCreated* this_ptr_conv = (LDKFundingCreated*)this_ptr;
3299 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3301 return FundingCreated_set_temporary_channel_id(this_ptr_conv, val_conv);
3304 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1funding_1txid(JNIEnv * _env, jclass _b, jlong this_ptr) {
3305 LDKFundingCreated* this_ptr_conv = (LDKFundingCreated*)this_ptr;
3306 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3307 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *FundingCreated_get_funding_txid(this_ptr_conv));
3311 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1funding_1txid(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3312 LDKFundingCreated* this_ptr_conv = (LDKFundingCreated*)this_ptr;
3313 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3315 return FundingCreated_set_funding_txid(this_ptr_conv, val_conv);
3318 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1funding_1output_1index(JNIEnv * _env, jclass _b, jlong this_ptr) {
3319 LDKFundingCreated* this_ptr_conv = (LDKFundingCreated*)this_ptr;
3320 return FundingCreated_get_funding_output_index(this_ptr_conv);
3323 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1funding_1output_1index(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
3324 LDKFundingCreated* this_ptr_conv = (LDKFundingCreated*)this_ptr;
3325 return FundingCreated_set_funding_output_index(this_ptr_conv, val);
3328 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1signature(JNIEnv * _env, jclass _b, jlong this_ptr) {
3329 LDKFundingCreated* this_ptr_conv = (LDKFundingCreated*)this_ptr;
3330 LDKSignature* ret = malloc(sizeof(LDKSignature));
3331 *ret = FundingCreated_get_signature(this_ptr_conv);
3335 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1signature(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3336 LDKFundingCreated* this_ptr_conv = (LDKFundingCreated*)this_ptr;
3337 LDKSignature val_conv = *(LDKSignature*)val;
3339 return FundingCreated_set_signature(this_ptr_conv, val_conv);
3342 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingCreated_1new(JNIEnv * _env, jclass _b, jlong temporary_channel_id_arg, jlong funding_txid_arg, jshort funding_output_index_arg, jlong signature_arg) {
3343 LDKThirtyTwoBytes temporary_channel_id_arg_conv = *(LDKThirtyTwoBytes*)temporary_channel_id_arg;
3344 free((void*)temporary_channel_id_arg);
3345 LDKThirtyTwoBytes funding_txid_arg_conv = *(LDKThirtyTwoBytes*)funding_txid_arg;
3346 free((void*)funding_txid_arg);
3347 LDKSignature signature_arg_conv = *(LDKSignature*)signature_arg;
3348 free((void*)signature_arg);
3349 LDKFundingCreated* ret = malloc(sizeof(LDKFundingCreated));
3350 *ret = FundingCreated_new(temporary_channel_id_arg_conv, funding_txid_arg_conv, funding_output_index_arg, signature_arg_conv);
3351 assert(!ret->_underlying_ref);
3352 ret->_underlying_ref = true;
3356 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3357 LDKFundingSigned this_ptr_conv = *(LDKFundingSigned*)this_ptr;
3358 free((void*)this_ptr);
3359 this_ptr_conv._underlying_ref = false;
3360 return FundingSigned_free(this_ptr_conv);
3363 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_FundingSigned_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3364 LDKFundingSigned* this_ptr_conv = (LDKFundingSigned*)this_ptr;
3365 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3366 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *FundingSigned_get_channel_id(this_ptr_conv));
3370 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3371 LDKFundingSigned* this_ptr_conv = (LDKFundingSigned*)this_ptr;
3372 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3374 return FundingSigned_set_channel_id(this_ptr_conv, val_conv);
3377 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingSigned_1get_1signature(JNIEnv * _env, jclass _b, jlong this_ptr) {
3378 LDKFundingSigned* this_ptr_conv = (LDKFundingSigned*)this_ptr;
3379 LDKSignature* ret = malloc(sizeof(LDKSignature));
3380 *ret = FundingSigned_get_signature(this_ptr_conv);
3384 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1set_1signature(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3385 LDKFundingSigned* this_ptr_conv = (LDKFundingSigned*)this_ptr;
3386 LDKSignature val_conv = *(LDKSignature*)val;
3388 return FundingSigned_set_signature(this_ptr_conv, val_conv);
3391 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingSigned_1new(JNIEnv * _env, jclass _b, jlong channel_id_arg, jlong signature_arg) {
3392 LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
3393 free((void*)channel_id_arg);
3394 LDKSignature signature_arg_conv = *(LDKSignature*)signature_arg;
3395 free((void*)signature_arg);
3396 LDKFundingSigned* ret = malloc(sizeof(LDKFundingSigned));
3397 *ret = FundingSigned_new(channel_id_arg_conv, signature_arg_conv);
3398 assert(!ret->_underlying_ref);
3399 ret->_underlying_ref = true;
3403 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingLocked_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3404 LDKFundingLocked this_ptr_conv = *(LDKFundingLocked*)this_ptr;
3405 free((void*)this_ptr);
3406 this_ptr_conv._underlying_ref = false;
3407 return FundingLocked_free(this_ptr_conv);
3410 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_FundingLocked_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3411 LDKFundingLocked* this_ptr_conv = (LDKFundingLocked*)this_ptr;
3412 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3413 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *FundingLocked_get_channel_id(this_ptr_conv));
3417 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingLocked_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3418 LDKFundingLocked* this_ptr_conv = (LDKFundingLocked*)this_ptr;
3419 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3421 return FundingLocked_set_channel_id(this_ptr_conv, val_conv);
3424 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingLocked_1get_1next_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr) {
3425 LDKFundingLocked* this_ptr_conv = (LDKFundingLocked*)this_ptr;
3426 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3427 *ret = FundingLocked_get_next_per_commitment_point(this_ptr_conv);
3431 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingLocked_1set_1next_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3432 LDKFundingLocked* this_ptr_conv = (LDKFundingLocked*)this_ptr;
3433 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3435 return FundingLocked_set_next_per_commitment_point(this_ptr_conv, val_conv);
3438 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingLocked_1new(JNIEnv * _env, jclass _b, jlong channel_id_arg, jlong next_per_commitment_point_arg) {
3439 LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
3440 free((void*)channel_id_arg);
3441 LDKPublicKey next_per_commitment_point_arg_conv = *(LDKPublicKey*)next_per_commitment_point_arg;
3442 free((void*)next_per_commitment_point_arg);
3443 LDKFundingLocked* ret = malloc(sizeof(LDKFundingLocked));
3444 *ret = FundingLocked_new(channel_id_arg_conv, next_per_commitment_point_arg_conv);
3445 assert(!ret->_underlying_ref);
3446 ret->_underlying_ref = true;
3450 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3451 LDKShutdown this_ptr_conv = *(LDKShutdown*)this_ptr;
3452 free((void*)this_ptr);
3453 this_ptr_conv._underlying_ref = false;
3454 return Shutdown_free(this_ptr_conv);
3457 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Shutdown_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3458 LDKShutdown* this_ptr_conv = (LDKShutdown*)this_ptr;
3459 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3460 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *Shutdown_get_channel_id(this_ptr_conv));
3464 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3465 LDKShutdown* this_ptr_conv = (LDKShutdown*)this_ptr;
3466 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3468 return Shutdown_set_channel_id(this_ptr_conv, val_conv);
3471 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Shutdown_1get_1scriptpubkey(JNIEnv * _env, jclass _b, jlong this_ptr) {
3472 LDKShutdown* this_ptr_conv = (LDKShutdown*)this_ptr;
3473 LDKu8slice* ret = malloc(sizeof(LDKu8slice));
3474 *ret = Shutdown_get_scriptpubkey(this_ptr_conv);
3478 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1set_1scriptpubkey(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3479 LDKShutdown* this_ptr_conv = (LDKShutdown*)this_ptr;
3480 LDKCVec_u8Z val_conv = *(LDKCVec_u8Z*)val;
3482 return Shutdown_set_scriptpubkey(this_ptr_conv, val_conv);
3485 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Shutdown_1new(JNIEnv * _env, jclass _b, jlong channel_id_arg, jlong scriptpubkey_arg) {
3486 LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
3487 free((void*)channel_id_arg);
3488 LDKCVec_u8Z scriptpubkey_arg_conv = *(LDKCVec_u8Z*)scriptpubkey_arg;
3489 free((void*)scriptpubkey_arg);
3490 LDKShutdown* ret = malloc(sizeof(LDKShutdown));
3491 *ret = Shutdown_new(channel_id_arg_conv, scriptpubkey_arg_conv);
3492 assert(!ret->_underlying_ref);
3493 ret->_underlying_ref = true;
3497 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3498 LDKClosingSigned this_ptr_conv = *(LDKClosingSigned*)this_ptr;
3499 free((void*)this_ptr);
3500 this_ptr_conv._underlying_ref = false;
3501 return ClosingSigned_free(this_ptr_conv);
3504 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3505 LDKClosingSigned* this_ptr_conv = (LDKClosingSigned*)this_ptr;
3506 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3507 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *ClosingSigned_get_channel_id(this_ptr_conv));
3511 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3512 LDKClosingSigned* this_ptr_conv = (LDKClosingSigned*)this_ptr;
3513 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3515 return ClosingSigned_set_channel_id(this_ptr_conv, val_conv);
3518 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1get_1fee_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
3519 LDKClosingSigned* this_ptr_conv = (LDKClosingSigned*)this_ptr;
3520 return ClosingSigned_get_fee_satoshis(this_ptr_conv);
3523 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1set_1fee_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3524 LDKClosingSigned* this_ptr_conv = (LDKClosingSigned*)this_ptr;
3525 return ClosingSigned_set_fee_satoshis(this_ptr_conv, val);
3528 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1get_1signature(JNIEnv * _env, jclass _b, jlong this_ptr) {
3529 LDKClosingSigned* this_ptr_conv = (LDKClosingSigned*)this_ptr;
3530 LDKSignature* ret = malloc(sizeof(LDKSignature));
3531 *ret = ClosingSigned_get_signature(this_ptr_conv);
3535 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1set_1signature(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3536 LDKClosingSigned* this_ptr_conv = (LDKClosingSigned*)this_ptr;
3537 LDKSignature val_conv = *(LDKSignature*)val;
3539 return ClosingSigned_set_signature(this_ptr_conv, val_conv);
3542 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) {
3543 LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
3544 free((void*)channel_id_arg);
3545 LDKSignature signature_arg_conv = *(LDKSignature*)signature_arg;
3546 free((void*)signature_arg);
3547 LDKClosingSigned* ret = malloc(sizeof(LDKClosingSigned));
3548 *ret = ClosingSigned_new(channel_id_arg_conv, fee_satoshis_arg, signature_arg_conv);
3549 assert(!ret->_underlying_ref);
3550 ret->_underlying_ref = true;
3554 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3555 LDKUpdateAddHTLC this_ptr_conv = *(LDKUpdateAddHTLC*)this_ptr;
3556 free((void*)this_ptr);
3557 this_ptr_conv._underlying_ref = false;
3558 return UpdateAddHTLC_free(this_ptr_conv);
3561 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3562 LDKUpdateAddHTLC* this_ptr_conv = (LDKUpdateAddHTLC*)this_ptr;
3563 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3564 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *UpdateAddHTLC_get_channel_id(this_ptr_conv));
3568 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3569 LDKUpdateAddHTLC* this_ptr_conv = (LDKUpdateAddHTLC*)this_ptr;
3570 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3572 return UpdateAddHTLC_set_channel_id(this_ptr_conv, val_conv);
3575 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1htlc_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3576 LDKUpdateAddHTLC* this_ptr_conv = (LDKUpdateAddHTLC*)this_ptr;
3577 return UpdateAddHTLC_get_htlc_id(this_ptr_conv);
3580 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1htlc_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3581 LDKUpdateAddHTLC* this_ptr_conv = (LDKUpdateAddHTLC*)this_ptr;
3582 return UpdateAddHTLC_set_htlc_id(this_ptr_conv, val);
3585 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1amount_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
3586 LDKUpdateAddHTLC* this_ptr_conv = (LDKUpdateAddHTLC*)this_ptr;
3587 return UpdateAddHTLC_get_amount_msat(this_ptr_conv);
3590 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1amount_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3591 LDKUpdateAddHTLC* this_ptr_conv = (LDKUpdateAddHTLC*)this_ptr;
3592 return UpdateAddHTLC_set_amount_msat(this_ptr_conv, val);
3595 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1payment_1hash(JNIEnv * _env, jclass _b, jlong this_ptr) {
3596 LDKUpdateAddHTLC* this_ptr_conv = (LDKUpdateAddHTLC*)this_ptr;
3597 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3598 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *UpdateAddHTLC_get_payment_hash(this_ptr_conv));
3602 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1payment_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3603 LDKUpdateAddHTLC* this_ptr_conv = (LDKUpdateAddHTLC*)this_ptr;
3604 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3606 return UpdateAddHTLC_set_payment_hash(this_ptr_conv, val_conv);
3609 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1cltv_1expiry(JNIEnv * _env, jclass _b, jlong this_ptr) {
3610 LDKUpdateAddHTLC* this_ptr_conv = (LDKUpdateAddHTLC*)this_ptr;
3611 return UpdateAddHTLC_get_cltv_expiry(this_ptr_conv);
3614 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1cltv_1expiry(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
3615 LDKUpdateAddHTLC* this_ptr_conv = (LDKUpdateAddHTLC*)this_ptr;
3616 return UpdateAddHTLC_set_cltv_expiry(this_ptr_conv, val);
3619 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3620 LDKUpdateFulfillHTLC this_ptr_conv = *(LDKUpdateFulfillHTLC*)this_ptr;
3621 free((void*)this_ptr);
3622 this_ptr_conv._underlying_ref = false;
3623 return UpdateFulfillHTLC_free(this_ptr_conv);
3626 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3627 LDKUpdateFulfillHTLC* this_ptr_conv = (LDKUpdateFulfillHTLC*)this_ptr;
3628 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3629 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *UpdateFulfillHTLC_get_channel_id(this_ptr_conv));
3633 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3634 LDKUpdateFulfillHTLC* this_ptr_conv = (LDKUpdateFulfillHTLC*)this_ptr;
3635 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3637 return UpdateFulfillHTLC_set_channel_id(this_ptr_conv, val_conv);
3640 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1get_1htlc_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3641 LDKUpdateFulfillHTLC* this_ptr_conv = (LDKUpdateFulfillHTLC*)this_ptr;
3642 return UpdateFulfillHTLC_get_htlc_id(this_ptr_conv);
3645 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1set_1htlc_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3646 LDKUpdateFulfillHTLC* this_ptr_conv = (LDKUpdateFulfillHTLC*)this_ptr;
3647 return UpdateFulfillHTLC_set_htlc_id(this_ptr_conv, val);
3650 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1get_1payment_1preimage(JNIEnv * _env, jclass _b, jlong this_ptr) {
3651 LDKUpdateFulfillHTLC* this_ptr_conv = (LDKUpdateFulfillHTLC*)this_ptr;
3652 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3653 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *UpdateFulfillHTLC_get_payment_preimage(this_ptr_conv));
3657 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1set_1payment_1preimage(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3658 LDKUpdateFulfillHTLC* this_ptr_conv = (LDKUpdateFulfillHTLC*)this_ptr;
3659 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3661 return UpdateFulfillHTLC_set_payment_preimage(this_ptr_conv, val_conv);
3664 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) {
3665 LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
3666 free((void*)channel_id_arg);
3667 LDKThirtyTwoBytes payment_preimage_arg_conv = *(LDKThirtyTwoBytes*)payment_preimage_arg;
3668 free((void*)payment_preimage_arg);
3669 LDKUpdateFulfillHTLC* ret = malloc(sizeof(LDKUpdateFulfillHTLC));
3670 *ret = UpdateFulfillHTLC_new(channel_id_arg_conv, htlc_id_arg, payment_preimage_arg_conv);
3671 assert(!ret->_underlying_ref);
3672 ret->_underlying_ref = true;
3676 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3677 LDKUpdateFailHTLC this_ptr_conv = *(LDKUpdateFailHTLC*)this_ptr;
3678 free((void*)this_ptr);
3679 this_ptr_conv._underlying_ref = false;
3680 return UpdateFailHTLC_free(this_ptr_conv);
3683 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3684 LDKUpdateFailHTLC* this_ptr_conv = (LDKUpdateFailHTLC*)this_ptr;
3685 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3686 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *UpdateFailHTLC_get_channel_id(this_ptr_conv));
3690 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3691 LDKUpdateFailHTLC* this_ptr_conv = (LDKUpdateFailHTLC*)this_ptr;
3692 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3694 return UpdateFailHTLC_set_channel_id(this_ptr_conv, val_conv);
3697 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1get_1htlc_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3698 LDKUpdateFailHTLC* this_ptr_conv = (LDKUpdateFailHTLC*)this_ptr;
3699 return UpdateFailHTLC_get_htlc_id(this_ptr_conv);
3702 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1set_1htlc_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3703 LDKUpdateFailHTLC* this_ptr_conv = (LDKUpdateFailHTLC*)this_ptr;
3704 return UpdateFailHTLC_set_htlc_id(this_ptr_conv, val);
3707 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3708 LDKUpdateFailMalformedHTLC this_ptr_conv = *(LDKUpdateFailMalformedHTLC*)this_ptr;
3709 free((void*)this_ptr);
3710 this_ptr_conv._underlying_ref = false;
3711 return UpdateFailMalformedHTLC_free(this_ptr_conv);
3714 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3715 LDKUpdateFailMalformedHTLC* this_ptr_conv = (LDKUpdateFailMalformedHTLC*)this_ptr;
3716 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3717 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *UpdateFailMalformedHTLC_get_channel_id(this_ptr_conv));
3721 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3722 LDKUpdateFailMalformedHTLC* this_ptr_conv = (LDKUpdateFailMalformedHTLC*)this_ptr;
3723 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3725 return UpdateFailMalformedHTLC_set_channel_id(this_ptr_conv, val_conv);
3728 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1get_1htlc_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3729 LDKUpdateFailMalformedHTLC* this_ptr_conv = (LDKUpdateFailMalformedHTLC*)this_ptr;
3730 return UpdateFailMalformedHTLC_get_htlc_id(this_ptr_conv);
3733 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1set_1htlc_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3734 LDKUpdateFailMalformedHTLC* this_ptr_conv = (LDKUpdateFailMalformedHTLC*)this_ptr;
3735 return UpdateFailMalformedHTLC_set_htlc_id(this_ptr_conv, val);
3738 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1get_1failure_1code(JNIEnv * _env, jclass _b, jlong this_ptr) {
3739 LDKUpdateFailMalformedHTLC* this_ptr_conv = (LDKUpdateFailMalformedHTLC*)this_ptr;
3740 return UpdateFailMalformedHTLC_get_failure_code(this_ptr_conv);
3743 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1set_1failure_1code(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
3744 LDKUpdateFailMalformedHTLC* this_ptr_conv = (LDKUpdateFailMalformedHTLC*)this_ptr;
3745 return UpdateFailMalformedHTLC_set_failure_code(this_ptr_conv, val);
3748 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3749 LDKCommitmentSigned this_ptr_conv = *(LDKCommitmentSigned*)this_ptr;
3750 free((void*)this_ptr);
3751 this_ptr_conv._underlying_ref = false;
3752 return CommitmentSigned_free(this_ptr_conv);
3755 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3756 LDKCommitmentSigned* this_ptr_conv = (LDKCommitmentSigned*)this_ptr;
3757 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3758 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *CommitmentSigned_get_channel_id(this_ptr_conv));
3762 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3763 LDKCommitmentSigned* this_ptr_conv = (LDKCommitmentSigned*)this_ptr;
3764 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3766 return CommitmentSigned_set_channel_id(this_ptr_conv, val_conv);
3769 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1get_1signature(JNIEnv * _env, jclass _b, jlong this_ptr) {
3770 LDKCommitmentSigned* this_ptr_conv = (LDKCommitmentSigned*)this_ptr;
3771 LDKSignature* ret = malloc(sizeof(LDKSignature));
3772 *ret = CommitmentSigned_get_signature(this_ptr_conv);
3776 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1set_1signature(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3777 LDKCommitmentSigned* this_ptr_conv = (LDKCommitmentSigned*)this_ptr;
3778 LDKSignature val_conv = *(LDKSignature*)val;
3780 return CommitmentSigned_set_signature(this_ptr_conv, val_conv);
3783 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1set_1htlc_1signatures(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3784 LDKCommitmentSigned* this_ptr_conv = (LDKCommitmentSigned*)this_ptr;
3785 LDKCVec_SignatureZ val_conv = *(LDKCVec_SignatureZ*)val;
3787 return CommitmentSigned_set_htlc_signatures(this_ptr_conv, val_conv);
3790 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) {
3791 LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
3792 free((void*)channel_id_arg);
3793 LDKSignature signature_arg_conv = *(LDKSignature*)signature_arg;
3794 free((void*)signature_arg);
3795 LDKCVec_SignatureZ htlc_signatures_arg_conv = *(LDKCVec_SignatureZ*)htlc_signatures_arg;
3796 free((void*)htlc_signatures_arg);
3797 LDKCommitmentSigned* ret = malloc(sizeof(LDKCommitmentSigned));
3798 *ret = CommitmentSigned_new(channel_id_arg_conv, signature_arg_conv, htlc_signatures_arg_conv);
3799 assert(!ret->_underlying_ref);
3800 ret->_underlying_ref = true;
3804 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3805 LDKRevokeAndACK this_ptr_conv = *(LDKRevokeAndACK*)this_ptr;
3806 free((void*)this_ptr);
3807 this_ptr_conv._underlying_ref = false;
3808 return RevokeAndACK_free(this_ptr_conv);
3811 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3812 LDKRevokeAndACK* this_ptr_conv = (LDKRevokeAndACK*)this_ptr;
3813 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3814 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *RevokeAndACK_get_channel_id(this_ptr_conv));
3818 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3819 LDKRevokeAndACK* this_ptr_conv = (LDKRevokeAndACK*)this_ptr;
3820 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3822 return RevokeAndACK_set_channel_id(this_ptr_conv, val_conv);
3825 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1get_1per_1commitment_1secret(JNIEnv * _env, jclass _b, jlong this_ptr) {
3826 LDKRevokeAndACK* this_ptr_conv = (LDKRevokeAndACK*)this_ptr;
3827 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3828 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *RevokeAndACK_get_per_commitment_secret(this_ptr_conv));
3832 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1set_1per_1commitment_1secret(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3833 LDKRevokeAndACK* this_ptr_conv = (LDKRevokeAndACK*)this_ptr;
3834 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3836 return RevokeAndACK_set_per_commitment_secret(this_ptr_conv, val_conv);
3839 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1get_1next_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr) {
3840 LDKRevokeAndACK* this_ptr_conv = (LDKRevokeAndACK*)this_ptr;
3841 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3842 *ret = RevokeAndACK_get_next_per_commitment_point(this_ptr_conv);
3846 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1set_1next_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3847 LDKRevokeAndACK* this_ptr_conv = (LDKRevokeAndACK*)this_ptr;
3848 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3850 return RevokeAndACK_set_next_per_commitment_point(this_ptr_conv, val_conv);
3853 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) {
3854 LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
3855 free((void*)channel_id_arg);
3856 LDKThirtyTwoBytes per_commitment_secret_arg_conv = *(LDKThirtyTwoBytes*)per_commitment_secret_arg;
3857 free((void*)per_commitment_secret_arg);
3858 LDKPublicKey next_per_commitment_point_arg_conv = *(LDKPublicKey*)next_per_commitment_point_arg;
3859 free((void*)next_per_commitment_point_arg);
3860 LDKRevokeAndACK* ret = malloc(sizeof(LDKRevokeAndACK));
3861 *ret = RevokeAndACK_new(channel_id_arg_conv, per_commitment_secret_arg_conv, next_per_commitment_point_arg_conv);
3862 assert(!ret->_underlying_ref);
3863 ret->_underlying_ref = true;
3867 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3868 LDKUpdateFee this_ptr_conv = *(LDKUpdateFee*)this_ptr;
3869 free((void*)this_ptr);
3870 this_ptr_conv._underlying_ref = false;
3871 return UpdateFee_free(this_ptr_conv);
3874 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UpdateFee_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3875 LDKUpdateFee* this_ptr_conv = (LDKUpdateFee*)this_ptr;
3876 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3877 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *UpdateFee_get_channel_id(this_ptr_conv));
3881 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3882 LDKUpdateFee* this_ptr_conv = (LDKUpdateFee*)this_ptr;
3883 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3885 return UpdateFee_set_channel_id(this_ptr_conv, val_conv);
3888 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_UpdateFee_1get_1feerate_1per_1kw(JNIEnv * _env, jclass _b, jlong this_ptr) {
3889 LDKUpdateFee* this_ptr_conv = (LDKUpdateFee*)this_ptr;
3890 return UpdateFee_get_feerate_per_kw(this_ptr_conv);
3893 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1set_1feerate_1per_1kw(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
3894 LDKUpdateFee* this_ptr_conv = (LDKUpdateFee*)this_ptr;
3895 return UpdateFee_set_feerate_per_kw(this_ptr_conv, val);
3898 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFee_1new(JNIEnv * _env, jclass _b, jlong channel_id_arg, jint feerate_per_kw_arg) {
3899 LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
3900 free((void*)channel_id_arg);
3901 LDKUpdateFee* ret = malloc(sizeof(LDKUpdateFee));
3902 *ret = UpdateFee_new(channel_id_arg_conv, feerate_per_kw_arg);
3903 assert(!ret->_underlying_ref);
3904 ret->_underlying_ref = true;
3908 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3909 LDKDataLossProtect this_ptr_conv = *(LDKDataLossProtect*)this_ptr;
3910 free((void*)this_ptr);
3911 this_ptr_conv._underlying_ref = false;
3912 return DataLossProtect_free(this_ptr_conv);
3915 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1get_1your_1last_1per_1commitment_1secret(JNIEnv * _env, jclass _b, jlong this_ptr) {
3916 LDKDataLossProtect* this_ptr_conv = (LDKDataLossProtect*)this_ptr;
3917 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3918 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *DataLossProtect_get_your_last_per_commitment_secret(this_ptr_conv));
3922 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1set_1your_1last_1per_1commitment_1secret(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3923 LDKDataLossProtect* this_ptr_conv = (LDKDataLossProtect*)this_ptr;
3924 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3926 return DataLossProtect_set_your_last_per_commitment_secret(this_ptr_conv, val_conv);
3929 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1get_1my_1current_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr) {
3930 LDKDataLossProtect* this_ptr_conv = (LDKDataLossProtect*)this_ptr;
3931 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3932 *ret = DataLossProtect_get_my_current_per_commitment_point(this_ptr_conv);
3936 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1set_1my_1current_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3937 LDKDataLossProtect* this_ptr_conv = (LDKDataLossProtect*)this_ptr;
3938 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3940 return DataLossProtect_set_my_current_per_commitment_point(this_ptr_conv, val_conv);
3943 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) {
3944 LDKThirtyTwoBytes your_last_per_commitment_secret_arg_conv = *(LDKThirtyTwoBytes*)your_last_per_commitment_secret_arg;
3945 free((void*)your_last_per_commitment_secret_arg);
3946 LDKPublicKey my_current_per_commitment_point_arg_conv = *(LDKPublicKey*)my_current_per_commitment_point_arg;
3947 free((void*)my_current_per_commitment_point_arg);
3948 LDKDataLossProtect* ret = malloc(sizeof(LDKDataLossProtect));
3949 *ret = DataLossProtect_new(your_last_per_commitment_secret_arg_conv, my_current_per_commitment_point_arg_conv);
3950 assert(!ret->_underlying_ref);
3951 ret->_underlying_ref = true;
3955 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3956 LDKChannelReestablish this_ptr_conv = *(LDKChannelReestablish*)this_ptr;
3957 free((void*)this_ptr);
3958 this_ptr_conv._underlying_ref = false;
3959 return ChannelReestablish_free(this_ptr_conv);
3962 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3963 LDKChannelReestablish* this_ptr_conv = (LDKChannelReestablish*)this_ptr;
3964 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3965 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *ChannelReestablish_get_channel_id(this_ptr_conv));
3969 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3970 LDKChannelReestablish* this_ptr_conv = (LDKChannelReestablish*)this_ptr;
3971 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3973 return ChannelReestablish_set_channel_id(this_ptr_conv, val_conv);
3976 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1get_1next_1local_1commitment_1number(JNIEnv * _env, jclass _b, jlong this_ptr) {
3977 LDKChannelReestablish* this_ptr_conv = (LDKChannelReestablish*)this_ptr;
3978 return ChannelReestablish_get_next_local_commitment_number(this_ptr_conv);
3981 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1set_1next_1local_1commitment_1number(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3982 LDKChannelReestablish* this_ptr_conv = (LDKChannelReestablish*)this_ptr;
3983 return ChannelReestablish_set_next_local_commitment_number(this_ptr_conv, val);
3986 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1get_1next_1remote_1commitment_1number(JNIEnv * _env, jclass _b, jlong this_ptr) {
3987 LDKChannelReestablish* this_ptr_conv = (LDKChannelReestablish*)this_ptr;
3988 return ChannelReestablish_get_next_remote_commitment_number(this_ptr_conv);
3991 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1set_1next_1remote_1commitment_1number(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3992 LDKChannelReestablish* this_ptr_conv = (LDKChannelReestablish*)this_ptr;
3993 return ChannelReestablish_set_next_remote_commitment_number(this_ptr_conv, val);
3996 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3997 LDKAnnouncementSignatures this_ptr_conv = *(LDKAnnouncementSignatures*)this_ptr;
3998 free((void*)this_ptr);
3999 this_ptr_conv._underlying_ref = false;
4000 return AnnouncementSignatures_free(this_ptr_conv);
4003 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
4004 LDKAnnouncementSignatures* this_ptr_conv = (LDKAnnouncementSignatures*)this_ptr;
4005 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
4006 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *AnnouncementSignatures_get_channel_id(this_ptr_conv));
4010 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4011 LDKAnnouncementSignatures* this_ptr_conv = (LDKAnnouncementSignatures*)this_ptr;
4012 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
4014 return AnnouncementSignatures_set_channel_id(this_ptr_conv, val_conv);
4017 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1get_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
4018 LDKAnnouncementSignatures* this_ptr_conv = (LDKAnnouncementSignatures*)this_ptr;
4019 return AnnouncementSignatures_get_short_channel_id(this_ptr_conv);
4022 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4023 LDKAnnouncementSignatures* this_ptr_conv = (LDKAnnouncementSignatures*)this_ptr;
4024 return AnnouncementSignatures_set_short_channel_id(this_ptr_conv, val);
4027 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1get_1node_1signature(JNIEnv * _env, jclass _b, jlong this_ptr) {
4028 LDKAnnouncementSignatures* this_ptr_conv = (LDKAnnouncementSignatures*)this_ptr;
4029 LDKSignature* ret = malloc(sizeof(LDKSignature));
4030 *ret = AnnouncementSignatures_get_node_signature(this_ptr_conv);
4034 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1node_1signature(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4035 LDKAnnouncementSignatures* this_ptr_conv = (LDKAnnouncementSignatures*)this_ptr;
4036 LDKSignature val_conv = *(LDKSignature*)val;
4038 return AnnouncementSignatures_set_node_signature(this_ptr_conv, val_conv);
4041 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1get_1bitcoin_1signature(JNIEnv * _env, jclass _b, jlong this_ptr) {
4042 LDKAnnouncementSignatures* this_ptr_conv = (LDKAnnouncementSignatures*)this_ptr;
4043 LDKSignature* ret = malloc(sizeof(LDKSignature));
4044 *ret = AnnouncementSignatures_get_bitcoin_signature(this_ptr_conv);
4048 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1bitcoin_1signature(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4049 LDKAnnouncementSignatures* this_ptr_conv = (LDKAnnouncementSignatures*)this_ptr;
4050 LDKSignature val_conv = *(LDKSignature*)val;
4052 return AnnouncementSignatures_set_bitcoin_signature(this_ptr_conv, val_conv);
4055 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) {
4056 LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
4057 free((void*)channel_id_arg);
4058 LDKSignature node_signature_arg_conv = *(LDKSignature*)node_signature_arg;
4059 free((void*)node_signature_arg);
4060 LDKSignature bitcoin_signature_arg_conv = *(LDKSignature*)bitcoin_signature_arg;
4061 free((void*)bitcoin_signature_arg);
4062 LDKAnnouncementSignatures* ret = malloc(sizeof(LDKAnnouncementSignatures));
4063 *ret = AnnouncementSignatures_new(channel_id_arg_conv, short_channel_id_arg, node_signature_arg_conv, bitcoin_signature_arg_conv);
4064 assert(!ret->_underlying_ref);
4065 ret->_underlying_ref = true;
4069 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetAddress_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4070 LDKNetAddress this_ptr_conv = *(LDKNetAddress*)this_ptr;
4071 free((void*)this_ptr);
4072 return NetAddress_free(this_ptr_conv);
4075 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4076 LDKUnsignedNodeAnnouncement this_ptr_conv = *(LDKUnsignedNodeAnnouncement*)this_ptr;
4077 free((void*)this_ptr);
4078 this_ptr_conv._underlying_ref = false;
4079 return UnsignedNodeAnnouncement_free(this_ptr_conv);
4082 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1get_1timestamp(JNIEnv * _env, jclass _b, jlong this_ptr) {
4083 LDKUnsignedNodeAnnouncement* this_ptr_conv = (LDKUnsignedNodeAnnouncement*)this_ptr;
4084 return UnsignedNodeAnnouncement_get_timestamp(this_ptr_conv);
4087 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1timestamp(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
4088 LDKUnsignedNodeAnnouncement* this_ptr_conv = (LDKUnsignedNodeAnnouncement*)this_ptr;
4089 return UnsignedNodeAnnouncement_set_timestamp(this_ptr_conv, val);
4092 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1get_1node_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
4093 LDKUnsignedNodeAnnouncement* this_ptr_conv = (LDKUnsignedNodeAnnouncement*)this_ptr;
4094 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
4095 *ret = UnsignedNodeAnnouncement_get_node_id(this_ptr_conv);
4099 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1node_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4100 LDKUnsignedNodeAnnouncement* this_ptr_conv = (LDKUnsignedNodeAnnouncement*)this_ptr;
4101 LDKPublicKey val_conv = *(LDKPublicKey*)val;
4103 return UnsignedNodeAnnouncement_set_node_id(this_ptr_conv, val_conv);
4106 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1get_1rgb(JNIEnv * _env, jclass _b, jlong this_ptr) {
4107 LDKUnsignedNodeAnnouncement* this_ptr_conv = (LDKUnsignedNodeAnnouncement*)this_ptr;
4108 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 3);
4109 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 3, *UnsignedNodeAnnouncement_get_rgb(this_ptr_conv));
4113 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1rgb(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4114 LDKUnsignedNodeAnnouncement* this_ptr_conv = (LDKUnsignedNodeAnnouncement*)this_ptr;
4115 LDKThreeBytes val_conv = *(LDKThreeBytes*)val;
4117 return UnsignedNodeAnnouncement_set_rgb(this_ptr_conv, val_conv);
4120 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1get_1alias(JNIEnv * _env, jclass _b, jlong this_ptr) {
4121 LDKUnsignedNodeAnnouncement* this_ptr_conv = (LDKUnsignedNodeAnnouncement*)this_ptr;
4122 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
4123 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *UnsignedNodeAnnouncement_get_alias(this_ptr_conv));
4127 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1alias(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4128 LDKUnsignedNodeAnnouncement* this_ptr_conv = (LDKUnsignedNodeAnnouncement*)this_ptr;
4129 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
4131 return UnsignedNodeAnnouncement_set_alias(this_ptr_conv, val_conv);
4134 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1addresses(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4135 LDKUnsignedNodeAnnouncement* this_ptr_conv = (LDKUnsignedNodeAnnouncement*)this_ptr;
4136 LDKCVec_NetAddressZ val_conv = *(LDKCVec_NetAddressZ*)val;
4138 return UnsignedNodeAnnouncement_set_addresses(this_ptr_conv, val_conv);
4141 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4142 LDKNodeAnnouncement this_ptr_conv = *(LDKNodeAnnouncement*)this_ptr;
4143 free((void*)this_ptr);
4144 this_ptr_conv._underlying_ref = false;
4145 return NodeAnnouncement_free(this_ptr_conv);
4148 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1get_1signature(JNIEnv * _env, jclass _b, jlong this_ptr) {
4149 LDKNodeAnnouncement* this_ptr_conv = (LDKNodeAnnouncement*)this_ptr;
4150 LDKSignature* ret = malloc(sizeof(LDKSignature));
4151 *ret = NodeAnnouncement_get_signature(this_ptr_conv);
4155 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1set_1signature(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4156 LDKNodeAnnouncement* this_ptr_conv = (LDKNodeAnnouncement*)this_ptr;
4157 LDKSignature val_conv = *(LDKSignature*)val;
4159 return NodeAnnouncement_set_signature(this_ptr_conv, val_conv);
4162 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1get_1contents(JNIEnv * _env, jclass _b, jlong this_ptr) {
4163 LDKNodeAnnouncement* this_ptr_conv = (LDKNodeAnnouncement*)this_ptr;
4164 LDKUnsignedNodeAnnouncement* ret = malloc(sizeof(LDKUnsignedNodeAnnouncement));
4165 *ret = NodeAnnouncement_get_contents(this_ptr_conv);
4166 assert(!ret->_underlying_ref);
4167 ret->_underlying_ref = true;
4171 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1set_1contents(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4172 LDKNodeAnnouncement* this_ptr_conv = (LDKNodeAnnouncement*)this_ptr;
4173 LDKUnsignedNodeAnnouncement val_conv = *(LDKUnsignedNodeAnnouncement*)val;
4175 val_conv._underlying_ref = false;
4176 return NodeAnnouncement_set_contents(this_ptr_conv, val_conv);
4179 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1new(JNIEnv * _env, jclass _b, jlong signature_arg, jlong contents_arg) {
4180 LDKSignature signature_arg_conv = *(LDKSignature*)signature_arg;
4181 free((void*)signature_arg);
4182 LDKUnsignedNodeAnnouncement contents_arg_conv = *(LDKUnsignedNodeAnnouncement*)contents_arg;
4183 free((void*)contents_arg);
4184 contents_arg_conv._underlying_ref = false;
4185 LDKNodeAnnouncement* ret = malloc(sizeof(LDKNodeAnnouncement));
4186 *ret = NodeAnnouncement_new(signature_arg_conv, contents_arg_conv);
4187 assert(!ret->_underlying_ref);
4188 ret->_underlying_ref = true;
4192 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4193 LDKUnsignedChannelAnnouncement this_ptr_conv = *(LDKUnsignedChannelAnnouncement*)this_ptr;
4194 free((void*)this_ptr);
4195 this_ptr_conv._underlying_ref = false;
4196 return UnsignedChannelAnnouncement_free(this_ptr_conv);
4199 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1get_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr) {
4200 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4201 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
4202 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *UnsignedChannelAnnouncement_get_chain_hash(this_ptr_conv));
4206 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1set_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4207 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4208 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
4210 return UnsignedChannelAnnouncement_set_chain_hash(this_ptr_conv, val_conv);
4213 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1get_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
4214 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4215 return UnsignedChannelAnnouncement_get_short_channel_id(this_ptr_conv);
4218 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1set_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4219 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4220 return UnsignedChannelAnnouncement_set_short_channel_id(this_ptr_conv, val);
4223 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1get_1node_1id_11(JNIEnv * _env, jclass _b, jlong this_ptr) {
4224 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4225 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
4226 *ret = UnsignedChannelAnnouncement_get_node_id_1(this_ptr_conv);
4230 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1set_1node_1id_11(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4231 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4232 LDKPublicKey val_conv = *(LDKPublicKey*)val;
4234 return UnsignedChannelAnnouncement_set_node_id_1(this_ptr_conv, val_conv);
4237 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1get_1node_1id_12(JNIEnv * _env, jclass _b, jlong this_ptr) {
4238 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4239 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
4240 *ret = UnsignedChannelAnnouncement_get_node_id_2(this_ptr_conv);
4244 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1set_1node_1id_12(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4245 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4246 LDKPublicKey val_conv = *(LDKPublicKey*)val;
4248 return UnsignedChannelAnnouncement_set_node_id_2(this_ptr_conv, val_conv);
4251 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1get_1bitcoin_1key_11(JNIEnv * _env, jclass _b, jlong this_ptr) {
4252 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4253 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
4254 *ret = UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr_conv);
4258 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1set_1bitcoin_1key_11(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4259 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4260 LDKPublicKey val_conv = *(LDKPublicKey*)val;
4262 return UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr_conv, val_conv);
4265 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1get_1bitcoin_1key_12(JNIEnv * _env, jclass _b, jlong this_ptr) {
4266 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4267 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
4268 *ret = UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr_conv);
4272 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1set_1bitcoin_1key_12(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4273 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4274 LDKPublicKey val_conv = *(LDKPublicKey*)val;
4276 return UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr_conv, val_conv);
4279 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4280 LDKChannelAnnouncement this_ptr_conv = *(LDKChannelAnnouncement*)this_ptr;
4281 free((void*)this_ptr);
4282 this_ptr_conv._underlying_ref = false;
4283 return ChannelAnnouncement_free(this_ptr_conv);
4286 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1get_1node_1signature_11(JNIEnv * _env, jclass _b, jlong this_ptr) {
4287 LDKChannelAnnouncement* this_ptr_conv = (LDKChannelAnnouncement*)this_ptr;
4288 LDKSignature* ret = malloc(sizeof(LDKSignature));
4289 *ret = ChannelAnnouncement_get_node_signature_1(this_ptr_conv);
4293 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1set_1node_1signature_11(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4294 LDKChannelAnnouncement* this_ptr_conv = (LDKChannelAnnouncement*)this_ptr;
4295 LDKSignature val_conv = *(LDKSignature*)val;
4297 return ChannelAnnouncement_set_node_signature_1(this_ptr_conv, val_conv);
4300 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1get_1node_1signature_12(JNIEnv * _env, jclass _b, jlong this_ptr) {
4301 LDKChannelAnnouncement* this_ptr_conv = (LDKChannelAnnouncement*)this_ptr;
4302 LDKSignature* ret = malloc(sizeof(LDKSignature));
4303 *ret = ChannelAnnouncement_get_node_signature_2(this_ptr_conv);
4307 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1set_1node_1signature_12(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4308 LDKChannelAnnouncement* this_ptr_conv = (LDKChannelAnnouncement*)this_ptr;
4309 LDKSignature val_conv = *(LDKSignature*)val;
4311 return ChannelAnnouncement_set_node_signature_2(this_ptr_conv, val_conv);
4314 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1get_1bitcoin_1signature_11(JNIEnv * _env, jclass _b, jlong this_ptr) {
4315 LDKChannelAnnouncement* this_ptr_conv = (LDKChannelAnnouncement*)this_ptr;
4316 LDKSignature* ret = malloc(sizeof(LDKSignature));
4317 *ret = ChannelAnnouncement_get_bitcoin_signature_1(this_ptr_conv);
4321 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1set_1bitcoin_1signature_11(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4322 LDKChannelAnnouncement* this_ptr_conv = (LDKChannelAnnouncement*)this_ptr;
4323 LDKSignature val_conv = *(LDKSignature*)val;
4325 return ChannelAnnouncement_set_bitcoin_signature_1(this_ptr_conv, val_conv);
4328 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1get_1bitcoin_1signature_12(JNIEnv * _env, jclass _b, jlong this_ptr) {
4329 LDKChannelAnnouncement* this_ptr_conv = (LDKChannelAnnouncement*)this_ptr;
4330 LDKSignature* ret = malloc(sizeof(LDKSignature));
4331 *ret = ChannelAnnouncement_get_bitcoin_signature_2(this_ptr_conv);
4335 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1set_1bitcoin_1signature_12(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4336 LDKChannelAnnouncement* this_ptr_conv = (LDKChannelAnnouncement*)this_ptr;
4337 LDKSignature val_conv = *(LDKSignature*)val;
4339 return ChannelAnnouncement_set_bitcoin_signature_2(this_ptr_conv, val_conv);
4342 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1get_1contents(JNIEnv * _env, jclass _b, jlong this_ptr) {
4343 LDKChannelAnnouncement* this_ptr_conv = (LDKChannelAnnouncement*)this_ptr;
4344 LDKUnsignedChannelAnnouncement* ret = malloc(sizeof(LDKUnsignedChannelAnnouncement));
4345 *ret = ChannelAnnouncement_get_contents(this_ptr_conv);
4346 assert(!ret->_underlying_ref);
4347 ret->_underlying_ref = true;
4351 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1set_1contents(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4352 LDKChannelAnnouncement* this_ptr_conv = (LDKChannelAnnouncement*)this_ptr;
4353 LDKUnsignedChannelAnnouncement val_conv = *(LDKUnsignedChannelAnnouncement*)val;
4355 val_conv._underlying_ref = false;
4356 return ChannelAnnouncement_set_contents(this_ptr_conv, val_conv);
4359 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) {
4360 LDKSignature node_signature_1_arg_conv = *(LDKSignature*)node_signature_1_arg;
4361 free((void*)node_signature_1_arg);
4362 LDKSignature node_signature_2_arg_conv = *(LDKSignature*)node_signature_2_arg;
4363 free((void*)node_signature_2_arg);
4364 LDKSignature bitcoin_signature_1_arg_conv = *(LDKSignature*)bitcoin_signature_1_arg;
4365 free((void*)bitcoin_signature_1_arg);
4366 LDKSignature bitcoin_signature_2_arg_conv = *(LDKSignature*)bitcoin_signature_2_arg;
4367 free((void*)bitcoin_signature_2_arg);
4368 LDKUnsignedChannelAnnouncement contents_arg_conv = *(LDKUnsignedChannelAnnouncement*)contents_arg;
4369 free((void*)contents_arg);
4370 contents_arg_conv._underlying_ref = false;
4371 LDKChannelAnnouncement* ret = malloc(sizeof(LDKChannelAnnouncement));
4372 *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);
4373 assert(!ret->_underlying_ref);
4374 ret->_underlying_ref = true;
4378 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4379 LDKUnsignedChannelUpdate this_ptr_conv = *(LDKUnsignedChannelUpdate*)this_ptr;
4380 free((void*)this_ptr);
4381 this_ptr_conv._underlying_ref = false;
4382 return UnsignedChannelUpdate_free(this_ptr_conv);
4385 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr) {
4386 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4387 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
4388 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *UnsignedChannelUpdate_get_chain_hash(this_ptr_conv));
4392 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4393 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4394 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
4396 return UnsignedChannelUpdate_set_chain_hash(this_ptr_conv, val_conv);
4399 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
4400 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4401 return UnsignedChannelUpdate_get_short_channel_id(this_ptr_conv);
4404 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4405 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4406 return UnsignedChannelUpdate_set_short_channel_id(this_ptr_conv, val);
4409 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1timestamp(JNIEnv * _env, jclass _b, jlong this_ptr) {
4410 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4411 return UnsignedChannelUpdate_get_timestamp(this_ptr_conv);
4414 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1timestamp(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
4415 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4416 return UnsignedChannelUpdate_set_timestamp(this_ptr_conv, val);
4419 JNIEXPORT jbyte JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1flags(JNIEnv * _env, jclass _b, jlong this_ptr) {
4420 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4421 return UnsignedChannelUpdate_get_flags(this_ptr_conv);
4424 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1flags(JNIEnv * _env, jclass _b, jlong this_ptr, jbyte val) {
4425 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4426 return UnsignedChannelUpdate_set_flags(this_ptr_conv, val);
4429 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1cltv_1expiry_1delta(JNIEnv * _env, jclass _b, jlong this_ptr) {
4430 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4431 return UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr_conv);
4434 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1cltv_1expiry_1delta(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
4435 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4436 return UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr_conv, val);
4439 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
4440 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4441 return UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr_conv);
4444 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4445 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4446 return UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr_conv, val);
4449 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1fee_1base_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
4450 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4451 return UnsignedChannelUpdate_get_fee_base_msat(this_ptr_conv);
4454 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1fee_1base_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
4455 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4456 return UnsignedChannelUpdate_set_fee_base_msat(this_ptr_conv, val);
4459 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1fee_1proportional_1millionths(JNIEnv * _env, jclass _b, jlong this_ptr) {
4460 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4461 return UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr_conv);
4464 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1fee_1proportional_1millionths(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
4465 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4466 return UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr_conv, val);
4469 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4470 LDKChannelUpdate this_ptr_conv = *(LDKChannelUpdate*)this_ptr;
4471 free((void*)this_ptr);
4472 this_ptr_conv._underlying_ref = false;
4473 return ChannelUpdate_free(this_ptr_conv);
4476 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1get_1signature(JNIEnv * _env, jclass _b, jlong this_ptr) {
4477 LDKChannelUpdate* this_ptr_conv = (LDKChannelUpdate*)this_ptr;
4478 LDKSignature* ret = malloc(sizeof(LDKSignature));
4479 *ret = ChannelUpdate_get_signature(this_ptr_conv);
4483 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1set_1signature(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4484 LDKChannelUpdate* this_ptr_conv = (LDKChannelUpdate*)this_ptr;
4485 LDKSignature val_conv = *(LDKSignature*)val;
4487 return ChannelUpdate_set_signature(this_ptr_conv, val_conv);
4490 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1get_1contents(JNIEnv * _env, jclass _b, jlong this_ptr) {
4491 LDKChannelUpdate* this_ptr_conv = (LDKChannelUpdate*)this_ptr;
4492 LDKUnsignedChannelUpdate* ret = malloc(sizeof(LDKUnsignedChannelUpdate));
4493 *ret = ChannelUpdate_get_contents(this_ptr_conv);
4494 assert(!ret->_underlying_ref);
4495 ret->_underlying_ref = true;
4499 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1set_1contents(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4500 LDKChannelUpdate* this_ptr_conv = (LDKChannelUpdate*)this_ptr;
4501 LDKUnsignedChannelUpdate val_conv = *(LDKUnsignedChannelUpdate*)val;
4503 val_conv._underlying_ref = false;
4504 return ChannelUpdate_set_contents(this_ptr_conv, val_conv);
4507 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1new(JNIEnv * _env, jclass _b, jlong signature_arg, jlong contents_arg) {
4508 LDKSignature signature_arg_conv = *(LDKSignature*)signature_arg;
4509 free((void*)signature_arg);
4510 LDKUnsignedChannelUpdate contents_arg_conv = *(LDKUnsignedChannelUpdate*)contents_arg;
4511 free((void*)contents_arg);
4512 contents_arg_conv._underlying_ref = false;
4513 LDKChannelUpdate* ret = malloc(sizeof(LDKChannelUpdate));
4514 *ret = ChannelUpdate_new(signature_arg_conv, contents_arg_conv);
4515 assert(!ret->_underlying_ref);
4516 ret->_underlying_ref = true;
4520 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorAction_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4521 LDKErrorAction this_ptr_conv = *(LDKErrorAction*)this_ptr;
4522 free((void*)this_ptr);
4523 return ErrorAction_free(this_ptr_conv);
4526 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LightningError_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4527 LDKLightningError this_ptr_conv = *(LDKLightningError*)this_ptr;
4528 free((void*)this_ptr);
4529 this_ptr_conv._underlying_ref = false;
4530 return LightningError_free(this_ptr_conv);
4533 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LightningError_1get_1err(JNIEnv * _env, jclass _b, jlong this_ptr) {
4534 LDKLightningError* this_ptr_conv = (LDKLightningError*)this_ptr;
4535 LDKStr* ret = malloc(sizeof(LDKStr));
4536 *ret = LightningError_get_err(this_ptr_conv);
4540 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LightningError_1set_1err(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4541 LDKLightningError* this_ptr_conv = (LDKLightningError*)this_ptr;
4542 LDKCVec_u8Z val_conv = *(LDKCVec_u8Z*)val;
4544 return LightningError_set_err(this_ptr_conv, val_conv);
4547 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LightningError_1get_1action(JNIEnv * _env, jclass _b, jlong this_ptr) {
4548 LDKLightningError* this_ptr_conv = (LDKLightningError*)this_ptr;
4549 LDKErrorAction* ret = malloc(sizeof(LDKErrorAction));
4550 *ret = LightningError_get_action(this_ptr_conv);
4554 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LightningError_1set_1action(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4555 LDKLightningError* this_ptr_conv = (LDKLightningError*)this_ptr;
4556 LDKErrorAction val_conv = *(LDKErrorAction*)val;
4558 return LightningError_set_action(this_ptr_conv, val_conv);
4561 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LightningError_1new(JNIEnv * _env, jclass _b, jlong err_arg, jlong action_arg) {
4562 LDKCVec_u8Z err_arg_conv = *(LDKCVec_u8Z*)err_arg;
4563 free((void*)err_arg);
4564 LDKErrorAction action_arg_conv = *(LDKErrorAction*)action_arg;
4565 free((void*)action_arg);
4566 LDKLightningError* ret = malloc(sizeof(LDKLightningError));
4567 *ret = LightningError_new(err_arg_conv, action_arg_conv);
4568 assert(!ret->_underlying_ref);
4569 ret->_underlying_ref = true;
4573 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4574 LDKCommitmentUpdate this_ptr_conv = *(LDKCommitmentUpdate*)this_ptr;
4575 free((void*)this_ptr);
4576 this_ptr_conv._underlying_ref = false;
4577 return CommitmentUpdate_free(this_ptr_conv);
4580 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1set_1update_1add_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4581 LDKCommitmentUpdate* this_ptr_conv = (LDKCommitmentUpdate*)this_ptr;
4582 LDKCVec_UpdateAddHTLCZ val_conv = *(LDKCVec_UpdateAddHTLCZ*)val;
4584 return CommitmentUpdate_set_update_add_htlcs(this_ptr_conv, val_conv);
4587 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1set_1update_1fulfill_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4588 LDKCommitmentUpdate* this_ptr_conv = (LDKCommitmentUpdate*)this_ptr;
4589 LDKCVec_UpdateFulfillHTLCZ val_conv = *(LDKCVec_UpdateFulfillHTLCZ*)val;
4591 return CommitmentUpdate_set_update_fulfill_htlcs(this_ptr_conv, val_conv);
4594 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1set_1update_1fail_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4595 LDKCommitmentUpdate* this_ptr_conv = (LDKCommitmentUpdate*)this_ptr;
4596 LDKCVec_UpdateFailHTLCZ val_conv = *(LDKCVec_UpdateFailHTLCZ*)val;
4598 return CommitmentUpdate_set_update_fail_htlcs(this_ptr_conv, val_conv);
4601 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1set_1update_1fail_1malformed_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4602 LDKCommitmentUpdate* this_ptr_conv = (LDKCommitmentUpdate*)this_ptr;
4603 LDKCVec_UpdateFailMalformedHTLCZ val_conv = *(LDKCVec_UpdateFailMalformedHTLCZ*)val;
4605 return CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr_conv, val_conv);
4608 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1get_1update_1fee(JNIEnv * _env, jclass _b, jlong this_ptr) {
4609 LDKCommitmentUpdate* this_ptr_conv = (LDKCommitmentUpdate*)this_ptr;
4610 LDKUpdateFee* ret = malloc(sizeof(LDKUpdateFee));
4611 *ret = CommitmentUpdate_get_update_fee(this_ptr_conv);
4612 assert(!ret->_underlying_ref);
4613 ret->_underlying_ref = true;
4617 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1set_1update_1fee(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4618 LDKCommitmentUpdate* this_ptr_conv = (LDKCommitmentUpdate*)this_ptr;
4619 LDKUpdateFee val_conv = *(LDKUpdateFee*)val;
4621 val_conv._underlying_ref = false;
4622 return CommitmentUpdate_set_update_fee(this_ptr_conv, val_conv);
4625 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1get_1commitment_1signed(JNIEnv * _env, jclass _b, jlong this_ptr) {
4626 LDKCommitmentUpdate* this_ptr_conv = (LDKCommitmentUpdate*)this_ptr;
4627 LDKCommitmentSigned* ret = malloc(sizeof(LDKCommitmentSigned));
4628 *ret = CommitmentUpdate_get_commitment_signed(this_ptr_conv);
4629 assert(!ret->_underlying_ref);
4630 ret->_underlying_ref = true;
4634 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1set_1commitment_1signed(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4635 LDKCommitmentUpdate* this_ptr_conv = (LDKCommitmentUpdate*)this_ptr;
4636 LDKCommitmentSigned val_conv = *(LDKCommitmentSigned*)val;
4638 val_conv._underlying_ref = false;
4639 return CommitmentUpdate_set_commitment_signed(this_ptr_conv, val_conv);
4642 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) {
4643 LDKCVec_UpdateAddHTLCZ update_add_htlcs_arg_conv = *(LDKCVec_UpdateAddHTLCZ*)update_add_htlcs_arg;
4644 free((void*)update_add_htlcs_arg);
4645 LDKCVec_UpdateFulfillHTLCZ update_fulfill_htlcs_arg_conv = *(LDKCVec_UpdateFulfillHTLCZ*)update_fulfill_htlcs_arg;
4646 free((void*)update_fulfill_htlcs_arg);
4647 LDKCVec_UpdateFailHTLCZ update_fail_htlcs_arg_conv = *(LDKCVec_UpdateFailHTLCZ*)update_fail_htlcs_arg;
4648 free((void*)update_fail_htlcs_arg);
4649 LDKCVec_UpdateFailMalformedHTLCZ update_fail_malformed_htlcs_arg_conv = *(LDKCVec_UpdateFailMalformedHTLCZ*)update_fail_malformed_htlcs_arg;
4650 free((void*)update_fail_malformed_htlcs_arg);
4651 LDKUpdateFee update_fee_arg_conv = *(LDKUpdateFee*)update_fee_arg;
4652 free((void*)update_fee_arg);
4653 update_fee_arg_conv._underlying_ref = false;
4654 LDKCommitmentSigned commitment_signed_arg_conv = *(LDKCommitmentSigned*)commitment_signed_arg;
4655 free((void*)commitment_signed_arg);
4656 commitment_signed_arg_conv._underlying_ref = false;
4657 LDKCommitmentUpdate* ret = malloc(sizeof(LDKCommitmentUpdate));
4658 *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);
4659 assert(!ret->_underlying_ref);
4660 ret->_underlying_ref = true;
4664 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCFailChannelUpdate_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4665 LDKHTLCFailChannelUpdate this_ptr_conv = *(LDKHTLCFailChannelUpdate*)this_ptr;
4666 free((void*)this_ptr);
4667 return HTLCFailChannelUpdate_free(this_ptr_conv);
4670 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4671 LDKChannelMessageHandler this_ptr_conv = *(LDKChannelMessageHandler*)this_ptr;
4672 free((void*)this_ptr);
4673 return ChannelMessageHandler_free(this_ptr_conv);
4676 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4677 LDKRoutingMessageHandler this_ptr_conv = *(LDKRoutingMessageHandler*)this_ptr;
4678 free((void*)this_ptr);
4679 return RoutingMessageHandler_free(this_ptr_conv);
4682 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1write(JNIEnv * _env, jclass _b, jlong obj) {
4683 LDKAcceptChannel* obj_conv = (LDKAcceptChannel*)obj;
4684 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4685 *ret = AcceptChannel_write(obj_conv);
4689 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1read(JNIEnv * _env, jclass _b, jlong ser) {
4690 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4692 LDKAcceptChannel* ret = malloc(sizeof(LDKAcceptChannel));
4693 *ret = AcceptChannel_read(ser_conv);
4694 assert(!ret->_underlying_ref);
4695 ret->_underlying_ref = true;
4699 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1write(JNIEnv * _env, jclass _b, jlong obj) {
4700 LDKAnnouncementSignatures* obj_conv = (LDKAnnouncementSignatures*)obj;
4701 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4702 *ret = AnnouncementSignatures_write(obj_conv);
4706 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1read(JNIEnv * _env, jclass _b, jlong ser) {
4707 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4709 LDKAnnouncementSignatures* ret = malloc(sizeof(LDKAnnouncementSignatures));
4710 *ret = AnnouncementSignatures_read(ser_conv);
4711 assert(!ret->_underlying_ref);
4712 ret->_underlying_ref = true;
4716 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1write(JNIEnv * _env, jclass _b, jlong obj) {
4717 LDKChannelReestablish* obj_conv = (LDKChannelReestablish*)obj;
4718 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4719 *ret = ChannelReestablish_write(obj_conv);
4723 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1read(JNIEnv * _env, jclass _b, jlong ser) {
4724 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4726 LDKChannelReestablish* ret = malloc(sizeof(LDKChannelReestablish));
4727 *ret = ChannelReestablish_read(ser_conv);
4728 assert(!ret->_underlying_ref);
4729 ret->_underlying_ref = true;
4733 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1write(JNIEnv * _env, jclass _b, jlong obj) {
4734 LDKClosingSigned* obj_conv = (LDKClosingSigned*)obj;
4735 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4736 *ret = ClosingSigned_write(obj_conv);
4740 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1read(JNIEnv * _env, jclass _b, jlong ser) {
4741 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4743 LDKClosingSigned* ret = malloc(sizeof(LDKClosingSigned));
4744 *ret = ClosingSigned_read(ser_conv);
4745 assert(!ret->_underlying_ref);
4746 ret->_underlying_ref = true;
4750 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1write(JNIEnv * _env, jclass _b, jlong obj) {
4751 LDKCommitmentSigned* obj_conv = (LDKCommitmentSigned*)obj;
4752 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4753 *ret = CommitmentSigned_write(obj_conv);
4757 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1read(JNIEnv * _env, jclass _b, jlong ser) {
4758 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4760 LDKCommitmentSigned* ret = malloc(sizeof(LDKCommitmentSigned));
4761 *ret = CommitmentSigned_read(ser_conv);
4762 assert(!ret->_underlying_ref);
4763 ret->_underlying_ref = true;
4767 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingCreated_1write(JNIEnv * _env, jclass _b, jlong obj) {
4768 LDKFundingCreated* obj_conv = (LDKFundingCreated*)obj;
4769 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4770 *ret = FundingCreated_write(obj_conv);
4774 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingCreated_1read(JNIEnv * _env, jclass _b, jlong ser) {
4775 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4777 LDKFundingCreated* ret = malloc(sizeof(LDKFundingCreated));
4778 *ret = FundingCreated_read(ser_conv);
4779 assert(!ret->_underlying_ref);
4780 ret->_underlying_ref = true;
4784 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingSigned_1write(JNIEnv * _env, jclass _b, jlong obj) {
4785 LDKFundingSigned* obj_conv = (LDKFundingSigned*)obj;
4786 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4787 *ret = FundingSigned_write(obj_conv);
4791 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingSigned_1read(JNIEnv * _env, jclass _b, jlong ser) {
4792 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4794 LDKFundingSigned* ret = malloc(sizeof(LDKFundingSigned));
4795 *ret = FundingSigned_read(ser_conv);
4796 assert(!ret->_underlying_ref);
4797 ret->_underlying_ref = true;
4801 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingLocked_1write(JNIEnv * _env, jclass _b, jlong obj) {
4802 LDKFundingLocked* obj_conv = (LDKFundingLocked*)obj;
4803 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4804 *ret = FundingLocked_write(obj_conv);
4808 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingLocked_1read(JNIEnv * _env, jclass _b, jlong ser) {
4809 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4811 LDKFundingLocked* ret = malloc(sizeof(LDKFundingLocked));
4812 *ret = FundingLocked_read(ser_conv);
4813 assert(!ret->_underlying_ref);
4814 ret->_underlying_ref = true;
4818 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Init_1write(JNIEnv * _env, jclass _b, jlong obj) {
4819 LDKInit* obj_conv = (LDKInit*)obj;
4820 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4821 *ret = Init_write(obj_conv);
4825 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Init_1read(JNIEnv * _env, jclass _b, jlong ser) {
4826 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4828 LDKInit* ret = malloc(sizeof(LDKInit));
4829 *ret = Init_read(ser_conv);
4830 assert(!ret->_underlying_ref);
4831 ret->_underlying_ref = true;
4835 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1write(JNIEnv * _env, jclass _b, jlong obj) {
4836 LDKOpenChannel* obj_conv = (LDKOpenChannel*)obj;
4837 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4838 *ret = OpenChannel_write(obj_conv);
4842 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1read(JNIEnv * _env, jclass _b, jlong ser) {
4843 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4845 LDKOpenChannel* ret = malloc(sizeof(LDKOpenChannel));
4846 *ret = OpenChannel_read(ser_conv);
4847 assert(!ret->_underlying_ref);
4848 ret->_underlying_ref = true;
4852 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1write(JNIEnv * _env, jclass _b, jlong obj) {
4853 LDKRevokeAndACK* obj_conv = (LDKRevokeAndACK*)obj;
4854 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4855 *ret = RevokeAndACK_write(obj_conv);
4859 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1read(JNIEnv * _env, jclass _b, jlong ser) {
4860 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4862 LDKRevokeAndACK* ret = malloc(sizeof(LDKRevokeAndACK));
4863 *ret = RevokeAndACK_read(ser_conv);
4864 assert(!ret->_underlying_ref);
4865 ret->_underlying_ref = true;
4869 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Shutdown_1write(JNIEnv * _env, jclass _b, jlong obj) {
4870 LDKShutdown* obj_conv = (LDKShutdown*)obj;
4871 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4872 *ret = Shutdown_write(obj_conv);
4876 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Shutdown_1read(JNIEnv * _env, jclass _b, jlong ser) {
4877 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4879 LDKShutdown* ret = malloc(sizeof(LDKShutdown));
4880 *ret = Shutdown_read(ser_conv);
4881 assert(!ret->_underlying_ref);
4882 ret->_underlying_ref = true;
4886 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1write(JNIEnv * _env, jclass _b, jlong obj) {
4887 LDKUpdateFailHTLC* obj_conv = (LDKUpdateFailHTLC*)obj;
4888 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4889 *ret = UpdateFailHTLC_write(obj_conv);
4893 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1read(JNIEnv * _env, jclass _b, jlong ser) {
4894 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4896 LDKUpdateFailHTLC* ret = malloc(sizeof(LDKUpdateFailHTLC));
4897 *ret = UpdateFailHTLC_read(ser_conv);
4898 assert(!ret->_underlying_ref);
4899 ret->_underlying_ref = true;
4903 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1write(JNIEnv * _env, jclass _b, jlong obj) {
4904 LDKUpdateFailMalformedHTLC* obj_conv = (LDKUpdateFailMalformedHTLC*)obj;
4905 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4906 *ret = UpdateFailMalformedHTLC_write(obj_conv);
4910 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1read(JNIEnv * _env, jclass _b, jlong ser) {
4911 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4913 LDKUpdateFailMalformedHTLC* ret = malloc(sizeof(LDKUpdateFailMalformedHTLC));
4914 *ret = UpdateFailMalformedHTLC_read(ser_conv);
4915 assert(!ret->_underlying_ref);
4916 ret->_underlying_ref = true;
4920 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFee_1write(JNIEnv * _env, jclass _b, jlong obj) {
4921 LDKUpdateFee* obj_conv = (LDKUpdateFee*)obj;
4922 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4923 *ret = UpdateFee_write(obj_conv);
4927 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFee_1read(JNIEnv * _env, jclass _b, jlong ser) {
4928 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4930 LDKUpdateFee* ret = malloc(sizeof(LDKUpdateFee));
4931 *ret = UpdateFee_read(ser_conv);
4932 assert(!ret->_underlying_ref);
4933 ret->_underlying_ref = true;
4937 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1write(JNIEnv * _env, jclass _b, jlong obj) {
4938 LDKUpdateFulfillHTLC* obj_conv = (LDKUpdateFulfillHTLC*)obj;
4939 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4940 *ret = UpdateFulfillHTLC_write(obj_conv);
4944 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1read(JNIEnv * _env, jclass _b, jlong ser) {
4945 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4947 LDKUpdateFulfillHTLC* ret = malloc(sizeof(LDKUpdateFulfillHTLC));
4948 *ret = UpdateFulfillHTLC_read(ser_conv);
4949 assert(!ret->_underlying_ref);
4950 ret->_underlying_ref = true;
4954 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1write(JNIEnv * _env, jclass _b, jlong obj) {
4955 LDKUpdateAddHTLC* obj_conv = (LDKUpdateAddHTLC*)obj;
4956 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4957 *ret = UpdateAddHTLC_write(obj_conv);
4961 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1read(JNIEnv * _env, jclass _b, jlong ser) {
4962 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4964 LDKUpdateAddHTLC* ret = malloc(sizeof(LDKUpdateAddHTLC));
4965 *ret = UpdateAddHTLC_read(ser_conv);
4966 assert(!ret->_underlying_ref);
4967 ret->_underlying_ref = true;
4971 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Ping_1write(JNIEnv * _env, jclass _b, jlong obj) {
4972 LDKPing* obj_conv = (LDKPing*)obj;
4973 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4974 *ret = Ping_write(obj_conv);
4978 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Ping_1read(JNIEnv * _env, jclass _b, jlong ser) {
4979 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4981 LDKPing* ret = malloc(sizeof(LDKPing));
4982 *ret = Ping_read(ser_conv);
4983 assert(!ret->_underlying_ref);
4984 ret->_underlying_ref = true;
4988 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Pong_1write(JNIEnv * _env, jclass _b, jlong obj) {
4989 LDKPong* obj_conv = (LDKPong*)obj;
4990 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4991 *ret = Pong_write(obj_conv);
4995 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Pong_1read(JNIEnv * _env, jclass _b, jlong ser) {
4996 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4998 LDKPong* ret = malloc(sizeof(LDKPong));
4999 *ret = Pong_read(ser_conv);
5000 assert(!ret->_underlying_ref);
5001 ret->_underlying_ref = true;
5005 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1write(JNIEnv * _env, jclass _b, jlong obj) {
5006 LDKUnsignedChannelAnnouncement* obj_conv = (LDKUnsignedChannelAnnouncement*)obj;
5007 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5008 *ret = UnsignedChannelAnnouncement_write(obj_conv);
5012 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1read(JNIEnv * _env, jclass _b, jlong ser) {
5013 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5015 LDKUnsignedChannelAnnouncement* ret = malloc(sizeof(LDKUnsignedChannelAnnouncement));
5016 *ret = UnsignedChannelAnnouncement_read(ser_conv);
5017 assert(!ret->_underlying_ref);
5018 ret->_underlying_ref = true;
5022 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1write(JNIEnv * _env, jclass _b, jlong obj) {
5023 LDKChannelAnnouncement* obj_conv = (LDKChannelAnnouncement*)obj;
5024 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5025 *ret = ChannelAnnouncement_write(obj_conv);
5029 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1read(JNIEnv * _env, jclass _b, jlong ser) {
5030 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5032 LDKChannelAnnouncement* ret = malloc(sizeof(LDKChannelAnnouncement));
5033 *ret = ChannelAnnouncement_read(ser_conv);
5034 assert(!ret->_underlying_ref);
5035 ret->_underlying_ref = true;
5039 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1write(JNIEnv * _env, jclass _b, jlong obj) {
5040 LDKUnsignedChannelUpdate* obj_conv = (LDKUnsignedChannelUpdate*)obj;
5041 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5042 *ret = UnsignedChannelUpdate_write(obj_conv);
5046 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1read(JNIEnv * _env, jclass _b, jlong ser) {
5047 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5049 LDKUnsignedChannelUpdate* ret = malloc(sizeof(LDKUnsignedChannelUpdate));
5050 *ret = UnsignedChannelUpdate_read(ser_conv);
5051 assert(!ret->_underlying_ref);
5052 ret->_underlying_ref = true;
5056 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1write(JNIEnv * _env, jclass _b, jlong obj) {
5057 LDKChannelUpdate* obj_conv = (LDKChannelUpdate*)obj;
5058 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5059 *ret = ChannelUpdate_write(obj_conv);
5063 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1read(JNIEnv * _env, jclass _b, jlong ser) {
5064 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5066 LDKChannelUpdate* ret = malloc(sizeof(LDKChannelUpdate));
5067 *ret = ChannelUpdate_read(ser_conv);
5068 assert(!ret->_underlying_ref);
5069 ret->_underlying_ref = true;
5073 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1write(JNIEnv * _env, jclass _b, jlong obj) {
5074 LDKErrorMessage* obj_conv = (LDKErrorMessage*)obj;
5075 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5076 *ret = ErrorMessage_write(obj_conv);
5080 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1read(JNIEnv * _env, jclass _b, jlong ser) {
5081 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5083 LDKErrorMessage* ret = malloc(sizeof(LDKErrorMessage));
5084 *ret = ErrorMessage_read(ser_conv);
5085 assert(!ret->_underlying_ref);
5086 ret->_underlying_ref = true;
5090 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1write(JNIEnv * _env, jclass _b, jlong obj) {
5091 LDKUnsignedNodeAnnouncement* obj_conv = (LDKUnsignedNodeAnnouncement*)obj;
5092 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5093 *ret = UnsignedNodeAnnouncement_write(obj_conv);
5097 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1read(JNIEnv * _env, jclass _b, jlong ser) {
5098 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5100 LDKUnsignedNodeAnnouncement* ret = malloc(sizeof(LDKUnsignedNodeAnnouncement));
5101 *ret = UnsignedNodeAnnouncement_read(ser_conv);
5102 assert(!ret->_underlying_ref);
5103 ret->_underlying_ref = true;
5107 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1write(JNIEnv * _env, jclass _b, jlong obj) {
5108 LDKNodeAnnouncement* obj_conv = (LDKNodeAnnouncement*)obj;
5109 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5110 *ret = NodeAnnouncement_write(obj_conv);
5114 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1read(JNIEnv * _env, jclass _b, jlong ser) {
5115 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5117 LDKNodeAnnouncement* ret = malloc(sizeof(LDKNodeAnnouncement));
5118 *ret = NodeAnnouncement_read(ser_conv);
5119 assert(!ret->_underlying_ref);
5120 ret->_underlying_ref = true;
5124 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_MessageHandler_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5125 LDKMessageHandler this_ptr_conv = *(LDKMessageHandler*)this_ptr;
5126 free((void*)this_ptr);
5127 this_ptr_conv._underlying_ref = false;
5128 return MessageHandler_free(this_ptr_conv);
5131 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_MessageHandler_1get_1chan_1handler(JNIEnv * _env, jclass _b, jlong this_ptr) {
5132 LDKMessageHandler* this_ptr_conv = (LDKMessageHandler*)this_ptr;
5133 return (long) MessageHandler_get_chan_handler(this_ptr_conv);
5136 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_MessageHandler_1set_1chan_1handler(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5137 LDKMessageHandler* this_ptr_conv = (LDKMessageHandler*)this_ptr;
5138 LDKChannelMessageHandler val_conv = *(LDKChannelMessageHandler*)val;
5140 return MessageHandler_set_chan_handler(this_ptr_conv, val_conv);
5143 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_MessageHandler_1get_1route_1handler(JNIEnv * _env, jclass _b, jlong this_ptr) {
5144 LDKMessageHandler* this_ptr_conv = (LDKMessageHandler*)this_ptr;
5145 return (long) MessageHandler_get_route_handler(this_ptr_conv);
5148 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_MessageHandler_1set_1route_1handler(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5149 LDKMessageHandler* this_ptr_conv = (LDKMessageHandler*)this_ptr;
5150 LDKRoutingMessageHandler val_conv = *(LDKRoutingMessageHandler*)val;
5152 return MessageHandler_set_route_handler(this_ptr_conv, val_conv);
5155 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_MessageHandler_1new(JNIEnv * _env, jclass _b, jlong chan_handler_arg, jlong route_handler_arg) {
5156 LDKChannelMessageHandler chan_handler_arg_conv = *(LDKChannelMessageHandler*)chan_handler_arg;
5157 free((void*)chan_handler_arg);
5158 LDKRoutingMessageHandler route_handler_arg_conv = *(LDKRoutingMessageHandler*)route_handler_arg;
5159 free((void*)route_handler_arg);
5160 LDKMessageHandler* ret = malloc(sizeof(LDKMessageHandler));
5161 *ret = MessageHandler_new(chan_handler_arg_conv, route_handler_arg_conv);
5162 assert(!ret->_underlying_ref);
5163 ret->_underlying_ref = true;
5167 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5168 LDKSocketDescriptor this_ptr_conv = *(LDKSocketDescriptor*)this_ptr;
5169 free((void*)this_ptr);
5170 return SocketDescriptor_free(this_ptr_conv);
5173 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerHandleError_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5174 LDKPeerHandleError this_ptr_conv = *(LDKPeerHandleError*)this_ptr;
5175 free((void*)this_ptr);
5176 this_ptr_conv._underlying_ref = false;
5177 return PeerHandleError_free(this_ptr_conv);
5180 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_PeerHandleError_1get_1no_1connection_1possible(JNIEnv * _env, jclass _b, jlong this_ptr) {
5181 LDKPeerHandleError* this_ptr_conv = (LDKPeerHandleError*)this_ptr;
5182 return PeerHandleError_get_no_connection_possible(this_ptr_conv);
5185 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerHandleError_1set_1no_1connection_1possible(JNIEnv * _env, jclass _b, jlong this_ptr, jboolean val) {
5186 LDKPeerHandleError* this_ptr_conv = (LDKPeerHandleError*)this_ptr;
5187 return PeerHandleError_set_no_connection_possible(this_ptr_conv, val);
5190 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeerHandleError_1new(JNIEnv * _env, jclass _b, jboolean no_connection_possible_arg) {
5191 LDKPeerHandleError* ret = malloc(sizeof(LDKPeerHandleError));
5192 *ret = PeerHandleError_new(no_connection_possible_arg);
5193 assert(!ret->_underlying_ref);
5194 ret->_underlying_ref = true;
5198 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerManager_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5199 LDKPeerManager this_ptr_conv = *(LDKPeerManager*)this_ptr;
5200 free((void*)this_ptr);
5201 this_ptr_conv._underlying_ref = false;
5202 return PeerManager_free(this_ptr_conv);
5205 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) {
5206 LDKMessageHandler message_handler_conv = *(LDKMessageHandler*)message_handler;
5207 free((void*)message_handler);
5208 message_handler_conv._underlying_ref = false;
5209 LDKSecretKey our_node_secret_conv = *(LDKSecretKey*)our_node_secret;
5210 free((void*)our_node_secret);
5211 unsigned char ephemeral_random_data_arr[32];
5212 (*_env)->GetByteArrayRegion (_env, ephemeral_random_data, 0, 32, ephemeral_random_data_arr);
5213 unsigned char (*ephemeral_random_data_ref)[32] = &ephemeral_random_data_arr;
5214 LDKLogger logger_conv = *(LDKLogger*)logger;
5215 free((void*)logger);
5216 LDKPeerManager* ret = malloc(sizeof(LDKPeerManager));
5217 *ret = PeerManager_new(message_handler_conv, our_node_secret_conv, ephemeral_random_data_ref, logger_conv);
5218 assert(!ret->_underlying_ref);
5219 ret->_underlying_ref = true;
5223 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeerManager_1get_1peer_1node_1ids(JNIEnv * _env, jclass _b, jlong this_arg) {
5224 LDKPeerManager* this_arg_conv = (LDKPeerManager*)this_arg;
5225 LDKCVec_PublicKeyZ* ret = malloc(sizeof(LDKCVec_PublicKeyZ));
5226 *ret = PeerManager_get_peer_node_ids(this_arg_conv);
5230 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) {
5231 LDKPeerManager* this_arg_conv = (LDKPeerManager*)this_arg;
5232 LDKPublicKey their_node_id_conv = *(LDKPublicKey*)their_node_id;
5233 free((void*)their_node_id);
5234 LDKSocketDescriptor descriptor_conv = *(LDKSocketDescriptor*)descriptor;
5235 free((void*)descriptor);
5236 LDKCResult_CVec_u8ZPeerHandleErrorZ* ret = malloc(sizeof(LDKCResult_CVec_u8ZPeerHandleErrorZ));
5237 *ret = PeerManager_new_outbound_connection(this_arg_conv, their_node_id_conv, descriptor_conv);
5241 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeerManager_1new_1inbound_1connection(JNIEnv * _env, jclass _b, jlong this_arg, jlong descriptor) {
5242 LDKPeerManager* this_arg_conv = (LDKPeerManager*)this_arg;
5243 LDKSocketDescriptor descriptor_conv = *(LDKSocketDescriptor*)descriptor;
5244 free((void*)descriptor);
5245 LDKCResult_NonePeerHandleErrorZ* ret = malloc(sizeof(LDKCResult_NonePeerHandleErrorZ));
5246 *ret = PeerManager_new_inbound_connection(this_arg_conv, descriptor_conv);
5250 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeerManager_1write_1buffer_1space_1avail(JNIEnv * _env, jclass _b, jlong this_arg, jlong descriptor) {
5251 LDKPeerManager* this_arg_conv = (LDKPeerManager*)this_arg;
5252 LDKSocketDescriptor* descriptor_conv = (LDKSocketDescriptor*)descriptor;
5253 LDKCResult_NonePeerHandleErrorZ* ret = malloc(sizeof(LDKCResult_NonePeerHandleErrorZ));
5254 *ret = PeerManager_write_buffer_space_avail(this_arg_conv, descriptor_conv);
5258 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeerManager_1read_1event(JNIEnv * _env, jclass _b, jlong this_arg, jlong peer_descriptor, jlong data) {
5259 LDKPeerManager* this_arg_conv = (LDKPeerManager*)this_arg;
5260 LDKSocketDescriptor* peer_descriptor_conv = (LDKSocketDescriptor*)peer_descriptor;
5261 LDKu8slice data_conv = *(LDKu8slice*)data;
5263 LDKCResult_boolPeerHandleErrorZ* ret = malloc(sizeof(LDKCResult_boolPeerHandleErrorZ));
5264 *ret = PeerManager_read_event(this_arg_conv, peer_descriptor_conv, data_conv);
5268 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerManager_1process_1events(JNIEnv * _env, jclass _b, jlong this_arg) {
5269 LDKPeerManager* this_arg_conv = (LDKPeerManager*)this_arg;
5270 return PeerManager_process_events(this_arg_conv);
5273 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerManager_1socket_1disconnected(JNIEnv * _env, jclass _b, jlong this_arg, jlong descriptor) {
5274 LDKPeerManager* this_arg_conv = (LDKPeerManager*)this_arg;
5275 LDKSocketDescriptor* descriptor_conv = (LDKSocketDescriptor*)descriptor;
5276 return PeerManager_socket_disconnected(this_arg_conv, descriptor_conv);
5279 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerManager_1timer_1tick_1occured(JNIEnv * _env, jclass _b, jlong this_arg) {
5280 LDKPeerManager* this_arg_conv = (LDKPeerManager*)this_arg;
5281 return PeerManager_timer_tick_occured(this_arg_conv);
5284 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_build_1commitment_1secret(JNIEnv * _env, jclass _b, jbyteArray commitment_seed, jlong idx) {
5285 unsigned char commitment_seed_arr[32];
5286 (*_env)->GetByteArrayRegion (_env, commitment_seed, 0, 32, commitment_seed_arr);
5287 unsigned char (*commitment_seed_ref)[32] = &commitment_seed_arr;
5288 LDKThirtyTwoBytes* ret = malloc(sizeof(LDKThirtyTwoBytes));
5289 *ret = build_commitment_secret(commitment_seed_ref, idx);
5293 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5294 LDKTxCreationKeys this_ptr_conv = *(LDKTxCreationKeys*)this_ptr;
5295 free((void*)this_ptr);
5296 this_ptr_conv._underlying_ref = false;
5297 return TxCreationKeys_free(this_ptr_conv);
5300 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1get_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr) {
5301 LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr;
5302 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5303 *ret = TxCreationKeys_get_per_commitment_point(this_ptr_conv);
5307 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1set_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5308 LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr;
5309 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5311 return TxCreationKeys_set_per_commitment_point(this_ptr_conv, val_conv);
5314 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1get_1revocation_1key(JNIEnv * _env, jclass _b, jlong this_ptr) {
5315 LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr;
5316 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5317 *ret = TxCreationKeys_get_revocation_key(this_ptr_conv);
5321 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1set_1revocation_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5322 LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr;
5323 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5325 return TxCreationKeys_set_revocation_key(this_ptr_conv, val_conv);
5328 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1get_1a_1htlc_1key(JNIEnv * _env, jclass _b, jlong this_ptr) {
5329 LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr;
5330 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5331 *ret = TxCreationKeys_get_a_htlc_key(this_ptr_conv);
5335 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1set_1a_1htlc_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5336 LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr;
5337 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5339 return TxCreationKeys_set_a_htlc_key(this_ptr_conv, val_conv);
5342 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1get_1b_1htlc_1key(JNIEnv * _env, jclass _b, jlong this_ptr) {
5343 LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr;
5344 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5345 *ret = TxCreationKeys_get_b_htlc_key(this_ptr_conv);
5349 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1set_1b_1htlc_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5350 LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr;
5351 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5353 return TxCreationKeys_set_b_htlc_key(this_ptr_conv, val_conv);
5356 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1get_1a_1delayed_1payment_1key(JNIEnv * _env, jclass _b, jlong this_ptr) {
5357 LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr;
5358 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5359 *ret = TxCreationKeys_get_a_delayed_payment_key(this_ptr_conv);
5363 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1set_1a_1delayed_1payment_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5364 LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr;
5365 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5367 return TxCreationKeys_set_a_delayed_payment_key(this_ptr_conv, val_conv);
5370 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) {
5371 LDKPublicKey per_commitment_point_arg_conv = *(LDKPublicKey*)per_commitment_point_arg;
5372 free((void*)per_commitment_point_arg);
5373 LDKPublicKey revocation_key_arg_conv = *(LDKPublicKey*)revocation_key_arg;
5374 free((void*)revocation_key_arg);
5375 LDKPublicKey a_htlc_key_arg_conv = *(LDKPublicKey*)a_htlc_key_arg;
5376 free((void*)a_htlc_key_arg);
5377 LDKPublicKey b_htlc_key_arg_conv = *(LDKPublicKey*)b_htlc_key_arg;
5378 free((void*)b_htlc_key_arg);
5379 LDKPublicKey a_delayed_payment_key_arg_conv = *(LDKPublicKey*)a_delayed_payment_key_arg;
5380 free((void*)a_delayed_payment_key_arg);
5381 LDKTxCreationKeys* ret = malloc(sizeof(LDKTxCreationKeys));
5382 *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);
5383 assert(!ret->_underlying_ref);
5384 ret->_underlying_ref = true;
5388 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1write(JNIEnv * _env, jclass _b, jlong obj) {
5389 LDKTxCreationKeys* obj_conv = (LDKTxCreationKeys*)obj;
5390 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5391 *ret = TxCreationKeys_write(obj_conv);
5395 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1read(JNIEnv * _env, jclass _b, jlong ser) {
5396 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5398 LDKTxCreationKeys* ret = malloc(sizeof(LDKTxCreationKeys));
5399 *ret = TxCreationKeys_read(ser_conv);
5400 assert(!ret->_underlying_ref);
5401 ret->_underlying_ref = true;
5405 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PreCalculatedTxCreationKeys_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5406 LDKPreCalculatedTxCreationKeys this_ptr_conv = *(LDKPreCalculatedTxCreationKeys*)this_ptr;
5407 free((void*)this_ptr);
5408 this_ptr_conv._underlying_ref = false;
5409 return PreCalculatedTxCreationKeys_free(this_ptr_conv);
5412 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PreCalculatedTxCreationKeys_1new(JNIEnv * _env, jclass _b, jlong keys) {
5413 LDKTxCreationKeys keys_conv = *(LDKTxCreationKeys*)keys;
5415 keys_conv._underlying_ref = false;
5416 LDKPreCalculatedTxCreationKeys* ret = malloc(sizeof(LDKPreCalculatedTxCreationKeys));
5417 *ret = PreCalculatedTxCreationKeys_new(keys_conv);
5418 assert(!ret->_underlying_ref);
5419 ret->_underlying_ref = true;
5423 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PreCalculatedTxCreationKeys_1trust_1key_1derivation(JNIEnv * _env, jclass _b, jlong this_arg) {
5424 LDKPreCalculatedTxCreationKeys* this_arg_conv = (LDKPreCalculatedTxCreationKeys*)this_arg;
5425 LDKTxCreationKeys* ret = malloc(sizeof(LDKTxCreationKeys));
5426 *ret = PreCalculatedTxCreationKeys_trust_key_derivation(this_arg_conv);
5427 assert(!ret->_underlying_ref);
5428 ret->_underlying_ref = true;
5432 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PreCalculatedTxCreationKeys_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_arg) {
5433 LDKPreCalculatedTxCreationKeys* this_arg_conv = (LDKPreCalculatedTxCreationKeys*)this_arg;
5434 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5435 *ret = PreCalculatedTxCreationKeys_per_commitment_point(this_arg_conv);
5439 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5440 LDKChannelPublicKeys this_ptr_conv = *(LDKChannelPublicKeys*)this_ptr;
5441 free((void*)this_ptr);
5442 this_ptr_conv._underlying_ref = false;
5443 return ChannelPublicKeys_free(this_ptr_conv);
5446 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1get_1funding_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr) {
5447 LDKChannelPublicKeys* this_ptr_conv = (LDKChannelPublicKeys*)this_ptr;
5448 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5449 *ret = ChannelPublicKeys_get_funding_pubkey(this_ptr_conv);
5453 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1set_1funding_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5454 LDKChannelPublicKeys* this_ptr_conv = (LDKChannelPublicKeys*)this_ptr;
5455 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5457 return ChannelPublicKeys_set_funding_pubkey(this_ptr_conv, val_conv);
5460 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1get_1revocation_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr) {
5461 LDKChannelPublicKeys* this_ptr_conv = (LDKChannelPublicKeys*)this_ptr;
5462 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5463 *ret = ChannelPublicKeys_get_revocation_basepoint(this_ptr_conv);
5467 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1set_1revocation_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5468 LDKChannelPublicKeys* this_ptr_conv = (LDKChannelPublicKeys*)this_ptr;
5469 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5471 return ChannelPublicKeys_set_revocation_basepoint(this_ptr_conv, val_conv);
5474 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1get_1payment_1point(JNIEnv * _env, jclass _b, jlong this_ptr) {
5475 LDKChannelPublicKeys* this_ptr_conv = (LDKChannelPublicKeys*)this_ptr;
5476 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5477 *ret = ChannelPublicKeys_get_payment_point(this_ptr_conv);
5481 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1set_1payment_1point(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5482 LDKChannelPublicKeys* this_ptr_conv = (LDKChannelPublicKeys*)this_ptr;
5483 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5485 return ChannelPublicKeys_set_payment_point(this_ptr_conv, val_conv);
5488 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1get_1delayed_1payment_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr) {
5489 LDKChannelPublicKeys* this_ptr_conv = (LDKChannelPublicKeys*)this_ptr;
5490 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5491 *ret = ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr_conv);
5495 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1set_1delayed_1payment_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5496 LDKChannelPublicKeys* this_ptr_conv = (LDKChannelPublicKeys*)this_ptr;
5497 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5499 return ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr_conv, val_conv);
5502 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1get_1htlc_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr) {
5503 LDKChannelPublicKeys* this_ptr_conv = (LDKChannelPublicKeys*)this_ptr;
5504 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5505 *ret = ChannelPublicKeys_get_htlc_basepoint(this_ptr_conv);
5509 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1set_1htlc_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5510 LDKChannelPublicKeys* this_ptr_conv = (LDKChannelPublicKeys*)this_ptr;
5511 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5513 return ChannelPublicKeys_set_htlc_basepoint(this_ptr_conv, val_conv);
5516 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) {
5517 LDKPublicKey funding_pubkey_arg_conv = *(LDKPublicKey*)funding_pubkey_arg;
5518 free((void*)funding_pubkey_arg);
5519 LDKPublicKey revocation_basepoint_arg_conv = *(LDKPublicKey*)revocation_basepoint_arg;
5520 free((void*)revocation_basepoint_arg);
5521 LDKPublicKey payment_point_arg_conv = *(LDKPublicKey*)payment_point_arg;
5522 free((void*)payment_point_arg);
5523 LDKPublicKey delayed_payment_basepoint_arg_conv = *(LDKPublicKey*)delayed_payment_basepoint_arg;
5524 free((void*)delayed_payment_basepoint_arg);
5525 LDKPublicKey htlc_basepoint_arg_conv = *(LDKPublicKey*)htlc_basepoint_arg;
5526 free((void*)htlc_basepoint_arg);
5527 LDKChannelPublicKeys* ret = malloc(sizeof(LDKChannelPublicKeys));
5528 *ret = ChannelPublicKeys_new(funding_pubkey_arg_conv, revocation_basepoint_arg_conv, payment_point_arg_conv, delayed_payment_basepoint_arg_conv, htlc_basepoint_arg_conv);
5529 assert(!ret->_underlying_ref);
5530 ret->_underlying_ref = true;
5534 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1write(JNIEnv * _env, jclass _b, jlong obj) {
5535 LDKChannelPublicKeys* obj_conv = (LDKChannelPublicKeys*)obj;
5536 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5537 *ret = ChannelPublicKeys_write(obj_conv);
5541 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1read(JNIEnv * _env, jclass _b, jlong ser) {
5542 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5544 LDKChannelPublicKeys* ret = malloc(sizeof(LDKChannelPublicKeys));
5545 *ret = ChannelPublicKeys_read(ser_conv);
5546 assert(!ret->_underlying_ref);
5547 ret->_underlying_ref = true;
5551 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) {
5552 LDKPublicKey per_commitment_point_conv = *(LDKPublicKey*)per_commitment_point;
5553 free((void*)per_commitment_point);
5554 LDKPublicKey a_delayed_payment_base_conv = *(LDKPublicKey*)a_delayed_payment_base;
5555 free((void*)a_delayed_payment_base);
5556 LDKPublicKey a_htlc_base_conv = *(LDKPublicKey*)a_htlc_base;
5557 free((void*)a_htlc_base);
5558 LDKPublicKey b_revocation_base_conv = *(LDKPublicKey*)b_revocation_base;
5559 free((void*)b_revocation_base);
5560 LDKPublicKey b_htlc_base_conv = *(LDKPublicKey*)b_htlc_base;
5561 free((void*)b_htlc_base);
5562 LDKCResult_TxCreationKeysSecpErrorZ* ret = malloc(sizeof(LDKCResult_TxCreationKeysSecpErrorZ));
5563 *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);
5567 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_get_1revokeable_1redeemscript(JNIEnv * _env, jclass _b, jlong revocation_key, jshort to_self_delay, jlong delayed_payment_key) {
5568 LDKPublicKey revocation_key_conv = *(LDKPublicKey*)revocation_key;
5569 free((void*)revocation_key);
5570 LDKPublicKey delayed_payment_key_conv = *(LDKPublicKey*)delayed_payment_key;
5571 free((void*)delayed_payment_key);
5572 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5573 *ret = get_revokeable_redeemscript(revocation_key_conv, to_self_delay, delayed_payment_key_conv);
5577 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5578 LDKHTLCOutputInCommitment this_ptr_conv = *(LDKHTLCOutputInCommitment*)this_ptr;
5579 free((void*)this_ptr);
5580 this_ptr_conv._underlying_ref = false;
5581 return HTLCOutputInCommitment_free(this_ptr_conv);
5584 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1get_1offered(JNIEnv * _env, jclass _b, jlong this_ptr) {
5585 LDKHTLCOutputInCommitment* this_ptr_conv = (LDKHTLCOutputInCommitment*)this_ptr;
5586 return HTLCOutputInCommitment_get_offered(this_ptr_conv);
5589 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1set_1offered(JNIEnv * _env, jclass _b, jlong this_ptr, jboolean val) {
5590 LDKHTLCOutputInCommitment* this_ptr_conv = (LDKHTLCOutputInCommitment*)this_ptr;
5591 return HTLCOutputInCommitment_set_offered(this_ptr_conv, val);
5594 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1get_1amount_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
5595 LDKHTLCOutputInCommitment* this_ptr_conv = (LDKHTLCOutputInCommitment*)this_ptr;
5596 return HTLCOutputInCommitment_get_amount_msat(this_ptr_conv);
5599 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1set_1amount_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5600 LDKHTLCOutputInCommitment* this_ptr_conv = (LDKHTLCOutputInCommitment*)this_ptr;
5601 return HTLCOutputInCommitment_set_amount_msat(this_ptr_conv, val);
5604 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1get_1cltv_1expiry(JNIEnv * _env, jclass _b, jlong this_ptr) {
5605 LDKHTLCOutputInCommitment* this_ptr_conv = (LDKHTLCOutputInCommitment*)this_ptr;
5606 return HTLCOutputInCommitment_get_cltv_expiry(this_ptr_conv);
5609 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1set_1cltv_1expiry(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
5610 LDKHTLCOutputInCommitment* this_ptr_conv = (LDKHTLCOutputInCommitment*)this_ptr;
5611 return HTLCOutputInCommitment_set_cltv_expiry(this_ptr_conv, val);
5614 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1get_1payment_1hash(JNIEnv * _env, jclass _b, jlong this_ptr) {
5615 LDKHTLCOutputInCommitment* this_ptr_conv = (LDKHTLCOutputInCommitment*)this_ptr;
5616 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
5617 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *HTLCOutputInCommitment_get_payment_hash(this_ptr_conv));
5621 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1set_1payment_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5622 LDKHTLCOutputInCommitment* this_ptr_conv = (LDKHTLCOutputInCommitment*)this_ptr;
5623 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
5625 return HTLCOutputInCommitment_set_payment_hash(this_ptr_conv, val_conv);
5628 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1write(JNIEnv * _env, jclass _b, jlong obj) {
5629 LDKHTLCOutputInCommitment* obj_conv = (LDKHTLCOutputInCommitment*)obj;
5630 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5631 *ret = HTLCOutputInCommitment_write(obj_conv);
5635 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1read(JNIEnv * _env, jclass _b, jlong ser) {
5636 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5638 LDKHTLCOutputInCommitment* ret = malloc(sizeof(LDKHTLCOutputInCommitment));
5639 *ret = HTLCOutputInCommitment_read(ser_conv);
5640 assert(!ret->_underlying_ref);
5641 ret->_underlying_ref = true;
5645 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_get_1htlc_1redeemscript(JNIEnv * _env, jclass _b, jlong htlc, jlong keys) {
5646 LDKHTLCOutputInCommitment* htlc_conv = (LDKHTLCOutputInCommitment*)htlc;
5647 LDKTxCreationKeys* keys_conv = (LDKTxCreationKeys*)keys;
5648 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5649 *ret = get_htlc_redeemscript(htlc_conv, keys_conv);
5653 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_make_1funding_1redeemscript(JNIEnv * _env, jclass _b, jlong a, jlong b) {
5654 LDKPublicKey a_conv = *(LDKPublicKey*)a;
5656 LDKPublicKey b_conv = *(LDKPublicKey*)b;
5658 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5659 *ret = make_funding_redeemscript(a_conv, b_conv);
5663 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_build_1htlc_1transaction(JNIEnv * _env, jclass _b, jbyteArray prev_hash, jint feerate_per_kw, jshort to_self_delay, jlong htlc, jlong a_delayed_payment_key, jlong revocation_key) {
5664 unsigned char prev_hash_arr[32];
5665 (*_env)->GetByteArrayRegion (_env, prev_hash, 0, 32, prev_hash_arr);
5666 unsigned char (*prev_hash_ref)[32] = &prev_hash_arr;
5667 LDKHTLCOutputInCommitment* htlc_conv = (LDKHTLCOutputInCommitment*)htlc;
5668 LDKPublicKey a_delayed_payment_key_conv = *(LDKPublicKey*)a_delayed_payment_key;
5669 free((void*)a_delayed_payment_key);
5670 LDKPublicKey revocation_key_conv = *(LDKPublicKey*)revocation_key;
5671 free((void*)revocation_key);
5672 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5673 *ret = build_htlc_transaction(prev_hash_ref, feerate_per_kw, to_self_delay, htlc_conv, a_delayed_payment_key_conv, revocation_key_conv);
5677 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5678 LDKLocalCommitmentTransaction this_ptr_conv = *(LDKLocalCommitmentTransaction*)this_ptr;
5679 free((void*)this_ptr);
5680 this_ptr_conv._underlying_ref = false;
5681 return LocalCommitmentTransaction_free(this_ptr_conv);
5684 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1get_1unsigned_1tx(JNIEnv * _env, jclass _b, jlong this_ptr) {
5685 LDKLocalCommitmentTransaction* this_ptr_conv = (LDKLocalCommitmentTransaction*)this_ptr;
5686 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5687 *ret = LocalCommitmentTransaction_get_unsigned_tx(this_ptr_conv);
5691 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1set_1unsigned_1tx(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5692 LDKLocalCommitmentTransaction* this_ptr_conv = (LDKLocalCommitmentTransaction*)this_ptr;
5693 LDKCVec_u8Z val_conv = *(LDKCVec_u8Z*)val;
5695 return LocalCommitmentTransaction_set_unsigned_tx(this_ptr_conv, val_conv);
5698 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1get_1their_1sig(JNIEnv * _env, jclass _b, jlong this_ptr) {
5699 LDKLocalCommitmentTransaction* this_ptr_conv = (LDKLocalCommitmentTransaction*)this_ptr;
5700 LDKSignature* ret = malloc(sizeof(LDKSignature));
5701 *ret = LocalCommitmentTransaction_get_their_sig(this_ptr_conv);
5705 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1set_1their_1sig(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5706 LDKLocalCommitmentTransaction* this_ptr_conv = (LDKLocalCommitmentTransaction*)this_ptr;
5707 LDKSignature val_conv = *(LDKSignature*)val;
5709 return LocalCommitmentTransaction_set_their_sig(this_ptr_conv, val_conv);
5712 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1get_1feerate_1per_1kw(JNIEnv * _env, jclass _b, jlong this_ptr) {
5713 LDKLocalCommitmentTransaction* this_ptr_conv = (LDKLocalCommitmentTransaction*)this_ptr;
5714 return LocalCommitmentTransaction_get_feerate_per_kw(this_ptr_conv);
5717 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1set_1feerate_1per_1kw(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
5718 LDKLocalCommitmentTransaction* this_ptr_conv = (LDKLocalCommitmentTransaction*)this_ptr;
5719 return LocalCommitmentTransaction_set_feerate_per_kw(this_ptr_conv, val);
5722 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1set_1per_1htlc(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5723 LDKLocalCommitmentTransaction* this_ptr_conv = (LDKLocalCommitmentTransaction*)this_ptr;
5724 LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ val_conv = *(LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ*)val;
5726 return LocalCommitmentTransaction_set_per_htlc(this_ptr_conv, val_conv);
5729 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) {
5730 LDKCVec_u8Z unsigned_tx_conv = *(LDKCVec_u8Z*)unsigned_tx;
5731 free((void*)unsigned_tx);
5732 LDKSignature their_sig_conv = *(LDKSignature*)their_sig;
5733 free((void*)their_sig);
5734 LDKPublicKey our_funding_key_conv = *(LDKPublicKey*)our_funding_key;
5735 free((void*)our_funding_key);
5736 LDKPublicKey their_funding_key_conv = *(LDKPublicKey*)their_funding_key;
5737 free((void*)their_funding_key);
5738 LDKTxCreationKeys local_keys_conv = *(LDKTxCreationKeys*)local_keys;
5739 free((void*)local_keys);
5740 local_keys_conv._underlying_ref = false;
5741 LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ htlc_data_conv = *(LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ*)htlc_data;
5742 free((void*)htlc_data);
5743 LDKLocalCommitmentTransaction* ret = malloc(sizeof(LDKLocalCommitmentTransaction));
5744 *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);
5745 assert(!ret->_underlying_ref);
5746 ret->_underlying_ref = true;
5750 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1trust_1key_1derivation(JNIEnv * _env, jclass _b, jlong this_arg) {
5751 LDKLocalCommitmentTransaction* this_arg_conv = (LDKLocalCommitmentTransaction*)this_arg;
5752 LDKTxCreationKeys* ret = malloc(sizeof(LDKTxCreationKeys));
5753 *ret = LocalCommitmentTransaction_trust_key_derivation(this_arg_conv);
5754 assert(!ret->_underlying_ref);
5755 ret->_underlying_ref = true;
5759 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1txid(JNIEnv * _env, jclass _b, jlong this_arg) {
5760 LDKLocalCommitmentTransaction* this_arg_conv = (LDKLocalCommitmentTransaction*)this_arg;
5761 LDKThirtyTwoBytes* ret = malloc(sizeof(LDKThirtyTwoBytes));
5762 *ret = LocalCommitmentTransaction_txid(this_arg_conv);
5766 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) {
5767 LDKLocalCommitmentTransaction* this_arg_conv = (LDKLocalCommitmentTransaction*)this_arg;
5768 unsigned char funding_key_arr[32];
5769 (*_env)->GetByteArrayRegion (_env, funding_key, 0, 32, funding_key_arr);
5770 unsigned char (*funding_key_ref)[32] = &funding_key_arr;
5771 LDKu8slice funding_redeemscript_conv = *(LDKu8slice*)funding_redeemscript;
5772 free((void*)funding_redeemscript);
5773 LDKSignature* ret = malloc(sizeof(LDKSignature));
5774 *ret = LocalCommitmentTransaction_get_local_sig(this_arg_conv, funding_key_ref, funding_redeemscript_conv, channel_value_satoshis);
5778 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1get_1htlc_1sigs(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray htlc_base_key, jshort local_csv) {
5779 LDKLocalCommitmentTransaction* this_arg_conv = (LDKLocalCommitmentTransaction*)this_arg;
5780 unsigned char htlc_base_key_arr[32];
5781 (*_env)->GetByteArrayRegion (_env, htlc_base_key, 0, 32, htlc_base_key_arr);
5782 unsigned char (*htlc_base_key_ref)[32] = &htlc_base_key_arr;
5783 LDKCResult_CVec_SignatureZNoneZ* ret = malloc(sizeof(LDKCResult_CVec_SignatureZNoneZ));
5784 *ret = LocalCommitmentTransaction_get_htlc_sigs(this_arg_conv, htlc_base_key_ref, local_csv);
5788 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1write(JNIEnv * _env, jclass _b, jlong obj) {
5789 LDKLocalCommitmentTransaction* obj_conv = (LDKLocalCommitmentTransaction*)obj;
5790 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5791 *ret = LocalCommitmentTransaction_write(obj_conv);
5795 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1read(JNIEnv * _env, jclass _b, jlong ser) {
5796 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5798 LDKLocalCommitmentTransaction* ret = malloc(sizeof(LDKLocalCommitmentTransaction));
5799 *ret = LocalCommitmentTransaction_read(ser_conv);
5800 assert(!ret->_underlying_ref);
5801 ret->_underlying_ref = true;
5805 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InitFeatures_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5806 LDKInitFeatures this_ptr_conv = *(LDKInitFeatures*)this_ptr;
5807 free((void*)this_ptr);
5808 this_ptr_conv._underlying_ref = false;
5809 return InitFeatures_free(this_ptr_conv);
5812 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5813 LDKNodeFeatures this_ptr_conv = *(LDKNodeFeatures*)this_ptr;
5814 free((void*)this_ptr);
5815 this_ptr_conv._underlying_ref = false;
5816 return NodeFeatures_free(this_ptr_conv);
5819 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelFeatures_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5820 LDKChannelFeatures this_ptr_conv = *(LDKChannelFeatures*)this_ptr;
5821 free((void*)this_ptr);
5822 this_ptr_conv._underlying_ref = false;
5823 return ChannelFeatures_free(this_ptr_conv);
5826 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHop_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5827 LDKRouteHop this_ptr_conv = *(LDKRouteHop*)this_ptr;
5828 free((void*)this_ptr);
5829 this_ptr_conv._underlying_ref = false;
5830 return RouteHop_free(this_ptr_conv);
5833 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHop_1get_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr) {
5834 LDKRouteHop* this_ptr_conv = (LDKRouteHop*)this_ptr;
5835 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5836 *ret = RouteHop_get_pubkey(this_ptr_conv);
5840 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHop_1set_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5841 LDKRouteHop* this_ptr_conv = (LDKRouteHop*)this_ptr;
5842 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5844 return RouteHop_set_pubkey(this_ptr_conv, val_conv);
5847 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHop_1get_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
5848 LDKRouteHop* this_ptr_conv = (LDKRouteHop*)this_ptr;
5849 return RouteHop_get_short_channel_id(this_ptr_conv);
5852 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHop_1set_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5853 LDKRouteHop* this_ptr_conv = (LDKRouteHop*)this_ptr;
5854 return RouteHop_set_short_channel_id(this_ptr_conv, val);
5857 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHop_1get_1fee_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
5858 LDKRouteHop* this_ptr_conv = (LDKRouteHop*)this_ptr;
5859 return RouteHop_get_fee_msat(this_ptr_conv);
5862 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHop_1set_1fee_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5863 LDKRouteHop* this_ptr_conv = (LDKRouteHop*)this_ptr;
5864 return RouteHop_set_fee_msat(this_ptr_conv, val);
5867 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_RouteHop_1get_1cltv_1expiry_1delta(JNIEnv * _env, jclass _b, jlong this_ptr) {
5868 LDKRouteHop* this_ptr_conv = (LDKRouteHop*)this_ptr;
5869 return RouteHop_get_cltv_expiry_delta(this_ptr_conv);
5872 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHop_1set_1cltv_1expiry_1delta(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
5873 LDKRouteHop* this_ptr_conv = (LDKRouteHop*)this_ptr;
5874 return RouteHop_set_cltv_expiry_delta(this_ptr_conv, val);
5877 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Route_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5878 LDKRoute this_ptr_conv = *(LDKRoute*)this_ptr;
5879 free((void*)this_ptr);
5880 this_ptr_conv._underlying_ref = false;
5881 return Route_free(this_ptr_conv);
5884 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Route_1set_1paths(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5885 LDKRoute* this_ptr_conv = (LDKRoute*)this_ptr;
5886 LDKCVec_CVec_RouteHopZZ val_conv = *(LDKCVec_CVec_RouteHopZZ*)val;
5888 return Route_set_paths(this_ptr_conv, val_conv);
5891 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Route_1new(JNIEnv * _env, jclass _b, jlong paths_arg) {
5892 LDKCVec_CVec_RouteHopZZ paths_arg_conv = *(LDKCVec_CVec_RouteHopZZ*)paths_arg;
5893 free((void*)paths_arg);
5894 LDKRoute* ret = malloc(sizeof(LDKRoute));
5895 *ret = Route_new(paths_arg_conv);
5896 assert(!ret->_underlying_ref);
5897 ret->_underlying_ref = true;
5901 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Route_1write(JNIEnv * _env, jclass _b, jlong obj) {
5902 LDKRoute* obj_conv = (LDKRoute*)obj;
5903 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5904 *ret = Route_write(obj_conv);
5908 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Route_1read(JNIEnv * _env, jclass _b, jlong ser) {
5909 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5911 LDKRoute* ret = malloc(sizeof(LDKRoute));
5912 *ret = Route_read(ser_conv);
5913 assert(!ret->_underlying_ref);
5914 ret->_underlying_ref = true;
5918 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5919 LDKRouteHint this_ptr_conv = *(LDKRouteHint*)this_ptr;
5920 free((void*)this_ptr);
5921 this_ptr_conv._underlying_ref = false;
5922 return RouteHint_free(this_ptr_conv);
5925 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHint_1get_1src_1node_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
5926 LDKRouteHint* this_ptr_conv = (LDKRouteHint*)this_ptr;
5927 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5928 *ret = RouteHint_get_src_node_id(this_ptr_conv);
5932 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1set_1src_1node_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5933 LDKRouteHint* this_ptr_conv = (LDKRouteHint*)this_ptr;
5934 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5936 return RouteHint_set_src_node_id(this_ptr_conv, val_conv);
5939 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHint_1get_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
5940 LDKRouteHint* this_ptr_conv = (LDKRouteHint*)this_ptr;
5941 return RouteHint_get_short_channel_id(this_ptr_conv);
5944 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1set_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5945 LDKRouteHint* this_ptr_conv = (LDKRouteHint*)this_ptr;
5946 return RouteHint_set_short_channel_id(this_ptr_conv, val);
5949 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHint_1get_1fees(JNIEnv * _env, jclass _b, jlong this_ptr) {
5950 LDKRouteHint* this_ptr_conv = (LDKRouteHint*)this_ptr;
5951 LDKRoutingFees* ret = malloc(sizeof(LDKRoutingFees));
5952 *ret = RouteHint_get_fees(this_ptr_conv);
5953 assert(!ret->_underlying_ref);
5954 ret->_underlying_ref = true;
5958 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1set_1fees(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5959 LDKRouteHint* this_ptr_conv = (LDKRouteHint*)this_ptr;
5960 LDKRoutingFees val_conv = *(LDKRoutingFees*)val;
5962 val_conv._underlying_ref = false;
5963 return RouteHint_set_fees(this_ptr_conv, val_conv);
5966 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_RouteHint_1get_1cltv_1expiry_1delta(JNIEnv * _env, jclass _b, jlong this_ptr) {
5967 LDKRouteHint* this_ptr_conv = (LDKRouteHint*)this_ptr;
5968 return RouteHint_get_cltv_expiry_delta(this_ptr_conv);
5971 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1set_1cltv_1expiry_1delta(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
5972 LDKRouteHint* this_ptr_conv = (LDKRouteHint*)this_ptr;
5973 return RouteHint_set_cltv_expiry_delta(this_ptr_conv, val);
5976 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHint_1get_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
5977 LDKRouteHint* this_ptr_conv = (LDKRouteHint*)this_ptr;
5978 return RouteHint_get_htlc_minimum_msat(this_ptr_conv);
5981 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1set_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5982 LDKRouteHint* this_ptr_conv = (LDKRouteHint*)this_ptr;
5983 return RouteHint_set_htlc_minimum_msat(this_ptr_conv, val);
5986 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHint_1new(JNIEnv * _env, jclass _b, jlong src_node_id_arg, jlong short_channel_id_arg, jlong fees_arg, jshort cltv_expiry_delta_arg, jlong htlc_minimum_msat_arg) {
5987 LDKPublicKey src_node_id_arg_conv = *(LDKPublicKey*)src_node_id_arg;
5988 free((void*)src_node_id_arg);
5989 LDKRoutingFees fees_arg_conv = *(LDKRoutingFees*)fees_arg;
5990 free((void*)fees_arg);
5991 fees_arg_conv._underlying_ref = false;
5992 LDKRouteHint* ret = malloc(sizeof(LDKRouteHint));
5993 *ret = RouteHint_new(src_node_id_arg_conv, short_channel_id_arg, fees_arg_conv, cltv_expiry_delta_arg, htlc_minimum_msat_arg);
5994 assert(!ret->_underlying_ref);
5995 ret->_underlying_ref = true;
5999 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) {
6000 LDKPublicKey our_node_id_conv = *(LDKPublicKey*)our_node_id;
6001 free((void*)our_node_id);
6002 LDKNetworkGraph* network_conv = (LDKNetworkGraph*)network;
6003 LDKPublicKey target_conv = *(LDKPublicKey*)target;
6004 free((void*)target);
6005 LDKCVec_ChannelDetailsZ* first_hops_conv = (LDKCVec_ChannelDetailsZ*)first_hops;
6006 LDKCVec_RouteHintZ last_hops_conv = *(LDKCVec_RouteHintZ*)last_hops;
6007 free((void*)last_hops);
6008 LDKLogger logger_conv = *(LDKLogger*)logger;
6009 free((void*)logger);
6010 LDKCResult_RouteLightningErrorZ* ret = malloc(sizeof(LDKCResult_RouteLightningErrorZ));
6011 *ret = get_route(our_node_id_conv, network_conv, target_conv, first_hops_conv, last_hops_conv, final_value_msat, final_cltv, logger_conv);
6015 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
6016 LDKNetworkGraph this_ptr_conv = *(LDKNetworkGraph*)this_ptr;
6017 free((void*)this_ptr);
6018 this_ptr_conv._underlying_ref = false;
6019 return NetworkGraph_free(this_ptr_conv);
6022 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LockedNetworkGraph_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
6023 LDKLockedNetworkGraph this_ptr_conv = *(LDKLockedNetworkGraph*)this_ptr;
6024 free((void*)this_ptr);
6025 this_ptr_conv._underlying_ref = false;
6026 return LockedNetworkGraph_free(this_ptr_conv);
6029 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetGraphMsgHandler_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
6030 LDKNetGraphMsgHandler this_ptr_conv = *(LDKNetGraphMsgHandler*)this_ptr;
6031 free((void*)this_ptr);
6032 this_ptr_conv._underlying_ref = false;
6033 return NetGraphMsgHandler_free(this_ptr_conv);
6036 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetGraphMsgHandler_1new(JNIEnv * _env, jclass _b, jlong chain_monitor, jlong logger) {
6037 LDKChainWatchInterface chain_monitor_conv = *(LDKChainWatchInterface*)chain_monitor;
6038 free((void*)chain_monitor);
6039 LDKLogger logger_conv = *(LDKLogger*)logger;
6040 free((void*)logger);
6041 LDKNetGraphMsgHandler* ret = malloc(sizeof(LDKNetGraphMsgHandler));
6042 *ret = NetGraphMsgHandler_new(chain_monitor_conv, logger_conv);
6043 assert(!ret->_underlying_ref);
6044 ret->_underlying_ref = true;
6048 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetGraphMsgHandler_1from_1net_1graph(JNIEnv * _env, jclass _b, jlong chain_monitor, jlong logger, jlong network_graph) {
6049 LDKChainWatchInterface chain_monitor_conv = *(LDKChainWatchInterface*)chain_monitor;
6050 free((void*)chain_monitor);
6051 LDKLogger logger_conv = *(LDKLogger*)logger;
6052 free((void*)logger);
6053 LDKNetworkGraph network_graph_conv = *(LDKNetworkGraph*)network_graph;
6054 free((void*)network_graph);
6055 network_graph_conv._underlying_ref = false;
6056 LDKNetGraphMsgHandler* ret = malloc(sizeof(LDKNetGraphMsgHandler));
6057 *ret = NetGraphMsgHandler_from_net_graph(chain_monitor_conv, logger_conv, network_graph_conv);
6058 assert(!ret->_underlying_ref);
6059 ret->_underlying_ref = true;
6063 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetGraphMsgHandler_1read_1locked_1graph(JNIEnv * _env, jclass _b, jlong this_arg) {
6064 LDKNetGraphMsgHandler* this_arg_conv = (LDKNetGraphMsgHandler*)this_arg;
6065 LDKLockedNetworkGraph* ret = malloc(sizeof(LDKLockedNetworkGraph));
6066 *ret = NetGraphMsgHandler_read_locked_graph(this_arg_conv);
6067 assert(!ret->_underlying_ref);
6068 ret->_underlying_ref = true;
6072 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LockedNetworkGraph_1graph(JNIEnv * _env, jclass _b, jlong this_arg) {
6073 LDKLockedNetworkGraph* this_arg_conv = (LDKLockedNetworkGraph*)this_arg;
6074 LDKNetworkGraph* ret = malloc(sizeof(LDKNetworkGraph));
6075 *ret = LockedNetworkGraph_graph(this_arg_conv);
6076 assert(!ret->_underlying_ref);
6077 ret->_underlying_ref = true;
6081 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetGraphMsgHandler_1as_1RoutingMessageHandler(JNIEnv * _env, jclass _b, jlong this_arg) {
6082 LDKNetGraphMsgHandler* this_arg_conv = (LDKNetGraphMsgHandler*)this_arg;
6083 LDKRoutingMessageHandler* ret = malloc(sizeof(LDKRoutingMessageHandler));
6084 *ret = NetGraphMsgHandler_as_RoutingMessageHandler(this_arg_conv);
6088 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
6089 LDKDirectionalChannelInfo this_ptr_conv = *(LDKDirectionalChannelInfo*)this_ptr;
6090 free((void*)this_ptr);
6091 this_ptr_conv._underlying_ref = false;
6092 return DirectionalChannelInfo_free(this_ptr_conv);
6095 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1get_1last_1update(JNIEnv * _env, jclass _b, jlong this_ptr) {
6096 LDKDirectionalChannelInfo* this_ptr_conv = (LDKDirectionalChannelInfo*)this_ptr;
6097 return DirectionalChannelInfo_get_last_update(this_ptr_conv);
6100 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1set_1last_1update(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
6101 LDKDirectionalChannelInfo* this_ptr_conv = (LDKDirectionalChannelInfo*)this_ptr;
6102 return DirectionalChannelInfo_set_last_update(this_ptr_conv, val);
6105 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1get_1enabled(JNIEnv * _env, jclass _b, jlong this_ptr) {
6106 LDKDirectionalChannelInfo* this_ptr_conv = (LDKDirectionalChannelInfo*)this_ptr;
6107 return DirectionalChannelInfo_get_enabled(this_ptr_conv);
6110 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1set_1enabled(JNIEnv * _env, jclass _b, jlong this_ptr, jboolean val) {
6111 LDKDirectionalChannelInfo* this_ptr_conv = (LDKDirectionalChannelInfo*)this_ptr;
6112 return DirectionalChannelInfo_set_enabled(this_ptr_conv, val);
6115 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1get_1cltv_1expiry_1delta(JNIEnv * _env, jclass _b, jlong this_ptr) {
6116 LDKDirectionalChannelInfo* this_ptr_conv = (LDKDirectionalChannelInfo*)this_ptr;
6117 return DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr_conv);
6120 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1set_1cltv_1expiry_1delta(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
6121 LDKDirectionalChannelInfo* this_ptr_conv = (LDKDirectionalChannelInfo*)this_ptr;
6122 return DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr_conv, val);
6125 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1get_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
6126 LDKDirectionalChannelInfo* this_ptr_conv = (LDKDirectionalChannelInfo*)this_ptr;
6127 return DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr_conv);
6130 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1set_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6131 LDKDirectionalChannelInfo* this_ptr_conv = (LDKDirectionalChannelInfo*)this_ptr;
6132 return DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr_conv, val);
6135 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1write(JNIEnv * _env, jclass _b, jlong obj) {
6136 LDKDirectionalChannelInfo* obj_conv = (LDKDirectionalChannelInfo*)obj;
6137 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
6138 *ret = DirectionalChannelInfo_write(obj_conv);
6142 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1read(JNIEnv * _env, jclass _b, jlong ser) {
6143 LDKu8slice ser_conv = *(LDKu8slice*)ser;
6145 LDKDirectionalChannelInfo* ret = malloc(sizeof(LDKDirectionalChannelInfo));
6146 *ret = DirectionalChannelInfo_read(ser_conv);
6147 assert(!ret->_underlying_ref);
6148 ret->_underlying_ref = true;
6152 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
6153 LDKChannelInfo this_ptr_conv = *(LDKChannelInfo*)this_ptr;
6154 free((void*)this_ptr);
6155 this_ptr_conv._underlying_ref = false;
6156 return ChannelInfo_free(this_ptr_conv);
6159 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1get_1node_1one(JNIEnv * _env, jclass _b, jlong this_ptr) {
6160 LDKChannelInfo* this_ptr_conv = (LDKChannelInfo*)this_ptr;
6161 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
6162 *ret = ChannelInfo_get_node_one(this_ptr_conv);
6166 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1set_1node_1one(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6167 LDKChannelInfo* this_ptr_conv = (LDKChannelInfo*)this_ptr;
6168 LDKPublicKey val_conv = *(LDKPublicKey*)val;
6170 return ChannelInfo_set_node_one(this_ptr_conv, val_conv);
6173 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1get_1one_1to_1two(JNIEnv * _env, jclass _b, jlong this_ptr) {
6174 LDKChannelInfo* this_ptr_conv = (LDKChannelInfo*)this_ptr;
6175 LDKDirectionalChannelInfo* ret = malloc(sizeof(LDKDirectionalChannelInfo));
6176 *ret = ChannelInfo_get_one_to_two(this_ptr_conv);
6177 assert(!ret->_underlying_ref);
6178 ret->_underlying_ref = true;
6182 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1set_1one_1to_1two(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6183 LDKChannelInfo* this_ptr_conv = (LDKChannelInfo*)this_ptr;
6184 LDKDirectionalChannelInfo val_conv = *(LDKDirectionalChannelInfo*)val;
6186 val_conv._underlying_ref = false;
6187 return ChannelInfo_set_one_to_two(this_ptr_conv, val_conv);
6190 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1get_1node_1two(JNIEnv * _env, jclass _b, jlong this_ptr) {
6191 LDKChannelInfo* this_ptr_conv = (LDKChannelInfo*)this_ptr;
6192 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
6193 *ret = ChannelInfo_get_node_two(this_ptr_conv);
6197 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1set_1node_1two(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6198 LDKChannelInfo* this_ptr_conv = (LDKChannelInfo*)this_ptr;
6199 LDKPublicKey val_conv = *(LDKPublicKey*)val;
6201 return ChannelInfo_set_node_two(this_ptr_conv, val_conv);
6204 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1get_1two_1to_1one(JNIEnv * _env, jclass _b, jlong this_ptr) {
6205 LDKChannelInfo* this_ptr_conv = (LDKChannelInfo*)this_ptr;
6206 LDKDirectionalChannelInfo* ret = malloc(sizeof(LDKDirectionalChannelInfo));
6207 *ret = ChannelInfo_get_two_to_one(this_ptr_conv);
6208 assert(!ret->_underlying_ref);
6209 ret->_underlying_ref = true;
6213 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1set_1two_1to_1one(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6214 LDKChannelInfo* this_ptr_conv = (LDKChannelInfo*)this_ptr;
6215 LDKDirectionalChannelInfo val_conv = *(LDKDirectionalChannelInfo*)val;
6217 val_conv._underlying_ref = false;
6218 return ChannelInfo_set_two_to_one(this_ptr_conv, val_conv);
6221 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1write(JNIEnv * _env, jclass _b, jlong obj) {
6222 LDKChannelInfo* obj_conv = (LDKChannelInfo*)obj;
6223 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
6224 *ret = ChannelInfo_write(obj_conv);
6228 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1read(JNIEnv * _env, jclass _b, jlong ser) {
6229 LDKu8slice ser_conv = *(LDKu8slice*)ser;
6231 LDKChannelInfo* ret = malloc(sizeof(LDKChannelInfo));
6232 *ret = ChannelInfo_read(ser_conv);
6233 assert(!ret->_underlying_ref);
6234 ret->_underlying_ref = true;
6238 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingFees_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
6239 LDKRoutingFees this_ptr_conv = *(LDKRoutingFees*)this_ptr;
6240 free((void*)this_ptr);
6241 this_ptr_conv._underlying_ref = false;
6242 return RoutingFees_free(this_ptr_conv);
6245 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_RoutingFees_1get_1base_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
6246 LDKRoutingFees* this_ptr_conv = (LDKRoutingFees*)this_ptr;
6247 return RoutingFees_get_base_msat(this_ptr_conv);
6250 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingFees_1set_1base_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
6251 LDKRoutingFees* this_ptr_conv = (LDKRoutingFees*)this_ptr;
6252 return RoutingFees_set_base_msat(this_ptr_conv, val);
6255 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_RoutingFees_1get_1proportional_1millionths(JNIEnv * _env, jclass _b, jlong this_ptr) {
6256 LDKRoutingFees* this_ptr_conv = (LDKRoutingFees*)this_ptr;
6257 return RoutingFees_get_proportional_millionths(this_ptr_conv);
6260 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingFees_1set_1proportional_1millionths(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
6261 LDKRoutingFees* this_ptr_conv = (LDKRoutingFees*)this_ptr;
6262 return RoutingFees_set_proportional_millionths(this_ptr_conv, val);
6265 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingFees_1new(JNIEnv * _env, jclass _b, jint base_msat_arg, jint proportional_millionths_arg) {
6266 LDKRoutingFees* ret = malloc(sizeof(LDKRoutingFees));
6267 *ret = RoutingFees_new(base_msat_arg, proportional_millionths_arg);
6268 assert(!ret->_underlying_ref);
6269 ret->_underlying_ref = true;
6273 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingFees_1read(JNIEnv * _env, jclass _b, jlong ser) {
6274 LDKu8slice ser_conv = *(LDKu8slice*)ser;
6276 LDKRoutingFees* ret = malloc(sizeof(LDKRoutingFees));
6277 *ret = RoutingFees_read(ser_conv);
6278 assert(!ret->_underlying_ref);
6279 ret->_underlying_ref = true;
6283 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingFees_1write(JNIEnv * _env, jclass _b, jlong obj) {
6284 LDKRoutingFees* obj_conv = (LDKRoutingFees*)obj;
6285 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
6286 *ret = RoutingFees_write(obj_conv);
6290 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
6291 LDKNodeAnnouncementInfo this_ptr_conv = *(LDKNodeAnnouncementInfo*)this_ptr;
6292 free((void*)this_ptr);
6293 this_ptr_conv._underlying_ref = false;
6294 return NodeAnnouncementInfo_free(this_ptr_conv);
6297 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1get_1last_1update(JNIEnv * _env, jclass _b, jlong this_ptr) {
6298 LDKNodeAnnouncementInfo* this_ptr_conv = (LDKNodeAnnouncementInfo*)this_ptr;
6299 return NodeAnnouncementInfo_get_last_update(this_ptr_conv);
6302 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1set_1last_1update(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
6303 LDKNodeAnnouncementInfo* this_ptr_conv = (LDKNodeAnnouncementInfo*)this_ptr;
6304 return NodeAnnouncementInfo_set_last_update(this_ptr_conv, val);
6307 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1get_1rgb(JNIEnv * _env, jclass _b, jlong this_ptr) {
6308 LDKNodeAnnouncementInfo* this_ptr_conv = (LDKNodeAnnouncementInfo*)this_ptr;
6309 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 3);
6310 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 3, *NodeAnnouncementInfo_get_rgb(this_ptr_conv));
6314 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1set_1rgb(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6315 LDKNodeAnnouncementInfo* this_ptr_conv = (LDKNodeAnnouncementInfo*)this_ptr;
6316 LDKThreeBytes val_conv = *(LDKThreeBytes*)val;
6318 return NodeAnnouncementInfo_set_rgb(this_ptr_conv, val_conv);
6321 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1get_1alias(JNIEnv * _env, jclass _b, jlong this_ptr) {
6322 LDKNodeAnnouncementInfo* this_ptr_conv = (LDKNodeAnnouncementInfo*)this_ptr;
6323 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
6324 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *NodeAnnouncementInfo_get_alias(this_ptr_conv));
6328 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1set_1alias(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6329 LDKNodeAnnouncementInfo* this_ptr_conv = (LDKNodeAnnouncementInfo*)this_ptr;
6330 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
6332 return NodeAnnouncementInfo_set_alias(this_ptr_conv, val_conv);
6335 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1set_1addresses(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6336 LDKNodeAnnouncementInfo* this_ptr_conv = (LDKNodeAnnouncementInfo*)this_ptr;
6337 LDKCVec_NetAddressZ val_conv = *(LDKCVec_NetAddressZ*)val;
6339 return NodeAnnouncementInfo_set_addresses(this_ptr_conv, val_conv);
6342 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1write(JNIEnv * _env, jclass _b, jlong obj) {
6343 LDKNodeAnnouncementInfo* obj_conv = (LDKNodeAnnouncementInfo*)obj;
6344 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
6345 *ret = NodeAnnouncementInfo_write(obj_conv);
6349 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1read(JNIEnv * _env, jclass _b, jlong ser) {
6350 LDKu8slice ser_conv = *(LDKu8slice*)ser;
6352 LDKNodeAnnouncementInfo* ret = malloc(sizeof(LDKNodeAnnouncementInfo));
6353 *ret = NodeAnnouncementInfo_read(ser_conv);
6354 assert(!ret->_underlying_ref);
6355 ret->_underlying_ref = true;
6359 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeInfo_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
6360 LDKNodeInfo this_ptr_conv = *(LDKNodeInfo*)this_ptr;
6361 free((void*)this_ptr);
6362 this_ptr_conv._underlying_ref = false;
6363 return NodeInfo_free(this_ptr_conv);
6366 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeInfo_1set_1channels(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6367 LDKNodeInfo* this_ptr_conv = (LDKNodeInfo*)this_ptr;
6368 LDKCVec_u64Z val_conv = *(LDKCVec_u64Z*)val;
6370 return NodeInfo_set_channels(this_ptr_conv, val_conv);
6373 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeInfo_1get_1lowest_1inbound_1channel_1fees(JNIEnv * _env, jclass _b, jlong this_ptr) {
6374 LDKNodeInfo* this_ptr_conv = (LDKNodeInfo*)this_ptr;
6375 LDKRoutingFees* ret = malloc(sizeof(LDKRoutingFees));
6376 *ret = NodeInfo_get_lowest_inbound_channel_fees(this_ptr_conv);
6377 assert(!ret->_underlying_ref);
6378 ret->_underlying_ref = true;
6382 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeInfo_1set_1lowest_1inbound_1channel_1fees(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6383 LDKNodeInfo* this_ptr_conv = (LDKNodeInfo*)this_ptr;
6384 LDKRoutingFees val_conv = *(LDKRoutingFees*)val;
6386 val_conv._underlying_ref = false;
6387 return NodeInfo_set_lowest_inbound_channel_fees(this_ptr_conv, val_conv);
6390 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeInfo_1get_1announcement_1info(JNIEnv * _env, jclass _b, jlong this_ptr) {
6391 LDKNodeInfo* this_ptr_conv = (LDKNodeInfo*)this_ptr;
6392 LDKNodeAnnouncementInfo* ret = malloc(sizeof(LDKNodeAnnouncementInfo));
6393 *ret = NodeInfo_get_announcement_info(this_ptr_conv);
6394 assert(!ret->_underlying_ref);
6395 ret->_underlying_ref = true;
6399 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeInfo_1set_1announcement_1info(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6400 LDKNodeInfo* this_ptr_conv = (LDKNodeInfo*)this_ptr;
6401 LDKNodeAnnouncementInfo val_conv = *(LDKNodeAnnouncementInfo*)val;
6403 val_conv._underlying_ref = false;
6404 return NodeInfo_set_announcement_info(this_ptr_conv, val_conv);
6407 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) {
6408 LDKCVec_u64Z channels_arg_conv = *(LDKCVec_u64Z*)channels_arg;
6409 free((void*)channels_arg);
6410 LDKRoutingFees lowest_inbound_channel_fees_arg_conv = *(LDKRoutingFees*)lowest_inbound_channel_fees_arg;
6411 free((void*)lowest_inbound_channel_fees_arg);
6412 lowest_inbound_channel_fees_arg_conv._underlying_ref = false;
6413 LDKNodeAnnouncementInfo announcement_info_arg_conv = *(LDKNodeAnnouncementInfo*)announcement_info_arg;
6414 free((void*)announcement_info_arg);
6415 announcement_info_arg_conv._underlying_ref = false;
6416 LDKNodeInfo* ret = malloc(sizeof(LDKNodeInfo));
6417 *ret = NodeInfo_new(channels_arg_conv, lowest_inbound_channel_fees_arg_conv, announcement_info_arg_conv);
6418 assert(!ret->_underlying_ref);
6419 ret->_underlying_ref = true;
6423 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeInfo_1write(JNIEnv * _env, jclass _b, jlong obj) {
6424 LDKNodeInfo* obj_conv = (LDKNodeInfo*)obj;
6425 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
6426 *ret = NodeInfo_write(obj_conv);
6430 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeInfo_1read(JNIEnv * _env, jclass _b, jlong ser) {
6431 LDKu8slice ser_conv = *(LDKu8slice*)ser;
6433 LDKNodeInfo* ret = malloc(sizeof(LDKNodeInfo));
6434 *ret = NodeInfo_read(ser_conv);
6435 assert(!ret->_underlying_ref);
6436 ret->_underlying_ref = true;
6440 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1write(JNIEnv * _env, jclass _b, jlong obj) {
6441 LDKNetworkGraph* obj_conv = (LDKNetworkGraph*)obj;
6442 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
6443 *ret = NetworkGraph_write(obj_conv);
6447 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1read(JNIEnv * _env, jclass _b, jlong ser) {
6448 LDKu8slice ser_conv = *(LDKu8slice*)ser;
6450 LDKNetworkGraph* ret = malloc(sizeof(LDKNetworkGraph));
6451 *ret = NetworkGraph_read(ser_conv);
6452 assert(!ret->_underlying_ref);
6453 ret->_underlying_ref = true;
6457 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1new(JNIEnv * _env, jclass _b) {
6458 LDKNetworkGraph* ret = malloc(sizeof(LDKNetworkGraph));
6459 *ret = NetworkGraph_new();
6460 assert(!ret->_underlying_ref);
6461 ret->_underlying_ref = true;
6465 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) {
6466 LDKNetworkGraph* this_arg_conv = (LDKNetworkGraph*)this_arg;
6467 return NetworkGraph_close_channel_from_update(this_arg_conv, short_channel_id, is_permanent);