1 #include "org_ldk_impl_bindings.h"
2 #include <rust_types.h>
8 typedef struct LDKMessageSendEventsProvider_JCalls {
11 jmethodID get_and_clear_pending_msg_events_meth;
12 } LDKMessageSendEventsProvider_JCalls;
13 LDKCVec_MessageSendEventZ get_and_clear_pending_msg_events_jcall(const void* this_arg) {
14 LDKMessageSendEventsProvider_JCalls *j_calls = (LDKMessageSendEventsProvider_JCalls*) this_arg;
15 LDKCVec_MessageSendEventZ* ret = (LDKCVec_MessageSendEventZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->get_and_clear_pending_msg_events_meth);
16 LDKCVec_MessageSendEventZ res = *ret;
20 void LDKMessageSendEventsProvider_JCalls_free(void* this_arg) {
21 LDKMessageSendEventsProvider_JCalls *j_calls = (LDKMessageSendEventsProvider_JCalls*) this_arg;
22 (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o);
25 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKMessageSendEventsProvider_1new (JNIEnv * env, jclass _a, jobject o) {
26 jclass c = (*env)->GetObjectClass(env, o);
28 LDKMessageSendEventsProvider_JCalls *calls = malloc(sizeof(LDKMessageSendEventsProvider_JCalls));
30 calls->o = (*env)->NewGlobalRef(env, o);
31 calls->get_and_clear_pending_msg_events_meth = (*env)->GetMethodID(env, c, "get_and_clear_pending_msg_events", "()J");
32 assert(calls->get_and_clear_pending_msg_events_meth != NULL);
34 LDKMessageSendEventsProvider *ret = malloc(sizeof(LDKMessageSendEventsProvider));
35 ret->this_arg = (void*) calls;
36 ret->get_and_clear_pending_msg_events = get_and_clear_pending_msg_events_jcall;
37 ret->free = LDKMessageSendEventsProvider_JCalls_free;
41 typedef struct LDKEventsProvider_JCalls {
44 jmethodID get_and_clear_pending_events_meth;
45 } LDKEventsProvider_JCalls;
46 LDKCVec_EventZ get_and_clear_pending_events_jcall(const void* this_arg) {
47 LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) this_arg;
48 LDKCVec_EventZ* ret = (LDKCVec_EventZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->get_and_clear_pending_events_meth);
49 LDKCVec_EventZ res = *ret;
53 void LDKEventsProvider_JCalls_free(void* this_arg) {
54 LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) this_arg;
55 (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o);
58 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKEventsProvider_1new (JNIEnv * env, jclass _a, jobject o) {
59 jclass c = (*env)->GetObjectClass(env, o);
61 LDKEventsProvider_JCalls *calls = malloc(sizeof(LDKEventsProvider_JCalls));
63 calls->o = (*env)->NewGlobalRef(env, o);
64 calls->get_and_clear_pending_events_meth = (*env)->GetMethodID(env, c, "get_and_clear_pending_events", "()J");
65 assert(calls->get_and_clear_pending_events_meth != NULL);
67 LDKEventsProvider *ret = malloc(sizeof(LDKEventsProvider));
68 ret->this_arg = (void*) calls;
69 ret->get_and_clear_pending_events = get_and_clear_pending_events_jcall;
70 ret->free = LDKEventsProvider_JCalls_free;
74 typedef struct LDKLogger_JCalls {
79 void log_jcall(const void* this_arg, const char *record) {
80 LDKLogger_JCalls *j_calls = (LDKLogger_JCalls*) this_arg;
81 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", "(Ljava/lang/String;)V");
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 jbyteArray txid_arr = (*j_calls->env)->NewByteArray(j_calls->env, 32);
117 (*j_calls->env)->SetByteArrayRegion(j_calls->env, txid_arr, 0, 32, *txid);
118 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->install_watch_tx_meth, txid_arr, script_pub_key);
120 void install_watch_outpoint_jcall(const void* this_arg, LDKC2Tuple_Txidu32Z outpoint, LDKu8slice out_script) {
121 LDKChainWatchInterface_JCalls *j_calls = (LDKChainWatchInterface_JCalls*) this_arg;
122 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->install_watch_outpoint_meth, outpoint, out_script);
124 void watch_all_txn_jcall(const void* this_arg) {
125 LDKChainWatchInterface_JCalls *j_calls = (LDKChainWatchInterface_JCalls*) this_arg;
126 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->watch_all_txn_meth);
128 LDKCResult_C2Tuple_Scriptu64ZChainErrorZ get_chain_utxo_jcall(const void* this_arg, LDKThirtyTwoBytes genesis_hash, uint64_t unspent_tx_output_identifier) {
129 LDKChainWatchInterface_JCalls *j_calls = (LDKChainWatchInterface_JCalls*) this_arg;
130 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);
131 LDKCResult_C2Tuple_Scriptu64ZChainErrorZ res = *ret;
135 LDKCVec_usizeZ filter_block_jcall(const void* this_arg, LDKu8slice block) {
136 LDKChainWatchInterface_JCalls *j_calls = (LDKChainWatchInterface_JCalls*) this_arg;
137 LDKCVec_usizeZ* ret = (LDKCVec_usizeZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->filter_block_meth, block);
138 LDKCVec_usizeZ res = *ret;
142 uintptr_t reentered_jcall(const void* this_arg) {
143 LDKChainWatchInterface_JCalls *j_calls = (LDKChainWatchInterface_JCalls*) this_arg;
144 uintptr_t* ret = (uintptr_t*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->reentered_meth);
145 uintptr_t res = *ret;
149 void LDKChainWatchInterface_JCalls_free(void* this_arg) {
150 LDKChainWatchInterface_JCalls *j_calls = (LDKChainWatchInterface_JCalls*) this_arg;
151 (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o);
154 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKChainWatchInterface_1new (JNIEnv * env, jclass _a, jobject o) {
155 jclass c = (*env)->GetObjectClass(env, o);
157 LDKChainWatchInterface_JCalls *calls = malloc(sizeof(LDKChainWatchInterface_JCalls));
159 calls->o = (*env)->NewGlobalRef(env, o);
160 calls->install_watch_tx_meth = (*env)->GetMethodID(env, c, "install_watch_tx", "([BJ)V");
161 assert(calls->install_watch_tx_meth != NULL);
162 calls->install_watch_outpoint_meth = (*env)->GetMethodID(env, c, "install_watch_outpoint", "(JJ)V");
163 assert(calls->install_watch_outpoint_meth != NULL);
164 calls->watch_all_txn_meth = (*env)->GetMethodID(env, c, "watch_all_txn", "()V");
165 assert(calls->watch_all_txn_meth != NULL);
166 calls->get_chain_utxo_meth = (*env)->GetMethodID(env, c, "get_chain_utxo", "(JJ)J");
167 assert(calls->get_chain_utxo_meth != NULL);
168 calls->filter_block_meth = (*env)->GetMethodID(env, c, "filter_block", "(J)J");
169 assert(calls->filter_block_meth != NULL);
170 calls->reentered_meth = (*env)->GetMethodID(env, c, "reentered", "()J");
171 assert(calls->reentered_meth != NULL);
173 LDKChainWatchInterface *ret = malloc(sizeof(LDKChainWatchInterface));
174 ret->this_arg = (void*) calls;
175 ret->install_watch_tx = install_watch_tx_jcall;
176 ret->install_watch_outpoint = install_watch_outpoint_jcall;
177 ret->watch_all_txn = watch_all_txn_jcall;
178 ret->get_chain_utxo = get_chain_utxo_jcall;
179 ret->filter_block = filter_block_jcall;
180 ret->reentered = reentered_jcall;
181 ret->free = LDKChainWatchInterface_JCalls_free;
185 typedef struct LDKBroadcasterInterface_JCalls {
188 jmethodID broadcast_transaction_meth;
189 } LDKBroadcasterInterface_JCalls;
190 void broadcast_transaction_jcall(const void* this_arg, LDKTransaction tx) {
191 LDKBroadcasterInterface_JCalls *j_calls = (LDKBroadcasterInterface_JCalls*) this_arg;
192 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->broadcast_transaction_meth, tx);
194 void LDKBroadcasterInterface_JCalls_free(void* this_arg) {
195 LDKBroadcasterInterface_JCalls *j_calls = (LDKBroadcasterInterface_JCalls*) this_arg;
196 (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o);
199 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKBroadcasterInterface_1new (JNIEnv * env, jclass _a, jobject o) {
200 jclass c = (*env)->GetObjectClass(env, o);
202 LDKBroadcasterInterface_JCalls *calls = malloc(sizeof(LDKBroadcasterInterface_JCalls));
204 calls->o = (*env)->NewGlobalRef(env, o);
205 calls->broadcast_transaction_meth = (*env)->GetMethodID(env, c, "broadcast_transaction", "(J)V");
206 assert(calls->broadcast_transaction_meth != NULL);
208 LDKBroadcasterInterface *ret = malloc(sizeof(LDKBroadcasterInterface));
209 ret->this_arg = (void*) calls;
210 ret->broadcast_transaction = broadcast_transaction_jcall;
211 ret->free = LDKBroadcasterInterface_JCalls_free;
215 typedef struct LDKChainListener_JCalls {
218 jmethodID block_connected_meth;
219 jmethodID block_disconnected_meth;
220 } LDKChainListener_JCalls;
221 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) {
222 LDKChainListener_JCalls *j_calls = (LDKChainListener_JCalls*) this_arg;
223 jbyteArray header_arr = (*j_calls->env)->NewByteArray(j_calls->env, 80);
224 (*j_calls->env)->SetByteArrayRegion(j_calls->env, header_arr, 0, 80, *header);
225 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->block_connected_meth, header_arr, height, txn_matched, indexes_of_txn_matched);
227 void block_disconnected_jcall(const void* this_arg, const uint8_t (*header)[80], uint32_t disconnected_height) {
228 LDKChainListener_JCalls *j_calls = (LDKChainListener_JCalls*) this_arg;
229 jbyteArray header_arr = (*j_calls->env)->NewByteArray(j_calls->env, 80);
230 (*j_calls->env)->SetByteArrayRegion(j_calls->env, header_arr, 0, 80, *header);
231 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->block_disconnected_meth, header_arr, disconnected_height);
233 void LDKChainListener_JCalls_free(void* this_arg) {
234 LDKChainListener_JCalls *j_calls = (LDKChainListener_JCalls*) this_arg;
235 (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o);
238 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKChainListener_1new (JNIEnv * env, jclass _a, jobject o) {
239 jclass c = (*env)->GetObjectClass(env, o);
241 LDKChainListener_JCalls *calls = malloc(sizeof(LDKChainListener_JCalls));
243 calls->o = (*env)->NewGlobalRef(env, o);
244 calls->block_connected_meth = (*env)->GetMethodID(env, c, "block_connected", "([BIJJ)V");
245 assert(calls->block_connected_meth != NULL);
246 calls->block_disconnected_meth = (*env)->GetMethodID(env, c, "block_disconnected", "([BI)V");
247 assert(calls->block_disconnected_meth != NULL);
249 LDKChainListener *ret = malloc(sizeof(LDKChainListener));
250 ret->this_arg = (void*) calls;
251 ret->block_connected = block_connected_jcall;
252 ret->block_disconnected = block_disconnected_jcall;
253 ret->free = LDKChainListener_JCalls_free;
257 typedef struct LDKFeeEstimator_JCalls {
260 jmethodID get_est_sat_per_1000_weight_meth;
261 } LDKFeeEstimator_JCalls;
262 uint32_t get_est_sat_per_1000_weight_jcall(const void* this_arg, LDKConfirmationTarget confirmation_target) {
263 LDKFeeEstimator_JCalls *j_calls = (LDKFeeEstimator_JCalls*) this_arg;
264 return (*j_calls->env)->CallIntMethod(j_calls->env, j_calls->o, j_calls->get_est_sat_per_1000_weight_meth, confirmation_target);
266 void LDKFeeEstimator_JCalls_free(void* this_arg) {
267 LDKFeeEstimator_JCalls *j_calls = (LDKFeeEstimator_JCalls*) this_arg;
268 (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o);
271 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKFeeEstimator_1new (JNIEnv * env, jclass _a, jobject o) {
272 jclass c = (*env)->GetObjectClass(env, o);
274 LDKFeeEstimator_JCalls *calls = malloc(sizeof(LDKFeeEstimator_JCalls));
276 calls->o = (*env)->NewGlobalRef(env, o);
277 calls->get_est_sat_per_1000_weight_meth = (*env)->GetMethodID(env, c, "get_est_sat_per_1000_weight", "(J)I");
278 assert(calls->get_est_sat_per_1000_weight_meth != NULL);
280 LDKFeeEstimator *ret = malloc(sizeof(LDKFeeEstimator));
281 ret->this_arg = (void*) calls;
282 ret->get_est_sat_per_1000_weight = get_est_sat_per_1000_weight_jcall;
283 ret->free = LDKFeeEstimator_JCalls_free;
287 typedef struct LDKChannelKeys_JCalls {
290 jmethodID get_per_commitment_point_meth;
291 jmethodID release_commitment_secret_meth;
292 jmethodID key_derivation_params_meth;
293 jmethodID sign_remote_commitment_meth;
294 jmethodID sign_local_commitment_meth;
295 jmethodID sign_local_commitment_htlc_transactions_meth;
296 jmethodID sign_justice_transaction_meth;
297 jmethodID sign_remote_htlc_transaction_meth;
298 jmethodID sign_closing_transaction_meth;
299 jmethodID sign_channel_announcement_meth;
300 jmethodID on_accept_meth;
301 } LDKChannelKeys_JCalls;
302 LDKPublicKey get_per_commitment_point_jcall(const void* this_arg, uint64_t idx) {
303 LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
304 LDKPublicKey* ret = (LDKPublicKey*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->get_per_commitment_point_meth, idx);
305 LDKPublicKey res = *ret;
309 LDKThirtyTwoBytes release_commitment_secret_jcall(const void* this_arg, uint64_t idx) {
310 LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
311 LDKThirtyTwoBytes* ret = (LDKThirtyTwoBytes*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->release_commitment_secret_meth, idx);
312 LDKThirtyTwoBytes res = *ret;
316 LDKC2Tuple_u64u64Z key_derivation_params_jcall(const void* this_arg) {
317 LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
318 LDKC2Tuple_u64u64Z* ret = (LDKC2Tuple_u64u64Z*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->key_derivation_params_meth);
319 LDKC2Tuple_u64u64Z res = *ret;
323 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) {
324 LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
325 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);
326 LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ res = *ret;
330 LDKCResult_SignatureNoneZ sign_local_commitment_jcall(const void* this_arg, const LDKLocalCommitmentTransaction *local_commitment_tx) {
331 LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
332 LDKCResult_SignatureNoneZ* ret = (LDKCResult_SignatureNoneZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->sign_local_commitment_meth, local_commitment_tx);
333 LDKCResult_SignatureNoneZ res = *ret;
337 LDKCResult_CVec_SignatureZNoneZ sign_local_commitment_htlc_transactions_jcall(const void* this_arg, const LDKLocalCommitmentTransaction *local_commitment_tx) {
338 LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
339 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);
340 LDKCResult_CVec_SignatureZNoneZ res = *ret;
344 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) {
345 LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
346 jbyteArray per_commitment_key_arr = (*j_calls->env)->NewByteArray(j_calls->env, 32);
347 (*j_calls->env)->SetByteArrayRegion(j_calls->env, per_commitment_key_arr, 0, 32, *per_commitment_key);
348 LDKCResult_SignatureNoneZ* ret = (LDKCResult_SignatureNoneZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->sign_justice_transaction_meth, justice_tx, input, amount, per_commitment_key_arr, htlc);
349 LDKCResult_SignatureNoneZ res = *ret;
353 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) {
354 LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
355 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);
356 LDKCResult_SignatureNoneZ res = *ret;
360 LDKCResult_SignatureNoneZ sign_closing_transaction_jcall(const void* this_arg, LDKTransaction closing_tx) {
361 LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
362 LDKCResult_SignatureNoneZ* ret = (LDKCResult_SignatureNoneZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->sign_closing_transaction_meth, closing_tx);
363 LDKCResult_SignatureNoneZ res = *ret;
367 LDKCResult_SignatureNoneZ sign_channel_announcement_jcall(const void* this_arg, const LDKUnsignedChannelAnnouncement *msg) {
368 LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
369 LDKCResult_SignatureNoneZ* ret = (LDKCResult_SignatureNoneZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->sign_channel_announcement_meth, msg);
370 LDKCResult_SignatureNoneZ res = *ret;
374 void on_accept_jcall(void* this_arg, const LDKChannelPublicKeys *channel_points, uint16_t remote_to_self_delay, uint16_t local_to_self_delay) {
375 LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
376 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);
378 void* LDKChannelKeys_JCalls_clone(const void* this_arg) {
379 LDKChannelKeys_JCalls *ret = malloc(sizeof(LDKChannelKeys_JCalls));
380 memcpy(ret, this_arg, sizeof(LDKChannelKeys_JCalls));
383 void LDKChannelKeys_JCalls_free(void* this_arg) {
384 LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
385 (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o);
388 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKChannelKeys_1new (JNIEnv * env, jclass _a, jobject o) {
389 jclass c = (*env)->GetObjectClass(env, o);
391 LDKChannelKeys_JCalls *calls = malloc(sizeof(LDKChannelKeys_JCalls));
393 calls->o = (*env)->NewGlobalRef(env, o);
394 calls->get_per_commitment_point_meth = (*env)->GetMethodID(env, c, "get_per_commitment_point", "(J)J");
395 assert(calls->get_per_commitment_point_meth != NULL);
396 calls->release_commitment_secret_meth = (*env)->GetMethodID(env, c, "release_commitment_secret", "(J)J");
397 assert(calls->release_commitment_secret_meth != NULL);
398 calls->key_derivation_params_meth = (*env)->GetMethodID(env, c, "key_derivation_params", "()J");
399 assert(calls->key_derivation_params_meth != NULL);
400 calls->sign_remote_commitment_meth = (*env)->GetMethodID(env, c, "sign_remote_commitment", "(IJJJ)J");
401 assert(calls->sign_remote_commitment_meth != NULL);
402 calls->sign_local_commitment_meth = (*env)->GetMethodID(env, c, "sign_local_commitment", "(J)J");
403 assert(calls->sign_local_commitment_meth != NULL);
404 calls->sign_local_commitment_htlc_transactions_meth = (*env)->GetMethodID(env, c, "sign_local_commitment_htlc_transactions", "(J)J");
405 assert(calls->sign_local_commitment_htlc_transactions_meth != NULL);
406 calls->sign_justice_transaction_meth = (*env)->GetMethodID(env, c, "sign_justice_transaction", "(JJJ[BJ)J");
407 assert(calls->sign_justice_transaction_meth != NULL);
408 calls->sign_remote_htlc_transaction_meth = (*env)->GetMethodID(env, c, "sign_remote_htlc_transaction", "(JJJJJ)J");
409 assert(calls->sign_remote_htlc_transaction_meth != NULL);
410 calls->sign_closing_transaction_meth = (*env)->GetMethodID(env, c, "sign_closing_transaction", "(J)J");
411 assert(calls->sign_closing_transaction_meth != NULL);
412 calls->sign_channel_announcement_meth = (*env)->GetMethodID(env, c, "sign_channel_announcement", "(J)J");
413 assert(calls->sign_channel_announcement_meth != NULL);
414 calls->on_accept_meth = (*env)->GetMethodID(env, c, "on_accept", "(JSS)V");
415 assert(calls->on_accept_meth != NULL);
417 LDKChannelKeys *ret = malloc(sizeof(LDKChannelKeys));
418 ret->this_arg = (void*) calls;
419 ret->get_per_commitment_point = get_per_commitment_point_jcall;
420 ret->release_commitment_secret = release_commitment_secret_jcall;
421 ret->key_derivation_params = key_derivation_params_jcall;
422 ret->sign_remote_commitment = sign_remote_commitment_jcall;
423 ret->sign_local_commitment = sign_local_commitment_jcall;
424 ret->sign_local_commitment_htlc_transactions = sign_local_commitment_htlc_transactions_jcall;
425 ret->sign_justice_transaction = sign_justice_transaction_jcall;
426 ret->sign_remote_htlc_transaction = sign_remote_htlc_transaction_jcall;
427 ret->sign_closing_transaction = sign_closing_transaction_jcall;
428 ret->sign_channel_announcement = sign_channel_announcement_jcall;
429 ret->on_accept = on_accept_jcall;
430 ret->clone = LDKChannelKeys_JCalls_clone;
431 ret->free = LDKChannelKeys_JCalls_free;
435 typedef struct LDKKeysInterface_JCalls {
438 jmethodID get_node_secret_meth;
439 jmethodID get_destination_script_meth;
440 jmethodID get_shutdown_pubkey_meth;
441 jmethodID get_channel_keys_meth;
442 jmethodID get_secure_random_bytes_meth;
443 } LDKKeysInterface_JCalls;
444 LDKSecretKey get_node_secret_jcall(const void* this_arg) {
445 LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
446 LDKSecretKey* ret = (LDKSecretKey*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->get_node_secret_meth);
447 LDKSecretKey res = *ret;
451 LDKCVec_u8Z get_destination_script_jcall(const void* this_arg) {
452 LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
453 LDKCVec_u8Z* ret = (LDKCVec_u8Z*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->get_destination_script_meth);
454 LDKCVec_u8Z res = *ret;
458 LDKPublicKey get_shutdown_pubkey_jcall(const void* this_arg) {
459 LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
460 LDKPublicKey* ret = (LDKPublicKey*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->get_shutdown_pubkey_meth);
461 LDKPublicKey res = *ret;
465 LDKChannelKeys get_channel_keys_jcall(const void* this_arg, bool inbound, uint64_t channel_value_satoshis) {
466 LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
467 LDKChannelKeys* ret = (LDKChannelKeys*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->get_channel_keys_meth, inbound, channel_value_satoshis);
468 LDKChannelKeys res = *ret;
472 LDKThirtyTwoBytes get_secure_random_bytes_jcall(const void* this_arg) {
473 LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
474 LDKThirtyTwoBytes* ret = (LDKThirtyTwoBytes*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->get_secure_random_bytes_meth);
475 LDKThirtyTwoBytes res = *ret;
479 void LDKKeysInterface_JCalls_free(void* this_arg) {
480 LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
481 (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o);
484 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKKeysInterface_1new (JNIEnv * env, jclass _a, jobject o) {
485 jclass c = (*env)->GetObjectClass(env, o);
487 LDKKeysInterface_JCalls *calls = malloc(sizeof(LDKKeysInterface_JCalls));
489 calls->o = (*env)->NewGlobalRef(env, o);
490 calls->get_node_secret_meth = (*env)->GetMethodID(env, c, "get_node_secret", "()J");
491 assert(calls->get_node_secret_meth != NULL);
492 calls->get_destination_script_meth = (*env)->GetMethodID(env, c, "get_destination_script", "()J");
493 assert(calls->get_destination_script_meth != NULL);
494 calls->get_shutdown_pubkey_meth = (*env)->GetMethodID(env, c, "get_shutdown_pubkey", "()J");
495 assert(calls->get_shutdown_pubkey_meth != NULL);
496 calls->get_channel_keys_meth = (*env)->GetMethodID(env, c, "get_channel_keys", "(ZJ)J");
497 assert(calls->get_channel_keys_meth != NULL);
498 calls->get_secure_random_bytes_meth = (*env)->GetMethodID(env, c, "get_secure_random_bytes", "()J");
499 assert(calls->get_secure_random_bytes_meth != NULL);
501 LDKKeysInterface *ret = malloc(sizeof(LDKKeysInterface));
502 ret->this_arg = (void*) calls;
503 ret->get_node_secret = get_node_secret_jcall;
504 ret->get_destination_script = get_destination_script_jcall;
505 ret->get_shutdown_pubkey = get_shutdown_pubkey_jcall;
506 ret->get_channel_keys = get_channel_keys_jcall;
507 ret->get_secure_random_bytes = get_secure_random_bytes_jcall;
508 ret->free = LDKKeysInterface_JCalls_free;
512 typedef struct LDKManyChannelMonitor_JCalls {
515 jmethodID add_monitor_meth;
516 jmethodID update_monitor_meth;
517 jmethodID get_and_clear_pending_monitor_events_meth;
518 } LDKManyChannelMonitor_JCalls;
519 LDKCResult_NoneChannelMonitorUpdateErrZ add_monitor_jcall(const void* this_arg, LDKOutPoint funding_txo, LDKChannelMonitor monitor) {
520 LDKManyChannelMonitor_JCalls *j_calls = (LDKManyChannelMonitor_JCalls*) this_arg;
521 LDKCResult_NoneChannelMonitorUpdateErrZ* ret = (LDKCResult_NoneChannelMonitorUpdateErrZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->add_monitor_meth, funding_txo, monitor);
522 LDKCResult_NoneChannelMonitorUpdateErrZ res = *ret;
526 LDKCResult_NoneChannelMonitorUpdateErrZ update_monitor_jcall(const void* this_arg, LDKOutPoint funding_txo, LDKChannelMonitorUpdate monitor) {
527 LDKManyChannelMonitor_JCalls *j_calls = (LDKManyChannelMonitor_JCalls*) this_arg;
528 LDKCResult_NoneChannelMonitorUpdateErrZ* ret = (LDKCResult_NoneChannelMonitorUpdateErrZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->update_monitor_meth, funding_txo, monitor);
529 LDKCResult_NoneChannelMonitorUpdateErrZ res = *ret;
533 LDKCVec_MonitorEventZ get_and_clear_pending_monitor_events_jcall(const void* this_arg) {
534 LDKManyChannelMonitor_JCalls *j_calls = (LDKManyChannelMonitor_JCalls*) this_arg;
535 LDKCVec_MonitorEventZ* ret = (LDKCVec_MonitorEventZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->get_and_clear_pending_monitor_events_meth);
536 LDKCVec_MonitorEventZ res = *ret;
540 void LDKManyChannelMonitor_JCalls_free(void* this_arg) {
541 LDKManyChannelMonitor_JCalls *j_calls = (LDKManyChannelMonitor_JCalls*) this_arg;
542 (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o);
545 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKManyChannelMonitor_1new (JNIEnv * env, jclass _a, jobject o) {
546 jclass c = (*env)->GetObjectClass(env, o);
548 LDKManyChannelMonitor_JCalls *calls = malloc(sizeof(LDKManyChannelMonitor_JCalls));
550 calls->o = (*env)->NewGlobalRef(env, o);
551 calls->add_monitor_meth = (*env)->GetMethodID(env, c, "add_monitor", "(JJ)J");
552 assert(calls->add_monitor_meth != NULL);
553 calls->update_monitor_meth = (*env)->GetMethodID(env, c, "update_monitor", "(JJ)J");
554 assert(calls->update_monitor_meth != NULL);
555 calls->get_and_clear_pending_monitor_events_meth = (*env)->GetMethodID(env, c, "get_and_clear_pending_monitor_events", "()J");
556 assert(calls->get_and_clear_pending_monitor_events_meth != NULL);
558 LDKManyChannelMonitor *ret = malloc(sizeof(LDKManyChannelMonitor));
559 ret->this_arg = (void*) calls;
560 ret->add_monitor = add_monitor_jcall;
561 ret->update_monitor = update_monitor_jcall;
562 ret->get_and_clear_pending_monitor_events = get_and_clear_pending_monitor_events_jcall;
563 ret->free = LDKManyChannelMonitor_JCalls_free;
567 typedef struct LDKChannelMessageHandler_JCalls {
570 jmethodID handle_open_channel_meth;
571 jmethodID handle_accept_channel_meth;
572 jmethodID handle_funding_created_meth;
573 jmethodID handle_funding_signed_meth;
574 jmethodID handle_funding_locked_meth;
575 jmethodID handle_shutdown_meth;
576 jmethodID handle_closing_signed_meth;
577 jmethodID handle_update_add_htlc_meth;
578 jmethodID handle_update_fulfill_htlc_meth;
579 jmethodID handle_update_fail_htlc_meth;
580 jmethodID handle_update_fail_malformed_htlc_meth;
581 jmethodID handle_commitment_signed_meth;
582 jmethodID handle_revoke_and_ack_meth;
583 jmethodID handle_update_fee_meth;
584 jmethodID handle_announcement_signatures_meth;
585 jmethodID peer_disconnected_meth;
586 jmethodID peer_connected_meth;
587 jmethodID handle_channel_reestablish_meth;
588 jmethodID handle_error_meth;
589 } LDKChannelMessageHandler_JCalls;
590 void handle_open_channel_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKInitFeatures their_features, const LDKOpenChannel *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_open_channel_meth, their_node_id, their_features, msg);
594 void handle_accept_channel_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKInitFeatures their_features, const LDKAcceptChannel *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_accept_channel_meth, their_node_id, their_features, msg);
598 void handle_funding_created_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingCreated *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_created_meth, their_node_id, msg);
602 void handle_funding_signed_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingSigned *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_funding_signed_meth, their_node_id, msg);
606 void handle_funding_locked_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingLocked *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_funding_locked_meth, their_node_id, msg);
610 void handle_shutdown_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKShutdown *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_shutdown_meth, their_node_id, msg);
614 void handle_closing_signed_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKClosingSigned *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_closing_signed_meth, their_node_id, msg);
618 void handle_update_add_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateAddHTLC *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_add_htlc_meth, their_node_id, msg);
622 void handle_update_fulfill_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFulfillHTLC *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_fulfill_htlc_meth, their_node_id, msg);
626 void handle_update_fail_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFailHTLC *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_update_fail_htlc_meth, their_node_id, msg);
630 void handle_update_fail_malformed_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFailMalformedHTLC *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_update_fail_malformed_htlc_meth, their_node_id, msg);
634 void handle_commitment_signed_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKCommitmentSigned *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_commitment_signed_meth, their_node_id, msg);
638 void handle_revoke_and_ack_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKRevokeAndACK *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_revoke_and_ack_meth, their_node_id, msg);
642 void handle_update_fee_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFee *msg) {
643 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
644 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->handle_update_fee_meth, their_node_id, msg);
646 void handle_announcement_signatures_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKAnnouncementSignatures *msg) {
647 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
648 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->handle_announcement_signatures_meth, their_node_id, msg);
650 void peer_disconnected_jcall(const void* this_arg, LDKPublicKey their_node_id, bool no_connection_possible) {
651 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
652 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->peer_disconnected_meth, their_node_id, no_connection_possible);
654 void peer_connected_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit *msg) {
655 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
656 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->peer_connected_meth, their_node_id, msg);
658 void handle_channel_reestablish_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelReestablish *msg) {
659 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
660 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->handle_channel_reestablish_meth, their_node_id, msg);
662 void handle_error_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKErrorMessage *msg) {
663 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
664 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->handle_error_meth, their_node_id, msg);
666 void LDKChannelMessageHandler_JCalls_free(void* this_arg) {
667 LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
668 (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o);
671 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKChannelMessageHandler_1new (JNIEnv * env, jclass _a, jobject o) {
672 jclass c = (*env)->GetObjectClass(env, o);
674 LDKChannelMessageHandler_JCalls *calls = malloc(sizeof(LDKChannelMessageHandler_JCalls));
676 calls->o = (*env)->NewGlobalRef(env, o);
677 calls->handle_open_channel_meth = (*env)->GetMethodID(env, c, "handle_open_channel", "(JJJ)V");
678 assert(calls->handle_open_channel_meth != NULL);
679 calls->handle_accept_channel_meth = (*env)->GetMethodID(env, c, "handle_accept_channel", "(JJJ)V");
680 assert(calls->handle_accept_channel_meth != NULL);
681 calls->handle_funding_created_meth = (*env)->GetMethodID(env, c, "handle_funding_created", "(JJ)V");
682 assert(calls->handle_funding_created_meth != NULL);
683 calls->handle_funding_signed_meth = (*env)->GetMethodID(env, c, "handle_funding_signed", "(JJ)V");
684 assert(calls->handle_funding_signed_meth != NULL);
685 calls->handle_funding_locked_meth = (*env)->GetMethodID(env, c, "handle_funding_locked", "(JJ)V");
686 assert(calls->handle_funding_locked_meth != NULL);
687 calls->handle_shutdown_meth = (*env)->GetMethodID(env, c, "handle_shutdown", "(JJ)V");
688 assert(calls->handle_shutdown_meth != NULL);
689 calls->handle_closing_signed_meth = (*env)->GetMethodID(env, c, "handle_closing_signed", "(JJ)V");
690 assert(calls->handle_closing_signed_meth != NULL);
691 calls->handle_update_add_htlc_meth = (*env)->GetMethodID(env, c, "handle_update_add_htlc", "(JJ)V");
692 assert(calls->handle_update_add_htlc_meth != NULL);
693 calls->handle_update_fulfill_htlc_meth = (*env)->GetMethodID(env, c, "handle_update_fulfill_htlc", "(JJ)V");
694 assert(calls->handle_update_fulfill_htlc_meth != NULL);
695 calls->handle_update_fail_htlc_meth = (*env)->GetMethodID(env, c, "handle_update_fail_htlc", "(JJ)V");
696 assert(calls->handle_update_fail_htlc_meth != NULL);
697 calls->handle_update_fail_malformed_htlc_meth = (*env)->GetMethodID(env, c, "handle_update_fail_malformed_htlc", "(JJ)V");
698 assert(calls->handle_update_fail_malformed_htlc_meth != NULL);
699 calls->handle_commitment_signed_meth = (*env)->GetMethodID(env, c, "handle_commitment_signed", "(JJ)V");
700 assert(calls->handle_commitment_signed_meth != NULL);
701 calls->handle_revoke_and_ack_meth = (*env)->GetMethodID(env, c, "handle_revoke_and_ack", "(JJ)V");
702 assert(calls->handle_revoke_and_ack_meth != NULL);
703 calls->handle_update_fee_meth = (*env)->GetMethodID(env, c, "handle_update_fee", "(JJ)V");
704 assert(calls->handle_update_fee_meth != NULL);
705 calls->handle_announcement_signatures_meth = (*env)->GetMethodID(env, c, "handle_announcement_signatures", "(JJ)V");
706 assert(calls->handle_announcement_signatures_meth != NULL);
707 calls->peer_disconnected_meth = (*env)->GetMethodID(env, c, "peer_disconnected", "(JZ)V");
708 assert(calls->peer_disconnected_meth != NULL);
709 calls->peer_connected_meth = (*env)->GetMethodID(env, c, "peer_connected", "(JJ)V");
710 assert(calls->peer_connected_meth != NULL);
711 calls->handle_channel_reestablish_meth = (*env)->GetMethodID(env, c, "handle_channel_reestablish", "(JJ)V");
712 assert(calls->handle_channel_reestablish_meth != NULL);
713 calls->handle_error_meth = (*env)->GetMethodID(env, c, "handle_error", "(JJ)V");
714 assert(calls->handle_error_meth != NULL);
716 LDKChannelMessageHandler *ret = malloc(sizeof(LDKChannelMessageHandler));
717 ret->this_arg = (void*) calls;
718 ret->handle_open_channel = handle_open_channel_jcall;
719 ret->handle_accept_channel = handle_accept_channel_jcall;
720 ret->handle_funding_created = handle_funding_created_jcall;
721 ret->handle_funding_signed = handle_funding_signed_jcall;
722 ret->handle_funding_locked = handle_funding_locked_jcall;
723 ret->handle_shutdown = handle_shutdown_jcall;
724 ret->handle_closing_signed = handle_closing_signed_jcall;
725 ret->handle_update_add_htlc = handle_update_add_htlc_jcall;
726 ret->handle_update_fulfill_htlc = handle_update_fulfill_htlc_jcall;
727 ret->handle_update_fail_htlc = handle_update_fail_htlc_jcall;
728 ret->handle_update_fail_malformed_htlc = handle_update_fail_malformed_htlc_jcall;
729 ret->handle_commitment_signed = handle_commitment_signed_jcall;
730 ret->handle_revoke_and_ack = handle_revoke_and_ack_jcall;
731 ret->handle_update_fee = handle_update_fee_jcall;
732 ret->handle_announcement_signatures = handle_announcement_signatures_jcall;
733 ret->peer_disconnected = peer_disconnected_jcall;
734 ret->peer_connected = peer_connected_jcall;
735 ret->handle_channel_reestablish = handle_channel_reestablish_jcall;
736 ret->handle_error = handle_error_jcall;
737 ret->free = LDKChannelMessageHandler_JCalls_free;
741 typedef struct LDKRoutingMessageHandler_JCalls {
744 jmethodID handle_node_announcement_meth;
745 jmethodID handle_channel_announcement_meth;
746 jmethodID handle_channel_update_meth;
747 jmethodID handle_htlc_fail_channel_update_meth;
748 jmethodID get_next_channel_announcements_meth;
749 jmethodID get_next_node_announcements_meth;
750 jmethodID should_request_full_sync_meth;
751 } LDKRoutingMessageHandler_JCalls;
752 LDKCResult_boolLightningErrorZ handle_node_announcement_jcall(const void* this_arg, const LDKNodeAnnouncement *msg) {
753 LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
754 LDKCResult_boolLightningErrorZ* ret = (LDKCResult_boolLightningErrorZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->handle_node_announcement_meth, msg);
755 LDKCResult_boolLightningErrorZ res = *ret;
759 LDKCResult_boolLightningErrorZ handle_channel_announcement_jcall(const void* this_arg, const LDKChannelAnnouncement *msg) {
760 LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
761 LDKCResult_boolLightningErrorZ* ret = (LDKCResult_boolLightningErrorZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->handle_channel_announcement_meth, msg);
762 LDKCResult_boolLightningErrorZ res = *ret;
766 LDKCResult_boolLightningErrorZ handle_channel_update_jcall(const void* this_arg, const LDKChannelUpdate *msg) {
767 LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
768 LDKCResult_boolLightningErrorZ* ret = (LDKCResult_boolLightningErrorZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->handle_channel_update_meth, msg);
769 LDKCResult_boolLightningErrorZ res = *ret;
773 void handle_htlc_fail_channel_update_jcall(const void* this_arg, const LDKHTLCFailChannelUpdate *update) {
774 LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
775 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->handle_htlc_fail_channel_update_meth, update);
777 LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ get_next_channel_announcements_jcall(const void* this_arg, uint64_t starting_point, uint8_t batch_amount) {
778 LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
779 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);
780 LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ res = *ret;
784 LDKCVec_NodeAnnouncementZ get_next_node_announcements_jcall(const void* this_arg, LDKPublicKey starting_point, uint8_t batch_amount) {
785 LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
786 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);
787 LDKCVec_NodeAnnouncementZ res = *ret;
791 bool should_request_full_sync_jcall(const void* this_arg, LDKPublicKey node_id) {
792 LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
793 return (*j_calls->env)->CallBooleanMethod(j_calls->env, j_calls->o, j_calls->should_request_full_sync_meth, node_id);
795 void LDKRoutingMessageHandler_JCalls_free(void* this_arg) {
796 LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
797 (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o);
800 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKRoutingMessageHandler_1new (JNIEnv * env, jclass _a, jobject o) {
801 jclass c = (*env)->GetObjectClass(env, o);
803 LDKRoutingMessageHandler_JCalls *calls = malloc(sizeof(LDKRoutingMessageHandler_JCalls));
805 calls->o = (*env)->NewGlobalRef(env, o);
806 calls->handle_node_announcement_meth = (*env)->GetMethodID(env, c, "handle_node_announcement", "(J)J");
807 assert(calls->handle_node_announcement_meth != NULL);
808 calls->handle_channel_announcement_meth = (*env)->GetMethodID(env, c, "handle_channel_announcement", "(J)J");
809 assert(calls->handle_channel_announcement_meth != NULL);
810 calls->handle_channel_update_meth = (*env)->GetMethodID(env, c, "handle_channel_update", "(J)J");
811 assert(calls->handle_channel_update_meth != NULL);
812 calls->handle_htlc_fail_channel_update_meth = (*env)->GetMethodID(env, c, "handle_htlc_fail_channel_update", "(J)V");
813 assert(calls->handle_htlc_fail_channel_update_meth != NULL);
814 calls->get_next_channel_announcements_meth = (*env)->GetMethodID(env, c, "get_next_channel_announcements", "(JB)J");
815 assert(calls->get_next_channel_announcements_meth != NULL);
816 calls->get_next_node_announcements_meth = (*env)->GetMethodID(env, c, "get_next_node_announcements", "(JB)J");
817 assert(calls->get_next_node_announcements_meth != NULL);
818 calls->should_request_full_sync_meth = (*env)->GetMethodID(env, c, "should_request_full_sync", "(J)Z");
819 assert(calls->should_request_full_sync_meth != NULL);
821 LDKRoutingMessageHandler *ret = malloc(sizeof(LDKRoutingMessageHandler));
822 ret->this_arg = (void*) calls;
823 ret->handle_node_announcement = handle_node_announcement_jcall;
824 ret->handle_channel_announcement = handle_channel_announcement_jcall;
825 ret->handle_channel_update = handle_channel_update_jcall;
826 ret->handle_htlc_fail_channel_update = handle_htlc_fail_channel_update_jcall;
827 ret->get_next_channel_announcements = get_next_channel_announcements_jcall;
828 ret->get_next_node_announcements = get_next_node_announcements_jcall;
829 ret->should_request_full_sync = should_request_full_sync_jcall;
830 ret->free = LDKRoutingMessageHandler_JCalls_free;
834 typedef struct LDKSocketDescriptor_JCalls {
837 jmethodID send_data_meth;
838 jmethodID disconnect_socket_meth;
841 } LDKSocketDescriptor_JCalls;
842 uintptr_t send_data_jcall(void* this_arg, LDKu8slice data, bool resume_read) {
843 LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
844 uintptr_t* ret = (uintptr_t*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->send_data_meth, data, resume_read);
845 uintptr_t res = *ret;
849 void disconnect_socket_jcall(void* this_arg) {
850 LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
851 return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->disconnect_socket_meth);
853 bool eq_jcall(const void* this_arg, const void *other_arg) {
854 LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
855 return (*j_calls->env)->CallBooleanMethod(j_calls->env, j_calls->o, j_calls->eq_meth, other_arg);
857 uint64_t hash_jcall(const void* this_arg) {
858 LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
859 return (*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->hash_meth);
861 void* LDKSocketDescriptor_JCalls_clone(const void* this_arg) {
862 LDKSocketDescriptor_JCalls *ret = malloc(sizeof(LDKSocketDescriptor_JCalls));
863 memcpy(ret, this_arg, sizeof(LDKSocketDescriptor_JCalls));
866 void LDKSocketDescriptor_JCalls_free(void* this_arg) {
867 LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
868 (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o);
871 JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKSocketDescriptor_1new (JNIEnv * env, jclass _a, jobject o) {
872 jclass c = (*env)->GetObjectClass(env, o);
874 LDKSocketDescriptor_JCalls *calls = malloc(sizeof(LDKSocketDescriptor_JCalls));
876 calls->o = (*env)->NewGlobalRef(env, o);
877 calls->send_data_meth = (*env)->GetMethodID(env, c, "send_data", "(JZ)J");
878 assert(calls->send_data_meth != NULL);
879 calls->disconnect_socket_meth = (*env)->GetMethodID(env, c, "disconnect_socket", "()V");
880 assert(calls->disconnect_socket_meth != NULL);
881 calls->eq_meth = (*env)->GetMethodID(env, c, "eq", "(V)Z");
882 assert(calls->eq_meth != NULL);
883 calls->hash_meth = (*env)->GetMethodID(env, c, "hash", "()J");
884 assert(calls->hash_meth != NULL);
886 LDKSocketDescriptor *ret = malloc(sizeof(LDKSocketDescriptor));
887 ret->this_arg = (void*) calls;
888 ret->send_data = send_data_jcall;
889 ret->disconnect_socket = disconnect_socket_jcall;
891 ret->hash = hash_jcall;
892 ret->clone = LDKSocketDescriptor_JCalls_clone;
893 ret->free = LDKSocketDescriptor_JCalls_free;
897 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1HTLCOutputInCommitmentSignatureZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
898 LDKC2Tuple_HTLCOutputInCommitmentSignatureZ arg_conv = *(LDKC2Tuple_HTLCOutputInCommitmentSignatureZ*)arg;
900 return C2Tuple_HTLCOutputInCommitmentSignatureZ_free(arg_conv);
903 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
904 LDKC2Tuple_OutPointScriptZ arg_conv = *(LDKC2Tuple_OutPointScriptZ*)arg;
906 return C2Tuple_OutPointScriptZ_free(arg_conv);
909 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1Scriptu64Z_1free(JNIEnv * _env, jclass _b, jlong arg) {
910 LDKC2Tuple_Scriptu64Z arg_conv = *(LDKC2Tuple_Scriptu64Z*)arg;
912 return C2Tuple_Scriptu64Z_free(arg_conv);
915 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
916 LDKC2Tuple_SignatureCVec_SignatureZZ arg_conv = *(LDKC2Tuple_SignatureCVec_SignatureZZ*)arg;
918 return C2Tuple_SignatureCVec_SignatureZZ_free(arg_conv);
921 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1Txidu32Z_1free(JNIEnv * _env, jclass _b, jlong arg) {
922 LDKC2Tuple_Txidu32Z arg_conv = *(LDKC2Tuple_Txidu32Z*)arg;
924 return C2Tuple_Txidu32Z_free(arg_conv);
927 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u64u64Z_1free(JNIEnv * _env, jclass _b, jlong arg) {
928 LDKC2Tuple_u64u64Z arg_conv = *(LDKC2Tuple_u64u64Z*)arg;
930 return C2Tuple_u64u64Z_free(arg_conv);
933 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
934 LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ arg_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)arg;
936 return C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(arg_conv);
939 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1Scriptu64ZChainErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
940 LDKChainError arg_conv = *(LDKChainError*)arg;
942 LDKCResult_C2Tuple_Scriptu64ZChainErrorZ* ret = malloc(sizeof(LDKCResult_C2Tuple_Scriptu64ZChainErrorZ));
943 *ret = CResult_C2Tuple_Scriptu64ZChainErrorZ_err(arg_conv);
947 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1Scriptu64ZChainErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
948 LDKCResult_C2Tuple_Scriptu64ZChainErrorZ arg_conv = *(LDKCResult_C2Tuple_Scriptu64ZChainErrorZ*)arg;
950 return CResult_C2Tuple_Scriptu64ZChainErrorZ_free(arg_conv);
953 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1Scriptu64ZChainErrorZ_1ok(JNIEnv * _env, jclass _b, jlong arg) {
954 LDKC2Tuple_Scriptu64Z arg_conv = *(LDKC2Tuple_Scriptu64Z*)arg;
956 LDKCResult_C2Tuple_Scriptu64ZChainErrorZ* ret = malloc(sizeof(LDKCResult_C2Tuple_Scriptu64ZChainErrorZ));
957 *ret = CResult_C2Tuple_Scriptu64ZChainErrorZ_ok(arg_conv);
961 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
962 LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ arg_conv = *(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)arg;
964 return CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(arg_conv);
967 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1ok(JNIEnv * _env, jclass _b, jlong arg) {
968 LDKC2Tuple_SignatureCVec_SignatureZZ arg_conv = *(LDKC2Tuple_SignatureCVec_SignatureZZ*)arg;
970 LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ* ret = malloc(sizeof(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ));
971 *ret = CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(arg_conv);
975 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
976 LDKCResult_CVec_SignatureZNoneZ arg_conv = *(LDKCResult_CVec_SignatureZNoneZ*)arg;
978 return CResult_CVec_SignatureZNoneZ_free(arg_conv);
981 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1ok(JNIEnv * _env, jclass _b, jlong arg) {
982 LDKCVec_SignatureZ arg_conv = *(LDKCVec_SignatureZ*)arg;
984 LDKCResult_CVec_SignatureZNoneZ* ret = malloc(sizeof(LDKCResult_CVec_SignatureZNoneZ));
985 *ret = CResult_CVec_SignatureZNoneZ_ok(arg_conv);
989 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
990 LDKPeerHandleError arg_conv = *(LDKPeerHandleError*)arg;
992 LDKCResult_CVec_u8ZPeerHandleErrorZ* ret = malloc(sizeof(LDKCResult_CVec_u8ZPeerHandleErrorZ));
993 *ret = CResult_CVec_u8ZPeerHandleErrorZ_err(arg_conv);
997 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
998 LDKCResult_CVec_u8ZPeerHandleErrorZ arg_conv = *(LDKCResult_CVec_u8ZPeerHandleErrorZ*)arg;
1000 return CResult_CVec_u8ZPeerHandleErrorZ_free(arg_conv);
1003 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1ok(JNIEnv * _env, jclass _b, jlong arg) {
1004 LDKCVec_u8Z arg_conv = *(LDKCVec_u8Z*)arg;
1006 LDKCResult_CVec_u8ZPeerHandleErrorZ* ret = malloc(sizeof(LDKCResult_CVec_u8ZPeerHandleErrorZ));
1007 *ret = CResult_CVec_u8ZPeerHandleErrorZ_ok(arg_conv);
1011 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneAPIErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
1012 LDKAPIError arg_conv = *(LDKAPIError*)arg;
1014 LDKCResult_NoneAPIErrorZ* ret = malloc(sizeof(LDKCResult_NoneAPIErrorZ));
1015 *ret = CResult_NoneAPIErrorZ_err(arg_conv);
1019 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneAPIErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1020 LDKCResult_NoneAPIErrorZ arg_conv = *(LDKCResult_NoneAPIErrorZ*)arg;
1022 return CResult_NoneAPIErrorZ_free(arg_conv);
1025 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
1026 LDKChannelMonitorUpdateErr arg_conv = *(LDKChannelMonitorUpdateErr*)arg;
1028 LDKCResult_NoneChannelMonitorUpdateErrZ* ret = malloc(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ));
1029 *ret = CResult_NoneChannelMonitorUpdateErrZ_err(arg_conv);
1033 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1034 LDKCResult_NoneChannelMonitorUpdateErrZ arg_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)arg;
1036 return CResult_NoneChannelMonitorUpdateErrZ_free(arg_conv);
1039 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
1040 LDKMonitorUpdateError arg_conv = *(LDKMonitorUpdateError*)arg;
1042 LDKCResult_NoneMonitorUpdateErrorZ* ret = malloc(sizeof(LDKCResult_NoneMonitorUpdateErrorZ));
1043 *ret = CResult_NoneMonitorUpdateErrorZ_err(arg_conv);
1047 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1048 LDKCResult_NoneMonitorUpdateErrorZ arg_conv = *(LDKCResult_NoneMonitorUpdateErrorZ*)arg;
1050 return CResult_NoneMonitorUpdateErrorZ_free(arg_conv);
1053 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
1054 LDKPaymentSendFailure arg_conv = *(LDKPaymentSendFailure*)arg;
1056 LDKCResult_NonePaymentSendFailureZ* ret = malloc(sizeof(LDKCResult_NonePaymentSendFailureZ));
1057 *ret = CResult_NonePaymentSendFailureZ_err(arg_conv);
1061 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1062 LDKCResult_NonePaymentSendFailureZ arg_conv = *(LDKCResult_NonePaymentSendFailureZ*)arg;
1064 return CResult_NonePaymentSendFailureZ_free(arg_conv);
1067 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
1068 LDKPeerHandleError arg_conv = *(LDKPeerHandleError*)arg;
1070 LDKCResult_NonePeerHandleErrorZ* ret = malloc(sizeof(LDKCResult_NonePeerHandleErrorZ));
1071 *ret = CResult_NonePeerHandleErrorZ_err(arg_conv);
1075 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1076 LDKCResult_NonePeerHandleErrorZ arg_conv = *(LDKCResult_NonePeerHandleErrorZ*)arg;
1078 return CResult_NonePeerHandleErrorZ_free(arg_conv);
1081 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
1082 LDKLightningError arg_conv = *(LDKLightningError*)arg;
1084 LDKCResult_RouteLightningErrorZ* ret = malloc(sizeof(LDKCResult_RouteLightningErrorZ));
1085 *ret = CResult_RouteLightningErrorZ_err(arg_conv);
1089 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1090 LDKCResult_RouteLightningErrorZ arg_conv = *(LDKCResult_RouteLightningErrorZ*)arg;
1092 return CResult_RouteLightningErrorZ_free(arg_conv);
1095 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1ok(JNIEnv * _env, jclass _b, jlong arg) {
1096 LDKRoute arg_conv = *(LDKRoute*)arg;
1098 LDKCResult_RouteLightningErrorZ* ret = malloc(sizeof(LDKCResult_RouteLightningErrorZ));
1099 *ret = CResult_RouteLightningErrorZ_ok(arg_conv);
1103 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SignatureNoneZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1104 LDKCResult_SignatureNoneZ arg_conv = *(LDKCResult_SignatureNoneZ*)arg;
1106 return CResult_SignatureNoneZ_free(arg_conv);
1109 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SignatureNoneZ_1ok(JNIEnv * _env, jclass _b, jlong arg) {
1110 LDKSignature arg_conv = *(LDKSignature*)arg;
1112 LDKCResult_SignatureNoneZ* ret = malloc(sizeof(LDKCResult_SignatureNoneZ));
1113 *ret = CResult_SignatureNoneZ_ok(arg_conv);
1117 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysSecpErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
1118 LDKSecp256k1Error arg_conv = *(LDKSecp256k1Error*)arg;
1120 LDKCResult_TxCreationKeysSecpErrorZ* ret = malloc(sizeof(LDKCResult_TxCreationKeysSecpErrorZ));
1121 *ret = CResult_TxCreationKeysSecpErrorZ_err(arg_conv);
1125 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysSecpErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1126 LDKCResult_TxCreationKeysSecpErrorZ arg_conv = *(LDKCResult_TxCreationKeysSecpErrorZ*)arg;
1128 return CResult_TxCreationKeysSecpErrorZ_free(arg_conv);
1131 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysSecpErrorZ_1ok(JNIEnv * _env, jclass _b, jlong arg) {
1132 LDKTxCreationKeys arg_conv = *(LDKTxCreationKeys*)arg;
1134 LDKCResult_TxCreationKeysSecpErrorZ* ret = malloc(sizeof(LDKCResult_TxCreationKeysSecpErrorZ));
1135 *ret = CResult_TxCreationKeysSecpErrorZ_ok(arg_conv);
1139 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
1140 LDKLightningError arg_conv = *(LDKLightningError*)arg;
1142 LDKCResult_boolLightningErrorZ* ret = malloc(sizeof(LDKCResult_boolLightningErrorZ));
1143 *ret = CResult_boolLightningErrorZ_err(arg_conv);
1147 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1148 LDKCResult_boolLightningErrorZ arg_conv = *(LDKCResult_boolLightningErrorZ*)arg;
1150 return CResult_boolLightningErrorZ_free(arg_conv);
1153 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1ok(JNIEnv * _env, jclass _b, jboolean arg) {
1154 LDKCResult_boolLightningErrorZ* ret = malloc(sizeof(LDKCResult_boolLightningErrorZ));
1155 *ret = CResult_boolLightningErrorZ_ok(arg);
1159 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) {
1160 LDKPeerHandleError arg_conv = *(LDKPeerHandleError*)arg;
1162 LDKCResult_boolPeerHandleErrorZ* ret = malloc(sizeof(LDKCResult_boolPeerHandleErrorZ));
1163 *ret = CResult_boolPeerHandleErrorZ_err(arg_conv);
1167 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1168 LDKCResult_boolPeerHandleErrorZ arg_conv = *(LDKCResult_boolPeerHandleErrorZ*)arg;
1170 return CResult_boolPeerHandleErrorZ_free(arg_conv);
1173 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1ok(JNIEnv * _env, jclass _b, jboolean arg) {
1174 LDKCResult_boolPeerHandleErrorZ* ret = malloc(sizeof(LDKCResult_boolPeerHandleErrorZ));
1175 *ret = CResult_boolPeerHandleErrorZ_ok(arg);
1179 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1HTLCOutputInCommitmentSignatureZZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1180 LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ arg_conv = *(LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ*)arg;
1182 return CVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ_free(arg_conv);
1185 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1186 LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ arg_conv = *(LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ*)arg;
1188 return CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(arg_conv);
1191 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1CVec_1RouteHopZZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1192 LDKCVec_CVec_RouteHopZZ arg_conv = *(LDKCVec_CVec_RouteHopZZ*)arg;
1194 return CVec_CVec_RouteHopZZ_free(arg_conv);
1197 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ChannelDetailsZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1198 LDKCVec_ChannelDetailsZ arg_conv = *(LDKCVec_ChannelDetailsZ*)arg;
1200 return CVec_ChannelDetailsZ_free(arg_conv);
1203 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ChannelMonitorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1204 LDKCVec_ChannelMonitorZ arg_conv = *(LDKCVec_ChannelMonitorZ*)arg;
1206 return CVec_ChannelMonitorZ_free(arg_conv);
1209 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1EventZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1210 LDKCVec_EventZ arg_conv = *(LDKCVec_EventZ*)arg;
1212 return CVec_EventZ_free(arg_conv);
1215 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1HTLCOutputInCommitmentZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1216 LDKCVec_HTLCOutputInCommitmentZ arg_conv = *(LDKCVec_HTLCOutputInCommitmentZ*)arg;
1218 return CVec_HTLCOutputInCommitmentZ_free(arg_conv);
1221 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1MessageSendEventZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1222 LDKCVec_MessageSendEventZ arg_conv = *(LDKCVec_MessageSendEventZ*)arg;
1224 return CVec_MessageSendEventZ_free(arg_conv);
1227 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1MonitorEventZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1228 LDKCVec_MonitorEventZ arg_conv = *(LDKCVec_MonitorEventZ*)arg;
1230 return CVec_MonitorEventZ_free(arg_conv);
1233 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1NetAddressZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1234 LDKCVec_NetAddressZ arg_conv = *(LDKCVec_NetAddressZ*)arg;
1236 return CVec_NetAddressZ_free(arg_conv);
1239 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1NodeAnnouncementZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1240 LDKCVec_NodeAnnouncementZ arg_conv = *(LDKCVec_NodeAnnouncementZ*)arg;
1242 return CVec_NodeAnnouncementZ_free(arg_conv);
1245 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1PublicKeyZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1246 LDKCVec_PublicKeyZ arg_conv = *(LDKCVec_PublicKeyZ*)arg;
1248 return CVec_PublicKeyZ_free(arg_conv);
1251 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1RouteHintZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1252 LDKCVec_RouteHintZ arg_conv = *(LDKCVec_RouteHintZ*)arg;
1254 return CVec_RouteHintZ_free(arg_conv);
1257 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1RouteHopZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1258 LDKCVec_RouteHopZ arg_conv = *(LDKCVec_RouteHopZ*)arg;
1260 return CVec_RouteHopZ_free(arg_conv);
1263 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1SignatureZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1264 LDKCVec_SignatureZ arg_conv = *(LDKCVec_SignatureZ*)arg;
1266 return CVec_SignatureZ_free(arg_conv);
1269 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1SpendableOutputDescriptorZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1270 LDKCVec_SpendableOutputDescriptorZ arg_conv = *(LDKCVec_SpendableOutputDescriptorZ*)arg;
1272 return CVec_SpendableOutputDescriptorZ_free(arg_conv);
1275 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TransactionZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1276 LDKCVec_TransactionZ arg_conv = *(LDKCVec_TransactionZ*)arg;
1278 return CVec_TransactionZ_free(arg_conv);
1281 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateAddHTLCZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1282 LDKCVec_UpdateAddHTLCZ arg_conv = *(LDKCVec_UpdateAddHTLCZ*)arg;
1284 return CVec_UpdateAddHTLCZ_free(arg_conv);
1287 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateFailHTLCZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1288 LDKCVec_UpdateFailHTLCZ arg_conv = *(LDKCVec_UpdateFailHTLCZ*)arg;
1290 return CVec_UpdateFailHTLCZ_free(arg_conv);
1293 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateFailMalformedHTLCZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1294 LDKCVec_UpdateFailMalformedHTLCZ arg_conv = *(LDKCVec_UpdateFailMalformedHTLCZ*)arg;
1296 return CVec_UpdateFailMalformedHTLCZ_free(arg_conv);
1299 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateFulfillHTLCZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1300 LDKCVec_UpdateFulfillHTLCZ arg_conv = *(LDKCVec_UpdateFulfillHTLCZ*)arg;
1302 return CVec_UpdateFulfillHTLCZ_free(arg_conv);
1305 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u64Z_1free(JNIEnv * _env, jclass _b, jlong arg) {
1306 LDKCVec_u64Z arg_conv = *(LDKCVec_u64Z*)arg;
1308 return CVec_u64Z_free(arg_conv);
1311 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u8Z_1free(JNIEnv * _env, jclass _b, jlong arg) {
1312 LDKCVec_u8Z arg_conv = *(LDKCVec_u8Z*)arg;
1314 return CVec_u8Z_free(arg_conv);
1317 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1usizeZ_1free(JNIEnv * _env, jclass _b, jlong arg) {
1318 LDKCVec_usizeZ arg_conv = *(LDKCVec_usizeZ*)arg;
1320 return CVec_usizeZ_free(arg_conv);
1323 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxOut_1free(JNIEnv * _env, jclass _b, jlong _res) {
1324 LDKTxOut _res_conv = *(LDKTxOut*)_res;
1326 return TxOut_free(_res_conv);
1329 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1Txidu32Z_1new(JNIEnv * _env, jclass _b, jlong a, jint b) {
1330 LDKThirtyTwoBytes a_conv = *(LDKThirtyTwoBytes*)a;
1332 LDKC2Tuple_Txidu32Z* ret = malloc(sizeof(LDKC2Tuple_Txidu32Z));
1333 *ret = C2Tuple_Txidu32Z_new(a_conv, b);
1337 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1Scriptu64Z_1new(JNIEnv * _env, jclass _b, jlong a, jlong b) {
1338 LDKCVec_u8Z a_conv = *(LDKCVec_u8Z*)a;
1340 LDKC2Tuple_Scriptu64Z* ret = malloc(sizeof(LDKC2Tuple_Scriptu64Z));
1341 *ret = C2Tuple_Scriptu64Z_new(a_conv, b);
1345 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u64u64Z_1new(JNIEnv * _env, jclass _b, jlong a, jlong b) {
1346 LDKC2Tuple_u64u64Z* ret = malloc(sizeof(LDKC2Tuple_u64u64Z));
1347 *ret = C2Tuple_u64u64Z_new(a, b);
1351 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1new(JNIEnv * _env, jclass _b, jlong a, jlong b) {
1352 LDKSignature a_conv = *(LDKSignature*)a;
1354 LDKCVec_SignatureZ b_conv = *(LDKCVec_SignatureZ*)b;
1356 LDKC2Tuple_SignatureCVec_SignatureZZ* ret = malloc(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ));
1357 *ret = C2Tuple_SignatureCVec_SignatureZZ_new(a_conv, b_conv);
1361 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1err(JNIEnv * _env, jclass _b) {
1362 LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ* ret = malloc(sizeof(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ));
1363 *ret = CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
1367 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SignatureNoneZ_1err(JNIEnv * _env, jclass _b) {
1368 LDKCResult_SignatureNoneZ* ret = malloc(sizeof(LDKCResult_SignatureNoneZ));
1369 *ret = CResult_SignatureNoneZ_err();
1373 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1err(JNIEnv * _env, jclass _b) {
1374 LDKCResult_CVec_SignatureZNoneZ* ret = malloc(sizeof(LDKCResult_CVec_SignatureZNoneZ));
1375 *ret = CResult_CVec_SignatureZNoneZ_err();
1379 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneAPIErrorZ_1ok(JNIEnv * _env, jclass _b) {
1380 LDKCResult_NoneAPIErrorZ* ret = malloc(sizeof(LDKCResult_NoneAPIErrorZ));
1381 *ret = CResult_NoneAPIErrorZ_ok();
1385 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1ok(JNIEnv * _env, jclass _b) {
1386 LDKCResult_NonePaymentSendFailureZ* ret = malloc(sizeof(LDKCResult_NonePaymentSendFailureZ));
1387 *ret = CResult_NonePaymentSendFailureZ_ok();
1391 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1ok(JNIEnv * _env, jclass _b) {
1392 LDKCResult_NoneChannelMonitorUpdateErrZ* ret = malloc(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ));
1393 *ret = CResult_NoneChannelMonitorUpdateErrZ_ok();
1397 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateErrorZ_1ok(JNIEnv * _env, jclass _b) {
1398 LDKCResult_NoneMonitorUpdateErrorZ* ret = malloc(sizeof(LDKCResult_NoneMonitorUpdateErrorZ));
1399 *ret = CResult_NoneMonitorUpdateErrorZ_ok();
1403 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1new(JNIEnv * _env, jclass _b, jlong a, jlong b) {
1404 LDKOutPoint a_conv = *(LDKOutPoint*)a;
1406 a_conv._underlying_ref = false;
1407 LDKCVec_u8Z b_conv = *(LDKCVec_u8Z*)b;
1409 LDKC2Tuple_OutPointScriptZ* ret = malloc(sizeof(LDKC2Tuple_OutPointScriptZ));
1410 *ret = C2Tuple_OutPointScriptZ_new(a_conv, b_conv);
1414 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1new(JNIEnv * _env, jclass _b, jlong a, jlong b, jlong c) {
1415 LDKChannelAnnouncement a_conv = *(LDKChannelAnnouncement*)a;
1417 a_conv._underlying_ref = false;
1418 LDKChannelUpdate b_conv = *(LDKChannelUpdate*)b;
1420 b_conv._underlying_ref = false;
1421 LDKChannelUpdate c_conv = *(LDKChannelUpdate*)c;
1423 c_conv._underlying_ref = false;
1424 LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret = malloc(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ));
1425 *ret = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a_conv, b_conv, c_conv);
1429 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1ok(JNIEnv * _env, jclass _b) {
1430 LDKCResult_NonePeerHandleErrorZ* ret = malloc(sizeof(LDKCResult_NonePeerHandleErrorZ));
1431 *ret = CResult_NonePeerHandleErrorZ_ok();
1435 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1HTLCOutputInCommitmentSignatureZ_1new(JNIEnv * _env, jclass _b, jlong a, jlong b) {
1436 LDKHTLCOutputInCommitment a_conv = *(LDKHTLCOutputInCommitment*)a;
1438 a_conv._underlying_ref = false;
1439 LDKSignature b_conv = *(LDKSignature*)b;
1441 LDKC2Tuple_HTLCOutputInCommitmentSignatureZ* ret = malloc(sizeof(LDKC2Tuple_HTLCOutputInCommitmentSignatureZ));
1442 *ret = C2Tuple_HTLCOutputInCommitmentSignatureZ_new(a_conv, b_conv);
1446 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Event_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1447 LDKEvent this_ptr_conv = *(LDKEvent*)this_ptr;
1448 free((void*)this_ptr);
1449 return Event_free(this_ptr_conv);
1452 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_MessageSendEvent_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1453 LDKMessageSendEvent this_ptr_conv = *(LDKMessageSendEvent*)this_ptr;
1454 free((void*)this_ptr);
1455 return MessageSendEvent_free(this_ptr_conv);
1458 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_MessageSendEventsProvider_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1459 LDKMessageSendEventsProvider this_ptr_conv = *(LDKMessageSendEventsProvider*)this_ptr;
1460 free((void*)this_ptr);
1461 return MessageSendEventsProvider_free(this_ptr_conv);
1464 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_EventsProvider_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1465 LDKEventsProvider this_ptr_conv = *(LDKEventsProvider*)this_ptr;
1466 free((void*)this_ptr);
1467 return EventsProvider_free(this_ptr_conv);
1470 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_APIError_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1471 LDKAPIError this_ptr_conv = *(LDKAPIError*)this_ptr;
1472 free((void*)this_ptr);
1473 return APIError_free(this_ptr_conv);
1476 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Level_1max(JNIEnv * _env, jclass _b) {
1477 LDKLevel* ret = malloc(sizeof(LDKLevel));
1482 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Logger_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1483 LDKLogger this_ptr_conv = *(LDKLogger*)this_ptr;
1484 free((void*)this_ptr);
1485 return Logger_free(this_ptr_conv);
1488 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1489 LDKChannelHandshakeConfig this_ptr_conv = *(LDKChannelHandshakeConfig*)this_ptr;
1490 free((void*)this_ptr);
1491 this_ptr_conv._underlying_ref = false;
1492 return ChannelHandshakeConfig_free(this_ptr_conv);
1495 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1get_1minimum_1depth(JNIEnv * _env, jclass _b, jlong this_ptr) {
1496 LDKChannelHandshakeConfig* this_ptr_conv = (LDKChannelHandshakeConfig*)this_ptr;
1497 return ChannelHandshakeConfig_get_minimum_depth(this_ptr_conv);
1500 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1set_1minimum_1depth(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
1501 LDKChannelHandshakeConfig* this_ptr_conv = (LDKChannelHandshakeConfig*)this_ptr;
1502 return ChannelHandshakeConfig_set_minimum_depth(this_ptr_conv, val);
1505 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1get_1our_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_ptr) {
1506 LDKChannelHandshakeConfig* this_ptr_conv = (LDKChannelHandshakeConfig*)this_ptr;
1507 return ChannelHandshakeConfig_get_our_to_self_delay(this_ptr_conv);
1510 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1set_1our_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
1511 LDKChannelHandshakeConfig* this_ptr_conv = (LDKChannelHandshakeConfig*)this_ptr;
1512 return ChannelHandshakeConfig_set_our_to_self_delay(this_ptr_conv, val);
1515 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1get_1our_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
1516 LDKChannelHandshakeConfig* this_ptr_conv = (LDKChannelHandshakeConfig*)this_ptr;
1517 return ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr_conv);
1520 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1set_1our_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1521 LDKChannelHandshakeConfig* this_ptr_conv = (LDKChannelHandshakeConfig*)this_ptr;
1522 return ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr_conv, val);
1525 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) {
1526 LDKChannelHandshakeConfig* ret = malloc(sizeof(LDKChannelHandshakeConfig));
1527 *ret = ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg);
1528 assert(!ret->_underlying_ref);
1529 ret->_underlying_ref = true;
1533 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1default(JNIEnv * _env, jclass _b) {
1534 LDKChannelHandshakeConfig* ret = malloc(sizeof(LDKChannelHandshakeConfig));
1535 *ret = ChannelHandshakeConfig_default();
1536 assert(!ret->_underlying_ref);
1537 ret->_underlying_ref = true;
1541 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1542 LDKChannelHandshakeLimits this_ptr_conv = *(LDKChannelHandshakeLimits*)this_ptr;
1543 free((void*)this_ptr);
1544 this_ptr_conv._underlying_ref = false;
1545 return ChannelHandshakeLimits_free(this_ptr_conv);
1548 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1min_1funding_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
1549 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1550 return ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr_conv);
1553 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1min_1funding_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1554 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1555 return ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr_conv, val);
1558 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1max_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
1559 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1560 return ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr_conv);
1563 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1max_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1564 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1565 return ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr_conv, val);
1568 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1min_1max_1htlc_1value_1in_1flight_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
1569 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1570 return ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr_conv);
1573 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) {
1574 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1575 return ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr_conv, val);
1578 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1max_1channel_1reserve_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
1579 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1580 return ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr_conv);
1583 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1max_1channel_1reserve_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1584 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1585 return ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr_conv, val);
1588 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1min_1max_1accepted_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr) {
1589 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1590 return ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr_conv);
1593 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1min_1max_1accepted_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
1594 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1595 return ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr_conv, val);
1598 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1min_1dust_1limit_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
1599 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1600 return ChannelHandshakeLimits_get_min_dust_limit_satoshis(this_ptr_conv);
1603 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1min_1dust_1limit_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1604 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1605 return ChannelHandshakeLimits_set_min_dust_limit_satoshis(this_ptr_conv, val);
1608 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1max_1dust_1limit_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
1609 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1610 return ChannelHandshakeLimits_get_max_dust_limit_satoshis(this_ptr_conv);
1613 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1max_1dust_1limit_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1614 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1615 return ChannelHandshakeLimits_set_max_dust_limit_satoshis(this_ptr_conv, val);
1618 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1max_1minimum_1depth(JNIEnv * _env, jclass _b, jlong this_ptr) {
1619 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1620 return ChannelHandshakeLimits_get_max_minimum_depth(this_ptr_conv);
1623 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1max_1minimum_1depth(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
1624 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1625 return ChannelHandshakeLimits_set_max_minimum_depth(this_ptr_conv, val);
1628 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1force_1announced_1channel_1preference(JNIEnv * _env, jclass _b, jlong this_ptr) {
1629 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1630 return ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr_conv);
1633 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1force_1announced_1channel_1preference(JNIEnv * _env, jclass _b, jlong this_ptr, jboolean val) {
1634 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1635 return ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr_conv, val);
1638 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1their_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_ptr) {
1639 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1640 return ChannelHandshakeLimits_get_their_to_self_delay(this_ptr_conv);
1643 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1their_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
1644 LDKChannelHandshakeLimits* this_ptr_conv = (LDKChannelHandshakeLimits*)this_ptr;
1645 return ChannelHandshakeLimits_set_their_to_self_delay(this_ptr_conv, val);
1648 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) {
1649 LDKChannelHandshakeLimits* ret = malloc(sizeof(LDKChannelHandshakeLimits));
1650 *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);
1651 assert(!ret->_underlying_ref);
1652 ret->_underlying_ref = true;
1656 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1default(JNIEnv * _env, jclass _b) {
1657 LDKChannelHandshakeLimits* ret = malloc(sizeof(LDKChannelHandshakeLimits));
1658 *ret = ChannelHandshakeLimits_default();
1659 assert(!ret->_underlying_ref);
1660 ret->_underlying_ref = true;
1664 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1665 LDKChannelConfig this_ptr_conv = *(LDKChannelConfig*)this_ptr;
1666 free((void*)this_ptr);
1667 this_ptr_conv._underlying_ref = false;
1668 return ChannelConfig_free(this_ptr_conv);
1671 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1get_1fee_1proportional_1millionths(JNIEnv * _env, jclass _b, jlong this_ptr) {
1672 LDKChannelConfig* this_ptr_conv = (LDKChannelConfig*)this_ptr;
1673 return ChannelConfig_get_fee_proportional_millionths(this_ptr_conv);
1676 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1set_1fee_1proportional_1millionths(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
1677 LDKChannelConfig* this_ptr_conv = (LDKChannelConfig*)this_ptr;
1678 return ChannelConfig_set_fee_proportional_millionths(this_ptr_conv, val);
1681 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1get_1announced_1channel(JNIEnv * _env, jclass _b, jlong this_ptr) {
1682 LDKChannelConfig* this_ptr_conv = (LDKChannelConfig*)this_ptr;
1683 return ChannelConfig_get_announced_channel(this_ptr_conv);
1686 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1set_1announced_1channel(JNIEnv * _env, jclass _b, jlong this_ptr, jboolean val) {
1687 LDKChannelConfig* this_ptr_conv = (LDKChannelConfig*)this_ptr;
1688 return ChannelConfig_set_announced_channel(this_ptr_conv, val);
1691 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1get_1commit_1upfront_1shutdown_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr) {
1692 LDKChannelConfig* this_ptr_conv = (LDKChannelConfig*)this_ptr;
1693 return ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr_conv);
1696 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1set_1commit_1upfront_1shutdown_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr, jboolean val) {
1697 LDKChannelConfig* this_ptr_conv = (LDKChannelConfig*)this_ptr;
1698 return ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr_conv, val);
1701 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) {
1702 LDKChannelConfig* ret = malloc(sizeof(LDKChannelConfig));
1703 *ret = ChannelConfig_new(fee_proportional_millionths_arg, announced_channel_arg, commit_upfront_shutdown_pubkey_arg);
1704 assert(!ret->_underlying_ref);
1705 ret->_underlying_ref = true;
1709 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1default(JNIEnv * _env, jclass _b) {
1710 LDKChannelConfig* ret = malloc(sizeof(LDKChannelConfig));
1711 *ret = ChannelConfig_default();
1712 assert(!ret->_underlying_ref);
1713 ret->_underlying_ref = true;
1717 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1write(JNIEnv * _env, jclass _b, jlong obj) {
1718 LDKChannelConfig* obj_conv = (LDKChannelConfig*)obj;
1719 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
1720 *ret = ChannelConfig_write(obj_conv);
1724 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1read(JNIEnv * _env, jclass _b, jlong ser) {
1725 LDKu8slice ser_conv = *(LDKu8slice*)ser;
1727 LDKChannelConfig* ret = malloc(sizeof(LDKChannelConfig));
1728 *ret = ChannelConfig_read(ser_conv);
1729 assert(!ret->_underlying_ref);
1730 ret->_underlying_ref = true;
1734 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UserConfig_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1735 LDKUserConfig this_ptr_conv = *(LDKUserConfig*)this_ptr;
1736 free((void*)this_ptr);
1737 this_ptr_conv._underlying_ref = false;
1738 return UserConfig_free(this_ptr_conv);
1741 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UserConfig_1get_1own_1channel_1config(JNIEnv * _env, jclass _b, jlong this_ptr) {
1742 LDKUserConfig* this_ptr_conv = (LDKUserConfig*)this_ptr;
1743 LDKChannelHandshakeConfig* ret = malloc(sizeof(LDKChannelHandshakeConfig));
1744 *ret = UserConfig_get_own_channel_config(this_ptr_conv);
1745 assert(!ret->_underlying_ref);
1746 ret->_underlying_ref = true;
1750 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UserConfig_1set_1own_1channel_1config(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1751 LDKUserConfig* this_ptr_conv = (LDKUserConfig*)this_ptr;
1752 LDKChannelHandshakeConfig val_conv = *(LDKChannelHandshakeConfig*)val;
1754 val_conv._underlying_ref = false;
1755 return UserConfig_set_own_channel_config(this_ptr_conv, val_conv);
1758 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UserConfig_1get_1peer_1channel_1config_1limits(JNIEnv * _env, jclass _b, jlong this_ptr) {
1759 LDKUserConfig* this_ptr_conv = (LDKUserConfig*)this_ptr;
1760 LDKChannelHandshakeLimits* ret = malloc(sizeof(LDKChannelHandshakeLimits));
1761 *ret = UserConfig_get_peer_channel_config_limits(this_ptr_conv);
1762 assert(!ret->_underlying_ref);
1763 ret->_underlying_ref = true;
1767 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UserConfig_1set_1peer_1channel_1config_1limits(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1768 LDKUserConfig* this_ptr_conv = (LDKUserConfig*)this_ptr;
1769 LDKChannelHandshakeLimits val_conv = *(LDKChannelHandshakeLimits*)val;
1771 val_conv._underlying_ref = false;
1772 return UserConfig_set_peer_channel_config_limits(this_ptr_conv, val_conv);
1775 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UserConfig_1get_1channel_1options(JNIEnv * _env, jclass _b, jlong this_ptr) {
1776 LDKUserConfig* this_ptr_conv = (LDKUserConfig*)this_ptr;
1777 LDKChannelConfig* ret = malloc(sizeof(LDKChannelConfig));
1778 *ret = UserConfig_get_channel_options(this_ptr_conv);
1779 assert(!ret->_underlying_ref);
1780 ret->_underlying_ref = true;
1784 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UserConfig_1set_1channel_1options(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1785 LDKUserConfig* this_ptr_conv = (LDKUserConfig*)this_ptr;
1786 LDKChannelConfig val_conv = *(LDKChannelConfig*)val;
1788 val_conv._underlying_ref = false;
1789 return UserConfig_set_channel_options(this_ptr_conv, val_conv);
1792 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) {
1793 LDKChannelHandshakeConfig own_channel_config_arg_conv = *(LDKChannelHandshakeConfig*)own_channel_config_arg;
1794 free((void*)own_channel_config_arg);
1795 own_channel_config_arg_conv._underlying_ref = false;
1796 LDKChannelHandshakeLimits peer_channel_config_limits_arg_conv = *(LDKChannelHandshakeLimits*)peer_channel_config_limits_arg;
1797 free((void*)peer_channel_config_limits_arg);
1798 peer_channel_config_limits_arg_conv._underlying_ref = false;
1799 LDKChannelConfig channel_options_arg_conv = *(LDKChannelConfig*)channel_options_arg;
1800 free((void*)channel_options_arg);
1801 channel_options_arg_conv._underlying_ref = false;
1802 LDKUserConfig* ret = malloc(sizeof(LDKUserConfig));
1803 *ret = UserConfig_new(own_channel_config_arg_conv, peer_channel_config_limits_arg_conv, channel_options_arg_conv);
1804 assert(!ret->_underlying_ref);
1805 ret->_underlying_ref = true;
1809 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UserConfig_1default(JNIEnv * _env, jclass _b) {
1810 LDKUserConfig* ret = malloc(sizeof(LDKUserConfig));
1811 *ret = UserConfig_default();
1812 assert(!ret->_underlying_ref);
1813 ret->_underlying_ref = true;
1817 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainWatchInterface_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1818 LDKChainWatchInterface this_ptr_conv = *(LDKChainWatchInterface*)this_ptr;
1819 free((void*)this_ptr);
1820 return ChainWatchInterface_free(this_ptr_conv);
1823 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BroadcasterInterface_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1824 LDKBroadcasterInterface this_ptr_conv = *(LDKBroadcasterInterface*)this_ptr;
1825 free((void*)this_ptr);
1826 return BroadcasterInterface_free(this_ptr_conv);
1829 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainListener_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1830 LDKChainListener this_ptr_conv = *(LDKChainListener*)this_ptr;
1831 free((void*)this_ptr);
1832 return ChainListener_free(this_ptr_conv);
1835 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FeeEstimator_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1836 LDKFeeEstimator this_ptr_conv = *(LDKFeeEstimator*)this_ptr;
1837 free((void*)this_ptr);
1838 return FeeEstimator_free(this_ptr_conv);
1841 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainWatchedUtil_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1842 LDKChainWatchedUtil this_ptr_conv = *(LDKChainWatchedUtil*)this_ptr;
1843 free((void*)this_ptr);
1844 this_ptr_conv._underlying_ref = false;
1845 return ChainWatchedUtil_free(this_ptr_conv);
1848 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChainWatchedUtil_1new(JNIEnv * _env, jclass _b) {
1849 LDKChainWatchedUtil* ret = malloc(sizeof(LDKChainWatchedUtil));
1850 *ret = ChainWatchedUtil_new();
1851 assert(!ret->_underlying_ref);
1852 ret->_underlying_ref = true;
1856 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChainWatchedUtil_1register_1tx(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray txid, jlong script_pub_key) {
1857 LDKChainWatchedUtil* this_arg_conv = (LDKChainWatchedUtil*)this_arg;
1858 unsigned char txid_arr[32];
1859 (*_env)->GetByteArrayRegion (_env, txid, 0, 32, txid_arr);
1860 unsigned char (*txid_ref)[32] = &txid_arr;
1861 LDKu8slice script_pub_key_conv = *(LDKu8slice*)script_pub_key;
1862 free((void*)script_pub_key);
1863 return ChainWatchedUtil_register_tx(this_arg_conv, txid_ref, script_pub_key_conv);
1866 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChainWatchedUtil_1register_1outpoint(JNIEnv * _env, jclass _b, jlong this_arg, jlong outpoint, jlong _script_pub_key) {
1867 LDKChainWatchedUtil* this_arg_conv = (LDKChainWatchedUtil*)this_arg;
1868 LDKC2Tuple_Txidu32Z outpoint_conv = *(LDKC2Tuple_Txidu32Z*)outpoint;
1869 free((void*)outpoint);
1870 LDKu8slice _script_pub_key_conv = *(LDKu8slice*)_script_pub_key;
1871 free((void*)_script_pub_key);
1872 return ChainWatchedUtil_register_outpoint(this_arg_conv, outpoint_conv, _script_pub_key_conv);
1875 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChainWatchedUtil_1watch_1all(JNIEnv * _env, jclass _b, jlong this_arg) {
1876 LDKChainWatchedUtil* this_arg_conv = (LDKChainWatchedUtil*)this_arg;
1877 return ChainWatchedUtil_watch_all(this_arg_conv);
1880 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChainWatchedUtil_1does_1match_1tx(JNIEnv * _env, jclass _b, jlong this_arg, jlong tx) {
1881 LDKChainWatchedUtil* this_arg_conv = (LDKChainWatchedUtil*)this_arg;
1882 LDKTransaction tx_conv = *(LDKTransaction*)tx;
1884 return ChainWatchedUtil_does_match_tx(this_arg_conv, tx_conv);
1887 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlockNotifier_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1888 LDKBlockNotifier this_ptr_conv = *(LDKBlockNotifier*)this_ptr;
1889 free((void*)this_ptr);
1890 this_ptr_conv._underlying_ref = false;
1891 return BlockNotifier_free(this_ptr_conv);
1894 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BlockNotifier_1new(JNIEnv * _env, jclass _b, jlong chain_monitor) {
1895 LDKChainWatchInterface chain_monitor_conv = *(LDKChainWatchInterface*)chain_monitor;
1896 free((void*)chain_monitor);
1897 LDKBlockNotifier* ret = malloc(sizeof(LDKBlockNotifier));
1898 *ret = BlockNotifier_new(chain_monitor_conv);
1899 assert(!ret->_underlying_ref);
1900 ret->_underlying_ref = true;
1904 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlockNotifier_1register_1listener(JNIEnv * _env, jclass _b, jlong this_arg, jlong listener) {
1905 LDKBlockNotifier* this_arg_conv = (LDKBlockNotifier*)this_arg;
1906 LDKChainListener listener_conv = *(LDKChainListener*)listener;
1907 free((void*)listener);
1908 return BlockNotifier_register_listener(this_arg_conv, listener_conv);
1911 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlockNotifier_1block_1connected(JNIEnv * _env, jclass _b, jlong this_arg, jlong block, jint height) {
1912 LDKBlockNotifier* this_arg_conv = (LDKBlockNotifier*)this_arg;
1913 LDKu8slice block_conv = *(LDKu8slice*)block;
1915 return BlockNotifier_block_connected(this_arg_conv, block_conv, height);
1918 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) {
1919 LDKBlockNotifier* this_arg_conv = (LDKBlockNotifier*)this_arg;
1920 unsigned char header_arr[80];
1921 (*_env)->GetByteArrayRegion (_env, header, 0, 80, header_arr);
1922 unsigned char (*header_ref)[80] = &header_arr;
1923 LDKCVec_TransactionZ txn_matched_conv = *(LDKCVec_TransactionZ*)txn_matched;
1924 free((void*)txn_matched);
1925 LDKusizeslice indexes_of_txn_matched_conv = *(LDKusizeslice*)indexes_of_txn_matched;
1926 free((void*)indexes_of_txn_matched);
1927 return BlockNotifier_block_connected_checked(this_arg_conv, header_ref, height, txn_matched_conv, indexes_of_txn_matched_conv);
1930 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlockNotifier_1block_1disconnected(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray header, jint disconnected_height) {
1931 LDKBlockNotifier* this_arg_conv = (LDKBlockNotifier*)this_arg;
1932 unsigned char header_arr[80];
1933 (*_env)->GetByteArrayRegion (_env, header, 0, 80, header_arr);
1934 unsigned char (*header_ref)[80] = &header_arr;
1935 return BlockNotifier_block_disconnected(this_arg_conv, header_ref, disconnected_height);
1938 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainWatchInterfaceUtil_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1939 LDKChainWatchInterfaceUtil this_ptr_conv = *(LDKChainWatchInterfaceUtil*)this_ptr;
1940 free((void*)this_ptr);
1941 this_ptr_conv._underlying_ref = false;
1942 return ChainWatchInterfaceUtil_free(this_ptr_conv);
1945 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChainWatchInterfaceUtil_1as_1ChainWatchInterface(JNIEnv * _env, jclass _b, jlong this_arg) {
1946 LDKChainWatchInterfaceUtil* this_arg_conv = (LDKChainWatchInterfaceUtil*)this_arg;
1947 LDKChainWatchInterface* ret = malloc(sizeof(LDKChainWatchInterface));
1948 *ret = ChainWatchInterfaceUtil_as_ChainWatchInterface(this_arg_conv);
1952 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChainWatchInterfaceUtil_1new(JNIEnv * _env, jclass _b, jlong network) {
1953 LDKNetwork network_conv = *(LDKNetwork*)network;
1954 free((void*)network);
1955 LDKChainWatchInterfaceUtil* ret = malloc(sizeof(LDKChainWatchInterfaceUtil));
1956 *ret = ChainWatchInterfaceUtil_new(network_conv);
1957 assert(!ret->_underlying_ref);
1958 ret->_underlying_ref = true;
1962 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChainWatchInterfaceUtil_1does_1match_1tx(JNIEnv * _env, jclass _b, jlong this_arg, jlong tx) {
1963 LDKChainWatchInterfaceUtil* this_arg_conv = (LDKChainWatchInterfaceUtil*)this_arg;
1964 LDKTransaction tx_conv = *(LDKTransaction*)tx;
1966 return ChainWatchInterfaceUtil_does_match_tx(this_arg_conv, tx_conv);
1969 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutPoint_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
1970 LDKOutPoint this_ptr_conv = *(LDKOutPoint*)this_ptr;
1971 free((void*)this_ptr);
1972 this_ptr_conv._underlying_ref = false;
1973 return OutPoint_free(this_ptr_conv);
1976 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OutPoint_1get_1txid(JNIEnv * _env, jclass _b, jlong this_ptr) {
1977 LDKOutPoint* this_ptr_conv = (LDKOutPoint*)this_ptr;
1978 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
1979 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *OutPoint_get_txid(this_ptr_conv));
1983 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutPoint_1set_1txid(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
1984 LDKOutPoint* this_ptr_conv = (LDKOutPoint*)this_ptr;
1985 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
1987 return OutPoint_set_txid(this_ptr_conv, val_conv);
1990 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_OutPoint_1get_1index(JNIEnv * _env, jclass _b, jlong this_ptr) {
1991 LDKOutPoint* this_ptr_conv = (LDKOutPoint*)this_ptr;
1992 return OutPoint_get_index(this_ptr_conv);
1995 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutPoint_1set_1index(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
1996 LDKOutPoint* this_ptr_conv = (LDKOutPoint*)this_ptr;
1997 return OutPoint_set_index(this_ptr_conv, val);
2000 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutPoint_1new(JNIEnv * _env, jclass _b, jlong txid_arg, jshort index_arg) {
2001 LDKThirtyTwoBytes txid_arg_conv = *(LDKThirtyTwoBytes*)txid_arg;
2002 free((void*)txid_arg);
2003 LDKOutPoint* ret = malloc(sizeof(LDKOutPoint));
2004 *ret = OutPoint_new(txid_arg_conv, index_arg);
2005 assert(!ret->_underlying_ref);
2006 ret->_underlying_ref = true;
2010 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutPoint_1to_1channel_1id(JNIEnv * _env, jclass _b, jlong this_arg) {
2011 LDKOutPoint* this_arg_conv = (LDKOutPoint*)this_arg;
2012 LDKThirtyTwoBytes* ret = malloc(sizeof(LDKThirtyTwoBytes));
2013 *ret = OutPoint_to_channel_id(this_arg_conv);
2017 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutPoint_1write(JNIEnv * _env, jclass _b, jlong obj) {
2018 LDKOutPoint* obj_conv = (LDKOutPoint*)obj;
2019 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
2020 *ret = OutPoint_write(obj_conv);
2024 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutPoint_1read(JNIEnv * _env, jclass _b, jlong ser) {
2025 LDKu8slice ser_conv = *(LDKu8slice*)ser;
2027 LDKOutPoint* ret = malloc(sizeof(LDKOutPoint));
2028 *ret = OutPoint_read(ser_conv);
2029 assert(!ret->_underlying_ref);
2030 ret->_underlying_ref = true;
2034 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpendableOutputDescriptor_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2035 LDKSpendableOutputDescriptor this_ptr_conv = *(LDKSpendableOutputDescriptor*)this_ptr;
2036 free((void*)this_ptr);
2037 return SpendableOutputDescriptor_free(this_ptr_conv);
2040 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2041 LDKChannelKeys this_ptr_conv = *(LDKChannelKeys*)this_ptr;
2042 free((void*)this_ptr);
2043 return ChannelKeys_free(this_ptr_conv);
2046 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_KeysInterface_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2047 LDKKeysInterface this_ptr_conv = *(LDKKeysInterface*)this_ptr;
2048 free((void*)this_ptr);
2049 return KeysInterface_free(this_ptr_conv);
2052 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2053 LDKInMemoryChannelKeys this_ptr_conv = *(LDKInMemoryChannelKeys*)this_ptr;
2054 free((void*)this_ptr);
2055 this_ptr_conv._underlying_ref = false;
2056 return InMemoryChannelKeys_free(this_ptr_conv);
2059 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1funding_1key(JNIEnv * _env, jclass _b, jlong this_ptr) {
2060 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2061 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
2062 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *InMemoryChannelKeys_get_funding_key(this_ptr_conv));
2066 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1funding_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2067 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2068 LDKSecretKey val_conv = *(LDKSecretKey*)val;
2070 return InMemoryChannelKeys_set_funding_key(this_ptr_conv, val_conv);
2073 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1revocation_1base_1key(JNIEnv * _env, jclass _b, jlong this_ptr) {
2074 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2075 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
2076 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *InMemoryChannelKeys_get_revocation_base_key(this_ptr_conv));
2080 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1revocation_1base_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2081 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2082 LDKSecretKey val_conv = *(LDKSecretKey*)val;
2084 return InMemoryChannelKeys_set_revocation_base_key(this_ptr_conv, val_conv);
2087 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1payment_1key(JNIEnv * _env, jclass _b, jlong this_ptr) {
2088 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2089 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
2090 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *InMemoryChannelKeys_get_payment_key(this_ptr_conv));
2094 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1payment_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2095 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2096 LDKSecretKey val_conv = *(LDKSecretKey*)val;
2098 return InMemoryChannelKeys_set_payment_key(this_ptr_conv, val_conv);
2101 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1delayed_1payment_1base_1key(JNIEnv * _env, jclass _b, jlong this_ptr) {
2102 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2103 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
2104 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *InMemoryChannelKeys_get_delayed_payment_base_key(this_ptr_conv));
2108 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1delayed_1payment_1base_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2109 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2110 LDKSecretKey val_conv = *(LDKSecretKey*)val;
2112 return InMemoryChannelKeys_set_delayed_payment_base_key(this_ptr_conv, val_conv);
2115 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1htlc_1base_1key(JNIEnv * _env, jclass _b, jlong this_ptr) {
2116 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2117 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
2118 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *InMemoryChannelKeys_get_htlc_base_key(this_ptr_conv));
2122 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1htlc_1base_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2123 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2124 LDKSecretKey val_conv = *(LDKSecretKey*)val;
2126 return InMemoryChannelKeys_set_htlc_base_key(this_ptr_conv, val_conv);
2129 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1commitment_1seed(JNIEnv * _env, jclass _b, jlong this_ptr) {
2130 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2131 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
2132 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *InMemoryChannelKeys_get_commitment_seed(this_ptr_conv));
2136 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1commitment_1seed(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2137 LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
2138 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
2140 return InMemoryChannelKeys_set_commitment_seed(this_ptr_conv, val_conv);
2143 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) {
2144 LDKSecretKey funding_key_conv = *(LDKSecretKey*)funding_key;
2145 free((void*)funding_key);
2146 LDKSecretKey revocation_base_key_conv = *(LDKSecretKey*)revocation_base_key;
2147 free((void*)revocation_base_key);
2148 LDKSecretKey payment_key_conv = *(LDKSecretKey*)payment_key;
2149 free((void*)payment_key);
2150 LDKSecretKey delayed_payment_base_key_conv = *(LDKSecretKey*)delayed_payment_base_key;
2151 free((void*)delayed_payment_base_key);
2152 LDKSecretKey htlc_base_key_conv = *(LDKSecretKey*)htlc_base_key;
2153 free((void*)htlc_base_key);
2154 LDKThirtyTwoBytes commitment_seed_conv = *(LDKThirtyTwoBytes*)commitment_seed;
2155 free((void*)commitment_seed);
2156 LDKC2Tuple_u64u64Z key_derivation_params_conv = *(LDKC2Tuple_u64u64Z*)key_derivation_params;
2157 free((void*)key_derivation_params);
2158 LDKInMemoryChannelKeys* ret = malloc(sizeof(LDKInMemoryChannelKeys));
2159 *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);
2160 assert(!ret->_underlying_ref);
2161 ret->_underlying_ref = true;
2165 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1remote_1pubkeys(JNIEnv * _env, jclass _b, jlong this_arg) {
2166 LDKInMemoryChannelKeys* this_arg_conv = (LDKInMemoryChannelKeys*)this_arg;
2167 LDKChannelPublicKeys* ret = malloc(sizeof(LDKChannelPublicKeys));
2168 *ret = InMemoryChannelKeys_remote_pubkeys(this_arg_conv);
2169 assert(!ret->_underlying_ref);
2170 ret->_underlying_ref = true;
2174 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1remote_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_arg) {
2175 LDKInMemoryChannelKeys* this_arg_conv = (LDKInMemoryChannelKeys*)this_arg;
2176 return InMemoryChannelKeys_remote_to_self_delay(this_arg_conv);
2179 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1local_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_arg) {
2180 LDKInMemoryChannelKeys* this_arg_conv = (LDKInMemoryChannelKeys*)this_arg;
2181 return InMemoryChannelKeys_local_to_self_delay(this_arg_conv);
2184 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1as_1ChannelKeys(JNIEnv * _env, jclass _b, jlong this_arg) {
2185 LDKInMemoryChannelKeys* this_arg_conv = (LDKInMemoryChannelKeys*)this_arg;
2186 LDKChannelKeys* ret = malloc(sizeof(LDKChannelKeys));
2187 *ret = InMemoryChannelKeys_as_ChannelKeys(this_arg_conv);
2191 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1write(JNIEnv * _env, jclass _b, jlong obj) {
2192 LDKInMemoryChannelKeys* obj_conv = (LDKInMemoryChannelKeys*)obj;
2193 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
2194 *ret = InMemoryChannelKeys_write(obj_conv);
2198 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1read(JNIEnv * _env, jclass _b, jlong ser) {
2199 LDKu8slice ser_conv = *(LDKu8slice*)ser;
2201 LDKInMemoryChannelKeys* ret = malloc(sizeof(LDKInMemoryChannelKeys));
2202 *ret = InMemoryChannelKeys_read(ser_conv);
2203 assert(!ret->_underlying_ref);
2204 ret->_underlying_ref = true;
2208 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_KeysManager_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2209 LDKKeysManager this_ptr_conv = *(LDKKeysManager*)this_ptr;
2210 free((void*)this_ptr);
2211 this_ptr_conv._underlying_ref = false;
2212 return KeysManager_free(this_ptr_conv);
2215 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) {
2216 unsigned char seed_arr[32];
2217 (*_env)->GetByteArrayRegion (_env, seed, 0, 32, seed_arr);
2218 unsigned char (*seed_ref)[32] = &seed_arr;
2219 LDKNetwork network_conv = *(LDKNetwork*)network;
2220 free((void*)network);
2221 LDKKeysManager* ret = malloc(sizeof(LDKKeysManager));
2222 *ret = KeysManager_new(seed_ref, network_conv, starting_time_secs, starting_time_nanos);
2223 assert(!ret->_underlying_ref);
2224 ret->_underlying_ref = true;
2228 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) {
2229 LDKKeysManager* this_arg_conv = (LDKKeysManager*)this_arg;
2230 LDKInMemoryChannelKeys* ret = malloc(sizeof(LDKInMemoryChannelKeys));
2231 *ret = KeysManager_derive_channel_keys(this_arg_conv, channel_value_satoshis, params_1, params_2);
2232 assert(!ret->_underlying_ref);
2233 ret->_underlying_ref = true;
2237 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1KeysInterface(JNIEnv * _env, jclass _b, jlong this_arg) {
2238 LDKKeysManager* this_arg_conv = (LDKKeysManager*)this_arg;
2239 LDKKeysInterface* ret = malloc(sizeof(LDKKeysInterface));
2240 *ret = KeysManager_as_KeysInterface(this_arg_conv);
2244 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2245 LDKChannelManager this_ptr_conv = *(LDKChannelManager*)this_ptr;
2246 free((void*)this_ptr);
2247 this_ptr_conv._underlying_ref = false;
2248 return ChannelManager_free(this_ptr_conv);
2251 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2252 LDKChannelDetails this_ptr_conv = *(LDKChannelDetails*)this_ptr;
2253 free((void*)this_ptr);
2254 this_ptr_conv._underlying_ref = false;
2255 return ChannelDetails_free(this_ptr_conv);
2258 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
2259 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2260 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
2261 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *ChannelDetails_get_channel_id(this_ptr_conv));
2265 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2266 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2267 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
2269 return ChannelDetails_set_channel_id(this_ptr_conv, val_conv);
2272 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1remote_1network_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
2273 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2274 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
2275 *ret = ChannelDetails_get_remote_network_id(this_ptr_conv);
2279 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1remote_1network_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2280 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2281 LDKPublicKey val_conv = *(LDKPublicKey*)val;
2283 return ChannelDetails_set_remote_network_id(this_ptr_conv, val_conv);
2286 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1counterparty_1features(JNIEnv * _env, jclass _b, jlong this_ptr) {
2287 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2288 LDKInitFeatures* ret = malloc(sizeof(LDKInitFeatures));
2289 *ret = ChannelDetails_get_counterparty_features(this_ptr_conv);
2290 assert(!ret->_underlying_ref);
2291 ret->_underlying_ref = true;
2295 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1counterparty_1features(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2296 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2297 LDKInitFeatures val_conv = *(LDKInitFeatures*)val;
2299 val_conv._underlying_ref = false;
2300 return ChannelDetails_set_counterparty_features(this_ptr_conv, val_conv);
2303 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1channel_1value_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
2304 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2305 return ChannelDetails_get_channel_value_satoshis(this_ptr_conv);
2308 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1channel_1value_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2309 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2310 return ChannelDetails_set_channel_value_satoshis(this_ptr_conv, val);
2313 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1user_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
2314 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2315 return ChannelDetails_get_user_id(this_ptr_conv);
2318 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1user_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2319 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2320 return ChannelDetails_set_user_id(this_ptr_conv, val);
2323 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1outbound_1capacity_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
2324 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2325 return ChannelDetails_get_outbound_capacity_msat(this_ptr_conv);
2328 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1outbound_1capacity_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2329 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2330 return ChannelDetails_set_outbound_capacity_msat(this_ptr_conv, val);
2333 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1inbound_1capacity_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
2334 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2335 return ChannelDetails_get_inbound_capacity_msat(this_ptr_conv);
2338 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1inbound_1capacity_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2339 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2340 return ChannelDetails_set_inbound_capacity_msat(this_ptr_conv, val);
2343 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1is_1live(JNIEnv * _env, jclass _b, jlong this_ptr) {
2344 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2345 return ChannelDetails_get_is_live(this_ptr_conv);
2348 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1is_1live(JNIEnv * _env, jclass _b, jlong this_ptr, jboolean val) {
2349 LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
2350 return ChannelDetails_set_is_live(this_ptr_conv, val);
2353 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PaymentSendFailure_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2354 LDKPaymentSendFailure this_ptr_conv = *(LDKPaymentSendFailure*)this_ptr;
2355 free((void*)this_ptr);
2356 this_ptr_conv._underlying_ref = false;
2357 return PaymentSendFailure_free(this_ptr_conv);
2360 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) {
2361 LDKNetwork network_conv = *(LDKNetwork*)network;
2362 free((void*)network);
2363 LDKFeeEstimator fee_est_conv = *(LDKFeeEstimator*)fee_est;
2364 free((void*)fee_est);
2365 LDKManyChannelMonitor monitor_conv = *(LDKManyChannelMonitor*)monitor;
2366 free((void*)monitor);
2367 LDKBroadcasterInterface tx_broadcaster_conv = *(LDKBroadcasterInterface*)tx_broadcaster;
2368 free((void*)tx_broadcaster);
2369 LDKLogger logger_conv = *(LDKLogger*)logger;
2370 free((void*)logger);
2371 LDKKeysInterface keys_manager_conv = *(LDKKeysInterface*)keys_manager;
2372 free((void*)keys_manager);
2373 LDKUserConfig config_conv = *(LDKUserConfig*)config;
2374 free((void*)config);
2375 config_conv._underlying_ref = false;
2376 uintptr_t current_blockchain_height_conv = *(uintptr_t*)current_blockchain_height;
2377 free((void*)current_blockchain_height);
2378 LDKChannelManager* ret = malloc(sizeof(LDKChannelManager));
2379 *ret = ChannelManager_new(network_conv, fee_est_conv, monitor_conv, tx_broadcaster_conv, logger_conv, keys_manager_conv, config_conv, current_blockchain_height_conv);
2380 assert(!ret->_underlying_ref);
2381 ret->_underlying_ref = true;
2385 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) {
2386 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2387 LDKPublicKey their_network_key_conv = *(LDKPublicKey*)their_network_key;
2388 free((void*)their_network_key);
2389 LDKUserConfig override_config_conv = *(LDKUserConfig*)override_config;
2390 free((void*)override_config);
2391 override_config_conv._underlying_ref = false;
2392 LDKCResult_NoneAPIErrorZ* ret = malloc(sizeof(LDKCResult_NoneAPIErrorZ));
2393 *ret = ChannelManager_create_channel(this_arg_conv, their_network_key_conv, channel_value_satoshis, push_msat, user_id, override_config_conv);
2397 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1list_1channels(JNIEnv * _env, jclass _b, jlong this_arg) {
2398 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2399 LDKCVec_ChannelDetailsZ* ret = malloc(sizeof(LDKCVec_ChannelDetailsZ));
2400 *ret = ChannelManager_list_channels(this_arg_conv);
2404 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1list_1usable_1channels(JNIEnv * _env, jclass _b, jlong this_arg) {
2405 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2406 LDKCVec_ChannelDetailsZ* ret = malloc(sizeof(LDKCVec_ChannelDetailsZ));
2407 *ret = ChannelManager_list_usable_channels(this_arg_conv);
2411 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1close_1channel(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray channel_id) {
2412 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2413 unsigned char channel_id_arr[32];
2414 (*_env)->GetByteArrayRegion (_env, channel_id, 0, 32, channel_id_arr);
2415 unsigned char (*channel_id_ref)[32] = &channel_id_arr;
2416 LDKCResult_NoneAPIErrorZ* ret = malloc(sizeof(LDKCResult_NoneAPIErrorZ));
2417 *ret = ChannelManager_close_channel(this_arg_conv, channel_id_ref);
2421 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1force_1close_1channel(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray channel_id) {
2422 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2423 unsigned char channel_id_arr[32];
2424 (*_env)->GetByteArrayRegion (_env, channel_id, 0, 32, channel_id_arr);
2425 unsigned char (*channel_id_ref)[32] = &channel_id_arr;
2426 return ChannelManager_force_close_channel(this_arg_conv, channel_id_ref);
2429 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1force_1close_1all_1channels(JNIEnv * _env, jclass _b, jlong this_arg) {
2430 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2431 return ChannelManager_force_close_all_channels(this_arg_conv);
2434 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) {
2435 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2436 LDKRoute* route_conv = (LDKRoute*)route;
2437 LDKThirtyTwoBytes payment_hash_conv = *(LDKThirtyTwoBytes*)payment_hash;
2438 free((void*)payment_hash);
2439 LDKThirtyTwoBytes payment_secret_conv = *(LDKThirtyTwoBytes*)payment_secret;
2440 free((void*)payment_secret);
2441 LDKCResult_NonePaymentSendFailureZ* ret = malloc(sizeof(LDKCResult_NonePaymentSendFailureZ));
2442 *ret = ChannelManager_send_payment(this_arg_conv, route_conv, payment_hash_conv, payment_secret_conv);
2446 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) {
2447 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2448 unsigned char temporary_channel_id_arr[32];
2449 (*_env)->GetByteArrayRegion (_env, temporary_channel_id, 0, 32, temporary_channel_id_arr);
2450 unsigned char (*temporary_channel_id_ref)[32] = &temporary_channel_id_arr;
2451 LDKOutPoint funding_txo_conv = *(LDKOutPoint*)funding_txo;
2452 free((void*)funding_txo);
2453 funding_txo_conv._underlying_ref = false;
2454 return ChannelManager_funding_transaction_generated(this_arg_conv, temporary_channel_id_ref, funding_txo_conv);
2457 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) {
2458 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2459 LDKThreeBytes rgb_conv = *(LDKThreeBytes*)rgb;
2461 LDKThirtyTwoBytes alias_conv = *(LDKThirtyTwoBytes*)alias;
2463 LDKCVec_NetAddressZ addresses_conv = *(LDKCVec_NetAddressZ*)addresses;
2464 free((void*)addresses);
2465 return ChannelManager_broadcast_node_announcement(this_arg_conv, rgb_conv, alias_conv, addresses_conv);
2468 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1process_1pending_1htlc_1forwards(JNIEnv * _env, jclass _b, jlong this_arg) {
2469 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2470 return ChannelManager_process_pending_htlc_forwards(this_arg_conv);
2473 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1timer_1chan_1freshness_1every_1min(JNIEnv * _env, jclass _b, jlong this_arg) {
2474 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2475 return ChannelManager_timer_chan_freshness_every_min(this_arg_conv);
2478 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) {
2479 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2480 unsigned char payment_hash_arr[32];
2481 (*_env)->GetByteArrayRegion (_env, payment_hash, 0, 32, payment_hash_arr);
2482 unsigned char (*payment_hash_ref)[32] = &payment_hash_arr;
2483 LDKThirtyTwoBytes payment_secret_conv = *(LDKThirtyTwoBytes*)payment_secret;
2484 free((void*)payment_secret);
2485 return ChannelManager_fail_htlc_backwards(this_arg_conv, payment_hash_ref, payment_secret_conv);
2488 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) {
2489 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2490 LDKThirtyTwoBytes payment_preimage_conv = *(LDKThirtyTwoBytes*)payment_preimage;
2491 free((void*)payment_preimage);
2492 LDKThirtyTwoBytes payment_secret_conv = *(LDKThirtyTwoBytes*)payment_secret;
2493 free((void*)payment_secret);
2494 return ChannelManager_claim_funds(this_arg_conv, payment_preimage_conv, payment_secret_conv, expected_amount);
2497 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1get_1our_1node_1id(JNIEnv * _env, jclass _b, jlong this_arg) {
2498 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2499 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
2500 *ret = ChannelManager_get_our_node_id(this_arg_conv);
2504 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) {
2505 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2506 LDKOutPoint* funding_txo_conv = (LDKOutPoint*)funding_txo;
2507 return ChannelManager_channel_monitor_updated(this_arg_conv, funding_txo_conv, highest_applied_update_id);
2510 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1MessageSendEventsProvider(JNIEnv * _env, jclass _b, jlong this_arg) {
2511 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2512 LDKMessageSendEventsProvider* ret = malloc(sizeof(LDKMessageSendEventsProvider));
2513 *ret = ChannelManager_as_MessageSendEventsProvider(this_arg_conv);
2517 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1EventsProvider(JNIEnv * _env, jclass _b, jlong this_arg) {
2518 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2519 LDKEventsProvider* ret = malloc(sizeof(LDKEventsProvider));
2520 *ret = ChannelManager_as_EventsProvider(this_arg_conv);
2524 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1ChainListener(JNIEnv * _env, jclass _b, jlong this_arg) {
2525 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2526 LDKChainListener* ret = malloc(sizeof(LDKChainListener));
2527 *ret = ChannelManager_as_ChainListener(this_arg_conv);
2531 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1ChannelMessageHandler(JNIEnv * _env, jclass _b, jlong this_arg) {
2532 LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
2533 LDKChannelMessageHandler* ret = malloc(sizeof(LDKChannelMessageHandler));
2534 *ret = ChannelManager_as_ChannelMessageHandler(this_arg_conv);
2538 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2539 LDKChannelManagerReadArgs this_ptr_conv = *(LDKChannelManagerReadArgs*)this_ptr;
2540 free((void*)this_ptr);
2541 this_ptr_conv._underlying_ref = false;
2542 return ChannelManagerReadArgs_free(this_ptr_conv);
2545 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1get_1keys_1manager(JNIEnv * _env, jclass _b, jlong this_ptr) {
2546 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2547 long ret = (long)ChannelManagerReadArgs_get_keys_manager(this_ptr_conv);
2551 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1set_1keys_1manager(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2552 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2553 LDKKeysInterface val_conv = *(LDKKeysInterface*)val;
2555 return ChannelManagerReadArgs_set_keys_manager(this_ptr_conv, val_conv);
2558 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1get_1fee_1estimator(JNIEnv * _env, jclass _b, jlong this_ptr) {
2559 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2560 long ret = (long)ChannelManagerReadArgs_get_fee_estimator(this_ptr_conv);
2564 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1set_1fee_1estimator(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2565 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2566 LDKFeeEstimator val_conv = *(LDKFeeEstimator*)val;
2568 return ChannelManagerReadArgs_set_fee_estimator(this_ptr_conv, val_conv);
2571 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1get_1monitor(JNIEnv * _env, jclass _b, jlong this_ptr) {
2572 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2573 long ret = (long)ChannelManagerReadArgs_get_monitor(this_ptr_conv);
2577 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1set_1monitor(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2578 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2579 LDKManyChannelMonitor val_conv = *(LDKManyChannelMonitor*)val;
2581 return ChannelManagerReadArgs_set_monitor(this_ptr_conv, val_conv);
2584 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1get_1tx_1broadcaster(JNIEnv * _env, jclass _b, jlong this_ptr) {
2585 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2586 long ret = (long)ChannelManagerReadArgs_get_tx_broadcaster(this_ptr_conv);
2590 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1set_1tx_1broadcaster(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2591 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2592 LDKBroadcasterInterface val_conv = *(LDKBroadcasterInterface*)val;
2594 return ChannelManagerReadArgs_set_tx_broadcaster(this_ptr_conv, val_conv);
2597 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1get_1logger(JNIEnv * _env, jclass _b, jlong this_ptr) {
2598 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2599 long ret = (long)ChannelManagerReadArgs_get_logger(this_ptr_conv);
2603 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1set_1logger(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2604 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2605 LDKLogger val_conv = *(LDKLogger*)val;
2607 return ChannelManagerReadArgs_set_logger(this_ptr_conv, val_conv);
2610 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1get_1default_1config(JNIEnv * _env, jclass _b, jlong this_ptr) {
2611 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2612 LDKUserConfig* ret = malloc(sizeof(LDKUserConfig));
2613 *ret = ChannelManagerReadArgs_get_default_config(this_ptr_conv);
2614 assert(!ret->_underlying_ref);
2615 ret->_underlying_ref = true;
2619 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1set_1default_1config(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2620 LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr;
2621 LDKUserConfig val_conv = *(LDKUserConfig*)val;
2623 val_conv._underlying_ref = false;
2624 return ChannelManagerReadArgs_set_default_config(this_ptr_conv, val_conv);
2627 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) {
2628 LDKKeysInterface keys_manager_conv = *(LDKKeysInterface*)keys_manager;
2629 free((void*)keys_manager);
2630 LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)fee_estimator;
2631 free((void*)fee_estimator);
2632 LDKManyChannelMonitor monitor_conv = *(LDKManyChannelMonitor*)monitor;
2633 free((void*)monitor);
2634 LDKBroadcasterInterface tx_broadcaster_conv = *(LDKBroadcasterInterface*)tx_broadcaster;
2635 free((void*)tx_broadcaster);
2636 LDKLogger logger_conv = *(LDKLogger*)logger;
2637 free((void*)logger);
2638 LDKUserConfig default_config_conv = *(LDKUserConfig*)default_config;
2639 free((void*)default_config);
2640 default_config_conv._underlying_ref = false;
2641 LDKCVec_ChannelMonitorZ channel_monitors_conv = *(LDKCVec_ChannelMonitorZ*)channel_monitors;
2642 free((void*)channel_monitors);
2643 LDKChannelManagerReadArgs* ret = malloc(sizeof(LDKChannelManagerReadArgs));
2644 *ret = ChannelManagerReadArgs_new(keys_manager_conv, fee_estimator_conv, monitor_conv, tx_broadcaster_conv, logger_conv, default_config_conv, channel_monitors_conv);
2645 assert(!ret->_underlying_ref);
2646 ret->_underlying_ref = true;
2650 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2651 LDKChannelMonitorUpdate this_ptr_conv = *(LDKChannelMonitorUpdate*)this_ptr;
2652 free((void*)this_ptr);
2653 this_ptr_conv._underlying_ref = false;
2654 return ChannelMonitorUpdate_free(this_ptr_conv);
2657 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1get_1update_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
2658 LDKChannelMonitorUpdate* this_ptr_conv = (LDKChannelMonitorUpdate*)this_ptr;
2659 return ChannelMonitorUpdate_get_update_id(this_ptr_conv);
2662 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1set_1update_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2663 LDKChannelMonitorUpdate* this_ptr_conv = (LDKChannelMonitorUpdate*)this_ptr;
2664 return ChannelMonitorUpdate_set_update_id(this_ptr_conv, val);
2667 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1write(JNIEnv * _env, jclass _b, jlong obj) {
2668 LDKChannelMonitorUpdate* obj_conv = (LDKChannelMonitorUpdate*)obj;
2669 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
2670 *ret = ChannelMonitorUpdate_write(obj_conv);
2674 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1read(JNIEnv * _env, jclass _b, jlong ser) {
2675 LDKu8slice ser_conv = *(LDKu8slice*)ser;
2677 LDKChannelMonitorUpdate* ret = malloc(sizeof(LDKChannelMonitorUpdate));
2678 *ret = ChannelMonitorUpdate_read(ser_conv);
2679 assert(!ret->_underlying_ref);
2680 ret->_underlying_ref = true;
2684 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_MonitorUpdateError_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2685 LDKMonitorUpdateError this_ptr_conv = *(LDKMonitorUpdateError*)this_ptr;
2686 free((void*)this_ptr);
2687 this_ptr_conv._underlying_ref = false;
2688 return MonitorUpdateError_free(this_ptr_conv);
2691 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2692 LDKMonitorEvent this_ptr_conv = *(LDKMonitorEvent*)this_ptr;
2693 free((void*)this_ptr);
2694 this_ptr_conv._underlying_ref = false;
2695 return MonitorEvent_free(this_ptr_conv);
2698 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCUpdate_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2699 LDKHTLCUpdate this_ptr_conv = *(LDKHTLCUpdate*)this_ptr;
2700 free((void*)this_ptr);
2701 this_ptr_conv._underlying_ref = false;
2702 return HTLCUpdate_free(this_ptr_conv);
2705 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCUpdate_1write(JNIEnv * _env, jclass _b, jlong obj) {
2706 LDKHTLCUpdate* obj_conv = (LDKHTLCUpdate*)obj;
2707 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
2708 *ret = HTLCUpdate_write(obj_conv);
2712 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCUpdate_1read(JNIEnv * _env, jclass _b, jlong ser) {
2713 LDKu8slice ser_conv = *(LDKu8slice*)ser;
2715 LDKHTLCUpdate* ret = malloc(sizeof(LDKHTLCUpdate));
2716 *ret = HTLCUpdate_read(ser_conv);
2717 assert(!ret->_underlying_ref);
2718 ret->_underlying_ref = true;
2722 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2723 LDKChannelMonitor this_ptr_conv = *(LDKChannelMonitor*)this_ptr;
2724 free((void*)this_ptr);
2725 this_ptr_conv._underlying_ref = false;
2726 return ChannelMonitor_free(this_ptr_conv);
2729 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ManyChannelMonitor_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2730 LDKManyChannelMonitor this_ptr_conv = *(LDKManyChannelMonitor*)this_ptr;
2731 free((void*)this_ptr);
2732 return ManyChannelMonitor_free(this_ptr_conv);
2735 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1update_1monitor(JNIEnv * _env, jclass _b, jlong this_arg, jlong updates, jlong broadcaster, jlong logger) {
2736 LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg;
2737 LDKChannelMonitorUpdate updates_conv = *(LDKChannelMonitorUpdate*)updates;
2738 free((void*)updates);
2739 updates_conv._underlying_ref = false;
2740 LDKBroadcasterInterface* broadcaster_conv = (LDKBroadcasterInterface*)broadcaster;
2741 LDKLogger* logger_conv = (LDKLogger*)logger;
2742 LDKCResult_NoneMonitorUpdateErrorZ* ret = malloc(sizeof(LDKCResult_NoneMonitorUpdateErrorZ));
2743 *ret = ChannelMonitor_update_monitor(this_arg_conv, updates_conv, broadcaster_conv, logger_conv);
2747 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1latest_1update_1id(JNIEnv * _env, jclass _b, jlong this_arg) {
2748 LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg;
2749 return ChannelMonitor_get_latest_update_id(this_arg_conv);
2752 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1funding_1txo(JNIEnv * _env, jclass _b, jlong this_arg) {
2753 LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg;
2754 LDKC2Tuple_OutPointScriptZ* ret = malloc(sizeof(LDKC2Tuple_OutPointScriptZ));
2755 *ret = ChannelMonitor_get_funding_txo(this_arg_conv);
2759 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1and_1clear_1pending_1monitor_1events(JNIEnv * _env, jclass _b, jlong this_arg) {
2760 LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg;
2761 LDKCVec_MonitorEventZ* ret = malloc(sizeof(LDKCVec_MonitorEventZ));
2762 *ret = ChannelMonitor_get_and_clear_pending_monitor_events(this_arg_conv);
2766 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1and_1clear_1pending_1events(JNIEnv * _env, jclass _b, jlong this_arg) {
2767 LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg;
2768 LDKCVec_EventZ* ret = malloc(sizeof(LDKCVec_EventZ));
2769 *ret = ChannelMonitor_get_and_clear_pending_events(this_arg_conv);
2773 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1latest_1local_1commitment_1txn(JNIEnv * _env, jclass _b, jlong this_arg, jlong logger) {
2774 LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg;
2775 LDKLogger* logger_conv = (LDKLogger*)logger;
2776 LDKCVec_TransactionZ* ret = malloc(sizeof(LDKCVec_TransactionZ));
2777 *ret = ChannelMonitor_get_latest_local_commitment_txn(this_arg_conv, logger_conv);
2781 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DecodeError_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2782 LDKDecodeError this_ptr_conv = *(LDKDecodeError*)this_ptr;
2783 free((void*)this_ptr);
2784 this_ptr_conv._underlying_ref = false;
2785 return DecodeError_free(this_ptr_conv);
2788 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Init_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2789 LDKInit this_ptr_conv = *(LDKInit*)this_ptr;
2790 free((void*)this_ptr);
2791 this_ptr_conv._underlying_ref = false;
2792 return Init_free(this_ptr_conv);
2795 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2796 LDKErrorMessage this_ptr_conv = *(LDKErrorMessage*)this_ptr;
2797 free((void*)this_ptr);
2798 this_ptr_conv._underlying_ref = false;
2799 return ErrorMessage_free(this_ptr_conv);
2802 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
2803 LDKErrorMessage* this_ptr_conv = (LDKErrorMessage*)this_ptr;
2804 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
2805 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *ErrorMessage_get_channel_id(this_ptr_conv));
2809 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2810 LDKErrorMessage* this_ptr_conv = (LDKErrorMessage*)this_ptr;
2811 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
2813 return ErrorMessage_set_channel_id(this_ptr_conv, val_conv);
2816 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1get_1data(JNIEnv * _env, jclass _b, jlong this_ptr) {
2817 LDKErrorMessage* this_ptr_conv = (LDKErrorMessage*)this_ptr;
2818 LDKStr* ret = malloc(sizeof(LDKStr));
2819 *ret = ErrorMessage_get_data(this_ptr_conv);
2823 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1set_1data(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2824 LDKErrorMessage* this_ptr_conv = (LDKErrorMessage*)this_ptr;
2825 LDKCVec_u8Z val_conv = *(LDKCVec_u8Z*)val;
2827 return ErrorMessage_set_data(this_ptr_conv, val_conv);
2830 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1new(JNIEnv * _env, jclass _b, jlong channel_id_arg, jlong data_arg) {
2831 LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
2832 free((void*)channel_id_arg);
2833 LDKCVec_u8Z data_arg_conv = *(LDKCVec_u8Z*)data_arg;
2834 free((void*)data_arg);
2835 LDKErrorMessage* ret = malloc(sizeof(LDKErrorMessage));
2836 *ret = ErrorMessage_new(channel_id_arg_conv, data_arg_conv);
2837 assert(!ret->_underlying_ref);
2838 ret->_underlying_ref = true;
2842 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Ping_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2843 LDKPing this_ptr_conv = *(LDKPing*)this_ptr;
2844 free((void*)this_ptr);
2845 this_ptr_conv._underlying_ref = false;
2846 return Ping_free(this_ptr_conv);
2849 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_Ping_1get_1ponglen(JNIEnv * _env, jclass _b, jlong this_ptr) {
2850 LDKPing* this_ptr_conv = (LDKPing*)this_ptr;
2851 return Ping_get_ponglen(this_ptr_conv);
2854 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Ping_1set_1ponglen(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
2855 LDKPing* this_ptr_conv = (LDKPing*)this_ptr;
2856 return Ping_set_ponglen(this_ptr_conv, val);
2859 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_Ping_1get_1byteslen(JNIEnv * _env, jclass _b, jlong this_ptr) {
2860 LDKPing* this_ptr_conv = (LDKPing*)this_ptr;
2861 return Ping_get_byteslen(this_ptr_conv);
2864 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Ping_1set_1byteslen(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
2865 LDKPing* this_ptr_conv = (LDKPing*)this_ptr;
2866 return Ping_set_byteslen(this_ptr_conv, val);
2869 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Ping_1new(JNIEnv * _env, jclass _b, jshort ponglen_arg, jshort byteslen_arg) {
2870 LDKPing* ret = malloc(sizeof(LDKPing));
2871 *ret = Ping_new(ponglen_arg, byteslen_arg);
2872 assert(!ret->_underlying_ref);
2873 ret->_underlying_ref = true;
2877 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Pong_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2878 LDKPong this_ptr_conv = *(LDKPong*)this_ptr;
2879 free((void*)this_ptr);
2880 this_ptr_conv._underlying_ref = false;
2881 return Pong_free(this_ptr_conv);
2884 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_Pong_1get_1byteslen(JNIEnv * _env, jclass _b, jlong this_ptr) {
2885 LDKPong* this_ptr_conv = (LDKPong*)this_ptr;
2886 return Pong_get_byteslen(this_ptr_conv);
2889 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Pong_1set_1byteslen(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
2890 LDKPong* this_ptr_conv = (LDKPong*)this_ptr;
2891 return Pong_set_byteslen(this_ptr_conv, val);
2894 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Pong_1new(JNIEnv * _env, jclass _b, jshort byteslen_arg) {
2895 LDKPong* ret = malloc(sizeof(LDKPong));
2896 *ret = Pong_new(byteslen_arg);
2897 assert(!ret->_underlying_ref);
2898 ret->_underlying_ref = true;
2902 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
2903 LDKOpenChannel this_ptr_conv = *(LDKOpenChannel*)this_ptr;
2904 free((void*)this_ptr);
2905 this_ptr_conv._underlying_ref = false;
2906 return OpenChannel_free(this_ptr_conv);
2909 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr) {
2910 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2911 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
2912 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *OpenChannel_get_chain_hash(this_ptr_conv));
2916 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2917 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2918 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
2920 return OpenChannel_set_chain_hash(this_ptr_conv, val_conv);
2923 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1temporary_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
2924 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2925 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
2926 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *OpenChannel_get_temporary_channel_id(this_ptr_conv));
2930 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1temporary_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2931 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2932 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
2934 return OpenChannel_set_temporary_channel_id(this_ptr_conv, val_conv);
2937 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1funding_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
2938 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2939 return OpenChannel_get_funding_satoshis(this_ptr_conv);
2942 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1funding_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2943 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2944 return OpenChannel_set_funding_satoshis(this_ptr_conv, val);
2947 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1push_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
2948 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2949 return OpenChannel_get_push_msat(this_ptr_conv);
2952 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1push_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2953 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2954 return OpenChannel_set_push_msat(this_ptr_conv, val);
2957 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1dust_1limit_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
2958 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2959 return OpenChannel_get_dust_limit_satoshis(this_ptr_conv);
2962 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1dust_1limit_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2963 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2964 return OpenChannel_set_dust_limit_satoshis(this_ptr_conv, val);
2967 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
2968 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2969 return OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr_conv);
2972 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) {
2973 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2974 return OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr_conv, val);
2977 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1reserve_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
2978 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2979 return OpenChannel_get_channel_reserve_satoshis(this_ptr_conv);
2982 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1reserve_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2983 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2984 return OpenChannel_set_channel_reserve_satoshis(this_ptr_conv, val);
2987 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
2988 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2989 return OpenChannel_get_htlc_minimum_msat(this_ptr_conv);
2992 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
2993 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2994 return OpenChannel_set_htlc_minimum_msat(this_ptr_conv, val);
2997 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1feerate_1per_1kw(JNIEnv * _env, jclass _b, jlong this_ptr) {
2998 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
2999 return OpenChannel_get_feerate_per_kw(this_ptr_conv);
3002 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1feerate_1per_1kw(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
3003 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3004 return OpenChannel_set_feerate_per_kw(this_ptr_conv, val);
3007 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_ptr) {
3008 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3009 return OpenChannel_get_to_self_delay(this_ptr_conv);
3012 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
3013 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3014 return OpenChannel_set_to_self_delay(this_ptr_conv, val);
3017 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1max_1accepted_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr) {
3018 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3019 return OpenChannel_get_max_accepted_htlcs(this_ptr_conv);
3022 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1max_1accepted_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
3023 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3024 return OpenChannel_set_max_accepted_htlcs(this_ptr_conv, val);
3027 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1funding_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr) {
3028 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3029 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3030 *ret = OpenChannel_get_funding_pubkey(this_ptr_conv);
3034 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1funding_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3035 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3036 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3038 return OpenChannel_set_funding_pubkey(this_ptr_conv, val_conv);
3041 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1revocation_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr) {
3042 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3043 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3044 *ret = OpenChannel_get_revocation_basepoint(this_ptr_conv);
3048 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1revocation_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3049 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3050 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3052 return OpenChannel_set_revocation_basepoint(this_ptr_conv, val_conv);
3055 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1payment_1point(JNIEnv * _env, jclass _b, jlong this_ptr) {
3056 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3057 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3058 *ret = OpenChannel_get_payment_point(this_ptr_conv);
3062 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1payment_1point(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3063 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3064 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3066 return OpenChannel_set_payment_point(this_ptr_conv, val_conv);
3069 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1delayed_1payment_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr) {
3070 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3071 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3072 *ret = OpenChannel_get_delayed_payment_basepoint(this_ptr_conv);
3076 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1delayed_1payment_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3077 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3078 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3080 return OpenChannel_set_delayed_payment_basepoint(this_ptr_conv, val_conv);
3083 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1htlc_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr) {
3084 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3085 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3086 *ret = OpenChannel_get_htlc_basepoint(this_ptr_conv);
3090 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1htlc_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3091 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3092 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3094 return OpenChannel_set_htlc_basepoint(this_ptr_conv, val_conv);
3097 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1first_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr) {
3098 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3099 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3100 *ret = OpenChannel_get_first_per_commitment_point(this_ptr_conv);
3104 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1first_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3105 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3106 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3108 return OpenChannel_set_first_per_commitment_point(this_ptr_conv, val_conv);
3111 JNIEXPORT jbyte JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1flags(JNIEnv * _env, jclass _b, jlong this_ptr) {
3112 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3113 return OpenChannel_get_channel_flags(this_ptr_conv);
3116 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1flags(JNIEnv * _env, jclass _b, jlong this_ptr, jbyte val) {
3117 LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
3118 return OpenChannel_set_channel_flags(this_ptr_conv, val);
3121 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3122 LDKAcceptChannel this_ptr_conv = *(LDKAcceptChannel*)this_ptr;
3123 free((void*)this_ptr);
3124 this_ptr_conv._underlying_ref = false;
3125 return AcceptChannel_free(this_ptr_conv);
3128 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1temporary_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3129 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3130 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3131 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *AcceptChannel_get_temporary_channel_id(this_ptr_conv));
3135 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1temporary_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3136 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3137 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3139 return AcceptChannel_set_temporary_channel_id(this_ptr_conv, val_conv);
3142 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1dust_1limit_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
3143 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3144 return AcceptChannel_get_dust_limit_satoshis(this_ptr_conv);
3147 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1dust_1limit_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3148 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3149 return AcceptChannel_set_dust_limit_satoshis(this_ptr_conv, val);
3152 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
3153 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3154 return AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr_conv);
3157 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) {
3158 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3159 return AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr_conv, val);
3162 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1channel_1reserve_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
3163 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3164 return AcceptChannel_get_channel_reserve_satoshis(this_ptr_conv);
3167 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1channel_1reserve_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3168 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3169 return AcceptChannel_set_channel_reserve_satoshis(this_ptr_conv, val);
3172 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
3173 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3174 return AcceptChannel_get_htlc_minimum_msat(this_ptr_conv);
3177 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3178 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3179 return AcceptChannel_set_htlc_minimum_msat(this_ptr_conv, val);
3182 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1minimum_1depth(JNIEnv * _env, jclass _b, jlong this_ptr) {
3183 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3184 return AcceptChannel_get_minimum_depth(this_ptr_conv);
3187 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1minimum_1depth(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
3188 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3189 return AcceptChannel_set_minimum_depth(this_ptr_conv, val);
3192 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_ptr) {
3193 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3194 return AcceptChannel_get_to_self_delay(this_ptr_conv);
3197 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
3198 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3199 return AcceptChannel_set_to_self_delay(this_ptr_conv, val);
3202 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1max_1accepted_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr) {
3203 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3204 return AcceptChannel_get_max_accepted_htlcs(this_ptr_conv);
3207 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1max_1accepted_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
3208 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3209 return AcceptChannel_set_max_accepted_htlcs(this_ptr_conv, val);
3212 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1funding_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr) {
3213 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3214 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3215 *ret = AcceptChannel_get_funding_pubkey(this_ptr_conv);
3219 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1funding_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3220 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3221 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3223 return AcceptChannel_set_funding_pubkey(this_ptr_conv, val_conv);
3226 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1revocation_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr) {
3227 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3228 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3229 *ret = AcceptChannel_get_revocation_basepoint(this_ptr_conv);
3233 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1revocation_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3234 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3235 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3237 return AcceptChannel_set_revocation_basepoint(this_ptr_conv, val_conv);
3240 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1payment_1point(JNIEnv * _env, jclass _b, jlong this_ptr) {
3241 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3242 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3243 *ret = AcceptChannel_get_payment_point(this_ptr_conv);
3247 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1payment_1point(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3248 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3249 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3251 return AcceptChannel_set_payment_point(this_ptr_conv, val_conv);
3254 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1delayed_1payment_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr) {
3255 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3256 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3257 *ret = AcceptChannel_get_delayed_payment_basepoint(this_ptr_conv);
3261 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1delayed_1payment_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3262 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3263 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3265 return AcceptChannel_set_delayed_payment_basepoint(this_ptr_conv, val_conv);
3268 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1htlc_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr) {
3269 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3270 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3271 *ret = AcceptChannel_get_htlc_basepoint(this_ptr_conv);
3275 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1htlc_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3276 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3277 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3279 return AcceptChannel_set_htlc_basepoint(this_ptr_conv, val_conv);
3282 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1first_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr) {
3283 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3284 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3285 *ret = AcceptChannel_get_first_per_commitment_point(this_ptr_conv);
3289 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1first_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3290 LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
3291 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3293 return AcceptChannel_set_first_per_commitment_point(this_ptr_conv, val_conv);
3296 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3297 LDKFundingCreated this_ptr_conv = *(LDKFundingCreated*)this_ptr;
3298 free((void*)this_ptr);
3299 this_ptr_conv._underlying_ref = false;
3300 return FundingCreated_free(this_ptr_conv);
3303 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1temporary_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3304 LDKFundingCreated* this_ptr_conv = (LDKFundingCreated*)this_ptr;
3305 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3306 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *FundingCreated_get_temporary_channel_id(this_ptr_conv));
3310 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1temporary_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3311 LDKFundingCreated* this_ptr_conv = (LDKFundingCreated*)this_ptr;
3312 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3314 return FundingCreated_set_temporary_channel_id(this_ptr_conv, val_conv);
3317 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1funding_1txid(JNIEnv * _env, jclass _b, jlong this_ptr) {
3318 LDKFundingCreated* this_ptr_conv = (LDKFundingCreated*)this_ptr;
3319 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3320 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *FundingCreated_get_funding_txid(this_ptr_conv));
3324 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1funding_1txid(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3325 LDKFundingCreated* this_ptr_conv = (LDKFundingCreated*)this_ptr;
3326 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3328 return FundingCreated_set_funding_txid(this_ptr_conv, val_conv);
3331 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1funding_1output_1index(JNIEnv * _env, jclass _b, jlong this_ptr) {
3332 LDKFundingCreated* this_ptr_conv = (LDKFundingCreated*)this_ptr;
3333 return FundingCreated_get_funding_output_index(this_ptr_conv);
3336 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1funding_1output_1index(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
3337 LDKFundingCreated* this_ptr_conv = (LDKFundingCreated*)this_ptr;
3338 return FundingCreated_set_funding_output_index(this_ptr_conv, val);
3341 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1signature(JNIEnv * _env, jclass _b, jlong this_ptr) {
3342 LDKFundingCreated* this_ptr_conv = (LDKFundingCreated*)this_ptr;
3343 LDKSignature* ret = malloc(sizeof(LDKSignature));
3344 *ret = FundingCreated_get_signature(this_ptr_conv);
3348 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1signature(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3349 LDKFundingCreated* this_ptr_conv = (LDKFundingCreated*)this_ptr;
3350 LDKSignature val_conv = *(LDKSignature*)val;
3352 return FundingCreated_set_signature(this_ptr_conv, val_conv);
3355 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) {
3356 LDKThirtyTwoBytes temporary_channel_id_arg_conv = *(LDKThirtyTwoBytes*)temporary_channel_id_arg;
3357 free((void*)temporary_channel_id_arg);
3358 LDKThirtyTwoBytes funding_txid_arg_conv = *(LDKThirtyTwoBytes*)funding_txid_arg;
3359 free((void*)funding_txid_arg);
3360 LDKSignature signature_arg_conv = *(LDKSignature*)signature_arg;
3361 free((void*)signature_arg);
3362 LDKFundingCreated* ret = malloc(sizeof(LDKFundingCreated));
3363 *ret = FundingCreated_new(temporary_channel_id_arg_conv, funding_txid_arg_conv, funding_output_index_arg, signature_arg_conv);
3364 assert(!ret->_underlying_ref);
3365 ret->_underlying_ref = true;
3369 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3370 LDKFundingSigned this_ptr_conv = *(LDKFundingSigned*)this_ptr;
3371 free((void*)this_ptr);
3372 this_ptr_conv._underlying_ref = false;
3373 return FundingSigned_free(this_ptr_conv);
3376 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_FundingSigned_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3377 LDKFundingSigned* this_ptr_conv = (LDKFundingSigned*)this_ptr;
3378 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3379 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *FundingSigned_get_channel_id(this_ptr_conv));
3383 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3384 LDKFundingSigned* this_ptr_conv = (LDKFundingSigned*)this_ptr;
3385 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3387 return FundingSigned_set_channel_id(this_ptr_conv, val_conv);
3390 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingSigned_1get_1signature(JNIEnv * _env, jclass _b, jlong this_ptr) {
3391 LDKFundingSigned* this_ptr_conv = (LDKFundingSigned*)this_ptr;
3392 LDKSignature* ret = malloc(sizeof(LDKSignature));
3393 *ret = FundingSigned_get_signature(this_ptr_conv);
3397 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1set_1signature(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3398 LDKFundingSigned* this_ptr_conv = (LDKFundingSigned*)this_ptr;
3399 LDKSignature val_conv = *(LDKSignature*)val;
3401 return FundingSigned_set_signature(this_ptr_conv, val_conv);
3404 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingSigned_1new(JNIEnv * _env, jclass _b, jlong channel_id_arg, jlong signature_arg) {
3405 LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
3406 free((void*)channel_id_arg);
3407 LDKSignature signature_arg_conv = *(LDKSignature*)signature_arg;
3408 free((void*)signature_arg);
3409 LDKFundingSigned* ret = malloc(sizeof(LDKFundingSigned));
3410 *ret = FundingSigned_new(channel_id_arg_conv, signature_arg_conv);
3411 assert(!ret->_underlying_ref);
3412 ret->_underlying_ref = true;
3416 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingLocked_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3417 LDKFundingLocked this_ptr_conv = *(LDKFundingLocked*)this_ptr;
3418 free((void*)this_ptr);
3419 this_ptr_conv._underlying_ref = false;
3420 return FundingLocked_free(this_ptr_conv);
3423 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_FundingLocked_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3424 LDKFundingLocked* this_ptr_conv = (LDKFundingLocked*)this_ptr;
3425 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3426 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *FundingLocked_get_channel_id(this_ptr_conv));
3430 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingLocked_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3431 LDKFundingLocked* this_ptr_conv = (LDKFundingLocked*)this_ptr;
3432 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3434 return FundingLocked_set_channel_id(this_ptr_conv, val_conv);
3437 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingLocked_1get_1next_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr) {
3438 LDKFundingLocked* this_ptr_conv = (LDKFundingLocked*)this_ptr;
3439 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3440 *ret = FundingLocked_get_next_per_commitment_point(this_ptr_conv);
3444 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingLocked_1set_1next_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3445 LDKFundingLocked* this_ptr_conv = (LDKFundingLocked*)this_ptr;
3446 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3448 return FundingLocked_set_next_per_commitment_point(this_ptr_conv, val_conv);
3451 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingLocked_1new(JNIEnv * _env, jclass _b, jlong channel_id_arg, jlong next_per_commitment_point_arg) {
3452 LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
3453 free((void*)channel_id_arg);
3454 LDKPublicKey next_per_commitment_point_arg_conv = *(LDKPublicKey*)next_per_commitment_point_arg;
3455 free((void*)next_per_commitment_point_arg);
3456 LDKFundingLocked* ret = malloc(sizeof(LDKFundingLocked));
3457 *ret = FundingLocked_new(channel_id_arg_conv, next_per_commitment_point_arg_conv);
3458 assert(!ret->_underlying_ref);
3459 ret->_underlying_ref = true;
3463 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3464 LDKShutdown this_ptr_conv = *(LDKShutdown*)this_ptr;
3465 free((void*)this_ptr);
3466 this_ptr_conv._underlying_ref = false;
3467 return Shutdown_free(this_ptr_conv);
3470 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Shutdown_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3471 LDKShutdown* this_ptr_conv = (LDKShutdown*)this_ptr;
3472 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3473 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *Shutdown_get_channel_id(this_ptr_conv));
3477 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3478 LDKShutdown* this_ptr_conv = (LDKShutdown*)this_ptr;
3479 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3481 return Shutdown_set_channel_id(this_ptr_conv, val_conv);
3484 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Shutdown_1get_1scriptpubkey(JNIEnv * _env, jclass _b, jlong this_ptr) {
3485 LDKShutdown* this_ptr_conv = (LDKShutdown*)this_ptr;
3486 LDKu8slice* ret = malloc(sizeof(LDKu8slice));
3487 *ret = Shutdown_get_scriptpubkey(this_ptr_conv);
3491 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1set_1scriptpubkey(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3492 LDKShutdown* this_ptr_conv = (LDKShutdown*)this_ptr;
3493 LDKCVec_u8Z val_conv = *(LDKCVec_u8Z*)val;
3495 return Shutdown_set_scriptpubkey(this_ptr_conv, val_conv);
3498 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Shutdown_1new(JNIEnv * _env, jclass _b, jlong channel_id_arg, jlong scriptpubkey_arg) {
3499 LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
3500 free((void*)channel_id_arg);
3501 LDKCVec_u8Z scriptpubkey_arg_conv = *(LDKCVec_u8Z*)scriptpubkey_arg;
3502 free((void*)scriptpubkey_arg);
3503 LDKShutdown* ret = malloc(sizeof(LDKShutdown));
3504 *ret = Shutdown_new(channel_id_arg_conv, scriptpubkey_arg_conv);
3505 assert(!ret->_underlying_ref);
3506 ret->_underlying_ref = true;
3510 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3511 LDKClosingSigned this_ptr_conv = *(LDKClosingSigned*)this_ptr;
3512 free((void*)this_ptr);
3513 this_ptr_conv._underlying_ref = false;
3514 return ClosingSigned_free(this_ptr_conv);
3517 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3518 LDKClosingSigned* this_ptr_conv = (LDKClosingSigned*)this_ptr;
3519 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3520 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *ClosingSigned_get_channel_id(this_ptr_conv));
3524 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3525 LDKClosingSigned* this_ptr_conv = (LDKClosingSigned*)this_ptr;
3526 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3528 return ClosingSigned_set_channel_id(this_ptr_conv, val_conv);
3531 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1get_1fee_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
3532 LDKClosingSigned* this_ptr_conv = (LDKClosingSigned*)this_ptr;
3533 return ClosingSigned_get_fee_satoshis(this_ptr_conv);
3536 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1set_1fee_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3537 LDKClosingSigned* this_ptr_conv = (LDKClosingSigned*)this_ptr;
3538 return ClosingSigned_set_fee_satoshis(this_ptr_conv, val);
3541 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1get_1signature(JNIEnv * _env, jclass _b, jlong this_ptr) {
3542 LDKClosingSigned* this_ptr_conv = (LDKClosingSigned*)this_ptr;
3543 LDKSignature* ret = malloc(sizeof(LDKSignature));
3544 *ret = ClosingSigned_get_signature(this_ptr_conv);
3548 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1set_1signature(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3549 LDKClosingSigned* this_ptr_conv = (LDKClosingSigned*)this_ptr;
3550 LDKSignature val_conv = *(LDKSignature*)val;
3552 return ClosingSigned_set_signature(this_ptr_conv, val_conv);
3555 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) {
3556 LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
3557 free((void*)channel_id_arg);
3558 LDKSignature signature_arg_conv = *(LDKSignature*)signature_arg;
3559 free((void*)signature_arg);
3560 LDKClosingSigned* ret = malloc(sizeof(LDKClosingSigned));
3561 *ret = ClosingSigned_new(channel_id_arg_conv, fee_satoshis_arg, signature_arg_conv);
3562 assert(!ret->_underlying_ref);
3563 ret->_underlying_ref = true;
3567 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3568 LDKUpdateAddHTLC this_ptr_conv = *(LDKUpdateAddHTLC*)this_ptr;
3569 free((void*)this_ptr);
3570 this_ptr_conv._underlying_ref = false;
3571 return UpdateAddHTLC_free(this_ptr_conv);
3574 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3575 LDKUpdateAddHTLC* this_ptr_conv = (LDKUpdateAddHTLC*)this_ptr;
3576 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3577 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *UpdateAddHTLC_get_channel_id(this_ptr_conv));
3581 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3582 LDKUpdateAddHTLC* this_ptr_conv = (LDKUpdateAddHTLC*)this_ptr;
3583 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3585 return UpdateAddHTLC_set_channel_id(this_ptr_conv, val_conv);
3588 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1htlc_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3589 LDKUpdateAddHTLC* this_ptr_conv = (LDKUpdateAddHTLC*)this_ptr;
3590 return UpdateAddHTLC_get_htlc_id(this_ptr_conv);
3593 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1htlc_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3594 LDKUpdateAddHTLC* this_ptr_conv = (LDKUpdateAddHTLC*)this_ptr;
3595 return UpdateAddHTLC_set_htlc_id(this_ptr_conv, val);
3598 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1amount_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
3599 LDKUpdateAddHTLC* this_ptr_conv = (LDKUpdateAddHTLC*)this_ptr;
3600 return UpdateAddHTLC_get_amount_msat(this_ptr_conv);
3603 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1amount_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3604 LDKUpdateAddHTLC* this_ptr_conv = (LDKUpdateAddHTLC*)this_ptr;
3605 return UpdateAddHTLC_set_amount_msat(this_ptr_conv, val);
3608 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1payment_1hash(JNIEnv * _env, jclass _b, jlong this_ptr) {
3609 LDKUpdateAddHTLC* this_ptr_conv = (LDKUpdateAddHTLC*)this_ptr;
3610 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3611 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *UpdateAddHTLC_get_payment_hash(this_ptr_conv));
3615 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1payment_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3616 LDKUpdateAddHTLC* this_ptr_conv = (LDKUpdateAddHTLC*)this_ptr;
3617 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3619 return UpdateAddHTLC_set_payment_hash(this_ptr_conv, val_conv);
3622 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1cltv_1expiry(JNIEnv * _env, jclass _b, jlong this_ptr) {
3623 LDKUpdateAddHTLC* this_ptr_conv = (LDKUpdateAddHTLC*)this_ptr;
3624 return UpdateAddHTLC_get_cltv_expiry(this_ptr_conv);
3627 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1cltv_1expiry(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
3628 LDKUpdateAddHTLC* this_ptr_conv = (LDKUpdateAddHTLC*)this_ptr;
3629 return UpdateAddHTLC_set_cltv_expiry(this_ptr_conv, val);
3632 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3633 LDKUpdateFulfillHTLC this_ptr_conv = *(LDKUpdateFulfillHTLC*)this_ptr;
3634 free((void*)this_ptr);
3635 this_ptr_conv._underlying_ref = false;
3636 return UpdateFulfillHTLC_free(this_ptr_conv);
3639 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3640 LDKUpdateFulfillHTLC* this_ptr_conv = (LDKUpdateFulfillHTLC*)this_ptr;
3641 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3642 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *UpdateFulfillHTLC_get_channel_id(this_ptr_conv));
3646 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3647 LDKUpdateFulfillHTLC* this_ptr_conv = (LDKUpdateFulfillHTLC*)this_ptr;
3648 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3650 return UpdateFulfillHTLC_set_channel_id(this_ptr_conv, val_conv);
3653 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1get_1htlc_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3654 LDKUpdateFulfillHTLC* this_ptr_conv = (LDKUpdateFulfillHTLC*)this_ptr;
3655 return UpdateFulfillHTLC_get_htlc_id(this_ptr_conv);
3658 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1set_1htlc_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3659 LDKUpdateFulfillHTLC* this_ptr_conv = (LDKUpdateFulfillHTLC*)this_ptr;
3660 return UpdateFulfillHTLC_set_htlc_id(this_ptr_conv, val);
3663 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1get_1payment_1preimage(JNIEnv * _env, jclass _b, jlong this_ptr) {
3664 LDKUpdateFulfillHTLC* this_ptr_conv = (LDKUpdateFulfillHTLC*)this_ptr;
3665 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3666 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *UpdateFulfillHTLC_get_payment_preimage(this_ptr_conv));
3670 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1set_1payment_1preimage(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3671 LDKUpdateFulfillHTLC* this_ptr_conv = (LDKUpdateFulfillHTLC*)this_ptr;
3672 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3674 return UpdateFulfillHTLC_set_payment_preimage(this_ptr_conv, val_conv);
3677 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) {
3678 LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
3679 free((void*)channel_id_arg);
3680 LDKThirtyTwoBytes payment_preimage_arg_conv = *(LDKThirtyTwoBytes*)payment_preimage_arg;
3681 free((void*)payment_preimage_arg);
3682 LDKUpdateFulfillHTLC* ret = malloc(sizeof(LDKUpdateFulfillHTLC));
3683 *ret = UpdateFulfillHTLC_new(channel_id_arg_conv, htlc_id_arg, payment_preimage_arg_conv);
3684 assert(!ret->_underlying_ref);
3685 ret->_underlying_ref = true;
3689 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3690 LDKUpdateFailHTLC this_ptr_conv = *(LDKUpdateFailHTLC*)this_ptr;
3691 free((void*)this_ptr);
3692 this_ptr_conv._underlying_ref = false;
3693 return UpdateFailHTLC_free(this_ptr_conv);
3696 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3697 LDKUpdateFailHTLC* this_ptr_conv = (LDKUpdateFailHTLC*)this_ptr;
3698 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3699 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *UpdateFailHTLC_get_channel_id(this_ptr_conv));
3703 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3704 LDKUpdateFailHTLC* this_ptr_conv = (LDKUpdateFailHTLC*)this_ptr;
3705 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3707 return UpdateFailHTLC_set_channel_id(this_ptr_conv, val_conv);
3710 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1get_1htlc_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3711 LDKUpdateFailHTLC* this_ptr_conv = (LDKUpdateFailHTLC*)this_ptr;
3712 return UpdateFailHTLC_get_htlc_id(this_ptr_conv);
3715 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1set_1htlc_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3716 LDKUpdateFailHTLC* this_ptr_conv = (LDKUpdateFailHTLC*)this_ptr;
3717 return UpdateFailHTLC_set_htlc_id(this_ptr_conv, val);
3720 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3721 LDKUpdateFailMalformedHTLC this_ptr_conv = *(LDKUpdateFailMalformedHTLC*)this_ptr;
3722 free((void*)this_ptr);
3723 this_ptr_conv._underlying_ref = false;
3724 return UpdateFailMalformedHTLC_free(this_ptr_conv);
3727 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3728 LDKUpdateFailMalformedHTLC* this_ptr_conv = (LDKUpdateFailMalformedHTLC*)this_ptr;
3729 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3730 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *UpdateFailMalformedHTLC_get_channel_id(this_ptr_conv));
3734 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3735 LDKUpdateFailMalformedHTLC* this_ptr_conv = (LDKUpdateFailMalformedHTLC*)this_ptr;
3736 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3738 return UpdateFailMalformedHTLC_set_channel_id(this_ptr_conv, val_conv);
3741 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1get_1htlc_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3742 LDKUpdateFailMalformedHTLC* this_ptr_conv = (LDKUpdateFailMalformedHTLC*)this_ptr;
3743 return UpdateFailMalformedHTLC_get_htlc_id(this_ptr_conv);
3746 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1set_1htlc_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3747 LDKUpdateFailMalformedHTLC* this_ptr_conv = (LDKUpdateFailMalformedHTLC*)this_ptr;
3748 return UpdateFailMalformedHTLC_set_htlc_id(this_ptr_conv, val);
3751 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1get_1failure_1code(JNIEnv * _env, jclass _b, jlong this_ptr) {
3752 LDKUpdateFailMalformedHTLC* this_ptr_conv = (LDKUpdateFailMalformedHTLC*)this_ptr;
3753 return UpdateFailMalformedHTLC_get_failure_code(this_ptr_conv);
3756 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1set_1failure_1code(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
3757 LDKUpdateFailMalformedHTLC* this_ptr_conv = (LDKUpdateFailMalformedHTLC*)this_ptr;
3758 return UpdateFailMalformedHTLC_set_failure_code(this_ptr_conv, val);
3761 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3762 LDKCommitmentSigned this_ptr_conv = *(LDKCommitmentSigned*)this_ptr;
3763 free((void*)this_ptr);
3764 this_ptr_conv._underlying_ref = false;
3765 return CommitmentSigned_free(this_ptr_conv);
3768 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3769 LDKCommitmentSigned* this_ptr_conv = (LDKCommitmentSigned*)this_ptr;
3770 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3771 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *CommitmentSigned_get_channel_id(this_ptr_conv));
3775 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3776 LDKCommitmentSigned* this_ptr_conv = (LDKCommitmentSigned*)this_ptr;
3777 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3779 return CommitmentSigned_set_channel_id(this_ptr_conv, val_conv);
3782 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1get_1signature(JNIEnv * _env, jclass _b, jlong this_ptr) {
3783 LDKCommitmentSigned* this_ptr_conv = (LDKCommitmentSigned*)this_ptr;
3784 LDKSignature* ret = malloc(sizeof(LDKSignature));
3785 *ret = CommitmentSigned_get_signature(this_ptr_conv);
3789 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1set_1signature(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3790 LDKCommitmentSigned* this_ptr_conv = (LDKCommitmentSigned*)this_ptr;
3791 LDKSignature val_conv = *(LDKSignature*)val;
3793 return CommitmentSigned_set_signature(this_ptr_conv, val_conv);
3796 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1set_1htlc_1signatures(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3797 LDKCommitmentSigned* this_ptr_conv = (LDKCommitmentSigned*)this_ptr;
3798 LDKCVec_SignatureZ val_conv = *(LDKCVec_SignatureZ*)val;
3800 return CommitmentSigned_set_htlc_signatures(this_ptr_conv, val_conv);
3803 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) {
3804 LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
3805 free((void*)channel_id_arg);
3806 LDKSignature signature_arg_conv = *(LDKSignature*)signature_arg;
3807 free((void*)signature_arg);
3808 LDKCVec_SignatureZ htlc_signatures_arg_conv = *(LDKCVec_SignatureZ*)htlc_signatures_arg;
3809 free((void*)htlc_signatures_arg);
3810 LDKCommitmentSigned* ret = malloc(sizeof(LDKCommitmentSigned));
3811 *ret = CommitmentSigned_new(channel_id_arg_conv, signature_arg_conv, htlc_signatures_arg_conv);
3812 assert(!ret->_underlying_ref);
3813 ret->_underlying_ref = true;
3817 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3818 LDKRevokeAndACK this_ptr_conv = *(LDKRevokeAndACK*)this_ptr;
3819 free((void*)this_ptr);
3820 this_ptr_conv._underlying_ref = false;
3821 return RevokeAndACK_free(this_ptr_conv);
3824 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3825 LDKRevokeAndACK* this_ptr_conv = (LDKRevokeAndACK*)this_ptr;
3826 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3827 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *RevokeAndACK_get_channel_id(this_ptr_conv));
3831 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3832 LDKRevokeAndACK* this_ptr_conv = (LDKRevokeAndACK*)this_ptr;
3833 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3835 return RevokeAndACK_set_channel_id(this_ptr_conv, val_conv);
3838 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1get_1per_1commitment_1secret(JNIEnv * _env, jclass _b, jlong this_ptr) {
3839 LDKRevokeAndACK* this_ptr_conv = (LDKRevokeAndACK*)this_ptr;
3840 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3841 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *RevokeAndACK_get_per_commitment_secret(this_ptr_conv));
3845 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1set_1per_1commitment_1secret(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3846 LDKRevokeAndACK* this_ptr_conv = (LDKRevokeAndACK*)this_ptr;
3847 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3849 return RevokeAndACK_set_per_commitment_secret(this_ptr_conv, val_conv);
3852 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1get_1next_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr) {
3853 LDKRevokeAndACK* this_ptr_conv = (LDKRevokeAndACK*)this_ptr;
3854 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3855 *ret = RevokeAndACK_get_next_per_commitment_point(this_ptr_conv);
3859 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1set_1next_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3860 LDKRevokeAndACK* this_ptr_conv = (LDKRevokeAndACK*)this_ptr;
3861 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3863 return RevokeAndACK_set_next_per_commitment_point(this_ptr_conv, val_conv);
3866 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) {
3867 LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
3868 free((void*)channel_id_arg);
3869 LDKThirtyTwoBytes per_commitment_secret_arg_conv = *(LDKThirtyTwoBytes*)per_commitment_secret_arg;
3870 free((void*)per_commitment_secret_arg);
3871 LDKPublicKey next_per_commitment_point_arg_conv = *(LDKPublicKey*)next_per_commitment_point_arg;
3872 free((void*)next_per_commitment_point_arg);
3873 LDKRevokeAndACK* ret = malloc(sizeof(LDKRevokeAndACK));
3874 *ret = RevokeAndACK_new(channel_id_arg_conv, per_commitment_secret_arg_conv, next_per_commitment_point_arg_conv);
3875 assert(!ret->_underlying_ref);
3876 ret->_underlying_ref = true;
3880 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3881 LDKUpdateFee this_ptr_conv = *(LDKUpdateFee*)this_ptr;
3882 free((void*)this_ptr);
3883 this_ptr_conv._underlying_ref = false;
3884 return UpdateFee_free(this_ptr_conv);
3887 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UpdateFee_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3888 LDKUpdateFee* this_ptr_conv = (LDKUpdateFee*)this_ptr;
3889 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3890 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *UpdateFee_get_channel_id(this_ptr_conv));
3894 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3895 LDKUpdateFee* this_ptr_conv = (LDKUpdateFee*)this_ptr;
3896 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3898 return UpdateFee_set_channel_id(this_ptr_conv, val_conv);
3901 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_UpdateFee_1get_1feerate_1per_1kw(JNIEnv * _env, jclass _b, jlong this_ptr) {
3902 LDKUpdateFee* this_ptr_conv = (LDKUpdateFee*)this_ptr;
3903 return UpdateFee_get_feerate_per_kw(this_ptr_conv);
3906 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1set_1feerate_1per_1kw(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
3907 LDKUpdateFee* this_ptr_conv = (LDKUpdateFee*)this_ptr;
3908 return UpdateFee_set_feerate_per_kw(this_ptr_conv, val);
3911 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFee_1new(JNIEnv * _env, jclass _b, jlong channel_id_arg, jint feerate_per_kw_arg) {
3912 LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
3913 free((void*)channel_id_arg);
3914 LDKUpdateFee* ret = malloc(sizeof(LDKUpdateFee));
3915 *ret = UpdateFee_new(channel_id_arg_conv, feerate_per_kw_arg);
3916 assert(!ret->_underlying_ref);
3917 ret->_underlying_ref = true;
3921 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3922 LDKDataLossProtect this_ptr_conv = *(LDKDataLossProtect*)this_ptr;
3923 free((void*)this_ptr);
3924 this_ptr_conv._underlying_ref = false;
3925 return DataLossProtect_free(this_ptr_conv);
3928 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1get_1your_1last_1per_1commitment_1secret(JNIEnv * _env, jclass _b, jlong this_ptr) {
3929 LDKDataLossProtect* this_ptr_conv = (LDKDataLossProtect*)this_ptr;
3930 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3931 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *DataLossProtect_get_your_last_per_commitment_secret(this_ptr_conv));
3935 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1set_1your_1last_1per_1commitment_1secret(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3936 LDKDataLossProtect* this_ptr_conv = (LDKDataLossProtect*)this_ptr;
3937 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3939 return DataLossProtect_set_your_last_per_commitment_secret(this_ptr_conv, val_conv);
3942 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1get_1my_1current_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr) {
3943 LDKDataLossProtect* this_ptr_conv = (LDKDataLossProtect*)this_ptr;
3944 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
3945 *ret = DataLossProtect_get_my_current_per_commitment_point(this_ptr_conv);
3949 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1set_1my_1current_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3950 LDKDataLossProtect* this_ptr_conv = (LDKDataLossProtect*)this_ptr;
3951 LDKPublicKey val_conv = *(LDKPublicKey*)val;
3953 return DataLossProtect_set_my_current_per_commitment_point(this_ptr_conv, val_conv);
3956 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) {
3957 LDKThirtyTwoBytes your_last_per_commitment_secret_arg_conv = *(LDKThirtyTwoBytes*)your_last_per_commitment_secret_arg;
3958 free((void*)your_last_per_commitment_secret_arg);
3959 LDKPublicKey my_current_per_commitment_point_arg_conv = *(LDKPublicKey*)my_current_per_commitment_point_arg;
3960 free((void*)my_current_per_commitment_point_arg);
3961 LDKDataLossProtect* ret = malloc(sizeof(LDKDataLossProtect));
3962 *ret = DataLossProtect_new(your_last_per_commitment_secret_arg_conv, my_current_per_commitment_point_arg_conv);
3963 assert(!ret->_underlying_ref);
3964 ret->_underlying_ref = true;
3968 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
3969 LDKChannelReestablish this_ptr_conv = *(LDKChannelReestablish*)this_ptr;
3970 free((void*)this_ptr);
3971 this_ptr_conv._underlying_ref = false;
3972 return ChannelReestablish_free(this_ptr_conv);
3975 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
3976 LDKChannelReestablish* this_ptr_conv = (LDKChannelReestablish*)this_ptr;
3977 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
3978 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *ChannelReestablish_get_channel_id(this_ptr_conv));
3982 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3983 LDKChannelReestablish* this_ptr_conv = (LDKChannelReestablish*)this_ptr;
3984 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
3986 return ChannelReestablish_set_channel_id(this_ptr_conv, val_conv);
3989 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1get_1next_1local_1commitment_1number(JNIEnv * _env, jclass _b, jlong this_ptr) {
3990 LDKChannelReestablish* this_ptr_conv = (LDKChannelReestablish*)this_ptr;
3991 return ChannelReestablish_get_next_local_commitment_number(this_ptr_conv);
3994 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1set_1next_1local_1commitment_1number(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
3995 LDKChannelReestablish* this_ptr_conv = (LDKChannelReestablish*)this_ptr;
3996 return ChannelReestablish_set_next_local_commitment_number(this_ptr_conv, val);
3999 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1get_1next_1remote_1commitment_1number(JNIEnv * _env, jclass _b, jlong this_ptr) {
4000 LDKChannelReestablish* this_ptr_conv = (LDKChannelReestablish*)this_ptr;
4001 return ChannelReestablish_get_next_remote_commitment_number(this_ptr_conv);
4004 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1set_1next_1remote_1commitment_1number(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4005 LDKChannelReestablish* this_ptr_conv = (LDKChannelReestablish*)this_ptr;
4006 return ChannelReestablish_set_next_remote_commitment_number(this_ptr_conv, val);
4009 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4010 LDKAnnouncementSignatures this_ptr_conv = *(LDKAnnouncementSignatures*)this_ptr;
4011 free((void*)this_ptr);
4012 this_ptr_conv._underlying_ref = false;
4013 return AnnouncementSignatures_free(this_ptr_conv);
4016 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1get_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
4017 LDKAnnouncementSignatures* this_ptr_conv = (LDKAnnouncementSignatures*)this_ptr;
4018 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
4019 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *AnnouncementSignatures_get_channel_id(this_ptr_conv));
4023 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4024 LDKAnnouncementSignatures* this_ptr_conv = (LDKAnnouncementSignatures*)this_ptr;
4025 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
4027 return AnnouncementSignatures_set_channel_id(this_ptr_conv, val_conv);
4030 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1get_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
4031 LDKAnnouncementSignatures* this_ptr_conv = (LDKAnnouncementSignatures*)this_ptr;
4032 return AnnouncementSignatures_get_short_channel_id(this_ptr_conv);
4035 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4036 LDKAnnouncementSignatures* this_ptr_conv = (LDKAnnouncementSignatures*)this_ptr;
4037 return AnnouncementSignatures_set_short_channel_id(this_ptr_conv, val);
4040 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1get_1node_1signature(JNIEnv * _env, jclass _b, jlong this_ptr) {
4041 LDKAnnouncementSignatures* this_ptr_conv = (LDKAnnouncementSignatures*)this_ptr;
4042 LDKSignature* ret = malloc(sizeof(LDKSignature));
4043 *ret = AnnouncementSignatures_get_node_signature(this_ptr_conv);
4047 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1node_1signature(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4048 LDKAnnouncementSignatures* this_ptr_conv = (LDKAnnouncementSignatures*)this_ptr;
4049 LDKSignature val_conv = *(LDKSignature*)val;
4051 return AnnouncementSignatures_set_node_signature(this_ptr_conv, val_conv);
4054 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1get_1bitcoin_1signature(JNIEnv * _env, jclass _b, jlong this_ptr) {
4055 LDKAnnouncementSignatures* this_ptr_conv = (LDKAnnouncementSignatures*)this_ptr;
4056 LDKSignature* ret = malloc(sizeof(LDKSignature));
4057 *ret = AnnouncementSignatures_get_bitcoin_signature(this_ptr_conv);
4061 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1bitcoin_1signature(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4062 LDKAnnouncementSignatures* this_ptr_conv = (LDKAnnouncementSignatures*)this_ptr;
4063 LDKSignature val_conv = *(LDKSignature*)val;
4065 return AnnouncementSignatures_set_bitcoin_signature(this_ptr_conv, val_conv);
4068 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) {
4069 LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
4070 free((void*)channel_id_arg);
4071 LDKSignature node_signature_arg_conv = *(LDKSignature*)node_signature_arg;
4072 free((void*)node_signature_arg);
4073 LDKSignature bitcoin_signature_arg_conv = *(LDKSignature*)bitcoin_signature_arg;
4074 free((void*)bitcoin_signature_arg);
4075 LDKAnnouncementSignatures* ret = malloc(sizeof(LDKAnnouncementSignatures));
4076 *ret = AnnouncementSignatures_new(channel_id_arg_conv, short_channel_id_arg, node_signature_arg_conv, bitcoin_signature_arg_conv);
4077 assert(!ret->_underlying_ref);
4078 ret->_underlying_ref = true;
4082 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetAddress_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4083 LDKNetAddress this_ptr_conv = *(LDKNetAddress*)this_ptr;
4084 free((void*)this_ptr);
4085 return NetAddress_free(this_ptr_conv);
4088 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4089 LDKUnsignedNodeAnnouncement this_ptr_conv = *(LDKUnsignedNodeAnnouncement*)this_ptr;
4090 free((void*)this_ptr);
4091 this_ptr_conv._underlying_ref = false;
4092 return UnsignedNodeAnnouncement_free(this_ptr_conv);
4095 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1get_1timestamp(JNIEnv * _env, jclass _b, jlong this_ptr) {
4096 LDKUnsignedNodeAnnouncement* this_ptr_conv = (LDKUnsignedNodeAnnouncement*)this_ptr;
4097 return UnsignedNodeAnnouncement_get_timestamp(this_ptr_conv);
4100 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1timestamp(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
4101 LDKUnsignedNodeAnnouncement* this_ptr_conv = (LDKUnsignedNodeAnnouncement*)this_ptr;
4102 return UnsignedNodeAnnouncement_set_timestamp(this_ptr_conv, val);
4105 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1get_1node_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
4106 LDKUnsignedNodeAnnouncement* this_ptr_conv = (LDKUnsignedNodeAnnouncement*)this_ptr;
4107 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
4108 *ret = UnsignedNodeAnnouncement_get_node_id(this_ptr_conv);
4112 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1node_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4113 LDKUnsignedNodeAnnouncement* this_ptr_conv = (LDKUnsignedNodeAnnouncement*)this_ptr;
4114 LDKPublicKey val_conv = *(LDKPublicKey*)val;
4116 return UnsignedNodeAnnouncement_set_node_id(this_ptr_conv, val_conv);
4119 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1get_1rgb(JNIEnv * _env, jclass _b, jlong this_ptr) {
4120 LDKUnsignedNodeAnnouncement* this_ptr_conv = (LDKUnsignedNodeAnnouncement*)this_ptr;
4121 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 3);
4122 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 3, *UnsignedNodeAnnouncement_get_rgb(this_ptr_conv));
4126 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1rgb(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4127 LDKUnsignedNodeAnnouncement* this_ptr_conv = (LDKUnsignedNodeAnnouncement*)this_ptr;
4128 LDKThreeBytes val_conv = *(LDKThreeBytes*)val;
4130 return UnsignedNodeAnnouncement_set_rgb(this_ptr_conv, val_conv);
4133 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1get_1alias(JNIEnv * _env, jclass _b, jlong this_ptr) {
4134 LDKUnsignedNodeAnnouncement* this_ptr_conv = (LDKUnsignedNodeAnnouncement*)this_ptr;
4135 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
4136 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *UnsignedNodeAnnouncement_get_alias(this_ptr_conv));
4140 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1alias(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4141 LDKUnsignedNodeAnnouncement* this_ptr_conv = (LDKUnsignedNodeAnnouncement*)this_ptr;
4142 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
4144 return UnsignedNodeAnnouncement_set_alias(this_ptr_conv, val_conv);
4147 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1addresses(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4148 LDKUnsignedNodeAnnouncement* this_ptr_conv = (LDKUnsignedNodeAnnouncement*)this_ptr;
4149 LDKCVec_NetAddressZ val_conv = *(LDKCVec_NetAddressZ*)val;
4151 return UnsignedNodeAnnouncement_set_addresses(this_ptr_conv, val_conv);
4154 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4155 LDKNodeAnnouncement this_ptr_conv = *(LDKNodeAnnouncement*)this_ptr;
4156 free((void*)this_ptr);
4157 this_ptr_conv._underlying_ref = false;
4158 return NodeAnnouncement_free(this_ptr_conv);
4161 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1get_1signature(JNIEnv * _env, jclass _b, jlong this_ptr) {
4162 LDKNodeAnnouncement* this_ptr_conv = (LDKNodeAnnouncement*)this_ptr;
4163 LDKSignature* ret = malloc(sizeof(LDKSignature));
4164 *ret = NodeAnnouncement_get_signature(this_ptr_conv);
4168 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1set_1signature(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4169 LDKNodeAnnouncement* this_ptr_conv = (LDKNodeAnnouncement*)this_ptr;
4170 LDKSignature val_conv = *(LDKSignature*)val;
4172 return NodeAnnouncement_set_signature(this_ptr_conv, val_conv);
4175 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1get_1contents(JNIEnv * _env, jclass _b, jlong this_ptr) {
4176 LDKNodeAnnouncement* this_ptr_conv = (LDKNodeAnnouncement*)this_ptr;
4177 LDKUnsignedNodeAnnouncement* ret = malloc(sizeof(LDKUnsignedNodeAnnouncement));
4178 *ret = NodeAnnouncement_get_contents(this_ptr_conv);
4179 assert(!ret->_underlying_ref);
4180 ret->_underlying_ref = true;
4184 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1set_1contents(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4185 LDKNodeAnnouncement* this_ptr_conv = (LDKNodeAnnouncement*)this_ptr;
4186 LDKUnsignedNodeAnnouncement val_conv = *(LDKUnsignedNodeAnnouncement*)val;
4188 val_conv._underlying_ref = false;
4189 return NodeAnnouncement_set_contents(this_ptr_conv, val_conv);
4192 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1new(JNIEnv * _env, jclass _b, jlong signature_arg, jlong contents_arg) {
4193 LDKSignature signature_arg_conv = *(LDKSignature*)signature_arg;
4194 free((void*)signature_arg);
4195 LDKUnsignedNodeAnnouncement contents_arg_conv = *(LDKUnsignedNodeAnnouncement*)contents_arg;
4196 free((void*)contents_arg);
4197 contents_arg_conv._underlying_ref = false;
4198 LDKNodeAnnouncement* ret = malloc(sizeof(LDKNodeAnnouncement));
4199 *ret = NodeAnnouncement_new(signature_arg_conv, contents_arg_conv);
4200 assert(!ret->_underlying_ref);
4201 ret->_underlying_ref = true;
4205 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4206 LDKUnsignedChannelAnnouncement this_ptr_conv = *(LDKUnsignedChannelAnnouncement*)this_ptr;
4207 free((void*)this_ptr);
4208 this_ptr_conv._underlying_ref = false;
4209 return UnsignedChannelAnnouncement_free(this_ptr_conv);
4212 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1get_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr) {
4213 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4214 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
4215 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *UnsignedChannelAnnouncement_get_chain_hash(this_ptr_conv));
4219 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1set_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4220 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4221 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
4223 return UnsignedChannelAnnouncement_set_chain_hash(this_ptr_conv, val_conv);
4226 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1get_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
4227 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4228 return UnsignedChannelAnnouncement_get_short_channel_id(this_ptr_conv);
4231 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1set_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4232 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4233 return UnsignedChannelAnnouncement_set_short_channel_id(this_ptr_conv, val);
4236 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1get_1node_1id_11(JNIEnv * _env, jclass _b, jlong this_ptr) {
4237 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4238 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
4239 *ret = UnsignedChannelAnnouncement_get_node_id_1(this_ptr_conv);
4243 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1set_1node_1id_11(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4244 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4245 LDKPublicKey val_conv = *(LDKPublicKey*)val;
4247 return UnsignedChannelAnnouncement_set_node_id_1(this_ptr_conv, val_conv);
4250 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1get_1node_1id_12(JNIEnv * _env, jclass _b, jlong this_ptr) {
4251 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4252 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
4253 *ret = UnsignedChannelAnnouncement_get_node_id_2(this_ptr_conv);
4257 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1set_1node_1id_12(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4258 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4259 LDKPublicKey val_conv = *(LDKPublicKey*)val;
4261 return UnsignedChannelAnnouncement_set_node_id_2(this_ptr_conv, val_conv);
4264 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1get_1bitcoin_1key_11(JNIEnv * _env, jclass _b, jlong this_ptr) {
4265 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4266 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
4267 *ret = UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr_conv);
4271 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1set_1bitcoin_1key_11(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4272 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4273 LDKPublicKey val_conv = *(LDKPublicKey*)val;
4275 return UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr_conv, val_conv);
4278 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1get_1bitcoin_1key_12(JNIEnv * _env, jclass _b, jlong this_ptr) {
4279 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4280 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
4281 *ret = UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr_conv);
4285 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1set_1bitcoin_1key_12(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4286 LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
4287 LDKPublicKey val_conv = *(LDKPublicKey*)val;
4289 return UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr_conv, val_conv);
4292 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4293 LDKChannelAnnouncement this_ptr_conv = *(LDKChannelAnnouncement*)this_ptr;
4294 free((void*)this_ptr);
4295 this_ptr_conv._underlying_ref = false;
4296 return ChannelAnnouncement_free(this_ptr_conv);
4299 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1get_1node_1signature_11(JNIEnv * _env, jclass _b, jlong this_ptr) {
4300 LDKChannelAnnouncement* this_ptr_conv = (LDKChannelAnnouncement*)this_ptr;
4301 LDKSignature* ret = malloc(sizeof(LDKSignature));
4302 *ret = ChannelAnnouncement_get_node_signature_1(this_ptr_conv);
4306 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1set_1node_1signature_11(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4307 LDKChannelAnnouncement* this_ptr_conv = (LDKChannelAnnouncement*)this_ptr;
4308 LDKSignature val_conv = *(LDKSignature*)val;
4310 return ChannelAnnouncement_set_node_signature_1(this_ptr_conv, val_conv);
4313 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1get_1node_1signature_12(JNIEnv * _env, jclass _b, jlong this_ptr) {
4314 LDKChannelAnnouncement* this_ptr_conv = (LDKChannelAnnouncement*)this_ptr;
4315 LDKSignature* ret = malloc(sizeof(LDKSignature));
4316 *ret = ChannelAnnouncement_get_node_signature_2(this_ptr_conv);
4320 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1set_1node_1signature_12(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4321 LDKChannelAnnouncement* this_ptr_conv = (LDKChannelAnnouncement*)this_ptr;
4322 LDKSignature val_conv = *(LDKSignature*)val;
4324 return ChannelAnnouncement_set_node_signature_2(this_ptr_conv, val_conv);
4327 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1get_1bitcoin_1signature_11(JNIEnv * _env, jclass _b, jlong this_ptr) {
4328 LDKChannelAnnouncement* this_ptr_conv = (LDKChannelAnnouncement*)this_ptr;
4329 LDKSignature* ret = malloc(sizeof(LDKSignature));
4330 *ret = ChannelAnnouncement_get_bitcoin_signature_1(this_ptr_conv);
4334 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1set_1bitcoin_1signature_11(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4335 LDKChannelAnnouncement* this_ptr_conv = (LDKChannelAnnouncement*)this_ptr;
4336 LDKSignature val_conv = *(LDKSignature*)val;
4338 return ChannelAnnouncement_set_bitcoin_signature_1(this_ptr_conv, val_conv);
4341 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1get_1bitcoin_1signature_12(JNIEnv * _env, jclass _b, jlong this_ptr) {
4342 LDKChannelAnnouncement* this_ptr_conv = (LDKChannelAnnouncement*)this_ptr;
4343 LDKSignature* ret = malloc(sizeof(LDKSignature));
4344 *ret = ChannelAnnouncement_get_bitcoin_signature_2(this_ptr_conv);
4348 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1set_1bitcoin_1signature_12(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4349 LDKChannelAnnouncement* this_ptr_conv = (LDKChannelAnnouncement*)this_ptr;
4350 LDKSignature val_conv = *(LDKSignature*)val;
4352 return ChannelAnnouncement_set_bitcoin_signature_2(this_ptr_conv, val_conv);
4355 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1get_1contents(JNIEnv * _env, jclass _b, jlong this_ptr) {
4356 LDKChannelAnnouncement* this_ptr_conv = (LDKChannelAnnouncement*)this_ptr;
4357 LDKUnsignedChannelAnnouncement* ret = malloc(sizeof(LDKUnsignedChannelAnnouncement));
4358 *ret = ChannelAnnouncement_get_contents(this_ptr_conv);
4359 assert(!ret->_underlying_ref);
4360 ret->_underlying_ref = true;
4364 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1set_1contents(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4365 LDKChannelAnnouncement* this_ptr_conv = (LDKChannelAnnouncement*)this_ptr;
4366 LDKUnsignedChannelAnnouncement val_conv = *(LDKUnsignedChannelAnnouncement*)val;
4368 val_conv._underlying_ref = false;
4369 return ChannelAnnouncement_set_contents(this_ptr_conv, val_conv);
4372 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) {
4373 LDKSignature node_signature_1_arg_conv = *(LDKSignature*)node_signature_1_arg;
4374 free((void*)node_signature_1_arg);
4375 LDKSignature node_signature_2_arg_conv = *(LDKSignature*)node_signature_2_arg;
4376 free((void*)node_signature_2_arg);
4377 LDKSignature bitcoin_signature_1_arg_conv = *(LDKSignature*)bitcoin_signature_1_arg;
4378 free((void*)bitcoin_signature_1_arg);
4379 LDKSignature bitcoin_signature_2_arg_conv = *(LDKSignature*)bitcoin_signature_2_arg;
4380 free((void*)bitcoin_signature_2_arg);
4381 LDKUnsignedChannelAnnouncement contents_arg_conv = *(LDKUnsignedChannelAnnouncement*)contents_arg;
4382 free((void*)contents_arg);
4383 contents_arg_conv._underlying_ref = false;
4384 LDKChannelAnnouncement* ret = malloc(sizeof(LDKChannelAnnouncement));
4385 *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);
4386 assert(!ret->_underlying_ref);
4387 ret->_underlying_ref = true;
4391 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4392 LDKUnsignedChannelUpdate this_ptr_conv = *(LDKUnsignedChannelUpdate*)this_ptr;
4393 free((void*)this_ptr);
4394 this_ptr_conv._underlying_ref = false;
4395 return UnsignedChannelUpdate_free(this_ptr_conv);
4398 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr) {
4399 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4400 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
4401 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *UnsignedChannelUpdate_get_chain_hash(this_ptr_conv));
4405 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4406 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4407 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
4409 return UnsignedChannelUpdate_set_chain_hash(this_ptr_conv, val_conv);
4412 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
4413 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4414 return UnsignedChannelUpdate_get_short_channel_id(this_ptr_conv);
4417 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4418 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4419 return UnsignedChannelUpdate_set_short_channel_id(this_ptr_conv, val);
4422 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1timestamp(JNIEnv * _env, jclass _b, jlong this_ptr) {
4423 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4424 return UnsignedChannelUpdate_get_timestamp(this_ptr_conv);
4427 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1timestamp(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
4428 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4429 return UnsignedChannelUpdate_set_timestamp(this_ptr_conv, val);
4432 JNIEXPORT jbyte JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1flags(JNIEnv * _env, jclass _b, jlong this_ptr) {
4433 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4434 return UnsignedChannelUpdate_get_flags(this_ptr_conv);
4437 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1flags(JNIEnv * _env, jclass _b, jlong this_ptr, jbyte val) {
4438 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4439 return UnsignedChannelUpdate_set_flags(this_ptr_conv, val);
4442 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1cltv_1expiry_1delta(JNIEnv * _env, jclass _b, jlong this_ptr) {
4443 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4444 return UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr_conv);
4447 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1cltv_1expiry_1delta(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
4448 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4449 return UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr_conv, val);
4452 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
4453 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4454 return UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr_conv);
4457 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4458 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4459 return UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr_conv, val);
4462 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1fee_1base_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
4463 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4464 return UnsignedChannelUpdate_get_fee_base_msat(this_ptr_conv);
4467 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1fee_1base_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
4468 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4469 return UnsignedChannelUpdate_set_fee_base_msat(this_ptr_conv, val);
4472 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1fee_1proportional_1millionths(JNIEnv * _env, jclass _b, jlong this_ptr) {
4473 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4474 return UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr_conv);
4477 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1fee_1proportional_1millionths(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
4478 LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
4479 return UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr_conv, val);
4482 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4483 LDKChannelUpdate this_ptr_conv = *(LDKChannelUpdate*)this_ptr;
4484 free((void*)this_ptr);
4485 this_ptr_conv._underlying_ref = false;
4486 return ChannelUpdate_free(this_ptr_conv);
4489 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1get_1signature(JNIEnv * _env, jclass _b, jlong this_ptr) {
4490 LDKChannelUpdate* this_ptr_conv = (LDKChannelUpdate*)this_ptr;
4491 LDKSignature* ret = malloc(sizeof(LDKSignature));
4492 *ret = ChannelUpdate_get_signature(this_ptr_conv);
4496 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1set_1signature(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4497 LDKChannelUpdate* this_ptr_conv = (LDKChannelUpdate*)this_ptr;
4498 LDKSignature val_conv = *(LDKSignature*)val;
4500 return ChannelUpdate_set_signature(this_ptr_conv, val_conv);
4503 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1get_1contents(JNIEnv * _env, jclass _b, jlong this_ptr) {
4504 LDKChannelUpdate* this_ptr_conv = (LDKChannelUpdate*)this_ptr;
4505 LDKUnsignedChannelUpdate* ret = malloc(sizeof(LDKUnsignedChannelUpdate));
4506 *ret = ChannelUpdate_get_contents(this_ptr_conv);
4507 assert(!ret->_underlying_ref);
4508 ret->_underlying_ref = true;
4512 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1set_1contents(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4513 LDKChannelUpdate* this_ptr_conv = (LDKChannelUpdate*)this_ptr;
4514 LDKUnsignedChannelUpdate val_conv = *(LDKUnsignedChannelUpdate*)val;
4516 val_conv._underlying_ref = false;
4517 return ChannelUpdate_set_contents(this_ptr_conv, val_conv);
4520 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1new(JNIEnv * _env, jclass _b, jlong signature_arg, jlong contents_arg) {
4521 LDKSignature signature_arg_conv = *(LDKSignature*)signature_arg;
4522 free((void*)signature_arg);
4523 LDKUnsignedChannelUpdate contents_arg_conv = *(LDKUnsignedChannelUpdate*)contents_arg;
4524 free((void*)contents_arg);
4525 contents_arg_conv._underlying_ref = false;
4526 LDKChannelUpdate* ret = malloc(sizeof(LDKChannelUpdate));
4527 *ret = ChannelUpdate_new(signature_arg_conv, contents_arg_conv);
4528 assert(!ret->_underlying_ref);
4529 ret->_underlying_ref = true;
4533 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorAction_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4534 LDKErrorAction this_ptr_conv = *(LDKErrorAction*)this_ptr;
4535 free((void*)this_ptr);
4536 return ErrorAction_free(this_ptr_conv);
4539 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LightningError_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4540 LDKLightningError this_ptr_conv = *(LDKLightningError*)this_ptr;
4541 free((void*)this_ptr);
4542 this_ptr_conv._underlying_ref = false;
4543 return LightningError_free(this_ptr_conv);
4546 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LightningError_1get_1err(JNIEnv * _env, jclass _b, jlong this_ptr) {
4547 LDKLightningError* this_ptr_conv = (LDKLightningError*)this_ptr;
4548 LDKStr* ret = malloc(sizeof(LDKStr));
4549 *ret = LightningError_get_err(this_ptr_conv);
4553 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LightningError_1set_1err(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4554 LDKLightningError* this_ptr_conv = (LDKLightningError*)this_ptr;
4555 LDKCVec_u8Z val_conv = *(LDKCVec_u8Z*)val;
4557 return LightningError_set_err(this_ptr_conv, val_conv);
4560 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LightningError_1get_1action(JNIEnv * _env, jclass _b, jlong this_ptr) {
4561 LDKLightningError* this_ptr_conv = (LDKLightningError*)this_ptr;
4562 LDKErrorAction* ret = malloc(sizeof(LDKErrorAction));
4563 *ret = LightningError_get_action(this_ptr_conv);
4567 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LightningError_1set_1action(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4568 LDKLightningError* this_ptr_conv = (LDKLightningError*)this_ptr;
4569 LDKErrorAction val_conv = *(LDKErrorAction*)val;
4571 return LightningError_set_action(this_ptr_conv, val_conv);
4574 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LightningError_1new(JNIEnv * _env, jclass _b, jlong err_arg, jlong action_arg) {
4575 LDKCVec_u8Z err_arg_conv = *(LDKCVec_u8Z*)err_arg;
4576 free((void*)err_arg);
4577 LDKErrorAction action_arg_conv = *(LDKErrorAction*)action_arg;
4578 free((void*)action_arg);
4579 LDKLightningError* ret = malloc(sizeof(LDKLightningError));
4580 *ret = LightningError_new(err_arg_conv, action_arg_conv);
4581 assert(!ret->_underlying_ref);
4582 ret->_underlying_ref = true;
4586 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4587 LDKCommitmentUpdate this_ptr_conv = *(LDKCommitmentUpdate*)this_ptr;
4588 free((void*)this_ptr);
4589 this_ptr_conv._underlying_ref = false;
4590 return CommitmentUpdate_free(this_ptr_conv);
4593 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1set_1update_1add_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4594 LDKCommitmentUpdate* this_ptr_conv = (LDKCommitmentUpdate*)this_ptr;
4595 LDKCVec_UpdateAddHTLCZ val_conv = *(LDKCVec_UpdateAddHTLCZ*)val;
4597 return CommitmentUpdate_set_update_add_htlcs(this_ptr_conv, val_conv);
4600 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1set_1update_1fulfill_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4601 LDKCommitmentUpdate* this_ptr_conv = (LDKCommitmentUpdate*)this_ptr;
4602 LDKCVec_UpdateFulfillHTLCZ val_conv = *(LDKCVec_UpdateFulfillHTLCZ*)val;
4604 return CommitmentUpdate_set_update_fulfill_htlcs(this_ptr_conv, val_conv);
4607 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1set_1update_1fail_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4608 LDKCommitmentUpdate* this_ptr_conv = (LDKCommitmentUpdate*)this_ptr;
4609 LDKCVec_UpdateFailHTLCZ val_conv = *(LDKCVec_UpdateFailHTLCZ*)val;
4611 return CommitmentUpdate_set_update_fail_htlcs(this_ptr_conv, val_conv);
4614 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1set_1update_1fail_1malformed_1htlcs(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4615 LDKCommitmentUpdate* this_ptr_conv = (LDKCommitmentUpdate*)this_ptr;
4616 LDKCVec_UpdateFailMalformedHTLCZ val_conv = *(LDKCVec_UpdateFailMalformedHTLCZ*)val;
4618 return CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr_conv, val_conv);
4621 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1get_1update_1fee(JNIEnv * _env, jclass _b, jlong this_ptr) {
4622 LDKCommitmentUpdate* this_ptr_conv = (LDKCommitmentUpdate*)this_ptr;
4623 LDKUpdateFee* ret = malloc(sizeof(LDKUpdateFee));
4624 *ret = CommitmentUpdate_get_update_fee(this_ptr_conv);
4625 assert(!ret->_underlying_ref);
4626 ret->_underlying_ref = true;
4630 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1set_1update_1fee(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4631 LDKCommitmentUpdate* this_ptr_conv = (LDKCommitmentUpdate*)this_ptr;
4632 LDKUpdateFee val_conv = *(LDKUpdateFee*)val;
4634 val_conv._underlying_ref = false;
4635 return CommitmentUpdate_set_update_fee(this_ptr_conv, val_conv);
4638 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1get_1commitment_1signed(JNIEnv * _env, jclass _b, jlong this_ptr) {
4639 LDKCommitmentUpdate* this_ptr_conv = (LDKCommitmentUpdate*)this_ptr;
4640 LDKCommitmentSigned* ret = malloc(sizeof(LDKCommitmentSigned));
4641 *ret = CommitmentUpdate_get_commitment_signed(this_ptr_conv);
4642 assert(!ret->_underlying_ref);
4643 ret->_underlying_ref = true;
4647 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1set_1commitment_1signed(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
4648 LDKCommitmentUpdate* this_ptr_conv = (LDKCommitmentUpdate*)this_ptr;
4649 LDKCommitmentSigned val_conv = *(LDKCommitmentSigned*)val;
4651 val_conv._underlying_ref = false;
4652 return CommitmentUpdate_set_commitment_signed(this_ptr_conv, val_conv);
4655 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) {
4656 LDKCVec_UpdateAddHTLCZ update_add_htlcs_arg_conv = *(LDKCVec_UpdateAddHTLCZ*)update_add_htlcs_arg;
4657 free((void*)update_add_htlcs_arg);
4658 LDKCVec_UpdateFulfillHTLCZ update_fulfill_htlcs_arg_conv = *(LDKCVec_UpdateFulfillHTLCZ*)update_fulfill_htlcs_arg;
4659 free((void*)update_fulfill_htlcs_arg);
4660 LDKCVec_UpdateFailHTLCZ update_fail_htlcs_arg_conv = *(LDKCVec_UpdateFailHTLCZ*)update_fail_htlcs_arg;
4661 free((void*)update_fail_htlcs_arg);
4662 LDKCVec_UpdateFailMalformedHTLCZ update_fail_malformed_htlcs_arg_conv = *(LDKCVec_UpdateFailMalformedHTLCZ*)update_fail_malformed_htlcs_arg;
4663 free((void*)update_fail_malformed_htlcs_arg);
4664 LDKUpdateFee update_fee_arg_conv = *(LDKUpdateFee*)update_fee_arg;
4665 free((void*)update_fee_arg);
4666 update_fee_arg_conv._underlying_ref = false;
4667 LDKCommitmentSigned commitment_signed_arg_conv = *(LDKCommitmentSigned*)commitment_signed_arg;
4668 free((void*)commitment_signed_arg);
4669 commitment_signed_arg_conv._underlying_ref = false;
4670 LDKCommitmentUpdate* ret = malloc(sizeof(LDKCommitmentUpdate));
4671 *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);
4672 assert(!ret->_underlying_ref);
4673 ret->_underlying_ref = true;
4677 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCFailChannelUpdate_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4678 LDKHTLCFailChannelUpdate this_ptr_conv = *(LDKHTLCFailChannelUpdate*)this_ptr;
4679 free((void*)this_ptr);
4680 return HTLCFailChannelUpdate_free(this_ptr_conv);
4683 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4684 LDKChannelMessageHandler this_ptr_conv = *(LDKChannelMessageHandler*)this_ptr;
4685 free((void*)this_ptr);
4686 return ChannelMessageHandler_free(this_ptr_conv);
4689 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
4690 LDKRoutingMessageHandler this_ptr_conv = *(LDKRoutingMessageHandler*)this_ptr;
4691 free((void*)this_ptr);
4692 return RoutingMessageHandler_free(this_ptr_conv);
4695 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1write(JNIEnv * _env, jclass _b, jlong obj) {
4696 LDKAcceptChannel* obj_conv = (LDKAcceptChannel*)obj;
4697 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4698 *ret = AcceptChannel_write(obj_conv);
4702 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1read(JNIEnv * _env, jclass _b, jlong ser) {
4703 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4705 LDKAcceptChannel* ret = malloc(sizeof(LDKAcceptChannel));
4706 *ret = AcceptChannel_read(ser_conv);
4707 assert(!ret->_underlying_ref);
4708 ret->_underlying_ref = true;
4712 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1write(JNIEnv * _env, jclass _b, jlong obj) {
4713 LDKAnnouncementSignatures* obj_conv = (LDKAnnouncementSignatures*)obj;
4714 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4715 *ret = AnnouncementSignatures_write(obj_conv);
4719 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1read(JNIEnv * _env, jclass _b, jlong ser) {
4720 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4722 LDKAnnouncementSignatures* ret = malloc(sizeof(LDKAnnouncementSignatures));
4723 *ret = AnnouncementSignatures_read(ser_conv);
4724 assert(!ret->_underlying_ref);
4725 ret->_underlying_ref = true;
4729 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1write(JNIEnv * _env, jclass _b, jlong obj) {
4730 LDKChannelReestablish* obj_conv = (LDKChannelReestablish*)obj;
4731 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4732 *ret = ChannelReestablish_write(obj_conv);
4736 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1read(JNIEnv * _env, jclass _b, jlong ser) {
4737 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4739 LDKChannelReestablish* ret = malloc(sizeof(LDKChannelReestablish));
4740 *ret = ChannelReestablish_read(ser_conv);
4741 assert(!ret->_underlying_ref);
4742 ret->_underlying_ref = true;
4746 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1write(JNIEnv * _env, jclass _b, jlong obj) {
4747 LDKClosingSigned* obj_conv = (LDKClosingSigned*)obj;
4748 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4749 *ret = ClosingSigned_write(obj_conv);
4753 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1read(JNIEnv * _env, jclass _b, jlong ser) {
4754 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4756 LDKClosingSigned* ret = malloc(sizeof(LDKClosingSigned));
4757 *ret = ClosingSigned_read(ser_conv);
4758 assert(!ret->_underlying_ref);
4759 ret->_underlying_ref = true;
4763 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1write(JNIEnv * _env, jclass _b, jlong obj) {
4764 LDKCommitmentSigned* obj_conv = (LDKCommitmentSigned*)obj;
4765 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4766 *ret = CommitmentSigned_write(obj_conv);
4770 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1read(JNIEnv * _env, jclass _b, jlong ser) {
4771 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4773 LDKCommitmentSigned* ret = malloc(sizeof(LDKCommitmentSigned));
4774 *ret = CommitmentSigned_read(ser_conv);
4775 assert(!ret->_underlying_ref);
4776 ret->_underlying_ref = true;
4780 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingCreated_1write(JNIEnv * _env, jclass _b, jlong obj) {
4781 LDKFundingCreated* obj_conv = (LDKFundingCreated*)obj;
4782 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4783 *ret = FundingCreated_write(obj_conv);
4787 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingCreated_1read(JNIEnv * _env, jclass _b, jlong ser) {
4788 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4790 LDKFundingCreated* ret = malloc(sizeof(LDKFundingCreated));
4791 *ret = FundingCreated_read(ser_conv);
4792 assert(!ret->_underlying_ref);
4793 ret->_underlying_ref = true;
4797 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingSigned_1write(JNIEnv * _env, jclass _b, jlong obj) {
4798 LDKFundingSigned* obj_conv = (LDKFundingSigned*)obj;
4799 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4800 *ret = FundingSigned_write(obj_conv);
4804 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingSigned_1read(JNIEnv * _env, jclass _b, jlong ser) {
4805 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4807 LDKFundingSigned* ret = malloc(sizeof(LDKFundingSigned));
4808 *ret = FundingSigned_read(ser_conv);
4809 assert(!ret->_underlying_ref);
4810 ret->_underlying_ref = true;
4814 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingLocked_1write(JNIEnv * _env, jclass _b, jlong obj) {
4815 LDKFundingLocked* obj_conv = (LDKFundingLocked*)obj;
4816 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4817 *ret = FundingLocked_write(obj_conv);
4821 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingLocked_1read(JNIEnv * _env, jclass _b, jlong ser) {
4822 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4824 LDKFundingLocked* ret = malloc(sizeof(LDKFundingLocked));
4825 *ret = FundingLocked_read(ser_conv);
4826 assert(!ret->_underlying_ref);
4827 ret->_underlying_ref = true;
4831 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Init_1write(JNIEnv * _env, jclass _b, jlong obj) {
4832 LDKInit* obj_conv = (LDKInit*)obj;
4833 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4834 *ret = Init_write(obj_conv);
4838 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Init_1read(JNIEnv * _env, jclass _b, jlong ser) {
4839 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4841 LDKInit* ret = malloc(sizeof(LDKInit));
4842 *ret = Init_read(ser_conv);
4843 assert(!ret->_underlying_ref);
4844 ret->_underlying_ref = true;
4848 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1write(JNIEnv * _env, jclass _b, jlong obj) {
4849 LDKOpenChannel* obj_conv = (LDKOpenChannel*)obj;
4850 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4851 *ret = OpenChannel_write(obj_conv);
4855 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1read(JNIEnv * _env, jclass _b, jlong ser) {
4856 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4858 LDKOpenChannel* ret = malloc(sizeof(LDKOpenChannel));
4859 *ret = OpenChannel_read(ser_conv);
4860 assert(!ret->_underlying_ref);
4861 ret->_underlying_ref = true;
4865 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1write(JNIEnv * _env, jclass _b, jlong obj) {
4866 LDKRevokeAndACK* obj_conv = (LDKRevokeAndACK*)obj;
4867 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4868 *ret = RevokeAndACK_write(obj_conv);
4872 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1read(JNIEnv * _env, jclass _b, jlong ser) {
4873 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4875 LDKRevokeAndACK* ret = malloc(sizeof(LDKRevokeAndACK));
4876 *ret = RevokeAndACK_read(ser_conv);
4877 assert(!ret->_underlying_ref);
4878 ret->_underlying_ref = true;
4882 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Shutdown_1write(JNIEnv * _env, jclass _b, jlong obj) {
4883 LDKShutdown* obj_conv = (LDKShutdown*)obj;
4884 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4885 *ret = Shutdown_write(obj_conv);
4889 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Shutdown_1read(JNIEnv * _env, jclass _b, jlong ser) {
4890 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4892 LDKShutdown* ret = malloc(sizeof(LDKShutdown));
4893 *ret = Shutdown_read(ser_conv);
4894 assert(!ret->_underlying_ref);
4895 ret->_underlying_ref = true;
4899 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1write(JNIEnv * _env, jclass _b, jlong obj) {
4900 LDKUpdateFailHTLC* obj_conv = (LDKUpdateFailHTLC*)obj;
4901 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4902 *ret = UpdateFailHTLC_write(obj_conv);
4906 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1read(JNIEnv * _env, jclass _b, jlong ser) {
4907 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4909 LDKUpdateFailHTLC* ret = malloc(sizeof(LDKUpdateFailHTLC));
4910 *ret = UpdateFailHTLC_read(ser_conv);
4911 assert(!ret->_underlying_ref);
4912 ret->_underlying_ref = true;
4916 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1write(JNIEnv * _env, jclass _b, jlong obj) {
4917 LDKUpdateFailMalformedHTLC* obj_conv = (LDKUpdateFailMalformedHTLC*)obj;
4918 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4919 *ret = UpdateFailMalformedHTLC_write(obj_conv);
4923 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1read(JNIEnv * _env, jclass _b, jlong ser) {
4924 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4926 LDKUpdateFailMalformedHTLC* ret = malloc(sizeof(LDKUpdateFailMalformedHTLC));
4927 *ret = UpdateFailMalformedHTLC_read(ser_conv);
4928 assert(!ret->_underlying_ref);
4929 ret->_underlying_ref = true;
4933 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFee_1write(JNIEnv * _env, jclass _b, jlong obj) {
4934 LDKUpdateFee* obj_conv = (LDKUpdateFee*)obj;
4935 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4936 *ret = UpdateFee_write(obj_conv);
4940 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFee_1read(JNIEnv * _env, jclass _b, jlong ser) {
4941 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4943 LDKUpdateFee* ret = malloc(sizeof(LDKUpdateFee));
4944 *ret = UpdateFee_read(ser_conv);
4945 assert(!ret->_underlying_ref);
4946 ret->_underlying_ref = true;
4950 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1write(JNIEnv * _env, jclass _b, jlong obj) {
4951 LDKUpdateFulfillHTLC* obj_conv = (LDKUpdateFulfillHTLC*)obj;
4952 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4953 *ret = UpdateFulfillHTLC_write(obj_conv);
4957 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1read(JNIEnv * _env, jclass _b, jlong ser) {
4958 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4960 LDKUpdateFulfillHTLC* ret = malloc(sizeof(LDKUpdateFulfillHTLC));
4961 *ret = UpdateFulfillHTLC_read(ser_conv);
4962 assert(!ret->_underlying_ref);
4963 ret->_underlying_ref = true;
4967 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1write(JNIEnv * _env, jclass _b, jlong obj) {
4968 LDKUpdateAddHTLC* obj_conv = (LDKUpdateAddHTLC*)obj;
4969 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4970 *ret = UpdateAddHTLC_write(obj_conv);
4974 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1read(JNIEnv * _env, jclass _b, jlong ser) {
4975 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4977 LDKUpdateAddHTLC* ret = malloc(sizeof(LDKUpdateAddHTLC));
4978 *ret = UpdateAddHTLC_read(ser_conv);
4979 assert(!ret->_underlying_ref);
4980 ret->_underlying_ref = true;
4984 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Ping_1write(JNIEnv * _env, jclass _b, jlong obj) {
4985 LDKPing* obj_conv = (LDKPing*)obj;
4986 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
4987 *ret = Ping_write(obj_conv);
4991 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Ping_1read(JNIEnv * _env, jclass _b, jlong ser) {
4992 LDKu8slice ser_conv = *(LDKu8slice*)ser;
4994 LDKPing* ret = malloc(sizeof(LDKPing));
4995 *ret = Ping_read(ser_conv);
4996 assert(!ret->_underlying_ref);
4997 ret->_underlying_ref = true;
5001 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Pong_1write(JNIEnv * _env, jclass _b, jlong obj) {
5002 LDKPong* obj_conv = (LDKPong*)obj;
5003 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5004 *ret = Pong_write(obj_conv);
5008 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Pong_1read(JNIEnv * _env, jclass _b, jlong ser) {
5009 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5011 LDKPong* ret = malloc(sizeof(LDKPong));
5012 *ret = Pong_read(ser_conv);
5013 assert(!ret->_underlying_ref);
5014 ret->_underlying_ref = true;
5018 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1write(JNIEnv * _env, jclass _b, jlong obj) {
5019 LDKUnsignedChannelAnnouncement* obj_conv = (LDKUnsignedChannelAnnouncement*)obj;
5020 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5021 *ret = UnsignedChannelAnnouncement_write(obj_conv);
5025 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1read(JNIEnv * _env, jclass _b, jlong ser) {
5026 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5028 LDKUnsignedChannelAnnouncement* ret = malloc(sizeof(LDKUnsignedChannelAnnouncement));
5029 *ret = UnsignedChannelAnnouncement_read(ser_conv);
5030 assert(!ret->_underlying_ref);
5031 ret->_underlying_ref = true;
5035 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1write(JNIEnv * _env, jclass _b, jlong obj) {
5036 LDKChannelAnnouncement* obj_conv = (LDKChannelAnnouncement*)obj;
5037 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5038 *ret = ChannelAnnouncement_write(obj_conv);
5042 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1read(JNIEnv * _env, jclass _b, jlong ser) {
5043 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5045 LDKChannelAnnouncement* ret = malloc(sizeof(LDKChannelAnnouncement));
5046 *ret = ChannelAnnouncement_read(ser_conv);
5047 assert(!ret->_underlying_ref);
5048 ret->_underlying_ref = true;
5052 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1write(JNIEnv * _env, jclass _b, jlong obj) {
5053 LDKUnsignedChannelUpdate* obj_conv = (LDKUnsignedChannelUpdate*)obj;
5054 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5055 *ret = UnsignedChannelUpdate_write(obj_conv);
5059 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1read(JNIEnv * _env, jclass _b, jlong ser) {
5060 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5062 LDKUnsignedChannelUpdate* ret = malloc(sizeof(LDKUnsignedChannelUpdate));
5063 *ret = UnsignedChannelUpdate_read(ser_conv);
5064 assert(!ret->_underlying_ref);
5065 ret->_underlying_ref = true;
5069 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1write(JNIEnv * _env, jclass _b, jlong obj) {
5070 LDKChannelUpdate* obj_conv = (LDKChannelUpdate*)obj;
5071 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5072 *ret = ChannelUpdate_write(obj_conv);
5076 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1read(JNIEnv * _env, jclass _b, jlong ser) {
5077 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5079 LDKChannelUpdate* ret = malloc(sizeof(LDKChannelUpdate));
5080 *ret = ChannelUpdate_read(ser_conv);
5081 assert(!ret->_underlying_ref);
5082 ret->_underlying_ref = true;
5086 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1write(JNIEnv * _env, jclass _b, jlong obj) {
5087 LDKErrorMessage* obj_conv = (LDKErrorMessage*)obj;
5088 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5089 *ret = ErrorMessage_write(obj_conv);
5093 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1read(JNIEnv * _env, jclass _b, jlong ser) {
5094 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5096 LDKErrorMessage* ret = malloc(sizeof(LDKErrorMessage));
5097 *ret = ErrorMessage_read(ser_conv);
5098 assert(!ret->_underlying_ref);
5099 ret->_underlying_ref = true;
5103 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1write(JNIEnv * _env, jclass _b, jlong obj) {
5104 LDKUnsignedNodeAnnouncement* obj_conv = (LDKUnsignedNodeAnnouncement*)obj;
5105 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5106 *ret = UnsignedNodeAnnouncement_write(obj_conv);
5110 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1read(JNIEnv * _env, jclass _b, jlong ser) {
5111 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5113 LDKUnsignedNodeAnnouncement* ret = malloc(sizeof(LDKUnsignedNodeAnnouncement));
5114 *ret = UnsignedNodeAnnouncement_read(ser_conv);
5115 assert(!ret->_underlying_ref);
5116 ret->_underlying_ref = true;
5120 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1write(JNIEnv * _env, jclass _b, jlong obj) {
5121 LDKNodeAnnouncement* obj_conv = (LDKNodeAnnouncement*)obj;
5122 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5123 *ret = NodeAnnouncement_write(obj_conv);
5127 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1read(JNIEnv * _env, jclass _b, jlong ser) {
5128 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5130 LDKNodeAnnouncement* ret = malloc(sizeof(LDKNodeAnnouncement));
5131 *ret = NodeAnnouncement_read(ser_conv);
5132 assert(!ret->_underlying_ref);
5133 ret->_underlying_ref = true;
5137 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_MessageHandler_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5138 LDKMessageHandler this_ptr_conv = *(LDKMessageHandler*)this_ptr;
5139 free((void*)this_ptr);
5140 this_ptr_conv._underlying_ref = false;
5141 return MessageHandler_free(this_ptr_conv);
5144 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_MessageHandler_1get_1chan_1handler(JNIEnv * _env, jclass _b, jlong this_ptr) {
5145 LDKMessageHandler* this_ptr_conv = (LDKMessageHandler*)this_ptr;
5146 long ret = (long)MessageHandler_get_chan_handler(this_ptr_conv);
5150 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_MessageHandler_1set_1chan_1handler(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5151 LDKMessageHandler* this_ptr_conv = (LDKMessageHandler*)this_ptr;
5152 LDKChannelMessageHandler val_conv = *(LDKChannelMessageHandler*)val;
5154 return MessageHandler_set_chan_handler(this_ptr_conv, val_conv);
5157 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_MessageHandler_1get_1route_1handler(JNIEnv * _env, jclass _b, jlong this_ptr) {
5158 LDKMessageHandler* this_ptr_conv = (LDKMessageHandler*)this_ptr;
5159 long ret = (long)MessageHandler_get_route_handler(this_ptr_conv);
5163 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_MessageHandler_1set_1route_1handler(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5164 LDKMessageHandler* this_ptr_conv = (LDKMessageHandler*)this_ptr;
5165 LDKRoutingMessageHandler val_conv = *(LDKRoutingMessageHandler*)val;
5167 return MessageHandler_set_route_handler(this_ptr_conv, val_conv);
5170 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_MessageHandler_1new(JNIEnv * _env, jclass _b, jlong chan_handler_arg, jlong route_handler_arg) {
5171 LDKChannelMessageHandler chan_handler_arg_conv = *(LDKChannelMessageHandler*)chan_handler_arg;
5172 free((void*)chan_handler_arg);
5173 LDKRoutingMessageHandler route_handler_arg_conv = *(LDKRoutingMessageHandler*)route_handler_arg;
5174 free((void*)route_handler_arg);
5175 LDKMessageHandler* ret = malloc(sizeof(LDKMessageHandler));
5176 *ret = MessageHandler_new(chan_handler_arg_conv, route_handler_arg_conv);
5177 assert(!ret->_underlying_ref);
5178 ret->_underlying_ref = true;
5182 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5183 LDKSocketDescriptor this_ptr_conv = *(LDKSocketDescriptor*)this_ptr;
5184 free((void*)this_ptr);
5185 return SocketDescriptor_free(this_ptr_conv);
5188 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerHandleError_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5189 LDKPeerHandleError this_ptr_conv = *(LDKPeerHandleError*)this_ptr;
5190 free((void*)this_ptr);
5191 this_ptr_conv._underlying_ref = false;
5192 return PeerHandleError_free(this_ptr_conv);
5195 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_PeerHandleError_1get_1no_1connection_1possible(JNIEnv * _env, jclass _b, jlong this_ptr) {
5196 LDKPeerHandleError* this_ptr_conv = (LDKPeerHandleError*)this_ptr;
5197 return PeerHandleError_get_no_connection_possible(this_ptr_conv);
5200 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerHandleError_1set_1no_1connection_1possible(JNIEnv * _env, jclass _b, jlong this_ptr, jboolean val) {
5201 LDKPeerHandleError* this_ptr_conv = (LDKPeerHandleError*)this_ptr;
5202 return PeerHandleError_set_no_connection_possible(this_ptr_conv, val);
5205 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeerHandleError_1new(JNIEnv * _env, jclass _b, jboolean no_connection_possible_arg) {
5206 LDKPeerHandleError* ret = malloc(sizeof(LDKPeerHandleError));
5207 *ret = PeerHandleError_new(no_connection_possible_arg);
5208 assert(!ret->_underlying_ref);
5209 ret->_underlying_ref = true;
5213 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerManager_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5214 LDKPeerManager this_ptr_conv = *(LDKPeerManager*)this_ptr;
5215 free((void*)this_ptr);
5216 this_ptr_conv._underlying_ref = false;
5217 return PeerManager_free(this_ptr_conv);
5220 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) {
5221 LDKMessageHandler message_handler_conv = *(LDKMessageHandler*)message_handler;
5222 free((void*)message_handler);
5223 message_handler_conv._underlying_ref = false;
5224 LDKSecretKey our_node_secret_conv = *(LDKSecretKey*)our_node_secret;
5225 free((void*)our_node_secret);
5226 unsigned char ephemeral_random_data_arr[32];
5227 (*_env)->GetByteArrayRegion (_env, ephemeral_random_data, 0, 32, ephemeral_random_data_arr);
5228 unsigned char (*ephemeral_random_data_ref)[32] = &ephemeral_random_data_arr;
5229 LDKLogger logger_conv = *(LDKLogger*)logger;
5230 free((void*)logger);
5231 LDKPeerManager* ret = malloc(sizeof(LDKPeerManager));
5232 *ret = PeerManager_new(message_handler_conv, our_node_secret_conv, ephemeral_random_data_ref, logger_conv);
5233 assert(!ret->_underlying_ref);
5234 ret->_underlying_ref = true;
5238 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeerManager_1get_1peer_1node_1ids(JNIEnv * _env, jclass _b, jlong this_arg) {
5239 LDKPeerManager* this_arg_conv = (LDKPeerManager*)this_arg;
5240 LDKCVec_PublicKeyZ* ret = malloc(sizeof(LDKCVec_PublicKeyZ));
5241 *ret = PeerManager_get_peer_node_ids(this_arg_conv);
5245 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) {
5246 LDKPeerManager* this_arg_conv = (LDKPeerManager*)this_arg;
5247 LDKPublicKey their_node_id_conv = *(LDKPublicKey*)their_node_id;
5248 free((void*)their_node_id);
5249 LDKSocketDescriptor descriptor_conv = *(LDKSocketDescriptor*)descriptor;
5250 free((void*)descriptor);
5251 LDKCResult_CVec_u8ZPeerHandleErrorZ* ret = malloc(sizeof(LDKCResult_CVec_u8ZPeerHandleErrorZ));
5252 *ret = PeerManager_new_outbound_connection(this_arg_conv, their_node_id_conv, descriptor_conv);
5256 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeerManager_1new_1inbound_1connection(JNIEnv * _env, jclass _b, jlong this_arg, jlong descriptor) {
5257 LDKPeerManager* this_arg_conv = (LDKPeerManager*)this_arg;
5258 LDKSocketDescriptor descriptor_conv = *(LDKSocketDescriptor*)descriptor;
5259 free((void*)descriptor);
5260 LDKCResult_NonePeerHandleErrorZ* ret = malloc(sizeof(LDKCResult_NonePeerHandleErrorZ));
5261 *ret = PeerManager_new_inbound_connection(this_arg_conv, descriptor_conv);
5265 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeerManager_1write_1buffer_1space_1avail(JNIEnv * _env, jclass _b, jlong this_arg, jlong descriptor) {
5266 LDKPeerManager* this_arg_conv = (LDKPeerManager*)this_arg;
5267 LDKSocketDescriptor* descriptor_conv = (LDKSocketDescriptor*)descriptor;
5268 LDKCResult_NonePeerHandleErrorZ* ret = malloc(sizeof(LDKCResult_NonePeerHandleErrorZ));
5269 *ret = PeerManager_write_buffer_space_avail(this_arg_conv, descriptor_conv);
5273 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeerManager_1read_1event(JNIEnv * _env, jclass _b, jlong this_arg, jlong peer_descriptor, jlong data) {
5274 LDKPeerManager* this_arg_conv = (LDKPeerManager*)this_arg;
5275 LDKSocketDescriptor* peer_descriptor_conv = (LDKSocketDescriptor*)peer_descriptor;
5276 LDKu8slice data_conv = *(LDKu8slice*)data;
5278 LDKCResult_boolPeerHandleErrorZ* ret = malloc(sizeof(LDKCResult_boolPeerHandleErrorZ));
5279 *ret = PeerManager_read_event(this_arg_conv, peer_descriptor_conv, data_conv);
5283 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerManager_1process_1events(JNIEnv * _env, jclass _b, jlong this_arg) {
5284 LDKPeerManager* this_arg_conv = (LDKPeerManager*)this_arg;
5285 return PeerManager_process_events(this_arg_conv);
5288 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerManager_1socket_1disconnected(JNIEnv * _env, jclass _b, jlong this_arg, jlong descriptor) {
5289 LDKPeerManager* this_arg_conv = (LDKPeerManager*)this_arg;
5290 LDKSocketDescriptor* descriptor_conv = (LDKSocketDescriptor*)descriptor;
5291 return PeerManager_socket_disconnected(this_arg_conv, descriptor_conv);
5294 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerManager_1timer_1tick_1occured(JNIEnv * _env, jclass _b, jlong this_arg) {
5295 LDKPeerManager* this_arg_conv = (LDKPeerManager*)this_arg;
5296 return PeerManager_timer_tick_occured(this_arg_conv);
5299 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_build_1commitment_1secret(JNIEnv * _env, jclass _b, jbyteArray commitment_seed, jlong idx) {
5300 unsigned char commitment_seed_arr[32];
5301 (*_env)->GetByteArrayRegion (_env, commitment_seed, 0, 32, commitment_seed_arr);
5302 unsigned char (*commitment_seed_ref)[32] = &commitment_seed_arr;
5303 LDKThirtyTwoBytes* ret = malloc(sizeof(LDKThirtyTwoBytes));
5304 *ret = build_commitment_secret(commitment_seed_ref, idx);
5308 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5309 LDKTxCreationKeys this_ptr_conv = *(LDKTxCreationKeys*)this_ptr;
5310 free((void*)this_ptr);
5311 this_ptr_conv._underlying_ref = false;
5312 return TxCreationKeys_free(this_ptr_conv);
5315 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1get_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr) {
5316 LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr;
5317 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5318 *ret = TxCreationKeys_get_per_commitment_point(this_ptr_conv);
5322 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1set_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5323 LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr;
5324 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5326 return TxCreationKeys_set_per_commitment_point(this_ptr_conv, val_conv);
5329 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1get_1revocation_1key(JNIEnv * _env, jclass _b, jlong this_ptr) {
5330 LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr;
5331 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5332 *ret = TxCreationKeys_get_revocation_key(this_ptr_conv);
5336 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1set_1revocation_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5337 LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr;
5338 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5340 return TxCreationKeys_set_revocation_key(this_ptr_conv, val_conv);
5343 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1get_1a_1htlc_1key(JNIEnv * _env, jclass _b, jlong this_ptr) {
5344 LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr;
5345 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5346 *ret = TxCreationKeys_get_a_htlc_key(this_ptr_conv);
5350 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1set_1a_1htlc_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5351 LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr;
5352 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5354 return TxCreationKeys_set_a_htlc_key(this_ptr_conv, val_conv);
5357 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1get_1b_1htlc_1key(JNIEnv * _env, jclass _b, jlong this_ptr) {
5358 LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr;
5359 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5360 *ret = TxCreationKeys_get_b_htlc_key(this_ptr_conv);
5364 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1set_1b_1htlc_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5365 LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr;
5366 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5368 return TxCreationKeys_set_b_htlc_key(this_ptr_conv, val_conv);
5371 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1get_1a_1delayed_1payment_1key(JNIEnv * _env, jclass _b, jlong this_ptr) {
5372 LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr;
5373 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5374 *ret = TxCreationKeys_get_a_delayed_payment_key(this_ptr_conv);
5378 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1set_1a_1delayed_1payment_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5379 LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr;
5380 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5382 return TxCreationKeys_set_a_delayed_payment_key(this_ptr_conv, val_conv);
5385 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) {
5386 LDKPublicKey per_commitment_point_arg_conv = *(LDKPublicKey*)per_commitment_point_arg;
5387 free((void*)per_commitment_point_arg);
5388 LDKPublicKey revocation_key_arg_conv = *(LDKPublicKey*)revocation_key_arg;
5389 free((void*)revocation_key_arg);
5390 LDKPublicKey a_htlc_key_arg_conv = *(LDKPublicKey*)a_htlc_key_arg;
5391 free((void*)a_htlc_key_arg);
5392 LDKPublicKey b_htlc_key_arg_conv = *(LDKPublicKey*)b_htlc_key_arg;
5393 free((void*)b_htlc_key_arg);
5394 LDKPublicKey a_delayed_payment_key_arg_conv = *(LDKPublicKey*)a_delayed_payment_key_arg;
5395 free((void*)a_delayed_payment_key_arg);
5396 LDKTxCreationKeys* ret = malloc(sizeof(LDKTxCreationKeys));
5397 *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);
5398 assert(!ret->_underlying_ref);
5399 ret->_underlying_ref = true;
5403 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1write(JNIEnv * _env, jclass _b, jlong obj) {
5404 LDKTxCreationKeys* obj_conv = (LDKTxCreationKeys*)obj;
5405 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5406 *ret = TxCreationKeys_write(obj_conv);
5410 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1read(JNIEnv * _env, jclass _b, jlong ser) {
5411 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5413 LDKTxCreationKeys* ret = malloc(sizeof(LDKTxCreationKeys));
5414 *ret = TxCreationKeys_read(ser_conv);
5415 assert(!ret->_underlying_ref);
5416 ret->_underlying_ref = true;
5420 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PreCalculatedTxCreationKeys_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5421 LDKPreCalculatedTxCreationKeys this_ptr_conv = *(LDKPreCalculatedTxCreationKeys*)this_ptr;
5422 free((void*)this_ptr);
5423 this_ptr_conv._underlying_ref = false;
5424 return PreCalculatedTxCreationKeys_free(this_ptr_conv);
5427 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PreCalculatedTxCreationKeys_1new(JNIEnv * _env, jclass _b, jlong keys) {
5428 LDKTxCreationKeys keys_conv = *(LDKTxCreationKeys*)keys;
5430 keys_conv._underlying_ref = false;
5431 LDKPreCalculatedTxCreationKeys* ret = malloc(sizeof(LDKPreCalculatedTxCreationKeys));
5432 *ret = PreCalculatedTxCreationKeys_new(keys_conv);
5433 assert(!ret->_underlying_ref);
5434 ret->_underlying_ref = true;
5438 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PreCalculatedTxCreationKeys_1trust_1key_1derivation(JNIEnv * _env, jclass _b, jlong this_arg) {
5439 LDKPreCalculatedTxCreationKeys* this_arg_conv = (LDKPreCalculatedTxCreationKeys*)this_arg;
5440 LDKTxCreationKeys* ret = malloc(sizeof(LDKTxCreationKeys));
5441 *ret = PreCalculatedTxCreationKeys_trust_key_derivation(this_arg_conv);
5442 assert(!ret->_underlying_ref);
5443 ret->_underlying_ref = true;
5447 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PreCalculatedTxCreationKeys_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_arg) {
5448 LDKPreCalculatedTxCreationKeys* this_arg_conv = (LDKPreCalculatedTxCreationKeys*)this_arg;
5449 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5450 *ret = PreCalculatedTxCreationKeys_per_commitment_point(this_arg_conv);
5454 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5455 LDKChannelPublicKeys this_ptr_conv = *(LDKChannelPublicKeys*)this_ptr;
5456 free((void*)this_ptr);
5457 this_ptr_conv._underlying_ref = false;
5458 return ChannelPublicKeys_free(this_ptr_conv);
5461 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1get_1funding_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr) {
5462 LDKChannelPublicKeys* this_ptr_conv = (LDKChannelPublicKeys*)this_ptr;
5463 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5464 *ret = ChannelPublicKeys_get_funding_pubkey(this_ptr_conv);
5468 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1set_1funding_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5469 LDKChannelPublicKeys* this_ptr_conv = (LDKChannelPublicKeys*)this_ptr;
5470 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5472 return ChannelPublicKeys_set_funding_pubkey(this_ptr_conv, val_conv);
5475 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1get_1revocation_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr) {
5476 LDKChannelPublicKeys* this_ptr_conv = (LDKChannelPublicKeys*)this_ptr;
5477 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5478 *ret = ChannelPublicKeys_get_revocation_basepoint(this_ptr_conv);
5482 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1set_1revocation_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5483 LDKChannelPublicKeys* this_ptr_conv = (LDKChannelPublicKeys*)this_ptr;
5484 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5486 return ChannelPublicKeys_set_revocation_basepoint(this_ptr_conv, val_conv);
5489 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1get_1payment_1point(JNIEnv * _env, jclass _b, jlong this_ptr) {
5490 LDKChannelPublicKeys* this_ptr_conv = (LDKChannelPublicKeys*)this_ptr;
5491 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5492 *ret = ChannelPublicKeys_get_payment_point(this_ptr_conv);
5496 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1set_1payment_1point(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5497 LDKChannelPublicKeys* this_ptr_conv = (LDKChannelPublicKeys*)this_ptr;
5498 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5500 return ChannelPublicKeys_set_payment_point(this_ptr_conv, val_conv);
5503 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1get_1delayed_1payment_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr) {
5504 LDKChannelPublicKeys* this_ptr_conv = (LDKChannelPublicKeys*)this_ptr;
5505 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5506 *ret = ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr_conv);
5510 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1set_1delayed_1payment_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5511 LDKChannelPublicKeys* this_ptr_conv = (LDKChannelPublicKeys*)this_ptr;
5512 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5514 return ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr_conv, val_conv);
5517 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1get_1htlc_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr) {
5518 LDKChannelPublicKeys* this_ptr_conv = (LDKChannelPublicKeys*)this_ptr;
5519 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5520 *ret = ChannelPublicKeys_get_htlc_basepoint(this_ptr_conv);
5524 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1set_1htlc_1basepoint(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5525 LDKChannelPublicKeys* this_ptr_conv = (LDKChannelPublicKeys*)this_ptr;
5526 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5528 return ChannelPublicKeys_set_htlc_basepoint(this_ptr_conv, val_conv);
5531 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) {
5532 LDKPublicKey funding_pubkey_arg_conv = *(LDKPublicKey*)funding_pubkey_arg;
5533 free((void*)funding_pubkey_arg);
5534 LDKPublicKey revocation_basepoint_arg_conv = *(LDKPublicKey*)revocation_basepoint_arg;
5535 free((void*)revocation_basepoint_arg);
5536 LDKPublicKey payment_point_arg_conv = *(LDKPublicKey*)payment_point_arg;
5537 free((void*)payment_point_arg);
5538 LDKPublicKey delayed_payment_basepoint_arg_conv = *(LDKPublicKey*)delayed_payment_basepoint_arg;
5539 free((void*)delayed_payment_basepoint_arg);
5540 LDKPublicKey htlc_basepoint_arg_conv = *(LDKPublicKey*)htlc_basepoint_arg;
5541 free((void*)htlc_basepoint_arg);
5542 LDKChannelPublicKeys* ret = malloc(sizeof(LDKChannelPublicKeys));
5543 *ret = ChannelPublicKeys_new(funding_pubkey_arg_conv, revocation_basepoint_arg_conv, payment_point_arg_conv, delayed_payment_basepoint_arg_conv, htlc_basepoint_arg_conv);
5544 assert(!ret->_underlying_ref);
5545 ret->_underlying_ref = true;
5549 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1write(JNIEnv * _env, jclass _b, jlong obj) {
5550 LDKChannelPublicKeys* obj_conv = (LDKChannelPublicKeys*)obj;
5551 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5552 *ret = ChannelPublicKeys_write(obj_conv);
5556 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1read(JNIEnv * _env, jclass _b, jlong ser) {
5557 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5559 LDKChannelPublicKeys* ret = malloc(sizeof(LDKChannelPublicKeys));
5560 *ret = ChannelPublicKeys_read(ser_conv);
5561 assert(!ret->_underlying_ref);
5562 ret->_underlying_ref = true;
5566 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) {
5567 LDKPublicKey per_commitment_point_conv = *(LDKPublicKey*)per_commitment_point;
5568 free((void*)per_commitment_point);
5569 LDKPublicKey a_delayed_payment_base_conv = *(LDKPublicKey*)a_delayed_payment_base;
5570 free((void*)a_delayed_payment_base);
5571 LDKPublicKey a_htlc_base_conv = *(LDKPublicKey*)a_htlc_base;
5572 free((void*)a_htlc_base);
5573 LDKPublicKey b_revocation_base_conv = *(LDKPublicKey*)b_revocation_base;
5574 free((void*)b_revocation_base);
5575 LDKPublicKey b_htlc_base_conv = *(LDKPublicKey*)b_htlc_base;
5576 free((void*)b_htlc_base);
5577 LDKCResult_TxCreationKeysSecpErrorZ* ret = malloc(sizeof(LDKCResult_TxCreationKeysSecpErrorZ));
5578 *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);
5582 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) {
5583 LDKPublicKey revocation_key_conv = *(LDKPublicKey*)revocation_key;
5584 free((void*)revocation_key);
5585 LDKPublicKey delayed_payment_key_conv = *(LDKPublicKey*)delayed_payment_key;
5586 free((void*)delayed_payment_key);
5587 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5588 *ret = get_revokeable_redeemscript(revocation_key_conv, to_self_delay, delayed_payment_key_conv);
5592 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5593 LDKHTLCOutputInCommitment this_ptr_conv = *(LDKHTLCOutputInCommitment*)this_ptr;
5594 free((void*)this_ptr);
5595 this_ptr_conv._underlying_ref = false;
5596 return HTLCOutputInCommitment_free(this_ptr_conv);
5599 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1get_1offered(JNIEnv * _env, jclass _b, jlong this_ptr) {
5600 LDKHTLCOutputInCommitment* this_ptr_conv = (LDKHTLCOutputInCommitment*)this_ptr;
5601 return HTLCOutputInCommitment_get_offered(this_ptr_conv);
5604 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1set_1offered(JNIEnv * _env, jclass _b, jlong this_ptr, jboolean val) {
5605 LDKHTLCOutputInCommitment* this_ptr_conv = (LDKHTLCOutputInCommitment*)this_ptr;
5606 return HTLCOutputInCommitment_set_offered(this_ptr_conv, val);
5609 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1get_1amount_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
5610 LDKHTLCOutputInCommitment* this_ptr_conv = (LDKHTLCOutputInCommitment*)this_ptr;
5611 return HTLCOutputInCommitment_get_amount_msat(this_ptr_conv);
5614 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1set_1amount_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5615 LDKHTLCOutputInCommitment* this_ptr_conv = (LDKHTLCOutputInCommitment*)this_ptr;
5616 return HTLCOutputInCommitment_set_amount_msat(this_ptr_conv, val);
5619 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1get_1cltv_1expiry(JNIEnv * _env, jclass _b, jlong this_ptr) {
5620 LDKHTLCOutputInCommitment* this_ptr_conv = (LDKHTLCOutputInCommitment*)this_ptr;
5621 return HTLCOutputInCommitment_get_cltv_expiry(this_ptr_conv);
5624 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1set_1cltv_1expiry(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
5625 LDKHTLCOutputInCommitment* this_ptr_conv = (LDKHTLCOutputInCommitment*)this_ptr;
5626 return HTLCOutputInCommitment_set_cltv_expiry(this_ptr_conv, val);
5629 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1get_1payment_1hash(JNIEnv * _env, jclass _b, jlong this_ptr) {
5630 LDKHTLCOutputInCommitment* this_ptr_conv = (LDKHTLCOutputInCommitment*)this_ptr;
5631 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
5632 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *HTLCOutputInCommitment_get_payment_hash(this_ptr_conv));
5636 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1set_1payment_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5637 LDKHTLCOutputInCommitment* this_ptr_conv = (LDKHTLCOutputInCommitment*)this_ptr;
5638 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
5640 return HTLCOutputInCommitment_set_payment_hash(this_ptr_conv, val_conv);
5643 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1write(JNIEnv * _env, jclass _b, jlong obj) {
5644 LDKHTLCOutputInCommitment* obj_conv = (LDKHTLCOutputInCommitment*)obj;
5645 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5646 *ret = HTLCOutputInCommitment_write(obj_conv);
5650 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1read(JNIEnv * _env, jclass _b, jlong ser) {
5651 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5653 LDKHTLCOutputInCommitment* ret = malloc(sizeof(LDKHTLCOutputInCommitment));
5654 *ret = HTLCOutputInCommitment_read(ser_conv);
5655 assert(!ret->_underlying_ref);
5656 ret->_underlying_ref = true;
5660 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_get_1htlc_1redeemscript(JNIEnv * _env, jclass _b, jlong htlc, jlong keys) {
5661 LDKHTLCOutputInCommitment* htlc_conv = (LDKHTLCOutputInCommitment*)htlc;
5662 LDKTxCreationKeys* keys_conv = (LDKTxCreationKeys*)keys;
5663 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5664 *ret = get_htlc_redeemscript(htlc_conv, keys_conv);
5668 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_make_1funding_1redeemscript(JNIEnv * _env, jclass _b, jlong a, jlong b) {
5669 LDKPublicKey a_conv = *(LDKPublicKey*)a;
5671 LDKPublicKey b_conv = *(LDKPublicKey*)b;
5673 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5674 *ret = make_funding_redeemscript(a_conv, b_conv);
5678 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) {
5679 unsigned char prev_hash_arr[32];
5680 (*_env)->GetByteArrayRegion (_env, prev_hash, 0, 32, prev_hash_arr);
5681 unsigned char (*prev_hash_ref)[32] = &prev_hash_arr;
5682 LDKHTLCOutputInCommitment* htlc_conv = (LDKHTLCOutputInCommitment*)htlc;
5683 LDKPublicKey a_delayed_payment_key_conv = *(LDKPublicKey*)a_delayed_payment_key;
5684 free((void*)a_delayed_payment_key);
5685 LDKPublicKey revocation_key_conv = *(LDKPublicKey*)revocation_key;
5686 free((void*)revocation_key);
5687 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5688 *ret = build_htlc_transaction(prev_hash_ref, feerate_per_kw, to_self_delay, htlc_conv, a_delayed_payment_key_conv, revocation_key_conv);
5692 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5693 LDKLocalCommitmentTransaction this_ptr_conv = *(LDKLocalCommitmentTransaction*)this_ptr;
5694 free((void*)this_ptr);
5695 this_ptr_conv._underlying_ref = false;
5696 return LocalCommitmentTransaction_free(this_ptr_conv);
5699 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1get_1unsigned_1tx(JNIEnv * _env, jclass _b, jlong this_ptr) {
5700 LDKLocalCommitmentTransaction* this_ptr_conv = (LDKLocalCommitmentTransaction*)this_ptr;
5701 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5702 *ret = LocalCommitmentTransaction_get_unsigned_tx(this_ptr_conv);
5706 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1set_1unsigned_1tx(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5707 LDKLocalCommitmentTransaction* this_ptr_conv = (LDKLocalCommitmentTransaction*)this_ptr;
5708 LDKCVec_u8Z val_conv = *(LDKCVec_u8Z*)val;
5710 return LocalCommitmentTransaction_set_unsigned_tx(this_ptr_conv, val_conv);
5713 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1get_1their_1sig(JNIEnv * _env, jclass _b, jlong this_ptr) {
5714 LDKLocalCommitmentTransaction* this_ptr_conv = (LDKLocalCommitmentTransaction*)this_ptr;
5715 LDKSignature* ret = malloc(sizeof(LDKSignature));
5716 *ret = LocalCommitmentTransaction_get_their_sig(this_ptr_conv);
5720 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1set_1their_1sig(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5721 LDKLocalCommitmentTransaction* this_ptr_conv = (LDKLocalCommitmentTransaction*)this_ptr;
5722 LDKSignature val_conv = *(LDKSignature*)val;
5724 return LocalCommitmentTransaction_set_their_sig(this_ptr_conv, val_conv);
5727 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1get_1feerate_1per_1kw(JNIEnv * _env, jclass _b, jlong this_ptr) {
5728 LDKLocalCommitmentTransaction* this_ptr_conv = (LDKLocalCommitmentTransaction*)this_ptr;
5729 return LocalCommitmentTransaction_get_feerate_per_kw(this_ptr_conv);
5732 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1set_1feerate_1per_1kw(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
5733 LDKLocalCommitmentTransaction* this_ptr_conv = (LDKLocalCommitmentTransaction*)this_ptr;
5734 return LocalCommitmentTransaction_set_feerate_per_kw(this_ptr_conv, val);
5737 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1set_1per_1htlc(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5738 LDKLocalCommitmentTransaction* this_ptr_conv = (LDKLocalCommitmentTransaction*)this_ptr;
5739 LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ val_conv = *(LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ*)val;
5741 return LocalCommitmentTransaction_set_per_htlc(this_ptr_conv, val_conv);
5744 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) {
5745 LDKCVec_u8Z unsigned_tx_conv = *(LDKCVec_u8Z*)unsigned_tx;
5746 free((void*)unsigned_tx);
5747 LDKSignature their_sig_conv = *(LDKSignature*)their_sig;
5748 free((void*)their_sig);
5749 LDKPublicKey our_funding_key_conv = *(LDKPublicKey*)our_funding_key;
5750 free((void*)our_funding_key);
5751 LDKPublicKey their_funding_key_conv = *(LDKPublicKey*)their_funding_key;
5752 free((void*)their_funding_key);
5753 LDKTxCreationKeys local_keys_conv = *(LDKTxCreationKeys*)local_keys;
5754 free((void*)local_keys);
5755 local_keys_conv._underlying_ref = false;
5756 LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ htlc_data_conv = *(LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ*)htlc_data;
5757 free((void*)htlc_data);
5758 LDKLocalCommitmentTransaction* ret = malloc(sizeof(LDKLocalCommitmentTransaction));
5759 *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);
5760 assert(!ret->_underlying_ref);
5761 ret->_underlying_ref = true;
5765 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1trust_1key_1derivation(JNIEnv * _env, jclass _b, jlong this_arg) {
5766 LDKLocalCommitmentTransaction* this_arg_conv = (LDKLocalCommitmentTransaction*)this_arg;
5767 LDKTxCreationKeys* ret = malloc(sizeof(LDKTxCreationKeys));
5768 *ret = LocalCommitmentTransaction_trust_key_derivation(this_arg_conv);
5769 assert(!ret->_underlying_ref);
5770 ret->_underlying_ref = true;
5774 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1txid(JNIEnv * _env, jclass _b, jlong this_arg) {
5775 LDKLocalCommitmentTransaction* this_arg_conv = (LDKLocalCommitmentTransaction*)this_arg;
5776 LDKThirtyTwoBytes* ret = malloc(sizeof(LDKThirtyTwoBytes));
5777 *ret = LocalCommitmentTransaction_txid(this_arg_conv);
5781 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) {
5782 LDKLocalCommitmentTransaction* this_arg_conv = (LDKLocalCommitmentTransaction*)this_arg;
5783 unsigned char funding_key_arr[32];
5784 (*_env)->GetByteArrayRegion (_env, funding_key, 0, 32, funding_key_arr);
5785 unsigned char (*funding_key_ref)[32] = &funding_key_arr;
5786 LDKu8slice funding_redeemscript_conv = *(LDKu8slice*)funding_redeemscript;
5787 free((void*)funding_redeemscript);
5788 LDKSignature* ret = malloc(sizeof(LDKSignature));
5789 *ret = LocalCommitmentTransaction_get_local_sig(this_arg_conv, funding_key_ref, funding_redeemscript_conv, channel_value_satoshis);
5793 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) {
5794 LDKLocalCommitmentTransaction* this_arg_conv = (LDKLocalCommitmentTransaction*)this_arg;
5795 unsigned char htlc_base_key_arr[32];
5796 (*_env)->GetByteArrayRegion (_env, htlc_base_key, 0, 32, htlc_base_key_arr);
5797 unsigned char (*htlc_base_key_ref)[32] = &htlc_base_key_arr;
5798 LDKCResult_CVec_SignatureZNoneZ* ret = malloc(sizeof(LDKCResult_CVec_SignatureZNoneZ));
5799 *ret = LocalCommitmentTransaction_get_htlc_sigs(this_arg_conv, htlc_base_key_ref, local_csv);
5803 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1write(JNIEnv * _env, jclass _b, jlong obj) {
5804 LDKLocalCommitmentTransaction* obj_conv = (LDKLocalCommitmentTransaction*)obj;
5805 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5806 *ret = LocalCommitmentTransaction_write(obj_conv);
5810 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1read(JNIEnv * _env, jclass _b, jlong ser) {
5811 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5813 LDKLocalCommitmentTransaction* ret = malloc(sizeof(LDKLocalCommitmentTransaction));
5814 *ret = LocalCommitmentTransaction_read(ser_conv);
5815 assert(!ret->_underlying_ref);
5816 ret->_underlying_ref = true;
5820 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InitFeatures_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5821 LDKInitFeatures this_ptr_conv = *(LDKInitFeatures*)this_ptr;
5822 free((void*)this_ptr);
5823 this_ptr_conv._underlying_ref = false;
5824 return InitFeatures_free(this_ptr_conv);
5827 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5828 LDKNodeFeatures this_ptr_conv = *(LDKNodeFeatures*)this_ptr;
5829 free((void*)this_ptr);
5830 this_ptr_conv._underlying_ref = false;
5831 return NodeFeatures_free(this_ptr_conv);
5834 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelFeatures_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5835 LDKChannelFeatures this_ptr_conv = *(LDKChannelFeatures*)this_ptr;
5836 free((void*)this_ptr);
5837 this_ptr_conv._underlying_ref = false;
5838 return ChannelFeatures_free(this_ptr_conv);
5841 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHop_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5842 LDKRouteHop this_ptr_conv = *(LDKRouteHop*)this_ptr;
5843 free((void*)this_ptr);
5844 this_ptr_conv._underlying_ref = false;
5845 return RouteHop_free(this_ptr_conv);
5848 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHop_1get_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr) {
5849 LDKRouteHop* this_ptr_conv = (LDKRouteHop*)this_ptr;
5850 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5851 *ret = RouteHop_get_pubkey(this_ptr_conv);
5855 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHop_1set_1pubkey(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5856 LDKRouteHop* this_ptr_conv = (LDKRouteHop*)this_ptr;
5857 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5859 return RouteHop_set_pubkey(this_ptr_conv, val_conv);
5862 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHop_1get_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
5863 LDKRouteHop* this_ptr_conv = (LDKRouteHop*)this_ptr;
5864 return RouteHop_get_short_channel_id(this_ptr_conv);
5867 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHop_1set_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5868 LDKRouteHop* this_ptr_conv = (LDKRouteHop*)this_ptr;
5869 return RouteHop_set_short_channel_id(this_ptr_conv, val);
5872 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHop_1get_1fee_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
5873 LDKRouteHop* this_ptr_conv = (LDKRouteHop*)this_ptr;
5874 return RouteHop_get_fee_msat(this_ptr_conv);
5877 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHop_1set_1fee_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5878 LDKRouteHop* this_ptr_conv = (LDKRouteHop*)this_ptr;
5879 return RouteHop_set_fee_msat(this_ptr_conv, val);
5882 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_RouteHop_1get_1cltv_1expiry_1delta(JNIEnv * _env, jclass _b, jlong this_ptr) {
5883 LDKRouteHop* this_ptr_conv = (LDKRouteHop*)this_ptr;
5884 return RouteHop_get_cltv_expiry_delta(this_ptr_conv);
5887 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHop_1set_1cltv_1expiry_1delta(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
5888 LDKRouteHop* this_ptr_conv = (LDKRouteHop*)this_ptr;
5889 return RouteHop_set_cltv_expiry_delta(this_ptr_conv, val);
5892 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Route_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5893 LDKRoute this_ptr_conv = *(LDKRoute*)this_ptr;
5894 free((void*)this_ptr);
5895 this_ptr_conv._underlying_ref = false;
5896 return Route_free(this_ptr_conv);
5899 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Route_1set_1paths(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5900 LDKRoute* this_ptr_conv = (LDKRoute*)this_ptr;
5901 LDKCVec_CVec_RouteHopZZ val_conv = *(LDKCVec_CVec_RouteHopZZ*)val;
5903 return Route_set_paths(this_ptr_conv, val_conv);
5906 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Route_1new(JNIEnv * _env, jclass _b, jlong paths_arg) {
5907 LDKCVec_CVec_RouteHopZZ paths_arg_conv = *(LDKCVec_CVec_RouteHopZZ*)paths_arg;
5908 free((void*)paths_arg);
5909 LDKRoute* ret = malloc(sizeof(LDKRoute));
5910 *ret = Route_new(paths_arg_conv);
5911 assert(!ret->_underlying_ref);
5912 ret->_underlying_ref = true;
5916 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Route_1write(JNIEnv * _env, jclass _b, jlong obj) {
5917 LDKRoute* obj_conv = (LDKRoute*)obj;
5918 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
5919 *ret = Route_write(obj_conv);
5923 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Route_1read(JNIEnv * _env, jclass _b, jlong ser) {
5924 LDKu8slice ser_conv = *(LDKu8slice*)ser;
5926 LDKRoute* ret = malloc(sizeof(LDKRoute));
5927 *ret = Route_read(ser_conv);
5928 assert(!ret->_underlying_ref);
5929 ret->_underlying_ref = true;
5933 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
5934 LDKRouteHint this_ptr_conv = *(LDKRouteHint*)this_ptr;
5935 free((void*)this_ptr);
5936 this_ptr_conv._underlying_ref = false;
5937 return RouteHint_free(this_ptr_conv);
5940 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHint_1get_1src_1node_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
5941 LDKRouteHint* this_ptr_conv = (LDKRouteHint*)this_ptr;
5942 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
5943 *ret = RouteHint_get_src_node_id(this_ptr_conv);
5947 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1set_1src_1node_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5948 LDKRouteHint* this_ptr_conv = (LDKRouteHint*)this_ptr;
5949 LDKPublicKey val_conv = *(LDKPublicKey*)val;
5951 return RouteHint_set_src_node_id(this_ptr_conv, val_conv);
5954 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHint_1get_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
5955 LDKRouteHint* this_ptr_conv = (LDKRouteHint*)this_ptr;
5956 return RouteHint_get_short_channel_id(this_ptr_conv);
5959 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1set_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5960 LDKRouteHint* this_ptr_conv = (LDKRouteHint*)this_ptr;
5961 return RouteHint_set_short_channel_id(this_ptr_conv, val);
5964 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHint_1get_1fees(JNIEnv * _env, jclass _b, jlong this_ptr) {
5965 LDKRouteHint* this_ptr_conv = (LDKRouteHint*)this_ptr;
5966 LDKRoutingFees* ret = malloc(sizeof(LDKRoutingFees));
5967 *ret = RouteHint_get_fees(this_ptr_conv);
5968 assert(!ret->_underlying_ref);
5969 ret->_underlying_ref = true;
5973 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1set_1fees(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5974 LDKRouteHint* this_ptr_conv = (LDKRouteHint*)this_ptr;
5975 LDKRoutingFees val_conv = *(LDKRoutingFees*)val;
5977 val_conv._underlying_ref = false;
5978 return RouteHint_set_fees(this_ptr_conv, val_conv);
5981 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_RouteHint_1get_1cltv_1expiry_1delta(JNIEnv * _env, jclass _b, jlong this_ptr) {
5982 LDKRouteHint* this_ptr_conv = (LDKRouteHint*)this_ptr;
5983 return RouteHint_get_cltv_expiry_delta(this_ptr_conv);
5986 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1set_1cltv_1expiry_1delta(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
5987 LDKRouteHint* this_ptr_conv = (LDKRouteHint*)this_ptr;
5988 return RouteHint_set_cltv_expiry_delta(this_ptr_conv, val);
5991 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHint_1get_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
5992 LDKRouteHint* this_ptr_conv = (LDKRouteHint*)this_ptr;
5993 return RouteHint_get_htlc_minimum_msat(this_ptr_conv);
5996 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1set_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
5997 LDKRouteHint* this_ptr_conv = (LDKRouteHint*)this_ptr;
5998 return RouteHint_set_htlc_minimum_msat(this_ptr_conv, val);
6001 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) {
6002 LDKPublicKey src_node_id_arg_conv = *(LDKPublicKey*)src_node_id_arg;
6003 free((void*)src_node_id_arg);
6004 LDKRoutingFees fees_arg_conv = *(LDKRoutingFees*)fees_arg;
6005 free((void*)fees_arg);
6006 fees_arg_conv._underlying_ref = false;
6007 LDKRouteHint* ret = malloc(sizeof(LDKRouteHint));
6008 *ret = RouteHint_new(src_node_id_arg_conv, short_channel_id_arg, fees_arg_conv, cltv_expiry_delta_arg, htlc_minimum_msat_arg);
6009 assert(!ret->_underlying_ref);
6010 ret->_underlying_ref = true;
6014 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) {
6015 LDKPublicKey our_node_id_conv = *(LDKPublicKey*)our_node_id;
6016 free((void*)our_node_id);
6017 LDKNetworkGraph* network_conv = (LDKNetworkGraph*)network;
6018 LDKPublicKey target_conv = *(LDKPublicKey*)target;
6019 free((void*)target);
6020 LDKCVec_ChannelDetailsZ* first_hops_conv = (LDKCVec_ChannelDetailsZ*)first_hops;
6021 LDKCVec_RouteHintZ last_hops_conv = *(LDKCVec_RouteHintZ*)last_hops;
6022 free((void*)last_hops);
6023 LDKLogger logger_conv = *(LDKLogger*)logger;
6024 free((void*)logger);
6025 LDKCResult_RouteLightningErrorZ* ret = malloc(sizeof(LDKCResult_RouteLightningErrorZ));
6026 *ret = get_route(our_node_id_conv, network_conv, target_conv, first_hops_conv, last_hops_conv, final_value_msat, final_cltv, logger_conv);
6030 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
6031 LDKNetworkGraph this_ptr_conv = *(LDKNetworkGraph*)this_ptr;
6032 free((void*)this_ptr);
6033 this_ptr_conv._underlying_ref = false;
6034 return NetworkGraph_free(this_ptr_conv);
6037 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LockedNetworkGraph_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
6038 LDKLockedNetworkGraph this_ptr_conv = *(LDKLockedNetworkGraph*)this_ptr;
6039 free((void*)this_ptr);
6040 this_ptr_conv._underlying_ref = false;
6041 return LockedNetworkGraph_free(this_ptr_conv);
6044 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetGraphMsgHandler_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
6045 LDKNetGraphMsgHandler this_ptr_conv = *(LDKNetGraphMsgHandler*)this_ptr;
6046 free((void*)this_ptr);
6047 this_ptr_conv._underlying_ref = false;
6048 return NetGraphMsgHandler_free(this_ptr_conv);
6051 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetGraphMsgHandler_1new(JNIEnv * _env, jclass _b, jlong chain_monitor, jlong logger) {
6052 LDKChainWatchInterface chain_monitor_conv = *(LDKChainWatchInterface*)chain_monitor;
6053 free((void*)chain_monitor);
6054 LDKLogger logger_conv = *(LDKLogger*)logger;
6055 free((void*)logger);
6056 LDKNetGraphMsgHandler* ret = malloc(sizeof(LDKNetGraphMsgHandler));
6057 *ret = NetGraphMsgHandler_new(chain_monitor_conv, logger_conv);
6058 assert(!ret->_underlying_ref);
6059 ret->_underlying_ref = true;
6063 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetGraphMsgHandler_1from_1net_1graph(JNIEnv * _env, jclass _b, jlong chain_monitor, jlong logger, jlong network_graph) {
6064 LDKChainWatchInterface chain_monitor_conv = *(LDKChainWatchInterface*)chain_monitor;
6065 free((void*)chain_monitor);
6066 LDKLogger logger_conv = *(LDKLogger*)logger;
6067 free((void*)logger);
6068 LDKNetworkGraph network_graph_conv = *(LDKNetworkGraph*)network_graph;
6069 free((void*)network_graph);
6070 network_graph_conv._underlying_ref = false;
6071 LDKNetGraphMsgHandler* ret = malloc(sizeof(LDKNetGraphMsgHandler));
6072 *ret = NetGraphMsgHandler_from_net_graph(chain_monitor_conv, logger_conv, network_graph_conv);
6073 assert(!ret->_underlying_ref);
6074 ret->_underlying_ref = true;
6078 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetGraphMsgHandler_1read_1locked_1graph(JNIEnv * _env, jclass _b, jlong this_arg) {
6079 LDKNetGraphMsgHandler* this_arg_conv = (LDKNetGraphMsgHandler*)this_arg;
6080 LDKLockedNetworkGraph* ret = malloc(sizeof(LDKLockedNetworkGraph));
6081 *ret = NetGraphMsgHandler_read_locked_graph(this_arg_conv);
6082 assert(!ret->_underlying_ref);
6083 ret->_underlying_ref = true;
6087 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LockedNetworkGraph_1graph(JNIEnv * _env, jclass _b, jlong this_arg) {
6088 LDKLockedNetworkGraph* this_arg_conv = (LDKLockedNetworkGraph*)this_arg;
6089 LDKNetworkGraph* ret = malloc(sizeof(LDKNetworkGraph));
6090 *ret = LockedNetworkGraph_graph(this_arg_conv);
6091 assert(!ret->_underlying_ref);
6092 ret->_underlying_ref = true;
6096 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetGraphMsgHandler_1as_1RoutingMessageHandler(JNIEnv * _env, jclass _b, jlong this_arg) {
6097 LDKNetGraphMsgHandler* this_arg_conv = (LDKNetGraphMsgHandler*)this_arg;
6098 LDKRoutingMessageHandler* ret = malloc(sizeof(LDKRoutingMessageHandler));
6099 *ret = NetGraphMsgHandler_as_RoutingMessageHandler(this_arg_conv);
6103 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
6104 LDKDirectionalChannelInfo this_ptr_conv = *(LDKDirectionalChannelInfo*)this_ptr;
6105 free((void*)this_ptr);
6106 this_ptr_conv._underlying_ref = false;
6107 return DirectionalChannelInfo_free(this_ptr_conv);
6110 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1get_1last_1update(JNIEnv * _env, jclass _b, jlong this_ptr) {
6111 LDKDirectionalChannelInfo* this_ptr_conv = (LDKDirectionalChannelInfo*)this_ptr;
6112 return DirectionalChannelInfo_get_last_update(this_ptr_conv);
6115 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1set_1last_1update(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
6116 LDKDirectionalChannelInfo* this_ptr_conv = (LDKDirectionalChannelInfo*)this_ptr;
6117 return DirectionalChannelInfo_set_last_update(this_ptr_conv, val);
6120 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1get_1enabled(JNIEnv * _env, jclass _b, jlong this_ptr) {
6121 LDKDirectionalChannelInfo* this_ptr_conv = (LDKDirectionalChannelInfo*)this_ptr;
6122 return DirectionalChannelInfo_get_enabled(this_ptr_conv);
6125 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1set_1enabled(JNIEnv * _env, jclass _b, jlong this_ptr, jboolean val) {
6126 LDKDirectionalChannelInfo* this_ptr_conv = (LDKDirectionalChannelInfo*)this_ptr;
6127 return DirectionalChannelInfo_set_enabled(this_ptr_conv, val);
6130 JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1get_1cltv_1expiry_1delta(JNIEnv * _env, jclass _b, jlong this_ptr) {
6131 LDKDirectionalChannelInfo* this_ptr_conv = (LDKDirectionalChannelInfo*)this_ptr;
6132 return DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr_conv);
6135 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1set_1cltv_1expiry_1delta(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) {
6136 LDKDirectionalChannelInfo* this_ptr_conv = (LDKDirectionalChannelInfo*)this_ptr;
6137 return DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr_conv, val);
6140 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1get_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
6141 LDKDirectionalChannelInfo* this_ptr_conv = (LDKDirectionalChannelInfo*)this_ptr;
6142 return DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr_conv);
6145 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1set_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6146 LDKDirectionalChannelInfo* this_ptr_conv = (LDKDirectionalChannelInfo*)this_ptr;
6147 return DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr_conv, val);
6150 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1write(JNIEnv * _env, jclass _b, jlong obj) {
6151 LDKDirectionalChannelInfo* obj_conv = (LDKDirectionalChannelInfo*)obj;
6152 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
6153 *ret = DirectionalChannelInfo_write(obj_conv);
6157 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1read(JNIEnv * _env, jclass _b, jlong ser) {
6158 LDKu8slice ser_conv = *(LDKu8slice*)ser;
6160 LDKDirectionalChannelInfo* ret = malloc(sizeof(LDKDirectionalChannelInfo));
6161 *ret = DirectionalChannelInfo_read(ser_conv);
6162 assert(!ret->_underlying_ref);
6163 ret->_underlying_ref = true;
6167 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
6168 LDKChannelInfo this_ptr_conv = *(LDKChannelInfo*)this_ptr;
6169 free((void*)this_ptr);
6170 this_ptr_conv._underlying_ref = false;
6171 return ChannelInfo_free(this_ptr_conv);
6174 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1get_1node_1one(JNIEnv * _env, jclass _b, jlong this_ptr) {
6175 LDKChannelInfo* this_ptr_conv = (LDKChannelInfo*)this_ptr;
6176 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
6177 *ret = ChannelInfo_get_node_one(this_ptr_conv);
6181 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1set_1node_1one(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6182 LDKChannelInfo* this_ptr_conv = (LDKChannelInfo*)this_ptr;
6183 LDKPublicKey val_conv = *(LDKPublicKey*)val;
6185 return ChannelInfo_set_node_one(this_ptr_conv, val_conv);
6188 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1get_1one_1to_1two(JNIEnv * _env, jclass _b, jlong this_ptr) {
6189 LDKChannelInfo* this_ptr_conv = (LDKChannelInfo*)this_ptr;
6190 LDKDirectionalChannelInfo* ret = malloc(sizeof(LDKDirectionalChannelInfo));
6191 *ret = ChannelInfo_get_one_to_two(this_ptr_conv);
6192 assert(!ret->_underlying_ref);
6193 ret->_underlying_ref = true;
6197 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1set_1one_1to_1two(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6198 LDKChannelInfo* this_ptr_conv = (LDKChannelInfo*)this_ptr;
6199 LDKDirectionalChannelInfo val_conv = *(LDKDirectionalChannelInfo*)val;
6201 val_conv._underlying_ref = false;
6202 return ChannelInfo_set_one_to_two(this_ptr_conv, val_conv);
6205 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1get_1node_1two(JNIEnv * _env, jclass _b, jlong this_ptr) {
6206 LDKChannelInfo* this_ptr_conv = (LDKChannelInfo*)this_ptr;
6207 LDKPublicKey* ret = malloc(sizeof(LDKPublicKey));
6208 *ret = ChannelInfo_get_node_two(this_ptr_conv);
6212 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1set_1node_1two(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6213 LDKChannelInfo* this_ptr_conv = (LDKChannelInfo*)this_ptr;
6214 LDKPublicKey val_conv = *(LDKPublicKey*)val;
6216 return ChannelInfo_set_node_two(this_ptr_conv, val_conv);
6219 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1get_1two_1to_1one(JNIEnv * _env, jclass _b, jlong this_ptr) {
6220 LDKChannelInfo* this_ptr_conv = (LDKChannelInfo*)this_ptr;
6221 LDKDirectionalChannelInfo* ret = malloc(sizeof(LDKDirectionalChannelInfo));
6222 *ret = ChannelInfo_get_two_to_one(this_ptr_conv);
6223 assert(!ret->_underlying_ref);
6224 ret->_underlying_ref = true;
6228 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1set_1two_1to_1one(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6229 LDKChannelInfo* this_ptr_conv = (LDKChannelInfo*)this_ptr;
6230 LDKDirectionalChannelInfo val_conv = *(LDKDirectionalChannelInfo*)val;
6232 val_conv._underlying_ref = false;
6233 return ChannelInfo_set_two_to_one(this_ptr_conv, val_conv);
6236 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1write(JNIEnv * _env, jclass _b, jlong obj) {
6237 LDKChannelInfo* obj_conv = (LDKChannelInfo*)obj;
6238 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
6239 *ret = ChannelInfo_write(obj_conv);
6243 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1read(JNIEnv * _env, jclass _b, jlong ser) {
6244 LDKu8slice ser_conv = *(LDKu8slice*)ser;
6246 LDKChannelInfo* ret = malloc(sizeof(LDKChannelInfo));
6247 *ret = ChannelInfo_read(ser_conv);
6248 assert(!ret->_underlying_ref);
6249 ret->_underlying_ref = true;
6253 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingFees_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
6254 LDKRoutingFees this_ptr_conv = *(LDKRoutingFees*)this_ptr;
6255 free((void*)this_ptr);
6256 this_ptr_conv._underlying_ref = false;
6257 return RoutingFees_free(this_ptr_conv);
6260 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_RoutingFees_1get_1base_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) {
6261 LDKRoutingFees* this_ptr_conv = (LDKRoutingFees*)this_ptr;
6262 return RoutingFees_get_base_msat(this_ptr_conv);
6265 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingFees_1set_1base_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
6266 LDKRoutingFees* this_ptr_conv = (LDKRoutingFees*)this_ptr;
6267 return RoutingFees_set_base_msat(this_ptr_conv, val);
6270 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_RoutingFees_1get_1proportional_1millionths(JNIEnv * _env, jclass _b, jlong this_ptr) {
6271 LDKRoutingFees* this_ptr_conv = (LDKRoutingFees*)this_ptr;
6272 return RoutingFees_get_proportional_millionths(this_ptr_conv);
6275 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingFees_1set_1proportional_1millionths(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
6276 LDKRoutingFees* this_ptr_conv = (LDKRoutingFees*)this_ptr;
6277 return RoutingFees_set_proportional_millionths(this_ptr_conv, val);
6280 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingFees_1new(JNIEnv * _env, jclass _b, jint base_msat_arg, jint proportional_millionths_arg) {
6281 LDKRoutingFees* ret = malloc(sizeof(LDKRoutingFees));
6282 *ret = RoutingFees_new(base_msat_arg, proportional_millionths_arg);
6283 assert(!ret->_underlying_ref);
6284 ret->_underlying_ref = true;
6288 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingFees_1read(JNIEnv * _env, jclass _b, jlong ser) {
6289 LDKu8slice ser_conv = *(LDKu8slice*)ser;
6291 LDKRoutingFees* ret = malloc(sizeof(LDKRoutingFees));
6292 *ret = RoutingFees_read(ser_conv);
6293 assert(!ret->_underlying_ref);
6294 ret->_underlying_ref = true;
6298 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingFees_1write(JNIEnv * _env, jclass _b, jlong obj) {
6299 LDKRoutingFees* obj_conv = (LDKRoutingFees*)obj;
6300 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
6301 *ret = RoutingFees_write(obj_conv);
6305 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
6306 LDKNodeAnnouncementInfo this_ptr_conv = *(LDKNodeAnnouncementInfo*)this_ptr;
6307 free((void*)this_ptr);
6308 this_ptr_conv._underlying_ref = false;
6309 return NodeAnnouncementInfo_free(this_ptr_conv);
6312 JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1get_1last_1update(JNIEnv * _env, jclass _b, jlong this_ptr) {
6313 LDKNodeAnnouncementInfo* this_ptr_conv = (LDKNodeAnnouncementInfo*)this_ptr;
6314 return NodeAnnouncementInfo_get_last_update(this_ptr_conv);
6317 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1set_1last_1update(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) {
6318 LDKNodeAnnouncementInfo* this_ptr_conv = (LDKNodeAnnouncementInfo*)this_ptr;
6319 return NodeAnnouncementInfo_set_last_update(this_ptr_conv, val);
6322 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1get_1rgb(JNIEnv * _env, jclass _b, jlong this_ptr) {
6323 LDKNodeAnnouncementInfo* this_ptr_conv = (LDKNodeAnnouncementInfo*)this_ptr;
6324 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 3);
6325 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 3, *NodeAnnouncementInfo_get_rgb(this_ptr_conv));
6329 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1set_1rgb(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6330 LDKNodeAnnouncementInfo* this_ptr_conv = (LDKNodeAnnouncementInfo*)this_ptr;
6331 LDKThreeBytes val_conv = *(LDKThreeBytes*)val;
6333 return NodeAnnouncementInfo_set_rgb(this_ptr_conv, val_conv);
6336 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1get_1alias(JNIEnv * _env, jclass _b, jlong this_ptr) {
6337 LDKNodeAnnouncementInfo* this_ptr_conv = (LDKNodeAnnouncementInfo*)this_ptr;
6338 jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32);
6339 (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *NodeAnnouncementInfo_get_alias(this_ptr_conv));
6343 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1set_1alias(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6344 LDKNodeAnnouncementInfo* this_ptr_conv = (LDKNodeAnnouncementInfo*)this_ptr;
6345 LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
6347 return NodeAnnouncementInfo_set_alias(this_ptr_conv, val_conv);
6350 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1set_1addresses(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6351 LDKNodeAnnouncementInfo* this_ptr_conv = (LDKNodeAnnouncementInfo*)this_ptr;
6352 LDKCVec_NetAddressZ val_conv = *(LDKCVec_NetAddressZ*)val;
6354 return NodeAnnouncementInfo_set_addresses(this_ptr_conv, val_conv);
6357 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1write(JNIEnv * _env, jclass _b, jlong obj) {
6358 LDKNodeAnnouncementInfo* obj_conv = (LDKNodeAnnouncementInfo*)obj;
6359 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
6360 *ret = NodeAnnouncementInfo_write(obj_conv);
6364 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1read(JNIEnv * _env, jclass _b, jlong ser) {
6365 LDKu8slice ser_conv = *(LDKu8slice*)ser;
6367 LDKNodeAnnouncementInfo* ret = malloc(sizeof(LDKNodeAnnouncementInfo));
6368 *ret = NodeAnnouncementInfo_read(ser_conv);
6369 assert(!ret->_underlying_ref);
6370 ret->_underlying_ref = true;
6374 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeInfo_1free(JNIEnv * _env, jclass _b, jlong this_ptr) {
6375 LDKNodeInfo this_ptr_conv = *(LDKNodeInfo*)this_ptr;
6376 free((void*)this_ptr);
6377 this_ptr_conv._underlying_ref = false;
6378 return NodeInfo_free(this_ptr_conv);
6381 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeInfo_1set_1channels(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6382 LDKNodeInfo* this_ptr_conv = (LDKNodeInfo*)this_ptr;
6383 LDKCVec_u64Z val_conv = *(LDKCVec_u64Z*)val;
6385 return NodeInfo_set_channels(this_ptr_conv, val_conv);
6388 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeInfo_1get_1lowest_1inbound_1channel_1fees(JNIEnv * _env, jclass _b, jlong this_ptr) {
6389 LDKNodeInfo* this_ptr_conv = (LDKNodeInfo*)this_ptr;
6390 LDKRoutingFees* ret = malloc(sizeof(LDKRoutingFees));
6391 *ret = NodeInfo_get_lowest_inbound_channel_fees(this_ptr_conv);
6392 assert(!ret->_underlying_ref);
6393 ret->_underlying_ref = true;
6397 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeInfo_1set_1lowest_1inbound_1channel_1fees(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6398 LDKNodeInfo* this_ptr_conv = (LDKNodeInfo*)this_ptr;
6399 LDKRoutingFees val_conv = *(LDKRoutingFees*)val;
6401 val_conv._underlying_ref = false;
6402 return NodeInfo_set_lowest_inbound_channel_fees(this_ptr_conv, val_conv);
6405 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeInfo_1get_1announcement_1info(JNIEnv * _env, jclass _b, jlong this_ptr) {
6406 LDKNodeInfo* this_ptr_conv = (LDKNodeInfo*)this_ptr;
6407 LDKNodeAnnouncementInfo* ret = malloc(sizeof(LDKNodeAnnouncementInfo));
6408 *ret = NodeInfo_get_announcement_info(this_ptr_conv);
6409 assert(!ret->_underlying_ref);
6410 ret->_underlying_ref = true;
6414 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeInfo_1set_1announcement_1info(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
6415 LDKNodeInfo* this_ptr_conv = (LDKNodeInfo*)this_ptr;
6416 LDKNodeAnnouncementInfo val_conv = *(LDKNodeAnnouncementInfo*)val;
6418 val_conv._underlying_ref = false;
6419 return NodeInfo_set_announcement_info(this_ptr_conv, val_conv);
6422 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) {
6423 LDKCVec_u64Z channels_arg_conv = *(LDKCVec_u64Z*)channels_arg;
6424 free((void*)channels_arg);
6425 LDKRoutingFees lowest_inbound_channel_fees_arg_conv = *(LDKRoutingFees*)lowest_inbound_channel_fees_arg;
6426 free((void*)lowest_inbound_channel_fees_arg);
6427 lowest_inbound_channel_fees_arg_conv._underlying_ref = false;
6428 LDKNodeAnnouncementInfo announcement_info_arg_conv = *(LDKNodeAnnouncementInfo*)announcement_info_arg;
6429 free((void*)announcement_info_arg);
6430 announcement_info_arg_conv._underlying_ref = false;
6431 LDKNodeInfo* ret = malloc(sizeof(LDKNodeInfo));
6432 *ret = NodeInfo_new(channels_arg_conv, lowest_inbound_channel_fees_arg_conv, announcement_info_arg_conv);
6433 assert(!ret->_underlying_ref);
6434 ret->_underlying_ref = true;
6438 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeInfo_1write(JNIEnv * _env, jclass _b, jlong obj) {
6439 LDKNodeInfo* obj_conv = (LDKNodeInfo*)obj;
6440 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
6441 *ret = NodeInfo_write(obj_conv);
6445 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeInfo_1read(JNIEnv * _env, jclass _b, jlong ser) {
6446 LDKu8slice ser_conv = *(LDKu8slice*)ser;
6448 LDKNodeInfo* ret = malloc(sizeof(LDKNodeInfo));
6449 *ret = NodeInfo_read(ser_conv);
6450 assert(!ret->_underlying_ref);
6451 ret->_underlying_ref = true;
6455 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1write(JNIEnv * _env, jclass _b, jlong obj) {
6456 LDKNetworkGraph* obj_conv = (LDKNetworkGraph*)obj;
6457 LDKCVec_u8Z* ret = malloc(sizeof(LDKCVec_u8Z));
6458 *ret = NetworkGraph_write(obj_conv);
6462 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1read(JNIEnv * _env, jclass _b, jlong ser) {
6463 LDKu8slice ser_conv = *(LDKu8slice*)ser;
6465 LDKNetworkGraph* ret = malloc(sizeof(LDKNetworkGraph));
6466 *ret = NetworkGraph_read(ser_conv);
6467 assert(!ret->_underlying_ref);
6468 ret->_underlying_ref = true;
6472 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1new(JNIEnv * _env, jclass _b) {
6473 LDKNetworkGraph* ret = malloc(sizeof(LDKNetworkGraph));
6474 *ret = NetworkGraph_new();
6475 assert(!ret->_underlying_ref);
6476 ret->_underlying_ref = true;
6480 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) {
6481 LDKNetworkGraph* this_arg_conv = (LDKNetworkGraph*)this_arg;
6482 return NetworkGraph_close_channel_from_update(this_arg_conv, short_channel_id, is_permanent);